Technical Guides

Modbus RTU Troubleshooting: RS-485 Wiring, Termination, Biasing, Addressing and Timeouts

Modbus RTU Troubleshooting

Modbus RTU over RS-485 is still the most common serial link between PLCs, RTUs, SCADA systems and field devices such as energy meters, variable speed drives, flow computers, gas analysers and package controllers. It is simple and robust, but when it fails the symptoms are often vague: a master shows timeouts, some devices answer and others do not, values look wrong, or the link works on the bench and fails on site. Effective Modbus RTU troubleshooting means separating physical layer faults from configuration faults and data mapping faults, and checking them in a logical order. This guide explains how.

How Modbus RTU Works on RS-485

Modbus RTU is a master and slave (client and server) protocol. One master sends a request containing a slave address, a function code, a starting register and a quantity, followed by a CRC checksum. The addressed slave replies with data or an exception code. Only one device transmits at a time on the shared two-wire RS-485 bus, and each frame is separated by a silent interval of at least 3.5 character times. Up to 247 slave addresses are allowed by the protocol, while the electrical limit is normally 32 unit loads per segment without repeaters, more with fractional load transceivers. For a comparison with other fieldbuses and Ethernet protocols, see our industrial communication protocols guide.

Common Symptoms and Likely Causes

SymptomMost likely causes
No response from any deviceWrong COM port or settings, A and B swapped, no common reference, master not in RTU mode
No response from one deviceWrong slave address, wrong baud rate or parity on that device, broken drop cable
Intermittent timeoutsMissing or wrong termination, no biasing, noise, timeout set too short, long stubs
CRC errors in diagnosticsReflections, noise, ground potential differences, baud rate mismatch
Exception code 02 (illegal data address)Register offset error, register does not exist on that model
Exception code 01 (illegal function)Function code not supported, for example writing to input registers
Values wrong or scaledByte or word order swap, wrong data type, missing scaling factor
Works on the bench, fails on siteCable length, shielding, grounding, interference from drives and power cables

Step 1: Check RS-485 Wiring and Polarity

Most Modbus RTU troubleshooting starts at the cable. RS-485 uses a balanced pair, normally labelled A and B, or D0 and D1, or minus and plus. The difficulty is that manufacturers do not label them consistently: some use A for the inverting line and others for the non-inverting line. If no device answers at all, swapping the two data wires at the master is a quick and harmless test. Also check:

  • The bus is a daisy chain from device to device, not a star. Stubs should be kept as short as possible, ideally under a metre.
  • A twisted pair cable with characteristic impedance around 120 ohm is used, with an overall shield. Ordinary multicore control cable is a frequent cause of errors at higher baud rates.
  • A third conductor connects the signal common (0 V or GND) of all devices. RS-485 is not truly two-wire; without a common reference, ground potential differences can exceed the transceiver common mode range.
  • Screw terminals are tight and ferrules are used. Loose strands touching the shield or adjacent terminals cause intermittent faults that are hard to find.

Step 2: Termination and Biasing

A 120 ohm termination resistor belongs at each physical end of the bus, and only at the ends. Missing termination causes reflections on long or fast links; too many terminators, for example when every device has its termination switch turned on, load the line so heavily that signal levels collapse. Biasing (fail-safe) resistors pull the lines to a defined idle state when no device is transmitting, so receivers do not see noise as random characters. Biasing should be applied at one point only, usually at the master or a gateway. Many converters and gateways provide switchable termination and biasing, and checking these DIP switches is a basic Modbus RTU troubleshooting step.

CheckExpected result
Resistance between A and B, power off, terminators fittedAbout 60 ohm (two 120 ohm resistors in parallel)
Resistance reads about 120 ohmOnly one terminator fitted, or one end disconnected
Resistance reads 40 ohm or lessThree or more terminators fitted on the bus
Idle voltage between B and A with biasingTypically more than 200 mV with the correct polarity
Idle voltage near 0 VNo biasing present; receivers may see random data

Step 3: Serial Settings Must Match Exactly

