User`s manual

BASIC Program Example (LIST_STP)
1 !RE-STORE"LIST_STP"
2 !The following program configures the AFG to step through a
3 !frequency list when an GPIB group execute trigger is received.
4 !
10 !Assign I/O path between the computer and E1445A.
20 ASSIGN @Afg TO 70910
30 COM @Afg,Pts
40 !
50 !Set up error checking
60 ON INTR 7 CALL Errmsg
70 ENABLE INTR 7;2
80 OUTPUT @Afg;"*CLS"
90 OUTPUT @Afg;"*SRE 32"
100 OUTPUT @Afg;"*ESE 60"
110 !
120 !Call the subprograms
130 CALL Rst
140 CALL List_stp
150 !
160 WAIT .1 !allow interrupt to be serviced
170 OFF INTR 7
180 END
190 !
200 SUB List_stp
210 List_stp: !Subprogram which sets up a frequency list which is armed
220 !and advanced with GPIB group execute triggers (TRIGGER 7).
230 COM @Afg,Pts
240 OUTPUT @Afg;"TRIG:STAR:SOUR INT1;"; !DDS time base
250 OUTPUT @Afg;":SOUR:FREQ1:MODE LIST;"; !frequency list mode
260 OUTPUT @Afg;" :SOUR:LIST2:FREQ 10E3,20E3,30E3,40E3,50E3;"; !freq list
270 OUTPUT @Afg;" :ARM:SWE:SOUR BUS;"; !arm on GPIB trigger
280 OUTPUT @Afg;" :TRIG:SWE:SOUR BUS;"; !advance on GPIB trigger
290 OUTPUT @Afg;":SOUR:FUNC:SHAP SQU;"; !function
300 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 1 V" !amplitude
310 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state (10 kHz is output)
320 WAIT .1 !wait in case of error
330 CALL Step
340 SUBEND
350 !
360 SUB Step
370 Step: !Subprogram which starts and advances frequency list
380 COM @Afg,Pts
390 DISP “Press ’Continue’ to arm trigger system”
400 PAUSE
410 TRIGGER 7 !start frequency list (10 kHz is still output)
420 FOR I=1 TO 4 !Triggers for the four remaining frequencies
430 DISP “Press ’Continue’ to advance to next frequency”
440 PAUSE
Continued on Next Page
194 Arming and Triggering Chapter 5