6
47D Series Modbus Reference Guide EM-9501-C Rev.4
2.4 MODBUS MESSAGE FRAMING
The following commands are usable to communicate with the device.
FUNCTION CODE
COMMAND
RECOMMENDED TIME OUT VALUE
03
Read Holding Registers
0.5 second
16
Write Multiple Registers
2.0 seconds
When accessing two-word registers, it must be specified in the command to read/write two consecutive registers. If
the master sends a request to two-word registers without specifying it, the device returns Exception (error).
The lower digit word in two-word registers is assigned to the lower address (n), while the upper digit word is assigned
to the higher address (n+1). The order can be reversed by programming.
All registers are in the form of integer. Floating point or other formats are not used.
2.4.1 READ HOLDING REGISTERS
This function code is used to read the contents of a contiguous block of holding registers (measured values and set-
tings) in the remote device.
■
REQUEST FORMAT
FIELD
LENGTH
RANGE
(1) Device address
1 byte
1 to 247
(2) Function code
1 byte
03
(3) Starting address
2 bytes
0 to 65535
Address numbered minus 1 from the register described in the
tables in Section 3.
(4) Number of registers
2 bytes
1 to 125
(5) CRC
2 bytes
■
RESPONSE FORMAT
FIELD
LENGTH
RANGE
(1) Device address
1 byte
1 to 247
(2) Function code
1 byte
03
(3) Byte count
1 byte
N x 2
N = Number of registers
(4) Register value
N x 2 bytes
(5) CRC
2 bytes
■
REQUEST EXAMPLE
Here is an example of a request to read 2 registers starting at the register 3 in the device address 1.
01 03 0002 0002 65CB
(1)
(2) (3) (4) (5)
■
RESPONSE EXAMPLE
Here is an example of a response to read ‘0009’ at the register 3, ‘0000’ at the register 4. The register 3 ranges for
two words, thus the register value shows ‘00000009.’
01 03 04 00090000 2A31
(1) (2) (3)
(4)
(5)
The above examples are given in hexadecimal.