Industry28 October 20269 min read

Modbus RTU vs TCP: How Modbus Works and Which to Use

Modbus RTU vs TCP: RTU runs on a serial line such as RS-485 and ends each frame with a CRC. TCP runs on Ethernet port 502 with a 7-byte header and no CRC.

industrial networksModbusRS-485SCADAinstrumentationPLC
Open control cabinet with a PLC, relay modules, three blue DIN-rail industrial Ethernet switches and rows of numbered terminal blocks

Key takeaways

  • Modbus RTU is serial (usually RS-485) and ends every frame with a 16-bit CRC; Modbus TCP uses Ethernet port 502 with a 7-byte MBAP header and no CRC of its own.
  • Both carry the same function code and data. Only the wrapper differs, so one register map applies to both.
  • Holding registers are read-write and input registers are read-only. The specification addresses registers from zero, so register 1 is address 0.
  • The specification does not say how a 32-bit value is split across two registers. Word order and scaling come from the device manual.
  • For RS-485, the serial guide says terminate both ends only, bias at one point only and tie common to earth at one point.

Modbus RTU vs TCP comes down to the wire. Modbus RTU runs over a serial line, usually RS-485, and ends every frame with a 16-bit CRC. Modbus TCP runs over Ethernet on TCP port 502, puts a 7-byte MBAP header in front of the same request and has no CRC of its own. The register model underneath is identical.

Checked 28 October 2026. Protocol facts come from the Modbus.org documents named below, opened that day: Modbus Application Protocol Specification V1.1b3 (dated 26 April 2012), Modbus over Serial Line V1.02 (dated 20 December 2006) and Modbus Messaging on TCP/IP Implementation Guide V1.0b (dated 24 October 2006). The wiring advice cites a Schneider Electric support page. We quote nothing from memory.

What is Modbus, and why is it still everywhere?

The specification calls Modbus an application layer messaging protocol that provides client/server communication between devices on different types of buses or networks, and a request/reply protocol. It also says it has been the industry's serial de facto standard since 1979. The specification is public, and devices from many makers, such as meters and drives, offer it.

The Modbus.org specifications page lists the documents. The three that matter here are the Application Protocol Specification, the Modbus Serial Line Protocol and Implementation Guide, and the TCP/IP messaging guide. The page also lists an older "Modbus over Serial Line" document marked for legacy applications only and says it should not be used for new implementations, so make sure you read the V1.02 guide.

Every Modbus exchange is a client asking and a server answering. The specification says the client builds the request and the function code tells the server what to do. On a serial line the client is the master and the servers are slaves. Slaves do not speak unless asked.

Modbus RTU: serial, RS-485, frames and the CRC

On a serial line the Serial Line guide says the default transmission mode must be RTU. A frame is: address (1 byte), function code, data, then a 16-bit CRC. The guide says the CRC is appended low byte first, then high byte, and that it is calculated by the sender and recalculated by the receiver. It also says the CRC is applied regardless of any parity checking.

Other serial facts, all from that guide:

  • Slave addresses run from 1 to 247. Address 0 is the broadcast address, and no response is returned to a broadcast.
  • Frames are separated by a silent interval of at least 3.5 character times. A gap of more than 1.5 character times inside a frame makes the frame incomplete. For baud rates above 19200 the guide recommends fixed timer values of 750 microseconds and 1.750 milliseconds.
  • The default parity is even. The guide says that using no parity requires 2 stop bits.
  • 9600 and 19200 bits per second are required, and 19200 is the required default.

The whole serial ADU is limited to 256 bytes, which the Application Protocol Specification says leaves 253 bytes for the function code and data.

Modbus TCP: Ethernet, the MBAP header, ports and connections

The TCP guide describes a dedicated MBAP header in front of the function code and data. It is 7 bytes long:

FieldLengthWhat it does
Transaction identifier2 bytesPairs a response to its request; the server copies it back
Protocol identifier2 bytes0 means Modbus
Length2 bytesCount of the following bytes, including the unit identifier
Unit identifier1 byteIdentifies a remote slave behind a gateway on a serial line or other bus

The guide says all Modbus/TCP data units are sent via TCP to registered port 502, and that fields are big-endian. It explains that the serial slave address is replaced by the unit identifier, and that the length field lets the receiver find message boundaries. It also says that Ethernet's CRC-32 check, with the length rules, gives an "infinitesimal" chance of undetected corruption, which is why the frame carries no CRC of its own. The Application Protocol Specification gives the full TCP ADU as 253 bytes plus the 7-byte header, 260 bytes.

