LXM32M | 3 Basics |
|
|
3.2Modbus TCP protocol
The Modbus protocol defines a
| MODBUS TCP/IP ADU | |
MBAP Header | Function code | Data |
|
| MODBUS PDU |
Figure 3: Structure of a Modbus message
The "Function Code" of a message specified the Modbus service to be triggered. The "Data" field can contain additional information, depend- ing on the "Function Code".
Due to the encapsulation of "Function Code" and "Data" in the Mod- bus PDU, the Modbus services and the object model can be the same in the case of all Modbus versions.
In the case of a "Function Code" for which the "Data" field in the Mod- bus PDU has a fixed length, the "Function Code" is sufficient.
In the case of a "Function Code" for which the "Data" field in the Mod- bus request or the Modbus response has a variable amount of data, the "Data" field contains a byte counter.
The maximum size of a Modbus ADU is 260 bytes. The size of an embedded Modbus PDU is 253 bytes.
NOTE: The fields are encoded in Big Endian format
0198441113843, V1.01, 01.2012
17 |