Modbus TCP vs Modbus RTU

The same data model over two very different transports. Framing, addressing, timing and what changes in your configuration.

6 min read · Updated

Modbus TCP and Modbus RTU carry the same requests over different wires. The register model, function codes and exceptions are identical. What differs is the framing, the addressing and — most importantly in practice — the timing.

Modbus TCPModbus RTU
TransportEthernet, TCP port 502RS-485 or RS-232 serial
FramingMBAP header: transaction, protocol, length, unitAddress byte, then CRC-16 at the end
Error checkTCP's own checksumCRC-16 in the frame
AddressingIP address, plus a unit IDSlave ID 1–247 on the line
ConcurrencyPossible, but many devices dislike itStrictly one request at a time
Typical failureConnection refused, timeoutCRC error, silence, wrong baud

The unit ID is not decoration

On serial the slave ID selects one device among many on a shared line. On TCP the IP address already identifies the device, so the unit ID is often 1 or 255 and ignored — except when the target is a gateway bridging TCP to a serial segment. Then the unit ID selects the downstream device, and getting it wrong produces exception 0B or a timeout.

Timing is where serial bites

  • Every device on one RS-485 line must share baud rate, parity, data bits and stop bits. One mismatched device produces CRC errors for everyone.
  • Frames are delimited by silence — a gap of about 3.5 character times. Polling too fast can run frames together.
  • The line is half duplex. Only one device may transmit at a time, so a client must wait for the response before sending the next request.
  • At 9600 baud a 20-register read takes a few tens of milliseconds on the wire alone. A 100-tag poll list cannot run at 100 ms.
A serial line shared by several slaves is a shared resource. Two applications polling the same line independently will interleave requests and produce timeouts that look like device faults. One poller per line, or one gateway that serialises access.

What changes in your configuration

Moving a tag map between TCP and RTU changes the connection, not the tags. Register types, addresses, data types, byte order and scaling are unchanged. This is why a device definition captured from one transport can be reused on the other.

There is also Modbus ASCII

A third framing, readable as hex characters with an LRC checksum. It is slower and rarer, mostly found on older equipment. If you have the choice, RTU is the better serial framing.

Modbus TCP vs Modbus RTU | Modbus Logic