User`s manual
350 !
360 SUB Dac_drive
370 Dac_drive: !Subprogram which computes a 128 point, 5 Vpp triangle wave and
380 !writes the corresponding codes directly to the DAC via
390 !the VXIbus and High Speed Data register.
400 COM @Afg,Addr
410 !CONTROL 16,25;3 !access A24 space with WRITEIO
420 !
430 INTEGER I,Waveform(1:128) !Calculate triangle wave (dac codes)
440 FOR I=1 TO 64
450 Waveform(I)=I*.0755/.00125
460 Waveform(I)=SHIFT(Waveform(I),-3) !shift bits to dac code positions
470 NEXT I
480 FOR I=65 TO 128
490 Waveform(I)=(128-I)*.0755/.00125
500 Waveform(I)=SHIFT(Waveform(I),-3) !shift bits to dac code positions
510 NEXT I
520 !
530 !Continuously write data (in 16-bit words) to the dac via the
540 !VXIbus and High Speed Data register.
550 LOOP
560 FOR I=1 TO 128
570 WRITEIO -16,Addr;Waveform(I)
580 NEXT I
590 END LOOP
600 SUBEND
610 !
620 SUB Rst
630 Rst: !Subprogram which resets the E1445.
640 COM @Afg,Addr
650 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
660 ENTER @Afg;Complete
670 SUBEND
Visual BASIC and
Visual C/C++ Program
Versions
The Visual BASIC example program, VXISRCE.FRM, is in directory
“VBPROG” and the Visual C example program, VXISRCE.C, is in
directory “VCPROG” on the CD that came with your Agilent E1445A.
The above example programs use the Agilent E1406A Command Module to
download the data to the DAC. However, the command module is only
used to demonstrate the downloading method for those programs. A better
method is to use an embedded controller.
Chapter 7 High Speed Operation 271