HP E1340A User Manual page 71

Arbitrary function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

71
Generating Arbitrary Waveforms with the HP E1340A
170
OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.1V" !scale
180
!
190
!Call subprogram which defines waveform segments A and B.
200
CALL Sine_tri_wave
210
!
220
!Select output sequence and initiate waveform
230
OUTPUT @Afg;"SOUR:FUNC:USER HOP_AB"
240
OUTPUT @Afg;"INIT:IMM"
250
!
260
WAIT .1
270
OFF INTR 8
280
END
290
!
300
SUB Sine_tri_wave
310 Sine_tri_wave:
320
COM @Afg,Waveform1(*),Waveform2(*)
350
FOR I=1 TO 4096
360
Waveform1(I)=5*(SIN(2*PI*(I/4096)))
370
NEXT I
380
!
390
OUTPUT @Afg;"SOUR:LIST:SEGM:SEL A"!Select segment name
400
OUTPUT @Afg;" SOUR:LIST:SEGM:VOLT";Waveform1(*)
410
!
420
FOR I=1 TO 2047
430
Waveform2(I)=I*.0024414
440
NEXT I
450
FOR I=2048 TO 4096
460
Waveform2(I)=(4096-I)*.0024414
470
NEXT I
480
!
490
OUTPUT @Afg;"SOUR:LIST:SEGM:SEL B"!Select segment name
500
OUTPUT @Afg;" SOUR:LIST:SEGM:VOLT";Waveform2(*)
510
SUBEND
520
!
530
SUB Rst
600
SUB Errmsg
amplitude
!wait-for-arm state
!allow interrupt to be serviced
!Subprogram which defines
waveforms
!load waveform points
!load waveform points
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents