This specification defines the format of the PDU, the various data concepts used by the protocol, the use of function codes to access that data, and the specific implementation and restrictions of each function code. The PDU and the code that handles it comprise the core of the Modbus Application Protocol Specification. This led to a separation of the core protocol, which defines the protocol data unit (PDU), and the network layer, which defines the application data unit (ADU).
Over time, different application data units were introduced to either change the packet format used over serial or to allow the use of TCP/IP and user datagram protocol (UDP) networks. In the initial implementation, Modbus was a single protocol built on top of serial, so it could not be divided into multiple layers.
A Master-Slave Networking Relationship Layers of the Modbus Protocol The content of these requests and responses, and the network layers across which these messages are sent, are defined by the different layers of the protocol.įigure 1. Typically, the master is a human machine interface (HMI) or Supervisory Control and Data Acquisition (SCADA) system and the slave is a sensor, programmable logic controller (PLC), or programmable automation controller (PAC). In a master-slave relationship, communication always occurs in pairs-one device must initiate a request and then wait for a response-and the initiating device (the master) is responsible for initiating every interaction. Modbus is a request-response protocol implemented using a master-slave relationship.