User`s manual

10. Set the number of waveform cycles
ARM[:STARt][:LAYer[1]]:COUNt <number>
11. Place the AFG in the wait-for-arm state
INITiate[:IMMediate]
BASIC Program Example (STOPTRIG)
1 !RE-STORE"STOPTRIG"
2 !This program sets the arm count to 5 and the repetition count to
3 !5,000. A stop trigger applied to the “Stop Trig” BNC connector
4 !aborts the remaining cycles of the current burst. An arm signal
5 !applied to the “Start Arm In” BNC re-arms the AFG which then
6 !outputs the next burst.
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 Stop_trig
150 WAIT .1 !allow interrupt to be serviced
160 OFF INTR 7
170 END
180 !
190 SUB Stop_trig
200 Stop_trig: !Subprogram which sets up the AFG to output 5, 5,000
210 !cycle bursts. Sets the trigger source to INTernal1,
220 !the stop trigger source to EXTernal, the stop trigger
230 !slope to NEGative. The arm source is also set to
240 !EXTernal.
250 COM @Afg
260 OUTPUT @Afg;"TRIG:STAR:SOUR INT1;"; !trigger source
270 OUTPUT @Afg;" :TRIG:STOP:SOUR EXT;"; !stop trigger source
280 OUTPUT @Afg;" :TRIG:STOP:SLOP NEG;"; !stop trigger slope
290 OUTPUT @Afg;":SOUR:FREQ1:FIX 100;"; !output frequency
300 OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !output function
310 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5VPP" !amplitude
320 OUTPUT @Afg;"ARM:STAR:LAY2:SOUR EXT" !arm source
Continued on Next Page
Chapter 5 Arming and Triggering 181