AutoLab4j Dataset CSV

From Commander4j
Revision as of 13:35, 1 April 2026 by Dgarratt (talk | contribs) (Updated by push_wiki.py)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When an operator assigns a Process Order to a production line in Commander4j, a CSV data file is written to the dataset directory monitored by AutoLab4j. This file contains all the product and order information AutoLab4j needs to generate and print labels.

File Naming

The CSV filename follows the format:

LINE_NAME_PRINTER_NAME.CSV

For example, a production line named LINE 1 with a printer named PRINTER 1 produces:

LINE 1_PRINTER 1.CSV

AutoLab4j monitors the configured dataset directory and loads this file as soon as it appears. If a new file arrives while production is active, it replaces the previous data immediately.

File Format

The file contains a header row followed by a single data row. Fields are comma-separated. The column headers are used to map values to named variables in the label template and print configuration.

Fields

Order and Product

Field Description
PROCESS_ORDER The process order number from Commander4j
MATERIAL The material/product code
DESCRIPTION Product description
CUSTOMER_ID Customer identifier, used to look up batch format patterns in config.xml
LANGUAGE Language code for label content
REPORT_FILENAME Filename of the ZPL label template to use (looked up in the labels/ directory)

Batch and Expiry

Field Description
BATCH_FORMAT Batch number format pattern (overrides the customer default in config.xml if present)
BATCH_NUMBER Pre-calculated batch number (used directly if BATCH_FORMAT is not specified)
BATCH_PREFIX Optional prefix prepended to the calculated batch number
DATE_OF_MANUFACTURE Manufacturing date, used as the base for expiry date calculation
EXPIRY_DATE Pre-calculated expiry date (used directly if shelf life fields are not present)
SHELF_LIFE Numeric shelf life value
SHELF_LIFE_UOM Shelf life unit of measure (D = days, M = months, Y = years)
SHELF_LIFE_RULE Rule for how the expiry date is calculated from the manufacture date and shelf life

Barcodes and Identifiers

Field Description
EAN EAN-13 barcode value for the product (trading unit barcode)
PROD_EAN EAN used specifically for the production label barcode (may differ from EAN)

Pallet Configuration

Field Description
SSCC_PER_PALLET Number of SSCCs (pallet labels) to generate for a full pallet
LABELS_PER_SSCC Number of label copies to print for each SSCC

Printer Destination

Field Description
IP_ADDRESS IP address of the Zebra printer for this line
PORT TCP port of the Zebra printer (typically 9100)

Field Substitution in Label Templates

All fields in the CSV are available as placeholders in the ZPL label template using the syntax <*FIELD_NAME*>. For example:

  • <*MATERIAL*> is replaced with the MATERIAL field value
  • <*SSCC*> is replaced with the generated SSCC
  • <*EXPIRY_DATE*> is replaced with the calculated expiry date

The fieldNamesLookup section in config.xml can map CSV field names to different template placeholder names if the CSV field names do not match the placeholder names in the template. The clone section can copy a field value under an additional name, and the formats section can apply numeric formatting to a field before substitution.

SSCC Field

The SSCC is not present in the CSV file — it is generated by AutoLab4j at print time from the sequence file for the printer. It is available in the label template as <*SSCC*>.

See also: AutoLab4j Operation, AutoLab4j Configuration, Zebra ZPL Label, Label Template Syntax