HP E1340A User Manual page 115

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

Advertisement

HP IBASIC Program Example (DACBLOK)
115
HP E1340A High Speed Operation
To transfer Definite Length Block Data to the AFG requires that the data
sent with the
[SOURce:]LIST[:SEGMent]:VOLTage:DAC
contiguous. To do this, send no carriage return (CR) and line feed (LF)
before all the data is transferred.
1
!RE-SAVE"DACBLOK"
2
!This program downloads AFG amplitude data in the form of DAC codes
3
!(unsigned numbers). The data is sent in a IEEE-488.2 definite length
4
!block in 16-bit integer format. The waveform is a 4096 point ramp wave.
5
!
10
!Assign I/O paths between IBASIC and the E1340A.
20
ASSIGN @Afg TO 80910
30
ASSIGN @Afg1 TO 80910;FORMAT OFF !path for binary data
40
COM @Afg,@Afg1,INTEGER Waveform(1:4096)
50
!
60
!Set up error checking
70
ON INTR 8 CALL Errmsg
80
ENABLE INTR 8;2
90
OUTPUT @Afg;"*CLS"
100
OUTPUT @Afg;"*SRE 32"
110
OUTPUT @Afg;"*ESE 60"
120
!
130
!Call the subprogram which resets the AFG.
140
CALL Rst
150
!
160
!Set AFG parameters
170
OUTPUT @Afg;"SOUR:FREQ:FIX 1E3;";!frequency
180
OUTPUT @Afg;":SOUR:FUNC:SHAP USER;";!function
190
OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5V" !scale amplitude
200
!
210
!Call subprogram which defines waveform segment A (ramp wave).
220
CALL Ramp_wave
230
!
240
!Select output sequence and initiate waveform
250
OUTPUT @Afg;"SOUR:FUNC:USER A"
260
OUTPUT @Afg;"INIT:IMM"
270
!
280
WAIT .1
290
OFF INTR 8
300
END
310
!
command must be
!wait-for-arm state
!allow interrupt to be serviced
Chapter 6

Advertisement

Table of Contents
loading

Table of Contents