6-6
<Toc> <Ind>
< 6. Modbus/TCP Communication Protocol>
IM 77C01E01-10E
6.4.3
Request and Response
03
Reads data from multiple D registers
●
Function
This function code reads the contents of successive D registers by the specified number
starting with a specified D registers number.
•
The maximum number of D registers to be read at a time is 64.
•
For the format of responses in the event of failure, see subsection 6.4.4.
●
Request (for nomal operation): Reading data from n registers
Element
Number of bytes
MBAP Header
2
2
2
2
2
1
1
Hex value
Arbitrary
0000
0006
n
01 to 99
03
PDU
Command
element
Unit ID
Function
code
Transaction ID
Protocol ID
Register
start number
Number of
registers
Number of
bytes
●
Response (for normal operation)
01 to 99
Element
Number of bytes
Command
element
MBAP Header
2
2
2
2
2
1
1
1
Hex value
Arbitrary
0000
2n+3
03
2n
PDU
Unit ID
Function
code
Byte
count
Transaction ID
Protocol ID
Contents of
register 1
Contents of
register n
Number of
bytes
● ● ● ●
●
Example
Read a series of four D registers starting with D0201 (VT ratio and CT ratio) at station
number 01.
[Request] 000100000006010300C80004
(1) “0001”: Arbitrary 2-byte data
(2) “0000”: Protocol ID=0000 (fixed)
(3) “0006”: Number of bytes
(4) “01”: Unit ID = 01 indicating PR300
(5) “03”: Function code 03
(6) “00C8”: D register start number 201
(7) “0004”: Number of D registers = 4
The following response will be returned to the request above:
[Response] 00010000000B01030800003F8000003F80
* The VT ratio and CT ratio data are floating point values. The combined value of D0201 and
D0202, 00003F80, represents 1. That of D0203 and D0204, which is also 00003F80,
represents 1 as well (the upper four digits, 3F80, and the lower four digits, 0000, are reversed).
* The floating point value of 3F800000 is the decimal equivalent of 1.
(1) “0001”: The arbitrary 2-byte data in the request
(2) “0000”: Protocol ID = 0000 (fixed)
(3) “000B”: Number of bytes
(4) “01”: Unit ID = 01 indicating PR300
(5) “03”: Function code 03
(6) “08”: Byte count
* Numbers in quotation marks are hexadecimal.
(1)
(2)
(3)
(4) (5)
(6)
(7)
D0201 and
D0202
D0203 and
D0204
(1)
(2)
(3)
(4) (5) (6)
Summary of Contents for PR300
Page 141: ......