User`s manual
BASIC Program Example (LIST1)
1 !RE-STORE “LIST1”
2 !The following program outputs the frequencies 1 kHz, 10 kHz,
3 !100 kHz, and 1 MHz in a (default) period of 1 second.
4 !
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 List1
150 CALL List_length
160 !
170 WAIT .1 !allow interrupt to be serviced
180 OFF INTR 7
190 END
200 !
210 SUB List1
220 List1: !Subprogram which outputs a frequency list
230 COM @Afg
240 OUTPUT @Afg;"SOUR:ROSC:SOUR INT1;"; !reference oscillator
250 OUTPUT @Afg;":TRIG:STAR:SOUR INT1;"; !frequency1 generator
260 OUTPUT @Afg;":SOUR:FREQ1:MODE LIST;"; !list mode
270 OUTPUT @Afg;" :SOUR:LIST2:FREQ 1E3,10E3,100E3,1E6;"; !freq list
280 OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !function
290 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5 V" !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 List_length
410 List_length: !Subprogram which queries frequency list length
420 COM @Afg
430 OUTPUT @Afg;"SOUR:LIST2:FREQ:POIN?"
Continued on Next Page
Chapter 4 Sweeping and Frequency-Shift Keying 125