EPL2 Counter I.E. Serialization

Simple counter format

C0,4,N,+1,"Serial Number"


Counter within a Form

The EPL2 "C" (counter) command used for creating an incrementing or decrementing field will only work within a form.  This is the only way to create an incrementing/decrementing field in EPL2.  The alternative is for the application to create the serial number and insert it into a text field.  An example of the counter used in a form is below:

The example is for a 4" by 5" label.

FK"01" :Deletes form named 01
FS"01" :Stores format below as 01
V00,2,N,"TOTAL NUMBER OF BOXES" :Variable field with prompt
C0,2,N,+1,"BOX NUMBER" :Counter variable
q812 :Print width setting
Q1016,25 :Print height and gap size setting
S4 :Speed setting
D11 :Darkness setting
ZB :Print inverted
TDmn/dd/y2 :Time and Date command
A220,40,0,2,1,1,N,"SHIPPER:" :Text field
A340,40,0,2,1,1,N,"ZEBRA TECHNOLOGIES CORP." :Text field
A110,80,0,4,4,3,N,"ZEBRA USA" :Text field
LO30,175,750,3 :Line command
A50,190,0,2,1,1,N,"333 Corporate Woods Parkway" :Text field
A50,220,0,2,1,1,N,"Vernon Hills IL 60061" :Text field
A50,250,0,2,1,1,N,"www.zebra.com" :Text field
LO420,175,3,100 :Line command
A440,185,0,3,1,1,N,"SERV LEVEL" :Text field
A450,210,0,2,4,4,N,"5TH" :Text field
LO620,175,3,100 :Line command
A650,185,0,3,1,1,N,"ORIGIN:" :Text field
A630,210,0,2,4,4,N,"SEA" :Text field
LO30,272,750,3 :Line command
A320,280,0,3,1,1,N,"DESTINATION" :Text field
A180,320,0,5,4,4,R,"ORD" :Text field
A260,530,0,3,1,1,N,"DEST:" :Text field
A340,530,0,3,1,1,N,"VERNON HILLS IL" :Text field
LO30,560,750,3 :Line command
A210,570,0,3,1,1,N,"HAWB #" :Text field
A110,600,0,3,3,2,N,"10336368" :Text field
A480,570,0,3,1,1,N,"NUMBER OF PIECES" :Text field
A500,600,0,3,3,2,N,"00005" :Text field
B120,640,0,3,3,6,104,N," 10336368005" :Barcode command
A300,765,0,3,1,1,N,"10336368005" :Text field
LO30,790,750,3 :Line command
A350,800,0,3,1,1,N,"MAWB #" :Text field
LO30,896,750,3 :Line command
A140,910,0,3,1,1,N,"LABEL:" :Text field
A100,950,0,3,1,2,N,C0 :Text field
A155,950,0,3,1,2,N,"OF" :Text field
A220,950,0,3,1,2,N,V00 :Text field
LO380,896,3,100 :Line command
A530,910,0,3,1,1,N,"DUE DATE" :Text field
A430,960,0,3,3,2,N,TD :Text field
FE :End Format

Once the form is downloaded to the printer, you can use the example below to get it to print:

FR"01" :Calls required form
? :Tells printer variables to follow
5 :Variable for number of boxes
1 :Variable for box number
P5,1 :Print quantity

Send the data in the order shown with a line feed between each field.