If you work with PLCs, SCADA systems, or industrial IoT devices, you've dealt with Modbus. It's been the standard communication protocol in industrial automation since 1979, and it isn't going anywhere. But choosing between Modbus RTU and Modbus TCP/IP for your project — and knowing how to test both properly — is where most engineers run into trouble.
This guide covers the real-world differences between RTU and TCP/IP, when to use each, and how to simulate both protocols for thorough testing before deploying to production hardware. Whether you're commissioning a new PLC system or debugging communication failures on an existing line, this is the reference you need.
Modbus is an open, serial communication protocol originally developed by Modicon (now Schneider Electric) for PLC communication. Its simplicity is its strength: a master device sends requests to slave devices, which respond with data. That's it.
The protocol defines how data is structured and transmitted, but not the physical layer. This is why Modbus comes in several variants:
All variants use the same function codes (read holding registers, write coils, etc.), so the application-level logic stays the same. The difference is in how frames are packaged and transported. A good Modbus simulator lets you test all of these without needing physical devices.
Here's a detailed comparison of the two most widely used Modbus variants:
| Feature | Modbus RTU | Modbus TCP/IP |
|---|---|---|
| Physical Layer | RS-232 / RS-485 serial | Ethernet (RJ45, Wi-Fi) |
| Speed | Up to 115.2 kbps | 100 Mbps – 1 Gbps |
| Data Encoding | Binary (compact) | Binary + MBAP header |
| Error Checking | CRC-16 | TCP checksum |
| Max Devices (per bus) | 32 (RS-485) or 1 (RS-232) | Unlimited (network limit) |
| Cable Distance | 1200m (RS-485) | 100m (Ethernet, extendable) |
| Topology | Bus (multi-drop) | Star (switch-based) |
| Default Port | COM port (serial) | TCP port 502 |
| Addressing | Slave ID (1–247) | IP address + Unit ID |
| Simultaneous Connections | 1 master per bus | Multiple masters |
| Latency | Low (direct serial) | Variable (network dependent) |
| Cost | Low (serial cables) | Higher (switches, NICs) |
| Frame Overhead | Minimal (3–5 bytes) | Higher (MBAP header + TCP) |
Choosing the right protocol isn't about which is "better" — it's about matching the protocol to your environment.
If you're connecting to existing serial devices, use RTU. If you're building a new system, use TCP/IP. Many real-world installations use both — a Modbus TCP/IP backbone with RTU-to-TCP gateways for legacy field devices. Testing both protocols before deployment is critical.
ModbusSimulator supports RTU, TCP/IP, ASCII, and UDP — master and slave in one app.
Download Free TrialModbusSimulator lets you run master and slave instances for RTU and TCP/IP simultaneously. Here's how to set up a complete test environment on a single machine — no hardware required.
Open ModbusSimulator and switch to Slave Mode. Configure:
127.0.0.1 (localhost for local testing) or 0.0.0.0 (accept all connections)502 (default Modbus TCP port)1Set up some initial register values — for example, holding registers 40001–40010 with sample temperature readings. Click Start.
Open a second ModbusSimulator instance or use Master Mode. Configure:
127.0.0.15021Set up a read request: Function Code 03 (Read Holding Registers), Start Address: 0, Quantity: 10. Click Connect and start polling.
The master should display the register values from your slave. Check the Request Log panel to see the raw Modbus frames — MBAP header, function code, data bytes, and response times.
For RTU testing without physical RS-485 hardware, install a virtual COM port driver (e.g., com0com or Virtual Serial Port Driver). Create a virtual pair: COM3 ↔ COM4.
In ModbusSimulator Slave Mode:
COM39600 (must match master)8, Parity: None, Stop Bits: 11In Master Mode, use the other end of the virtual pair:
COM4Start polling. The request log will show RTU frames with CRC bytes instead of MBAP headers.
For a deeper dive into setting up RTU simulations, see our dedicated RTU guide. And for TCP-specific configuration including port forwarding, check the TCP simulator tutorial.
Once your master and slave are communicating, here are the most useful test scenarios for protocol validation:
The most basic test. Write a value to a holding register on the slave, then read it back from the master. Verify the value matches. This confirms end-to-end data integrity.
Master → Write Single Register (FC 06): Address 0, Value 1234 Master → Read Holding Registers (FC 03): Address 0, Quantity 1 Expected Response: Register 0 = 1234
Test discrete output control by writing to coils (function codes 05 and 15). This simulates turning relays, valves, or motors on and off.
Master → Write Single Coil (FC 05): Address 0, Value ON (0xFF00) Master → Read Coils (FC 01): Address 0, Quantity 1 Expected Response: Coil 0 = ON
Stress-test by reading the maximum 125 registers in a single request (Modbus protocol limit). This verifies your slave handles large responses correctly and reveals any buffer issues.
Intentionally send invalid requests to verify your slave returns correct exception codes:
Run multiple slave instances with different Slave IDs (1, 2, 3...) on the same port. Configure the master to poll each one. This simulates a real-world bus with multiple field devices — temperature sensors, pressure transmitters, flow meters.
Run an RTU slave on one instance and a TCP master on another, with a gateway (hardware or software) in between. This validates your RTU-to-TCP conversion before deploying the physical gateway.
ModbusSimulator includes master + slave modes with full request logging. No hardware needed.
Download Free TrialWhen Modbus communication fails, the symptoms are usually one of these. Here's how to diagnose and fix each one.
telnet 192.168.1.10 502 to test connectivity. Check Windows Firewall rules.For a comprehensive troubleshooting reference, see our Modbus troubleshooting guide.
The most common source of bugs: Modbus documentation uses 1-based numbering (40001), but the protocol uses 0-based addressing. When a manual says "Holding Register 40001," the actual Modbus address in the request frame is 0. ModbusSimulator's request log shows you the raw addresses so you can verify what's actually being sent on the wire.
Modbus RTU uses serial communication (RS-232/RS-485) with binary encoding and CRC error checking, while Modbus TCP/IP runs over Ethernet networks using standard TCP connections on port 502. RTU is common in legacy field devices and long-distance installations; TCP/IP is the standard for modern networked SCADA, HMI, and IoT systems. The function codes and data model are identical — only the transport layer differs.
Yes. ModbusSimulator supports Modbus RTU, TCP/IP, ASCII, and UDP in a single application. You can run master and slave instances simultaneously for both protocols without needing separate software. The 30-day free trial includes all features with no restrictions.
Use Modbus TCP/IP for new installations with Ethernet infrastructure. It's faster (100 Mbps+ vs 115.2 kbps), supports multiple simultaneous masters, and integrates with standard IT networking. Use Modbus RTU only when connecting to legacy serial devices, on long-distance RS-485 cable runs (up to 1200m), or in environments where Ethernet isn't available.
Check these five things in order: 1) Slave ID matches between master and slave configuration, 2) Correct COM port and baud rate for RTU, or correct IP address and port 502 for TCP, 3) Cable connections and termination resistors for RS-485, 4) Firewall not blocking port 502 for TCP connections, 5) Use a simulator's request log to inspect raw frames and identify where communication breaks down.
Yes, significantly. Modbus TCP/IP over Ethernet operates at 100 Mbps or 1 Gbps, while RTU over RS-485 is typically limited to 115.2 kbps. TCP also supports multiple simultaneous connections from different masters, whereas RTU allows only one master on a serial bus. For applications requiring fast polling of many registers across many devices, TCP/IP is the clear choice.
Download ModbusSimulator and test RTU, TCP/IP, ASCII, and UDP — all in one app. Master + Slave included. Free 30-day trial.
Download Free TrialIf you're building a website for your industrial software product, IndexFlow can help get your technical documentation and product pages indexed on Google faster — useful when you're publishing protocol guides, API docs, or release notes regularly.
Need a mobile app for your industrial monitoring dashboard? WebsiteToApp converts any web-based HMI or SCADA dashboard to a native Android app in minutes — great for field technicians who need mobile access.
Running an automation business in India? Register your MSME with Udyam to access government subsidies and priority lending for manufacturing enterprises.
More guides: All blog posts · ModbusSimulator Home