Modbus Exception Codes — The Complete Reference

When your slave sends back an error instead of data, the exception code tells you exactly what went wrong. Here's every code, what it really means in practice, and how to fix it.

Reference Updated Feb 2026 10 min read

How Exception Responses Work

When a Modbus slave can't process a request, it doesn't just stay silent — it sends back an exception response. You can identify this because the function code in the response has bit 7 set (0x80 added). So if you sent function code 0x03 (Read Holding Registers), the exception response has function code 0x83.

The next byte is the exception code, which tells you the specific problem.

Normal Response:   [Slave Addr] [0x03] [Byte Count] [Data...]  [CRC]
Exception Response: [Slave Addr] [0x83] [Exception Code]         [CRC]
💡 Good News

Getting an exception response is actually better than getting no response at all. It means your physical connection is working, your slave address is correct, and the device is communicating. You just need to fix the request.

Exception Code Reference Table

CodeHexNameMeaning
010x01Illegal FunctionThe function code is not supported by this device
020x02Illegal Data AddressThe register address or address + length is out of range
030x03Illegal Data ValueThe value in the request is not allowed for this register
040x04Slave Device FailureUnrecoverable error on the slave while processing
050x05AcknowledgeSlave accepted the request but needs time to process
060x06Slave Device BusySlave is processing another long-running command
070x07Negative AcknowledgeSlave cannot perform the programming function
080x08Memory Parity ErrorSlave detected a parity error in its memory
0A0x0AGateway Path UnavailableGateway can't reach the target device's network
0B0x0BGateway Target No ResponseTarget device behind the gateway didn't respond

Exception 01: Illegal Function

The device doesn't support the function code you sent. Common causes:

Fix: Check the device's Modbus documentation for supported function codes. Try switching between FC03 and FC04.

Exception 02: Illegal Data Address

This is the most common exception code in practice. The register address you requested doesn't exist on this device, or the address + quantity extends beyond the valid range.

⚠ Firmware Version Matters

Some devices (e.g., Schneider IMU modules) add new registers in firmware updates. If you're trying to read a register that was added in firmware v3.0 but your device is running v2.5, you'll get exception 02. Check the device firmware version.

Fix: Verify the exact register address against the device documentation. Try reading a smaller quantity. Confirm you're using the register map for the correct device model and firmware version.

Exception 03: Illegal Data Value

The register address is valid, but the value you're trying to write is not acceptable. This only occurs on write operations (FC05, FC06, FC15, FC16).

Exception 04: Slave Device Failure

Something went wrong internally on the slave while it tried to process your request. This is the device saying "I understood what you asked, but I crashed trying to do it." Rare in practice — usually indicates a firmware bug or hardware fault on the slave device.

Exceptions 05 & 06: Acknowledge / Busy

These are "please wait" responses. Exception 05 means the slave accepted your request but will take a long time (e.g., firmware update, configuration save). Exception 06 means it's currently busy with another long-running operation. Retry after a short delay.

Exceptions 0A & 0B: Gateway Errors

If you're communicating through a Modbus gateway (TCP-to-RTU bridge, protocol converter), these codes indicate the gateway itself is working but can't reach the downstream device:

🔍 Decode Exceptions in Real-Time

ModBus Pro's traffic view shows exception codes decoded in plain English as they occur, with suggested fixes based on your device type. No more memorising hex codes.

Download ModBus Pro