Transferring Data in
QuickBASIC
To transfer Definite Length Block Data to the AFG requires that the data
sent with the
[SOURce:]LIST[:SEGMent]:VOLTage:DAC
command must be
contiguous. To do this, send no carriage return (
CR
) and line feed (
LF
)
before transferring all the data. The
SendData
routine does this as follows
(refer to the QuickBASIC routine below):
1. Disable EOI and EOL using
IOEOI (ISC&, 0)
and
IOEOL (ISC&
, “ ” ,
0)
,
respectively.
ISC&
contains the HP-IB select code, and the
0
and “ ”
(NULL) values disables the carriage return (CR) and line feed (LF)
to allow the AFG to receive a command string without a terminator.
2. Next, sent to the AFG the SCPI
[SOURce:]LIST[1][:SEGment]:VOLTage:DAC
command string using
IOOUTPUTS(ADDR&, Commands$, LEN(Commands$)
.
ADDR&
contains the AFG HP-IB address,
Commands$
contains the SCPI
command string, and
LEN(Commands$)
contains the string length of
Commands$
. This enables the AFG to receive voltage data. Since
CR or LF is disabled, the AFG holds execution until all the data is
sent.
3. Enable EOI and EOL using
IOEOI(ISC&, 1)
and
IOEOL(ISC&,
Endline$, LEN(Endline$))
, respectively. The variable
Endline$
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
WaveSeg%(1)
in
IOOUTPUTAB(ADDR&, SEG WaveSeg%(1), NumSize%,
SwapSize%)
.
WaveSeg%
contains the <8-bit data bytes>,
NumSize%
contains the value for the number of bytes to be
transferred, and
SwapSize%
contains the swap value
(see “ Swapping the Data Bytes” on the following page).
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
NumSize%
.
Chapter 6
HP E1340A High Speed Operation 118
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 ...