User`s manual
900 Wav_sel=READIO(-16,Base_addr+IVAL("A",16))
910 WRITEIO -16,Base_addr+IVAL("A",16);Wav_sel
920 !
930 !Select a waveform by writing to the Waveform Select register
940 !following a 0-to-1 transition of the WFUSED bit in the Status
950 !register. The transition indicates a new waveform can be selected.
960 !256 selects sequence 1, 512 selects sequence 2, and 768 selects
970 !sequence 3.
980 Wav_sel=BINAND(READIO(-16,Base_addr+IVAL("A",16)),IVAL("00FF",16))
990 LOOP
1000 FOR I=256 TO 768 STEP 256
1010 WRITEIO -16,Base_addr+IVAL("A",16);BINIOR(Wav_sel,I)
1020 REPEAT
1030 UNTIL BIT(READIO(-16,Base_addr+2),10)
1040 NEXT I
1050 END LOOP
1060 SUBEND
1070 !
1080 SUB Sinx_def
1090 Sinx_def: !Define the waveform Sin(x)/x. Download the waveform data
1100 !as a combined list (voltage and marker) of signed numbers
1110 !in an indefinite length block. Download the sequence as a
1120 !combined list (repetition count, marker, and segment address)
1130 !in an indefinite length arbitrary block.
1140 COM @Afg,@Afg1,Base_addr,Seq1_addr,Seq2_addr,Seq3_addr
1150 INTEGER Waveform(1:4096)
1160 INTEGER Sequence(1:2)
1170 REAL Addr_seg1
1180 FOR I=-2047 TO 2048
1190 IF I=0 THEN I=1.E-38
1200 Waveform(I+2048)=((SIN(2*PI*.53125*I/256))/(.53125*I/256)*.159154943092)/.00125
1210 !shift bits to dac code positions
1220 Waveform(I+2048)=SHIFT(Waveform(I+2048),-3)
1230 NEXT I
1240 !
1250 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL SIN_X" !segment name
1260 OUTPUT @Afg;"SOUR:LIST1:SEGM:DEF 4096" !segment size
1270 OUTPUT @Afg USING "#,K";"SOUR:LIST1:SEGM:COMB #0" !waveform points
1280 OUTPUT @Afg1;Waveform(*) !indefinite length block
1290 OUTPUT @Afg;CHR$(10);END !terminate with line feed (LF) and EOI
1300 !
1310 OUTPUT @Afg;"SOUR:LIST1:SEGM:ADDR?"
1320 ENTER @Afg;Addr_seg1
1330 Addr_seg1=Addr_seg1/8 !/8 to set starting address (boundary) of segment
1340 !
1350 !Sequence (1) is the repetition count and marker enable for
1360 !segment SIN_X. Sequence (2) is the starting address of segment SIN_X.
1370 Sequence(1)=SHIFT(4096-1,-4)+Addr_seg1 DIV 65536.
1380 Sequence(2)=Addr_seg1 MOD 65536.-65536.*(Addr_seg1 MOD 65536.>32767)
Continued on Next Page
502 Register-Based Programming Appendix C