HP E1340A User Manual page 123

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

Advertisement

HP IBASIC Program Example (VXIDOWN)
123
HP E1340A High Speed Operation
This program is similar to the DACBLOK program on page 115, except on
how the data is transferred to the AFG. The program uses IBASIC to
download the data using the VXIbus.
1
!RE-SAVE"VXIDOWN"
2
!This program generates an arbitrary waveform comprised of two
3
!waveform segments. The segment data (DAC codes) are transferred
4
!from IBASIC to the AFG's input data register over the VXI backplane.
5
!This method of data transfer is recommended when amplitude data
6
!computation (by IBASIC) is not intensive, but fast downloading is
7
!required.
8
!
10
!Assign I/O path between IBASIC and the E1340A.
20
ASSIGN @Afg TO 80910
30
!
40
!Compute the E1340 base address in A16 address space. The base
50
!address is used with the AFG's input data register offset to form
60
!the complete register address.
70
Base_addr=DVAL("1FC000",16)+(80*64)
80
!
90
COM @Afg,Base_addr,INTEGER Wave1(1:4096),INTEGER
Wave2(1:4096)
100
!
110
!Set up error checking
120
ON INTR 8 CALL Errmsg
130
ENABLE INTR 8;2
140
OUTPUT @Afg;"*CLS"
150
OUTPUT @Afg;"*SRE 32"
160
OUTPUT @Afg;"*ESE 60"
170
!
180
!Call the subprogram which resets the AFG.
190
CALL Rst
200
!
210
!Set AFG parameters
220
OUTPUT @Afg;"SOUR:FREQ:FIX 10E3;";!frequency
230
OUTPUT @Afg;":SOUR:FUNC:SHAP USER;";!function
240
OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.1175V" !scale
250
!
260
!Call subprogram which defines waveform segments A and B.
270
CALL Sine_tri_wave
280
!
290
!Select output sequence and initiate waveform
300
OUTPUT @Afg;"SOUR:FUNC:USER AB"
310
OUTPUT @Afg;"INIT:IMM"
Continued on next page
amplitude
!wait-for-arm state
Chapter 6

Advertisement

Table of Contents
loading

Table of Contents