Introduction to Modbus protocol

The Modbus protocol has a rich history dating back to the late 1970s. Developed by Modicon, Modbus protocol was designed to facilitate communication between various electronic devices, particularly programmable logic controllers (PLCs), which are integral to manufacturing and other industrial operations. Below is a detailed history of the Modbus protocol: 

  • Origins (Late 1970s)
    In 1979, Modicon, a company specializing in PLCs, introduced the Modbus communication protocol. The primary motivation behind Modbus was to establish a standard communication method for connecting various devices in industrial automation environments. 
  • Modbus RTU (1980)
    The first variant of Modbus, known as Modbus RTU (Remote Terminal Unit), was introduced in 1980. Modbus RTU is a binary protocol designed for serial communication, initially using RS-232 and later extended to RS-485. 
  • Modbus ASCII (1981)
    Shortly after Modbus RTU, Modicon introduced Modbus ASCII in 1981. Modbus ASCII is a text-based variant designed for serial communication, providing human-readable data exchange. 
  • Standardization (1980s)
    Modbus became an open standard, allowing other manufacturers to implement it in their devices. 
  • Modbus/TCP (1999)
    With the growing prominence of Ethernet in industrial networks, Modbus/TCP (Transmission Control Protocol) was introduced in 1999. Modbus/TCP enables Modbus communication over the Ethernet, providing faster data transfer rates and better integration with modern networking technologies. 
  • Modbus as an Open Protocol (2004)
    In 2004, the Modbus Organization, an independent group formed to support the Modbus protocol, declared Modbus as an open protocol, further encouraging its adoption. 
  • Continued Relevance (2010s and beyond)
    Despite the emergence of newer communication protocols, Modbus continues to be a widely used and reliable solution in industrial automation. Its simplicity and ease of implementation make it a preferred choice for many applications. 

In the early days of industrial automation, Modbus was a much-needed solution for communication between different devices such as PLCs, HMIs and SCADA systems, which was crucial for the burgeoning industry. The open, vendor-neutral standard enabled widespread adoption by various manufacturers and promoted interoperability between different industrial devices. The protocol is based on an open standard that allows manufacturers to integrate it into their devices without paying license fees. Modbus supports industrial communication via serial lines, Ethernet and, increasingly, wireless methods, which increases its versatility and adaptability to different industrial environments. 

Its straightforward message structure lowered the barrier to entry for engineers and developers, making it a popular solution for industrial control systems. Its adaptability and versatility, with variants such as Modbus RTU, ASCII and TCP/IP covering different communication media from serial to Ethernet and even enabling real-time capability, paves the way for applications where fast and accurate data transmission is of high importance. Another important aspect is backwards compatibility, which allows new technologies to be integrated into existing Modbus-based systems without interrupting operation. This flexibility, robustness and reliability are attributes that have cemented the role of Modbus in industrial communication networks. Its consistent performance in different applications has made it a reliable standard for decades. The strong community support and extensive documentation available for Modbus have also contributed to its enduring importance, helping users to overcome challenges and keep up with the latest developments. 

Modbus communication models

Modbus communication relies on two fundamental Interaction Models, each playing a pivotal role in orchestrating seamless communication and control within complex industrial systems as follow: 

1. Master-slave model

Communication is organized around a central controller known as the master and peripheral devices known as slaves. The master device initiates communication by sending requests to one or more slave devices. Slave devices respond to the master's requests, providing the requested data or executing specific actions. 
Example: In a manufacturing plant, the Master-Slave model is employed for centralized process control, where a central Programmable Logic Controller (PLC) acts as the master, issuing commands and monitoring production parameters to individual machinery and components (slaves) for coordinated and synchronized manufacturing operations. 

2. Request-response model

The Request-Response model describes the interaction between the master and slave devices in terms of messages or frames. A request is initiated by the master, specifying a particular function code and addressing a specific slave device. The slave device responds to the request by providing the requested data or confirming the execution of a specific action. 
Example: In a manufacturing assembly line, the Request-Response model is utilized for quality control inspections, where the central control system (master) sends inspection requests to various sensors and cameras (slaves), and they respond with detailed inspection data. 

3. Combination of models

Many Modbus implementations use a combination of the Master-Slave and Request-Response models. The master device initiates communication, acting as the primary controller, while individual interactions follow the Request-Response model. 
Example: Common in scenarios where a central controller needs to manage multiple devices but also requires discrete and specific responses for certain operations. 

Data architecture and integrity

The data within Modbus is organized into four primary data types: Coils, Discrete Inputs, Input Registers, and Holding Registers. 

Coils are 1-bit registers that can be read or written to and are typically associated with relay outputs or other actuators. They are used to control discrete outputs and are addressed starting at zero. For example, writing to coils involves specifying the value of either 0 or 1. 

Discrete inputs are also 1-bit registers but differ from coils in that they are read-only and used for sensing purposes, such as switches or sensors that return an on/off state. 

Input registers are 16-bit word values that are read-only and used for input. These registers hold analog values like temperature readings or other sensor data that require more than a simple on/off state. The data type used with Modbus input registers is unsigned 16-bit integers, which is the original Modbus data type with one register per value. 

Holding registers are like Input Registers in that they are 16-bit word values. However, they differ because they can be read and written too. Holding Registers are the most versatile Modbus data type and can be used for inputs, outputs, configuration data, or any requirement for "holding" data. 

The Modbus protocol allows these data types to be accessed via various function codes. For instance, function code 1 (FC1) is used to read coils, while function code 3 is used to read holding registers. Writing to these data types is accomplished using function codes such as 5 for writing a single coil or 16 for writing multiple holding registers. 

