User`s manual

BASIC Program Example (BURST)
1 !RE-STORE"BURST"
2 !This program sets the arm count to infinity, and the cycle count
3 !count to 5. The arm source is set to external and a 1 kHz square
4 !wave is applied to the AFG’s “Start Arm In” BNC connector. The
5 !AFG outputs a 5 cycle burst on each positive edge of the external
6 !arm signal.
7 !
10 !Assign I/O path between the computer and E1445A.
20 ASSIGN @Afg TO 70910
30 COM @Afg
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 Burst_arm
150 !
160 WAIT .1 !allow interrupt to be serviced
170 OFF INTR 7
180 END
190 !
200 SUB Burst_arm
210 Burst_arm: !Subprogram which outputs a 5 cycle burst on each
220 !positive edge of an external arm signal.
230 COM @Afg
240 OUTPUT @Afg;"SOUR:FREQ1:FIX 10E3;"; !burst frequency
250 OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !function
260 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 2.5VPP" !amplitude
270 OUTPUT @Afg;"ARM:STAR:LAY2:SOUR EXT" !arm source
280 OUTPUT @Afg;"ARM:STAR:LAY2:SLOP POS" !arm slope
290 OUTPUT @Afg;" ARM:STAR:LAY2:COUN INF" !arm count
300 OUTPUT @Afg;" ARM:STAR:LAY1:COUN 5" !cycle count
310 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state
320 SUBEND
330 !
340 SUB Rst
350 Rst: !Subprogram which resets the E1445.
360 COM @Afg
370 OUTPUT @Afg;" *RST;*OPC? !reset the AFG
380 ENTER @Afg;Complete
390 SUBEND
400 !
410 SUB Errmsg
Continued on Next Page
170 Arming and Triggering Chapter 5