A SERVICE OF

logo

26 Agilent 6000 Series Oscilloscopes Programmer’s Quick Start Guide
2 Getting Started
Reading Definite-Length Block Query Response Data
Definite-length block query response data allows any type of device-dependent
data to be transmitted over the system interface as a series of 8-bit binary data
bytes. This is particularly useful for sending large quantities of data or 8-bit
extended ASCII codes. The syntax is a pound sign (#) followed by a non-zero
digit representing the number of digits in the decimal integer. After the
non-zero digit is the decimal integer that states the number of 8-bit data bytes
being sent. This is followed by the actual data.
For example, for transmitting 1000 bytes of data, the syntax would be:
The “8” states the number of digits that follow, and “00001000” states the
number of bytes to be transmitted.
The VISA COM library’s ReadIEEEBlock and WriteIEEEBlock methods
understand the definite-length block syntax, so you can simply use variables
that contain the data:
' Read oscilloscope setup using ":SYSTEM:SETUP?" query.
myScope.WriteString ":SYSTEM:SETUP?"
Dim varQueryResult As Variant
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
' Write learn string back to oscilloscope using ":SYSTEM:SETUP" command:
myScope.WriteIEEEBlock ":SYSTEM:SETUP ", varQueryResult
Figure 2 Definite-length block response data
#800001000<1000 bytes of data><terminator>
Actual Data
Number of Bytes
to be Transmitted
Number of Digits
That Follow