Example Programs - D

173

When this program runs, it returns the DC, RMS, MIN, MAX, HIGH, and LOW data in 10 measurement

data points in the following format:

Output Voltage = 1.999860; Output Current = -0.000043
Arm acquisition system...
Pre-trigger delay...
Trigger acquisition...
Dynamic voltage measurements:
dc = 5.002660 V
rms = 5.002660 V
max = 5.080140 V
min = 1.996970 V
high= 5.002310 V
low = 3.538550 V
Array Data[0] = 2.000360 V
Array Data[1] = 1.999680 V
Array Data[2] = 1.998320 V
Array Data[3] = 1.996970 V
Array Data[4] = 3.214240 V
Array Data[5] = 4.064840 V
Array Data[6] = 4.538600 V
Array Data[7] = 4.923570 V
Array Data[8] = 4.941870 V
Array Data[9] = 5.025240 V
Output Voltage = 5.002450 V
PROGRAM COMPLETED
Press Enter key to continue...
DFI Programming Example

The following program illustrates how to program the DFI port so that it goes low when an OCP

condition turns off the output of the unit. To clear an overcurrent condition, the cause of the condition

must first be removed and then an OUTput:PROTection:CLEar command must be sent. Note that the

status event register will not clear the DFI port until the register is read.

Example 5. DFI Example Using BASIC

10 !Rev A.00.00
20 ASSIGN @Ps TO 705
30 OUTPUT @Ps;"*RST" ! Sets supply to default values
40 OUTPUT @Ps;"OUTP ON" ! Turn on power supply output
50 OUTPUT @Ps;"VOLT 10;CURR .1" ! Program power supply voltage and current
60 !
70 OUTPUT @Ld;"CURR:PROT:STAT ON" ! Turn on overcurrent protection
80 OUTPUT @Ld;"OUTP:DFI:STAT ON" ! Turn on DFI port
90 OUTPUT @Ld;"OUTP:DFI:SOUR QUES" ! Select DFI bit from Questionable status
register
100 OUTPUT @Ld;"STAT:QUES:ENAB 2;PTR 2"! Unmask bit 2 (OCP) on positive
transition
110 !
120 OUTPUT @Ld;"OUTP:PROT:CLE" ! Clears the protection circuit
130 OUTPUT @Ld;"STAT:QUES:EVENT?" ! Clears the Event register and DFI
140 OUTPUT @Ld;EVENT ! Reads the event and clears the buffer
190 !