The Modbus protocol is an open standard communication protocol originally designed to connect programmable logic controllers (PLCs) and other automation devices. Its simplicity and reliability make Modbus one of the most popular communication protocols in the industrial field, widely used for monitoring, control, and data acquisition.
What is Modbus
Modbus It is a commonly used communication protocol in the industrial sector, It can be understood as a communication agreement.
Modbus The agreement includes RTU, ASCII, TCP, among which Modbus-RTU most commonly used, Relatively simple, It is easy to implement on a microcontroller. Modbus RTU The protocol defines a simple protocol data unit that is independent of the lower communication layer (PDU) , On the serial link Modbus RTU The frame format is shown in the following figure.

among which, The address field only contains the slave address; Function code indicates what operation the instruction should perform; The subsequent data of the function code is the request or response data field; The error check field is“message content”Data processing“Cyclic redundancy check”Calculated results, adopt CRC16 Cyclic redundancy check algorithm.
Modbus and OPC UA, MQTT The communication protocol is essentially the same, All are application layer protocols designed to enable communication between multiple devices.
Modbus The origin and development of
Modbus Agreement on 1979 Year by year Modicon company (Now being Schneider Company acquisition) design and development, Once introduced, it gradually became a popular standard in industrial systems due to its simple and open communication method, It is the world's first bus protocol truly used in industrial fields.
later, In order to better popularize and promote Modbus Based on Ethernet (TCP/IP) Distributed Applications, Schneider Electric will Modbus Transfer of ownership of the agreement to IDA (Interface for Distributed Automation, Distributed automation interface) Organization, And established Modbu-IDA international organization, Responsible for promotion Modbus Standards and regulations Modbus Product certification.
now, We can learn from Modbus Official Website www.modbus.org Find relevant protocol documents, Modbus Product and manufacturer information.
Modbus Characteristics of Communication Protocol
Modbus The protocol defines a message structure that a controller can recognize and use, No matter what network they communicate through. Therefore, The underlying communication method can be used RS232, RS485 Waiting for serial link, It can also be used TCP/IP Ethernet link. when in Modbus When communicating on the internet, The controller must know the addresses of other slave devices in the network, Only then can messages sent by address be recognized, And take corresponding actions.
Simply put, Modbus Communication protocols have the following characteristics:
- Modbus Open protocol standards, Publicly released without royalty requirements, Users can obtain and use it for free Modbus agreement, No need to pay license fees;
- Modbus Initially used RS232, RS485 Using serial links as the underlying communication method, Low cost interface chip for serial bus, And the wiring is also simple and convenient;
- Modbus The protocol supports multiple electrical interfaces, such as RS232, RS485, TCP/IP Wait, wait,It can also be transmitted on various media, Like twisted pair cables, optical fiber, infrared, Wireless, etc;
- Modbus It is a simple application layer protocol, Its protocol message frame format is simple, compact, easy to understand, Easy for users to understand and use, Manufacturer development and integration, Facilitating the formation of industrial control networks.
Why study Modbus
although Modbus It has developed to an extremely mature stage, However, due to the simplicity of its protocol and the ease of implementation on multiple communication media, Modbus Still one of the commonly used connection methods between industrial electronic devices at present. To some extent, Modbus Communication protocol is the industry standard for communication protocols in the industrial field. In the current booming development of the Internet of Things, Understand and master the wide range of applications Modbus The significance of communication protocols is significant.
The figure below shows Modbus RTU Connection of network devices.

Technical terms
in Modbus The common professional terms used in development are as follows:
- Master : Main (Station)Device
- Slave : From (station)Device
- Client : client, correspond to Master Device
- Server : server-side, correspond to Slave Device
- ADU : Application data unit (Application Data Unit)
- PDU : Protocol Data Unit (Protocol Data Unit)
- MSB : Most Significant Bit (Most Significant Bit)
- LSB : Least Significant Bit (Least Significant Bit)
- MBAP : Modbus application protocol (Modbus Application Protocol)
- PLC : Programmable Logic Controller (Programmable Logic Controller)
- RTU : Remote terminal unit (Remote Terminal Unit)
- SCADA : Supervision, control, and data collection (Supervisory Control And Data Acquisition)
Leave a Reply