10
05月
In communication links, to ensure that multiple parties effectively and reliably receive correct data, a series of rules must be established. These rules collectively form the communication protocol.
Any protocol is proposed to solve a specific problem, and the continuous application and improvement of these protocols eventually become international standards. Once a communication protocol becomes an international standard, it can be promoted and applied globally, leading to the emergence of various products supporting that protocol.
There are many types of Ethernet-based communication protocols, most of which are upper-layer protocols under the Ethernet protocol framework, and these protocols are widely applied in industrial control. Examples include Profinet (Siemens), EtherCat (Beckhoff), CC-LINK IE (Mitsubishi Electric), EtherNet/IP (Rockwell), and others.
Modbus Protocol Analysis
The Modbus protocol is a universal language used on electronic controllers. Through this protocol, controllers can communicate with each other and with other devices via networks (such as Ethernet), and it has become a widely accepted industrial standard.
It enables controllers from different manufacturers to form industrial networks for centralized monitoring. The protocol defines the message structure that a controller can recognize, regardless of the network used for communication. It describes the process by which a controller requests access to other devices, how to respond to requests from other devices, and how to detect and log errors. It also specifies the common format for message fields and content.
Modbus Protocol Features
Standard and open: Users can freely and confidently use the Modbus protocol without paying licensing fees or infringing on intellectual property. Currently, over 400 manufacturers support Modbus, and over 600 products are available that support Modbus.
Modbus supports multiple electrical interfaces, such as RS-232, RS-485, and can transmit over various media, including twisted pair cables, optical fiber, and wireless.
Modbus frame format is simple, compact, and easy to understand. It is user-friendly and simple for manufacturers to develop.
Modbus Communication Process
Note that Modbus is a master-slave communication protocol.
In Modbus communication, only one master device can send requests. Other slave devices receive the request data sent by the master and respond accordingly. The slave devices can be any peripheral devices, such as I/O sensors, valves, network drivers, or other types of measurement equipment. The slave processes the information and sends its data to the master using Modbus.
This means that Modbus cannot communicate synchronously. The master can only send requests to one slave at a time. That is, the master sends a request, the slave responds, and when the master does not send anything, there is no data communication on the bus. The slave cannot proactively send messages to the master; it can only passively respond to the requests sent by the master.
Moreover, Modbus does not have a busy mechanism. For example, if the master sends a command to the slave, but the slave has not received it or is processing something else, it cannot respond to the master. Since Modbus’s bus only transmits data without any arbitration mechanism, software-based methods are required to determine whether the data has been received correctly.