
W
EB
S
ERVER
CPU M
ODULE
U
SER
’
S
M
ANUAL
FC9Y-B1278
9-9
9: M
ODBUS
TCP C
OMMUNICATION
Modbus TCP Communication Format
This section describes the communication format used for Modbus TCP client and server communication. Modbus TCP
communication format starts with the Modbus TCP header followed by the RTU mode communication format without
the idle 3.5 characters at both ends and CRC as shown below.
Modbus TCP Communication Format
Transaction ID
The Modbus TCP server (slave) returns the request ID sent from the client (master) without change. When receiving the
returned request ID, the client can confirm to which request the response was returned. When confirmation is not
required, designate 0 as a transaction ID.
Protocol ID
Designate 0 to identify Modbus TCP protocol.
Message Length
Designate the length of the following message in bytes.
Unit ID
The unit ID is Modbus TCP slave address (1 through 247) to identify the unit. The Modbus TCP server of the Web server
CPU module ignores the unit ID.
Function Code
Designate a function code, such as 01 (read coil status) and 02 (read input status).
Data
Designate required data for each function.
Transaction ID
Protocol ID
Message Length
(bytes)
Unit ID
Function
Code
Data
2 bytes
2 bytes
2 bytes
1 byte
1 byte
N bytes
RTU Mode
Communication Format
Idle
3.5 characters
Slave No.
Function
Code
Data
CRC
Idle
3.5 characters
1 byte
1 byte
N bytes
2 bytes
Modbus TCP Header
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]