SCPI Command Reference 17-45
NOTE Regardless of which data format for output strings is selected, the SourceMeter will
only respond to input commands using the ASCII format.
ASCII format
The ASCII data format is in a direct readable form for the operator. Most
BASIC languages easily convert ASCII mantissa and exponent to other for-
mats. However, some speed is compromised to accommodate the conver-
sion. Figure 17-1 shows an example ASCII string that includes all the data
elements. See :ELEMents.
Figure 17-1 also shows the byte order of the data string. Data elements not
specified by the :ELEMents command are simply not included in the string.
Keep in mind that the byte order can only be reversed for the binary format.
See :BORDer.
IEEE-754 single precision format
REAL,32, or SREal will select the binary IEEE-754 single precision data
format. Figure 17-2 shows the normal byte order format for each data ele-
ment. For example, if three valid elements are specified, the data string for
each reading conversion is made up of three 4-byte 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. Figure 17-2 does not
show the byte for the terminator that is attached to the end of each data
string.
+1.000206E+00, +1.000000E-04, +1.000236E+04, +7.282600E+01, +4.813200E+04
Voltage
Reading
Current
Reading
Resistance
Reading
Time
Status
Figure 17-1
ASCII data format
s
# 0
7 0 7 0 7 0 7 0
e f
Header
Byte 1 Byte 2 Byte 3 Byte 4
s = sign bit (0 = positive, 1 = negative)
e = exponent bits (8)
f = fraction bits (23)
Normal byte order shown. For swapped byte order, bytes sent
in reverse order: Header, Byte 4, Byte 3, Byte 2, Byte 1.
The header and terminator are sent only once for each READ?
Figure 17-2
IEEE-754 single
precision data
ormat (32 data
bits)