User`s manual

BASIC Program Example (LISTDEF)
1 !RE-STORE"LISTDEF"
2 !This program sends a definite length arbitrary block of frequencies
3 !to the AFG. Once the AFG receives the frequencies, it steps through
4 !the list at a rate of one frequency per second.
5 !
10 !Assign I/O paths between the computer and E1445A. One path sends
20 !data in ASCII format to the AFG, the other path sends frequency
30 !list data to the AFG in binary format.
40 COM @Afg,@Afg1
50 ASSIGN @Afg TO 70910 !path for ASCII data
60 ASSIGN @Afg1 TO 70910;FORMAT OFF !path for binary data
70 !
80 !Set up error checking
90 ON INTR 7 CALL Errmsg
100 ENABLE INTR 7;2
110 OUTPUT @Afg;"*CLS"
120 OUTPUT @Afg;"*SRE 32"
130 OUTPUT @Afg;"*ESE 60"
140 !
150 !Call the subprograms
160 CALL Rst
170 CALL List1
180 !
190 WAIT .1 !allow interrupt to be serviced
200 OFF INTR 7
210 END
220 !
230 SUB List1
240 List1: !Subprogram which downloads a list of 100 frequencies
250 !(1 kHz to 100 kHz) in a definite length arbitrary block.
260 COM @Afg,@Afg1
270 DIM Freqlist(1:100)
280 FOR I=1 TO 100
290 Freqlist(I)=1000.*I
300 NEXT I
310 !
320 OUTPUT @Afg;"SOUR:ROSC:SOUR INT1;"; !reference oscillator
330 OUTPUT @Afg;":TRIG:STAR:SOUR INT1;"; !frequency1 generator
340 OUTPUT @Afg;":SOUR:FREQ1:MODE LIST;"; !frequency list mode
350 OUTPUT @Afg USING “#,K”;":SOUR:LIST2:FREQ #3800"!download freqs
360 OUTPUT @Afg1;Freqlist(*) !^ 800 bytes - 3 digits
370 OUTPUT @Afg !CR LF
380 OUTPUT @Afg;"SOUR:SWE:TIME 100;"; !time (seconds) through list
390 OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !function
400 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5 V" !amplitude
410 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state
420 SUBEND
430 !
Continued on Next Page
Chapter 4 Sweeping and Frequency-Shift Keying 131