HP E1340A User Manual page 117

Arbitrary function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

117
HP E1340A High Speed Operation
3. Enable EOI and EOL using
respectively. The variable
and LF. Although EOL and EOI are enabled, no CR and LF is sent
until all voltage data transfer is completed (next step).
4. The DAC data values are sent next using the array
IOOUTPUTAB (ADDR, Wave_seg, num_bytes)
the <8-bit data bytes>,
of bytes to be transferred, and
" Swapping the Data Bytes" later in this chapter).
main purpose is to transfer data as Definite Length Arbitrary Block
Data. It automatically determines the " <non-zero digit>" and
" <digits>" and sends the complete " #<non-zero digit><digits><8-bit
data bytes>" block to the AFG.
Since the DAC codes are in a 16-bit integer format, the programs
send 2 " <8-bit data bytes>" for each DAC code; all values are sent
in one data block. The number of data bytes transferred depends on
the number in
num_bytes
5. After all the data is sent, the function sends blank data using
IOOUTPUTS(ADDR,"",0)
This lets the AFG know that it can receive a new command.
void send_data(char *commands, int *Wave_seg, int num_bytes, int
swap)
{
/* First disable EOI and EOL to send continuous data to the AFG;
then sent the data */
IOEOI (ISC, 0);IOEOL (ISC, " " , 0);
IOOUTPUTS (ADDR, commands, strlen(commands));
/* Send the last command and data */
IOOUTPUTAB(ADDR, Wave_seg, num_bytes, swap);
/* Re-enable EOL and EOI for normal HP-IB operation; then send CR/LF */
IOEOI (ISC, 1);IOEOL (ISC, state, 2);
IOOUTPUTS(ADDR,"",0);
}
IOEOI (ISC, 1)
and
contains the decimal codes for CR
state
contains the value for the number
num_bytes
contains the swap value (see
swap
.
to terminate the data transfer with a
IOEOL (ISC, state, 2)
,
Wave_seg
in
.
Wave_seg
contains
IOOUTPUTAB
's
CR LF
.
Chapter 6

Advertisement

Table of Contents
loading

Table of Contents