Every device on a segment must use the same baud rate, data bits, parity and stop bits. The Modbus specification calls for 8 data bits, even parity and 1 stop bit as default, or no parity with 2 stop bits, but many devices are shipped as 9600, 8, N, 1. A single device with a different setting will not answer and may corrupt traffic for others. Also confirm that the master is set to RTU mode and not ASCII mode, and that a USB converter is not set to RS-232 or RS-422. If the master is a PC, a USB to serial converter with clear indication LEDs and isolation makes testing much easier.

Step 4: Slave Addresses and Duplicate IDs

Each slave needs a unique address between 1 and 247. Address 0 is broadcast and is never answered. Duplicate addresses are a classic cause of strange behaviour: both devices reply at once, the frames collide and the master reports CRC errors or timeouts only for that address. When a new device is added to an existing loop, check its address before connecting it to the live bus. A practical method is to connect devices one at a time and scan the bus with a test tool.

Step 5: Register Addressing and Data Types

Once a device answers, data mapping problems are next. Manufacturers document registers in different ways. Some list protocol addresses starting at 0, others list register numbers starting at 1, and others use the 4xxxx convention where 40001 means holding register offset 0. An off-by-one error returns the neighbouring register or exception code 02. This part of Modbus RTU troubleshooting is about reading the device manual carefully.

Register typeFunction codesTypical convention
Coils (read/write bits)01 read, 05 write single, 15 write multiple0xxxx
Discrete inputs (read-only bits)02 read1xxxx
Input registers (read-only words)04 read3xxxx
Holding registers (read/write words)03 read, 06 write single, 16 write multiple4xxxx

Values longer than 16 bits, such as 32-bit integers and floating point numbers, occupy two registers. The order of the words, and sometimes of the bytes, differs between manufacturers. If a value reads as an enormous or meaningless number, try swapping the word order in the master. Also check whether the device applies a scaling factor, for example a register holding voltage multiplied by 10.

Step 6: Timeouts, Polling Rate and Response Delays

A master timeout set too short causes intermittent errors even when wiring is perfect. Some devices take tens or hundreds of milliseconds to reply, especially when reading large blocks or when their processor is busy. Increase the response timeout, add an inter-request delay, and reduce the number of registers per request if a device is slow. At low baud rates, the time to transmit a long frame also matters: at 9600 baud each character takes about 1.15 ms, so a 125 register response takes almost 300 ms. Polling many devices at a high rate on a slow bus can overload it, so group registers into blocks and poll less critical values less often.

Step 7: Noise, Grounding and Shielding

On industrial sites, RS-485 cables often run near variable speed drive motor cables and power feeders. Keep them in separate trays where possible and cross power cables at right angles. Ground the cable shield at one end, normally the master end, unless the site standard calls for both ends with equipotential bonding. Where devices are in different buildings or on different power systems, use isolated RS-485 interfaces or isolated repeaters to break ground loops. Surge protection is advisable for cables that leave a building or run outdoors, which is common on Oman well sites and pumping stations.

A Practical Modbus RTU Troubleshooting Sequence

  • Confirm the master configuration: port, RTU mode, baud rate, parity, stop bits, timeout.
  • Disconnect the bus and test the master with one known device on a short cable.
  • Check the device address and serial settings on its local display or configuration software.
  • Swap A and B if there is no response, then check the common reference connection.
  • Measure the resistance between A and B with power off to verify termination.
  • Check that biasing is applied once, then reconnect devices one at a time.
  • Read a single, documented register first, then expand to full polling lists.
  • Use the diagnostic counters or LEDs in the gateway or converter to watch for CRC errors.
  • Increase timeouts and inter-frame delays if errors occur only under load.

Modbus RTU Troubleshooting With Gateways and Serial Servers

Modbus gateways convert Modbus RTU to Modbus TCP so that SCADA and DCS systems on Ethernet can reach serial devices. When a gateway is in the path, check its serial port settings, its slave ID mapping and the unit identifier sent by the TCP client. Many TCP clients send unit ID 1 or 255 by default, which will not reach a serial slave at another address unless the gateway routing is configured. Gateway timeouts must also be longer than the slowest device response. Most industrial gateways include traffic monitoring tools, which show requests and responses in real time and make it easy to see whether the problem is on the serial side or the Ethernet side. For the wider architecture decision between PLCs, DCS and SCADA, see DCS vs PLC vs SCADA.

