HP IBASIC Program Example (DACBLOK)
To transfer Definite Length Block Data to the AFG requires that the data
sent with the
[SOURce:]LIST[:SEGMent]:VOLTage:DAC
command must be
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”
!wait-for-arm state
270
!
280
WAIT .1
!allow interrupt to be serviced
290
OFF INTR 8
300
END
310
!
115 HP E1340A High Speed Operation
Chapter 6
Summary of Contents for E1340A
Page 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Page 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Page 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Page 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Page 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Page 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Page 218: ...218 HP E1340A Specifications Appendix A ...
Page 284: ...284 HP E1340A Register Based Programming Appendix C ...
Page 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...