Programmer's Guide User guide

Programmer’s Guide | 1
43 Thermal Printer Programmer’s Guide
@PJL EOJ <LF>
<ESC>%-12345X
This PJL command will create or reset the ID variable to the value specified. The ID
value must be a unique number between 1 and 32767. This value is used within the PCL
body as a reference to the internal variable accessed. Multiple formats of the time, date,
or increment fields may be specified as demonstrated in the examples below. The total
number of Increment and Date/Time definitions must not exceed 15.
The variable STEP is the value added to the INCREMENT variable after the label is
imaged and ejected from the printer. The STEP value can be positive or negative. The
default value of STEP is 1. A STEP value of 0 implies that a constant value will be used
as specified by the START value.
The default value of START is 0 if not otherwise specified. The MIN value is the minimum
value the increment can be. If the STEP value is negative then when MIN is reached, the
next value will be the MAX value. The PREFIX and SUFFIX values hold constant strings
used to prepend to the beginning and append to the end of the increment value. The
FILL option accepts either “0” (the number zero) or “ “ (a space character). The default is
an increment field with a zero fill if a LENGTH is specified. If no LENGTH value is
specified, the length of the field will be determined by the current number of digits in the
field. The minimum length of the field is one. Note that the LENGTH field does not
include the length of any PREFIX or SUFFIX string; it only specifies the length of the
actual increment value.
Increment fields used within barcodes must be appropriate for the barcode type selected.
For example, barcodes that are numeric only will fail if increment values that include
alphabetic characters are used.
PJL Date/Time Command
The following PJL command defines the format the DATETIME field definition:
<ESC>%-12345X@PJL DATETIME ID=<integer> [FORMAT=<”format string”>] <LF>
@PJL EOJ <LF>
The DATETIME field provides the current date and/or time in various formats. This data
may be used within the label incorporating the currently selected font or within the
currently selected barcode. For text, use the <ESC>$i<ID#> I command. For barcodes,
use the <ESC>$b<ID#>Y command. The “ID#” is the value defined in the PJL header
block and can be any value between 1 and 32767.
The FORMAT string encompasses the following values:
Table 16: Date/Time Template Definitions
Template Action
%a Abbreviated weekday name (Sun, Mon, etc.)
%A Full weekday name (Sunday, Monday, etc.)