Troubleshooting guide

Why Does My PLC Lose Communication with Modbus Devices?

Modbus RTU and TCP fail in different ways. Covers addressing, serial settings, wiring, termination, network setup and timeouts, with a polling example.

Controls & Instrumentation · Last reviewed

Modbus is a request-and-response protocol: the PLC (the master or client) asks a device a question and waits for the answer. Losing communication means the answer does not arrive, arrives wrong, or arrives too late. Start by identifying whether the link is serial (RTU on RS-485 or RS-232) or Ethernet (TCP), because the failures differ.

Communication wiring is often near live power circuits, and a fault there can affect the process. Changes to a running control system belong with qualified personnel following the site change-control and lockout procedures.

LinkSymptomLikely causeWhat to check
RTUNo response from any deviceWrong baud rate, parity or stop bits, wiring reversed (A/B), or no signal groundSerial settings on both ends, A/B polarity and the shield and ground
RTUOne device does not respond, others doWrong device address, duplicate address, or the device is off or faultedAddress and settings at the device. Disconnect it and test alone
RTUIntermittent errors, CRC faultsNoise, missing end-of-line termination, long stubs or poor cablingTermination at both ends of the bus, twisted pair, routing away from power cables
RTUWorks with a few devices, fails with morePoll time too long for the timeout, or too many devices on one segmentTimeout and retry settings, polling time (see below)
TCPCannot connectWrong IP, subnet or gateway, a blocked port (502), or a cable or switch faultPing, port test, IP settings and firewall rules
TCPConnects, then dropsIP conflict, a device that allows few connections, or a network switch issueConnection count limit at the device. Duplicate IP addresses
BothException responsesIllegal address or function: the register does not existRegister map, function code and the quantity requested

A polling-time example

For a serial link at 9,600 baud with 8 data bits, no parity and 1 stop bit, each character takes 11 bits, or 1.15 ms. A request for 10 holding registers is 8 bytes. The reply is 3 + 20 + 2 = 25 bytes.

Part of one pollTime
Request and reply: 33 bytes × 1.15 ms37.8 ms
Silent gaps: 3.5 character times, twice8.0 ms
Device processing (assumed)10 ms
Total for one device55.8 ms
Twenty devices polled in turn1.12 s

If the PLC timeout is set to 50 ms, many devices will appear to fail even with perfect wiring. If a process needs each value every 500 ms, twenty devices on one 9,600 baud link cannot meet it, and a higher baud rate or a second link is needed.

RTU versus TCP

  • RTU is a shared bus. One bad device, a reversed pair or missing termination can disturb every device on it.
  • TCP uses an IP network. Look at addresses, subnet masks, switches, firewalls and the number of connections a device accepts.
  • A gateway that converts TCP to RTU adds a second set of settings (serial side) to check.

Write a useful problem statement

  • PLC and device models, link type (RTU or TCP), and the cable length and layout.
  • Serial settings (baud, parity, stop bits, address) or network settings (IP, subnet, port) on both ends.
  • Which devices fail, how often, and the error counts or exception codes.
  • Timeout, retries and polling configuration, and what changed before the first failure.

Related tools and labs

Calculators, labs and simulators are part of the All-Access Pass.

More troubleshooting

Questions

Why does termination matter on RS-485?

A long bus reflects signals at its ends. A termination resistor (typically 120 Ω) at both ends absorbs them. Missing or extra termination gives errors that depend on cable length and baud rate.

Can two devices share an address?

No. Two devices with the same address both reply, and the replies collide. Each device on a bus needs its own address.

What does a timeout setting do?

It sets how long the master waits for a reply before it declares an error and retries. Too short gives false failures on slow devices or long chains.

Educational material. Examples use simplified, hypothetical inputs and are not a design, a construction document or professional engineering advice. Confirm requirements with the codes and standards adopted where the work is built and with a licensed engineer.

← All troubleshooting