Tutorials › Modbus TCP vs RTU

Modbus comes in two variants you will meet constantly in the field: Modbus RTU over serial and Modbus TCP/IP over Ethernet. They carry the same data model - coils, discrete inputs, input registers and holding registers - and the same function codes. What differs is the transport: how the message is framed and physically moved between devices.

The data is the same, the transport is not

Both variants use the same Protocol Data Unit (PDU): a function code plus data. A master reads or writes the same registers either way. So if you can talk to a device over RTU, the register map is identical over TCP - only the connection changes.

Frame format

Modbus RTU wraps the PDU with a 1-byte slave address at the front and a 2-byte CRC checksum at the end. Message boundaries are detected by silent gaps on the wire (about 3.5 character times).

Modbus TCP drops the CRC (TCP/IP already guarantees integrity) and adds a 7-byte MBAP header containing a transaction ID, protocol ID, length and unit ID. The unit ID replaces the RTU slave address and is often used when bridging to serial devices through a gateway.

AspectModbus RTUModbus TCP/IP
Physical layerRS-485 / RS-232Ethernet
TopologyMulti-drop bus (daisy chain)Star (switch)
SpeedUp to 115,200 baud10/100/1000 Mbps
Max devicesUp to 247 on a busEffectively unlimited
DistanceUp to ~1,200 m (RS-485)~100 m per segment
Error checkCRC-16TCP/IP
MastersOne master per busMultiple clients
Default portSerial COM portTCP 502

Wiring

RTU almost always runs on RS-485, a two-wire (plus common) differential bus that lets many devices share one pair of wires over long distances. Terminate both ends with 120 Ω resistors and keep a consistent A/B polarity. TCP runs on ordinary Ethernet cabling to a switch - simpler to wire, but each device needs an IP address.

Which should you use?

  • Choose RTU for simple, cost-sensitive, long-distance runs with a handful of serial devices - meters, drives and sensors on an RS-485 trunk.
  • Choose TCP when you already have an Ethernet network, need higher throughput, want multiple clients, or are integrating with SCADA and IT systems.
  • Mixed sites are common: a Modbus TCP-to-RTU gateway lets an Ethernet master reach serial devices using the unit ID.

Test both in minutes

ModbusBB speaks Modbus TCP, RTU and ASCII, so you can connect to either kind of device from one tool - and even run its built-in simulator to mimic a device while you test. Download the free trial to try it.

Keep Learning

Next: how 32-bit values span two registers and why byte order matters.