Skip to main content

Printer setup

The Modbus server is configured in the web UI under Settings → I/O → Modbus. Changes take effect when the settings are saved.

Enabling the server​

Set Enable Modbus server to on. The server listens on TCP port 502 on all of the printer's network interfaces.

Tools → I/O → Modbus shows whether the server is running. If it is on but not running, it could not open its port; the printer's log says why.

Coil mappings​

The Coil/Discrete Input mappings table lists the coils the PLC can use. Use Add to create a mapping and Edit to change the selected one. Each coil is bound either to a signal or to an action.

FieldDescription
AddressCoil address, 0–65535. The same address is used for the coil and the discrete input.
Bind toSignal or Action.
SignalThe signal the coil reports. The list contains every signal on the printer, see Built-in signals. Choose Create new signal… to create a new user signal for the PLC to write; its name may contain letters, digits, _, : and ..
WritableLets the PLC set and clear the signal. Only signals that can be written from outside the printer, such as user signals and printer.<printerID>.maintenance_mode, can be writable.
ActionThe action the coil runs, see Actions.
Auto-clearThe coil resets to 0 as soon as it is written, so every write of 1 runs the action.

See Coils for how signal and action coils behave.

Register mappings​

The Holding/Input Register mappings table lists the register items the PLC can use. An item occupies one or more consecutive registers, depending on its data type.

These fields are common to all mappings:

FieldDescription
AddressAddress of the item's first register, 0–65535.
MappingWhat the item is bound to, see below.
Data typeHow the value is encoded, see Data types. The types offered depend on the mapping.
Length (registers)Number of registers, for the STRING and BLOCK types only. 1–123. A STRING holds two bytes per register.
WritableLets the PLC write the item. Not shown for mappings that are always read-only or always write-only.

The mappings are:

MappingFieldsData typesDescribed in
InternalName (optional), ValueNumeric, STRING, BLOCKInternal register, Reserved
CounterNameNumericCounter
VariableNameNumeric, STRINGVariable
StatisticNameNumericStatistic
Fixed speedPrintersNumericFixed speed
Select labelPrinters, print job fieldsNumeric, STRINGSelect label
Select from tablePrinters, print job fields, table fieldsNumeric, STRINGSelect from table

Numeric means UINT16, INT16, UINT32 and INT32.

The Fixed speed, Select label and Select from table mappings take a list of printers, and act on all of them v6.1. Before v6.1, they took a single printer. Mapping lists exported from older versions are read as a list of one printer.

Select label and Select from table mappings select a print job each time the PLC writes them. These fields control the job:

FieldDescription
PatternOptional regular expression that picks the part of the written text to use: the first group in parentheses if there is one, otherwise the whole match. For example, LOT:(\d+) picks the digits after LOT:. Text that does not match is rejected.
PrefixText added before the value.
SuffixText added after the value.
Limit number of printsNumber of copies to print.
Minimum trigger distanceIgnore triggers closer than this distance from the position where the job was selected.
Maximum trigger distanceIgnore triggers farther than this distance from the position where the job was selected.
Queue labelAdd the job to the printer's queue instead of replacing the current job.
Use a snapshot of the labelTake the label's content (counters, date and time, table data) when the job is selected rather than when the print is triggered. Counters used by the label are stepped when the job is selected.

The trigger distances form a trigger window.

Table fields​

A Select from table mapping also has:

FieldDescription
Table nameThe table to search.
Key columnThe column to search for the written value.
Label columnColumn holding the name of the label to print for each row.
Label nameA fixed label to print. Either this or a label column must be set.
Copies columnOptional column holding the number of copies to print for each row.
Printed columnOptional column where the number of printed labels is counted.

These are the same as the table properties of a print job.

Filling gaps​

A read request must consist of whole mapped items, so a PLC cannot read a block of registers that has unused addresses in it. To let the PLC read a larger range in one request, fill the gaps with reserved items: an Internal mapping with no name, type BLOCK, and Writable off. See Reserved.

Exporting and importing​

The buttons below the tables:

  • Export mappings downloads all coil and register mappings as a file, aurora-modbus-mappings.json.
  • Import mappings… replaces all mappings on the page with the contents of such a file. Nothing changes on the printer until the settings are saved, so an import can be undone by reloading the page.
  • Mapping list for PLC… opens the mapping list, a printable description of the mappings for the PLC programmer. It can also be copied to the clipboard, for example to paste into an e-mail or a specification.

Export and import is a convenient way to copy a configuration to several printers. The mappings refer to signals, counters, tables and printers by name, so those must exist on the target printer too.

Checking the traffic​

Tools → I/O → Modbus lists every named internal register with its current value and the number of times the PLC has read and written it since the printer started. This is a quick way to confirm that the PLC is talking to the printer at all.

Requests that fail are logged in the printer's log, once per distinct failure, with the function code, the exception code and the reason. See Exception codes.