Modbus is a widely used communication protocol in industrial automation and control systems. It was originally developed by Modicon (now Schneider Electric) in 1979 to enable communication between programmable logic controllers (PLCs). Over the years, Modbus has become one of the most popular industrial communication protocols due to its simplicity, reliability, and compatibility with various devices and systems.

Modbus is an open protocol that allows different devices to communicate over various types of networks. It is typically used in supervisory control and data acquisition (SCADA) systems, remote terminal units (RTUs), and industrial automation equipment. The protocol supports multiple communication methods, including serial communication (RS-232, RS-485) and Ethernet-based communication (Modbus TCP/IP).
Related Article:
Analysis of TCP/IP Protocol Transmission Using Wireless Modules
3 steps to learn the TCP/IP protocol of the communication protocol
CAN, ModBus, ProfiNet - How to choose the right industrial bus?
Comprehensive Guide on ModBus TCP Protocol
Modbus operates in two main communication modes:
Modbus RTU (Remote Terminal Unit)
Uses binary encoding for data transmission.
Employs cyclic redundancy check (CRC) for error detection.
Commonly used over RS-485 networks due to its robustness in industrial environments.
Modbus ASCII (American Standard Code for Information Interchange)
Uses ASCII encoding for data transmission.
Incorporates longitudinal redundancy check (LRC) for error detection.
Less efficient than Modbus RTU but easier to read and debug.
Modbus TCP/IP
Uses Ethernet for communication.
Faster and more flexible compared to serial communication.
Commonly used in modern industrial automation systems.
Modbus follows a master-slave (or client-server) communication model. The master device (or client) initiates communication and sends requests, while the slave devices (or servers) respond. Each Modbus message includes the following key components:
Slave Address: Identifies the target device (only in RTU/ASCII modes).
Function Code: Specifies the type of request (e.g., reading data, writing data).
Data Field: Contains information such as register addresses and values.
Error Check: Includes CRC (RTU) or LRC (ASCII) to ensure data integrity.
Modbus supports several function codes for reading and writing data:
01 (0x01): Read Coil Status (Digital Outputs)
02 (0x02): Read Discrete Input Status (Digital Inputs)
03 (0x03): Read Holding Registers (Analog Outputs)
04 (0x04): Read Input Registers (Analog Inputs)
05 (0x05): Write Single Coil
06 (0x06): Write Single Register
15 (0x0F): Write Multiple Coils
16 (0x10): Write Multiple Registers
Modbus devices use a register-based addressing system. Registers are categorized into different types:
Coils (0xxxx): Digital output values (read/write).
Discrete Inputs (1xxxx): Digital input values (read-only).
Input Registers (3xxxx): Analog input values (read-only).
Holding Registers (4xxxx): Analog output values (read/write).
Master Sends a Request
The master device sends a request containing the slave address, function code, and data field.
Slave Processes the Request
The addressed slave device interprets the request and retrieves or modifies the requested data.
Slave Responds
The slave sends back a response with the requested data or confirmation of an action.
Error Handling
If an error occurs, the slave returns an error message with an exception code.
Simplicity: Easy to implement and configure.
Interoperability: Compatible with various devices and manufacturers.
Scalability: Supports multiple communication modes and network types.
Reliability: Error-checking mechanisms ensure data integrity.
Limited Security: Lacks built-in encryption and authentication.
Slow Speed: Serial Modbus (RTU/ASCII) has a lower data transmission rate compared to modern protocols.
Restricted Addressing: Limited number of registers per device.
Modbus remains a dominant protocol in industrial automation due to its simplicity, reliability, and widespread adoption. Although it has some limitations, its advantages make it an ideal choice for communication in industrial control systems, SCADA applications, and IoT-enabled devices. With the ongoing evolution of industrial communication, Modbus continues to play a vital role in facilitating seamless data exchange between devices and systems.