User`s manual
160 WAIT .1 !allow interrupt to be serviced
170 OFF INTR 7
180 END
190 !
200 SUB Squ_wave
210 Squ_wave: !Subprogram which selects reference oscillator source
220 !INTernal2, trigger source INTernal2, and the output
230 !frequency, function, and amplitude.
240 COM @Afg
250 OUTPUT @Afg;"SOUR:ROSC:SOUR INT2;"; !reference oscillator
260 OUTPUT @Afg;":TRIG:STAR:SOUR INT2;"; !trigger source
270 OUTPUT @Afg;":SOUR:FREQ2:FIX 10E6;"; !output frequency
280 OUTPUT @Afg;":SOUR:FUNC:SHAP SQU;"; !output function
290 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 1VPP" !amplitude
300 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state
310 SUBEND
320 !
330 SUB Rst
340 Rst: !Subprogram which resets the E1445.
350 COM @Afg
360 OUTPUT @Afg;" *RST;*OPC? !reset the AFG
370 ENTER @Afg;Complete
380 SUBEND
390 !
400 SUB Errmsg
410 Errmsg: !Subprogram which displays E1445 programming errors
420 COM @Afg
430 DIM Message$[256]
440 !Read AFG status byte register and clear service request bit
450 B=SPOLL(@Afg)
460 !End of statement if error occurs among coupled commands
470 OUTPUT @Afg;""
480 OUTPUT @Afg;"ABORT" !abort output waveform
490 REPEAT
500 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
510 ENTER @Afg;Code,Message$
520 PRINT Code,Message$
530 UNTIL Code=0
540 STOP
550 SUBEND
Visual BASIC and
Visual C/C++ Program
Versions
The Visual BASIC example program, DIV_N.FRM, is in directory
“VBPROG” and the Visual C example program, DIV_N.C, is in directory
“VCPROG” on the CD that came with your Agilent E1445A.
Chapter 5 Arming and Triggering 175