User manual
DocumentMT0100P.N
©XsensTechnologiesB.V. MTiandMTxUserManualandTechnicalDocumentation
26
Preamble(PRE)
Everymessagestartswiththepreamble.Thisfieldalwayscontainsthevalue250(=0xFA).
Busidentifier(BID)orAddress
AllmessagesusedfortheMTiand MTxusetheaddressvalue255(0xFF) indicatinga“masterdevice”. MT’s
usedontheXbushaveotherBID’s.
MessageIdentifier(MID)
Thismessagefieldidentifiesthekindofmessage.ForacompletelistingofallpossiblemessagesseeMTiand
MTxLow‐LevelCommunicationDocument.
Length(LEN)
SpecifiesthenumberofdatabytesintheDATAfield.Value255(=0xFF)isreserved.Thismeansthatamessage
hasamaximumpayloadof254bytes.IfLengthiszeronodatafieldexists.
Data(DATA)
This field contains the data bytes and it has a variable length which is specified in the Length field. The
interpretationofthedatabytesaremessagespecific,i.e.dependingontheMIDvaluethemeaningofthedata
bytesisdifferent.Seethedescriptionofthespecificmessageformoredetailsaboutinterpretationofthedata
bytes.
Checksum
Thisfieldisusedforcommunicationerror‐detection.Ifallmessagebytesexcludingthepreamblearesummed
andthelowerbytevalueoftheresultequalszero,themessageisvalidanditmaybeprocessed.Thechecksum
valueofthemessageshouldbeincludedinthesummation.
5.3.2 Messageusage
Generally, a message with a certain MID value will be replied with a message with a MID value that is
increasedbyone,i.e.theacknowledgemessage.Dependingonthetypeofmessagetheacknowledgemessage
hasnooracertainnumberofdatabytes.Insomecasesanerrormessagewillbereturned(MID=66(0x42)).
This occurs in case the previous message has invalid parameters, is not valid, or could not be successfully
executed.Anerrormessagecontainsanerrorcodeinitsdatafield.
Example
RequestingthedeviceIDofanMTi/MTx:
Sendingmessage:
ReqDID = 0xFA0xFF0x000x000x01(hexadecimalvalues)
Receivingmessage(=Acknowledge):
DeviceID = 0xFA0xFF0x010x04HHHLLHLLCS(hexadecimalvalues)
TherequestedDeviceIDisgivenintheacknowledgedmessageDeviceID(hereshownas:HHHLLHLL,the
checksum is CS). As you can see the MID (Message ID) of the acknowledgement is increased by one in
comparisonwiththesendingmessageReqDID.
SomemessageshavethesameMIDanddependingonwhetherornotthemessagecontainsthedatafieldthe
meaningdiffers.Thisisthecasewithallthemessagesthatrefertochangeablesettings.Forexample,theMID
ofmessagerequestingtheoutputmode(ReqOutputMode)isthesameasthemessagethatsetstheoutput
mode (SetOutputMode). The difference between the two messages is that the Length field of
ReqOutputModeiszeroandnon‐zeroforSetOutputMode.