Modbus RTU and Modbus TCP send the same Modbus messages (function code + data) in different wrappers. Modbus RTU runs on serial lines, usually RS-485, with a 1-byte slave address (1–247) and a CRC-16 error check. Modbus TCP runs over Ethernet on port 502, adding a 7-byte MBAP header and dropping the CRC because TCP/IP already handles errors. Gateways convert between them using the TCP unit ID as the serial address.
Modbus RTU vs Modbus TCP Comparison
| Modbus RTU | Modbus TCP | |
|---|---|---|
| Physical layer | RS-485 (2- or 4-wire) or RS-232 | Ethernet (TCP/IP) |
| Addressing | Slave address 1–247 (0 = broadcast) | IP address + unit ID |
| Frame | Address + PDU + CRC | MBAP header + PDU |
| Error check | CRC-16-MODBUS | None in Modbus (TCP/IP checks) |
| Framing | Silence ≥ 3.5 character times between frames | Length field in the header |
| Max ADU size | 256 bytes | 260 bytes |
| Roles | One master polls slaves | Clients connect to servers on port 502 |
| Typical speed | 9,600–115,200 baud | 10/100/1000 Mbit/s Ethernet |
How Modbus RTU Works
Wikipedia describes Modbus RTU as the most common Modbus implementation. It uses compact binary data and a cyclic redundancy check. Each character is 11 bits: one start bit, eight data bits (least significant first), a parity bit (even by default) and one stop bit. A frame is the slave address, the function code, 0–252 data bytes and a 2-byte CRC sent low byte first. Frames are separated by at least 3.5 character times of silence, and characters within a frame may not be more than 1.5 character times apart.
At 19,200 baud the 3.5-character gap is 2.005 ms. Above 19,200 baud the specification recommends fixed values of 750 µs (t1.5) and 1.75 ms (t3.5). One master polls up to 247 slaves on a bus; a slave that detects a parity or CRC error simply does not respond, so the master times out. Most RTU networks use two-wire RS-485; see RS-232 vs RS-485.
How Modbus TCP Works
Modbus TCP wraps the same PDU in the MBAP (Modbus Application Protocol) header and sends it over a TCP connection to port 502. The header has a 2-byte transaction ID that matches responses to requests, a 2-byte protocol ID (0 for Modbus), a 2-byte length of the remaining bytes and a 1-byte unit ID. No checksum is added because the TCP/IP layers already protect the data (Wikipedia). For the Ethernet side, see 1000BASE-T vs 100BASE-TX.
Frame Builder and CRC Calculator
Example: reading 10 holding registers starting at address 0 from slave 1 is the RTU frame 01 03 00 00 00 0A C5 CD. The same request over Modbus TCP, with transaction ID 1, is 00 01 00 00 00 06 01 03 00 00 00 0A.
Gateways and Mixed Networks
Plants often mix both: Modbus TCP from a PLC or SCADA system to a gateway, and Modbus RTU from the gateway to meters, drives and instruments on RS-485. Wikipedia notes the unit identifier exists for exactly this case: it carries the server address of the device behind the gateway. Gateway-specific exception codes 10 (gateway path unavailable) and 11 (target device failed to respond) help diagnose these links. For where Modbus fits in a supervisory system, see SCADA vs HMI.
For a deterministic Ethernet alternative used with many PLCs, see what is Profinet.
For the physical layer under Modbus RTU, see our RS-485 wiring and termination guide.
Frequently Asked Questions
What is the difference between Modbus RTU and Modbus TCP?
They carry the same Modbus messages (PDU) over different networks. Modbus RTU runs on serial lines (usually RS-485) with a 1-byte device address and a CRC-16 check. Modbus TCP runs over Ethernet on TCP port 502 with a 7-byte MBAP header and no CRC, because TCP/IP already checks for errors.
What is Modbus RTU?
The most common Modbus implementation: a compact binary format sent over RS-485 or RS-232, framed by silent intervals of at least 3.5 character times and protected by a CRC-16 checksum.
What is Modbus TCP?
Modbus over TCP/IP networks, connecting to port 502. Each message starts with the MBAP header (transaction ID, protocol ID 0, length and unit ID) followed by the function code and data.
What port does Modbus TCP use?
TCP port 502.
How many devices can be on a Modbus RTU network?
Up to 247 slave addresses (1–247) per serial line; 248–255 are reserved. Address 0 is used for broadcast. The RS-485 electrical load also limits the practical number of devices.
What is the unit identifier in Modbus TCP?
A 1-byte field that acts like the serial slave address. It matters when a Modbus TCP-to-RTU gateway forwards requests to serial devices behind it; otherwise it is often 255 or ignored.
How does a Modbus TCP to RTU gateway work?
It receives TCP frames, strips the MBAP header, uses the unit ID as the serial slave address, adds a CRC and sends the RTU frame on the RS-485 bus, then wraps the reply back into TCP.
Is Modbus RTU faster than Modbus TCP?
Usually not. RTU is limited by baud rate (often 9,600–115,200) and one transaction at a time on the bus; Modbus TCP runs at Ethernet speeds and can have several transactions open, identified by the transaction ID.
What is Modbus ASCII?
A serial variant that sends each byte as two ASCII hex characters, framed by a colon and CR/LF, with an LRC checksum. It is easier to read but about half as efficient as RTU.
Is Modbus secure?
No. The Modbus protocol itself provides no protection against unauthorized commands or interception (Wikipedia), so networks need segmentation and access control.
Sources and Further Reading
- Wikipedia: Modbus: PDU/ADU, RTU framing and CRC, timing, ASCII, TCP MBAP header, exception codes and security.
