Skip to main content

Select label

Writing this item selects a print job on the printers named in the mapping. The written value is the label name.

PropertyValue
Data typesSTRING, or a numeric type for labels named by number
AccessW, reads 0

Each write:

  1. Takes the written value, as text. A number is written as its decimal text, for example 7.
  2. If the mapping has a pattern, picks the part of the text that the pattern matches. Text that does not match is rejected with exception 04.
  3. Adds the mapping's prefix and suffix, and uses the result as the label name.
  4. Selects the label, or adds it to the printer's queue, depending on the mapping's Queue label setting.

The mapping may also limit the number of copies, set a trigger window, and use a snapshot of the label. See Print job fields.

Every write selects a job, including writing the same value again. Reading the item returns 0 and never selects anything, so it is safe to include in a polled read. Do not include it in a cyclic write.

If the label does not exist or the printer is not available, the write returns exception 04 and the error is logged on the printer.

With several printers v6.1, the label is looked up, or the snapshot taken, once, and the same job is selected on every printer, so counters in a snapshot are stepped once. The trigger window is measured from each printer's own position. If a printer is not available, the job is still selected on the others, and the write returns exception 04.

Snapshots

With Use a snapshot of the label, the label's content is taken when the write arrives, not when the print is triggered. Counters, date and time and table data are then from the moment of the write, and counters used by the label are stepped when the job is selected.

Example​

The Select label item at 20–35 (STRING, 16 registers) in the example mapping list, writing Carton:

Address 20 21 22 23–35
Value 0x4361 0x7274 0x6F6E 0x0000
"Ca" "rt" "on"

Registers 23–35 may be left out, see Strings. Writing a name that is not a label on the printer returns exception 04.

With prefix P and a UINT16 item, writing 7 selects the label P7.

See also Selecting a label by name.