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.
| Field | Description |
|---|---|
| Address | Coil address, 0–65535. The same address is used for the coil and the discrete input. |
| Bind to | Signal or Action. |
| Signal | The 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 .. |
| Writable | Lets 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. |
| Action | The action the coil runs, see Actions. |
| Auto-clear | The 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:
| Field | Description |
|---|---|
| Address | Address of the item's first register, 0–65535. |
| Mapping | What the item is bound to, see below. |
| Data type | How 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. |
| Writable | Lets the PLC write the item. Not shown for mappings that are always read-only or always write-only. |
The mappings are:
| Mapping | Fields | Data types | Described in |
|---|---|---|---|
| Internal | Name (optional), Value | Numeric, STRING, BLOCK | Internal register, Reserved |
| Counter | Name | Numeric | Counter |
| Variable | Name | Numeric, STRING | Variable |
| Statistic | Name | Numeric | Statistic |
| Fixed speed | Printers | Numeric | Fixed speed |
| Select label | Printers, print job fields | Numeric, STRING | Select label |
| Select from table | Printers, print job fields, table fields | Numeric, STRING | Select 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.
Print job fields
Select label and Select from table mappings select a print job each time the PLC writes them. These fields control the job:
| Field | Description |
|---|---|
| Pattern | Optional 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. |
| Prefix | Text added before the value. |
| Suffix | Text added after the value. |
| Limit number of prints | Number of copies to print. |
| Minimum trigger distance | Ignore triggers closer than this distance from the position where the job was selected. |
| Maximum trigger distance | Ignore triggers farther than this distance from the position where the job was selected. |
| Queue label | Add the job to the printer's queue instead of replacing the current job. |
| Use a snapshot of the label | Take 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:
| Field | Description |
|---|---|
| Table name | The table to search. |
| Key column | The column to search for the written value. |
| Label column | Column holding the name of the label to print for each row. |
| Label name | A fixed label to print. Either this or a label column must be set. |
| Copies column | Optional column holding the number of copies to print for each row. |
| Printed column | Optional 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.