Modbus Protocol

Modbus is an application layer messaging protocol that provides client/server communication between devices connected on different types of buses and networks. Modbus has been the industry’s defacto standard since 1979 when Modicon introduced the protocol in its PLCs. Modbus continues to enable millions of devices worldwide to communicate and it continues to grow in most industries.

Modbus is a request/reply protocol and offers services specified by function codes. These function codes are elements of the Modbus request/reply protocol data units (PDUs).

There are three categories of Modbus:

  • Modbus Serial – either Modbus ASCII or Modbus RTU
  • Modbus Plus – a peer-to-peer industrial network in which any controller can initiate transactions with the other controller
  • Modbus TCP – Modbus over TCP/IP Ethernet network.

Modbus Data Model

Controllers communicate using a master-slave technique, in which only one device (the master) can initiate transactions (queries). The other devices (the slaves) respond by supplying the requested data to the master, or by taking the action requested in the query. Typical master devices include host processors and programming panels. Typical slaves include programmable controllers.

The master can address individual slaves, or can initiate a broadcast message to all slaves. Slaves return a message (response) to queries that are addressed to them individually. Responses are not returned to broadcast queries from the master.

The Modbus protocol establishes the format for the master's query by placing into it the device (or broadcast) address, a function code defining the requested action, any data to be sent, and an error-checking field. The slave's response message is also constructed using Modbus protocol. It contains fields confirming the action taken, any data to be returned, and an error-checking field. If an error occurred in receipt of the message, or if the slave is unable to perform the requested action, the slave will construct an error message and send it as its response.

For more information: