User`s manual

580 !Download the waveform segment to segment memory using WRITEIO and
590 !the AFG’s high-speed data register. The register’s address is
600 !located in A24 address space.
610 FOR I=1 TO 2048
620 WRITEIO -16,Base_addr+IVAL("26",16);Waveform(I)
630 NEXT I
640 OUTPUT @Afg;"SOUR:ARB:DOWN:COMP" !disable downloading
650 SUBEND
660 !
670 SUB Tri_wave
680 Tri_wave: !Subprogram which computes a triangle wave and downloads
690 !the corresponding dac codes to segment memory over the
700 !VXIbus. Marker pulses coincide with the output voltages
710 !Waveform(1024) through Waveform(1033).
720 COM @Afg,Base_addr
730 CONTROL 16,25;3 !access A24 space with WRITEIO
740 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL TRI" !segment name
750 OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 2048" !segment size
760 !
770 !Calculate triangle wave (dac codes) and shift bits to code positions
780 INTEGER Waveform(1:2048)
790 FOR I=1 TO 1023
800 Waveform(I)=I*.0048828/.00125
810 Waveform(I)=SHIFT(Waveform(I),-3)
820 NEXT I
830 FOR I=1024 TO 1033
840 Waveform(I)=I*.0048828/.00125
850 Waveform(I)=SHIFT(Waveform(I),-3)+2 !include marker bit
860 NEXT I
870 FOR I=1034 TO 2048
880 Waveform(I)=(2048-I)*.0048828/.00125
890 Waveform(I)=SHIFT(Waveform(I),-3)
900 NEXT I
910 !
920 !Set last point bit (actual last point - 3)
930 Waveform(2045)=Waveform(2045)+1
940 !
950 !Enable downloading from the VXIbus
960 OUTPUT @Afg;"ARB:DOWN VXI,TRI,2048"
970 OUTPUT @Afg;"*OPC?"
980 ENTER @Afg;Ready
990 !
1000 !Download the waveform segment to segment memory using WRITEIO and
1010 !the AFG’s high-speed data register. The register’s address is
1020 !located in A24 address space.
1030 FOR I=1 TO 2048
1040 WRITEIO -16,Base_addr+IVAL("26",16);Waveform(I)
1050 NEXT I
1060 OUTPUT @Afg;"SOUR:ARB:DOWN:COMP" !disable downloading
1070 SUBEND
Continued on Next Page
266 High Speed Operation Chapter 7