Document MT0605P.E
© Xsens Technologies B.V.
MTi User Manual
52
5.3.2
Message usage
Generally, a message with a certain MID value will be replied with a message with a MID value that is
increased by one, i.e. the acknowledge message. Depending on the type of message the
acknowledge message has no or a certain number of data bytes. In some cases an error message will
be returned (MID = 66 (0x42)). This occurs in case the previous message has invalid parameters, is
not valid, or could not be successfully executed. An error message contains an error code in its data
field.
Example
Requesting the device ID of an MTi:
Sending message:
ReqDID =
0xFA 0xFF 0x00 0x00 0x01 (hexadecimal values)
Receiving message (= Acknowledge):
DeviceID =
0xFA 0xFF 0x01 0x04 HH HL LH LL CS (hexadecimal values)
The requested Device ID is given in the acknowledged message
DeviceID
(here shown as: HH HL
LH LL, the checksum is CS). As you can see the MID (Message ID) of the acknowledgement is
increased by one in comparison with the sending message
ReqDID
.
Some messages have the same MID and depending on whether or not the message contains the data
field the meaning differs. This is the case with all the messages that refer to changeable settings. For
example, the MID of message requesting the output mode (
ReqOutputMode
) is the same as the
message that sets the output mode (
SetOutputMode
). The difference between the two messages is
that the Length field of
ReqOutputMode
is zero and non-zero for
SetOutputMode
.
Example
Request current output mode:
Sending message:
ReqBaudrate =
0xFA 0xFF 0x18 0x00 0xE9 (hexadecimal values)
Receiving message (= Acknowledge):
ReqBaudrateAck =
0xFA 0xFF 0x19 0x01 BR CS (hexadecimal values)
ReqBaudrateAck
contains data which represents the current mode (= BR). CS stands for the
checksum value. To change the baud rate you must add the baud rate in the data field of the sending
message:
Set the output mode:
Sending message:
SetBaudrate =
0xFA 0xFF 0x18 0x01 BR CS (hexadecimal values)
Receiving message (= Acknowledge):
SetBaudrateAck =
0xFA 0xFF 0x19 0x00 0xE8 (hexadecimal values)