ModbusSimulator
🔌 Protocol Comparison Guide for Engineers

Modbus TCP vs RTU — Complete Technical Comparison

Understand the difference between Modbus TCP and Modbus RTU: transport layer, speed, wiring, addressing, use cases, and when each protocol is the right choice.

⬇ Test Both with ModbusSimulator See Full Comparison ↓

ModbusSimulator supports both TCP and RTU — free 30-day trial

Modbus TCP vs RTU — At a Glance

Modbus is a serial communication protocol developed in 1979. Over the decades it has evolved into two primary variants used in industrial automation today:

The application layer — register model, function codes, data types — is identical between both variants. What differs is the transport layer, wiring, addressing, and performance characteristics.

Full Comparison Table

Parameter Modbus TCP Modbus RTU
Transport TCP/IP over Ethernet Serial (RS-485, RS-232, RS-422)
Standard port 502 (configurable) Physical COM port (e.g., COM1, /dev/ttyS0)
Typical speed 100 Mbps / 1 Gbps (Ethernet) 9600 – 115200 bps (configurable)
Round-trip latency (10 registers) <5 ms (LAN) ~60 ms at 9600 bps · ~5 ms at 115200 bps
Max cable distance 100 m (Cat5e/Cat6); unlimited with switches RS-485: 1,200 m at 9600 bps · shorter at higher baud
Max devices per bus Unlimited (each has own IP) 247 slave IDs; typically 30–50 practical
Multiple masters ✅ Yes (multiple TCP clients) ❌ No (single master only)
Error detection TCP checksum (no CRC in payload) CRC-16 on every message
Framing overhead 6-byte MBAP header + PDU Address (1B) + PDU + CRC (2B)
Device addressing IP address + Unit ID (usually 255 or 0) Unit ID 1–247 on shared bus
Wiring required Standard Ethernet (Cat5e/Cat6, fiber, Wi-Fi) RS-485 twisted pair (120 Ω); termination resistors
Typical applications Modern PLCs, SCADA via Ethernet, cloud-connected devices Legacy sensors, meters, drives; long-distance field wiring
Noise immunity Good (standard Ethernet shielding) Excellent (RS-485 differential signaling)
Connection type Persistent TCP connection (or new per request) Point-to-point or multi-drop bus
Testing without hardware ModbusSimulator TCP Simulator ModbusSimulator RTU Slave

When to Use Modbus TCP

Choose Modbus TCP when:

Engineering Tip:

Modbus TCP Device ID (Unit ID) is usually set to 1 for direct device connections or 255 for broadcast when no specific ID is required. When connecting through a serial gateway, the Unit ID routes to the specific RTU device on the serial bus.

When to Use Modbus RTU

Choose Modbus RTU when:

Modbus RTU to TCP Conversion

Many installations mix both protocols. A common scenario: field devices (sensors, meters, drives) are wired via RS-485 RTU, while the SCADA system communicates over Ethernet TCP. A Modbus RTU-to-TCP gateway bridges these two worlds:

  1. SCADA sends a Modbus TCP request to the gateway's IP address
  2. The gateway translates it to RTU and sends it down the RS-485 bus
  3. The target slave responds via RTU
  4. The gateway translates the RTU response back to TCP and returns it to the SCADA

The Unit ID in the TCP request identifies which RTU slave on the serial bus should respond. This is why TCP Unit IDs matter even when using an Ethernet gateway.

Testing Modbus TCP and RTU Without Real Hardware

ModbusSimulator handles both protocols in a single application:

Testing Modbus TCP

Run ModbusSimulator's slave mode as a TCP server on 127.0.0.1:502. Your SCADA, HMI, or master application connects to this address and reads/writes registers as if talking to a real PLC. Set any register values, inject exception responses, configure response delays — all without physical hardware.

Testing Modbus RTU

For RTU testing without serial hardware, install com0com (free virtual COM port driver for Windows). This creates a virtual COM port pair — e.g., COM10 and COM11. Run ModbusSimulator's slave on COM10 and your master application on COM11. The pair behaves like a real RS-485 loop.

Pro Tip:

To test the full RTU-to-TCP conversion stack, run ModbusSimulator's RTU slave on COM10, connect a virtual gateway on COM11, and have your SCADA connect via TCP. This simulates the exact production setup without any hardware.

Modbus TCP vs RTU — Frame Structure Comparison

Frame Element Modbus TCP Modbus RTU
Transaction ID2 bytes (echo by slave)Not present
Protocol ID2 bytes (always 0x0000)Not present
Length field2 bytesNot present (implied by baud timing)
Unit ID1 byte1 byte (slave address)
Function Code1 byte1 byte
DataN bytesN bytes
Error checkNone (TCP handles it)CRC-16 (2 bytes)
Total overhead7 bytes header3 bytes (addr + CRC)

The function codes and register data are identical between TCP and RTU — only the framing differs. This is why converting between the two is straightforward and why a single tool like ModbusSimulator can handle both.

Related Pages

Frequently Asked Questions

What is the main difference between Modbus TCP and RTU?

Modbus TCP runs over Ethernet (TCP/IP, port 502) with a 6-byte MBAP header and no CRC. Modbus RTU runs over serial connections (RS-485/RS-232) with CRC-16 error checking. Both use the same register model and function codes — the difference is purely in the transport layer.

Which is faster — Modbus TCP or RTU?

Modbus TCP is significantly faster for most applications. Ethernet runs at 100 Mbps+, giving round-trip times under 5 ms on a LAN. Modbus RTU at 9600 bps takes ~60 ms to read 10 registers; at 115200 bps, about 5 ms. For high-speed polling or many devices, TCP is the better choice.

Can Modbus RTU and TCP communicate directly?

Not directly — they use different transports. A Modbus RTU-to-TCP gateway converts between the two. The SCADA system connects to the gateway via TCP; the gateway polls RTU devices over RS-485 and returns responses via TCP. The Unit ID in the TCP request identifies which RTU slave to query.

How do I test Modbus TCP without a PLC?

Use ModbusSimulator's slave mode to run a Modbus TCP server on your PC at 127.0.0.1:502. Configure register values to simulate a real PLC, then connect your SCADA or master application to it. Full 30-day free trial available at /download.

How do I test Modbus RTU without serial hardware?

Install com0com (free virtual COM port driver for Windows) to create a virtual COM port pair. Run ModbusSimulator's RTU slave on COM10 and your master on COM11. Both communicate over a virtual serial link — no physical RS-485 adapter required.

Can ModbusSimulator handle both Modbus TCP and RTU?

Yes. ModbusSimulator supports Modbus TCP, RTU, ASCII, and UDP in both master and slave modes — all in a single $59 license. Run a TCP slave and an RTU slave simultaneously on the same PC for complex testing scenarios.

Test Modbus TCP and RTU — Without Any Hardware

ModbusSimulator supports both protocols — 30-day free trial on Windows 10/11

⬇ Download Free Trial View Pricing →

No credit card · No registration · Windows 10/11 64-bit