Learn Automation with MINATA #43: Modbus RTU — Read the RS-485 Bus Properly Before Connecting Anything to It
Modbus RTU: Read the RS-485 Bus Properly Before Connecting Anything to It
Modbus RTU is a simple, widely used protocol for a PLC to talk to drives, energy meters and smart sensors over RS-485. Because it is simple, people skip past the physical layer — and most of the faults reported as "the whole bus is dead" come from baud rate, node address, A/B polarity or termination, not from the program logic.
The picture: one master, several slaves
On a Modbus RTU bus, one device acts as master (client) and asks; the slaves (servers) answer by node address. Every slave has a unique address from 1 to 247. The master sends a request frame — address, function code, data, CRC — and the slave at that address replies. On a classic bus there are never two masters taking the initiative.
Four physical-layer settings that must match
Every device on the bus must share the same baud rate, data bits, parity and stop bits. One drive set to 9600-8-E-1 while the PLC is at 19200-8-N-1 is enough for that device to stay silent. Check those four values before you touch the program.
The Modbus data areas
Modbus splits data into four areas, and reading the right one is a precondition for getting the right number:
| Area | Type | Read function code | Typical use |
|---|
| Coils | Read/write bit | 01 | ON and OFF commands |
| Discrete inputs | Read-only bit | 02 | Input states |
| Input registers | Read-only word | 04 | Measured values |
| Holding registers | Read/write word | 03 | Parameters, setpoints |
Take the register map from the manual for the exact model and firmware; the same manufacturer can address a different range differently. Watch for the off-by-one convention between documents — register 40001 often means address 0.
The RS-485 layer: A/B, termination, biasing
- A/B polarity (D+/D−): swapping these two wires is the single most common fault. If in doubt, swap them and test.
- Daisy-chain topology: run device to device in series, and avoid long spurs.
- 120Ω termination at both ends of the bus on long runs or at high speed, to reduce reflections.
- Bias resistors: they hold the bus at a defined level when idle, so noise is not read as data.
- Use screened twisted-pair cable, and connect the signal ground the way the device documentation says.
A worked engineering situation
A PLC reads the status and current of a drive over Modbus RTU. The HMI reports a communication timeout separately from a drive fault: if the reply stops arriving, the operator knows to check wiring and address; if the drive reports a fault, the motor and the load are what need looking at. Those two must never share one lamp.
Baud rate, addresses, register map and bus configuration all have to follow the device manual and the machine record.
Common mistakes
- Editing the program before checking baud, parity, address and A/B.
- Two devices set to the same node address on one bus.
- Forgetting termination and biasing on a long run, then chasing intermittent reads.
- Reading the wrong data area — input register instead of holding register.
- Merging a communication fault and a device fault into one alarm.
Modbus RTU checklist
- [ ] Baud, data bits, parity and stop bits are identical across the bus.
- [ ] Every slave has a unique address, recorded in the machine file.
- [ ] The register map matches the model and firmware, off-by-one handled.
- [ ] A/B polarity is correct, with termination and biasing where needed.
- [ ] Timeout and retry are under control; comms and device alarms are separate.
Understanding the bus before connecting devices saves hours of invisible fault-finding. #44 extends the same protocol onto Ethernet with Modbus TCP.
Read more automation knowledge at MINATA: https://minatavn.com/en/blog/industrial-automation
Previous — #42: Connecting HMI and PLC: https://minatavn.com/en/blog/automation-42-hmi-plc-connection
Next — #44: Modbus TCP over Ethernet: https://minatavn.com/en/blog/automation-44-modbus-tcp
View all MINATA technical articles