The guide says several transactions can be active on one TCP connection, in which case the transaction identifier must be used to match responses.

RTU vs TCP vs "RTU over TCP": what is the difference?

Modbus RTUModbus TCP
MediumSerial: RS-485 (also RS-232 or RS-422 in the spec)Ethernet, TCP/IP
Who asksOne master on the busAny client that opens a connection to port 502
FrameAddress, function, data, CRCMBAP header (7 bytes), function, data
Who is addressedSlave address 1 to 247IP address, plus unit identifier for gateways
Error check16-bit CRCNone in the frame; relies on TCP and Ethernet
Largest frame256 bytes260 bytes

"RTU over TCP" is the confusing third column. None of the three documents we opened defines it. Some gateways and devices offer a mode with that or a similar name, so read the device manual to find out what the frame carries. A likely sign of a mismatch is a tool that connects without error but gets no valid replies. Check whether the device expects the 7-byte header or a CRC before you blame the network.

How Does Modbus Protocol Work? | Network Essentials I Teltonika

That video is a 3-minute overview from Teltonika Networks, a networking equipment vendor, so device specifics are about its own products. For a deep dive into both variants, ControlByte Automation's 46-minute video follows; we have not checked it line by line against the specification.

Learn the Modbus RTU and Modbus TCP protocol in 1 hour

How do you read a register map?

The Application Protocol Specification describes four primary tables:

TableObjectAccess
Discrete inputsSingle bitRead-only
CoilsSingle bitRead-write
Input registers16-bit wordRead-only
Holding registers16-bit wordRead-write

So an input register is something the device measures, and a holding register is something you can also write, such as a setpoint. Function code 03 reads holding registers and 04 reads input registers; 06 writes a single register and 16 (0x10) writes several. The specification says a read of holding registers can ask for 1 to 125 registers in one go.

Three details cause most of the confusion:

  1. Addresses start at zero in the frame. The specification says that in the PDU, registers numbered 1 to 16 are addressed as 0 to 15. Its worked example reads registers 108 to 110 with starting address hex 006B, which is 107. Manuals and tools differ on whether they show the number or the address, so check which one yours uses before you decide a register is missing.
  2. Bytes are big-endian. The specification says the most significant byte of a 16-bit value is sent first. Its example reads back 02 2B as 555.
  3. The specification stops at 16-bit registers. We searched all three documents and found nothing on how a 32-bit integer or a floating-point number is split across two registers. That is the device maker's choice, so the manual's word order and any scaling factor (for example "value in tenths of a degree") decide what you see. Wrong word order gives numbers that look plausible but wrong.

RS-485 wiring and commissioning checklist

This section describes what the guidance says. Work on panels and live circuits needs a competent person, isolation and permits where your site requires them; HSE's Electricity at work: safe working practices (HSG85) is a place to start, and nothing here replaces training.

The Serial Line guide covers the bus itself:

  • Daisy chain, with termination at both ends. The trunk cable is one run with a line termination near each of its two ends. No more than two terminations on a pair, and none on a derivation (spur) cable. It suggests a 150 ohm resistor, or a 120 ohm resistor with a 1 nF capacitor when biasing is used.
  • Bias at one point only. If one or more devices need the pair biased, the guide says to fit one pair of resistors at one location for the whole bus, usually at the master, with values between 450 and 650 ohms. Other devices must not bias, and the number of devices allowed drops by 4.
  • Common to protective earth at one point. The signal common should connect to protective ground preferably at one point only for the whole bus.
  • Length and spurs. The guide gives 1000 m as the maximum at 9600 baud with AWG26 or wider cable, and says derivations must be short, never more than 20 m.
  • Naming. It names the two signal lines D0 and D1, with a common, and lists D0 as A/A' and D1 as B/B'. It asks makers to use the D0/D1 names in documentation, which suggests that other labels exist. Always follow the device manual for polarity.

A manufacturer's page agrees on the main points. Schneider Electric's support page "Wiring of RS485 Communications Networks" (published 2007, last modified 19 December 2023 when we read it) calls the daisy-chain bus the most efficient layout, lists a star of multiple cables and a backbone with long stubs under improper networks, says unconnected stubs act as an antenna, gives 100 to 120 ohm termination at both ends for 24 AWG twisted pair, and says to connect the shield to chassis ground at one end. Read that page next to your device manual. Note that its resistor range differs from the serial guide's, so use the value in the manual for your device.

