User`s manual

BASIC Program Example (MULSEG)
1 !RE-STORE"MULSEG"
2 !This program outputs an arbitrary waveform that is comprised of
3 !two waveform segments.
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 which reset the AFG and clear segment
130 !and sequence memory.
140 CALL Rst
150 CALL Wf_del
160 !Set the signal frequency, the function, and the amplitude.
170 OUTPUT @Afg;"SOUR:FREQ1:FIX 2.048E6;";
180 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;";
190 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.1V"
200 !Call the subprograms which define the triangle wave, sine wave,
210 !and output waveform sequence.
220 CALL Tri_wave
230 CALL Sine_wave
240 CALL Seq_def
250 !Select the output sequence and start the waveform.
260 OUTPUT @Afg;"SOUR:FUNC:USER WAVE_OUT"
270 OUTPUT @Afg;"INIT:IMM"
280 !
290 WAIT .1 !allow interrupt to be serviced
300 OFF INTR 7
310 END
320 !
330 SUB Tri_wave
340 Tri_wave: !Subprogram which defines a triangle waveform and stores
350 !it in a segment
360 COM @Afg
370 DIM Waveform(1:2048) !Calculate waveform points
380 FOR I=1 TO 2048
390 IF I<1024 THEN
400 Waveform(I)=I*.0048828
410 ELSE
420 Waveform(I)=(2048-I)*.0048828
430 END IF
440 NEXT I
Continued on Next Page
96 Generating Arbitrary Waveforms Chapter 3