2606B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2606B-901-01 Rev. B / May 2018
7-93
Note that the precision is the number of significant digits printed. There is always one digit to the left
of the decimal point; be sure to include this digit when setting the precision.
Example
format.asciiprecision = 10
x = 2.54
printnumber(x)
format.asciiprecision = 3
printnumber(x)
Output:
2.54000
2.54e+00
Also see
(on page 7-93)
(on page 7-94)
(on page 7-152)
(on page 7-153)
(on page 7-154)
format.byteorder
This attribute sets the binary byte order for the data that is printed using the
printnumber()
and
printbuffer()
functions.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Attribute (RW)
Yes
Instrument reset
Recall setup
Not saved
1 (format.LITTLEENDIAN)
Usage
order
= format.byteorder
format.byteorder =
order
order
Byte order value as follows:
Most significant byte first:
0
,
format.NORMAL
,
format.NETWORK
, or
format.BIGENDIAN
Least significant byte first:
1
,
format.SWAPPED
or
format.LITTLEENDIAN
Details
This attribute selects the byte order in which data is written when you are printing data values with the
printnumber()
and
printbuffer()
functions. The byte order attribute is only used with the
format.SREAL
,
format.REAL
,
format.REAL32
, and
format.REAL64
data formats.
format.NORMAL
,
format.BIGENDIAN
, and
format.NETWORK
select the same byte order.
format.SWAPPED
and
format.LITTLEENDIAN
select the same byte order. Selecting which to use
is a matter of preference.
Select the
format.SWAPPED
or
format.LITTLEENDIAN
byte order when sending data to a
computer with a Microsoft Windows operating system.