User`s manual
BASIC Program Example (SWP_PVST)
1 !RE-STORE"SWP_PVST"
2 !This program sweeps from 5 kHz to 15 kHz in 0.1 seconds to
3 !demonstrate how to set the sweep time. The program also sets
4 !the direction of the sweep.
5 !
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 Swp_pvst
150 !
160 WAIT .1 !allow interrupt to be serviced
170 OFF INTR 7
180 END
190 !
200 SUB Swp_pvst
210 Swp_pvst: !Subprogram which sets sweep direction, points, and time
220 COM @Afg
230 OUTPUT @Afg;"SOUR:FREQ1:MODE SWE;"; !sweep mode
240 OUTPUT @Afg;" :SOUR:FREQ1:STAR 5E3;"; !start frequency
250 OUTPUT @Afg;" :SOUR:FREQ1:STOP 15E3;"; !stop frequency
260 OUTPUT @Afg;" :SOUR:SWEEP:DIR DOWN;"; !sweep direction
270 OUTPUT @Afg;" :SOUR:SWEEP:POIN 100;"; !sweep points
280 OUTPUT @Afg;" :SOUR:SWE:COUN INF;"; !sweep count
290 OUTPUT @Afg;" :TRIG:SWE:SOUR TIM;"; !sweep advance source
300 OUTPUT @Afg;" :SOUR:SWE:TIME .12375;"; !sweep time
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-trigger state
340 SUBEND
350 !
360 SUB Rst
370 Rst: !Subprogram which resets the E1445.
380 COM @Afg
390 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
400 ENTER @Afg;Complete
410 SUBEND
420 !
430 SUB Errmsg
Continued on Next Page
136 Sweeping and Frequency-Shift Keying Chapter 4