MODBUS PROTOCOL

Getting started with Modbus communication protocol in IoT

--

Photo by Alena Darmel from Pexels

Automation is all around us, so much so that it has become our new normal. Somehow it has also converted into entertainment. We binge-watch those automated candy-making-machine videos on social media non-stop.

In Factories, we can see the well-ordered and smooth progression of conveyor belts, cutting machines, and all other humming machines doing their jobs without human interaction and it seems Normal.

But have you ever wondered what goes behind all that work? How does an automated car or home automation, FAStag, or any such product even come into existence? What’s making all these machines work behind the scenes?

The magician is no other than MODBUS PROTOCOL!

And if you have the itch to know more, this blog is for you. Read on!

HISTORY OF MODBUS PROTOCOL:

Source: Google Images

The machines you see in factories are commonly controlled by Programmable Logic Controllers (PLC), Industrial Control Systems (ICS), Distributed Control Systems (DCS), and/or Variable Frequency Drives (VFD).

All of these control systems provide real-time guarantees about taking an action. This means they can repeatedly do the same process over and over again at the same speed. These systems also include fault tolerance and robust diagnostics, i.e. data that explains what’s going right and wrong with the system.

The open nature of the Modbus protocol and its long track records of success means that it is used by an innumerable number of devices and organizations in all types of industries.

The data and information about these systems are communicated via the Modbus protocol.

  • Originally developed by Modicon in 1979, Modbus is an open, non-proprietary communications protocol that enables machines to communicate and coordinate with each other by passing information in a standardized way.
  • The Modbus communications protocol is the networking boss of the industry. Modbus has stood the test of time and is still being used in a wide range of applications, including industrial automation, process control, building automation, transportation, energy, and remote monitoring.
  • Modbus is an extremely compact and flexible protocol that continues to prove that it can be adapted for use in a wide range of applications and media. It is popular for remote applications that communicate over almost any means, including wired and cellular telephone, licensed and unlicensed radios, and satellite.
  • All the major PLC makers like Siemens, Schneider Electric, ABB, Rockwell, Emerson, and more create Modbus-compatible hardware.

BASICS OF MODBUS:

Since the Modbus protocol was transferred from Schneider Electric to the Modbus Organization in April 2004, it has become a de facto standard communication protocol and has evolved into a broad set of protocols over a variety of physical links.

  • Modbus is a protocol that follows a master-slave model in which the slave device (can be up to 247 devices) returns a response to a request generated by the master device (usually one device). Further, the specifications of Modbus and its corresponding protocols (Modbus TCP/IP, Modbus RTU) are free to download with no licensing fees.
  • Modbus is an open standard, meaning that manufacturers can build it into their equipment without having to pay royalties. It is the most pervasive communications protocol in industrial automation and is the most commonly available means of connecting industrial electronic devices.
  • Modbus introduced the concept of data on the factory floor. Modbus made it possible to connect an entire group of devices using only two wires on the controller. That alone saved a massive investment in wire, labor, and installation time. Instead of miles and miles of wire connecting hundreds of devices, a simple two-wire pair could be daisy-chained from one device to the next to the next. It was revolutionary for its time.

Modbus has found its way into hundreds of thousands — if not millions — of devices. You can find it in everything from valve controllers, to motor drives, to HMIs, to water filtration systems. It would be difficult indeed to name a product category in Industrial or Building Automation that doesn’t use Modbus.

WHY MODBUS HAS FLOURISHED?

Source: Google Images

Why did Modbus have such an impact on the Industrial Automation industry that it still survives to this day as one of the leading industrial networks of the 21st century?

  • Modbus is an Open Standard: Modicon did not keep the standard proprietary. They released it as a non-proprietary standard and welcomed developers, even competitors, to implement it. They rightly assumed that it would be best for everyone, including them if Modbus became successful in the marketplace. Because of this thinking, Modbus became the first widely accepted Fieldbus standard.
  • Modbus uses Standard Transports: The transport layer for Modbus RTU commands is also simple to understand. Modbus RTU uses RS232, RS422, and RS485. Modbus TCP/IP uses Ethernet.
  • Modbus uses a Simple Protocol: Modbus is very easy to understand. Its primary purpose is to simply move data between an RTU Master device (a Client in Modbus TCP) and an RTU Slave device (a Server in Modbus TCP). There are only two kinds of data to move, registers and coils. Registers are 16-bit unsigned integers. Coils are single bits. The simplicity of Modbus has also led to many companies expanding the message structure, data representation, and transports.
  • Modbus is easy-to-grasp: It could be readily understood by non-programmers. Simplicity has led to an incredible amount of activity and propagation of Modbus into many different industries around the world. There is probably no product category in the last thirty years that hasn’t had an offering without Modbus.

THINGS TO KEEP IN MIND

Photo Edited by Me

To make your life easier, there are a couple of things to keep in mind while using Modbus:

Modbus is intentionally flexible and is typically customized for each installation. This means a “Mapping Table” is required to know where values are located and what they mean in any implementation. Sometimes this is also called a “Memory Map.”

The flexibility of Modbus means that Mapping Tables are key to understanding the data of any particular system.

It is also extremely lightweight to run, which is another reason it has not been supplanted by more modern protocols like OPC, Fieldbus, CIP, and Profinet.

Besides dealing with sensor data and actuator control, it is also used to transmit an extensive amount of diagnostic data, which can be just as valuable as any sensor data and potentially even more so in the age of Machine Learning

MODBUS PROTOCOL MESSAGE STRUCTURE

Source: Google Images

Modbus Protocol in IoT applications

Modbus is a predominant industry-oriented communication protocol, its role in the area of IoT (Internet of Things) is inevitable and prevails significantly in the area of IIoT (Industrial IoT/ Industry 4.0). Systems based on Modbus protocol play a major part in the internet connectivity for the automation and control industries. Subsequently in these industries, Modbus protocols are mainly used to interface SCADA or BMS systems.

A Modbus protocol-enabled IoT device or a Modbus ‘Thing’ is connected to a Modbus device through an IoT platform (basically an IIOT gateway) that controls numerous Modbus communicating devices, establishing a secure, duplex channel connection over the internet. This type of secure duplex connection through Modbus communication protocol helps to overcome the necessity of using VPN, firewalls, and other complex networks.

Furthermore, the impact of the Modbus protocol in the IIoT industry has considerably boosted the performance, robustness, efficiency, and connectivity for industrial organizations thereby reducing cost and time efforts and increasing overall productivity for the manufacturing industry.

Modbus protocol is mainly used to convey signals from industrial devices primarily involving instrumentation control and data acquisition devices to a typical micro-controller unit (MCU) or a data collection system.

REAL-TIME APPLICATIONS

Healthcare: For automated temperature monitoring, Modbus can be used extensively by the hospital’s IT department in a single interface. Data from different floors can be directly taken via RS485 Modbus ADC devices.

Transportation: Traffic behavior detection, that is the abnormal behavior of traffic can be detected by cross-referring with normal traffic patterns obtained through the Modbus TCP transactions.

Home automation: Easy transfer of data meaning, transferring data from different sensors used in home automation devices can be done through the Modbus protocol. Since the data can be transferred via a single layer it will be much easier when we compare other protocols

If you have reached this far, thank you for reading this blog, I hope it was of insight to you 😃 Give us a Follow for more such content on technology, productivity, work habits, and more!

--

--