Modbus RTU master and slaves on an RS485 bus with a 120 Ω termination resistor at each end
On this page

Modbus exception codes are answers: the device received your request without errors and refuses to carry it out, for example because the register does not exist. No answer at all is a time-out, which means the request did not arrive intact or no device on the bus has that address. A CRC error means an answer did come back, but corrupted. Once you know which of the three you have, you know whether to look at the registers, the serial settings or the wiring.

Three kinds of Modbus error and what each one proves

A Modbus request ends in one of three ways: a normal response, an exception response or silence. The Modbus Application Protocol Specification V1.1b3 spells it out in section 7. When a device receives a request with a parity or CRC error, "no response is returned". The master only notices when its own time-out runs out.

A damaged frame therefore never produces an exception code. A time-out in the log tells you nothing about the registers. An exception tells you the address, baud rate, parity and wiring are right, because otherwise the request would not have arrived.

What you seeWhat it provesWhere to lookTime-out, no answerThe request did not arriveintact, or nobody has thataddressSlave address or UnitIDBaud rate, parity, stopbitsA and B, powerCRC or parity errorAn answer arrived, butcorruptedDuplicate slave addressSecond master on thebusTermination and biasException, forexample 0x83 02The device received therequest intact and refusesitRegister address off byoneFC03 or FC040x0A and 0x0B come fromthe gateway
An exception code is good news, because it means wiring and settings are right. A time-out only tells you to keep looking.

Modbus exception codes come back as the function code plus 0x80

An exception response repeats the function code of the request with its highest bit set. The specification describes it as "exactly 80 hexadecimal higher". Read with function code 03 and an error shows up as 0x83 in the log, followed by one byte with the reason. A write with FC06 returns 0x86, a write with FC16 returns 0x90.

The table puts each code from the specification next to what it usually means on site.

CodeName in the specificationWhat it usually is on site
01Illegal FunctionThe device does not support the function code, or it is not configured yet
02Illegal Data AddressThe register does not exist, or start address plus quantity runs past the last register
03Illegal Data ValueThe structure of the request is wrong, for example the length
04Server Device FailureThe device failed while carrying out the request
05AcknowledgeLong programming command; the device sends this to prevent a time-out
06Server Device BusyThe device is busy; send the request again later
08Memory Parity ErrorOnly with function codes 20 and 21 (file records)
0x0AGateway Path UnavailableThe gateway has no route to that device
0x0BGateway Target Device Failed to RespondThe gateway got no answer from the device behind it

Source: Modbus Application Protocol Specification V1.1b3, 26 April 2012, p.48 and 49.

Code 03 is often misread. The specification says it "specifically does NOT mean" that a value written to a register is outside what the application expects. It is about the structure of the request.

Exception 02 usually means the register address is off by one

Exception 02 comes back when the register does not exist or the block runs too far. The specification gives an example. A device with 100 registers (0 to 99) accepts start address 96 with a quantity of 4. It refuses start address 96 with a quantity of 5, because register 100 does not exist. One function code 03 request reads at most 125 registers.

The most common cause is numbering. Datasheets often count holding registers from 40001, while the address on the wire starts at 0. SMA writes in its Modbus technical information that register 40001 is addressed as 40000. Type 40001 literally into the master and you ask for the next register, and at the end of a block for one that does not exist.

40001Datasheet0x0000Address on the wire400010x0000400020x0001400030x0002401000x0063499990x270E401000x0063

Drop the leading 4 and subtract 1.

One hundred registers: 40001 to 40100 in the datasheet, 0x0000 to 0x0063 (0 to 99) on the wire. Ask for five registers from 96 and you get 02.

The second cause is the wrong function code. In the ModbusCloud library, 74% of registers are read with function code 03 (holding registers) and 21% with function code 04 (input registers), as of November 2026. Ask for an input register with FC03 and you get an exception or the wrong register. A 3 in front of the register number in the datasheet (30001) means FC04. The split is covered in Modbus function codes explained.

A time-out on Modbus RTU is traced from address to wire

A time-out on an RS485 bus means no device sent a valid answer before the master stopped waiting. Check the causes in this order, because the first ones take seconds.

  1. Slave address. A device only answers its own address, 1 to 247. Address 0 is broadcast, and the specification says no device ever answers it.
  2. Baud rate, parity and stop bits. One mismatched setting and the device discards the frame. Check the setting on the display of the device itself.
  3. A and B. Manufacturers label the two conductors differently. If everything else is right, swap them.
  4. Power and termination. A termination resistor belongs at each end of the bus, never more than two.
  5. Master time-out. The Modbus over Serial Line specification V1.02 gives "typically from 1s to several second at 9600 bps".

Factory settings often differ from the standard. The specification makes 19200 baud with even parity the default, and requires two stop bits when there is no parity. Eastron's protocol document for the SDM630MA-2L gives a factory setting of 9600 baud, no parity and one stop bit. A master left on the standard values gets nothing but silence from that meter.

