User`s manual
BASIC Program Example (OUTPUNIT)
1 !RE-STORE“OUTPUNIT”
2 !This programs sets the output amplitude units to volts peak-to-peak
3 !
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 Out_unit
150 !
160 WAIT .1 !allow interrupt to be serviced
170 OFF INTR 7
180 END
190 !
200 SUB Out_unit
210 Out_unit:!Subprogram which sets the amplitude units
220 COM @Afg
230 OUTPUT @Afg;“SOUR:VOLT:LEV:IMM:AMPL:UNIT:VOLT VPP” !amplitude units
240 OUTPUT @Afg;“SOUR:VOLT:LEV:IMM:AMPL 8;”; !amplitude
250 OUTPUT @Afg;“:SOUR:VOLT:LEV:IMM:OFFS 1” !offset
260 OUTPUT @Afg;“INIT:IMM” !wait-for-arm state
270 SUBEND
280 !
290 SUB Rst
300 Rst: !Subprogram which resets the E1445.
310 COM @Afg
320 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
330 ENTER @Afg;Complete
340 SUBEND
350 !
360 SUB Errmsg
370 Errmsg: !Subprogram which displays E1445 programming errors
380 COM @Afg
390 DIM Message$[256]
400 !Read AFG status byte register and clear service request bit
410 B=SPOLL(@Afg)
420 !End of statement if error occurs among coupled commands
430 OUTPUT @Afg;""
440 OUTPUT @Afg;"ABORT" !abort output waveform
450 REPEAT
Continued on Next Page
Chapter 2 Generating Standard Waveforms 73