User`s guide

Table Of Contents
88 Chapter 5
Making a Measurement
Waiting for the End of Measurement
Example 5-2 Using the :TRIG:SING Command to Wait until the End of Measurement
(trg_sing.htb)
10 DIM Cont_mode$(1:4)[9],Buff$[9]
20 INTEGER I
30 !
40 ASSIGN @Agte507x TO 717
50 !
60 Cont_mode$(1)="ON"
70 Cont_mode$(2)="ON"
80 Cont_mode$(3)="OFF"
90 Cont_mode$(4)="OFF"
100 !
110 FOR I=1 TO 4
120 OUTPUT @Agte507x;":INIT"&VAL$(I)&":CONT "&Cont_mode$(I)
130 NEXT I
140 OUTPUT @Agte507x;":TRIG:SOUR BUS"
150 !
160 OUTPUT @Agte507x;":TRIG:SING"
170 OUTPUT @Agte507x;"*OPC?"
180 ENTER @Agte507x;Buff$
190 !
200 PRINT "Measurement complete"
210 END
Using Wait Time
Before creating your program, actually measure the time between the start and end of the
measurement cycle. Then code your program so that the controller waits for the actually
measured time using the appropriate command (for example, the WAIT command for
HTBasic). This is a straightforward method, but care must be taken: an incorrect wait time
could result in an unexpected error.