Overview AutoLab4j: Difference between revisions

From Commander4j
No edit summary
Updated by push_wiki.py
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Overview=
AutoLab4j is an automated label printing and SSCC generation service for production lines. It monitors Modbus digital signals from production equipment, reads product data from CSV files exported by Commander4j, generates ZPL labels, sends them to networked Zebra printers over TCP/IP, and produces Production Declaration XML documents for each pallet printed.


AutoLab4j is a program which has been developed to enable automatic label printing based on a trigger signal from a modbus device.
== Purpose ==


It was created to compliment the Commander4j application but in theory could be used with other systems.
When a pallet is complete on a production line, the line's PLC or I/O module raises a Modbus coil signal. AutoLab4j detects this signal, generates a unique SSCC (Serial Shipping Container Code), builds the ZPL label from the active product data and label template, and sends it to the printer — all without any operator interaction.


This application is quite similar in role to the [[LabelServer]] program. The main difference is that AutoLab4j runs as a forground application with tray icon and has a visual component including a label preview, whereas the LabelServer program runs as a service and is normally run on a server.
This separates label printing from the Commander4j desktop application and ties it directly to the physical production event rather than a manual operator action.


AutoLab4j would typically be installed on a workstation next to the production line/labeller and as such you may have multiple copies running on a site. LabelServer handles mutiple printers from a central location but does not have any visual user interface.
== Difference from LabelServer4j ==


The data used for the label is supplied in a CSV See [[AutoLab4j Dataset CSV]].
AutoLab4j and LabelServer4j both print labels from Commander4j data, but serve different roles:


The label template file is combined with the data to create the commands sent to the printer. See [[Zebra ZPL Label]]
{| class="wikitable"
|-
! Feature !! AutoLab4j !! LabelServer4j
|-
| Typical use || Pallet labellers || Case and secondary labellers
|-
| Print trigger || Modbus coil signal from production line equipment || CSV file placed by Commander4j
|-
| SSCC generation || Yes — generates unique SSCCs automatically || No — SSCC is supplied in the CSV
|-
| User interface || Graphical window with per-line status displays || None — background service only
|-
| Output documents || Produces Production Declaration XML per pallet || No output documents
|}


There are four main sections to this document
== How It Works ==


*[[AutoLab4j Example User Interface]]
# Commander4j writes a CSV data file to the configured dataset directory when an operator assigns a process order to a production line.
*[[Commander4j Configuration]]
# AutoLab4j monitors that directory. When a CSV file appears, it reads the product data into memory.
*[[AutoLab4j Installation]]
# AutoLab4j polls the Modbus coil address for the production line every 250 ms.
*[[AutoLab4j Configuration]]
# When the coil signal matches the configured trigger value, AutoLab4j reads the semi-pallet coil to determine whether this is a full or semi pallet.
*[[AutoLab4j Operation]]
# For each SSCC in the pallet, AutoLab4j generates a unique SSCC number, builds the ZPL label from the template, and sends it to the printer over TCP/IP (port 9100).
# After printing, a Production Declaration XML file is written to the output directory.
# The SSCC sequence number is incremented and persisted to disk.


== SSCC Generation ==


[[file:AutoLab4j_3.png|800px]]
SSCC numbers are generated from a configurable prefix and an incrementing sequence number. The sequence is stored in a per-printer XML file and updated atomically after each print. When the sequence approaches the configured warning limit, AutoLab4j sends an email alert. When it reaches the upper limit, printing stops until the sequence file is reset.
 
== Pallet and Semi-Pallet Support ==
 
Two Modbus coil addresses are used per production line:
 
* A primary coil that signals a pallet is complete and a label should be printed
* A semi-pallet coil that determines whether this is a full pallet or a semi-pallet
 
Full pallets and semi-pallets can be configured with different quantities of SSCCs per pallet and labels per SSCC.
 
== Supported Printer Types ==
 
AutoLab4j communicates with printers using ZPL (Zebra Programming Language) over raw TCP/IP sockets. Any printer that accepts raw ZPL on a configurable IP address and port is supported.
 
== Multi-Line Support ==
 
AutoLab4j supports multiple production lines simultaneously. Each line runs its own independent set of threads (dataset monitor, Modbus poller, print handler) and has its own system tray icon showing the current status.
 
