Troubleshooting
Why a Modbus RTU frame gap before the CRC silences the slave
Short answer
Measure the idle time between the last request byte and the first CRC byte. Above 3.5 character times — 4.01 ms at 9600 baud with 11-bit characters — the slave ends the frame before the CRC, discards it without an exception reply, and treats the two CRC bytes as noise, so the master times out. The fix is a master driver that writes address, function, data and CRC in one continuous burst, not line tuning or a slower poll.
On this page
An RTU slave that stays silent on a line you have already proven is rarely an electrical fault. Capture the master's request and measure the idle time between the last data byte and the first CRC byte. The serial-line framing rule declares a frame ended after 3.5 character times of silence, so a gap above that limit — 4.01 ms at 9600 baud — makes the slave discard an incomplete request without any exception reply, then treat the two CRC bytes as a stray pseudo-frame. You get no answer, and every retry repeats the failure. The fix lives at the master: use a serial driver that assembles address, function code, data and CRC-16 into one buffer and transmits the whole frame as a single continuous burst. Slower polling, fresh termination resistors and longer timeouts do not close a gap that sits inside the frame.
The framing rule the slave applies #
MODBUS over Serial Line Specification and Implementation Guide V1.02 defines RTU frames by silence rather than by length. The bus must sit idle at least 3.5 character times before the first character of a frame and after its last one, and the characters inside a frame must follow one another with less than 1.5 character times between them. When a receiver sees a gap that large inside a frame, it closes the frame where the gap begins. A frame that ends before a complete request, or whose CRC-16 does not verify, is discarded with no response, because the corrupted part could be the address or the function code itself.
An RTU character is the 11-bit serial word — one start bit, eight data bits, one parity bit and one stop bit, or eight data bits and two stop bits when parity is off — so both common port settings share the same timing table. For more on these delays and how they behave on a real line, the inter-frame delay T3.5 timing troubleshooting guide expands on the same limits.
Frame and character times at common baud rates #
One character is 11 bits, so its duration is 11 bits divided by the port speed, and the two silence limits are 1.5 and 3.5 of those characters.
| Port speed | Character time | Gap limit between characters (1.5 char) | Frame-ending limit (3.5 char) |
|---|---|---|---|
| 1200 baud | 9.167 ms | 13.75 ms | 32.08 ms |
| 9600 baud | 1.146 ms | 1.72 ms | 4.01 ms |
| 19200 baud | 0.573 ms | 0.859 ms | 2.005 ms |
| 38400 baud | 0.286 ms | 0.430 ms | 1.003 ms |
| 115200 baud | 0.0955 ms | 0.143 ms | 0.334 ms |
Above 19200 baud the specification recommends fixed values instead of character-time multiples: 750 microseconds between characters and 1.75 ms between frames. The linear figures in the table remain the conservative test, and a driver gap measured in whole milliseconds fails at any port speed.
A worked example at 9600 baud #
Take a plain read of ten holding registers from slave 1; the request on the wire is 01 03 00 00 00 0A C5 CD — six request bytes followed by the two CRC bytes. With the default even-parity port setting, one character takes 11 bits / 9600 bit/s = 1.146 ms, so the frame-ending limit is 3.5 × 1.146 ms = 4.01 ms.
Now a hypothetical capture: the first CRC byte arrives 8.2 ms after the last data byte. That is more than twice the frame-ending limit, so the slave closes the frame at 4.01 ms holding six request bytes and no CRC — an unverifiable frame, discarded with no reply. The byte C5 then opens a new frame whose function-code position holds CD (decimal 205), not a defined function, and after the next 3.5-character silence that pseudo-frame dies too. The slave has evaluated two frames and answered neither; the master logs a timeout and queues a retry that will fail identically.
Why the slave looks dead #
No exception code is generated for a framing or CRC fault, and many slaves log nothing either, so a silent slave and an unpowered one are indistinguishable from the master's chair. That is why the usual reflexes all pass: the wiring checks out, the address is right, the port settings match, and the same slave answers a different master on the same cable. The only test that separates this failure from a hardware fault is the timestamped capture — a timing fault leaves the bytes perfect and their spacing broken.
Measure the gap on your own line #
- Plan the tap for a moment when the link is not controlling a running machine, and never break the A/B loop to insert hardware on a line that does; attach passively across the existing terminals or wait for a planned stop.
- Connect a serial line monitor or a two-channel oscilloscope across the RS-485 A and B lines, and note the port speed and parity configured in the master.
- Trigger the capture on the first byte of the request — the slave address — so the whole frame including the CRC tail lands in one record.
- Read the timestamp of the first CRC byte and subtract the timestamp of the last data byte; that difference is the gap to judge.
- Compare the gap against the frame-ending limit for the configured port speed in the table above.
Then decide from the measurement:
- Gap under 1.5 character times. Framing is conformant, so the silence has another cause; the failure where Modbus RTU sends to slave address 0 instead of your device is the classic next thing to rule out.
- Gap between 1.5 and 3.5 character times. Tolerant slaves may still answer, but the frame violates the serial-line limit and will fail on a strict receiver; treat it as a driver defect and fix it now, before it bites on the next device.
- Gap at or above 3.5 character times. The slave ends the frame before the CRC and can never answer this master; replace or reconfigure the master driver so the frame leaves in one burst. The wiring, port speed and slave are all proven good by the same capture.
Why a master driver splits its own frame #
Three implementation habits create the gap, and none of them shows up in the driver's own status. The CRC-16 is calculated after the payload bytes have already been handed to the operating system, instead of being appended to the same buffer before the write. Payload and CRC then leave through two separate write calls, each scheduled on its own, so on a loaded PC the second call waits out a scheduler tick and the line idles for the whole delay.
Some scan-class designs queue the frame body when the scan class runs and attach the CRC only at transmit time, adding whatever separates those two moments to the gap. Every write in the sequence succeeded, so the master reports a healthy port while the wire carries a frame no conformant slave may answer. Controller-based serial ports rarely behave this way, because the frame is composed in one instruction buffer and handed to the UART as a single block.
What does not fix it #
- A slower poll rate or a longer scan interval: the gap sits inside one frame, so the distance between frames is irrelevant, and each retry sends the same split frame.
- New termination, biasing or cabling: the capture already shows clean edges and correct byte values; only their spacing is wrong.
- A longer master timeout: the slave is never allowed to answer either pseudo-frame, so patience buys more silence.
- Swapping or re-addressing the slave: a conformant receiver applies the same rule to every master, so the next device goes quiet for the same reason.
The fix and the verification #
Specify a master driver or gateway that builds the complete frame — address, function code, data and CRC-16 — in one memory buffer and hands it to the serial port as a single write, with no mode change or scheduler call between payload and CRC. Re-run the same capture afterwards: the first CRC byte should arrive within 1.5 character times of the last data byte, under 1.72 ms at 9600 baud, and a sub-millisecond figure is normal when the frame leaves one buffer.
If the SCADA master you are committed to cannot be made to write contiguous frames, move the serial poll down into a controller that can; the trade-offs are set out in the PLC data concentrator vs SCADA server comparison for RTU polling. The acceptance criterion never changes: one frame, one gap-free burst, one answer.
Questions asked
Can I measure the gap without hardware attached to the line?
Usually not reliably. Software serial monitors log what the operating system hands the driver, and a split write often appears as one buffer, so the log can hide the very gap you are hunting. The timestamps that matter exist only on the wire: use a passive RS-485 tap with a line monitor, or a two-channel scope across A and B. Some RS-485 adapters that timestamp received bytes can also show the gap while listening to the master on a spare port.
The slave answers an older master on the same cable and settings. Does that clear the slave?
It is strong evidence. The same cable, port speed, parity, addressing and the slave's receiver are all proven good by the master that works, and a conformant receiver applies the same 3.5-character rule to every master. The difference must be the frame the failing master puts on the wire. Capture both masters' requests and compare the distance between the last data byte and the first CRC byte; the working master's gap will sit well under the frame-ending limit.
Does the same failure exist on Modbus TCP?
No. Modbus TCP replaces the silent-line delimiters with an MBAP header that carries a length field, so there is no frame-ending character count to trip. The TCP stack reassembles the stream before the application sees it, and a pause mid-message is ordinary TCP behaviour, not a frame boundary. TCP polls can still slow down under latency or retransmission, but the specific RTU failure — the CRC arriving after a frame-ending silence — has no equivalent there.
How much silence is required between two poll cycles?
At least 3.5 character times before the first byte of a request and after the last byte of the reply. Any practical poll interval exceeds that by a wide margin, so normal master turnaround satisfies the inter-frame rule automatically and you never have to engineer for it. The rule that bites is the one inside the frame: the characters of a single request must arrive back to back, with under 1.5 character times between them.