Specify byte order of instrument
ByteOrder to be
then the instrument stores the first byte in the first memory address.
then the instrument stores the last byte in the first memory address.
For example, suppose the hexadecimal value 4F52 is to be stored in instrument memory. Because this value consists of two bytes, 4F and 52, two memory locations are used. Using big-endian format, 4F is stored first in the lower storage address. Using little-endian format, 52 is stored first in the lower storage address.
You should configure
ByteOrder to the appropriate
value for your instrument before performing a read or write operation.
Refer to your instrument documentation for information about the order
in which it stores bytes.
You can set this property on interface objects such as TCP/IP or GPIB. In this example, a
Tobj, is set to
default, and you change it to
Tobj.ByteOrder = 'littleEndian'
Any instrument object
The byte order of the instrument is little-endian.
The byte order of the instrument is big-endian.
This example shows how to set the byte order for a TCP/IP object.
Create a TCP/IP object associated with the host 127.0.0.1 and port 4000. Change the byte order
from the default of
t = tcpip('127.0.0.1', 4000); t.ByteOrder = 'littleEndian';