Knowledge base
Modbus TCP message structure
Modbus TCP carries a Modbus command inside a TCP/IP connection. The message consists of an MBAP header and a PDU with the function code, address and data.
Request
A request to read three holding registers from address 006B with Unit ID 11 uses function 03, start address 006B and quantity 0003.
Response
A successful response repeats service fields, returns the function code and includes a byte count followed by register data.
If the returned function code is increased by 80h, the device returned an exception response. See Modbus TCP errors.