User`s manual
BASIC Program Example (SWP_STEP)
1 !RE-STORE"SWP_STEP"
2 !This program sets the AFG arm source and trigger source to
3 !HOLD. The AFG is armed and advanced through the sweep points
4 !using “arm immediate” and “trigger immediate” commands.
5 !
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 Swp_step
150 !
160 WAIT .1 !allow interrupt to be serviced
170 OFF INTR 7
180 END
190 !
200 SUB Swp_step
210 Swp_step: !Subprogram which sets up a sweep from 1 kHz to 10 kHz
220 !which is armed and advanced on “IMMediate” command.
230 COM @Afg,Pts
240 OUTPUT @Afg;"TRIG:STAR:SOUR INT1;"; !DDS time base
250 OUTPUT @Afg;":SOUR:FREQ1:MODE SWE;"; !sweep mode
260 OUTPUT @Afg;" :SOUR:FREQ1:STAR 1E3;"; !start frequency
270 OUTPUT @Afg;" :SOUR:FREQ1:STOP 10E3;"; !stop frequency
280 OUTPUT @Afg;" :SOUR:SWE:POIN 10;"; !frequency points
290 OUTPUT @Afg;" :ARM:SWE:SOUR HOLD;"; !suspend sweep arm
300 OUTPUT @Afg;" :TRIG:SWE:SOUR HOLD;"; !suspend sweep trigger
310 OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !function
320 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5 V" !amplitude
330 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state
340 CALL Step
350 SUBEND
360 !
370 SUB Step
380 Step: !Subprogram which starts and advances sweep
390 COM @Afg,Pts
400 DISP “Press ’Continue’ to arm trigger system”
410 PAUSE
420 OUTPUT @Afg;"ARM:SWE:IMM" !start sweep (sweep does not advance)
430 OUTPUT @Afg;"SOUR:SWE:POIN?" !query number of waveform points
Continued on Next Page
Chapter 5 Arming and Triggering 191