JBUS protocol (continued)
Checking received messages on the slave side
After the master sends a request containing the slave address, the function code and data, it computes the CRC and sends it as the check word (CRC 16).
When the slave receives the request, it stores the message in memory and calculates the CRC 16 to compare it to the received CRC 16.
If the message is incorrect (unequal CRC 16 values), the slave does not respond.
If the message received is correct but the slave is unable to process it (incorrect address, incorrect data, etc.), the slave returns an error message with the following contents (see opposite):
| slave |
|
master | slave address |
|
| function | CRC 16 |
| computation | |
|
| |
| data |
|
| CRC 16 |
|
| CRC 16 comparison |
|
response |
|
|
| Error codes: |
|
| ||
|
|
| 1. | Unknown function code |
| |||
|
|
|
|
| 2. | Incorrect address |
| |
|
|
|
|
| 3. | Incorrect data | errors handled | |
|
|
|
|
| 4. | Station not ready | ||
|
|
|
|
| by the | |||
|
|
|
|
| 8. | Write error |
| |
|
|
|
|
|
| communication | ||
|
|
|
|
| 9. | Field overlap | ||
|
|
|
|
| port | |||
|
| function code |
|
|
| |||
|
|
|
|
|
| |||
|
| received and |
|
|
|
| ||
|
| MS bit = 1 |
|
|
|
|
| |
slave |
| 1 |
|
|
|
|
| CRC 16 |
address |
|
|
|
|
|
| ||
(1 à FF) |
|
|
|
|
|
|
|
|
1 byte |
|
| 1 byte |
|
| 1 byte | 2 bytes | |
example |
|
|
|
|
|
|
| |
01 | 09 H | 00 | 00 | 00 | 00 | DD CB | request |
|
01 | 89 H | 01 | 86 50 |
|
| response |
|
Page 8 - 6739389EN/FB