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.
MBAP Header
7 bytes
Function
Code
1 byte
Data
n bytes
Transaction
Identifier
2 bytes
Protocol
Identifier
2 bytes
Length
2 bytes
Unit
Identifier
1 byte
MODBUS TCP format
MBAP header part
Data contents
Fields Field name Description
MBAP
Header
Transaction Identifier Transaction identifier "00H" is entered.
Protocol Identifier Protocol identifier "00H" is entered.
Length Length
The length of the subsequent sending/receiving
message is entered.
Unit Identifier Unit identifier Station no. of the unit is entered. 0 - 247
Function code Function code
The same function name as that of MODBUS-
RTU is entered.
Data Data
Data that correspond to the function code are
entered.
• 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.
For detailed specifications concerning MODBUS, please see the website
http://www.modbus.org/
.
6-2