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
Содержание E1340A
Страница 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Страница 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Страница 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Страница 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Страница 57: ...Figure 3 1 Generating Arbitrary Waveforms 57 Generating Arbitrary Waveforms with the HP E1340A Chapter 3 ...
Страница 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Страница 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Страница 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Страница 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Страница 204: ...Figure 8 1 HP E1340A Status Groups and Associated Registers Chapter 8 HP E1340A AFG Status 204 ...
Страница 218: ...218 HP E1340A Specifications Appendix A ...
Страница 284: ...284 HP E1340A Register Based Programming Appendix C ...
Страница 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...