Tools That Help

  • A laptop with Modbus master test software and an isolated USB to RS-485 converter.
  • A multimeter for resistance and idle voltage checks.
  • A portable oscilloscope for checking signal shape, reflections and noise on long cables.
  • The device manuals with the register map and communication parameter menu.
  • Gateway web pages or utilities with traffic logs and diagnostic counters.

When legacy controllers or discontinued serial cards are involved, our guide to sourcing obsolete automation parts explains how to keep older systems running safely.

Modbus Gateways, Converters and Serial Servers in Our Catalogue

These communication products are commonly used to connect, isolate and test Modbus RTU networks:

ProductTypeTypical use
Moxa MGate MB31801-port Modbus gatewayRTU to TCP conversion for a single serial bus
Moxa MGate MB31701-port advanced Modbus gatewayGateway with master and slave serial modes
Moxa MGate MB32802-port Modbus TCP gatewayTwo separate RS-485 networks
Moxa MGate MB34804-port Modbus TCP gatewaySeveral serial segments in one panel
Moxa MGate 5103Modbus/EtherNet/IP to PROFINET gatewayBringing Modbus devices into PROFINET PLCs
Moxa MGate 5114Modbus to IEC 60870-5-104 gatewayPower and utility SCADA integration
Moxa NPort 5430IIsolated 4-port RS-422/485 device serverSerial devices over Ethernet with isolation
Moxa NPort 5250A2-port serial device serverRemote access to RS-232/422/485 ports
Moxa NPort IA5250AIndustrial 2-port device serverDIN rail serial to Ethernet in panels
Advantech ADAM-45711-port serial device serverSingle RS-232/422/485 device on Ethernet
Moxa UPort 1250-G2USB to serial converterLaptop testing and commissioning
Banner DXM700Wireless IIoT controllerModbus data collection from remote equipment

Browse more in our industrial communications category. To get a quotation, send the model numbers, number of serial ports, protocols and quantities through our quote request form or to [email protected].

Sourcing Industrial Communication Products in Oman Through Seven Star LLC

Seven Star LLC is an independent supplier in Oman of Modbus gateways, serial device servers, converters, industrial Ethernet switches and protocol adapters for automation, SCADA and utility projects. We quote products from manufacturers such as Moxa, Advantech, Siemens, Allen-Bradley, Hirschmann, Cisco and Banner Engineering. Model codes, port configurations and lead time are confirmed against the manufacturer data at quotation.

Frequently asked questions

Why does my Modbus RTU master show timeouts?

Common causes are swapped A and B wires, wrong slave address, mismatched baud rate or parity, missing termination or biasing, and a response timeout set too short for the device. Check settings first, then wiring, then timing.

Where should RS-485 termination resistors be fitted?

A 120 ohm resistor should be fitted at each of the two physical ends of the bus only. With power off, the resistance between A and B should then read about 60 ohm.

What does Modbus exception code 02 mean?

Exception 02 is illegal data address. The requested register does not exist in that device, usually because of an off-by-one offset or a register map for a different model or firmware version.

Why do 32-bit values read incorrectly?

Values over 16 bits use two registers, and manufacturers differ in word and byte order. Swap the word order in the master configuration and confirm the data type and any scaling factor.

Can I mix devices with different baud rates on one Modbus RTU bus?

No. All devices on one RS-485 segment must use the same baud rate, parity, data bits and stop bits. Devices with fixed different settings need a separate port or gateway.

Who supplies Modbus gateways and serial converters in Oman?

Seven Star LLC is an independent supplier in Oman that quotes Modbus gateways, serial device servers, converters and industrial switches from leading manufacturers. Send your requirements through the quote request form or to [email protected].

Was this guide helpful?One click helps us write better guides for engineers.