User`s manual
110 !
120 !Call the subprograms
130 CALL Rst
140 CALL Swp_pvss
150 !
160 WAIT .1 !allow interrupt to be serviced
170 OFF INTR 7
180 END
190 !
200 SUB Swp_pvss
210 Swp_pvss: !Subprogram which sets a logarithmic sweep
220 COM @Afg
230 OUTPUT @Afg;"SOUR:FREQ1:MODE SWE;"; !sweep mode
240 OUTPUT @Afg;" :SOUR:FREQ1:STAR 1;"; !start frequency
250 OUTPUT @Afg;" :SOUR:FREQ1:STOP 1E6;"; !stop frequency
260 OUTPUT @Afg;" :SOUR:SWE:POIN 7;"; !sweep points
270 OUTPUT @Afg;" :SOUR:SWE:SPAC LOG;"; !logarithmic sweep
280 OUTPUT @Afg;" :SOUR:SWE:COUN INF;"; !sweep count
290 OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !function
300 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5 V" !amplitude
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
420 Errmsg: !Subprogram which displays E1445 programming errors
430 COM @Afg
440 DIM Message$[256]
450 !Read AFG status byte register and clear service request bit
460 B=SPOLL(@Afg)
470 !End of statement if error occurs among coupled commands
480 OUTPUT @Afg;""
490 OUTPUT @Afg;"ABORT" !abort output waveform
500 REPEAT
510 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
520 ENTER @Afg;Code,Message$
530 PRINT Code,Message$
540 UNTIL Code=0
550 STOP
560 SUBEND
Visual BASIC and
Visual C/C++ Program
Versions
The Visual BASIC example program, LOG_SWP.FRM, is in directory
“VBPROG” and the Visual C example program, LOG_SWP.C, is in
directory “VCPROG” on the CD that came with your Agilent E1445A.
134 Sweeping and Frequency-Shift Keying Chapter 4