Modbus services
Modbus functions available
The following table indicates which Modbus functions are managed by the Altivar 212 and specifies their limits. The "read" and "write" functions are defined from the point of view of the master.
Code
Function name
Size of data
Altivar 212 function name
Broadcast
3 = 16#03 | Read Holding Registers | 1 object | Read one word | Yes |
|
|
|
|
|
|
| 1 ... 5 objects | Read indirect block | Yes |
|
|
|
|
|
6 = 16#06 | Write Single Register | 1 objects |
| Yes |
|
|
|
|
|
16 = 16#10 | Write Multiple Registers | 1 object | Write one word | Yes |
|
|
|
|
|
|
| 2 objects | Write indirect block | Yes |
|
|
|
|
|
43/14 = 16#2B/0E | Read Device Identification | 3 objects |
| No |
|
|
|
|
|
Read one word (03)
Function 3, quantity = 1
One word function permits to read one parameter value. All parameter of the Altivar 212 can be read. Request:
Slave no. | Function code | Starting address | Quantity of registers |
| CRC16 | |||||
|
|
|
|
|
| (fixed) |
|
|
| |
| 03 | Hi |
| Lo | 00 |
| 01 | Lo |
| Hi |
|
|
|
| |||||||
1 byte | 1 byte |
| 2 bytes |
| 2 bytes |
| 2 bytes |
Response:
Slave no. | Function code | Byte count | Register value |
| CRC16 | |||
| 03 |
| Hi |
| Lo | Lo |
| Hi |
|
|
|
|
|
|
|
|
|
1 byte | 1 byte | 1 byte |
| 2 bytes |
| 2 bytes |
Error response:
Slave no. | Function code | Exception |
| CRC16 | |
| 83 | code | Lo |
| Hi |
|
| ||||
1 byte | 1 byte | 1 byte | 1 byte |
| 1 byte |
Example: Read [Output frequency] (Fd00) on Altivar 212 at slave address 1
Request:
01 | 03 | FD 00 | 00 01 | B5 A6 |
Response:
01 | 03 | 02 | 17 | 70 | B6 | 50 |
Example: Invalid read of 2 words
Request:
01 | 03 | FD 00 | 00 02 | F5 A7 |
Error response:
01
83
03
01 31
S1A53844 01/2011 | 33 |