User`s manual
BASIC Program Example (COMBSEQ)
Sending the Combined Segment Lists is similar to the other BASIC
programs in this chapter. However, since BASIC does not support 32-Bit
Integer variables, sending a Combined Segment Sequence List is done
differently.
How BASIC Transfers
32-Bit Integer Data
The Combined Segment Sequence List must be treated in BASIC as 2, 16-Bit
Integers. The first integer contains the repetition count, marker enable, and the
most significant bit (MSB) of and the segment address. The second bit
contains the rest of the segment address. For example, Figure 7-3 shows two
16-Bit Integers for a combined sequence that contains a waveform segment
with an address of 256, the marker enable bit set, and 2 repetition counts.
BASIC determines the value for the first integer as follows:
Repetition Count/Marker = (SHIFT(4096 - <repetition count>, -4) +
<segment address> DIV 65536) +4
BASIC determines the value for the second integer as follows:
Segment Address = <segment address> MOD 65536 - 65536 *
(<segment address> MOD 65536>32767)
DIV
returns the integer portion of the Dividend. MOD returns the remainder
of the division.
1 !RE-STORE"COMBSEQ"
2 !This program downloads two arbitrary waveforms as combined lists
3 !(voltage and marker) of signed (2’s complement) DAC codes. The
4 !lists are downloaded in definite length arbitrary blocks. The
5 !output sequence is a combined list (repetition count, marker, and
6 !waveform segment address) downloaded in an indefinite length
7 !arbitrary block.
8 !
10 !Assign I/O path between the computer and E1445A.
20 ASSIGN @Afg TO 70910
30 ASSIGN @Afg1 TO 70910;FORMAT OFF !path for binary (block) data
Continued on Next Page
Figure 7-3. Sending 32-Bit Integers in BASIC
Chapter 7 High Speed Operation 255