Close-up of blue Ethernet patch cables with coloured tape tags plugged into numbered switch ports
Close-up of blue Ethernet patch cables with coloured tape tags plugged into numbered switch portsPhoto: Brett Sayles, Pexels License, via Pexels

A commissioning order that follows from the above:

  1. Match the serial settings (baud rate, parity, stop bits) on every device. The guide says they must be the same for all devices on the line.
  2. Give every slave a unique address from 1 to 247.
  3. Check termination is at the two ends only and biasing in one place.
  4. Read one register from one device, then add the others one at a time.

Common faults and how to find them

The specification tells you what a server does when something is wrong, and that is your best clue:

  • No response at all. If a server receives a request but detects a communication error (parity, LRC, CRC), no response is returned and the client eventually times out. So a silent device can mean wrong baud, parity, address, polarity or a corrupt frame, not a dead device.
  • An exception response. The server sets the top bit of the function code, so a failed read of function 03 comes back as 0x83 followed by an exception code. Code 01 is illegal function, 02 is illegal data address, 03 is illegal data value and 04 is server device failure. The specification's example: on a device with 100 registers, addressed 0 to 99, a request starting at 96 for 4 registers works, and for 5 registers fails with code 02.
  • A reply, but the wrong number. Think scaling, signed against unsigned, word order, or reading the right register at the wrong address by one.
  • Works on the bench, drops on site. Long spurs, stars, missing or doubled terminations, or common not tied to earth at one point, in the order the guidance lists them.

Where does Modbus fit next to Profinet and OPC UA?

Modbus moves register values between devices. The Modbus.org page lists a separate "Modbus Security Protocol" document that combines TLS with Modbus and uses port 802, so the frames described above carry no authentication of their own. Profinet and OPC UA solve different problems. Our comparison of Profinet and EtherNet/IP and our guide to OPC UA for industrial IoT connectivity cover those, and our free Profinet and industrial Ethernet course is a starting point for the Ethernet side.

Start free

EDWartens courses are not regulated qualifications and give certificates of completion. Here is what you can do for free:

Start free

Learn industrial networks and IIoT free, then practise the job

Free job simulation

PLC Programmer

Write the I/O list, program the line, run the FAT and handle a change request.

The first five days are free, no card needed.

Live UK jobs

IIoT and networks jobs in the UK

Updated daily, with licensed visa sponsors marked.

Browse all engineering jobs

Frequently asked questions

What is the difference between Modbus RTU and Modbus TCP?

Modbus RTU runs on a serial line such as RS-485 and its frames end with a 16-bit CRC. Modbus TCP runs on Ethernet to port 502 and puts a 7-byte MBAP header before the function code, with no CRC in the frame. The function codes and register model are the same.

Is Modbus RTU faster than Modbus TCP?

The Modbus.org documents give no speed comparison, so we will not claim one. The serial guide requires 9600 and 19200 bits per second, with 19200 the default; real response time depends on your devices and network.

What is the difference between a holding register and an input register?

Per the Modbus Application Protocol Specification, both are 16-bit words, but input registers are read-only (data an I/O system provides) and holding registers are read-write (data an application program can alter). Function code 03 reads holding registers and 04 reads input registers.

Why does my Modbus register read back the wrong value?

Check the address first: the specification numbers registers from 1 but addresses them from 0, and tools differ on which they show. Then check word order and scaling for 32-bit values, which the specification does not define and the device manual must.

Does Modbus TCP use port 502?

Yes. The Modbus.org TCP/IP implementation guide says all Modbus/TCP data units are sent to registered port 502, and that the messaging service must provide a listening socket on it.

Do I need a termination resistor on a Modbus RS-485 line?

The Modbus serial guide says line terminations are required near both ends of the trunk cable, with no more than two per pair and none on spur cables. It suggests 150 ohms, or 120 ohms with a 1 nF capacitor when biasing is used; check your device manual for the value it wants.

Sources

  1. Modbus Organization: Modbus specifications (page listing the specification documents, opened 28 October 2026)
  2. Schneider Electric: Wiring of RS485 Communications Networks, FA221785 (last modified 19 December 2023)
  3. HSE: Electricity at work, safe working practices (HSG85, third edition 2013, page updated 7 August 2025)

Share this article

About the author

EDWartens Team

EDWartens Instructional Team

The EDWartens instructional team brings together UK-based automation engineers, certified Siemens and Rockwell specialists, and industry practitioners with decades of combined experience in PLC programming, SCADA engineering, and industrial AI.

View all articles by EDWartens

Ready to become job-ready?

Start with a free course today, or train live in Siemens PLC, HMI and SCADA on the Professional Module.