Skip to main content

Modbus Exception Codes — Diagnosing Slave Error Responses

By NFM Consulting 1 min read

Key Takeaway

What Modbus exception codes mean, how to identify them in frames, and how to diagnose and resolve each exception type.

Quick Answer

When a Modbus slave cannot process a request, it returns an exception response — the function code with bit 7 set (FC + 0x80) followed by an exception code. The code identifies the error type.

Exception Code Reference

CodeNameMeaning
01Illegal FunctionFunction code not supported
02Illegal Data AddressRegister address out of range
03Illegal Data ValueValue rejected by slave
04Slave Device FailureInternal slave error
06Slave Device BusyRetry later
0AGateway Path UnavailableGateway can't route to slave
0BGateway Target No ResponseTarget slave didn't respond

Common Diagnoses

  • Exception 02 — Most common. Usually a 0-based vs 1-based addressing error or register outside valid range.
  • Exception 04 — Slave received the request but has an internal fault. Check device event log.
  • Exceptions 0A/0B — Gateway issues. Check slave address mapping in the gateway and RS-485 wiring to the target device.

No Response vs Exception

Timeout (no response) = communication problem (wiring, address, device offline). Exception = device responded but reported an error. Different root causes, different troubleshooting approaches.

Frequently Asked Questions

Ready to Get Started?

Our engineers are ready to help with your automation project.