User`s manual
1880 !
1890 OUTPUT @Afg;"SOUR:LIST1:SSEQ:ADDR?" !sequence location
1900 ENTER @Afg;Seq2_addr
1910 SUBEND
1920 !
1930 SUB Spike_def
1940 Spike_def: !Compute the waveform (sine wave with spike). Download the
1950 !data as a combined list (voltage and marker) of signed
1960 !numbers in an indefinite length block. Download the sequence as
1970 !a combined list (repetition count, marker, and segment address)
1980 !in an indefinite length arbitrary block.
1990 COM @Afg,@Afg1,Base_addr,Seq1_addr,Seq2_addr,Seq3_addr
2000 INTEGER Waveform(1:4096)
2010 INTEGER Sequence(1:2)
2020 REAL Addr_seg3
2030 FOR I=1 TO 4096
2040 Waveform(I)=SIN(2*PI*(I/4096))/.00125
2050 NEXT I
2060 Width=50
2070 FOR J=1 TO Width
2080 I=1024-Width+J
2090 Waveform(I)=Waveform(I)+.9*J/Width/.00125
2100 NEXT J
2110 FOR J=1 TO Width-1
2120 I=1024+Width-J
2130 Waveform(I)=Waveform(I)+.9*J/Width/.00125
2140 NEXT J
2150 !
2160 !shift bits to dac code positions
2170 FOR I=1 TO 4096
2180 Waveform(I)=SHIFT(Waveform(I),-3)
2190 NEXT I
2200 !
2210 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL SPIKE" !segment name
2220 OUTPUT @Afg;"SOUR:LIST1:SEGM:DEF 4096" !segment size
2230 OUTPUT @Afg USING "#,K";"SOUR:LIST1:SEGM:COMB #0" !waveform points
2240 OUTPUT @Afg1;Waveform(*) !indefinite length block
2250 OUTPUT @Afg;CHR$(10);END !terminate with line feed (LF) and EOI
2260 !
2270 OUTPUT @Afg;"SOUR:LIST1:SEGM:ADDR?"
2280 ENTER @Afg;Addr_seg3
2290 Addr_seg3=Addr_seg3/8 !/8 to set starting address (boundary) of segment
2300 !
2310 !Sequence (1) is the repetition count and marker enable for
2320 !segment SPIKE. Sequence (2) is the starting address of segment SPIKE.
2330 Sequence(1)=SHIFT(4096-1,-4)+Addr_seg3 DIV 65536.
2340 Sequence(2)=Addr_seg3 MOD 65536.-65536.*(Addr_seg3 MOD 65536.>32767)
2350 !
2360 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL SEQ3" !sequence name
Continued on Next Page
504 Register-Based Programming Appendix C