Skip to main content
Blog
Blog · LRI AEM-60DC8

The complete Modbus RTU guide for field engineers

Modbus RTU technical guide: frame, function codes, holding registers, RS-485, exception debugging, and industrial installation best practices.

LRI EngineeringMon May 25 2026 21:00:00 GMT-0300 (Brasilia Standard Time)

Four decades after its publication, Modbus RTU remains present in new panels, substation retrofits, and freshly commissioned manufacturing lines. The reasonable question in 2026 is why a serial protocol, with no native security and a 16-bit data model, still competes with OPC UA, MQTT Sparkplug, and industrial variants over TCP. The answer is practical: there is an installed base of hundreds of millions of devices that speak Modbus RTU, the specification has been open and stable since 1996, any 8-bit microcontroller implements the stack in a few kilobytes, and the cost of an RS-485 transceiver has dropped below a dollar. This guide consolidates what a field engineer needs to integrate, debug, and document a Modbus RTU link with industrial quality. The focus is the binary frame, the data types, the actual mapping of a device, the comparison with TCP, exception handling, and the physical-layer pitfalls that show up on real jobsites.

What is Modbus RTU

Modbus was published by Modicon in 1979 as the communication language between the PLC 084 and remote peripherals. The RTU (Remote Terminal Unit) variant is the binary encoding of the protocol over an asynchronous serial line, in contrast to Modbus ASCII (legible hexadecimal characters, with roughly double the overhead) and Modbus TCP (encapsulated in IP sockets, without CRC). The current specification is maintained by the Modbus Organization and referenced in standards such as IEC 61158 (the industrial fieldbus family), which catalogs Modbus as Type 15.

The typical physical layer is EIA/TIA-485 (frequently called RS-485): differential, half-duplex, multidrop, with up to 32 unit loads per segment without a repeater. It is also possible to operate Modbus RTU over RS-232 point-to-point, although this is uncommon in new installations. The model is strictly client/server: there is a single client (formerly called "master") that initiates transactions, and up to 247 addressable servers ("slaves") on the same bus. Servers never speak spontaneously; they only respond to the unicast address directed at them or silently process broadcast requests at address 0.

The usual transmission rate covers 4800, 9600, 19200, 38400, 57600, and 115200 bps. The specification requires support for 9600 and 19200 bps; the others are optional. The standard character format is 11 bits: 1 start, 8 data, 1 even parity, 1 stop. When parity is disabled, two stop bits are mandatory to preserve the total character time.

Modbus RTU frame

The RTU frame is delimited by line silence, not by special characters. The specification defines that the interval between two consecutive frames must be at least 3.5 character times (t3.5) and that the interval between two characters within the same frame must not exceed 1.5 character times (t1.5). For rates above 19200 bps, these times are fixed at 1750 µs and 750 µs, respectively, by recommendation of the specification.

The frame structure is:

Field Size (bytes) Content
Address 1 0 (broadcast) or 1–247 (unicast); 248–255 reserved
Function code 1 Code of the requested operation
Data 0–252 Function parameters (addresses, quantities, values)
CRC-16 2 Polynomial 0xA001, low byte first

The maximum PDU (Protocol Data Unit) size is 253 bytes, which puts the RTU ADU (Application Data Unit) frame at no more than 256 bytes considering address and CRC. The CRC is computed over address, function code, and data; the register starts at 0xFFFF and uses the reversed polynomial 0xA001. Implementations using a 256-entry table resolve the computation in microseconds even on modest MCUs.

The four function codes most used in the field are:

  • 0x03 Read Holding Registers: reads 1 to 125 consecutive holding registers. It is the dominant operation in SCADA systems.
  • 0x04 Read Input Registers: reads 1 to 125 consecutive input registers (read-only). Used for quantities measured in real time.
  • 0x06 Write Single Register: writes a 16-bit value to a single holding register. Useful for individual commands and setpoints.
  • 0x10 Write Multiple Registers: writes 1 to 123 holding registers in a single transaction. Indispensable for configuring parameterizable blocks.

There are also 0x01/0x02 for coils and discrete inputs, 0x05 for a single coil, 0x0F for multiple coils, 0x17 (read/write multiple), 0x16 (mask write), and 0x2B (read device identification). Function 0x08 (diagnostics) is useful for probing link health, but support varies by manufacturer.

Modbus data types

