Skip to main content
Call Eric:863-698-8266
CURRYCONTROLS.COMControls & Automation Knowledge Hub
ReferenceCommunicationsModbusPLC

Modbus RTU

Serial Modbus over RS-485: function codes, register addressing, the off-by-one that catches everyone, and the physical layer details that decide whether a bus is stable.

10 min readUpdated Jul 21, 2026Published Mar 30, 2026By Eric Sullivan

The short answer

Modbus RTU

Modbus RTU is a serial master/slave protocol, normally carried on RS-485, in which a single master polls addressed slave devices for register data. Messages are binary with a CRC-16 check and are delimited by a silent interval of at least 3.5 character times. Its simplicity is why it is everywhere, and its lack of built-in diagnostics is why intermittent problems take patience to find.

Key points

  • One master, up to 247 addressed slaves, one transaction at a time.
  • Register documentation ambiguity is the most common integration problem: 40001 versus offset 0.
  • Termination at both physical ends, and bias somewhere, are required for a stable bus.
  • Every device on the segment must match baud rate, data bits, parity, and stop bits.
  • There is no built-in security. Anything reachable can be read and written.

How a transaction works

The master sends a request containing a slave address, a function code, a starting register, a quantity, and a CRC. The addressed slave, and only that slave, responds with the same address, the same function code, the data, and its own CRC. Every other device on the bus stays silent. Nothing happens without the master initiating it.

That single-conversation model is why a device that answers slowly slows the whole bus, and why one device that transmits when it should not can make an entire segment appear broken.

Function codes you will actually use

CodeNameOperates on
01Read CoilsDiscrete outputs, read/write bits
02Read Discrete InputsDiscrete inputs, read-only bits
03Read Holding Registers16-bit read/write registers — by far the most used
04Read Input Registers16-bit read-only registers
05Write Single CoilOne output bit
06Write Single RegisterOne 16-bit register
15Write Multiple CoilsA block of output bits
16Write Multiple RegistersA block of 16-bit registers

The addressing problem

This causes more wasted hours than every other Modbus issue combined. Two conventions describe the same register and documentation rarely says which is in use.

Traditional data model addressing
Holding registers are numbered from 40001. A device manual saying "flow rate is at 40010" is using this convention.
Protocol addressing
The number actually placed on the wire, starting at 0. Register 40010 in the traditional model is protocol address 9.
The conversion, and the two errors it produces
Traditional 40001  ->  protocol address 0
Traditional 40010  ->  protocol address 9
Traditional 4xxxx  ->  protocol address (xxxx - 1)

Off by exactly one register  -> you configured 40010 as address 10
Reading 40001 as address 40001 -> illegal data address exception

If a value is close but consistently belongs to the neighboring
point in the device map, you are off by one.

Data types and byte order

Modbus defines 16-bit registers and nothing larger. A 32-bit float or a 32-bit integer is carried in two consecutive registers, and the standard does not specify the order in which those registers appear. Vendors differ, and some devices are configurable.

ArrangementAlso calledSymptom if wrong
Big-endian, high word firstABCDCorrect on many devices
Little-endian, low word firstCDABValue is wildly wrong or reads as a tiny number
Byte-swappedBADCValue looks like noise
Full reverseDCBAValue looks like noise

A practical test: read a value you know, such as a flow rate the device displays locally. If it reads as a huge number, a near-zero number, or nonsense, try swapping the word order first. The correct combination becomes obvious immediately.

The physical layer

RS-485 is a differential pair, and most intermittent Modbus problems are physical rather than protocol.

  • Daisy chain the devices. RS-485 is a bus, not a star. Long stubs off a trunk cause reflections.
  • Terminate both physical ends, typically 120 ohms. Terminate only the ends, not every device.
  • Bias the idle line somewhere on the segment, usually at the master. Without bias, an idle line floats and receivers see noise as data.
  • Use twisted shielded pair rated for RS-485, and ground the shield at one end.
  • Connect the signal common. Many installations skip this and work until the ground potential difference grows.
  • Verify polarity. A and B reversed at one device produces silence from that device only.
  • Keep it away from drive output conductors. This is the leading cause of a bus that works until a pump starts.

Exception responses

CodeMeaningUsually means
01Illegal functionThe device does not support that function code
02Illegal data addressWrong register, or a block that runs past the end of the map
03Illegal data valueA value outside what the register accepts
04Slave device failureAn internal error in the device
06Slave device busyDevice is processing; retry

An exception is good news compared with silence. It proves the device heard you, the wiring is correct, the address is right, and the framing is valid. Only the content of the request is wrong, which is a much smaller problem than a bus that does not answer at all.

Timing and polling

Frames are delimited by silence: a gap of at least 3.5 character times marks the end of a message, and a gap of more than 1.5 character times inside a message invalidates it. This is why a gateway or a USB serial converter that introduces latency can break RTU framing even though the bytes all arrive.

  • Poll no faster than the device can answer. Many field devices need tens of milliseconds per response.
  • Read contiguous blocks rather than individual registers. One read of twenty registers is far cheaper than twenty reads.
  • Set the response timeout longer than the slowest device, then set retries deliberately rather than leaving a default.
  • Count and trend communication errors per device. A device at a 2% error rate today is a failure next month.

Frequently asked questions

What is the difference between Modbus RTU and Modbus ASCII?
RTU sends binary data with a CRC-16 and relies on silent intervals for framing. ASCII sends hexadecimal characters with a start and end delimiter and an LRC check. ASCII is more tolerant of latency but roughly half as efficient. RTU is far more common.
How many devices can be on one RS-485 segment?
The protocol addresses up to 247 slaves. The electrical limit is typically 32 standard unit loads on a segment, though many modern transceivers present a fraction of a unit load and allow more. Practically, keep segments small; a bus with forty devices is slow and hard to diagnose.
Why does my device respond intermittently?
In order of likelihood: missing or incorrect termination, missing bias, no signal common, cable routed near drive output conductors, a timeout shorter than the device response time, and polling faster than the device can answer.
Can I have two masters on a Modbus RTU bus?
Not on the same segment. Modbus RTU is single-master by design. Two masters will transmit over each other. If two systems need the data, use a gateway or a data concentrator that presents itself as a slave to both.

Direct contact

Have a controls question?

Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.