2470 High Voltage SourceMeter Instrument Reference Manual
Section 14: TSP command reference
2470-901-01 Rev. A /
May
2019
14-83
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)
No
Restore configuration
Instrument reset
Power cycle
Configuration script
format.LITTLEENDIAN
Usage
order
= format.byteorder
format.byteorder =
order
order
Byte order value as follows:
Most significant byte first:
format.BIGENDIAN
Least significant byte first:
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.REAL32
and
format.REAL64
data formats.
If you are sending data to a computer with a Microsoft Windows operating system, select the
format.LITTLEENDIAN
byte order.
Example
x = 1.23
format.data = format.REAL32
format.byteorder = format.LITTLEENDIAN
printnumber(x)
format.byteorder = format.BIGENDIAN
printnumber(x)
Output depends on the terminal program you
use, but will look something like:
#0¤p??
#0??p¤
Also see
(on page 14-82)
(on page 14-84)
(on page 14-100)
(on page 14-103)