IEEE-488 Reference
3-75
3.16 :FORMat subsystem
The commands for this subsystem are used to select the data format for transferring instrument
readings over the bus. The BORDer command and DATA command affect readings transferred
from the buffer ONLY. (i.e. SENSE: DATA? or CALC:DATA? is always be sent in ASCII.)
These commands are summarized in Table 3-7.
[:DATA] <type>[,length]
:FORMat[:DATA] <type>[,<length>] Specify data format
Parameters
<type>[,<length>] = ASCii
ASCII format
REAL,32
IEEE754 single precision format
REAL,64
IEEE754 double precision format
SREal
IEEE754 single precision format
DREal
IEEE754 double precision format
NOTE: When using the ASCii, SREal or DREal parameter, a <length> parameter is not re-
quired. If you do not use a <length> parameter with the REAL parameter, the <length> defaults
to 32 (single precision format).
Query
[:DATA]? Query data format
Description
This command is used to select the data format for transferring readings over the bus. For every
reading conversion, the data string sent over the bus contains the elements specified by the :EL-
EMents command. The specified elements are sent in a particular order.
The ASCII data format is in a direct readable form for the operator. Most BASIC languages eas-
ily convert ASCII mantissa and exponent to other formats. However, some speed is compro-
mised to accommodate the conversion. Figure 3-19 shows the ASCII format that includes all the
data elements.
REAL,32 or SREal will select the binary IEEE754 single precision data format. Figure 3-20
shows the normal byte order format for each data element. For example, if three valid elements
are specified, the data string for each reading conversion is made up of three 32-bit data blocks.
Note that the data string for each reading conversion is preceded by a 2-byte header that is the
binary equivalent of an ASCII # sign and 0.
REAL,64 or DREal selects the binary IEEE754 double precision data format and is shown in
Figure 3-21 (normal byte order shown). This format is similar to the single precision format ex-
cept that it is 64 bits long.