User`s manual

210 !
220 WAIT .1 !allow interrupt to be serviced
230 OFF INTR 7
240 END
250 !
260 SUB Wvfm_manage
270 Wvfm_manage: !Subprogram which calls the subprograms which delete
280 !all existing waveforms and define Sin(x)/x and
290 !pseudo random noise.
300 COM @Afg
310 CALL Rst
320 CALL Wf_del
330 CALL Sinx_def !Comment out this line if line 180 is commented
340 CALL Noise_def !Comment out this line if line 190 is commented
350 SUBEND
360 !
370 SUB Sinx_def
380 Sinx_def !Set sweep mode, specify start and stop sample rates for a
390 !1 kHz to 2 kHz sweep, set arbitrary waveform function.
400 !Compute waveform (Sin(x)/x), define waveform segment and
410 !sequence.
420 COM @Afg
430 OUTPUT @Afg;"SOUR:FREQ1:MODE SWE;"; !sweep mode
440 OUTPUT @Afg;" :SOUR:FREQ1:STAR 4.096E6;"; !start sample rate
450 OUTPUT @Afg;" :SOUR:FREQ1:STOP 8.192E6;"; !stop sample rate
460 OUTPUT @Afg;":SOUR:SWE:COUN INF;"; !sweep count
470 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function (arbitrary)
480 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 1.1V" !scale arb values
490 !
500 DIM Waveform(1:4096)
510 FOR I=-2047 TO 2048
520 IF I=0 THEN I=1.E-38
530 Waveform(I+2048)=((SIN(2*PI*.53125*I/256))/(.53125*I/256)*.159154943092)
540 NEXT I
550 !
560 OUTPUT @Afg;"LIST:SEGM:SEL SIN_X" !select segment
570 OUTPUT @Afg;" LIST:SEGM:DEF 4096" !reserve memory
580 OUTPUT @Afg;" LIST:SEGM:VOLT";Waveform(*) !load points
590 !
600 OUTPUT @Afg;"LIST:SSEQ:SEL S1" !select sequence
610 OUTPUT @Afg;" LIST:SSEQ:DEF 1" !number of segments
620 OUTPUT @Afg;" LIST:SSEQ:SEQ SIN_X" !segment order in sequence
630 SUBEND
640 !
650 SUB Noise_def
660 Noise_def: !Set sweep mode, specify start and stop sample rates for a
670 !10 Hz to 20 Hz sweep, set arbitrary waveform function.
680 !Compute waveform (Noise), define waveform segment and
690 !sequence.
700 COM @Afg
Continued on Next Page
142 Sweeping and Frequency-Shift Keying Chapter 4