RS-485 and Modbus/Modbus: the conversation/Reply, exception or timeout
Lesson 12 of 12 · in 3D and VR

Reply, exception or timeout

A Modbus client gets one of three outcomes. A reply and an exception both prove the server heard a good frame. A timeout proves only that no valid reply came, and it has a long list of causes.

Lonely BinaryUpdated 2026-10-075 min readNo board required

View it in VR

Lesson 12 of the RS-485 and Modbus course opens in a VR headset, on a table in front of you, and a voice starts three seconds after you arrive. Type this short address into the browser on a headset such as Meta Quest or Apple Vision Pro, and press Enter VR. No headset? Press Start the lesson: the same lesson, full screen.

learn.lonelybinary.com/vr/rs485-modbus/12

Three outcomes

After a request the client waits. A normal reply echoes the function code and carries the data. An exception reply carries the function code plus 0x80, so 03 comes back as 83, followed by an exception code. Or nothing valid arrives before the response timeout. The first two are answers, and the third is an absence.

The exception is a reply

The codes include 01 illegal function, 02 illegal data address, 03 illegal data value and 04 a failure inside the device. An exception exists only if the server received a valid frame: the right address, a correct check value, and a request it understood well enough to refuse. So it is good news about wiring, baud rate and framing, even though the request failed.

The timeout has many causes

A timeout is no valid reply. A wrong address gives one. So do a baud rate or parity that does not match, no power, a cut cable, a driver released late, and a client timeout shorter than the server needs. A damaged request does too: a frame with a wrong check value is discarded without a reply, so it looks the same as a server that is not there.

Swapped A and B inverts every bit, so no valid frame arrives. It is harmless to the hardware, and swapping back fixes it. Missing ends or bias on a long run produce errors and stray bytes, not by themselves a total silence.

Finding the cause

Because a timeout does not say why, change one thing at a time: the address, then baud rate and parity at both ends, then polarity, then ends and bias, using a request you know is good.

That is the last lesson of the course. The RS-485 book covers the board and its wiring, and RS-485 and Modbus on the ESP32 puts it into code.

Common mistakes

  • Reading a timeout as a dead server. It is the absence of a valid reply. The server may be fine and the request may never have arrived intact.
  • Treating an exception as a link fault. The link worked, or there would be no exception. Read the code: 02 points at an address and 03 at the request.
  • Changing several settings at once. Two changes can hide each other. Change one, test, then the next.

Edit this page — content/fundamentals/rs485-modbus/reply-exception-or-timeout.mdx

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Fundamentals on the forum →