IMDTouchKnowledge BaseShop main store

Troubleshooting

HMI Modbus timeout caused by a PLC master-slave conflict

Industrial networks Published 9 min read

Short answer

When an HMI times out on every PLC on its RS-485 network, including units wired directly to it, suspect a master-slave conflict: one PLC port is configured as a Modbus master and transmits against the panel. Make the HMI the only polling master, set every polled PLC port to slave mode with a unique station address, then retest.

On this page
  1. Why does my HMI time out on every PLC, even the ones wired directly to it?
  2. How does a second Modbus master block the entire RS-485 bus?
  3. Which device should be the master, and which PLC ports should be slaves?
  4. Does station address 1 make a PLC the master?
  5. Which serial settings must match at every point on the network?
  6. How much bus time does polling eight PLCs actually need?
  7. Why didn't changing the timeout, RTS timing or 2-/4-wire wiring help?
  8. What order should I fix and test the network in?
  9. What if only the radio-linked PLCs still time out after the role fix?
  10. Questions asked

When an HMI reports a timeout on every PLC on its RS-485 Modbus network — including the units wired directly to the panel — the fault is usually not the timeout value, the RTS timing or the 2-wire/4-wire wiring. It is a master-slave conflict: one PLC serial port has been configured to act as a Modbus master and transmits against the panel for control of the bus. The MODBUS over Serial Line specification permits exactly one master per bus. Make the panel the only polling master, set every polled PLC port to respond as a slave, give each PLC a unique station address, and keep the serial format identical everywhere. The sections below give the roles, the address rules, the settings, the bus-time arithmetic and the test order.

Why does my HMI time out on every PLC, even the ones wired directly to it? #

A second Modbus master is the most likely cause: one PLC port configured to start its own requests fights your panel for control of the RS-485 wire, so every polled device times out, and that port-role check comes before any timeout, RTS or wiring change.

A timeout on the whole bus is a system-level symptom. The common element across every failed poll is the bus itself or whoever owns it, and the single configuration error that produces exactly this pattern is contention from a second transmitting device. A PLC port set to generate Modbus traffic of its own transmits while the panel is polling, the two drivers fight on the shared pair, and the panel hears no valid reply from any address — including the PLCs that sit three feet of cable away.

The counter-pattern matters too. If only one device times out while the rest answer, the fault is local to that device or its drop, and the checks in Fixing HMI PLC Communication Timeout Over Serial are the right starting point. Whole-bus timeouts call for the role check first.

How does a second Modbus master block the entire RS-485 bus? #

The MODBUS over Serial Line specification defines the bus as one master and up to 247 slaves, with station addresses 1 through 247, and it allows no second device to initiate requests, so two transmitting devices collide and corrupt every exchange.

RS-485 is a shared pair with no arbitration built in. The master initiates every transaction and only the addressed slave answers; nothing in the physical layer prevents a second device from driving the pair at the same moment. When that happens, the electrical result is a corrupted frame for everyone listening, the CRC checks fail, and the panel logs the exchange as a timeout.

A port in master mode does not sit idle between its own polls either. It generates requests whenever its logic tells it to — often while the panel is mid-transaction with a different PLC — so the collisions land on exchanges that have nothing to do with the misbehaving port, and every device on the bus looks guilty.

Which device should be the master, and which PLC ports should be slaves? #

The panel is the master and every PLC port it polls is a slave: the HMI owns all requests, each PLC port answers only when its address is called, and that role is set in the PLC serial port's operating-mode configuration, not in the address field.

The panel holds the polling logic: it builds each request, targets one station address and waits one timeout for the reply. Each polled PLC port holds the opposite job — listen, recognize its own address, respond, go back to listening. That division is the whole design of a Modbus RTU network.

Set the role where the port's operating mode lives. In the PLC's communication or system-parameter configuration, find the setting that selects what the serial port does; the choices on this kind of port include running the protocol as a responding slave or generating master traffic, and you pick the responding role. On the panel side, confirm two things for each PLC: the driver selected for the controller family and the station address each poll targets. A driver mismatch produces the same timeout symptom from a different cause, so check it while you are in the setup.

Does station address 1 make a PLC the master? #

No: address 1 identifies a station, it does not grant master rights, and a PLC at address 1 answers requests normally once its port is set to slave mode.

