User`s manual

BASIC Program Example (MARKSEG1)
1 !RE-STORE“MARKSEG1”
2 !This program computes a sine wave and a triangle wave as arbitrary
3 !waveforms. A corresponding marker list is defined for the triangle
4 !wave. The program sets the output sequence to consist of both
5 !waveforms, and enables marker pulses to be output with selected
6 !triangle waveform amplitude points.
7!
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 delete all existing
130 !waveform segments and sequences.
140 CALL Rst
150 CALL Wf_del
160 !
170 !Set up the AFG
180 OUTPUT @Afg;"SOUR:FREQ1:FIX 512E3;"; !frequency
190 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function
200 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.1V" !amplitude
210 OUTPUT @Afg;"SOUR:MARK:FEED ""SOUR:LIST1""" !marker source
220 OUTPUT @Afg;"SOUR:MARK:POL INV" !marker polarity
230 OUTPUT @Afg;"SOUR:MARK:STAT ON" !enable marker
240 !
250 CALL Sine_wave
260 CALL Tri_wave
270 CALL Seq_list
280 !
290 OUTPUT @Afg;"SOUR:FUNC:USER WAVE_OUT" !waveform sequence
300 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state
310 !
320 WAIT .1 !allow interrupt to be serviced
330 OFF INTR 7
340 END
350 !
360 SUB Sine_wave
370 Sine_wave: !Subprogram which computes a sine wave.
380 COM @Afg
390 DIM Waveform(1:512) !Calculate sine wave
400 FOR I=1 TO 512
410 Waveform(I)=5.*(SIN(2.*PI*(I/512.)))
Continued on Next Page
Chapter 6 Marker Outputs/Multiple AFG Operations 209