3.2.1 MBAP header
The MBAP header contains the information allowing the recipient to
uniquely identify a message. This is even possible if a message is split
into several packets for transmission.
Explicit and implicit length rules as well as the use of a CRC-32 error
check code (on Ethernet) results in an infinitesimal chance of undetec-
ted corruption to a request or response message.
Design The MBAP header has a length of 7 bytes and contains the following
fields:
Field Length Description
Transaction Identifier 2 bytes Identification of a Modbus
request or Modbus response.
Protocol Identifier 2 bytes Value 0 means Modbus proto-
col.
Length 2 bytes Number of bytes to follow.
Unit Identifier 1 byte Identification of a slave con-
nected to another bus via a
serial line.
•
Transaction Identifier
The field "Transaction Identifier" is used for "Pairing". The server
copies the "Transaction Identifier" of the Modbus request to the
Modbus response.
•
Protocol Identifier
The field "Protocol Identifier" is used to identify the protocol. The
Modbus protocol is identified by the value 0.
•
Length
The "Length" field is a byte counter for the following fields ("Unit
Identifier", "Function Code" and "Data").
•
Unit Identifier
The field "Unit Identifier" is used to identify the server in the slave.
3 Basics
LXM32M
18 Modbus-TCP module
0198441113843, V1.01, 01.2012