The original Modbus data model reflects the memory of Modicon's PLC 984, with four distinct tables. The classic confusion between "logical address" (1-based, with prefixes 0/1/3/4) and "protocol address" (0-based, transmitted in the frame) is a permanent source of error in integrations.

Table Access Size Logical address Protocol address Function codes
Coils Read/write 1 bit 00001–09999 0x0000–0x270E 0x01, 0x05, 0x0F
Discrete inputs Read-only 1 bit 10001–19999 0x0000–0x270E 0x02
Input registers Read-only 16 bits 30001–39999 0x0000–0x270E 0x04
Holding registers Read/write 16 bits 40001–49999 0x0000–0x270E 0x03, 0x06, 0x10, 0x16

32-bit values (float, int32, energy counters) are stored in two contiguous holding registers. Byte and register order varies between manufacturers: ABCD (pure big-endian), CDAB (word swap), BADC (byte swap), and DCBA (full reverse). Documenting this order is as important as documenting the address; integrations that only fail with large values almost always have the wrong swap.

How to map a real device

The register map documentation is the most important integration asset of any Modbus device. As a practical example, consider the AEM-60DC8, an 8-channel industrial DC voltage monitor, which in firmware version v1.03 exposes a total of 147 holding registers organized in 17 functional blocks.

The excerpt below is a simplified example for didactic purposes; the authoritative map is appendix B of the product's technical manual:

Block Range (hex) Registers Type Note
Voltage CH1–CH8 (instantaneous) 0x0000–0x0007 8 int16 Value in mV, signed
Voltage CH1–CH8 (1 s average) 0x0008–0x000F 8 int16 1-second moving window
Global alarm status 0x0100 1 bitfield Bit i indicates channel i in violation
Upper limits CH1–CH8 0x0110–0x0117 8 int16 Write-enabled
Lower limits CH1–CH8 0x0118–0x011F 8 int16 Write-enabled
Event counters 0x0200–0x020F 16 uint16 2 counters per channel
Identification and firmware 0x0F00–0x0F0F 16 ASCII/u16 Includes version v1.03

Best practices when publishing a map: indicate physical unit, scale (multiplier and offset), valid range, "invalid data" value (typically 0x8000 for int16), and whether the register is volatile or persistent. For the map reader, what matters is the contract — not the internal structure of the firmware.

Modbus RTU vs Modbus TCP

The choice between RTU and TCP is rarely aesthetic; it depends on topology, acceptable latency, and existing infrastructure.

Criterion Modbus RTU Modbus TCP
Physical layer RS-485 or RS-232 Ethernet 10/100/1000 Mbps
Topology Multidrop (up to 32 nodes without repeater) Star via switch
Addressing 1 byte (1–247) IP + Unit Identifier
Integrity CRC-16 TCP checksum (no Modbus CRC)
Framing By silence (t3.5) MBAP header (7 bytes)
Typical latency 5–50 ms per transaction <5 ms on a dedicated LAN
Hardware cost Very low Moderate (PHY, industrial switch)
Distance without repeater Up to 1200 m at 9600 bps 100 m per segment (copper)
Determinism High (only the client speaks) Subject to logical collisions and congestion
EMI immunity Excellent (differential pair) Good, depends on cabling
Concurrency One client, one dialog at a time Multiple simultaneous clients

The rule of thumb is: a long, noisy physical bus with many inexpensive devices calls for RTU; integration with modern SCADA, multiple concurrent supervisors, and aggressive sampling rates calls for TCP. RTU↔TCP gateways are commonplace and solve hybrid scenarios without rewriting firmware.

Errors and exceptions

When the server recognizes the request but cannot fulfill it, it responds with the original function code plus 0x80 and an exception code byte. The most common ones in the field:

Code Name Typical cause
0x01 Illegal Function Function code not implemented by the server
0x02 Illegal Data Address Address out of map or forbidden block
0x03 Illegal Data Value Quantity outside 1–125 or value outside the allowed range
0x04 Slave Device Failure Internal error (memory, hardware, self-check)

Errors 0x05 (Acknowledge), 0x06 (Slave Busy), 0x08 (Memory Parity Error), and 0x0B (Gateway Target Failed to Respond) appear in specific scenarios — long programming, devices with queues, and gateways respectively. When there is no response within the timeout (typically 100–500 ms), the client should record a timeout, not an exception; the difference is diagnostic.

The recommended field debug routine is: (1) confirm baud rate, parity, and stop bits identical on both sides; (2) confirm the server address; (3) capture raw traffic with a serial analyzer or Modbus sniffer; (4) manually validate the request CRC; (5) test the same register with a known client (QModMaster, mbpoll); (6) only then suspect the server's firmware.

