What is Modbus RTU and Modbus TCP?

ModbusCommunicationRS485EthernetProtocol

Modbus is an open, royalty-free request/response protocol published by Modicon (now Schneider Electric) in 1979 for its PLCs. Modbus RTU carries messages as compact binary frames over an RS-485 or RS-232 serial line; Modbus TCP carries the same data model over Ethernet and TCP/IP.

How does Modbus work?

A client (formerly called master) sends a request and the addressed server (slave) answers; servers never talk on their own. Data lives in four tables: coils (read/write bits), discrete inputs (read-only bits), input registers (read-only 16-bit) and holding registers (read/write 16-bit). The most used function codes are 01 (read coils), 02 (read discrete inputs), 03 (read holding registers), 04 (read input registers), 05/06 (write single coil/register) and 15/16 (write multiple coils/registers).

Example: the same request in RTU and TCP

Reading 2 holding registers starting at address 0 from device 1:

FieldModbus RTUModbus TCP
Header—00 01 00 00 00 06 (transaction ID, protocol ID = 0, length)
Address / Unit ID0101
Function code0303
Start address00 0000 00
Quantity00 0200 02
Error checkCRC-16: C4 0BNone (handled by TCP)

In RTU the CRC is sent low byte first, and frames must be separated by at least 3.5 character times of silence. In TCP the 7-byte MBAP header replaces the CRC and the standard port is 502.

RTU vs TCP

FeatureModbus RTUModbus TCP
Physical layerRS-485 (mostly), RS-232Ethernet
Typical speed9600 – 115200 bit/s10/100 Mbit/s
Distance~1200 m on RS-485 at low baud rates100 m per copper segment
Device countAddresses 1–247; typically 32 unit loads without repeatersLimited by the IP network
TopologyDaisy-chain bus, 120 Ω termination at both endsStar, via switches

Common mistakes

  • Off-by-one addressing: register "40001" in a manual is address 0 on the wire. A shifted read returns wrong but plausible values.
  • Serial settings mismatch: baud, parity and stop bits (e.g. 9600 8N1 / 19200 8E1) must match on every device.
  • Termination and topology: star wiring on RS-485, missing terminators or no common reference (GND) cause intermittent CRC errors.
  • 32-bit values: floats and 32-bit integers span two registers and the word order differs between vendors.
  • Timeouts: very short timeouts combined with aggressive polling lose responses from slower devices.

Where is it used in industry?

Sensors, transmitters, drives, energy meters and remote I/O usually speak Modbus RTU, while PLCs, HMIs and SCADA systems commonly use Modbus TCP. Gateways bridge the two.

Amazeng GDT Series Digital Transmitters support both Modbus RTU and Modbus TCP, and the Conio digital I/O module is controlled via Modbus RTU over RS-485. For practical steps see our Modbus protocol integration post, and for the cloud side see MQTT.

Related Terms