IMDHMIControls LibraryShop main store

Troubleshooting

Why every PLC answers a Modbus RTU poll: the 0x05 byte

Industrial networks Published 5 min read

Short answer

When a Modbus RTU request contains the byte 0x05 anywhere in the frame, including the CRC, a PLC left in automatic protocol-detection mode treats it as the start of its native point-to-point protocol and echoes 0x05, so every PLC on the line transmits. Fixing the serial port to Modbus RTU removes the false replies.

On this page
  1. Which byte in the request makes every PLC transmit?
  2. Why does only a repeatable subset of slave addresses fail?
  3. Why does auto mode make a PLC answer a poll for another slave?
  4. How do you prove it is the PLC and not the radios or wiring?
  5. Is decimal-versus-hexadecimal addressing the problem?
  6. How do you fix the port without losing radio programming?
  7. Questions asked

A multidrop Modbus RTU line where every PLC keys its radio when you poll certain addresses is not suffering from duplicate IDs or group addressing. The byte 0x05 (control-E) sits somewhere in the request, often in the CRC, and each PLC left in automatic protocol-detection mode echoes it as the start of its native point-to-point protocol. Fix the port to Modbus RTU and only the addressed slave answers.

Which byte in the request makes every PLC transmit? #

The byte is 0x05, and in a typical read request it is the first CRC byte, not the slave address. A capture taken at the PC's transmit port showed the frame 0D 03 04 4C 00 0A 05 E6, addressed to slave 13 decimal with function 03.

Position Byte Role
1 0D Slave address (13 decimal)
2 03 Read holding registers
3-4 04 4C Starting register
5-6 00 0A Quantity of registers
7-8 05 E6 CRC, low-order byte first

The Modbus over serial line specification puts the CRC's low-order byte on the wire first, so 0x05 at position seven is the low byte of the CRC. Search the whole frame, address, function, data and CRC, because the protocol detector sees every byte. For more on reading such frames, see why a Modbus RTU read and write on one port drops VFD control.

Why does only a repeatable subset of slave addresses fail? #

Because changing the slave address changes the CRC, so only the addresses whose complete frame contains 0x05 trigger the echo. With function, register and quantity held constant, the failing addresses in the reported test were 1, 2, 4, 5, 7, 8, 11, 13 and 14 in decimal; higher values happened to produce CRCs without that byte. Those numbers are not reserved and not group addresses. A different starting register or quantity moves the list, and a write whose data carries the value 5 puts 0x05 in the frame on purpose.

Why does auto mode make a PLC answer a poll for another slave? #

In automatic mode the PLC has not committed to a protocol, and its native point-to-point protocol uses control-E as a start character that must be echoed. Each PLC on the transparent radio channel receives the same bytes, so each one echoes 0x05 for the native protocol before any Modbus address filtering applies; the simultaneous replies collide and the master sees a failed transaction. Only after a PLC has received one complete valid Modbus RTU frame does it temporarily stay in RTU mode, which is why a retry sometimes works but never reliably on a multidrop line, since every PLC keeps its own detection state. The response captured during the fault was a lone 0x05.

Port state Incoming frame PLC behavior Master sees
Auto, undecided Any frame containing 0x05 Echoes 0x05 Collision, failed transaction
Auto, after one valid RTU frame Modbus RTU Stays in RTU mode for a while Retry may succeed
Fixed Modbus RTU Addressed to another slave Stays silent Only the addressed PLC replies

How do you prove it is the PLC and not the radios or wiring? #

Isolate one PLC and repeat the request in both protocol modes. Leave one affected PLC connected to its radio, disconnect the other PLC serial interfaces, send a valid request to that PLC's own address and then the same body to a different address, and capture both directions in hex; repeat after fixing the port to Modbus RTU.

  • A normal reply to its own address only means address filtering works; reconnect the nodes and look for duplicate configured IDs instead.
  • A lone 0x05 for someone else's address in auto mode is the documented echo; fix the port to Modbus RTU.
  • Corrupt or varying bytes point back at polarity, reference conductors, termination or the radio path; correct those first. The isolation method is the same one used in troubleshooting Modbus RTU echo and CRC receive errors.
  • Silence in both modes to its own address is a different fault: baud rate, framing, wiring or the configured ID. The same discipline applies when a CM1241 RS485 A/B polarity stops Modbus RTU slave replies.

