Skip to main content

Recommended client behaviour

  • Test the connection first. Use Read Device Identification before reading any mapped data.
  • Keep the connection open. There is no idle timeout, so one connection can be used for all requests. Reconnect if the connection is closed, for example when the printer restarts.
  • Read whole items. Start each read at the first register of an item and end at the last register of an item. Poll only the ranges in the mapping list.
  • Read coils in one block. Unmapped coils read 0, so a single read can cover all the coils you need.
  • Write multi-register items in one request. Use function 16 for 32-bit and STRING items. Do not write a 32-bit item one register at a time.
  • Write triggers once per event. A write to a Select label or Select from table item selects a job every time. Do not include them in a cyclic write.
  • Use edges for latching action coils. Write 1 on the rising edge of the PLC condition, and 0 afterwards, or use auto-clear coils.
  • Check the result, not the command. After running an action, read a signal that shows its effect, such as printer.<printerID>.ready.
  • Handle exceptions. Treat exception 02 as a mapping error, 03 as a rejected value and 04 as a printer-side problem. See Exception codes.