Modbus Lesson 1: Modbus RTU vs Modbus TCP Industrial Comparison

📊 Core Technical Specifications Compared

Specification Parameter Modbus RTU (Serial) Modbus TCP (Ethernet)
Physical Layer RS-485 / RS-232 / RS-422 IEEE 802.3 (Ethernet)
Data Encoding Binary / Hexadecimal Binary / Hexadecimal
Error Checking 16-Bit CRC (Cyclic Redundancy) 32-Bit TCP Checksum
Network Architecture Client / Server (Master/Slave) Client / Server (Master/Slave)
Maximum Node Limit 247 Transceivers per segment Theoretically unlimited (subnet bound)
Max Cable Length 1200 meters (RS-485 at 9600 bps) 100 meters per standard copper drop

🛠️ Packet Frame Structure Breakdown

The fundamental commands (Function Codes) remain identical between both protocols. However, the external packaging layer wraps data differently depending on the transport medium.

Modbus RTU Frame

Modbus RTU uses raw binary framing over serial connections. Timing is critical; frames are separated by silent intervals of at least 3.5 character times.

[ 1 Byte: Server ID ] ➔ [ 1 Byte: Function Code ] ➔ [ N Bytes: Data payload ] ➔ [ 2 Bytes: CRC Checksum ]

Modbus TCP Frame

Modbus TCP eliminates the Serial Address byte and the trailing CRC checksum. It wraps the core Application Data Unit (ADU) in a dedicated 7-byte MBAP (Modbus Application Protocol) Header instead. It runs reliably over port 502.

[ 2 Bytes: Transaction ID ] ➔ [ 2 Bytes: Protocol ID ] ➔ [ 2 Bytes: Length ] ➔ [ 1 Byte: Unit ID ] ➔ [ Function Code + Data ]

Note: The Unit ID replaces the Server ID and acts as a routing bridge when an Ethernet gateway connects to a downstream serial RS-485 loop.

🔌 Hardware Wiring & Environmental Topologies

Modbus RTU: The Cost-Effective Multi-Drop Loop

Modbus RTU typically functions over shielded twisted-pair RS-485 cabling.

  • Topologies: Strict daisy-chain wiring is mandatory. Star configurations cause signal reflections and data corruption.
  • Termination: Balanced 120-ohm resistors must terminate both ends of the longest physical cable run.
  • Pros: Inexpensive deployment over kilometers; ideal for isolated legacy sensors, energy meters, and remote VFD drives.

Modbus TCP: High-Speed Industrial Backbone

Modbus TCP uses industrial-grade Cat5e or Cat6 shielded ethernet cables connected to network switches.

  • Topologies: Flexible star, tree, or ring architectures using standard managed switches.
  • Pros: Lightning-fast data transfer rates (100 Mbps to 1 Gbps), effortless integration with enterprise SCADA systems, and remote internet-facing diagnostics.

💻 Zero-Cost PC Lab Setup: Simulating Modbus

You do not need expensive physical PLCs or gateway equipment to practice mapping modbus registers. You can test code packages using free software tools directly on a standard computer.

Step 1: Download Diagnostic Tools

  1. Get an open-source Modbus Client/Master simulator like Radzio! Modbus Master Simulator.
  2. Get an open-source Modbus Server/Slave target simulator like ModSim32 or diagslave.

Step 2: Configure Local Loopback

Set the server simulator to listen on IP address 127.0.0.1 over Port 502. Set up holding registers starting at address 40001.

Step 3: Trigger Function Codes

Open your Client simulator, configure the target connection path to match your local IP, and query Function Code 03 (Read Holding Registers). You will instantly see the hexadecimal packets streaming across your local connection interface without physical wires.

🔧

LogicHobbyist Automation Lab

Industrial PLCs · Modbus · EtherCAT · Beckhoff · Sensors · HMIs

We publish in‑depth technical comparisons, real‑world configuration guides, and performance reviews. Our content helps engineers and procurement teams select the right automation components. No consulting, no service offers – just reliable technical data.