
8. Modbus protocol
8. 13. Read non-existent or protected parameters
If a set of parameters is read using a Modbus function, the value returned for
If the same Modbus function is used to read parameters, all of which are
Example of non-existent or protected parameters being read:
In this example, the same request to read a
The "Read Holding Registers" request (3) is addressed to a drive with a Modbus address of 12 (16#0C). The read operation is performed for 3 consecutive words, starting with address 8400.
Logic address | Parameter | Value |
8400 = 16#20FA | - | |
8401 = 16#20D1 | [Profile] (CHCF) | 3 |
|
|
|
8402 = 16#20D2 | [Copy channel 1 ↔ 2] (COP) | 2 |
Request:
Slave no. | Request code | No. of 1st word | No. of words |
| CRC16 | |||||
|
| Hi |
| Lo | Hi |
| Lo | Lo |
| Hi |
|
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
0C | 03 | 20 |
| D0 | 00 |
| 03 | 0E |
| EF |
|
|
|
|
|
|
|
|
|
|
|
Response:
Scenario no. 1: Parameters CHCF (8401) and COP (8402) not protected V Successful reading of these two parameters and value equal to 16#8000 for the
Slave no. | Response code | No. of bytes read | Value 8400 | Value 8401 | Value 8402 | CRC16 | ||||||||
|
|
| Hi |
| Lo | Hi |
| Lo | Hi |
| Lo | Lo |
| Hi |
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0C | 03 | 06 | 80 |
| 00 | 00 |
| 03 | 00 |
| 02 | 17 |
| E4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario no. 2: Parameter CHCF (8401) protected and COP (8402) not protected V Successful reading of COP and value equal to 16#8000 for the
Slave no. | Response code | No. of bytes read | Value 8400 | Value 8401 | Value 8402 | CRC16 | ||||||||
|
|
| Hi |
| Lo | Hi |
| Lo | Hi |
| Lo | Lo |
| Hi |
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0C | 03 | 06 | 80 |
| 00 | 80 |
| 00 | 00 |
| 02 | CE |
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario no. 3: Parameters CHCF (8401) and COP (8402) protected V Exception response (response code = 16#80 + request code), as all the parameters read are either
Slave no. | Response code | Error code | CRC16 | ||
|
|
| Lo |
| Hi |
|
|
|
| ||
|
|
|
|
|
|
0C | 80+03 = 83 | 02 | 51 |
| 32 |
|
|
|
|
|
|
38