The following tables list the data fields that are used in the request and response messages.
The byte sizes are calculated for binary format.
The messages, including the CRC error acknowledgment message, contain the listed fields. Data field is not always included.
Error messages do not carry any message data. The message ID and message number are copied from the request message and the error code is set according to the detected error. An exception is the CRC error acknowledgment message, where the message receiver ID, message ID, and message number are set to 0.
Offset information indicates the position of the hexadecimal value in the message. The message start marker has offset 0.
Wait for the message to be acknowledged or for a communication timeout before sending subsequent messages. |
Field | Size in bytes | Description | Value |
---|---|---|---|
Message start |
1 |
Message start marker, static value |
0xab |
Message sender ID |
1 | User | 0 = Default |
Message receiver ID |
1 | MD30 | 1 = Default |
Message ID |
1 |
Valid message ID |
Message IDs |
Message number |
1 |
Message number is copied from the request message to the response message and can be used for tracking which request message was acknowledged. If tracking is not needed, can be kept as zero (0). |
0 = Not used |
Data length |
2 |
Data length in bytes; depends on message type Data length can be zero (0). |
0 ... 123 |
Data |
0 ... 65535 |
Message data bytes |
|
CRC |
2 |
CRC checksum CRC is calculated for the whole message, excluding the message start marker and the CRC bytes |
CRC calculation |
Field | Size in bytes | Description | Value |
---|---|---|---|
Message start |
1 |
Message start marker, static value |
0xab |
Message sender ID |
1 | MD30 | 1= Default |
Message receiver ID |
1 | User | 0 = Default |
Message ID |
1 |
Valid message ID |
Message IDs |
Message number |
1 |
Message number is copied from the request message. Exception is the SEND DATA response where the message number of the first message is copied from the request or set to zero in case on automatic sending, and after the first message, the message number is incremented in each response. |
0 = Not used |
Data length |
2 |
Data length in bytes; depends on message type The data length covers the interface version, error code, and response data. The data length is always at least 2 bytes because interface version and error code are always included. |
2 ... 123 |
Interface version |
1 |
Version of protocol in use by MD30 Hexadecimal value of the ASCII character, representing the revision |
A = 0x41, B = 0x42, and so on |
Error code |
1 |
Error code according to detected error If no errors, set to 0 |
Error codes |
Data |
2 ... 65535 |
Message data bytes |
|
CRC |
2 |
CRC checksum CRC is calculated for the whole message, excluding the message start marker and the CRC bytes |
CRC calculation |