3. Enable EOI and EOL using
IOEOI (ISC, 1)
and
IOEOL (ISC, state, 2)
,
respectively. The variable
state
contains the decimal codes for CR
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
Wave_seg
in
IOOUTPUTAB (ADDR, Wave_seg, num_bytes)
.
Wave_seg
contains
the <8-bit data bytes>,
num_bytes
contains the value for the number
of bytes to be transferred, and
swap
contains the swap value (see
“ Swapping the Data Bytes” later in this chapter).
IOOUTPUTAB
’s
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)
to terminate the data transfer with a
CR
LF
.
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);
}
117 HP E1340A High Speed Operation
Chapter 6
Summary of Contents for E1340A
Page 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Page 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Page 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Page 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Page 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Page 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Page 218: ...218 HP E1340A Specifications Appendix A ...
Page 284: ...284 HP E1340A Register Based Programming Appendix C ...
Page 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...