RS-485 installation best practices

Most failures attributed to "unstable Modbus" are actually physical-layer problems. The EIA-485 standard sizes the transceiver, but bus design is the integrator's responsibility.

  • Topology: a single transmission line (daisy-chain), no stars and no stubs longer than 30 cm. Short stars work in the lab and fail on jobsites with noise.
  • Termination: a 120 Ω resistor at each physical end of the bus, matched to the characteristic impedance of the pair. Terminating only one end produces reflection.
  • Biasing (bias): pull-up resistors on A and pull-down on B (typically 680 Ω to 1 kΩ) to maintain a defined idle state. Without biasing, the first bit after silence can be misinterpreted.
  • Cable: shielded twisted pair with 120 Ω impedance (e.g., Belden 9841 or equivalent). The shield grounded at a single point, normally at the Modbus client's panel.
  • Ground reference: an additional conductor (signal common) interconnecting all transceiver GNDs through a 100 Ω/0.5 W resistor at each node, limiting common-mode current.
  • Length × rate: the classic relationship is up to 1200 m at 9600 bps; at 115200 bps stay below 100 m to preserve jitter margin.
  • Galvanic isolation: mandatory in environments with VFDs, welding, or questionable grounding. Isolated transceivers solve more problems than active repeaters.
  • Cable separation: minimum distance of 30 cm from power cables; crossings always at a 90° angle.

A well-sized bus at 19200 bps with 16 devices is more reliable and easier to maintain than the same bus pushed to 115200 bps without real need. Performance is not an isolated goal in Modbus RTU.

How to test your integration

Before bringing up the SCADA, it is worth exercising the register map against a controlled server. LRI provides a Python simulator that emulates the behavior of an AEM-60DC8 — including the 147 holding registers, the alarm blocks, and the reading curve of the 8 channels — over a virtual serial port or encapsulated TCP. Conceptually, the simulator allows you to:

  • Validate the client without the physical equipment on hand.
  • Force edge conditions (channel in overvoltage, global alarm, channel failure) that would be difficult to provoke on the bench.
  • Run automated regression tests in CI on every change in the SCADA.
  • Compare two client implementations (e.g., legacy vs. new) reading the same set of registers.

The combination of a deterministic simulator with real equipment drastically reduces commissioning time. To learn the complete register map, the electrical ranges, and the Secure by Design modes of the product, see the AEM-60DC8 page and the technical documentation available at aem.lri.com.br.

Conclusion

Modbus RTU survives because it solves a well-defined problem: transporting 16-bit integers between a client and dozens of servers over a pair of wires, in a predictable, inexpensive, and auditable way. Knowing how to read a frame, clearly map holding registers, size the physical layer, and diagnose exceptions is the minimum toolset of the engineer who integrates industrial equipment in 2026. Modern protocols will coexist with RTU for a long time, and the professional capable of moving between serial and TCP, between CRC and TLS, is the one who delivers projects on schedule. The AEM-60DC8 was designed for that professional, with a stable register map, an available simulator, and a Secure by Design posture.

Frequently asked questions

Is Modbus RTU still used in 2026? Yes. The installed base is on the order of hundreds of millions of devices, and most industrial retrofits still require RTU compatibility. New equipment typically exposes RTU and TCP simultaneously.

What is the difference between holding registers and input registers? Holding registers are read/write (function codes 0x03, 0x06, 0x10), typically used for parameters, setpoints, and configurations. Input registers are read-only (function code 0x04), reserved for measured quantities.

How do I discover the Modbus RTU address of an unknown device? Systematic scanning across addresses 1–247 reading a likely register (for example, 0x0000) is the standard approach. Tools such as mbpoll and QModMaster automate the scan. On critical buses, perform the scan offline to avoid noise in normal exchanges.

Is Modbus RTU secure? The specification does not provide for authentication or encryption. The best practice is to physically isolate the bus and use gateways with filtering for any bridge to untrusted networks. Equipment with a Secure by Design posture complements Modbus with controls in adjacent layers (firmware signing, audit logs, plane separation).

Can I have two clients (masters) on the same RTU bus? Not in the classic specification. The model is strictly one client per bus. Scenarios with multiple supervisors require a gateway with arbitration, a switch to Modbus TCP, or physical segmentation of the bus.


Related content

More LRI technical materials on adjacent topics.