Skip to main content

Exception codes

CodeNameWhen the printer returns it
01Illegal FunctionUnsupported function code or MEI type.
02Illegal Data AddressUnmapped register, part of an item, write to a read-only or unmapped coil or item, address range beyond 65535.
03Illegal Data ValueMalformed request, bad quantity, invalid coil value, text that is not valid UTF-8, negative speed.
04Server Device FailureThe write could not be carried out: missing counter, variable, printer, table row or label, text that does not match the mapping's pattern, missing action, or a failed signal write.

As a rule of thumb:

  • 02 is a mapping problem: wrong address, wrong length, or writing something that is not writable. Check the request against the mapping list.
  • 03 means the printer rejected the value.
  • 04 is a problem on the printer side. Look in the printer's log.

Every failed request is logged on the printer, with the function code, the exception code and the reason, for example:

Request failed (function 0x10, exception 2): partial write of register 0 (length 2)

Each distinct failure is logged once, so a PLC that repeats a bad request does not flood the log.

Troubleshooting​

SymptomLikely cause
Cannot connectThe Modbus server is disabled, or a firewall blocks port 502. Check Tools → I/O → Modbus on the printer.
Exception 02 on every readOff-by-one address. See Addressing.
Exception 02 on a multi-register readThe read starts or ends inside an item, or crosses an unmapped address. Read whole items, or ask for reserved ranges to fill the gaps.
32-bit values are wrongWord order. See 32-bit values.
Text has its characters swapped in pairsByte order. See Strings.
A value is stuck at 65535 or 32767Saturation: use a 32-bit type.
An action runs only onceThe coil latches. Write 0 before writing 1 again, see Action coils.
A label is selected over and overThe Select label item is in a cyclic write. Write it once per event.
A value reads 0The counter, variable or statistic it is mapped to does not exist. See the printer's log.