What is Modbus?
Modbus is a serial communication protocol developed by Modicon in 1979 for use with its programmable logic controllers. Modicon released it publicly, and it became the de-facto standard for industrial device communication — not because it was the most sophisticated protocol, but because it was simple, free, and worked reliably over cheap serial hardware. Forty-five years later, it is still the first protocol listed in the documentation of most industrial devices.
Modbus is a request-response protocol built on a master-slave architecture. One device — the master — initiates every transaction. It sends a request to a slave device specifying what data it wants to read or write. The slave responds with either the requested data or an error code. Only the master can initiate communication; slaves never send data spontaneously. This simple model maps cleanly onto the way PLCs and field instruments were wired and operated when Modbus was designed.
Why Modbus is still everywhere. Modbus devices from the 1990s still run in production facilities today. The protocol has no licensing fees, no governing body that can change the specification without backward compatibility, and trivially simple implementation requirements — a Modbus RTU device can be implemented in a microcontroller with a few kilobytes of flash. When you ask why a new sensor released in 2025 supports Modbus: this is why. Every OPC server, SCADA system, and HMI already speaks it.
Modbus RTU, TCP, and ASCII
Modbus exists in three variants that use the same application-layer protocol but differ in their physical transport and framing:
RTU vs TCP in practice: Most modern Modbus devices support both RTU (via a DB9 or terminal block serial port) and TCP (via Ethernet). When you have the choice, prefer TCP: it is easier to wire, supports longer distances via standard network infrastructure, allows multiple masters to poll simultaneously, and eliminates the bus timing issues that cause intermittent RTU communication failures. When you are connecting to legacy equipment with only a serial port, RTU is your only option — and a serial-to-Ethernet converter or an OPC server with a serial port handles it transparently.
The Modbus register map
Modbus organizes device data into four tables, each addressed separately. Understanding this model is essential for configuring any OPC server, SCADA system, or edge gateway to read Modbus data correctly.
| Table / address range | Data type | Access | Function codes | Typical use |
|---|---|---|---|---|
Coils (0x) 00001–09999 | 1-bit boolean | Read / Write | FC01 read · FC05 write single · FC15 write multiple | Discrete outputs: relay states, actuator commands, valve open/close |
Discrete Inputs (1x) 10001–19999 | 1-bit boolean | Read only | FC02 read | Discrete inputs: limit switches, pushbuttons, digital sensor states |
Input Registers (3x) 30001–39999 | 16-bit word | Read only | FC04 read | Analog inputs: sensor measurements, process values (temperature, pressure, flow) |
Holding Registers (4x) 40001–49999 | 16-bit word | Read / Write | FC03 read · FC06 write single · FC16 write multiple | Configuration parameters, setpoints, calculated values, multi-register floats |
The address offset problem. Modbus documentation uses two different addressing conventions that trip up almost every engineer at least once. The "data model" address (as shown above) uses 1-based numbering — Holding Register 1 is 40001. The "PDU address" actually transmitted on the wire is 0-based — the wire address for Holding Register 40001 is 0x0000. Some device manuals document the data model address; some document the PDU address. If your reads are consistently returning the wrong values or an "illegal data address" error, an off-by-one error in addressing is the first thing to check. TOP Server handles this transparently but knowing which convention a device's documentation uses prevents initial configuration errors.
How a Modbus transaction works
Every Modbus communication follows the same request-response pattern. The master sends a request frame to a slave, and the slave either responds with the requested data or an exception response explaining why it could not fulfill the request. Here is a complete Modbus TCP read transaction for 10 holding registers starting at address 0:
A few important behaviors that affect how OPC servers and edge platforms interact with Modbus devices:
- One transaction at a time. A Modbus RTU master must wait for the slave to respond (or time out) before sending the next request. This serializes communication and is why large register reads are more efficient than many small ones — fewer round trips.
- Exception codes, not connection errors. Most Modbus errors are returned as exception responses — a valid frame with an error flag and a numeric exception code. The six standard codes (01 = illegal function, 02 = illegal address, 03 = illegal value, 04 = device failure, 05 = acknowledge, 06 = busy) are the first diagnostic step when data is not reading correctly.
- No unsolicited data. Slaves never send data without being asked. Every value update requires a new request from the master. This is fundamentally different from OPC UA subscriptions or MQTT, which are event-driven. High-frequency polling of many Modbus devices can saturate the communication channel.
Modbus limitations in modern architectures
Modbus's simplicity is also its ceiling. The protocol was designed to solve a 1979 problem — getting data from a PLC over a serial cable — and it solved that problem well. It was never designed for the multi-site, AI-ready data architectures that modern industrial operations require.
Modbus vs. other industrial protocols
| Feature | Modbus TCP/RTU | EtherNet/IP | OPC UA | MQTT |
|---|---|---|---|---|
| Year introduced | 1979 (RTU) / 1999 (TCP) | 2001 | 2008 | 1999 (pub. 2013) |
| Architecture | Master-slave, polling | Producer-consumer | Client-server + pub/sub | Pub/sub via broker |
| Data semantics | None — register numbers only | CIP object model | Rich — information model with types, units, metadata | None — payload is opaque |
| Built-in security | None | None | Yes — X.509 + TLS + RBAC | TLS optional |
| Typical device base | Any PLC, sensor, meter, drive | Allen-Bradley, Omron | Modern PLCs, OPC UA servers | IIoT gateways, cloud platforms |
Connecting Modbus devices with Software Toolbox
Frequently asked questions
Connecting Modbus devices to your OPC or IIoT infrastructure?
Software Toolbox's engineers have configured Modbus connectivity across every variant and edge case the protocol produces. TOP Server's Modbus Suite covers RTU, TCP, ASCII, and every byte-order combination — in production since 1996.