If you do not know a device's address or baud rate, scan the Modbus network. The wiring itself is covered in the RS485 wiring guide.

A CRC error means two devices talk at once or the signal is damaged

A CRC error at the master means an answer arrived whose checksum does not match. The device is alive and hears you, but what comes back is damaged. Three causes account for most cases.

The first is a duplicate slave address. Many meters ship on address 1. Put two of them on one bus without changing either, and both answer the same request while their frames overlap. In a control.com thread on an HVAC system, CRC errors were traced to one device answering requests meant for another address.

MasterMeter 1addr 3Meter 2addr 3Both on address 1Answers overlap, CRC error
Two meters on factory address 1 answer at once. The master sees a CRC error, not a time-out.

The second is a second master on the same bus. An inverter that reads its own energy meter is already the master. A gateway added to that bus talks over it. Read such a meter through the inverter's Modbus TCP interface, or run a separate bus.

The third is the signal itself: no termination, no bias, or a stub longer than the 20 m the specification allows. Timing matters too. The specification declares a frame incomplete when there is a gap of more than 1.5 character times inside it. Cheap USB adapters and radio links create such gaps.

Gateways use 0x0A and 0x0B in their own way

A Modbus TCP to RTU gateway sends 0x0A or 0x0B when the problem sits behind it. The specification says 0x0A "usually means that the gateway is misconfigured or overloaded" and 0x0B "usually means that the device is not present on the network". Manufacturers fill this in differently.

Manufacturer0x0A0x0B
Moxa MGate (G2 series)Unit ID not in the routing tableNo reply from the serial device, offline or cable broken
Victron GXUnit ID known, but no device foundUnit ID not in the mapping list
SMA (no gateway)Wrong Unit ID, also on an inverter connected straight to TCP

Sources: Moxa MGate MB3170-G2/MB3270-G2/MB3470-G2 manual v1.0 (September 2025), Victron GX Modbus-TCP FAQ, SMA Developer Portal.

On a Moxa, 0x0B means "look at the RS485 side". On a Victron it means "your Unit ID is wrong". Always read the table of the gateway in front of you. Moxa also lets you switch exceptions off, and then the master only ever sees time-outs. Switch them on while you troubleshoot. Setting up such a gateway is covered in Modbus TCP gateway setup.

The master time-out must be longer than the gateway time-out

A gateway can only return 0x0B if it gives up before the master does. Moxa sets its serial response time-out to 1000 ms by default. If your master waits less, it gives up and sends a new request while the gateway is still waiting on the bus. The log then shows "time-out" and never 0x0B.

The order is: device response time, then gateway time-out, then master time-out. Fronius tells you in its GEN24 manual to "perform the requests with a timeout of at least 1 second". Home Assistant uses 5 seconds by default.

One device that does not answer slows down all the others. Every request to it holds the bus for a full time-out. Devices polled after it in the cycle can then time out at the master too. Take a missing device out of the polling list before you start to doubt the rest.

Frequently asked questions

What does Modbus exception code 2 mean?

Illegal Data Address. The device received the request intact, but the register does not exist or the block runs past the last register. Usually the address is off by one, because the datasheet counts from 40001 while the address on the wire starts at 0. Subtract 1 and read again.

What is the difference between a Modbus time-out and an exception?

An exception is an answer. The request arrived and the device refuses it. A time-out is no answer at all. The Modbus specification says a device does not reply to a frame with a CRC or parity error. Look at the address, the serial settings or the wiring.

What does 0x83 mean in a Modbus log?

An exception response to function code 03. On an error the device sets the highest bit of the function code, so 03 becomes 0x83. The next byte is the exception code, for example 02 for a register that does not exist. With FC04 you see 0x84, with FC06 0x86.

What causes a Modbus CRC error on RS485?

An answer that arrives damaged. There are three usual causes. Two devices with the same slave address answer at once, a second master shares the bus, or missing termination or bias damages the signal. Check first that every address on the bus appears only once.

What does exception 0x0B mean on a Modbus gateway?

Gateway Target Device Failed to Respond. The gateway got no answer from the device behind it. On a Moxa MGate that points to the serial side, such as address, baud rate or cable. On a Victron GX, 0x0B means the Unit ID is not in the mapping list.

How long should a Modbus response time-out be?

Longer than the gateway time-out, which in turn is longer than the device response time. The serial line specification gives 1 to several seconds at 9600 baud. Fronius asks for at least 1 second, and Moxa sets the serial time-out of its gateways to 1000 ms by default.

ModbusCloud Diagnostics shows the share of answered requests and the average response time for each connection, with recent errors listed as a cause in plain language. Its console (off by default) shows the raw frames in hex. The program is free for Windows 10 and 11 and macOS, and connects over Modbus RTU through a USB to RS485 adapter, Modbus TCP and RTU over TCP. Download it from the ModbusCloud Diagnostics page.