A station address is a name tag, not a rank. Any address from 1 through 247 behaves as a slave when the port behind it is configured to respond, and as a transmitter when the port is configured to initiate — the mode setting decides, nothing else.

Two mistakes hide here. First, assigning a low address to a port whose mode is master, on the assumption that the low address belongs to the controller in charge; that port then fights the panel. Second, duplicating an address across two PLCs on the shared segment: both answer one request, the overlapping transmissions corrupt the frame, and neither reply is usable. Give every PLC a distinct address in the 1-247 range, poll exactly those addresses, and leave address 0 alone — it is not a usable station address.

Which serial settings must match at every point on the network? #

Every device that regenerates serial data must run the same format, and the network in question ran 9600 baud, no parity and one stop bit, so set those three values identically in the panel, each polled PLC port and any radio between them.

A baud, parity or stop-bit mismatch kills responses even when roles and addresses are perfect, because the receiver cannot frame the characters. Whatever format your devices use, apply it at the panel port, at every polled PLC port and at anything that regenerates or translates the signal between them.

Treat a radio link as a device with its own serial configuration, not as a piece of wire. Check the radio's port settings and its diagnostics rather than assuming it passes traffic transparently; some units buffer, translate or drop frames silently when their own port does not match the bus.

How much bus time does polling eight PLCs actually need? #

Very little: at 9600 baud a full read of ten registers from one slave costs about 42 milliseconds, so polling eight slaves once each takes roughly 0.33 seconds and the panel can update every PLC about three times per second.

Worked example — an illustrative transaction, not a measured result. Read 10 holding registers from one slave at 9600 baud, no parity, one stop bit. That format sends 10 bits per byte (1 start + 8 data + 1 stop), so the line carries 9600 ÷ 10 = 960 bytes per second.

  • Request frame: 1 address + 1 function + 2 start address + 2 quantity + 2 CRC = 8 bytes
  • Response frame: 1 address + 1 function + 1 byte count + 20 data bytes + 2 CRC = 25 bytes
  • Line time: 33 bytes × 10 bits ÷ 9600 bps = 34.4 ms
  • Modbus RTU frames are separated by at least 3.5 character times of silence; one character is 10 ÷ 9600 s = 1.04 ms, so the two gaps around a transaction add 2 × 3.65 = 7.3 ms
  • One transaction: 34.4 + 7.3 = 41.7 ms
  • Eight slaves polled once each: 8 × 41.7 = 333.6 ms per complete pass, about three passes per second

Eight PLCs at 9600 baud leave enormous headroom for operator-level updates. If that bus still times out on every device, load is not the explanation — contention or wiring is.

Why didn't changing the timeout, RTS timing or 2-/4-wire wiring help? #

They cannot work: a longer timeout only makes the panel wait longer, RTS controls transmit direction rather than arbitration, and the 2-wire versus 4-wire choice changes wiring, not device roles, so none of the three stops a second master from transmitting.

Each setting governs a different layer:

  • Timeout — how long the panel waits before declaring a miss. Raising it adds dead time (one silent slave with a 5-second timeout stretches every cycle by 5 seconds) but never quiets another transmitter.
  • RTS on/off delays — direction control for interfaces that switch the transmitter explicitly. They affect when a device talks, not who is allowed to.
  • 2-wire versus 4-wire — the wiring arrangement of the RS-485 pair. Keep whichever arrangement you choose consistent across the panel port, the PLC ports and the radios, and take terminal assignments from the documentation of the installed equipment rather than a generic pinout.

Revisit these only after roles, addresses and the serial format check out and a controlled test still shows faults. Change one at a time and record what works.

What order should I fix and test the network in? #

Correct roles first, then test in order of wiring simplicity: fix the PLC port to slave, confirm the panel as the only master, assign unique addresses, keep 9600 baud, no parity and one stop bit, poll one directly connected PLC, then add the rest, then the radio links.

Back up the panel and PLC projects before you edit a port — changing a serial port's role on a running machine can drop operator control in the middle of a cycle, and the backup is what lets you put it back.

  1. Record the current port configuration of every device on the segment before changing anything.
  2. Find the PLC port set to initiate Modbus traffic and change its operating mode to the responding slave role the panel needs.
  3. Confirm the panel stays the only polling master, with the correct driver and target address for each PLC.
  4. Give each PLC a distinct station address in the 1-247 range and poll exactly those addresses.
  5. Match the serial format — here 9600 baud, no parity, one stop bit — at the panel, every PLC port and every radio.
  6. Poll one directly connected PLC and confirm the timeout indication clears and data reads correctly, repeatedly.
  7. Add the other directly connected PLCs one at a time, then the radio-linked ones, testing after each addition.
  8. Only if a directly connected PLC still misses after steps 2-5, meter the physical layer and then evaluate RTS and timeout against the equipment documentation.

