User`s manual

BASIC Program Example (SIGN_DAT)
The SIGN_DAT program is very similar to the example programs used in
Chapter 3. The only difference is that this program generates (in line 360)
and transfers (in line 430) segment data as DAC codes in the Signed number
format instead of voltage values.
1 !RE-STORE"SIGN_DAT"
2 !This program downloads arbitrary waveform data as signed
3 !(2’s complement) DAC codes. The waveform defined is a 200 point,
4 !-5V to +5V ramp wave.
5!
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 which reset the AFG and erase all waveform
130 !segments and sequences.
140 CALL Rst
150 CALL Wf_del
160 !
170 OUTPUT @Afg;"SOUR:FREQ1:FIX 200E3;"; !frequency
180 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function (arbitrary)
190 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.11875V" !amplitude
200 !
210 CALL Ramp_wave
220 !
230 OUTPUT @Afg;"SOUR:FUNC:USER RAMP_OUT" !waveform sequence
240 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state
250 !
260 WAIT .1!allow interrupt to be serviced
270 OFF INTR 7
280 END
290 !
300 SUB Ramp_wave
310 Ramp_wave: !Subprogram which defines a ramp waveform and output
320 !sequence.
330 COM @Afg
340 DIM Waveform(1:200) !Calculate waveform points as dac codes
350 FOR I=-100 TO 99
360 Waveform(I+101)=(I*.050505)/.00125
370 NEXT I
380 !
Continued on Next Page
Chapter 7 High Speed Operation 227