Depending on the variant, Modbus uses different check mechanisms to ensure the reliability of the data transmission. 

Checksum: This is mainly used in Modbus ASCII and involves calculating a simple sum of the data bytes and including the result in the message. The receiving device recalculates the checksum to confirm the integrity of the data. 

CRC (Cyclic Redundancy Check): For Modbus RTU and Modbus TCP/IP, CRC is used to generate a code based on the user data. The sender adds the CRC to the message and the receiver calculates the CRC to detect any errors. If the calculated CRC matches the received CRC, the data is considered error-free. 

In conclusion, the Modbus network stands as a cornerstone in industrial communication, showcasing a harmonious interplay of components that ensure efficiency and reliability. 

Applications in industry

In the automation of a wide range of industries, such as manufacturing, oil and gas and energy, Modbus is used to network a wide range of devices and systems, including: 

PLCs

Programmable Logic Controllers function as a master within a Modbus network, overseeing and communicating with up to 247 slave devices. This master-slave relationship is essential for process control and automation, where the PLC, sends requests to the slave devices which then respond with the required action. The integration of PLCs with Modbus is facilitated through a communication module within the PLC that connects to the Modbus network. This module enables the PLC to interface with other devices on the network, such as sensors, actuators, and other controllers, to perform tasks like data collection, device control, and monitoring. 

HMIs

Modbus provides a reliable and efficient means of communication between the HMI and various control devices such as Programmable Logic Controllers (PLCs) and other automation equipment. The integration of Modbus TCP/IP with HMIs allows operators to monitor and control the state of industrial processes, modify settings, and manually override automated systems when necessary. 

Distributed Control Systems (DCS)

Modbus also enables communication in distributed control systems, where sensors collect information that is then processed and sent to a nearby I/O module before being forwarded to a process control unit. If smart devices are used, they can also send data directly to the process control unit. The architecture of a DCS allows control tasks to be distributed across multiple controllers, ensuring timely monitoring and control of plant processes. 

Remote Terminal Units (RTUs)

They are adept at converting electronic signals from field instrumentation into communication protocols that can be transmitted over networks, thus playing a pivotal role in data acquisition systems. In the context of Industrial Internet of Things (IIoT) applications, the use of Modbus with RTUs has been instrumental in improving performance, robustness, efficiency, and connectivity for industrial organizations. This combination has reduced cost and time efforts while increasing productivity in the manufacturing sector. 

Sensors and actuators

Sensors are tasked with monitoring physical activities and environmental changes, relaying this data back to a central control system. They provide real-time information that is crucial for the automation of processes, which in turn optimizes operations within an industrial setting. Actuators, on the other hand, are the components that receive signals from control modules and execute physical actions in response. Modbus registers play a critical role in this communication process. They act as containers for various types of data, such as sensor readings and control parameters, and provide a structured way to access and manipulate this data within industrial devices., such as actuators This simplifies the communication process and enhances the functionality of automated technology systems. 

Gateways and bridges

These components are important for enabling seamless industrial communication between different network protocols. An industrial gateway is a robust hardware device designed to manage traffic between isolated networks or subnetworks, translating protocols to ensure compatibility across various equipment. These gateways are essential for protocol conversion, such as transforming Modbus RTU to Modbus TCP/IP, which encapsulates the Modbus/RTU data string within a TCP frame to facilitate client/server exchanges using TCP/IP addressing. 

Modbus applications are diverse and adaptable, catering to a wide range of needs within the industrial sector. This protocol facilitates real-time monitoring and data acquisition, which are critical components in predictive maintenance strategies. It also supports remote control operations, as seen in its use within supervisory control and data acquisition (SCADA) systems, where it connects supervisory computers with remote terminal units. The versatility of Modbus is evident in its ability to operate over various communication mediums, including serial lines and Ethernet, making it suitable for different industrial uses. Its integration capabilities with SCADA systems enhance industrial operations by allowing efficient communication between devices across different sections of a facility. 

Hilscher's Modbus solutions

Hilscher's multiprotocol-capable netX communication controllers and the embedded modules and PC cards based on them serve as flexible and powerful communication interfaces for modern industrial communication networks. By simply loading the specific netX firmware, the components can be integrated into all common Fieldbus or Real-Time Ethernet networks. Hilscher offers various products that integrate Modbus RTU or Modbus/TCP. In addition to Modbus, the netX technology also support standards and technologies such as PROFIBUS, PROFINET, EtherCAT, EtherNet/IP or DeviceNet. This means that many different protocols can be mapped using the same hardware, which speeds up the integration process and minimizes costs. Hilscher also offers many other components for industrial communication networks. In addition to gateways, switches and network diagnostic tools, the company also offers a holistic IIoT solution from the sensor to the cloud with its netFIELD ecosystem. 

 

Our products

Abgesetzte Netzwerkschnittstelle Real-Time-Ethernet

Kommunikation für die PC-basierte Automatisierung

PC-Karte PC/104 mit abgesetzter Schnittstelle - Real-Time-Ethernet

Kommunikation für die PC-basierte Automatisierung

PC-Karte M.2 2230 Key A+E - Real-Time-Ethernet

Kommunikation für die PC-basierte Automatisierung

DIL-32 Kommunikations-IC - Real-Time-Ethernet Slave

Kommunikation für einfache Slave-Geräte ohne eigenen Host-Prozessor

Kommunikationsmodul SPI - Real-Time-Ethernet-Slave

Flexibles Kommunikationsmodul für die Automation

PC-Karte PC/104 - Real-Time-Ethernet

Kommunikation für die PC-basierte Automatisierung