This article describes how a ZPL (Zebra Print Language) printer can be controlled via ELAM Solutions in order to print labels.
The ELAM ZPL controller (Zebra Print Language) controller supports ZPL printers. ZPL printers are label printers that use the ZPL (Zebra Programming Language). These printers are specifically designed for printing barcodes, labels and other marking-related applications and are often used in logistics, retail and manufacturing environments.
Here are some key features of ZPL printers:
The following ZPL printer were tested with the ZPL-Controller:
To be able to use a ZPL printer in ELAM Solutions, at least one SWA5 Mini Client is required as a gateway. The printer must be connected directly to the DHCP socket of the SWA5 Mini Client via a LAN cable so that it is automatically created as a tool in ELAM Administration.
The printer is automatically created as a tool in the ELAM Solutions system. In the factory setting, printers obtain the IP address assignment automatically. DHCP printers are network printers that obtain their IP addresses automatically from a DHCP server (Dynamic Host Configuration Protocol), in this case from the SWA5 Client or Mini Client. This simplifies the setup in ELAM Solutions. Static IP addresses of printers are currently not supported in ELAM Solutions.
Connect the printer via LAN cable to the DHCP socket of the SWA5 Client or Mini Client. The printer automatically obtains its IP address and is automatically created as a tool in ELAM Administration.
Labels must be created using third-party software. A ZPL file must be generated from the labels, which can be sent to the printer via ELAM Solutions. In our example, we used the Zebra GK420t thermal transfer printer to print labels. Using the free Zebra Designer 3 software, we created a label graphically and generated a ZPL file from it. In the ZPL file, the ZPL code is copied and pasted into ELAM Solutions, edited and sent to the printer.
In principle, any software from your manufacturer can be used to create labels graphically. In our example, we are using the free Zebra Designer 3 software.
1. Install Zebra Designer 3:
2. Start Zebra Designer 3:
3. Create new Label :
4. Configure label settings:
5. Create a label design:
6. Save label and generate ZPL code:
7. Paste ZPL-Code in ELAM Solutions
8. Define printer step in the flowchart editor
9. Start flowchart with the printer step in the wizard
In our example, we create a label with variable and static data that is to be printed. To do this, the correct label size (width and length) must first be set.
The following elements can be defined on the label from the library using drag&drop:
Initial values should always be used so that you can recognize in the generated ZPL code which placeholders must be replaced by ELAM-specific placeholders in order to be able to print variable data.
The copied ZPL code must be pasted and edited in ELAM Administration.
Optionally, the label can be displayed graphically in a preview. To do this, click on "Preview" so that the label can be displayed on the "labelary.com" page. On this page you will also find comprehensive documentation about the Zebra Print Language.
Next, we replace the set placeholders with ELAM-specific placeholders. The following placeholders can be used, which are replaced with the correct data during the print job.
Information about the placeholders is displayed when you move the mouse over them.
The placeholders available in ELAM are replaced by the predefined placeholders from the Label Designer software by copy&paste.
IMPORTANT: Only ever insert the ELAM placeholders between the ZPL commands! In our example, the ELAM placeholder must always be inserted between the ^FD and ^FS commands. A complete overview of all available commands can be found here: https://labelary.com/docs.html
TIP: One or more ELAM placeholders can also be combined and separated by any characters.
The ZPL code (Zebra Programming Language) is used to print a label.
Here is a detailed description of the individual parts of the code and what they do:
1. Initialization and settings:
^XA
: Start of the label.~TA000
: Sets the time shift to 0.~JSN
: Activates the printer settings.^LT0
: Sets the pressure level to 0.^MNW
: Sets the printer mode to "Normal".^MTT
: Activates thermal mode.^PON
: Activates the print output.^PMN
: Sets the printer mode to Normal.^LH0,0
: Sets the label origin to (0,0).^JMA
: Sets the automatic calibration of the printer.^PR4,4
: Sets the print speed and print quality.~SD15
: Sets the print density to 15.^JUS
: Activates the blocking of printing.^LRN
: Sets the reverse mode.^CI0
: Sets the character set to the default character set.^XZ
: End of the initialization range.
2. Definition of the label:
^XA
: Start of the label.^MMT
: Activates thermal mode.^PW400
: Sets the label width to 400 dots.^LL0192
: Sets the label height to 192 points.^LS0
: Sets the left margin to 0.
3. Graphics and fields:
^FO192,0
: Sets the origin of the graphic to (192,0).^GFA
: Defines a compressed graphic.
4. Text fields and barcode:
^FTx,y
: Sets the origin of the text field.^A0N,h,w
: Sets the font type and size.^FH\
: Activates hexadecimal representation.^FD...^FS
: Defines the text content.^BQN,2,4
: Defines a QR code.
5. Line and print parameters:
^FO209,57
: Sets the origin of the line to (209.57).^GB190,0,2
: Draws a line with a width of 190 points and a thickness of 2 points.^PQ1,0,1,Y
: Sets the print parameters (number of copies, pause between copies, etc.).^XZ
: End of the label.
Summary: This ZPL code creates a label with various text fields, a QR code and a horizontal line. The placeholders {variantNumber}, {orderNumber}, {variantName}, {serialNumber}, {Day}#{Month}#{Year}#{Clock} are replaced by the corresponding values when the label is printed.
The print step is a manual step that must be manually confirmed by a user in the wizard. Sometimes labels are printed out of focus. This allows the user to react and repeat the print job and only confirms the step when the printed label is OK.
To trigger a print job, the print step from the library must be inserted into the flowchart in the flowchart editor. A label file must be selected in the details, which is automatically sent to the printer.