The decision at this stage: if a direct device still fails after roles, addresses and format are verified, the fault is below the protocol — wiring, termination and bias come before any timing value.

What if only the radio-linked PLCs still time out after the role fix? #

The fault boundary is downstream of the working direct segment: meter the RS-485 wiring at the radio, confirm the radio's serial settings match the bus format, and use its own diagnostics to prove it passes traffic instead of assuming the link is transparent.

You have already proven the panel configuration: roles, addresses and format all work where the wire is short. Move the investigation to the radio path. Verify the radio's port settings against the bus format, confirm request and response traffic crosses in both directions using the radio's own diagnostics, and check termination and bias at the segment ends per the installed equipment's documentation — a long radio-backed RS-485 run with missing bias produces intermittent failures that look exactly like slow slaves. For the point-by-point checks at that layer, Fixing HMI Modbus Device No Response Over RS-485 walks the RS-485 diagnosis in detail.

Isolating a misconfigured or unproven PLC from the shared segment is a legitimate temporary restore that keeps the rest of the network polling, but it is not the repair: correct the port role, document it, return the PLC to the network and verify it under the full polling sequence. A bus that only works with a device unplugged has not passed its test.

Questions asked

Can two Modbus masters ever share the same RS-485 bus?

Not by the serial specification: it defines one master per bus, and two transmitting devices corrupt each other's frames. If two clients must reach the same slaves, put a gateway device between them so each client gets its own port and the gateway relays requests one at a time. The slaves stay slaves on the shared side.

What timeout value should I set after fixing the roles?

Start from the transaction time, not from a round number. At 9600 baud, one read of ten registers costs about 42 milliseconds including frame gaps, so a 500 millisecond timeout already allows roughly twelve transaction times. If a slave still misses at that setting it is not answering at all: go back to roles, addresses and wiring instead of raising the timeout.

What does station address 0 do on a Modbus RTU bus?

Address 0 is broadcast, not a station: every slave accepts a write sent to it and no slave replies, so a master must never wait for an answer on address 0. The specification also reserves addresses 248 through 255, which leaves 1 through 247 for real stations.

Does a duplicate station address always show up as a timeout?

No. When two slaves share one address, both transmit in reply to the same request, the overlapping drivers corrupt the frame, and the CRC check fails at the panel. That can appear as a garbled-reply error, an intermittent fault on one register read, or a timeout, and it usually worsens as more devices are added to the segment.

What if one PLC genuinely needs to act as a Modbus master for another device?

Move that master function to a different port. One RS-485 segment carries exactly one master, so a PLC that must initiate requests to, say, a drive should run that link on its own serial port or through a gateway, and keep the port the HMI polls configured strictly as a slave.

Keep reading

  • Troubleshooting

    Fixing HMI Modbus Device No Response Over RS-485

    Device no Response means the slave never returned a valid frame to that request. When a PC polling tool reads the same scanner, the bus is probably carrying two masters: run one master at a time, then copy the known-good read's serial settings, station address, and register offset into the HMI.

    HMI and touchscreens

  • Troubleshooting

    Choosing the RS-485 protocol for one HMI and multiple PLCs

    Count the conductors before you open the HMI driver. On a 2-wire RS-485 DL-06 Port 2, Modbus RTU is the only protocol the port runs; rewire as 4-wire and K-sequence, DirectNET and Modbus RTU all open up, Modbus RTU fastest of the three. Give every PLC a unique station address, match baud and framing at both ends, and bring PLCs onto the bus one at a time.

    Industrial networks

  • Troubleshooting

    Why a Modbus RTU Master Write Never Reaches an HMI Holding Register

    Check four layers in order: bond both devices to the supply's minus terminal as the common DC reference, not the chassis-connected GND terminal; match master and slave roles plus 9600 8E1 framing; sniff the bus to confirm the full frame arrives with a valid CRC, because an early driver-enable release corrupts the last byte; and enter register 40001 as address 0x0000 on the wire.

    Industrial networks