Driver Settings

<< Click to Display Table of Contents >>

 

Driver Settings

The examples in this section refer only to using ZPL II language, but using EPL II language is analogous.

To use this Driver, users must create a configuration file in ZPL II (Zebra Programming Language II) format containing the description of the labels to print. This file must be created and edited on the Extra settings window, Other Parameters in Elipse E3, in Elipse Power, or in Elipse Water, by clicking the ZebraZPLII tab.

Each label must start with the keyword [BEGIN] and end with the keyword [END]. Inside these blocks, defined by these keywords, there must be a user-created ZPL II program describing a label to generate.

Users can create variables identified by tokens, which are replaced during the printing process. A token is composed by &n, in which n is a positive integer, such as &0, &1, or &2. These variables can be defined in an Elipse E3, Elipse Power, or Elipse Water application using a PLC Tag with its N1 parameter equal to 0 (zero), as described later, and can contain both numbers and Strings.

To insert comments in a ZPL code, use the expression "//" (double slash marks), which considers as a comment the rest of a line. The next example was copied from ZPL II Language Programming Guide.

//Label 0:
[BEGIN]
^XA
//^XA – Indicates the start of label formatting
^LH&0,&1
//^LH – Sets label's initial position to
//&0 dots to the right and &1 dots starting
//from label's top edge
//(&0 and &1 are variables defined in the application at printing time)
^FO&2,&3^AD^FDZEBRA^FS
//^FO&2,&3 - Set field's origin to
//&2 dots to the right and &3 dots down starting
//from initial position (defined by the ^LH instruction)
//(&2 and &3 are variables)
//^AD - Selects a "D" font
//^FD - Start of field data
//ZEBRA - Actual field data (the word "ZEBRA")
//^FS - End of field data
^FO&4,&5^B3^FDAAA001^FS
//^FO&4,&5 - Sets field origin to
//&4 dots to the right and &5 dots down
//from the initial position (defined by the ^LH instruction)
//(&4 and &5 are variables)
//^B3 - Selects the bar code font "Code 39"
//^FD - Start of field data for the bar code
//AAA001 - Actual field data ("AAA001")
//^FS - End of field data
^XZ
//^XZ - Indicates end of label formatting
[END]

 

In the previous example, only the characters without the initial expression "//" are sent to a printer. All tokens beginning with the "&" character are replaced by one of the internal variables of this Driver, between 0 (zero) and 50, which can be read and written with PLC Tags with their N1 parameter equal to 0 (zero). The initial value, before any operation, of all variables is equal to -1 (minus one), so users must initialize a variable whenever needed.

Several labels can be defined in the same file. The order each label appears in this configuration file is used to select it when printing, by using the N2 parameter of a PLC Tag with its N1 parameter equal to 1 (one), starting with 0 (zero), that is, the first label is 0 (zero), the second label is 1 (one), and so on.

This Driver, when loaded in a new project, is already pre-configured with the following parameters:

Serial port: COM1

Baud rate: 9600 bps

Data bits: 7 (seven)

Stop bits: 2 (two)

Parity: Even

Timeout: 1000 ms

 

To edit these settings, as well as other settings, use the configuration window of extra parameters of this Driver. The available options on this window are described on topic Documentation of I/O Interfaces.

Was this page useful?