User`s manual

540 Tri_wave: !Subprogram which computes a triangle wave and downloads
550 !the corresponding dac codes as signed numbers (in a
560 !definite length block) to segment memory. Marker pulses
570 !coincide with the output voltages of Waveform(1024)
580 !through Waveform(1033).
590 COM @Afg,@Afg1
600 INTEGER Waveform(1:2048) !Calculate triangle wave (dac codes)
610 FOR I=1 TO 1023
620 Waveform(I)=I*.0048828/.00125
630 Waveform(I)=SHIFT(Waveform(I),-3) !shift bits to code positions
640 NEXT I
650 FOR I=1024 TO 1033
660 Waveform(I)=I*.0048828/.00125
670 Waveform(I)=(SHIFT(Waveform(I),-3))+2 !shift bits, set marker bit
680 NEXT I
690 FOR I=1034 TO 2048
700 Waveform(I)=(2048-I)*.0048828/.00125
710 Waveform(I)=SHIFT(Waveform(I),-3) !shift bits to code positions
720 NEXT I
730 !
740 !Output marker as defined by segment and sequence list
750 OUTPUT @Afg;"SOUR:MARK:FEED ""SOUR:LIST1"""
760 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL M2" !segment name
770 OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 2048" !segment size
780 OUTPUT @Afg USING "#,K";"SOUR:LIST1:SEGM:COMB #44096"
790 OUTPUT @Afg1;Waveform(*) !4096 bytes: 4 digits (2 bytes/ampl point)
800 OUTPUT @Afg !CR LF
810 SUBEND
820 !
830 SUB Seq_list
840 Seq_list: !This subprogram downloads the sequence list as a combined
850 !(repetition count, marker, segment address) list in an
860 !indefinite length arbitrary block.
870 INTEGER Sequence(1:2,1:2)
880 REAL Addrm1,Addrm2
890 COM @Afg,@Afg1
900 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL M1" !determine segment address
910 OUTPUT @Afg;"SOUR:LIST1:SEGM:ADDR?"
920 ENTER @Afg;Addrm1
930 Addrm1=Addrm1/4 ! /4 to set starting address (boundary) of segment
940 !
950 !Sequence (1,1) is the repetition count and marker enable for
960 !segment M1. Sequence (1,2) is the starting address of segment M1.
970 Sequence(1,1)=SHIFT(4096-2,-4)+Addrm1 DIV 65536
980 Sequence(1,2)=Addrm1 MOD 65536-65536*(Addrm1 MOD 65536>32767)
990 !
1000 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL M2" !determine segment address
1010 OUTPUT @Afg;"SOUR:LIST1:SEGM:ADDR?"
1020 ENTER @Afg;Addrm2
1030 Addrm2=Addrm2/4 ! /4 to set starting address (boundary) of segment
Continued on Next Page
Chapter 7 High Speed Operation 257