MODBUS TCP Master/Slave Communication
6.1 MODBUS TCP Format
6.1.1 MODBUS TCP
Data structure for the MODBUS TCP format
• In MODBUS TCP, an MBAP header is attached to the function codes and data used in
MODBUS-RTU.
MODBUS TCP format
MBAP header part
Data contents
Fields
Transaction Identifier
Protocol Identifier
MBAP
Header
Length
Unit Identifier
Function code
Data
KEY POINTS
•
Function codes and data parts for MODBUS TCP are the same as those for
MODBUS-RTU. Note that, however, CRC check codes contained in the
MODBUS-RTU format are not included.
REFERENCE
For detailed specifications concerning MODBUS, please see the website
http://www.modbus.org/
6-2
MBAP Header
7 bytes
Transaction
Protocol
Identifier
Identifier
2 bytes
2 bytes
Field name
Transaction identifier
Protocol identifier
Length
Unit identifier
Function code
Data
.
Function
Code
1 byte
Unit
Length
Identifier
2 bytes
1 byte
Description
"00H" is entered.
"00H" is entered.
The length of the subsequent sending/receiving
message is entered.
Station no. of the unit is entered. 0 - 247
The same function name as that of MODBUS-
RTU is entered.
Data that correspond to the function code are
entered.
Data
n bytes