== Label Preview ==
 
If enabled, AutoLab4j calls the Labelary web API to render each ZPL label as a PNG image and displays it on screen before sending to the printer. This provides a visual confirmation that the correct label is being printed.
 
== Production Declaration Output ==
 
After each pallet is printed, AutoLab4j writes an XML Production Declaration file to the configured output directory. This document records the SSCC, product, batch, shelf life, and other details for downstream integration.
 
See also: [[AutoLab4j Configuration]], [[AutoLab4j Operation]], [[AutoLab4j Dataset CSV]], [[LabelServer4j]]
 
[[Category:AutoLab4j]]

Latest revision as of 13:35, 1 April 2026

AutoLab4j is an automated label printing and SSCC generation service for production lines. It monitors Modbus digital signals from production equipment, reads product data from CSV files exported by Commander4j, generates ZPL labels, sends them to networked Zebra printers over TCP/IP, and produces Production Declaration XML documents for each pallet printed.

Purpose

When a pallet is complete on a production line, the line's PLC or I/O module raises a Modbus coil signal. AutoLab4j detects this signal, generates a unique SSCC (Serial Shipping Container Code), builds the ZPL label from the active product data and label template, and sends it to the printer — all without any operator interaction.

This separates label printing from the Commander4j desktop application and ties it directly to the physical production event rather than a manual operator action.

Difference from LabelServer4j

AutoLab4j and LabelServer4j both print labels from Commander4j data, but serve different roles:

Feature AutoLab4j LabelServer4j
Typical use Pallet labellers Case and secondary labellers
Print trigger Modbus coil signal from production line equipment CSV file placed by Commander4j
SSCC generation Yes — generates unique SSCCs automatically No — SSCC is supplied in the CSV
User interface Graphical window with per-line status displays None — background service only
Output documents Produces Production Declaration XML per pallet No output documents

How It Works

  1. Commander4j writes a CSV data file to the configured dataset directory when an operator assigns a process order to a production line.
  2. AutoLab4j monitors that directory. When a CSV file appears, it reads the product data into memory.
  3. AutoLab4j polls the Modbus coil address for the production line every 250 ms.
  4. When the coil signal matches the configured trigger value, AutoLab4j reads the semi-pallet coil to determine whether this is a full or semi pallet.
  5. For each SSCC in the pallet, AutoLab4j generates a unique SSCC number, builds the ZPL label from the template, and sends it to the printer over TCP/IP (port 9100).
  6. After printing, a Production Declaration XML file is written to the output directory.
  7. The SSCC sequence number is incremented and persisted to disk.

SSCC Generation

SSCC numbers are generated from a configurable prefix and an incrementing sequence number. The sequence is stored in a per-printer XML file and updated atomically after each print. When the sequence approaches the configured warning limit, AutoLab4j sends an email alert. When it reaches the upper limit, printing stops until the sequence file is reset.

Pallet and Semi-Pallet Support

Two Modbus coil addresses are used per production line:

  • A primary coil that signals a pallet is complete and a label should be printed
  • A semi-pallet coil that determines whether this is a full pallet or a semi-pallet

Full pallets and semi-pallets can be configured with different quantities of SSCCs per pallet and labels per SSCC.

Supported Printer Types

AutoLab4j communicates with printers using ZPL (Zebra Programming Language) over raw TCP/IP sockets. Any printer that accepts raw ZPL on a configurable IP address and port is supported.

Multi-Line Support

AutoLab4j supports multiple production lines simultaneously. Each line runs its own independent set of threads (dataset monitor, Modbus poller, print handler) and has its own system tray icon showing the current status.

Label Preview

If enabled, AutoLab4j calls the Labelary web API to render each ZPL label as a PNG image and displays it on screen before sending to the printer. This provides a visual confirmation that the correct label is being printed.

Production Declaration Output

After each pallet is printed, AutoLab4j writes an XML Production Declaration file to the configured output directory. This document records the SSCC, product, batch, shelf life, and other details for downstream integration.

See also: AutoLab4j Configuration, AutoLab4j Operation, AutoLab4j Dataset CSV, LabelServer4j