HP E1340A User Manual page 128

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

Advertisement

C and QuickBASIC
Program Version
Chapter 6
310 Triwave: !Subprogram which defines a triangle waveform and
320
! downloads it continuously to the DAC.
330
COM @Afg,Base_addr,INTEGER Waveform(*)
340
!
350
FOR I=1 TO 2047
360
Waveform(I)=((I*.0024414)/.0025)+2048
370
NEXT I
380
FOR I=2048 TO 4096
390
Waveform(I)=(((4096-I)*.0024414)/.0025)+2048
400
NEXT I
410
!
420
OUTPUT @AFG;"CAL:AC:STAT OFF"! turn ac cal off
430
OUTPUT @Afg;"SOUR:ARB:DAC:SOUR VXI" !dac data source
440
OUTPUT @Afg;"INIT:IMM"
450
OUTPUT @Afg;"*OPC?"
460
ENTER @Afg;Ready
470
LOOP
480
FOR I=1 TO 4096
490
WRITEIO -9826,Base_addr+12;Waveform(I)
500
NEXT I
510
END LOOP
520
SUBEND
530
!
540
SUB Rst
610
SUB Errmsg
The C example program, VXISRCE.C, is in directory " CPROG" and the
QuickBASIC example program, VXISRCE.BAS, is in directory
" QBPROG" on the C and QuickBASIC example disk (part number
E1340-10036).
The C and QuickBASIC example programs use the HP E1405A/E1406A
Command Module or HP E1300A/E1301A Mainframe (version A.06.00 or
above) to download the data to the DAC. However, the command
module/mainframe is only used to demonstrate the downloading method for
C and QuickBASIC. A better method is to use an embedded controller.
!calculate waveform points as dac
codes
!wait-for-arm state
!allow AFG setup to complete
!continually download dac codes
HP E1340A High Speed Operation
128

Advertisement

Table of Contents
loading

Table of Contents