Home / Tools / Field tool

Modbus Exception Codes

The slave answered with an error. Here's what it's telling you and what to check.

Free tool · BAS Communication — A Field Reference

Works offline. Every calculation runs on your device, no signal needed. Install the BAS Field Reference app to keep it on your phone.
CodeMeaning and what to check
01Illegal Function — the device doesn't support that function code. Most often you used FC03 on an input register or FC04 on a holding register. Check the register map.
02Illegal Data Address — the address doesn't exist on this device. Usually an off-by-one between conventional address and offset, or a register that only exists on a different model.
03Illegal Data Value — the value is out of range for that register, or the quantity requested exceeds what the device allows in one transaction.
04Slave Device Failure — an unrecoverable error inside the device while processing the request.
05Acknowledge — request accepted but will take a long time. The master should poll for completion rather than time out.
06Slave Device Busy — device is processing a long command. Retry later.
08Memory Parity Error — used with file record functions; indicates a parity error in the device's memory.
0AGateway Path Unavailable — a gateway could not allocate a path. Usually means the gateway is misconfigured.
0BGateway Target Failed to Respond — the gateway is fine, the downstream device isn't answering. Check the field side, not the gateway.

How to use it

  1. When a request fails, the slave returns the original function code plus 0x80 — so a failed FC03 comes back as 0x83.
  2. The byte after that is the exception code below.
  3. Codes 01, 02 and 03 cover the vast majority of what you'll see in the field.

Background reading: Chapter 4 — Modbus →

Go deeper

More where this came from

These tools come out of the book — a field reference for BACnet, Modbus, LonWorks, OPC UA and the diagnostic method that works across all of them.

Get BAS Communication — A Field Reference

Found a wrong number or a broken link? Tell me and I’ll fix it.