This manual provides programming information for printers featuring Zebra’s EPL2 Pro
gramming and command language, which are manufactured by Zebra Technologies Corpora
tion, Camarillo, California.
COPYRIGHT NOTICE
This documentcontains information proprietary to Zebra Technologies Corporation. This docu
ment and the information contained within is copyrighted by Zebra Technologies Corporation
and may not be duplicated in full or in part by any person without written approval from Zebra.
While every effort has been made to keep the information contained within current and accurate
as of the date of publication, no guarantee is given or implied that the document is error-free or
thatitisaccuratewith regardtoany specification.Zebrareserves therightto makechanges,for the
purpose of product improvement, at any time.
TRADEMARKS
-
-
-
Zebra and EPL2 are trademarks of Zebra Technologies Corporation. All other marks are trademarks or registered trademarks of their respective holders.
REVISION HISTORY
Rev.A - Thismanual version coincides with Zebraprinters with EPL2 firmware version4.04and
is available from Zebra in electronic form.
See the Zebra web site for information on Zebra Technologies printers at: www.zebra.com
This section contains information about the ba
sic features, command syntax and terminology
oftheEPL2ProgrammingLanguageforZebra's
desktop printers with flash memory architecture. These printers incorporate common programmingcodesetsandarchitecturalfeatures.
The primary operating mode for the printer is
EPL2, a page description language. It is designed to assemble all the elements of the label
prior to printing to speed the printing process.
EPL2 is an ideal language foryourlabeling and
bar code requirements. The EPL2 is versatile
and is capable of printing a wide range media
and bar codes.
Some printer models also include a legacy
printer compatibility mode, Line Mode. Line
Mode supports our early model EPL program
ming language - ELP1. A separate manual is
providedforLineModeprinting
(p/n 980326-001). See the printer's Software
and Documentation CD with the specific
model'sProgrammer' Manualbuttonselector or
visit our web site at:www.zebra.com
-
-
980352-001 Rev.A
1-1
Command
Conventions
The manual uses the following typographic
conventions to describe commands.
ExampleDescription
ACommands (Case Sensitive)
p
1,p2,p3
, p2, p3]
[p
1
{Choice 1|Choice 2}
This text should be→
on one line
↵Line feed character.
“NAME”
“DATA”
Required parameters
Optional parameters
Indicates a mandatory choice be
tween two or more items. You
must include one of the items un
less all of the items are also en
closed in square brackets.
The line-continuation character
(→) indicates that code is contin
ued from one line to the next and
should be typed all on one line.
The name of a form or graphic in
double quote marks.
The text or bar code data in double quote marks.
The (\) character designates that
the character following is a literal
and will encode into the data
field. Refer to the following examples:
-
-
-
-
“PROMPT”
To Print
”\"
“Company”\"Company\"
\\\
\code\\\code\\
An ASCII text field that will be
transmitted to the host (via the se
rial interface) each time this com
mand is executed.
Enter into Data Field
-
-
Attention!!
All commands and alpha character command
parameters are case sensitive!
1-2
980352-001 Rev.A
Basic Command
Syntax
Each command consists of one or two ASCII
(case sensitive) alpha characters to identify the
specific command desired. Some commands
require one or more additional parameters to
supply the printer with sufficient information to
complete the command. Refer to Figure 1- for
the basic command syntax.
Figure 1-1
Command Name
Basic Command
Syntax
CommandParametersCommand
WRITE TEXT
Ap,p,p,p,p,p,p,"DATA "
1234567
Specific
Data
↵
Each command line must be terminated with a
Line Feed (LF) character (Dec. 10). Most PC
based systems send CR/LF when the Enter key
is pressed. The Carriage Return (CR) character
is ignored by the printer and cannot be used in
place of LF.
Command Editor One method to createcommandfilesis through
anASCIIbased text editor.IntheDOSenvironment, MS-DOS EDIT or BRIEF are good
choices. To execute the file, use the editor’s
print command or from the DOS prompt, use
the COPY command to send the file directly to
theprinter. Anexampleof the use of the COPY
command is:
980352-001 Rev.A
COPY “FILENAME.EXT” LPT1↵
or
COPY “FILENAME.EXT” COM1↵
For more information on the use of the COPY
command, refer to your DOS software manual.
Configure the COM port to match the printer’s
serial port setting (typically set to defaults). See
the Y command in section 2 for details.
1-3
Placing Elements in
°
the Print Image
Sample Format
Image elements are located in the image print
buffer on a X-Y grid expressed in dots. The X
value represents thewidth and the Y value rep
resents the height of the grid.
The point of origin (the starting point) for a
non-rotated object is the upper left corner. As
anobjectrotates, the point oforiginrotateswith
the object.
These image buffer properties are depicted
graphically in the following illustration.
-
Point of
Origin for
Text Object
Point of
Origin for
BarCode Object
"q" dots
Te x t
Te x t
"Q"
dots
y axis
x axis
(0,0)
Te x t
Direction Of Feed
The minimum non printingmargin on all edges
ofthelabel is 1mm.Printingcloserthan 1mm to
the top or bottom edge of the label may cause
theprinter toadvanceunwantedlabelsor cause
the printer to go into error condition.
Point of
Origin for
Text Object
Rotated 90°
Point of
Origin for
Text Object
Rotated 270
1-4
980352-001 Rev.A
Text (Fonts) The standard EPL2 printer has five (1-5) resi
(
)
dent mono-spaced dot fonts. Fonts A-Z and a-z
(upper and lower case alpha characters) are re
served for downloading soft fonts.
First Character of Text String Reference Point
12
D
o
t
s
-
-
8 Dots
Character Width
Total Character Width
Inter-character Space
actuallywhite dots
Control text height (in horizontal dots) and
width (in vertical dots) with the horizontal and
vertical multipliers. The textis oriented first and
then the A command’s font multipliers are ap
plied.
-
980352-001 Rev.A
1-5
Thetext is placedintothe image buffer.Seethe
following example.
Point of
Origin for
Text Object
Point of
Origin for
Text Object
Point of
Origin for
Text Object
y axis
x axis
(0,0)
Horizontal Dots
Text
2x Horizontal Multiplier
Text - No Size Multipliers
Text
2x Vertical Multiplier
Text
Direction Of Feed
Text
Text
Point of Origin
for Text Object
Rotated 270°
Point of
Origin for
Text Object
V
e
Rotated 90°
r
t
i
c
a
l
D
o
t
s
The reference point of the first character in a text
stringisnotaffectedbythefont sizemultipliervalues.
First Character of Text
String Reference Point
2times2times
1-6
980352-001 Rev.A
Bar Codes All bar codes supported by the EPL2 language
have associated industry specifications that the
programmershouldbe aware of and adhere to.
The programmer needs to consider bar code
features and requirements when choosing and
using a bar code for different applications.
Some of the features and requirements that
need consideration are listed below:
Data used by the application are per the bar
❏
code specification (numbers only, alphanu
meric, alphanumeric and special characters,
etc.).
Minimum and maximum number of charac
❏
ters allowed or required per bar code.
❏Density or magnification of a given bar code
type.
❏White area required around bar codes (the
“Quiet Zone”).
-
-
❏The bar code must print within the image
buffer (printable area of the label).
Bar Code Orientation Tip
To help ensure that generated bar codes are readable by the widest variety of bar code readers, print
bar codes in the “Picket Fence” orientation versus
the “Ladder” orientation.
Horizontal Dots
Ladder
Orientation
Height of
Bar Code
V
e
r
t
i
c
a
l
D
o
t
s
Height of
Bar Code
y axis
x axis
(0,0)
Picket Fence
Orientation
Direction Of Feed
980352-001 Rev.A
1-7
Programming
Sequences Affect
Graphic Results
Graphic elements can interact andthe resultant
image can be affected by other commands.
Structure command sequences to reduce the
chancesofunexpectedprintresults.Theprinter
will process lines, text, boxes and most bar
codes in command sequence. The printer then
processes the printer control processes, coun
ters, variable data, Postnet, and then graphics
last.
-
1-8
980352-001 Rev.A
Printer Configuration
This section covers the interpret your printer's
configuration setup and setting basic modes.
Printer AutoSense
Feature
Use the printer's AutoSense feature to determineyourprinter'sconfigurationandoperating
mode. The primary functions that AutoSense
provides are:
❏AdjustmentoftheMediaSensorintheprinter
to the media in use.
❏
Programming Mode - Page (EPL2) or Line
(EPL1emulation) Mode.Note- LineModeis
not available for all printer models.
❏
The printer' serial interface settings.
❏
Reports the printer's configuration status in
cluding printer options.
-
980352-001 Rev.A
2-1
Explanation of the Status Printout
4M03351F 16 V3.18
Serial por t:96,N,8,1
Page Mode 200dpi
Programming Mode
Print head resolution
USB is printed here ifinstalled
D.
Print head test pattern.
E
. A mountof memory availablefor the
Image buffer.
F
.
Amount of memory used and memory
available for
G
.
Amount of memory used and memory
available for
H
.
Amount of memory used and memory
available for Soft fonts.
I
. Currently selected CharacterSet ( )
and Image Buffer mode setting ( ).
= Double Buffering Enabled
rY
= Double Buffering Disabled
rN
J
. Curr entlyselectedPrint Speed ( ),
Heat Density ( ), Reference Point( ),
Print Orientation ( ) and Error Status
().
U
K
. Currently selected Form Width ( ) and
Length( ).
L
. Current Hardware and Software
Option status .
M
. Curr entAutoSense Through (Gap)
Sensor values. The three numbers
represent;
1. Backing Transparent point
2. Set point
3. Label Transpar entpoint.
N
. Current time set in Real Time Clock.
This value will only be displayed if
your printer is equippedwith the Real
Time Clock feature.
O
. Current date set in Real Time Clock.
This value will only be displayed if
your printer is equippedwith the Real
Time Clock feature.
Formstorage.
Graphics storage.
r
S
DR
Z
q
Q
I
Determining Printer
Firmware Version
2-2
The printer version numbers are a code used to
document product function and the feature
support level of the printer. The latest firmware
version and updates can be obtained from our
web site.
980352-001 Rev.A
Programming Mode
Configuration
Flash based printers are, by default, configured
for Page (EPL2) mode operations. The opera
tor must convert the printer to Line Mode prior
tothe initialuseof LineMode.Thisis doneviaa
hardwareselectprocedurewiththeFeedbutton
during printer power-up. See the OEPL1 com
mand (page 3-75) for details on switching be
tween line and page modes via programming.
-
-
-
Manually Setting
Line Mode
As of January 2001, the following printers sup
port Line Mode (EPL1 emulation):
2443
·
2722
·
2824
·
2844
·
The Line Mode (and Page Mode) configuration setting is retained after reset has been issued or power
has been cycled.
TheLineModecapableprinterutilizes the Feed
button during printer power-up to toggle between the printer personality modes, Line and
Page (EPL2).
1. With printer power off, press and hold the
Feed button while turning the printer on, then
release the button when the LED starts blinking
red.
-
980352-001 Rev.A
2.When theindicatorLED startsflashinggreen,
immediately press and hold Feed button.
3. Release the Feed buttonwhen the LED turns
a steady Amber (orange).
4. Verify printer personality with Dump Mode
printout:. Line Mode or Page Mode (EPL2).
5. Press the Feed button to exit the Dump
Mode.
2-3
Media Detection Media detection in EPL2 printers is a combina
tionofprogrammingandprintermediasensing.
TheQ (SetForm Length) and O (Option) com
mands program the media detection method.
The user must configure the printer for the me
dia type and the (programmed)form or label in
use.
Theprintercandetectthebeginningandendof
the printable areaon the media by one of three
methods: Gap, Notch (hole), or Black line. The
Gap method detects the difference in optical
density of a label on a liner from the liner only
with the Transmissive (Gap) sensor. The Notch
methodusestheTransmissivesensortodetecta
hole in the media (gap-less labels or tag stock).
The Black line method uses the Reflective sen
sor to detect a preprinted black line on the media back (for gap-less labels or tag stock).
Printing on continuous media requires programming to control media positioning.
-
-
-
-
EPL2 printers also support a “Label Dispense”
modeasaprinterconfigurationoption(formost
models). The printers use a “Label Taken”sensor to detect the removal of a label.
One or more of these sensors may require user
adjustment or configuration for proper operation. All EPL2 printers have an AutoSense fea
ture to optimize label and label gap detection by
the transmissive (gap) sensor. See the printer’s
user’s manual for printer specific sensor adjust
ment control.
-
-
2-4
980352-001 Rev.A
Command Reference
This section contains a complete listing of all
commands in alphabetical order.
As shown in example 5 above, font 5 only supports
upper case characters. Refer to Appendix A for a
complete listing of available fonts and character sets
supported.
Use the LE command to create reverse print text in
stead of the “R”intheA command parameter p
This is the recommend method because it provides
the best size, position and centering of the black line
(rectangle) bordering the reversed text.
7
3-5
.
A Command - ASCII Text
Variable Data and
Counter Functions
Example:
Data with the RTC
Time & Date
Functions
The “Data” field can be replaced by or com
bined with the following commands:
Vnn= Prints the contents of variable “nn” at
this position where nn is a 2 digit num
ber from 00 to 99. See the V command,
page
Cn= Prints the contents of counter “n” at this
position where n is a one digit number
from 0 to 9. See the C command, page .
A50,0,0,1,1,1,N,"DATA"¿: Writes Text
A50,50,0,2,1,1,N,V01¿: Writes contents of variable 01
A50,100,0,3,1,1,N,C1¿: Writes contents of counter 1
A50,100,0,3,1,1,N,C1+2¿: Writes contents of counter 1 plus 2
The “Data” field can be replaced by or combined with the following variables:
TT = Prints the current time at this position in
the predefined format. See the TT command for format selection. This variable
is available only if the printer Time &
Date option is installed.
-
Examples:
TD=Prints the current date at this position in
the predefined format. See the TD command for format selection. This variable
is available only if the printer Time &
Date option is installed.
A50,150,0,4,1,1,N,TT↵: Writes current time
A50,200,0,5,1,1,N,TD↵: Writes current date
or a combination of several options:
A50,300,0,3,2,2,R,"Deluxe"V01C2"Combo"TDV01TT↵
:Writes the text “Deluxe” followed by the contents of variable 01 fol
lowed by the contents of counter 2 followed by the text “Combo” fol
lowed by the current date followed by the contents of variable 01
followed by the current time.
-
-
3-6
980352-001 Rev.A
A Command - ASCII TEXT
Simple Expressions
in Data Fields
Syntax Ap
Parameters For the p
Anadvancedfunctionof the A command allows
addition and subtraction to be performed on
constant and variable values in flash printers.
1,p2,p3,p4,p5,p6,p7
- p7and “DATA” parameters -
1
,"DATA"[p8p9p10…]
See first page of A command, page 3-4.
= Required. Must be a variable data field
p
8
number, e.g. V00, V01 etc.
= Required. Operator, + or –
p
9
= Required. Variable data field number
p
10
or constant value.
Valid Number Ranges:
Constant = 0 to 2147483647
Variable = 0 to 2147483647
Result = -2147483648 to 2147483647
❏The Expression must start with a variable
field.
❏Thecharacter field length defined for the first
variable in the expression will be used to for
mat the result. If the result is of a greater
length than the defined character length,
then the result field will contain ‘X’s.
❏
A syntax error will be generated during form
store if the constant value is too large.
❏
Ifanerror occurs during theevaluationofthe
expression, the resultant field will be filled
with ‘X’s.
-
980352-001 Rev.A
3-7
A Command - Simple Expressions in Data Fields
Example:
¿
FK"1"¿
FK"1"¿
FS"1"¿
V00,10,N,"Enter current mileage"¿
A100,100,0,4,1,1,N,"Current mileage is “V00" miles.”¿
A100,200,0,4,1,1,N,"Change oil at “V00+3000" miles.”¿
FE¿
¿
FK"2"¿
FK"2"¿
FS"2"¿
V00,10,N,"Enter current mileage."¿
V01,10,N,"Enter interval mileage."¿
A100,100,0,4,1,1,N,"Current mileage is “V00" miles.”¿
A100,200,0,4,1,1,N,"Mileage interval is “V01" miles.”¿
A100,200,0,4,1,1,N,"Change oil at “V00+V01" miles.”¿
FE¿
¿
FK"3"¿
FK"3"¿
FS"3"¿
V00,10,N,"Enter value 1."¿
V01,10,N,"Enter value 2."¿
V02,10,N,"Enter value 3."¿
A100,200,0,4,1,1,N,"Answer: “V01+123+V00-10-V02¿
FE¿
Asian Character Font
Sets
3-8
The flash based printers support three Asian
languagesets. Asian language support is an op
tional feature and requires a special version of
the printer (PCBA) to support the large Asian
character sets.
The Asian character maps and special features
of the A command that support the character
sets can be found on our Internet site or from
CD ROM. Click on the code page reference (in
the electronic manual version) to display the
Addendum and its code pages.
Chinese Addendum -P/N 980095-061
Japanese Addendum - P/N 980095-071
Korean Addendum -P/N 980095-081
980352-001 Rev.A
-
AUTOFR Command - Automatic Form Printing
Description This special form process allows you to detach
the printer from the computer and print in a
standalone mode. The EPL2 printer reserves
the form name AUTOFR to allow the printer to
automaticallystarta form whentheprinteris in
itialized power-up. This feature can be used in
many ways:.
Feed a single label in peel mode and print
·
multiple labels set to the number of labels on
the roll.
Have a form with a variable and enter the
·
variable with a scanner, terminal, weight
scale, circuit analyzer or any other device ca
pable of sending ASCII character data.
Using AUTOFR Download a form to the printer with the name
AUTOFR.
-
-
Example:
¿:Line Feed to initialize the printer
FK"AUTOFR"¿:Form Kill (delete any existingAUTOFR)
FS"AUTOFR"¿:Form Save (save file from here to FE at
: the bottom)
V00,8,L,""¿:Variable field definition
Q254,20¿:Label height followed by gap width
S2¿:Speed (2ips)
D7¿:Density setting
ZB¿:Print direction (ZTflips it 180 degrees)
A340,20,0,4,1,2,N,"QUANTITY"¿
:Fixed text line
B265,75,0,3,2,4,101,B,V00¿ :Bar code definition
PA1¿:Print1 labelAutomatically *
FE¿:FormEnd (Line Feed)
* - If using the CAL TOOLS, CAL WIN, etc. programs to gener
ate label files (files with .ejf extensions), then the PA command
must be added manually by editing the .ejf file.
-
980352-001 Rev.A
3-9
AUTOFR - Automatic Form Printing Feature
AUTOFR treats any incoming data as a variable in
tended for printing. This means if you send the
printer a memory partition command, the label will
print, if you send a delete command - the label will
print! So, while you are testing AUTOFR it isbest to
use another name for the form. Once you are satis
fied with the form, rename it AUTOFR before you
download it.Thereis no need to specify a file exten
sion.
Isolating Data From
the Input Device
Place the printer in the diagnostic dump mode
andsendfromyourdatainput device. All charac
tersthedevicesendswillbeprintedonthelabel.
If nothing prints, nothing is arriving - check
·
pin-outs and serial settings.
Disabling AUTOFR Senda XOFF data character (13 hex. or ASCII