Document MT0605P.E
© Xsens Technologies B.V.
MTi User Manual
51
5.3 Messages
5.3.1
Message structure
The communication with the MTi is done by messages which are built according to a standard
structure. The standard MT message can contain zero to 254 bytes of data and the total length is five
to 259 bytes. An MT message contains the following fields:
BID
MID
LEN
DATA
PRE
CS
Preamble (PRE)
Every message starts with the preamble. This field always contains the value 250 (=0xFA).
Bus identifier (BID) or Address
All messages used for the MTi and MTx use the
address value 255 (0xFF) indicating a “master
device”. MT’s used on the Xbus have other BID’s.
Message Identifier (MID)
This message field identifies the kind of message. For a complete listing of all possible messages see
MTi and MTx Low-Level Communication Document.
The message MTData2 is explained in section
5.3.3.
Length (LEN)
Specifies the number of data bytes in the DATA field. Value 255 (=0xFF) is reserved. This means that
a message has a maximum payload of 254 bytes. If Length is zero no data field exists.
Data (DATA)
This field contains the data bytes and it has a variable length which is specified in the Length field. The
interpretation of the data bytes are message specific, i.e. depending on the MID value the meaning of
the data bytes is different. See the description of the specific message for more details about
interpretation of the data bytes.
Checksum
This field is used for communication error-detection. If all message bytes excluding the preamble are
summed and the lower byte value of the result equals zero, the message is valid and it may be
processed. The checksum value of the message should be included in the summation.
Field
Field width
Description
PRE
1 byte
Preamble, indicator of start of packet
250 (0xFA)
BID
1 byte
Bus identifier / address
255 (0xFF)
MID
1 byte
Message identifier
LEN
1 byte
Value equals number of bytes in DATA field
Maximum value is 254 (0xFE). Value 255 (0xFF) is reserved.
DATA
0
– 254 bytes
Data bytes (optional)
CS
1 byte
Checksum of message