User`s manual
40 COM @Afg,@Afg1
50 !
60 !Set up error checking
70 ON INTR 7 CALL Errmsg
80 ENABLE INTR 7;2
90 OUTPUT @Afg;"*CLS"
100 OUTPUT @Afg;"*SRE 32"
110 OUTPUT @Afg;"*ESE 60"
120 !
130 !Call the subprograms
140 CALL Rst
150 CALL Wf_del
160 !
170 OUTPUT @Afg;"SOUR:FREQ1:FIX 2.048E6;"; !frequency
180 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function
190 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.11875V" !amplitude
200 OUTPUT @Afg;"SOUR:ARB:DAC:SOUR INT" !dac data source
210 OUTPUT @Afg;"SOUR:ARB:DAC:FORM SIGN" !dac data format (signed)
220 !
230 CALL Sine_wave
240 CALL Tri_wave
250 CALL Seq_list
260 !
270 OUTPUT @Afg;"SOUR:FUNC:USER M_OUT" !waveform sequence
280 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state
290 !
300 WAIT .1!allow interrupt to be serviced
310 OFF INTR 7
320 END
330 !
340 SUB Sine_wave
350 Sine_wave: !Subprogram which computes a sine wave and downloads
360 !the corresponding dac codes as signed numbers (in a
370 !definite length block) to segment memory. A combined list
380 !is used but no marker pulse is specified.
390 COM @Afg,@Afg1
400 INTEGER Waveform(1:2048) !Calculate sine wave (dac codes)
410 FOR I=1 TO 2048
420 Waveform(I)=5.*(SIN(2.*PI*(I/2048.)))/.00125
430 Waveform(I)=SHIFT(Waveform(I),-3) !shift bits to dac code positions
440 NEXT I
450 !
460 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL M1" !segment name
470 OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 2048" !segment size
480 OUTPUT @Afg USING "#,K";"SOUR:LIST1:SEGM:COMB #44096"
490 OUTPUT @Afg1;Waveform(*) !4096 bytes: 4 digits (2 bytes/ampl point)
500 OUTPUT @Afg !CR LF
510 SUBEND
520 !
530 SUB Tri_wave
Continued on Next Page
256 High Speed Operation Chapter 7