Method of control via Modbus protocol
−16−
4.10 Function code
Reading from a holding register(s) (03h)
This function code is used to read a register (16 bits). Up to 16 successive registers (16×16 bits) can be read.
Read the upper and lower data at the same time. If they are not read at the same time, the value may be invalid.
If multiple holding registers are read, they are read in order of register addresses.
Example of read
Read the rotation speed Nos. 0 and 1 in the operation data of slave address 1.
Description
Register address
Value read
Corresponding decimal
Rotation speed No.0 (upper)
0480h
0000h
100
Rotation speed No.0 (lower)
0481h
0064h
Rotation speed No.1 (upper)
0482h
0000h
4000
Rotation speed No.1 (lower)
0483h
0FA0h
•
Query
Field name
Data
Description
Slave address
01h Slave address 1
Function code
03h Reading from a holding register(s).
Data
Register address (upper)
04h
Register address to start reading from
Register address (lower)
80h
Number of registers (upper)
00h Number of registers to be read from the starting register address
(4 registers=0004h)
Number of registers (lower)
04h
Error check (lower)
44h
Calculation result of CRC-16
Error check (upper)
D1h
•
Response
Field name
Data
Description
Slave address
01h Same as query
Function code
03h Same as query
Data
Number of data bytes
08h Twice the number of registers in the query
Value read from register address (upper)
00h
Value read from register address 0480h
Value read from register address (lower)
00h
Value read from register 1 (upper)
00h
Value read from register address 0481h
Value read from register 1 (lower)
64h
Value read from register 2 (upper)
00h
Value read from register address 0482h
Value read from register 2 (lower)
00h
Value read from register 3 (upper)
0Fh
Value read from register address 0483h
Value read from register 3 (lower)
A0h
Error check (lower)
E1h
Calculation result of CRC-16
Error check (upper)
97h