Modbus communication protocol
Although the Modbus standard was defined more than 40 years ago, the protocol still provides reliable and fast communication between programmable logic controllers, sensors, thermostats, frequency converters and other devices. Either the RS485, RS422, RS232 interface (Modbus RTU) or the TCP/IP Ethernet protocol (Modbus TCP) can be used for data transfer. The open Modbus communication protocol is based on a master/slave or client/server architecture. There are several advantages to this protocol – it is simple, fast, independent of the manufacturer/PLC and easy to implement. This is evidenced by the fact that after the advent of the Ethernet standard and the IP protocol, Modbus was implemented in the relational layer protocol.
We therefore have two main modes of data transfer:
- Modbus RTU – information transfer takes place via a serial line, usually an RS232 or RS485 interface
- Modbus TCP – information transfer takes place via TCP/IP in the Ethernet network
In practice, communication works in such a way that there is a “master” device (control element, eg PLC or industrial PC) on the bus, which sends queries. On the other hand, we have a “slave” device (monitored element, eg sensor, PLC, measuring device) that answers these questions. In the case of Modbus TCP, there may be more interrogating devices, at lower layers of the network the interrogations are serialized.
Both protocols, Modbus TCP and Modbus RTU, can be connected by a communication gateway.
Typical use of the Modbus protocol is for I/O modules, such as RCIO, RXIO or MLIO. One query can read or write a whole set of values – all inputs or outputs of the module, which optimizes communication on the line. Modbus is also one of the most used protocols for room controllers – radiators, fan coils or VAV systems (eg UC102, FCR010 or FCR015). Thanks to its extension and easy configuration, Modbus is also used as a protocol for the connection between specific buses and protocols and PLC or visualization. Converters are used as communication gateways, eg R091 for control of lights via the DALI bus, R065 for control of lights via the DMX standard, or R085 for integration of Landis & Gyr I/O modules on the P-Bus.
When designing and reviving serial buses communicating via the Modbus protocol, we sometimes come across situations where it would be advantageous to switch from a serial line to an Ethernet network and further transmit data over it. We have described it in more detail in our two-part routing series HERE.
For PLC and SCADA programmers, but also for others interested in integrated systems with Modbus RTU and TCP protocols, we regularly organize Modbus communication training. After completing it, participants are able to specify, design and enliven the communication between a foreign Modbus device and a PLC or visualization.