ALM-06-WF User’s Manual
ALM-06-WF
User’s Manual (Rev1.0, Feb./2019) ------------- 32
5.2
Protocol Description
The Modbus protocol defines a simple protocol data unit independent of the
underlying communication layers. The mapping of Modbus protocol on network can
introduce some additional fields on the application data unit.
Modbus/TCP Application Data Unit
Transaction ID
(2 bytes)
Protocol
ID
(2 bytes)
Length
(2 bytes)
Unit ID
(1 bytes)
FCode
(1 bytes)
Data
(0 to 252 bytes)
MBAP Header
Protocol Data Unit
Figure 5-1
:
Modbus/TCP Application Data Unit
5.2.1
MBAP
The Modbus/TCP extension includes 7 additional bytes to the original Modbus
protocol, which allows for transport over the TCP/IP layers.
A dedicated header is used on TCP/IP to identify the Modbus Application Data
Unit. It is called the MBAP Header (MODBUS Application Protocol Header). The
MBAP Header consists of 7 bytes of information:
Fields
Length
Description
Transaction Identifier
2 bytes
Identification of Request/Response transaction – Copied
from request to response
Protocol Identifier
2 bytes
0 = Modbus protocol
Length
2 bytes
Number of following bytes - Includes the Unit Identifier
Unit Identifier
1 byte
Identification of remote slave
Table 5-1: MODBUS Application Protocol Header