Is decimal-versus-hexadecimal addressing the problem? #

No, once a port capture confirms the intended byte. A Modbus slave address is one byte on the wire, and 0D in a hex capture is 13 decimal whatever the SCADA entry format. One PLC family does enter and display its native host-link IDs in hexadecimal, so a host-link command addressed at ID 25 hex is 37 decimal, and a decimal-entry SCADA must convert; that causes a wrong-device or no-response fault, never an echo from every node. The echo fault follows frame content, not notation.

How do you fix the port without losing radio programming? #

Fix the port to Modbus RTU with the SETPROTOCOL instruction, and let the PLC program switch it back when you need to program over the radio. A working arrangement sets Modbus RTU on the first scan by default, watches for one specific Modbus write code that switches the port to automatic mode for programming access, and times back to Modbus RTU after 5 minutes; a dedicated internal relay can force either direction at any time. The same write-value trap that lets you request programming mode is described in why your VFD ignores Modbus RTU start commands from a PLC.

The decision: on any shared multidrop line, run every slave in fixed Modbus RTU mode; keep automatic mode only for the minutes you are actually programming, and switch back by timer or relay. For a line where a wrong slave address 0 shows up instead, see why Modbus RTU sends to slave address 0 instead of your device.

Questions asked

Why do only some slave addresses trigger the false replies?

Because the byte 0x05 usually sits in the CRC, not in the address byte. Changing the slave address changes the CRC, so only the addresses whose frames happen to contain 0x05 anywhere trigger the echo. With one fixed read request that gave 1, 2, 4, 5, 7, 8, 11, 13 and 14 in decimal; a different register or quantity moves the list.

Will a write whose data contains 0x05 cause the same fault?

Yes, while the port is in automatic mode and has not yet locked onto Modbus RTU. A write value of 5 puts 0x05 in the data field, and any CRC can also equal 0x05, so no address or value is safe by construction. Fixed Modbus RTU mode is the only deterministic cure on a shared line.

How can I keep programming over the radio if the port is fixed to Modbus RTU?

Let the PLC program switch modes. One working arrangement sets Modbus RTU on the first scan, accepts one specific Modbus write code that switches the port to automatic mode for programming, then times back to Modbus RTU after 5 minutes. A dedicated internal relay can force either direction at any time.

Is the radio link the cause?

No, when every radio transmits at the same time for repeatable request contents. A transparent radio channel delivers the same bytes to every PLC, and each PLC in automatic mode makes its own echo decision, so the collisions come from the PLCs. Wire, polarity and noise faults corrupt or drop bytes; they do not make only certain frames echo.

Keep reading

  • How-to

    How a PLC runs two Modbus networks at the same time

    Yes. Each serial port is its own independent link: the HMI polls the PLC on one port while the PLC acts as master, or slave, on a separate RS-485 Modbus RTU network. The two links share no settings — only their endpoints must match — and PLC copy logic moves any data between them.

    Industrial networks

  • Troubleshooting

    Why a CJ2M Modbus RTU master gets no answer from an S7-1200

    Yes, a CJ2M can poll an S7-1200 over Modbus RTU. The simulators proved each PLC's serial settings, not the cable or the port mode between them: set the Omron port to the mode the MRTU_CPU_Master package requires, bring the send pair onto RDA and RDB for 2-wire operation, load the S7-1200 port at even parity, and confirm the frame on the wire with a known value.

    Industrial networks

  • Troubleshooting

    Why Modbus RTU drive polling on one serial port is slow

    Modbus RTU carries one request-response transaction at a time, and at 19.2 kbit/s each drive transaction costs 40-60 ms, so 18 drives polled with a read and a write each need about 1.5-2.5 s per cycle no matter how the messages are chained. Cut the transaction count, schedule command writes ahead of status reads, set each drive's communication-loss timeout above the finished cycle, and change networks when the arithmetic cannot meet the update rate.

    Industrial networks