C and QuickBASIC
Programs
91
HP E1340A Sweeping and Frequency-Shift Keying
140
!
150
!Set AFG parameters
160
OUTPUT @Afg;"SOUR:FREQ:MODE SWE;";!frequency mode
170
OUTPUT @Afg;":SOUR:FREQ:STAR 5E3;";!start frequency
180
OUTPUT @Afg;":SOUR:FREQ:STOP 15E3;";!stop frequency
190
OUTPUT @Afg;":SOUR:SWE:POIN 100;"; !sweep points
200
OUTPUT @Afg;":SOUR:SWE:TIME .495;"; !sweep time
210
OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !function
220
OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5V" !amplitude
230
OUTPUT @Afg;"INIT:IMM"
240
!
250
WAIT .1
260
OFF INTR 8
270
END
280
!
290
SUB Rst
360
SUB Errmsg
The C program SWP_PVST.C is in directory " CPROG" , and the
QuickBASIC program SWP_PVST.BAS is in directory " QBPROG" on the
example program disk HP P/N E1340-10036.
!wait-for-arm state
!allow interrupt to be serviced
Chapter 4