FoundryNet / Error codes / Modbus Exception 04
Modbus error code

Exception 04 (0x04) — Server Device Failure

An unrecoverable error occurred inside the server while it was performing the requested action. Unlike 01-03, the request itself was well-formed — the device failed to service it.

Start free Modbus → canonical

Diagnosis

When you hit this


Resolution

How to fix it

  1. Separate the device from the link
    Read a register you know is served locally by the gateway. If that works and the target fails, the downstream link is the problem.
  2. Check the device's own fault state
    Exception 04 frequently accompanies an active alarm on the controller. Clear the alarm, then re-read.
  3. Do not hammer it
    Repeating a failing request at full rate delays recovery on many devices and can mask the underlying fault in your logs.

Normalization

What Forge does about it

This is a transport failure, so there is nothing for Forge to normalize: the reading never arrives. What Forge does is refuse to let the gap look like good data. The read-time dropout check flags a field that fell to zero and recovered as a communication glitch rather than a real measurement, and the stuck-sensor check fires when a value repeats for 20 consecutive readings — which is what a cached or last-known value looks like after a link drops. Forge does not retry or reconnect for you; that is your client's or your gateway's job.


Connect

Normalize Modbus telemetry

One MCP endpoint serves every protocol adapter. 16,908 curated mappings, 366 canonical fields.

# normalize telemetry from Modbus — and 13 other protocols
claude mcp add --transport http forge https://mcp.foundrynet.io/mcp \
  --header 'Authorization: Bearer YOUR_FORGE_KEY'
✓ forge connected — 32 tools available

Related

Keep reading

Other Modbus codes: Exception 01 Exception 02 Exception 03 Exception 06 Exception 0B

Equipment that speaks Modbus: Fanuc Haas Universal Robots Chemical process Food & beverage process Pharma process (GMP) Bridgeport Brother Doosan Robotics Epson Robots

Modbus protocol hub

Other protocols: OPC UA MQTT / Sparkplug B FANUC FOCAS EtherNet/IP PROFINET / S7 BACnet/IP J1939 (CAN) MTConnect ROS 2 (DDS) SNMP MAVLink HTTP / REST CSV ingest

All error codes · All OEMs · All protocols

Industrial AI fails at the data layer. The Machine Agent explains why, weekly. Read it →
Get the thesis behind this infrastructure — The Machine Agent, weekly.