Protocol & FramingModbus Term
MBAP Header
The 6-byte header prepended to every Modbus TCP request and response.
Definition
The MBAP (Modbus Application Protocol) header is the 6-byte wrapper used exclusively in Modbus TCP. It contains a transaction identifier (2 bytes, echoed in the response for request/response matching), a protocol identifier always set to 0x0000 (2 bytes), a length field indicating remaining bytes (2 bytes), and the unit identifier (slave address). The length field tells the receiver exactly how many bytes follow, making Modbus TCP framing deterministic.
Quick Facts
Example
00 01 00 00 00 06 01 ├──┤ ├──┤ ├──┤ │ │ │ │ Unit ID │ │ Length (6 more bytes follow) │ Protocol ID (always 0x0000) Transaction ID (1)
Related Terms
Was this definition helpful?