Skip to main content
PROTOCOLS · COMPARISON

Modbus RTU vs Modbus TCP: What Is the Difference?

Modbus RTU and Modbus TCP carry the same Modbus messages over different links. Modbus RTU sends compact binary frames over serial lines, usually RS-485, with a CRC checksum on each frame. Modbus TCP wraps the messages in TCP/IP packets over Ethernet, normally on port 502. Gateways translate between them so serial devices can join Ethernet networks.

01

How Modbus RTU and Modbus TCP differ

Modbus RTU and Modbus TCP are two transports for the same protocol. In both, a client sends a function code and data, such as read holding registers 0 to 9, and a server replies. What changes is the wrapping and the wire. Modbus RTU, the binary serial mode of the protocol, packs each message into a compact binary frame for a serial line, usually an RS-485 bus shared by many devices. Modbus TCP puts the same message inside a TCP/IP packet and sends it over ordinary Ethernet to an IP address, normally on TCP port 502.

Because the function codes and data model are identical, the register map of a device is the same whichever transport it uses. That is what makes it easy for a gateway to read serial devices with RTU and present their data to Ethernet clients with TCP. Our FAQ on what Modbus is explains the data tables and function codes they share.

02

Modbus RTU vs Modbus TCP side by side

Feature Modbus RTU Modbus TCP
Physical layer RS-485 (usually) or RS-232 Ethernet, Wi-Fi or any IP network
Frame Address, function code, data, CRC 7-byte MBAP header, function code, data
Maximum message 256 bytes 260 bytes
Error checking CRC-16 on every frame Left to TCP/IP and Ethernet checksums
Addressing Device ID 1 to 247 on one bus IP address, plus an address byte for gateways
Typical speed 9,600 to 115,200 bit/s, 19,200 by default 10 Mb/s to 1 Gb/s network
Clients on a link One master per bus Many clients at once
Typical devices Meters, drives, controllers, sensors PLCs, HMIs, SCADA, gateways

The maximum message sizes come from the Modbus specification, which limits the function code and data to 253 bytes in both cases.

03

Inside a Modbus RTU frame

An RTU frame starts with a one-byte device address, followed by the function code, the data and a two-byte CRC. There is no start or end character. Instead, frames are separated by a silent gap of at least 3.5 character times on the line, so timing matters: a converter or operating system that inserts gaps in the middle of a frame can break it. Only one device can transmit at a time on the shared bus, so the master polls each device in turn and the speed of the whole bus depends on the number of devices, the baud rate and how often each is read.

Getting the wiring right is half the job. An RS-485 bus needs a twisted pair, a daisy-chain layout, 120 ohm termination at each end and a unique address on every device. Baud rate, parity and stop bits must match on every device; the specification’s default is 19,200 bit/s with even parity.

04

Inside a Modbus TCP message

Modbus TCP drops the device address and CRC and adds a seven-byte MBAP header. It holds a transaction number, so a client can match replies to requests, a protocol identifier of zero, a length field and a one-byte address used when the request is passed on to a serial device behind a gateway. Error detection is left to TCP/IP and Ethernet. Because it runs over normal networks, Modbus TCP lets several clients, such as a SCADA server and an HMI, read the same PLC at once, and our FAQ on TCP/IP covers the layers it rides on.

05

When to use each

Most sites use both. The choice is usually set by the devices already installed, how far apart they are and whether the data needs to reach more than one system.

  • //
    Choose Modbus RTU for field devices with only a serial port, long cable runs of up to around 1,200 m on one RS-485 pair, and simple daisy-chained installations such as meters in a switchroom or refrigeration controllers along a store.
  • //
    Choose Modbus TCP for devices already on Ethernet, links to SCADA and PLCs, several clients reading the same data and faster polling of many values.
  • //
    Use a gateway for both where serial devices need to reach an Ethernet network. The gateway reads RTU devices and serves their data over TCP or forwards it to the cloud.
06

Bridging RTU and TCP at the edge

An HMI, gateway or edge computer with both isolated RS-485 ports and Ethernet can read RTU devices and present the data over TCP, MQTT or a local dashboard. In our supermarket HMI case study, refrigeration controllers on RS-485 are read this way and their data is shown on site and remotely. Electrical isolation on the serial ports protects the computer from ground loops and surges picked up on long field cables. Our industrial IoT gateways combine serial and Ethernet ports for this role, and our serial I/O modules add isolated RS-485 ports to embedded computers.

07

Quick answers on Modbus RTU and TCP

Modbus RTU and TCP: common questions

Is Modbus TCP faster than Modbus RTU?

Usually, yes. Ethernet runs far faster than a serial bus and several requests can be in flight at once. On a small RTU bus at 115,200 bit/s, the difference may not matter in practice.

What port does Modbus TCP use?

TCP port 502. The Modbus/TCP Security variant, which adds TLS encryption, uses port 802.

What is Modbus RTU over TCP?

RTU frames, CRC included, sent unchanged inside a TCP connection. It is used by some serial device servers and is not the same as standard Modbus TCP, so both ends must agree on which is in use.

Can Modbus RTU run on RS-232?

Yes, for one device. RS-232 is point to point and short range, so RS-485 is used whenever several devices or long cables are involved.

How many devices can a Modbus RTU bus have?

Up to 247 addresses. A standard RS-485 segment supports 32 standard loads, and reduced-load transceivers or repeaters extend that toward the address limit.

We build gateways and edge computers with isolated RS-485 and Ethernet ports, Modbus software and the operating system configured as standard, and test them against your devices before they ship.