HP IBASIC Program Example (VXISRCE)
127
HP E1340A High Speed Operation
This program uses the input data register to download the data directly to
the DAC over the VXIbus (see Appendix C for register programming
information).
1
!RE-SAVE"VXISRCE"
2
!This program downloads dac codes to the AFG dac from the input
3
!data register. Corresponding amplitude points are output as the
4
!codes are received.
5
!
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 input data register offset to form the
60
!complete register address.
70
Base_addr=DVAL("1FC000",16)+(80*64)
80
!
90
COM @Afg,Base_addr,INTEGER Waveform(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
!Set AFG parameters
210
OUTPUT @Afg;"SOUR:VOLT:LEV:IMM:AMPL 5.1175V" !scale
220
!
230
!Call subprogram which defines a triangle waveform.
240
CALL Triwave
250
!
260
WAIT .1
270
OFF INTR 8
280
END
290
!
300
SUB Triwave
Continued on next page
amplitude
!allow interrupt to be serviced
Chapter 6