14-4 FORMat and Misc SYSTem Commands Model 2700 Multimeter/Switch System User’s Manual
IEEE-754 binary formats
Binary data from the instrument can be returned using the single precision format or the
double precision format. The data can be returned in the normal byte order or the swapped
(reversed) byte order. See “
FORMat:BORDer <name>” for details on byte order.
A returned data string from the instrument is made of one or more data elements. Typical
selected data elements include the reading, units, and timestamp. See
“
FORMat:ELEMents <item list>” for details on all data elements.
Single precision data format (32 data bits)
For the single precision format, each data element (e.g., reading) is sent as a 4-byte binary
data block, as shown in
Figure 14-2A. This drawing shows data returned in the normal
byte order (byte 1 first, byte 4 last). With the swapped byte order selected, bytes are
returned in the reverse order (byte 4 first, byte 1 last).
The REAL, 32, or SREal command will select the binary IEEE-754 single precision data
format.
Double precision data format (64 data bits)
For the double precision format, each data element (e.g., reading) is sent as a 8-byte binary
data block, as shown in
Figure 14-2B. This drawing shows data returned in the normal bye
order (byte 1 first, byte 8 last). With the swapped byte order selected, bytes are returned in
the reverse order (byte 8 first, byte 1 last).
The REAL, 64, or DREal command will select the binary IEEE-754 double precision data
format.
Data strings
The data string that is returned by a read command depends on the selected data elements
and the number of measurement conversions that were performed. A data string consists
of a Header and the byte data blocks for each measurement conversion.
Figure 14-2C
shows an example data string: 10 measurement conversions, single precision data format,
three data elements (reading, units, and timestamp), and normal byte order.
Header — The data string for each set of reading conversions is preceded by a 2-byte
header that is the binary equivalent of an ASCII # sign and 0. As shown in
Figure 14-2C,
only one header is sent at the beginning of the data string.