8. Modbus protocol
8. 12. Exception responses
An exception response is returned by a slave when it is unable to perform the request which is addressed to it.
Format of an exception response:
Slave | Response | Error |
| CRC16 |
| |||
no. |
| code | code | Lo |
| Hi |
| |
|
|
| ||||||
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| ||
1 byte | 1 byte | 1 byte |
| 2 bytes | ||||
Response | request code + H’80. |
|
|
|
| |||
code: |
|
|
|
|
|
|
|
|
Error code: | 1 = | The function requested is not recognized by the slave. | ||||||
| 2 | = | The addresses indicated in the request do not exist in the slave. | |||||
| 3 | = | The values indicated in the request are not permitted on the slave. | |||||
| 4 | = | The slave has started to execute the request but cannot continue to process it completely. | |||||
| 6 | = | The requested write operation has been refused because the drive is in "Forced local" mode. | |||||
| 7 | = | The requested write operation has been refused because the motor is running (configuration parameters). |
Example: Writing the value 1 to the status word (EtA) = logic address 3201 (which cannot be written, because in
Request: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
Slave no. | Request | No. of 1st word | No. of words | No. of | Value of 1st word | CRC | CRC | ||||||
| code | Hi |
| Lo | Hi |
| Lo | bytes | Hi |
| Lo | Lo | Hi |
|
|
|
| ||||||||||
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 | 10 | 0C |
| 81 | 00 |
| 01 | 02 | 00 |
| 01 | 8A | D1 |
Response:
Slave no.
4
Response
code
90
Error code
00
CRC
Lo
5C
CRC
Hi 01
37