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
!calculate waveform points as dac
codes
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”
!wait-for-arm state
450
OUTPUT @Afg;“*OPC?”
!allow AFG setup to complete
460
ENTER @Afg;Ready
470
LOOP
480
FOR I=1 TO 4096
!continually download dac codes
490
WRITEIO -9826,Ba12;Waveform(I)
500
NEXT I
510
END LOOP
520
SUBEND
530
!
540
SUB Rst
•
•
610
SUB Errmsg
•
•
C and QuickBASIC
Program Version
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.
Chapter 6
HP E1340A High Speed Operation 128
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 ...