ZPL II Programming Guide For x.10 through x.
© 2006 ZIH Corp. The copyrights in this manual and the software and/or firmware in the label printer described therein are owned by ZIH Corp. Unauthorized reproduction of this manual or the software and/or firmware in the label printer may result in imprisonment of up to one year and fines of up to $10,000 (17 U.S.C.506). Copyright violators may be subject to civil liability. This product may contain ZPL®, ZPL II®, and ZebraLink™ programs; Element Energy Equalizer® Circuit; E3®; and Monotype Imaging fonts.
Contents Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii About This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Who Should Use This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii How This Document Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Contacts . . . . . . .
iv Contents ^BA ^BB ^BC ^BD ^BE ^BF ^BI ^BJ ^BK ^BL ^BM ^BO ^BP ^BQ ^BR ^BS ^BT ^BU ^BX ^BY ^BZ ^CC ^CD ^CF ^CI ^CM ^CO ^CT ^CV ^CW ~DB ~DE ^DF ~DG ~DN ~DS ~DT ~DU ~DY ~EG Code 93 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 CODABLOCK Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Code 128 Bar Code (Subsets A, B, and C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents ^FB ^FC ^FD ^FH ^FM ^FN ^FO ^FP ^FR ^FS ^FT ^FV ^FW ^FX ^GB ^GC ^GD ^GE ^GF ^GS ~HB ~HD ^HF ^HG ^HH ~HI ~HM ~HS ~HU ^HV ^HW ^HY ^HZ ^ID ^IL ^IM ^IS ~JA ^JB ~JB 9/15/06 Field Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Field Clock (for Real-Time Clock) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Field Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vi Contents ~JC ~JD ~JE ~JF ~JG ^JJ ~JL ^JM ~JN ~JO ~JP ~JR ^JS ~JS ^JT ^JU ^JW ~JX ^JZ ~KB ^KD ^KL ^KN ^KP ^LH ^LL ^LR ^LS ^LT ^MC ^MD ^MF ^ML ^MM ^MN ^MP ^MT ^MU ^MW ~NC Set Media Sensor Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Enable Communications Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Disable Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents ^NI ~NR ^NS ~NT ^PF ^PH ^PM ^PO ^PP ^PQ ^PR ~PR ~PS ^PW ~RO ^SC ~SD ^SE ^SF ^SL ^SN ^SO ^SP ^SQ ^SR ^SS ^ST ^SX ^SZ ~TA ^TO ~WC ^WD ^XA ^XB ^XF ^XG ^XZ ^ZZ 9/15/06 Network ID Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Set All Network Printers Transparent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Change Networking Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
viii Contents 3 • RFID Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 RFID Command Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Printer and Firmware Compatibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 ^HL ^HR ^RA ^RB ^RE ^RF ^RI ^RM ^RN ~RO ^RR ^RS ^RT ~RV ^RW ^RZ ^WF ^WT ^WV or ~HL Return RFID Data Log to Host . . . . . . . . . . . . . .
Contents A • Zebra Code Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 Zebra Code Page 850. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 Zebra Code Page 1252. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 B • ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
x Contents Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ _______________________________________________
Functional Table of Contents Abort Download Graphic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 ANSI Codabar Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Applicator Reprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Aztec Bar Code Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xii Functional Table of Contents Configuration Label Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Configuration Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Data Matrix Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Define EPC Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Functional Table of Contents Graphic Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Graphic Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Graphing Sensor Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Halt ZebraNet Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xiv Functional Table of Contents Planet Code bar code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plessey Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 POSTNET Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Power On Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Functional Table of Contents Set Date and Time (for Real-Time Clock) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Set Dots per Millimeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Set Label Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Set LEAP Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xvi Functional Table of Contents Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ _________________________
About This Document This section provides you with contact information, document structure and organization, and additional reference documents. Contents Who Should Use This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii How This Document Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xviii About This Document Who Should Use This Document Who Should Use This Document This Guide is for programmers who are familiar working with programming languages. How This Document Is Organized The Guide is set up as follows: 45541L-004 Rev. A Section Description Introduction Provides a high-level overview about this guide and Zebra Programming Language (ZPL). ZPL Commands Provides an alphabetical, detailed description of each ZPL command.
About This Document Contacts Contacts You can contact Zebra Technologies at the following: Web Site http://www.zebra.com Technical Support via the Internet is available 24 hours per day, 365 days per year. Go to http://www.zebra.com/support. The Americas Regional Headquarters Technical Support Customer Service Dept. Zebra Technologies International, LLC 333 Corporate Woods Parkway Vernon Hills, Illinois 60061.3109 U.S.
xx About This Document Document Conventions Document Conventions The following conventions are used throughout this document to convey certain information. Alternate Color (online only) Cross-references contain hot links to other sections in this guide. If you are viewing this guide online in .pdf format, you can click the cross-reference (blue text) to jump directly to its location. Command Line Examples Command line examples appear in Courier New font.
1 Introduction This guide is the unabridged, alphabetical reference of programming commands supported in the firmware. Firmware You can get the printer’s firmware version by printing out a configuration label. For instructions to do so, see your printer’s user guide. Note • Firmware upgrades are available at: www.zebra.com.
2 Introduction Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ___________________________________________
2 ZPL Commands This section contains the complete alphabetical listing of ZPL II commands. Description This heading provides an explanation of how the command is used, what it is capable of, and any defining characteristics it has. Format Format explains how the command is syntactically arranged and what parameters it contains. For Example The ^B8 command prints a EAN-8 bar code. The format of the ^B8 command is: ^B8o,h,f,g.
4 ZPL Commands Example • When the command is best clarified in context, an example of the ZPL II code is provided. Text indicating exact code entered is printed in an easily recognizable Courier font. An example of code using the ^B8 command looks like this: ^XA ^FO50,50 ^B8N,100,Y,N ^FD1234567^FS ^XZ Notice that the ^B8 parameter letters have been replaced with real values that apply to the command. In this example N,100,Y,N have been entered.
ZPL Commands Basic ZPL Exercises and Examples Basic ZPL Exercises and Examples The purpose of these exercises is to introduce basic ZPL commands to novice ZPL users. Make sure this checklist is complete: Load the printer with labels that are big enough to give you ample space to work with. Print a configuration label (CANCEL test). Look at the configuration label and make sure that the LEFT POSITION is set to 000 and LABEL TOP is set to 000. Determine the printer’s resolution.
6 ZPL Commands Basic ZPL Exercises and Examples Exercise 1 • This exercise shows you how to specify a location for an entered name. 1. Print your name on the label. 2. Start by printing just your name on the label. Use this format as a model: Important • Your name goes where you see xxxxxxxxxxx in the second line of code. 3.
ZPL Commands Basic ZPL Exercises and Examples Rotation commands 1. Change ^ADN to ^ADR, and then ^ADI, and then ^ADB. See how the print position changes. 2. Add more fields. 3. Add two more fields to print directly under your name using the ^ADN,36,20 font and size: Your street address Your city, state, zip 4.
8 ZPL Commands Basic ZPL Exercises and Examples Exercise 3 • Bar codes — ^B3 code 39 bar code 1. Write the following format and send to the printer: ^XA ^FO50,50^B3N,N,100,Y,N^FD123456^FS ^XZ 2. Try changing each of the parameters in the ^B3 string so you can see the effects. Important • For valid parameter choices, see ^B3 on page 22. ^B3o,e,h,f,g ^BY 3. Insert the ^BY command just before the ^B3 to see how the narrow bar width can be altered. ^FO50,50^BY2^B3..
ZPL Commands Basic ZPL Exercises and Examples Exercise 4 • ^SN — Serial Number command 1. Send this format to the printer: ^XA ^FO100,100^ADN,36,20^SN001,1,Y^FS ^PQ3 ^XZ To vary the ^SNv,n,z to exercise increment/decrement and leading zeros functions, consult this guide. If your serial number contains alpha and numeric characters, you can increment or decrement a specific segment of the data even if it is in the middle, as this sample sequence shows: ABCD1000EFGH, ABCD1001EFGH, ABCD1002EFGH 2.
10 ZPL Commands Basic ZPL Exercises and Examples Exercise 5 • Saving a template to memory. ^IS and image save and image load. Note • This exercise helps you troubleshoot your code against the errors you see on your labels. 1.
ZPL Commands Basic ZPL Exercises and Examples Exercise 6 • ^DF and ^XF — Download format and recall format Similar concept to ^IS and ^IL command. ^IS and ^IL processes faster in the printer than ^DF and ^XF. This is how the ^DF and ^XF format structure produces a label similar to the ^IS/^IL sample you just tried. Figure 1 • Download and Recall Format 1 ZPL II CODE GENERATED LABEL ^XA ^DFR:SAMPLE.
12 ZPL Commands ^A ^A Scalable/Bitmapped Font Description The ^A command specifies the font to use in a text field. ^A designates the font for the current ^FD statement or field. The font specified by ^A is used only once for that ^FD entry. If a value for ^A is not specified again, the default ^CF font is used for the next ^FD entry. Format ^Afo,h,w Important • Parameter f is required. If f is omitted it defaults to the last value of the ^CF command.
ZPL Commands ^A Scalable Font Command Example • This is an example of a scalable font command: Bitmap Font Command Example • This is an example of a bitmap font command: For reference, see Standard Printer Fonts on page 352, Zebra Code Page 850 on page 342, Fonts and Bar Codes on page 351, and ASCII on page 347. Comments Fonts are built using a matrix that defines standard height-to-width ratios.
14 ZPL Commands ^A@ ^A@ Use Font Name to Call Font Description The ^A@ command uses the complete name of a font, rather than the character designation used in ^A. Once a value for ^A@ is defined, it represents that font until a new font name is specified by ^A@. Format ^A@o,h,w,d:o.x This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ^A@ Parameters Details o = font name Accepted Values: any valid font Default Value: if an invalid or no name is entered, the default set by ^CF is used. If no font has been specified in ^CF, font A is used. The font named carries over on all subsequent ^A@ commands without a font name. x = extension Accepted Values: .FNT = font .
16 ZPL Commands ^B0 ^B0 Aztec Bar Code Parameters Description The ^B0 command creates a two-dimensional matrix symbology made up of square modules arranged around a bulls-eye pattern at the center. Note • The Aztec bar code works with firmware V60.13.0.11A and higher. Format ^B0a,b,c,d,e,f,g This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ^B0 Parameters Details f = number of symbols for structured append Accepted Values: 1 through 26 Default Value: 1 g = optional ID field for structured append The ID field is a text string with 24-character maximum Default Value: no ID Example • This is an example of the ^B0 command: ZPL II CODE GENERATED LABEL ^XA ^B0R,7,N,0,N,1,0 ^FD 7. This is testing label 7^FS ^XZ 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
18 ZPL Commands ^B1 ^B1 Code 11 Bar Code Description The ^B1 command produces the Code 11 bar code, also known as USD-8 code. In a Code 11 bar code, each character is composed of three bars and two spaces, and the character set includes 10 digits and the hyphen (-). • ^B1 supports print ratios of 2.0:1 to 3.0:1. • Field data (^FD) is limited to the width (or length, if rotated) of the label. Format ^B1o,e,h,f,g Important • If additional information about the Code 11 bar code is required, go to www.
ZPL Commands ^B1 Example • This is an example of the Code 11 bar code: ZPL II CODE CODE 11 BAR CODE ^XA ^FO100,100^BY3 ^B1N,N,150,Y,N ^FD123456^FS ^XZ CODE 11 BAR CODE CHARACTERS 0 1 2 3 4 5 6 7 8 9 - Internal Start/Stop Character: When used as a stop character: is used with 1 check digit is used with 2 check digits 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
20 ZPL Commands ^B2 ^B2 Interleaved 2 of 5 Bar Code Description The ^B2 command produces the Interleaved 2 of 5 bar code, a high-density, self-checking, continuous, numeric symbology. Each data character for the Interleaved 2 of 5 bar code is composed of five elements: five bars or five spaces. Of the five elements, two are wide and three are narrow. The bar code is formed by interleaving characters formed with all spaces into characters formed with all bars. • ^B2 supports print ratios of 2.0:1 to 3.0:1.
ZPL Commands ^B2 Example • This is an example of an Interleaved 2 of 5 bar code: ZPL II CODE INTERLEAVED 2 OF 5 BAR CODE ^XA ^FO100,100^BY3 ^B2N,150,Y,N,N ^FD123456^FS ^XZ INTERLEAVED 2 OF 5 BAR CODE CHARACTERS 0 1 2 3 4 5 6 7 8 9 Start/Stop (internal) Comments The total number of digits in an Interleaved 2 of 5 bar code must be even. The printer automatically adds a leading 0 (zero) if an odd number of digits is received.
22 ZPL Commands ^B3 ^B3 Code 39 Bar Code Description The Code 39 bar code is the standard for many industries, including the U.S. Department of Defense. It is one of three symbologies identified in the American National Standards Institute (ANSI) standard MH10.8M-1983. Code 39 is also known as USD-3 Code and 3 of 9 Code. Each character in a Code 39 bar code is composed of nine elements: five bars, four spaces, and an inter-character gap.
ZPL Commands ^B3 Parameters Details f = print interpretation line Accepted Values: Y = yes N = no Default Value: Y g = print interpretation line above code Accepted Values: Y = yes N = no Default Value: N Example • This is an example of a Code 39 bar code: ZPL II CODE CODE 39 BAR CODE ^XA ^FO100,100^BY3 ^B3N,N,100,Y,N ^FD123ABC^FS ^XZ CODE 39 BAR CODE CHARACTERS 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z .
24 ZPL Commands ^B3 Full ASCII Mode for Code 39 Code 39 can generate the full 128-character ASCII set using paired characters as shown in these tables: Table 1 • Code 39 Full ASCII Mode ASCII SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS FS RS US 45541L-004 Rev. A Code 39 $A $B $C $D $E $F $G $H $I $J $K $L $M $N $O $P $Q $R $S $T $U $V $W $X $Y $Z %A %B %C %D %E ZPL II Programming Guide ASCII SP ! “ # $ % & ‘ ( ) * ++ ‘ .
ZPL Commands ^B3 Table 2 • Code 39 Full ASCII Mode 9/15/06 ASCII Code 39 ASCII Code 39 @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ %V A B C D E F G H I J K L M N O P Q R S T U V W X Y Z %K %L %M %N %O ‘ a b c d e f g h I j k l m n o p q r s t u v w x y z { | } ~ DEL %W +A +B +C +D +E +F +G +H +I +J +K +L +M +N +O +P +Q +R +S +T +U +V +W +X +Y +Z %P %Q %R %S %T, %X ZPL II Programming Guide 45541L-004 Rev.
26 ZPL Commands ^B4 ^B4 Code 49 Bar Code Description The ^B4 command creates a multi-row, continuous, variable-length symbology capable of encoding the full 128-character ASCII set. It is ideally suited for applications requiring large amounts of data in a small space. The code consists of two to eight rows. A row consists of a leading quiet zone, four symbol characters encoding eight code characters, a stop pattern, and a trailing quiet zone.
ZPL Commands ^B4 Parameters Details f = print interpretation line Accepted Values: N = no line printed A = print interpretation line above code B = print interpretation line below code Default Value: N When the field data exceeds two rows, expect the interpretation line to extend beyond the right edge of the bar code symbol.
28 ZPL Commands ^B4 Table 3 • Code 49 Field Data Set Unshifted Character Set Shift 1 Character Set Shift 2 Character Set 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z . SPACE $ / ++ % < (Shift 1) > (Shift 2) : (N.A.) ; (N.A.) ? (N.A.) = (Numeric Shift) 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z .
ZPL Commands ^B4 Code 49 Field Data Character Set The ^FD data sent to the printer when using starting modes 0 to 5 is based on the Code 49 Internal Character Set. This is shown in the first column of the Code 49 table on the previous page. These characters are Code 49 control characters: : ; < = > ? Valid field data must be supplied when using modes 0 to 5. Shifted characters are sent as a two-character sequence of a shift character followed by a character in the unshifted character set.
30 ZPL Commands ^B5 ^B5 Planet Code bar code Description The ^B5 command is supported in all printers as a resident bar code. Note • Accepted bar code characters are 0 - 9.
ZPL Commands ^B7 ^B7 PDF417 Bar Code Description The ^B7 command produces the PDF417 bar code, a two-dimensional, multirow, continuous, stacked symbology. PDF417 is capable of encoding over 1,000 characters per bar code. It is ideally suited for applications requiring large amounts of information at the time the bar code is read. The bar code consists of three to 90 stacked rows. Each row consists of start and stop patterns and symbol characters called code-words.
32 ZPL Commands ^B7 Parameters Details c = number of data columns to encode Accepted Values: 1 to 30 Default Value: 1:2 (row-to-column aspect ratio) You can specify the number of code-word columns giving control over the width of the symbol. r = number of rows to encode Accepted Values: 3 to 90 Default Value: 1:2 (row-to-column aspect ratio) You can specify the number of symbol rows giving control over the height of the symbol.
ZPL Commands ^B7 Example • This is an example of a PDF417 without and with truncation selected: Example • This example shows the ^B7 command used with field hex (^FH) characters: ZPL II CODE GENERATED LABEL ^XA ^FO50,50^BY3,3.0^B7N,8,5,7,21,N ^FH_^FD[)>_1E06_1DP12345678_1DQ160 _1D1JUN123456789A2B4C6D8E_1D20LA6-987 _1D21L54321 ZES_1D15KG1155 _1DBSC151208_1D7Q10GT_1E_04^FS ^XZ Comments Noted in this bulleted list: • If both columns and rows are specified, their product must be less than 928.
34 ZPL Commands ^B7 Special Considerations for ^BY When Using PDF417 When used with ^B7, the parameters for the ^BY command are: w = module width (in dots) Accepted Values: 2 to 10 Default Value: 2 r = ratio Fixed Value: 3 (ratio has no effect on PDF417) h = height of bars (in dots) Accepted Values: 1 to 32000 Default Value: 10 PDF417 uses this only when row height is not specified in the ^B7 h parameter.
ZPL Commands ^B8 ^B8 EAN-8 Bar Code Description The ^B8 command is the shortened version of the EAN-13 bar code. EAN is an acronym for European Article Numbering. Each character in the EAN-8 bar code is composed of four elements: two bars and two spaces. • ^B8 supports a fixed ratio. • Field data (^FD) is limited to exactly seven characters. ZPL II automatically pads or truncates on the left with zeros to achieve the required number of characters.
36 ZPL Commands ^B8 Example • This is an example of an EAN-8 bar code: ZPL II CODE EAN-8 BAR CODE ^XA ^FO100,100^BY3 ^B8N,100,Y,N ^FD1234567^FS ^XZ EAN-8 BAR CODE CHARACTERS 0 45541L-004 Rev.
ZPL Commands ^B9 ^B9 UPC-E Bar Code Description The ^B9 command produces a variation of the UPC symbology used for number system 0. It is a shortened version of the UPC-A bar code, where zeros are suppressed, resulting in codes that require less printing space. The 6 dot/mm, 12 dot/mm, and 24 dot/mm printheads produce the UPC and EAN symbologies at 100 percent of their size. However, an 8 dot/mm printhead produces the UPC and EAN symbologies at a magnification factor of 77 percent.
38 ZPL Commands ^B9 Parameters Details g = print interpretation line above code Accepted Values: N = no Y = yes Default Value: N e = print check digit Accepted Values: N = no Y = yes Default Value: Y Example • This is an example of a UPC-E bar code: UPC-E BAR CODE ZPL II CODE ^XA ^FO150,100^BY3 ^B9N,100,Y,N,Y ^FD1230000045^FS ^XZ UPC-E BAR CODE CHARACTERS 0 1 2 3 4 5 6 7 8 9 Rules for Proper Product Code Numbers • If the last three digits in the manufacturer’s number are 000, 100, or 20
ZPL Commands ^BA ^BA Code 93 Bar Code Description The ^BA command creates a variable length, continuous symbology. The Code 93 bar code is used in many of the same applications as Code 39. It uses the full 128-character ASCII set. ZPL II, however, does not support ASCII control codes or escape sequences. It uses the substitute characters shown below.
40 ZPL Commands ^BA Parameters Details g = print interpretation line above code Accepted Values: N = no Y = yes Default Value: N e = print check digit Accepted Values: N = no Y = yes Default Value: N Example • This is an example of a Code 93 bar code: Comments All control codes are used in pairs. Code 93 is also capable of encoding the full 128-character ASCII set. For more details, see Table 4 on page 41.
ZPL Commands ^BA Table 4 • Code 93 Full ASCII Mode ASCII NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS FS RS US 9/15/06 Code 93 ASCII ‘U &A &B &C &D &E &F &G &H &I &J &K &L &M &N &O &P &Q &R &S &T &U &V &W &X &Y &Z ‘A ‘B ‘C ‘D ‘E ZPL II Programming Guide SP ! “ # $ % & ‘ ( ) * ++ ‘ . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? Code 93 Space (A (B (C (D (E (F (G (H (I (J ++ (L . / O 1 2 3 4 5 6 7 8 9 (Z ‘F ‘G ‘H ‘I ‘J 45541L-004 Rev.
42 ZPL Commands ^BA Table 5 • Code 93 Full ASCII Mode 45541L-004 Rev.
ZPL Commands ^BB ^BB CODABLOCK Bar Code Description The ^BB command produces a two-dimensional, multirow, stacked symbology. It is ideally suited for applications that require large amounts of information. Depending on the mode selected, the code consists of one to 44 stacked rows. Each row begins and ends with a start and stop pattern. • CODABLOCK A supports variable print ratios. • CODABLOCK E and F support only fixed print ratios.
44 ZPL Commands ^BB Parameters Details r = number of rows to encode Accepted Values: for CODABLOCK A: 1 to 22 for CODABLOCK E and F: 2 to 4 m = mode 45541L-004 Rev. A • If values for c and r are not specified, a single row is produced. • If a value for r is not specified, and c exceeds the maximum range, a single row equal to the field data length is produced. • If a value for c is not specified, the number of characters per row is derived by dividing the field data by the value of r.
ZPL Commands ^BB Example • This is an example of a CODABLOCK bar code: Special Considerations for the ^BY Command When Using ^BB The parameters for the ^BYw,r,h command, when used with a ^BB code, are as follows: w = module width (in dots) Accepted Values: 2 to 10 (CODABLOCK A only) Default Value: 2 r = ratio Fixed Value: 3 (ratio has no effect on CODABLOCK E or F) h = height of bars (in dots) Accepted Values: 1 to 32,32000 Default Value: 10 CODABLOCK uses this as the overall symbol height only when the r
46 ZPL Commands ^BB = 80 hex = 82 hex = 81 hex = 83 hex = 84 hex For any other character above 84 hex, either no bar code is printed or an error message is printed (if ^CV is active). CODABLOCK F: CODABLOCK F uses the full ASCII set, except for those characters with special meaning to the printer. Function codes or the Code 128 Subset A character can be inserted using of the ^FH command.
ZPL Commands ^BC ^BC Code 128 Bar Code (Subsets A, B, and C) Description The ^BC command creates the Code 128 bar code, a high-density, variable length, continuous, alphanumeric symbology. It was designed for complexly encoded product identification. Code 128 has three subsets of characters. There are 106 encoded printing characters in each set, and each character can have up to three different meanings, depending on the character subset being used.
48 ZPL Commands ^BC Parameters Details e = UCC check digit Accepted Values: Y (turns on) or N (turns off) Mod 103 check digit is always there. It cannot be turned on or off. Mod 10 and 103 appear together with e turned on. Default Value: N m = mode Accepted Values: N = no selected mode U = UCC Case Mode • More than 19 digits in ^FD or ^SN are eliminated. • Fewer than 19 digits in ^FD or ^SN add zeros to the right to bring the count to 19. This produces an invalid interpretation line.
ZPL Commands ^BC Code 128 Subsets The Code 128 character subsets are referred to as Subset A, Subset B, and Subset C. A subset can be selected in these ways: • A special Invocation Code can be included in the field data (^FD) string associated with that bar code. • The desired Start Code can be placed at the beginning of the field data. If no Start Code is entered, Subset B are used. To change subsets within a bar code, place the Invocation Code at the appropriate points within the field data (^FD) string.
50 ZPL Commands ^BC Table 7 shows the character sets for Code 128: Table 7 • Code 128 character sets Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 45541L-004 Rev. A Code A SP ! '' # $ % & ' ( ) * ++ , . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T Code B SP ! '' # $ % & ' ( ) * ++ , .
ZPL Commands ^BC Example • Figures A and B are examples of identical bar codes, and Figure C is an example of switching from Subset C to B to A, as follows: Because Code 128 Subset B is the most commonly used subset, ZPL II defaults to Subset B if no start character is specified in the data string. ^XA ^FO50,50 ^BY3^BCN,100,Y,N,N ^FD>;382436>6CODE128>752375152^FS ^XZ Figure C: Switching from Subset C to B to A How ^BC Works Within a ZPL II Script ^XA – the first command starts the label format.
52 ZPL Commands ^BC The ^FD command for Figure A does not specify any subset, so Subset B is used. In Figure B, the ^FD command specifically calls Subset B with the >: Start Code. Although ZPL II defaults to Code B, it is good practice to include the Invocation Codes in the command. Code 128 – Subset B is programmed directly as ASCII text, except for values greater than 94 decimal and a few special characters that must be programmed using the invocation codes.
ZPL Commands ^BC The UCC/EAN-128 Symbology The symbology specified for the representation of Application Identifier data is UCC/EAN128, a variant of Code 128, exclusively reserved to EAN International and the Uniform Code Council (UCC). Note • It is not intended to be used for data to be scanned at the point of sales in retail outlets. UCC/EAN-128 offers several advantages. It is one of the most complete, alphanumeric, onedimensional symbologies available today.
54 ZPL Commands ^BC Using N for the mode (m) parameter Example • This example shows with application identifier 00 structure: N FOR THE M PARAMETER ZPL II CODE ^XA ^FO90,200^BY4 ^BCN,256,Y,N,Y,N ^FD>;>80012345123451234512^FS ^XZ • >;>8' sets it to subset C, function 1 • '00' is the application identifier followed by '17 characters', the check digit is selected using the 'Y' for the (e) parameter to automatically print the 20th character.
ZPL Commands ^BC Using D for the mode (m) parameter Example • This example shows application identifier 00 format ((x.11.x and above): D FOR THE M PARAMETER ZPL II CODE ^XA ^FO50,200^BCN,150,Y,N,,D ^FD(00)10084423 7449200940^FS ^XZ (0 at end of field data is a bogus character that is inserted as a place holder for the check digit the printer will automatically insert. • Subset C using FNC1 values are automatically selected. • Parentheses and spaces can be in the field data.
56 ZPL Commands ^BC • You have to make sure you enter the correct check digit in the text field. • Creating a separate text field allows you to format the interpretation line with parentheses and spaces. FIRMWARE OLDER THAN X.10.
ZPL Commands ^BC Table 8 • UCC Application Identifier Table Data Content 9/15/06 Plus The Following Data Structure AI Serial Shipping Container Code (SSCC) 00 exactly 18 digits Shipping Container Code 01 exactly 14 digits Batch Numbers 10 up to 20 alpha numerics Production Date (YYMMDD) 11 exactly 6 digits Packaging Date (YYMMDD) 13 exactly 6 digits Sell By Date (YYMMDD) 15 exactly 6 digits Expiration Date (YYMMDD) 17 exactly 6 digits Product Variant 20 exactly 2 digits Serial N
58 ZPL Commands ^BC Note • Table 8 is a partial table showing the application identifiers. For more current and complete information, search the Internet for UCC Application Identifier. For date fields that only need to indicate a year and month, the day field is set to 00. * Plus one digit for length indication. ** Plus one digit for decimal point indication. Chaining several application identifiers (firmware x.11.
ZPL Commands ^BC Example • This is an example with the mode parameter set to D*: ^XA ^PON ^LH0,0 ^BY2,2.5,145 ^FO218,343 ^BCB,,Y,N,N,D ^FD(91)0005886>8(10)0000410549>8(99)05^FS ^XZ D* — When trying to print the last Application Identifier with an odd number of characters, a problem existed when printing EAN128 bar codes using Mode D. The problem was fixed in firmware V60.13.0.6. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
60 ZPL Commands ^BD ^BD UPS MaxiCode Bar Code Description The ^BD command creates a two-dimensional, optically read (not scanned) code. This symbology was developed by UPS (United Parcel Service). Notice that there are no additional parameters for this code and it does not generate an interpretation line. The ^BY command has no effect on the UPS MaxiCode bar code. However, the ^CV command can be activated.
ZPL Commands ^BD Special Considerations for ^FD when Using ^BD The ^FD statement is divided into two parts: a high priority message (hpm) and a low priority message (lpm). There are two types of high priority messages. One is for a U.S. Style Postal Code; the other is for a non-U.S. Style Postal Code. The syntax for either of these high priority messages must be exactly as shown or an error message is generated.
62 ZPL Commands ^BD Comments • The formatting of and apply only when using Modes 2 and 3. Mode 4, for example, takes whatever data is defined in the ^FD command and places it in the symbol. • UPS requires that certain data be present in a defined manner. When formatting MaxiCode data for UPS, always use uppercase characters. When filling in the fields in the for UPS, follow the data size and types specified in Guide to Bar Coding with UPS.
ZPL Commands ^BE ^BE EAN-13 Bar Code Description The ^BE command is similar to the UPC-A bar code. It is widely used throughout Europe and Japan in the retail marketplace. The EAN-13 bar code has 12 data characters, one more data character than the UPC-A code. An EAN-13 symbol contains the same number of bars as the UPC-A, but encodes a 13th digit into a parity pattern of the left-hand six digits. This 13th digit, in combination with the 12th digit, represents a country code.
64 ZPL Commands ^BE Example • This is an example of an EAN-13 bar code: Comments The EAN-13 bar code uses the Mod 10 check-digit scheme for error checking. For more information on Mod 10, see Mod 10 Check Digit on page 364. 45541L-004 Rev.
ZPL Commands ^BF ^BF Micro-PDF417 Bar Code Description The ^BF command creates a two-dimensional, multi-row, continuous, stacked symbology identical to PDF417, except it replaces the 17-module-wide start and stop patterns and left/right row indicators with a unique set of 10-module-wide row address patterns. These reduce overall symbol width and allow linear scanning at row heights as low as 2X.
66 ZPL Commands ^BF Example • This is an example of a Micro-PDF417 bar code: To encode data into a Micro-PDF417 Bar Code, complete these steps: 1. Determine the type of data to be encoded (for example, ASCII characters, numbers, 8-bit data, or a combination). 2. Determine the maximum amount of data to be encoded within the bar code (for example, number of ASCII characters, quantity of numbers, or quantity of 8-bit data characters). 3.
ZPL Commands ^BF Table 9 • Micro-PDF417 Mode Mode (M) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 9/15/06 Number Number of Data of Data Columns Rows 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 11 14 17 20 24 28 8 11 14 17 20 23 26 6 8 10 12 15 20 26 32 38 44 6 8 10 12 15 20 26 32 38 44 4 ZPL II Programming Guide % of Max Cws for Alpha EC Characters 64 50 41 40 33 29 50 41 32 29 28 28 29 67 58 53 50 47 43 41 40 39 38 50 44 40 38
68 ZPL Commands ^BI ^BI Industrial 2 of 5 Bar Codes Description The ^BI command is a discrete, self-checking, continuous numeric symbology. The Industrial 2 of 5 bar code has been in use the longest of the 2 of 5 family of bar codes. Of that family, the Standard 2 of 5 (^BJ) and Interleaved 2 of 5 (^B2) bar codes are also available in ZPL II. With Industrial 2 of 5, all of the information is contained in the bars.
ZPL Commands ^BI Example • This is an example of an Industrial 2 of 5 bar code: 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
70 ZPL Commands ^BJ ^BJ Standard 2 of 5 Bar Code Description The ^BJ command is a discrete, self-checking, continuous numeric symbology. With Standard 2 of 5, all of the information is contained in the bars. Two bar widths are employed in this code, the wide bar measuring three times the width of the narrow bar. • ^BJ supports a print ratio of 2.0:1 to 3.0:1. • Field data (^FD) is limited to the width (or length, if rotated) of the label.
ZPL Commands ^BJ Example • This is an example of a Standard 2 of 5 bar code: 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
72 ZPL Commands ^BK ^BK ANSI Codabar Bar Code Description The ANSI Codabar bar code is used in a variety of information processing applications such as libraries, the medical industry, and overnight package delivery companies. This bar code is also known as USD-4 code, NW-7, and 2 of 7 code. It was originally developed for retail price labeling. Each character in this code is composed of seven elements: four bars and three spaces.
ZPL Commands ^BK Example • This is an example of an ANSI Codabar bar code: 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
74 ZPL Commands ^BL ^BL LOGMARS Bar Code Description The ^BL command is a special application of Code 39 used by the Department of Defense. LOGMARS is an acronym for Logistics Applications of Automated Marking and Reading Symbols. • ^BL supports a print ratio of 2.0:1 to 3.0:1. • Field data (^FD) is limited to the width (or length, if rotated) of the label. Lowercase letters in the ^FD string are converted to the supported uppercase LOGMARS characters.
ZPL Commands ^BL Example • This is an example of a LOGMARS bar code: Comments The LOGMARS bar code produces a mandatory check digit using Mod 43 calculations. For further information on the Mod 43 check digit, see Mod 43 Check Digit on page 365. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
76 ZPL Commands ^BM ^BM MSI Bar Code Description The ^BM command is a pulse-width modulated, continuous, non-self- checking symbology. It is a variant of the Plessey bar code (^BP). Each character in the MSI bar code is composed of eight elements: four bars and four adjacent spaces. • ^BM supports a print ratio of 2.0:1 to 3.0:1. • For the bar code to be valid, field data (^FD) is limited to 1 to 14 digits when parameter e is B, C, or D.
ZPL Commands ^BM Parameters Details g = print interpretation line above code Accepted Values: N = no Y = yes Default Value: N e2 = inserts check digit into the interpretation line Accepted Values: N = no Y = yes Default Value: N Example • This is an example of a MSI bar code: 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
78 ZPL Commands ^BO ^BO Aztec Bar Code Parameters Description The ^BO command creates a two-dimensional matrix symbology made up of square modules arranged around a bulls-eye pattern at the center. Note • The Aztec bar code works with firmware V60.13.0.11A and higher. Format ^BOa,b,c,d,e,f,g This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ^BO Parameters Details f = number of symbols for structured append Accepted Values: 1 through 26 Default Value: 1 g = optional ID field for structured append The ID field is a text string with 24-character maximum Default Value: no ID Example • This is an example of the ^B0 command: ZPL II CODE GENERATED LABEL ^XA ^B0R,7,N,0,N,1,0 ^FD 7. This is testing label 7^FS ^XZ 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
80 ZPL Commands ^BP ^BP Plessey Bar Code Description The ^BP command is a pulse-width modulated, continuous, non-self- checking symbology. Each character in the Plessey bar code is composed of eight elements: four bars and four adjacent spaces. • ^BP supports a print ratio of 2.0:1 to 3.0:1. • Field data (^FD) is limited to the width (or length, if rotated) of the label. Format ^BPo,e,h,f,g Important • If additional information about the Plessey bar code is required, go to www.aimglobal.org.
ZPL Commands ^BP Example • This is an example of a Plessey bar code: 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
82 ZPL Commands ^BQ ^BQ QR Code Bar Code Description The ^BQ command produces a matrix symbology consisting of an array of nominally square modules arranged in an overall square pattern. A unique pattern at three of the symbol’s four corners assists in determining bar code size, position, and inclination. A wide range of symbol sizes is possible, along with four levels of error correction. Userspecified module dimensions provide a wide variety of symbol production techniques.
ZPL Commands ^BQ Parameters Details d = H,Q,M,L Accepted Values: H = ultra-high reliability level Q = high reliability level M = standard level L = high density level Default Value: Q = if empty M = invalid values e = N,A,B.K Accepted Values: 1 - 7 Default Value: 7 Example • This is an example of a QR Code bar code: On the pages that follow are specific commands for formatting the ^BQ command with the ^FD statements that contain the information to be coded.
84 ZPL Commands ^BQ Considerations for ^FD When Using the QR Code: QR Switches (formatted into the ^FD field data) mixed mode D = allows mixing of different types of character modes in one code. code No. <01 16> Value = subtracted from the Nth number of the divided code (must be two digits). No. of divisions <02 16> Number of divisions (must be two digits).
ZPL Commands ^BQ ^FD Field Data (Normal Mode) Automatic Data Input (A) with Switches ^FD A, ^FS Example • QR Code, normal mode with automatic data input.
86 ZPL Commands ^BQ Example • QR Code, normal mode with manual data input: GENERATED LABEL ZPL II CODE ^XA ^FO20,20^BQ,2,10 ^FDHM,N123456789012345^FS ^XZ 1 1 2 3 4 2 4 3 H = error correction level (ultra-high reliability level M, = input mode (manual input) N = character mode (numeric data) data character string Example • QR Code, normal mode with standard reliability and manual data input: GENERATED LABEL ZPL II CODE ^XA ^FO20,20^BQ,2,10^FDMM,AAC-42^FS ^XZ 1 2 3 4 1 2 3 4 45541L-004 Rev.
ZPL Commands ^BQ ^FD Field Data (Mixed Mode – requires more switches) Automatic Data Input (A) with Switches ^FD , A, , , < : >, ^FS Manual Data Input (M) with Switches ^FD
88 ZPL Commands ^BQ Example • QR Code, mixed mode with manual data input: GENERATED LABEL ZPL II CODE ^XA ^FO,20,20^BQ,2,10 ^FDD03048F,LM,N0123456789,A12AABB,B0006qrcode^FS ^XZ D (mixed) M (code number)
ZPL Commands ^BQ Example • This is an example of QR Code, mixed mode with automatic data input: ^XA ^FO20,20^BQ,2,10 ^FDD03048F,LA,012345678912AABBqrcode^FS ^XZ D (mixed) M (code number) D (divisions) M (0x8F) L (high-density level) A (automatic input) 9/15/06 ZPL II Programming Guide 012345678912AABBqrcode 45541L-004 Rev.
90 ZPL Commands ^BR ^BR RSS (Reduced Space Symbology) Bar Code Description The ^BR command is bar code types for space-constrained identification from EAN International and the Uniform Code Council, Inc. Format ^BRa,b,c,d,e,f This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ^BR Parameters Details e = bar code height The bar code height only affects the linear portion of the bar code. Only UCC/EAN & CC-A/B/C.
92 ZPL Commands ^BS ^BS UPC/EAN Extensions Description The ^BS command is the two-digit and five-digit add-on used primarily by publishers to create bar codes for ISBNs (International Standard Book Numbers). These extensions are handled as separate bar codes. The ^BS command is designed to be used with the UPC-A bar code (^BU) and the UPC-E bar code (^B9). • ^BS supports a fixed print ratio. • Field data (^FD) is limited to exactly two or five characters.
ZPL Commands ^BS Example • This is an example of a UPC/EAN Two-digit bar code: Example • This is an example of a UPC/EAN Five-digit bar code: Care should be taken in positioning the UPC/EAN extension with respect to the UPC-A or UPC-E code to ensure the resulting composite code is within the UPC specification. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
94 ZPL Commands ^BS For UPC codes, with a module width of 2 (default), the field origin offsets for the extension are: Example • This is an example of a UPC-A: Supplement Origin X - Offset Adjustment Y - Offset Normal 209 Dots 21 Dots Rotated 0 209 Dots Supplement Origin X - Offset Adjustment Y - Offset Normal 122 Dots 21 Dots Rotated 0 122 Dots This is an example of a UPC-E: Additionally, the bar code height for the extension should be 27 dots (0.
ZPL Commands ^BT ^BT TLC39 bar code Description The ^BT bar code is the standard for the TCIF can tag telecommunications equipment. The TCIF CLEI code, which is the Micro-PDF417 bar code, is always four columns. The firmware must determine what mode to use based on the number of characters to be encoded.
96 ZPL Commands ^BT Example • TLC39 Bar Code This is an example on how to print TLC39 bar code. The callouts identify the key components and are followed by a detailed description below: Use the command defaults to get results that are in compliance with TCIF industry standards; regardless of printhead density. 1 2 3 1 2 3 ECI Number. If the seventh character is not a comma, only Code 39 prints.
ZPL Commands ^BU ^BU UPC-A Bar Code Description The ^BU command produces a fixed length, numeric symbology. It is primarily used in the retail industry for labeling packages. The UPC-A bar code has 11 data characters. The 6 dot/mm, 12 dot/mm, and 24 dot/mm printheads produce the UPC-A bar code (UPC/EAN symbologies) at 100 percent size. However, an 8 dot/mm printhead produces the UPC/EAN symbologies at a magnification factor of 77 percent. • ^BU supports a fixed print ratio.
98 ZPL Commands ^BU The font style of the interpretation line depends on the modulus (width of narrow bar) selected in ^BY: Note • Zero is not allowed. • 6 dot/mm printer: a modulus of 2 dots or greater prints with an OCR-B interpretation line; a modulus of 1 dot prints font A. • 8 dot/mm printer: a modulus of 3 dots or greater prints with an OCR-B interpretation line; a modulus of 1 or 2 dots prints font A.
ZPL Commands ^BX ^BX Data Matrix Bar Code Description The ^BX command creates a two-dimensional matrix symbology made up of square modules arranged within a perimeter finder pattern. The ability to create a rectangular Datamatrix bar code is not available as a ZPL coding option.
100 ZPL Commands ^BX Parameters Details c = columns to encode Accepted Values: 9 to 49 Odd values only for quality 0 to 140 (10 to 144); even values only for quality 200. Odd values only for quality 0 to 140 (10 to 144); even values only for quality 200. The number of rows and columns in the symbol is automatically determined. You might want to force the number of rows and columns to a larger value to achieve uniform symbol size.
ZPL Commands ^BX Table 10 • Maximum Field Sizes ECC LEVEL ID = 1 ID = 2 ID = 3 ID = 4 ID = 5 ID = 6 0 596 452 394 413 310 271 50 457 333 291 305 228 200 80 402 293 256 268 201 176 100 300 218 190 200 150 131 140 144 105 91 96 72 63 Maximum Field Sizes Example • This is an example of a Data Matrix bar code: Effects of ^BY on ^BX w = module width (no effect) r = ratio (no effect) h = height of symbol If the dimensions of individual symbol elements are not specified
102 ZPL Commands ^BX Quality 200 • If more than 3072 bytes are supplied as field data, it is truncated to 3072 bytes. This limits the maximum size of a numeric Data Matrix symbol to less than the 3116 numeric characters that the specification would allow. The maximum alphanumeric capacity is 2335 and the maximum 8-bit byte capacity is 1556. • If ^FH is used, field hexadecimal processing takes place before the escape sequence processing described below.
ZPL Commands ^BY ^BY Bar Code Field Default Description The ^BY command is used to change the default values for the module width (in dots), the wide bar to narrow bar width ratio and the bar code height (in dots). It can be used as often as necessary within a label format. Format ^BYw,r,h This table identifies the parameters for this format: Parameters Details w = module width (in dots) Accepted Values: 1 to 10 Initial Value at power-up: 2 r = wide bar to narrow bar width ratio Accepted Values: 2.
104 ZPL Commands ^BY Module width and height (w and h) can be changed at anytime with the ^BY command, regardless of the symbology selected. Table 11 • Shows module width ratios in dots Ratio Module Width in Dots (w) Selected (r) 1 2 3 4 5 6 7 8 9 10 2.0 2:1 2:1 2:1 2:1 2:1 2:1 2:1 2:1 2:1 2:1 2.1 2:1 2:1 2:1 2:1 2:1 2:1 2:1 2:1 2:1 2.1:1 2.2 2:1 2:1 2:1 2:1 2.2:1 2.16:1 2.1:1 2.12:1 2.1:1 2.2:1 2.3 2:1 2:1 2.3:1 2.25:1 2.2:1 2.16:1 2.28:1 2.25:1 2.
ZPL Commands ^BZ ^BZ POSTNET Bar Code Description The POSTNET bar code is used to automate the handling of mail. POSTNET uses a series of five bars, two tall and three short, to represent the digits 0 to 9. • ^BZ supports a print ratio of 2.0:1 to 3.0:1. • Field data (^FD) is limited to the width (or length, if rotated) of the label. Format ^BZo,h,f,g Important • If additional information about the POSTNET bar code is required, go to www.aimglobal.
106 ZPL Commands ^BZ Example • This is an example of a POSTNET bar code: 45541L-004 Rev.
ZPL Commands ^CC ~CC ^CC ~CC Change Carets Description The ^CC command is used to change the format command prefix. The default prefix is the caret (^). Format ^CCx or ~CCx This table identifies the parameters for this format: Parameters Details x = caret character change Accepted Values: any ASCII character Default Value: a parameter is required. If a parameter is not entered, the next character received is the new prefix character.
108 ZPL Commands ^CD ~CD ^CD ~CD Change Delimiter Description The ^CD and ~CD commands are used to change the delimiter character. This character is used to separate parameter values associated with several ZPL II commands. The default delimiter is a comma (,). Format ^CDa or ~CDa This table identifies the parameters for this format: Parameters Details a = delimiter character change Accepted Values: any ASCII character Default Value: a parameter is required.
ZPL Commands ^CF ^CF Change Alphanumeric Default Font Description The ^CF command sets the default font used in your printer. You can use the ^CF command to simplify your programs.
110 ZPL Commands ^CF Comments Any font in the printer, including downloaded fonts, EPROM stored fonts, and fonts A through Z and 0 to 9, can also be selected with ^CW. 45541L-004 Rev.
ZPL Commands ^CI ^CI Change International Font/Encoding Description Zebra printers can print fonts using international character sets: U.S.A.1, U.S.A.2, UK, Holland, Denmark/Norway, Sweden/Finland, Germany, France 1, France 2, Italy, Spain, and several other sets, .. The ^CI command enables you to call up the international character set you want to use for printing. You can mix character sets on a label. This command allows character remapping.
112 ZPL Commands ^CI This table identifies the parameters for this format: 45541L-004 Rev. A Parameters Details a = desired character set Accepted values 0 - 12 are Zebra Code Page 850 with specific character replacements. For details, see International Character Sets on page 114 and/or Zebra Code Page 850 on page 342. Accepted Values: 0 = Single Byte Encoding - U.S.A. 1 Character Set 1 = Single Byte Encoding - U.S.A. 2 Character Set 2 = Single Byte Encoding - U.K.
ZPL Commands ^CI Parameters Details d2 = destination 2 (character input) Accepted Values: decimals 0 to 255 … = continuation of pattern Up to 256 source and destination pairs can be entered in this command. * The encoding is controlled by the conversion table (*.DAT). The table generated by ZTools™ is the TrueType fonts internal encoding (Unicode). ** Shift-JIS encoding converts Shift-JIS to JIS and then looks up the JIS conversion in JIS.DAT. This table must be present for Shift-JIS to function.
114 ZPL Commands ^CI International Character Sets Note • ^CI 13 = US keyboard Comments The space character cannot be remapped for any font. 45541L-004 Rev.
ZPL Commands ^CM ^CM Change Memory Letter Designation Description The ^CM command allows you to reassign a letter designation to the printer’s memory devices. If a format already exists, you can reassign the memory device to the corresponding letter without forcing, altering, or recreating the format itself. Using this command affects every subsequent command that refers to specific memory locations.
116 ZPL Commands ^CO ^CO Cache On Note • If you have firmware x.12 or greater this command is not required because the printer firmware automatically expands the size of the character cache as needed. Description The ^CO command is used to change the size of the character cache. By definition, a character cache (referred to as cache) is a portion of the DRAM reserved for storing scalable characters. All printers have a default 40K cache that is always turned on.
ZPL Commands ^CO This table identifies the parameters for this format: Parameters Details a = cache on Accepted Values: N = no Y = yes Default Value: Y b = amount of additional memory to be added to cache (in K) Accepted Values: any size up to total memory available Default Value: 40 c = cache type Accepted Values: 0 = cache buffer (normal fonts) 1 = internal buffer (recommended for Asian fonts) Default Value: 0 Example • To resize the print cache to 62K, assuming a 22K existing cache: ^COY,40 To
118 ZPL Commands ^CT ~CT ^CT ~CT Change Tilde Description The ^CT and ~CT commands are used to change the control command prefix. The default prefix is the tilde (~). Format ^CTa or ~CTa This table identifies the parameters for this format: Parameters Details a = change control command character Accepted Values: any ASCII character Default Value: a parameter is required. If a parameter is not entered, the next character received is the new control command character.
ZPL Commands ^CV ^CV Code Validation Description The ^CV command acts as a switch to turn the code validation function on and off.
120 ZPL Commands ^CV Example • The examples below show the error labels ^CVY generates when incorrect field data is entered. Compare the letter following INVALID – to the listing on the previous page.
ZPL Commands ^CW ^CW Font Identifier Description All built-in fonts are referenced using a one-character identifier. The ^CW command assigns a single alphanumeric character to a font stored in DRAM, memory card, EPROM, or Flash. If the assigned character is the same as that of a built-in font, the downloaded font is used in place of the built-in font. The new font is printed on the label wherever the format calls for the built-in font.
122 ZPL Commands ^CW Example • These examples show how to use: • MYFONT.FNT stored in DRAM whenever a format calls for Font A: ^XA ^CWA,R:MYFONT.FNT ^XZ • MYFONT.FNT stored in DRAM additionally as Font Q: ^XA ^CWQ,R:MYFONT.FNT ^XZ • NEWFONT.FNT stored in DRAM whenever a format calls for font F: ^XA ^CWF,R:NEWFONT.FNT ^XZ Label Listing Before Assignment 45541L-004 Rev.
ZPL Commands ~DB ~DB Download Bitmap Font Description The ~DB command sets the printer to receive a downloaded bitmap font and defines native cell size, baseline, space size, and copyright. This command consists of two portions, a ZPL II command defining the font and a structured data segment that defines each character of the font. Format ~DBd:o.
124 ZPL Commands ~DB Parameters Details © = copyright holder Accepted Values: 1 to 63 alphanumeric characters Default Value: a value must be specified data = structured ASCII data that defines each character in the font The # symbol signifies character code parameters, which are separated with periods. The character code is from 1 to 4 characters to allow for large international character sets to be downloaded to the printer. The data structure is: #xxxx.h.w.x.y.i.
ZPL Commands ~DE ~DE Download Encoding Description The standard encoding for TrueType Windows® fonts is always Unicode. The ZPL II field data must be converted from some other encoding to Unicode that the Zebra printer understands. The required translation tables are provided with font packs. Some tables can be downloaded from www.zebra.com. Format ~DEd:o.
126 ZPL Commands ^DF ^DF Download Format Description The ^DF command saves ZPL II format commands as text strings to be later merged using ^XF with variable data. The format to be stored might contain field number (^FN) commands to be referenced when recalled. While use of stored formats reduces transmission time, no formatting time is saved—this command saves ZPL II as text strings formatted at print time.
ZPL Commands ~DG ~DG Download Graphics Description The ~DG command downloads an ASCII Hex representation of a graphic image. If .GRF is not the specified file extension, .GRF is automatically appended. For more saving and loading options when downloading files, see ~DY on page 134. Format ~DGd:o.
128 ZPL Commands ~DG Examples • These are some example related to the ~DG command: To determine the t parameter use this formula: xz ------ × yz = totalbytes 8 To determine the correct t parameter for a graphic 8 mm wide, 16 mm high, and a print density of 8 dots/mm, use this formula: ⎛ ⎞ 8 × 128 = 1024 t = 1024 Raise any portion of a byte to the next whole byte.
ZPL Commands ~DG This is an example of using the ~DG command to load a checkerboard pattern into DRAM. The name used to store the graphic is SAMPLE.GRF: ZPL II CODE GENERATED LABEL ~DGR:SAMPLE.GRF,00080,010, FFFFFFFFFFFFFFFFFFFF 8000FFFF0000FFFF0001 8000FFFF0000FFFF0001 8000FFFF0000FFFF0001 FFFF0000FFFF0000FFFF FFFF0000FFFF0000FFFF FFFF0000FFFF0000FFFF FFFFFFFFFFFFFFFFFFFF ^XA ^F020,20^XGR:SAMPLE.GRF,1,1^FS ^XZ Comments Do not use spaces or periods when naming your graphics.
130 ZPL Commands ~DN ~DN Abort Download Graphic Description After decoding and printing the number of bytes in parameter t of the ~DG command, the printer returns to normal Print Mode. Graphics Mode can be aborted and normal printer operation resumed by using the ~DN command. Format ~DN Comments If you need to stop a graphic from downloading, you should abort the transmission from the host device. To clear the ~DG command, however, you must send a ~DN command. 45541L-004 Rev.
ZPL Commands ~DS ~DS Download Intellifont (Scalable Font) Description The ~DS command is used to set the printer to receive a downloadable scalable font and defines the size of the font in bytes. The ~DS command, and its associated parameters, is the result of converting a vendorsupplied font for use on a Zebra printer. To convert this font use the ZTools utility. Format ~DSd:o.
132 ZPL Commands ~DT ~DT Download Bounded TrueType Font Description Use ZTools to convert a TrueType font to a Zebra-downloadable format. ZTools creates a downloadable file that includes a ~DT command. For information on converting and downloading Intellifont information, see ~DS on page 131. Format ~DTd:o.
ZPL Commands ~DU ~DU Download Unbounded TrueType Font Description Some international fonts, such as Asian fonts, have more than 256 printable characters. These fonts are supported as large TrueType fonts and are downloaded to the printer with the ~DU command. Use ZTools to convert the large TrueType fonts to a Zebra-downloadable format. The Field Block (^FB) command cannot support the large TrueType fonts. Format ~DUd:o.
134 ZPL Commands ~DY ~DY Download Graphics / Native TrueType or OpenType Font Description The ~DY command downloads to the printer graphic objects or fonts in any supported format. This command can be used in place of ~DG for more saving and loading options. ~DY is the preferred command to download TrueType fonts on printers with firmware greater than X.13. It is faster than ~DU. Format ~DYd:f,b,x,t,w,data This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ~DY Parameters Details t = total number of bytes in file Accepted Values: .BMP This parameter refers to the actual size of the file, not the amount of disk space. .GRF images: the size after decompression into memory This parameter refers to the actual size of the file, not the amount of disk space. .PCX This parameter refers to the actual size of the file, not the amount of disk space. .PNG images: This parameter refers to the actual size of the file, not the amount of disk space. .
136 ZPL Commands ~EG ~EG Erase Download Graphics See ^ID on page 181. 45541L-004 Rev.
ZPL Commands ^FB ^FB Field Block Description The ^FB command allows you to print text into a defined block type format. This command formats an ^FD or ^SN string into a block of text using the origin, font, and rotation specified for the text string. The ^FB command also contains an automatic word-wrap function.
138 ZPL Commands ^FB Example • These are examples of how the ^FB command affects field data. Comments on the ^FB Command This scheme can be used to facilitate special functions: \& = carriage return/line feed \(*) = soft hyphen (word break with a dash) \\ = backslash (\) Item 1: ^CI13 must be selected to print a backslash (\). Item 2: If a soft hyphen escape sequence is placed near the end of a line, the hyphen is printed. If it is not placed near the end of the line, it is ignored.
ZPL Commands ^FC ^FC Field Clock (for Real-Time Clock) Description The ^FC command is used to set the clock-indicators (delimiters) and the clock mode for use with the Real-Time Clock hardware. This command must be included within each label field command string each time the Real-Time Clock values are required within the field.
140 ZPL Commands ^FD ^FD Field Data Description The ^FD command defines the data string for the field. The field data can be any printable character except those used as command prefixes (^ and ~).
ZPL Commands ^FH ^FH Field Hexadecimal Indicator Description The ^FH command allows you to enter the hexadecimal value for any character directly into the ^FD statement. The ^FH command must precede each ^FD command that uses hexadecimals in its field. Within the ^FD statement, the hexadecimal indicator must precede each hexadecimal value. The default hexadecimal indicator is _ (underscore). There must be a minimum of two characters designated to follow the underscore.
142 ZPL Commands ^FM ^FM Multiple Field Origin Locations Description The ^FM command allows you to control the placement of bar code symbols. It designates field locations for the PDF417 (^B7) and Micro-PDF417 (^BF) bar codes when the structured append capabilities are used. This allows printing multiple bar codes from the same set of text information. The structured append capability is a way of extending the text printing capacity of both bar codes.
ZPL Commands ^FM Example • This example shows you how to generate three bar codes with the text “Zebra Technologies Corporation strives to be…” would need to be repeated seven times, which includes 2870 characters of data (including spaces) between ^FD and ^FS: ZPL II CODE GENERATED LABEL ^XA ^FM100,100,100,600,100,1200 ^BY2,3 ^B7N,5,5,9,83,N ^FDZebra Technologies Corporation strives to be the expert supplier of innovative solutions to specialty demand labeling and ticketing problems of business and gov
144 ZPL Commands ^FM Example • This example assumes a maximum of three bar codes, with bar code 2 of 3 omitted: ZPL II CODE GENERATED LABEL ^XA ^FM100,100,e,e,100,1200 ^BY2,3 ^B7N,5,5,9,83,N ^FDZebra Technologies Corporation strives to be the expert supplier of innovative solutions to specialty demand labeling and ticketing problems of business and government.
ZPL Commands ^FN ^FN Field Number Description The ^FN command numbers the data fields. This command is used in both ^DF (Store Format) and ^XF (Recall Format) commands. In a stored format, use the ^FN command where you would normally use the ^FD (Field Data) command. In recalling the stored format, use ^FN in conjunction with the ^FD command. The number of fields and data that can be stored is dependent in the available printer memory.
146 ZPL Commands ^FO ^FO Field Origin Description The ^FO command sets a field origin, relative to the label home (^LH) position. ^FO sets the upper-left corner of the field area by defining points along the x-axis and y-axis independent of the rotation.
ZPL Commands ^FP ^FP Field Parameter Description The ^FP command allows vertical and reverse formatting of the font field, commonly used for printing Asian fonts. Format ^FPd,g This table identifies the parameters for this format: .
148 ZPL Commands ^FR ^FR Field Reverse Print Description The ^FR command allows a field to appear as white over black or black over white. When printing a field and the ^FR command has been used, the color of the output is the reverse of its background.
ZPL Commands ^FS ^FS Field Separator Description The ^FS command denotes the end of the field definition. Alternatively, ^FS command can also be issued as a single ASCII control code SI (Control-O, hexadecimal 0F). Format ^FS 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
ZPL Commands ^FT ^FT Field Typeset Description The ^FT command sets the field position, relative to the home position of the label designated by the ^LH command. The typesetting origin of the field is fixed with respect to the contents of the field and does not change with rotation. Note • The ^FT command is capable of concantination of fields.
ZPL Commands ^FT Example • This is an example of the ^FT command and concatenation: When a coordinate is missing, the position following the last formatted field is assumed. This remembering simplifies field positioning with respect to other fields. Once the first field is positioned, other fields follow automatically.
152 ZPL Commands ^FV ^FV Field Variable Description ^FV replaces the ^FD (field data) command in a label format when the field is variable.
ZPL Commands ^FW ^FW Field Orientation Description The ^FW command sets the default orientation for all command fields that have an orientation (rotation) parameter. Fields can be rotated 0, 90, 180, or 270 degrees clockwise by using this command. The ^FW command affects only fields that follow it. Once you have issued a ^FW command, the setting is retained until you turn off the printer or send a new ^FW command to the printer.
154 ZPL Commands ^FX ^FX Comment Description The ^FX command is useful when you want to add non-printing informational comments or statements within a label format. Any data after the ^FX command up to the next caret (^) or tilde (~) command does not have any effect on the label format. Therefore, you should avoid using the caret (^) or tilde (~) commands within the ^FX statement.
ZPL Commands ^GB ^GB Graphic Box Description The ^GB command is used to draw boxes and lines as part of a label format. Boxes and lines are used to highlight important information, divide labels into distinct areas, or to improve the appearance of a label. The same format command is used for drawing either boxes or lines.
156 ZPL Commands ^GB Examples • Here are a few examples of graphic boxes: Width: 1.5 inch; Height: 1 inch; Thickness: 10; Color: default; Rounding: default Width: 0 inch; Height: 1 inch; Thickness: 20; Color: default; Rounding: default: Width: 1 inch; Height: 0 inch; Thickness: 30; Color: default; Rounding: default Width: 1.5 inch; Height: 1 inch; Thickness: 10; Color: default; Rounding: 5 45541L-004 Rev.
ZPL Commands ^GC ^GC Graphic Circle Description The ^GC command produces a circle on the printed label. The command parameters specify the diameter (width) of the circle, outline thickness, and color. Thickness extends inward from the outline.
158 ZPL Commands ^GD ^GD Graphic Diagonal Line Description The ^GD command produces a straight diagonal line on a label. This can be used in conjunction with other graphic commands to create a more complex figure.
ZPL Commands ^GE ^GE Graphic Ellipse Description The ^GE command produces an ellipse in the label format.
160 ZPL Commands ^GF ^GF Graphic Field Description The ^GF command allows you to download graphic field data directly into the printer’s bitmap storage area. This command follows the conventions for any other field, meaning a field orientation is included. The graphic field data can be placed at any location within the bitmap space.
ZPL Commands ^GF Parameters Details d = bytes per row Accepted Values: 1 to 99999 This is the number of bytes in the downloaded data that comprise one row of the image. Default Value: command is ignored if a value is not specified data = data Accepted Values: ASCII hexadecimal data: 00 to FF A string of ASCII hexadecimal numbers, two digits per image byte. CR and LF can be inserted as needed for readability. The number of two-digit number pairs must match the above count.
162 ZPL Commands ^GS ^GS Graphic Symbol Description The ^GS command enables you to generate the registered trademark, copyright symbol, and other symbols. Format ^GSo,h,w This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ^GS Example • Use the ^GS command followed by ^FD and the appropriate character (A through E) within the field data to generate the desired character: 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
164 ZPL Commands ~HB ~HB Battery Status Description When the ~HB command is sent to the printer, a data string is sent back to the host. The string starts with an control code sequence and terminates by an control code sequence. Important • This command only responds to mobile printers. Format ~HB Parameters: when the printer receives the command, it returns: bb.bb,hh.hh,bt bb.bb hh.
ZPL Commands ~HD ~HD Head Diagnostic Description The ~HD command echoes printer status information that includes the power supply and head temperature using the terminal emulator. Format ~HD Example • This is an example of the ~HD command: 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
166 ZPL Commands ^HF ^HF Host Format Description The ^HF command sends stored formats to the host. Format ^HFd,o,x This table identifies the parameters for this format: Parameters Details d = device to recall image Accepted Values: R:, E:, B:, and A: Default Value: R: o = image name Accepted Values: 1 to 8 alphanumeric characters Default Value: if a name is not specified, UNKNOWN is used x = extension Fixed Value: .ZPL Example • This example shows the sequence and results.
ZPL Commands ^HG ^HG Host Graphic Description The ^HG command is used to upload graphics to the host. The graphic image can be stored for future use, or it can be downloaded to any Zebra printer. Format ^HGd:o.
168 ZPL Commands ^HH ^HH Configuration Label Return Description The ^HH command echoes printer configuration back to the host, using a terminal emulator. Format ^HH Example • This is an example of the ^HH command: 45541L-004 Rev.
ZPL Commands ~HI ~HI Host Identification Description The ~HI command is designed to be sent from the host to the Zebra printer to retrieve information. Upon receipt, the printer responds with information on the model, software version, dots-per-millimeter setting, memory size, and any detected objects. Format ~HI When the printer receives this command, it returns: XXXXXX,V1.0.0,dpm,000KB,X XXXXXX = model of Zebra printer V1.0.
170 ZPL Commands ~HM ~HM Host RAM Status Description Sending ~HM to the printer immediately returns a memory status message to the host. Use this command whenever you need to know the printer’s RAM status. When ~HM is sent to the Zebra printer, a line of data containing information on the total amount, maximum amount, and available amount of memory is sent back to the host.
ZPL Commands ~HS ~HS Host Status Return Description When the host sends ~HS to the printer, the printer sends three data strings back. Each string starts with an control code and is terminated by an control code sequence. To avoid confusion, the host prints each string on a separate line. Note • When the parallel port is in an error condition, the host might not send data to the printer until the error condition is corrected.
172 ZPL Commands ~HS aaa = a8 a7 a6 a5 a 4 a3 a2 a1 a0 a 7 = Handshake 0 = Xon/Xoff 1 = DTR 6 a = Parity Odd/Even 0 = Odd 1 = Even a 5 = Disable/Enable 0 = Disable 1 = Enable a 4 = Stop Bits 0 = 2 Bits 1 = 1 Bit a 8 a 2 a 1 a 0 = Baud 0 000 = 110 0 001 = 300 0 010 = 600 0 011 = 1200 0 100 = 2400 0 101 = 4800 0 110 = 9600 0 111 = 19200 1 000 = 28800 (available only on certain printer models) 1 001 = 38400 (available only on certain printer models) 1 010 = 57600 (available only on certain printer models)
ZPL Commands ~HS mmm = m7 m6 m5 m4 m3 m2 m1 m0 m7 = Media Type 0 = Die-Cut 1 = Continuous m4 m3 m2 m1 = Unused 0 = Off 1 = On m6 = Sensor Profile 0 = Off m0 = Print Mode 0 = Direct Thermal 1 = Thermal Transfer m5 = Communications Diagnostics 0 = Off 1 = On String 3 xxxx,y xxxx = password y = 0 (static RAM not installed) 1 (static RAM installed) 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
174 ZPL Commands ~HU ~HU Return ZebraNet Alert Configuration Description This command returns the table of configured ZebraNet Alert settings to the host. Format ~HU Example • If the ~HU command is sent to the printer with existing Alert messages set to go to e-mail and SNMP traps, the data returned would look something like the information below. See ^SX on page 270 for complete information on the individual parameter settings. B,C,Y,Y,ADMIN@COMPANY.
ZPL Commands ^HV ^HV Host Verification Description This command is used to return data from specified fields, along with an optional ASCII header, to the host computer. The command can be used with any field that has been assigned a number with the ^RT command or the ^FN and ^RF commands.
176 ZPL Commands ^HW ^HW Host Directory List Description ^HW is used to transmit a directory listing of objects in a specific memory area (storage device) back to the host device. This command returns a formatted ASCII string of object names to the host. Each object is listed on a line and has a fixed length. The total length of a line is also fixed. Each line listing an object begins with the asterisk (*) followed by a blank space.
ZPL Commands ^HW Example • Listed is an example of the ^HW command to retrieve from information R: ^XA ^HWR:*.* ^XZ Example • The printer returned this information as the Host Directory Listing:-DIR R:*.* *R:ARIALN1.FNT 49140 *R:ARIALN2.FNT 49140 *R:ARIALN3.FNT 49140 *R:ARIALN4.FNT 49140 *R:ARIALN.FNT 49140 *R:ZEBRA.GRF 8420 -794292 bytes free R:RAM 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
178 ZPL Commands ^HY ^HY Upload Graphics Description The ^HY command is an extension of the ^HG command. ^HY is used to upload graphic objects from the printer in any supported format. Format ^HYd:o.
ZPL Commands ^HZ ^HZ Display Description Information Description The ^HZ command is used for returning printer description information in XML format. The printer returns information on format parameters, object directories, individual object data, and print status information.
180 ZPL Commands ^HZ Parameters Details x = extension Supported extensions for objects (parameter o) include: .FNT — font .GRF — graphic .PNG — compressed graphic .ZPL — stored format .DAT — encoding table .ZOB — downloadable object .STO — Alert data file l = long filename support Accepted Values: Y = Yes If Y, the object data stores the filename as 16 characters. The data is only compatible with firmware V60.13.0.5 and above. N = No If N, the object data stores the filename as 8 characters.
ZPL Commands ^ID ^ID Object Delete Description The ^ID command deletes objects, graphics, fonts, and stored formats from storage areas. Objects can be deleted selectively or in groups. This command can be used within a printing format to delete objects before saving new ones, or in a stand-alone format to delete objects. The image name and extension support the use of the asterisk (*) as a wild card. This allows you to easily delete a selected groups of objects. Format ^IDd:o.
182 ZPL Commands ^ID Example • To delete the image SAMPLE1.GRF prior to storing SAMPLE2.GRF: ^XA ^FO25,25^AD,18,10 ^FDDelete^FS ^FO25,45^AD,18,10 ^FDthen Save^FS ^IDR:SAMPLE1.GRF^FS ^ISR:SAMPLE2.GRF^FS^XZ Example • In this the * is a wild card, indicating that all objects with the .GRF extension are deleted: ^XA ^IDR:*.GRF^FS ^XZ Comments When an object is deleted from R:, the object can no longer be used and memory is available for storage. This applies only to R:memory.
ZPL Commands ^IL ^IL Image Load Description The ^IL command is used at the beginning of a label format to load a stored image of a format and merge it with additional data. The image is always positioned at ^FO0,0. Important • See ^IS on page 186. Using this technique to overlay the image of constant information with variable data greatly increases the throughput of the label format. Format ^ILd:o.
184 ZPL Commands ^IL Example • This example recalls the stored image SAMPLE2.GRF from DRAM and overlays it with the additional data. The graphic was stored using the ^IS command. For the stored label format, see the ^IS on page 186 command. 45541L-004 Rev.
ZPL Commands ^IM ^IM Image Move Description The ^IM command performs a direct move of an image from storage area into the bitmap. The command is identical to the ^XG command (Recall Graphic), except there are no sizing parameters. Format ^IMd:o.
186 ZPL Commands ^IS ^IS Image Save Description The ^IS command is used within a label format to save that format as a graphic image, rather than as a ZPL II script. It is typically used toward the end of a script. The saved image can later be recalled with virtually no formatting time and overlaid with variable data to form a complete label. Using this technique to overlay the image of constant information with the variable data greatly increases the throughput of the label format.
ZPL Commands ^IS Example • This is an example of using the ^IS command to save a label format to DRAM. The name used to store the graphic is SAMPLE2.GRF.
188 ZPL Commands ~JA ~JA Cancel All Description The ~JA command cancels all format commands in the buffer. It also cancels any batches that are printing. The printer stops after the current label is finished printing. All internal buffers are cleared of data and the DATA LED turn off. Submitting this command to the printer scans the buffer and deletes only the data before the ~JA in the input buffer — it does not scan the remainder of the buffer for additional ~JA commands. Format ~JA 45541L-004 Rev.
ZPL Commands ^JB ^JB Initialize Flash Memory Description The ^JB command is used to initialize various types of Flash memory available in the Zebra printers.
190 ZPL Commands ~JB ~JB Reset Optional Memory Description The ~JB command is used for these conditions: • The ~JB command must be sent to the printer if the battery supplying power to the battery powered memory card fails and is replaced. A bad battery shows a battery dead condition on the Printer Configuration Label. • The ~JB command can also be used to intentionally clear (reinitialize) the B: memory card. The card must not be write protected.
ZPL Commands ~JC ~JC Set Media Sensor Calibration Description The ~JC command is used to force a label length measurement and adjust the media and ribbon sensor values. Format ~JC Comments In Continuous Mode, only the media and ribbon sensors are calibrated. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
192 ZPL Commands ~JD ~JD Enable Communications Diagnostics Description The ~JD command initiates Diagnostic Mode, which produces an ASCII printout (using current label length and full width of printer) of all characters received by the printer. This printout includes the ASCII characters, the hexadecimal value, and any communication errors. Format ~JD 45541L-004 Rev.
ZPL Commands ~JE ~JE Disable Diagnostics Description The ~JE command cancels Diagnostic Mode and returns the printer to normal label printing. Format ~JE 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
194 ZPL Commands ~JF ~JF Set Battery Condition Description There are two low battery voltage levels sensed by the PA/PT400™ printers. When battery voltage goes below the first level, the green LED begins flashing as a warning but printing continues. When this warning occurs, it is recommended to recharge the battery. As printing continues, a second low voltage level is reached. At this point, both green and orange LEDs flash as a warning, and printing automatically pauses.
ZPL Commands ~JG ~JG Graphing Sensor Calibration Description The ~JG command is used to force a label length measurement, recalibrate the media and ribbon sensors, and print a graph (media sensor profile) of the sensor values. Format ~JG Example • Sending the ~JG command to the printer produces a series of labels resembling this image: GENERATED LABELS 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
196 ZPL Commands ^JJ ^JJ Set Auxiliary Port Description The ^JJ command allows you to control an online verifier or applicator device. Format ^JJa,b,c,d,e,f This table identifies the parameters for this format: Parameters Details a = operational mode for auxiliary port Accepted Values: 0 = off 1 = reprint on error—the printer stops on a label with a verification error. When PAUSE is pressed, the label reprints (if ^JZ is set to reprint).
ZPL Commands ^JJ Parameters Details d = application label error mode Accepted Values: e = error mode—the printer asserts the Service Required signal (svce_req - pin 10) on the application port, enters into Pause Mode, and displays an error message on the LCD. f = Feed Mode—a blank label prints when the web is not found where expected to sync the printer to the media. Default Value: f e = reprint mode Accepted Values: e = enabled—the last label reprints after the signal is asserted.
198 ZPL Commands ~JL ~JL Set Label Length Description The ~JL command is used to set the label length. Depending on the size of the label, the printer feeds one or more blank labels. Format ~JL 45541L-004 Rev.
ZPL Commands ^JM ^JM Set Dots per Millimeter Description The ^JM command lowers the density of the print—24 dots/mm becomes 12, 12 dots/mm becomes 6, 8 dots/mm becomes 4, and 6 dots/mm becomes 3. ^JM also affects the field origin (^FO) placement on the label (see example below). When sent to the printer, the ^JM command doubles the format size of the label.
200 ZPL Commands ~JN ~JN Head Test Fatal Description The ~JN command turns on the head test option. When activated, ~JN causes the printer to halt when a head test failure is encountered. Once an error is encountered the printer remains in error mode until the head test is turned off (~JO) or power is cycled. Format ~JN Comments If the communications buffer is full, the printer is not able to receive data. In this condition, the ~JO command is not received by the printer. 45541L-004 Rev.
ZPL Commands ~JO ~JO Head Test Non-Fatal Description The ~JO command turns off the head test option. ~JO is the default printhead test condition and overrides a failure of printhead element status check. This state is changed when the printer receives a ~JN (Head Test Fatal) command. The printhead test does not produce an error when ~JO is active. Format ~JO 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
202 ZPL Commands ~JP ~JP Pause and Cancel Format Description The ~JP command clears the format currently being processed and places the printer into Pause Mode. The command clears the next format that would print, or the oldest format from the buffer. Each subsequent ~JP command clears the next buffered format until the buffer is empty. The DATA indicator turns off when the buffer is empty and no data is being transmitted.
ZPL Commands ~JR ~JR Power On Reset Description The ~JR command resets all of the printer’s internal software, performs a power-on self-test (POST), clears the buffer and DRAM, and resets communication parameters and default values. Issuing a ~JR command performs the same function as a manual power-on reset. Format ~JR 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
204 ZPL Commands ^JS ^JS Sensor Select Format ^JSa Note • This command is only for the Z-Series and S4M printers, only. This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ~JS ~JS Change Backfeed Sequence Description The ~JS command is used to control the backfeed sequence. This command can be used on printers with or without built-in cutters. These are the primary applications: • to allow programming of the rest point of the cut edge of continuous media. • provide immediate backfeed after peel-off when the printer is used in a print/apply application configuration.
206 ZPL Commands ~JS The value for this command is also reflected in the Backfeed parameter on the printer configuration label. For ~JSN — the Backfeed parameter is listed as DEDAULT For ~JSA — or 100% the Backfeed parameter is listed as AFTER For ~JSB — or 0% the Backfeed parameter is listed as BEFORE For ~JS10 — 10% of the backfeed takes place after the label is cut or removed. The remaining 90% takes place before the next label is printed. 45541L-004 Rev.
ZPL Commands ^JT ^JT Head Test Interval Description The ^JT command allows you to change the printhead test interval from every 100 labels to any desired interval. With the ^JT command, the printer is allowed to run the test after printing a label. When a parameter is defined, the printer runs the test after printing a set amount of labels. The printer’s default head test state is off. Parameters for running the printhead test are defined by the user.
208 ZPL Commands ^JU ^JU Configuration Update Description The ^JU command sets the active configuration for the printer. Format ^JUa This table identifies the parameters for this format: 45541L-004 Rev. A Parameters Details a = active configuration Accepted Values: F = reload factory values These values are lost at power-off if not saved with ^JUS. R = recall last saved values S = save current settings These values are used at power-on.
ZPL Commands ^JW ^JW Set Ribbon Tension Description ^JW sets the ribbon tension for the printer it is sent to. Format ^JWt This table identifies the parameters for this format: Parameters Details t = tension Accepted Values: L = low M = medium H = high Default Value: a value must be specified Comments ^JW is used only for PAX series printers. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
210 ZPL Commands ~JX ~JX Cancel Current Partially Input Format Description The ~JX command cancels a format currently being sent to the printer. It does not affect any formats currently being printed, or any subsequent formats that might be sent. Format ~JX 45541L-004 Rev.
ZPL Commands ^JZ ^JZ Reprint After Error Description The ^JZ command reprints a partially printed label caused by a Ribbon Out, Media Out, or Head Open error condition. The label is reprinted as soon as the error condition is corrected. This command remains active until another ^JZ command is sent to the printer or the printer is turned off.
212 ZPL Commands ~KB ~KB Kill Battery (Battery Discharge Mode) Description To maintain performance of the rechargeable battery in the portable printers, the battery must be fully discharged and recharged regularly. The ~KB command places the printer in battery discharge mode. This allows the battery to be drained without actually printing. Format ~KB Comments While the printer is in Discharge Mode, the green power LED flashes in groups of three flashes.
ZPL Commands ^KD ^KD Select Date and Time Format (for Real Time Clock) Description The ^KD command selects the format that the Real-Time Clock’s date and time information presents as on a configuration label. This is also displayed on the Printer Idle LCD control panel display, and displayed while setting the date and time.
214 ZPL Commands ^KL ^KL Define Language Description The ^KL command selects the language displayed on the control panel. Format ^KLa This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ^KN ^KN Define Printer Name Description The printer’s network name and description can be set using the ^KN command. ^KN is designed to make your Zebra printer easy for users to identify. The name the administrator designates is listed on the configuration label and on the Web page generated by the printer.
216 ZPL Commands ^KP ^KP Define Password Description The ^KP command is used to define the password that must be entered to access the control panel switches and LCD Setup Mode.
ZPL Commands ^LH ^LH Label Home Description The ^LH command sets the label home position. The default home position of a label is the upper-left corner (position 0,0 along the x and y axis). This is the axis reference point for labels. Any area below and to the right of this point is available for printing. The ^LH command changes this reference point. For instance, when working with preprinted labels, use this command to move the reference point below the preprinted area.
218 ZPL Commands ^LL ^LL Label Length Description The ^LL command defines the length of the label. This command is necessary when using continuous media (media not divided into separate labels by gaps, spaces, notches, slots, or holes). To affect the current label and be compatible with existing printers, ^LL must come before the first ^FS (Field Separator) command. Once you have issued ^LL, the setting is retained until you turn off the printer or send a new ^LL command.
ZPL Commands ^LR ^LR Label Reverse Print Description The ^LR command reverses the printing of all fields in the label format. It allows a field to appear as white over black or black over white. Using the ^LR is identical to placing an ^FR command in all current and subsequent fields.
220 ZPL Commands ^LS ^LS Label Shift Description The ^LS command allows for compatibility with Z-130 printer formats that are set for less than full label width. It is used to shift all field positions to the left so the same commands used on a Z-130 or Z-220 Printer can be used on other Zebra printers.
ZPL Commands ^LT ^LT Label Top Description The ^LT command moves the entire label format a maximum of 120 dot rows up or down from its current position, in relation to the top edge of the label. A negative value moves the format towards the top of the label; a positive value moves the format away from the top of the label. This command can be used to fine-tune the position of the finished label without having to change any of the existing parameters.
222 ZPL Commands ^MC ^MC Map Clear Description In normal operation, the bitmap is cleared after the format has been printed. The ^MC command is used to retain the current bitmap. This applies to current and subsequent labels until cleared with ^MCY. Format ^MCa Important • To produce a label template, ^MC must be used with ^FV.
ZPL Commands ^MD ^MD Media Darkness Description The ^MD command adjusts the darkness relative to the current darkness setting. Format ^MDa This table identifies the parameters for this format: Parameters Details a = media darkness level Accepted Values: -30 to 30, depending on current value Initial Value at Power-up: 0 If no value is entered, this command is ignored.
224 ZPL Commands ^MF ^MF Media Feed Description The ^MF command dictates what happens to the media at power-up and at head-close after the error clears.
ZPL Commands ^ML ^ML Maximum Label Length Description The ^ML command lets you adjust the maximum label length. Format ^MLa This table identifies the parameters for this format: Parameters Details a = maximum label length (in dot rows) Accepted Values: 0 to maximum length of label Default Value: last permanently saved value Comments For calibration to work properly, you must set the maximum label length equal to or greater than your actual label length.
226 ZPL Commands ^MM ^MM Print Mode Description The ^MM command determines the action the printer takes after a label or group of labels has printed.
ZPL Commands ^MM Cutter — after printing, the media feeds forward and is automatically cut into predetermined lengths. Comments Be sure to select the appropriate value for the print mode being used to avoid unexpected results. The Delayed Cut feature can be activated as follows: • through PRINT MODE on the printer’s control panel • with a ^MMD command Note • When the printer is in the Delayed Cut PRINT MODE, it will cut the label when it receives the ~JK (Delayed Cut) command.
228 ZPL Commands ^MN ^MN Media Tracking Description The ^MN command relays to the printer what type of media is being used (continuous or non-continuous) for purposes of tracking. This bulleted list shows the types of media associated with this command: • Continuous Media – this media has no physical characteristic (web, notch, perforation, mark, et cetera) to separate labels. Label length is determined by the ^LL command.
ZPL Commands ^MP ^MP Mode Protection Description The ^MP command is used to disable the various mode functions on the control panel. Once disabled, the settings for the particular mode function can no longer be changed and the LED associated with the function does not light. Because this command has only one parameter, each mode must be disabled with an individual ^MP command.
230 ZPL Commands ^MT ^MT Media Type Description The ^MT command selects the type of media being used in the printer. There are two choices for this command: • Thermal Transfer Media – this media uses a high-carbon black or colored ribbon. The ink on the ribbon is bonded to the media. • Direct Thermal Media – this media is heat sensitive and requires no ribbon. Format ^MTa This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ^MU ^MU Set Units of Measurement Description The ^MU command sets the units of measurement the printer uses. ^MU works on a field-by-field basis. Once the mode of units is set, it carries over from field to field until a new mode of units is entered. ^MU also allows for printing at lower resolutions — 600 dpi printers are capable of printing at 300, 200, and 150 dpi; 300 dpi printers are capable of printing at 150 dpi.
232 ZPL Commands ^MU Example • This is an example of Converting dpi Values.
ZPL Commands ^MW ^MW Modify Head Cold Warning Description The ^MW command allows you to set the head cold warning indicator based on the operating environment. Format ^MWy This table identifies the parameters for this format: Parameters Details a = enable head cold warning Accepted Values: y = enable head cold warning n = disable head cold warning Important • When a parameter is not given, the instruction is ignored. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
234 ZPL Commands ~NC ~NC Network Connect Description The ~NC command is used to connect a particular printer to a network by calling up the printer’s network ID number. Format ~NC### This table identifies the parameters for this format: Parameters Details ### = network ID number assigned (must be a threedigit entry) Accepted Values: 001 to 999 Default Value: 000 (none) Comments Use this command at the beginning of any label format to specify which printer on the network is going to be used.
ZPL Commands ^NI ^NI Network ID Number Description The ^NI command is used to assign a network ID number to the printer. This must be done before the printer can be used in a network. Format ^NI### This table identifies the parameters for this format: Parameters Details ### = network ID number assigned (must be a threedigit entry) Accepted Values: 001 to 999 Default Value: 000 (none) Comments The last network ID number set is the one recognized by the system.
236 ZPL Commands ~NR ~NR Set All Network Printers Transparent Description The ~NR command sets all printers in the network to be transparent, regardless of ID or current mode. Format ~NR Comments The commands ~NC, ^NI, ~NR, and ~NT are used only with RS-485 printer communications. 45541L-004 Rev.
ZPL Commands ^NS ^NS Change Networking Settings Description The ^NS command is used to change Ethernet network settings. Format ^NSa,b,c,d This table identifies the parameters for this format: 9/15/06 Parameters Details a = network setting Accepted Values: IP Resolution.
238 ZPL Commands ~NT ~NT Set Currently Connected Printer Transparent Description The ~NT command sets the currently connected network printer to be transparent. Format ~NT Comments With Z Series® printers, the ~NT command functions the same as the ~NR command. All Z Series printers on a network receive the transmission. The commands ~NC, ^NI, ~NR, and ~NT are used only with RS-485 printer communications. 45541L-004 Rev.
ZPL Commands ^PF ^PF Slew Given Number of Dot Rows Description The ^PF command causes the printer to slew labels (move labels at a high speed without printing) a specified number of dot rows from the bottom of the label. This allows faster printing when the bottom portion of a label is blank.
240 ZPL Commands ^PH ~PH ^PH ~PH Slew to Home Position Description The ^PH or ~PH command causes the printer to feed one blank label. The ~PH command feeds one label after the format currently being printed is done or when the printer is placed in pause. The ^PH command feeds one blank label after the current format prints. Format ^PH or ~PH 45541L-004 Rev.
ZPL Commands ^PM ^PM Printing Mirror Image of Label Description The ^PM command prints the entire printable area of the label as a mirror image. This command flips the image from left to right.
242 ZPL Commands ^PO ^PO Print Orientation Description The ^PO command inverts the label format 180 degrees. The label appears to be printed upside down. If the original label contains commands such as ^LL, ^LS, ^LT and ^PF, the inverted label output is affected differently.
ZPL Commands ^PP ~PP ^PP ~PP Programmable Pause Description The ~PP command stops printing after the current label is complete (if one is printing) and places the printer in Pause Mode. The ^PP command is not immediate. Therefore, several labels might print before a pause is performed. This command pauses the printer after the current format prints. The operation is identical to pressing PAUSE on the control panel of the printer.
244 ZPL Commands ^PQ ^PQ Print Quantity Description The ^PQ command gives control over several printing operations. It controls the number of labels to print, the number of labels printed before printer pauses, and the number of replications of each serial number.
ZPL Commands ^PR ^PR Print Rate Description The ^PR command determines the media and slew speed (feeding a blank label) during printing. The printer operates with the selected speeds until the setting is reissued or the printer is turned off. The print speed is application-specific. Because print quality is affected by media, ribbon, printing speeds, and printer operating modes, it is very important to run tests for your applications.
246 ZPL Commands ^PR Parameters Details s = slew speed Accepted Values: A or 2 = 50.8 mm/sec. (2 inches/sec.) B or 3 = 76.2 mm/sec. (3 inches/sec.) C or 4 = 101.6 mm/sec. (4 inches/sec.) 5 = 127 mm/sec. 5 inches/sec.) D or 6 = 152.4 mm/sec. (6 inches/sec.) E or 8 = 203.2 mm/sec. (8 inches/sec.) 9 = 220.5 mm/sec. (9 inches/sec.) 10 = 245 mm/sec. (10 inches/sec.) 11 = 269.5 mm/sec. 11 inches/sec.) 12 = 304.8 mm/sec. 12 inches/sec.) Default Value: D b = backfeed speed Accepted Values: A or 2 = 50.
ZPL Commands ~PR ~PR Applicator Reprint Description The ~PR command is supported only by the PAX and PAX2-Series printers. If the ~PR command is enabled (see ^JJ on page 196), the last label printed reprint, similar to the applicator asserting the Reprint signal on the applicator port. Format ~PR Comments Pressing PREVIOUS on the control panel also causes the last label to reprint. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
248 ZPL Commands ~PS ~PS Print Start Description The ~PS command causes a printer in Pause Mode to resume printing. The operation is identical to pressing PAUSE on the control panel of the printer when the printer is already in Pause Mode. Format ~PS 45541L-004 Rev.
ZPL Commands ^PW ^PW Print Width Description The ^PW command allows you set the print width. Format ^PWa This table identifies the parameters for this format: Parameters Details a = label width (in dots) Accepted Values: 2, to the width of the label If the value exceeds the width of the label, the width is set to the label’s maximum size. Default Value: last permanently saved value Limitation Not all Zebra printers support the ^PW command. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
250 ZPL Commands ~RO ~RO Reset Advanced Counter Description The ~RO command resets the advanced counters used by the printer to monitor label generation in inches, centimeters, and number of labels. Two resettable counters are available and can be reset. Format ~ROc This table identifies the parameters for this format: Parameters Details c = counter number Accepted Values: 1 or 2 Default Value: a value must be specified or the command is ignored Example • This is an example of the ~RO command.
ZPL Commands ^SC ^SC Set Serial Communications Description The ^SC command allows you to change the serial communications parameters you are using.
252 ZPL Commands ~SD ~SD Set Darkness Description The ~SD command allows you to set the darkness of printing. ~SD is the equivalent of the darkness setting parameter on the control panel display. Format ~SD## This table identifies the parameters for this format: Parameters Details ## = desired darkness setting (two-digit number) Accepted Values: 00 to 30 Default Value: last permanently saved value Example • These are examples of the XiIIIPlus Darkness Setting: ^MD8.3 ~SD8.
ZPL Commands ^SE ^SE Select Encoding Description The ^SE command is used to select the desired ZPL or ZPL II encoding table. Format ^SEd:o.x This table identifies the parameters for this format: Parameters Details d = location of encoding table Accepted Values: R:, E:, B:, and A: Default Value: R: o = name of encoding table Accepted Value: 1 to 8 alphanumeric characters Default Value: a value must be specified x = extension Fixed Value: .
254 ZPL Commands ^SF ^SF Serialization Field (with a Standard ^FD String) Description The ^SF command allows you to serialize a standard ^FD string. The maximum size of the mask and increment string is 3K combined. Format ^SFa,b This table identifies the parameters for this format: Parameters Details a = mask string The mask string sets the serialization scheme. The length of the string mask defines the number of characters in the current ^FD string to be serialized.
ZPL Commands ^SF Example • This is an example of serializing a ^FD string. The ZPL II code generates three separate labels as seen in Generated Labels: ZPL II CODE GENERATED LABELS ^XA ^FO100,100 ^CF0,100 ^FD12A^SFnnA,F^FS ^PQ3 ^XZ This mask has the first characters as alphanumeric (nn = 12) and the last digit as uppercase alphabetic (A). The decimal value of the increment number is equivalent to 5 (F). The number of labels generated depends on the number specified by the ^PQ command.
256 ZPL Commands ^SF Examples • These examples show the importance of capitalization and location within the mask. In this example, the printer cycles with every two printed labels and alternates between H (position 18), and then Z (position 36). With n or N, the serial number increments from 0 - 9 and a–z or A–Z (36 positions overall).
ZPL Commands ^SL ^SL Set Mode and Language (for Real-Time Clock) Description The ^SL command is used to specify the Real-Time Clock’s mode of operation and language for printing information. Important • • Time is read when the image is created. If the image stays in the queue longer than the specified time the image will be recreated with a new time. • There are incidents when the same time or a larger space of time may be printed on labels. This is due to the format complexity and print speed.
258 ZPL Commands ^SL Parameters Details b = language Accepted Values: 1 = English 2 = Spanish 3 = French 4 = German 5 = Italian 6 = Norwegian 7 = Portuguese 8 = Swedish 9 = Danish 10 = Spanish 2 11 = Dutch 12 = Finnish = Default Value: the language selected with ^KL or the control panel Comments These are some comments to be aware of: • The ^SL command must be placed before the first ^FO command. • As of V60.13.0.
ZPL Commands ^SN ^SN Serialization Data Description The ^SN command allows the printer to index data fields by a selected increment or decrement value, making the data fields increase or decrease by a specified value each time a label is printed. This can be performed on 100 to 150 fields in a given format and can be performed on both alphanumeric and bar code fields. A maximum of 12 of the rightmost integers are subject to indexing.
260 ZPL Commands ^SN Comments Incrementing and decrementing takes place for each serial-numbered field when all replicates for each serial number have been printed, as specified in parameter r of the ^PQ (print quality) command.
ZPL Commands ^SO ^SO Set Offset (for Real-Time Clock) Description The ^SO command is used to set the secondary and the tertiary offset from the primary Real-Time Clock. Note • For each label only one SO2 command can be used. If more than one offset is required, SO3 must be used.
262 ZPL Commands ^SP ^SP Start Print Description The ^SP command allows a label to start printing at a specified point before the entire label has been completely formatted. On extremely complex labels, this command can increase the overall throughput of the print. The command works as follows: Specify the dot row at which the ^SP command is to begin. This creates a label segment. Once the ^SP command is processed, all information in that segment prints.
ZPL Commands ^SP Example • In this example, a label 800 dot rows in length uses ^SP500. Segment 1 prints while commands in Segment 2 are being received and formatted. Dot position 0 Label Segment 2 Dot position 500 Label Segment 1 Dot position 800 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
264 ZPL Commands ^SQ ^SQ Halt ZebraNet Alert Description The ^SQ command is used to stop the ZebraNet Alert option. Format ^SQa,b,c This table identifies the parameters for this format: 45541L-004 Rev.
ZPL Commands ^SQ 9/15/06 Parameters Details b = destination Accepted Values: A = serial port B = parallel port C = e-mail address D = TCP/IP E = UDP/IP F = SNMP trap * = wild card to stop alerts for all destinations c = halt messages Accepted Values: Y = halt messages N = start messages Default Value: Y ZPL II Programming Guide 45541L-004 Rev.
266 ZPL Commands ^SR ^SR Set Printhead Resistance Description The ^SR command allows you to set the printhead resistance. Format ^SR#### This table identifies the parameters for this format: Parameters Details #### = resistance value (four-digit numeric value) Accepted Value: 0488 to 1175 Default Value: last permanently saved value Comments To avoid damaging the printhead, this value should be less than or equal to the value shown on the printhead being used.
ZPL Commands ^SS ^SS Set Media Sensors Description The ^SS command is used to change the values for media, web, ribbon, and label length set during the media calibration process. The media calibration process is described in your specific printer’s user’s guide.
268 ZPL Commands ^SS Example • Below is an example of a media sensor profile. Notice the numbers from 000 to 100 and where the words WEB, MEDIA, and RIBBON appear in relation to those numbers. Also notice the black vertical spike. This represents where the printer sensed the transition from media-to-web-to-media. The media and sensor profiles produced vary in appearance from printer to printer. Comments The m2 and r2 parameters have no effect in Stripe® S-300 and S-500 printers.
ZPL Commands ^ST ^ST Set Date and Time (for Real-Time Clock) Description The ^ST command sets the date and time of the Real-Time Clock.
270 ZPL Commands ^SX ^SX Set ZebraNet Alert Description The ^SX command is used to configure the ZebraNet Alert System. Format ^SXa,b,c,d,e,f This table identifies the parameters for this format: Note • The values in this table apply to firmware V48_12_4 and above. 45541L-004 Rev.
ZPL Commands ^SX Parameters Details b = destination for route alert Accepted Values: A = serial port B* = parallel port C = e-mail address D = TCP/IP E = UDP/IP F = SNMP trap Default Value: if this parameter is missing or invalid, the command is ignored * Requires bidirectional communication.
272 ZPL Commands ^SZ ^SZ Set ZPL Description The ^SZ command is used to select the programming language used by the printer. This command gives you the ability to print labels formatted in both ZPL and ZPL II. This command remains active until another ^SZ command is sent to the printer or the printer is turned off.
ZPL Commands ~TA ~TA Tear-off Adjust Position Description The ~TA command lets you adjust the rest position of the media after a label is printed, which changes the position at which the label is torn or cut. Format ~TA### Important • These are some important facts about this command: • For 600 dpi printers, the step size doubles. • If the number of characters is less than 3, the command is ignored.
274 ZPL Commands ^TO ^TO Transfer Object Description The ^TO command is used to copy an object or group of objects from one storage device to another. It is similar to the copy function used in PCs. Source and destination devices must be supplied and must be different and valid for the action specified. Invalid parameters cause the command to be ignored. The asterisk (*) can be used as a wild card for object names and extensions. For instance, ZEBRA.* or *.
ZPL Commands ^TO Transferring Objects These are some examples of using the ^TO command. Example • To copy the object ZLOGO.GRF from DRAM to an optional Memory Card and rename it ZLOGO1.GRF, write the following format: ^XA ^TOR:ZLOGO.GRF,B:ZLOGO1.GRF ^XZ Example • To copy the object SAMPLE.GRF from an optional Memory Card to DRAM and keep the same name, write this format: ^XA ^TOB:SAMPLE.GRF,R:SAMPLE.
276 ZPL Commands ~WC ~WC Print Configuration Label Description The ~WC command is used to generate a printer configuration label. The printer configuration label contains information about the printer setup, such as sensor type, network ID, ZPL mode, firmware version, and descriptive data on the R:, E:, B:, and A: devices. Format ~WC Comments This command works only when the printer is idle. 45541L-004 Rev.
ZPL Commands ^WD ^WD Print Directory Label Description The ^WD command is used to print a label listing bar codes, objects stored in DRAM, or fonts. For bar codes, the list shows the name of the bar code. For fonts, the list shows the name of the font, the number to use with ^A command, and size. For objects stored in DRAM, the list shows the name of the object, extension, size, and option flags. All lists are enclosed in a double-line box. Format ~WDd:o.
278 ZPL Commands ^WD Example • To print a label listing all resident bar codes, enter: ^XA ^WDZ:*.BAR ^XZ Example • To print a label listing all resident fonts, enter: ^XA ^WDZ:*.FNT ^XZ 45541L-004 Rev.
ZPL Commands ^XA ^XA Start Format Description The ^XA command is used at the beginning of ZPL II code. It is the opening bracket and indicates the start of a new label format. This command is substituted with a single ASCII control character STX (control-B, hexadecimal 02). Format ^XA Comments Valid ZPL II format requires that label formats should start with the ^XA command and end with the ^XZ command. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
280 ZPL Commands ^XB ^XB Suppress Backfeed Description The ^XB command suppresses forward feed of media to tear-off position depending on the current printer mode. Because no forward feed occurs, a backfeed before printing of the next label is not necessary; this improves throughput. When printing a batch of labels, the last label should not contain this command.
ZPL Commands ^XF ^XF Recall Format Description The ^XF command recalls a stored format to be merged with variable data. There can be multiple ^XF commands in one format, and they can be located anywhere within the code. When recalling a stored format and merging data using the ^FN (Field Number) function, the calling format must contain the ^FN command to merge the data properly. While using stored formats reduces transmission time, no formatting time is saved.
282 ZPL Commands ^XG ^XG Recall Graphic Description The ^XG command is used to recall one or more graphic images for printing. This command is used in a label format to merge graphics, such as company logos and piece parts, with text data to form a complete label. An image can be recalled and resized as many times as needed in each format. Other images and data might be added to the format. Format ^XGd:o.
ZPL Commands ^XZ ^XZ End Format Description The ^XZ command is the ending (closing) bracket. It indicates the end of a label format. When this command is received, a label prints. This command can also be issued as a single ASCII control character ETX (Control-C, hexadecimal 03). Format ^XZ Comments Label formats must start with the ^XA command and end with the ^XZ command to be in valid ZPL II format. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
284 ZPL Commands ^ZZ ^ZZ Printer Sleep Description The ^ZZ command places the printer in an idle or shutdown mode.
3 RFID Commands This section contains the ZPL II commands for RFID-specific applications. For more information about the RFID commands, refer to the RFID Programming Guide. A copy is available on the User CD provided with your printer and online at http://www.zebra.com/manuals. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
286 RFID Commands RFID Command Overview RFID Command Overview In addition to reading or encoding RFID tags, the RFID ZPL commands also provide for RFID exception handling, such as setting the number of read/write retries before declaring a transponder defective (set with ^RR, ^RT, and ^WT) or setting the number of labels that will be attempted if an error occurs (set with ^RS).
RFID Commands Printer and Firmware Compatibility Printer and Firmware Compatibility Table 13 shows which RFID ZPL commands you can use with different printers and firmware versions. Table 13 • Supported Commands Based on Printer and Firmware R110Xi HF R2844-Z SP1056X SP920X SP994X, SP999X, SP1027X R63.13.
288 RFID Commands ^HL or ~HL ^HL or ~HL Return RFID Data Log to Host Description The printer continually logs RFID data and stores it in the printer’s RAM. Use this command to request that the RFID data log be returned to the host computer, to clear the current data log, and to restart data recording. The data returned show the status of the RFID read, write, and lock commands and show any resulting error codes.
RFID Commands ^HR ^HR Calibrate RFID Transponder Position Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to initiate an RFID transponder calibration for a specific RFID label. Results are returned to the host computer.
290 RFID Commands ^HR Comments • Based on the recommended transponder placement position for most RFID labels, the printer’s default RFID programming position is zero for the R110PAX4. For other RFID printers, the default programming position is the label length minus 1 mm (0.04 in.). To return to the default programming position at any time, use the RESTORE option in the RFID TAG CALIB control panel parameter. • At the end of calibration, a results table is returned to the host.
RFID Commands ^HR Example • If the following command is sent to the printer: ^XA^HR^XZ The printer starts the transponder calibration and returns a results table such as the following: start position=195 215, , 214, , 213, , 212, , 211, , 210, ,W 209,R, 208, , 207, , 206, ,W 205,R, 204, , 203, , 202, ,W 201,R,W 200,R,W 199,R,W 198,R,W 197,R,W 196,R,W 195,R,W <---**** 194,R,W 193,R,W 192,R,W 191,R,W 190,R,W 189,R, 188, , 187, , 186, , 185, , . . .
292 RFID Commands ^RA ^RA Read AFI or DSFID Byte Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to read the AFI or DSFID byte. The data can be returned to the host via the ^HV command. Format ^RA#,f,r,m,b This table identifies the parameters for this format.
RFID Commands ^RA Example 2 • This example reads the DSFID byte in ASCII format and returns DSFID Byte:x to the host. The printer will retry the command three times if necessary. A voided label is generated if the read is unsuccessful after these retries. The data read will go into the ^FN1 location of the recalled format. ^XA ^FO20,120^A0N,60^FN1^FS ^RA1,0,3,0,D^FS ^HV1,,DSFID Byte:^FS ^XZ 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
294 RFID Commands ^RB ^RB Define EPC Data Structure Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to define the structure of EPC data, which can be read from or written to an RFID transponder. For more information about EPC specifications, refer to the EPC Global web site.
RFID Commands ^RB Example 2 • The following command specifies that there are 64 bits used with eight 8-bit fields. ^RB64,8,8,8,8,8,8,8,8^FS The ZPL code to encode a tag with this format would look like this: ^RFW,E^FD1.123.160.200.249.6.1.0^FS When writing to the tag, each set of data is written in its respective 8-bit field.
296 RFID Commands ^RE ^RE Enable/Disable E.A.S. Bit Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to enable or disable the Electronic Article Surveillance (E.A.S.) bit that is available in some ISO15693 tags (such as Philips). This command works only on those ISO15693 transponders and will be ignored if the tag does not support E.A.S.
RFID Commands ^RF ^RF Read or Write RFID Format Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to read or write to (encode) an RFID tag. When using this command to read a tag, you may use a field variable to print the tag data on the label or to return the data to the host. Format ^RFo,f,b,n This table identifies the parameters for this format.
298 RFID Commands ^RF Examples • Encode ASCII This example encodes 96-bit data. ^XA ^RS4 ^RFw,a^FD00 my data^FS ^XZ Encode Hex This example encodes 64-bit data. ^XA ^RS3 ^RFW,H^FD1122334455667788^FS ^XZ Encode EPC This example encodes 96-bit data, as specified by the ^RB command. ^XA ^RB96,8,3,3,20,24,38 ^RFw,e^FD16,3,5,78742,146165,1234567891^FS ^XZ 45541L-004 Rev.
RFID Commands ^RI ^RI Get RFID Tag ID Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to get the unique serial number of the tag and return it in hexadecimal format. The data can be sent back to the host via the ^HV command. Format ^RI#,s,r,m This table identifies the parameters for this format.
300 RFID Commands ^RM ^RM Enable RFID Motion Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to enable or disable RFID motion. By default, labels automatically print at the end of the format.
RFID Commands ^RN ^RN Detect Multiple RFID Tags in Encoding Field Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to enable or disable detection of multiple RFID tags in the encoding field. By default, the printer checks for more than one tag in the field before attempting to read or write.
302 RFID Commands ~RO ~RO Reset Advanced Counters Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to reset the advanced counters used by the printer to monitor label generation in inches and centimeters, the number of labels printed, and the number of valid and voided RFID labels.
RFID Commands ~RO Example 2 • This example shows how the counter portion of the printer configuration labels looks when the RFID counters are reset by sending ~RO3 and ~RO4. Before After 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
304 RFID Commands ^RR ^RR Specify RFID Retries for a Block Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to change the number of times that the printer attempts to read or write to a particular block of a single RFID tag. By default, the printer will attempt six retries. This command is persistent and will be used in subsequent formats if not provided.
RFID Commands ^RS ^RS Set Up RFID Parameters Description Use this command to set up RFID parameters including tag type, read/write position of the transponder, and error handling. Important • Use care when using this command in combination with ^RT or ^RF for reading tag data. Problems can occur if the data read from the tag is going to be printed on the label. Any data read from the transponder must be positioned to be printed above the read/write position.
306 RFID Commands ^RS Parameters Details p = read/write position of the transponder Sets the read/write position of the transponder in vertical (Y axis) dot rows from the top of the label. Set to 0 (no movement) if the transponder is already in the effective area without moving the media.
RFID Commands ^RS Parameters a = signals on applicator Details Note • This parameter does not apply to the R2844-Z. For the R4Mplus, this parameter applies only to printers with firmware version SP994X (R4Mplus European version). When the value for parameter p (read/write position of the transponder) is nonzero, this parameter changes the number of start and stop print signals required for printing. In Single mode, one start print command is required.
RFID Commands ^RS Supported Tag Types Table 14 shows the tag types supported by different RFID printers/print engines and firmware versions. Depending on your country or on the firmware version that you are using, your printer may not support all of the tag types listed. If you specify an unsupported tag type in the ^RS command, the printer uses the default value. If a tag type is shown as supported but does not work with your printer, you may need to upgrade the printer’s firmware (see http://www.zebra.
RFID Commands ^RS Example 1 • This example sets the printer to move the media to 800 dots from the top of the media [or label length minus 800 from the bottom (leading edge) of the media] and voids the rest of the media in case of an error. The printer will try to print two labels and then will pause if printing and encoding fail. ^XA ^RS,800,,2,P^FS ^XZ Figure 2 shows the resulting voided label. Note where the void starts.
310 RFID Commands ^RS Example 2 • This example sets the printer to move the media to 800 dots from the top of the media [or label length - 500 from the bottom (leading edge) of the media] and prints “VOID” 500 dots in vertical length (Y axis) in case of an error. ^XA ^RS,800,500,2,P^FS ^XZ Figure 3 shows the resulting voided label. Note where the void starts.
RFID Commands ^RT ^RT Read RFID Tag Note • The ^RT command is provided only for backward-compatibility with label formats that were developed for older Zebra RFID printers. See Table 13 on page 287 for the list of printers and firmware with which you should not use this command. Description Use this command to tell the printer to read the current RFID tag data. The data can be returned to the host via the ^HV command. Format ^RT#,b,n,f,r,m,s This table identifies the parameters for this format.
312 RFID Commands ^RT Parameters Details m = motion Enables or disables RFID motion for the current field. Accepted values: 0 = Feed label after writing. 1 = No feed after writing. Other ZPL may cause a feed. Default value: 0 s = special mode Note • This parameter is used only for the printers referenced here. For R4Mplus printers with firmware version SP920X (U.S. version): Specify actions for mismatched checksums. For EPC Class 1 (Alien reader) only. Not applicable for EPC class 0.
RFID Commands ~RV ~RV Report RFID Encoding Results Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to tell the printer to send RFID encoding success or failure results to the host computer after each label format completes.
314 RFID Commands ^RW ^RW Set RFID Read and Write Power Levels Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to set the read and write power levels. This function is useful when using different tag types or transponders that require different power levels to obtain the best read and write abilities.
RFID Commands ^RZ ^RZ Set RFID Tag Password and Lock Tag Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to define a password for a tag during writing. With Gen 2 tags, you can lock a tag’s memory bank with an access password or define a kill password that can be used to permanently disable the tag.
316 RFID Commands ^RZ Example 1 • On a tag that is not Gen 2, this example encodes 5A as the tag password. ^XA ^RZ5A^FS ^XZ Example 2 • On a Gen 2 tag, this example encodes EPC data 112233445566778899001122 to the tag in Hex format, write protects the tag’s EPC data with password 1234ABCD, and leaves the tag’s access password unlocked.
RFID Commands ^WF ^WF Encode AFI or DSFID Byte Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to encode the AFI or DSFID byte to a tag. Error handling is set by the ^RS command. Format ^WFr,m,w,f,b The following table identifies the parameters for this format.
318 RFID Commands ^WF Example 2 • This example encodes data hex 66 as the AFI byte. The printer will try the command up to three times, if necessary. ^XA ^WF3,,,1^FD66 ^XZ Example 3 • This example encodes data hex 77 as the DSFID byte. The printer will try the command up to four times, if necessary. ^XA ^WF4,,,1,D^FD77 ^XZ 45541L-004 Rev.
RFID Commands ^WT ^WT Write (Encode) Tag Note • The ^WT command is provided only for backward-compatibility with label formats that were developed for older Zebra RFID printers. See Table 13 on page 287 for the list of printers and firmware with which you should not use this command. Description Use this command to encode the current RFID tag. Check the amount of data memory available for the tag that you will be using. If you send more data than the memory can hold, the printer truncates the data.
320 RFID Commands ^WT Parameters Details This parameter is not used in the R2844-Z. For the R110Xi HF: For the R110Xi HF: v = reverse the data order Reverses the data order. Accepted values: N = Do not reverse the data order (Most significant byte first for Tag*It and PicoTag.
RFID Commands ^WV ^WV Verify RFID Encoding Operation Important • This command is not supported by all printers or firmware. See Table 13 on page 287 for the list of printers and firmware with which you can use this command. Description Use this command to enable or disable the write verify function. When write verify is enabled, this command verifies the RFID encoding operation to ensure that the tag about to be programmed contains the hex data “A5A5” in the first two bytes.
322 RFID Commands ^WV Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ____________________________________
4 Wireless Commands This section contains new or modified ZPL commands for the Wireless and Wireless Plus print servers. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
324 Wireless Commands ^NB ^NB Search for Wired Print Server during Network Boot Description Use this command to tell the printer whether to search for a wired print server at bootup. Table 15 shows the results of this check. Table 15 • Results of Check for Wired Print Server Wired Print Server Connected? Check for Wired Print Server? Yes Skip The printer does not check for or acknowledge the wired print server. The Wireless or Wireless Plus print server is used as the primary print server.
Wireless Commands ^NN ^NN Set SNMP Note • Firmware versions SP1071 and SP1073 support SNMP traps only. Other SNMP parameters are not supported. Description Use this command to set the Simple Network Management Protocol (SNMP) parameters. Format ^NNa,b,c,d,e,f The following table identifies the parameters for this format. Parameters Details a = system name Same as printer name.
326 Wireless Commands ^NP ^NP Set Primary/Secondary Device Description Use this command to specify whether to use the printer’s or the print server’s LAN/WLAN settings at boot time. The default is to use the printer’s settings. When the printer is set as the primary device, you can set it up using ZPL commands or the SetWLAN utility, and any wired print server inserted into the printer will get these settings. Format ^NPa The following table identifies the parameters for this format.
Wireless Commands ^NS ^NS Change Wired Networking Settings Description Use this command to change the wired print server network settings. Format ^NSa,b,c,d,e,f,g,h,i The following table identifies the parameters for this format. Parameters Details a = IP resolution Accepted Values: A (ALL) B (BOOTP) C (DHCP AND BOOTP) D (DHCP) G (GLEANING ONLY) R (RARP) P (PERMANENT) Note • Use of GLEANING ONLY is not recommended when the Wireless Print Server is installed.
328 Wireless Commands ^NT ^NT Set SMTP Description Use this command to set the Simple Mail Transfer Protocol (SMTP) parameters. This allows you to set the e-mail settings for alerts. Format ^NTa,b The following table identifies the parameters for this format. Parameters Details a = SMTP server address Accepted Values: Any properly formatted server address in the xxx.xxx.xxx.xxx format b = print server domain Accepted Values: Any properly formatted print server domain name.
Wireless Commands ^NW ^NW Set Web Authentication Timeout Value Description Use this command to set the timeout value for the printer home page. The printer will prompt for the printer password only the first time that certain screens are accessed until 1) the web authentication timeout value is reached (default value is 5 minutes) or 2) the printer is reset. At that time, the printer will prompt for the password again. Format ^NWa The following table identifies the parameters for this format.
330 Wireless Commands ^WA ^WA Set Antenna Parameters Description Use this command to set the values for the receive and transmit antenna. Format ^WAa,b The following table identifies the parameters for this format. Parameters Details a = receive antenna Accepted Values: D (Diversity), L (Left), R (Right) Default Value: D b = transmit antenna Accepted Values: D (Diversity), L (Left), R (Right) Default Value: D 45541L-004 Rev.
Wireless Commands ^WE ^WE Set WEP Mode Description Use this command to command enable Wired Equivalent Privacy (WEP) mode and set WEP values. WEP is a security protocol for wireless local area networks (WLANs). Important • To use WEP, WPA must be disabled. Use care to include the exact number of commas required for this command when setting encryption keys (parameters e through h). A missing or extra comma will cause the keys to be stored in the wrong slots and can disable the wireless system.
332 Wireless Commands ^WE Example 2 • This example sets encryption to 128-bit, activates encryption key 2, and sets encryption keys 1 and 2 to hex values. ^WE128,2,,H,12345678901234567890123456,98765432109876543 210987654 The value for encryption key 1 is stored and can be activated in the future by the following command: ^WE128,1 Example 3 • This example sets encryption to 128-bit, activates encryption key 4, and sets encryption key 4 to a hex value.
Wireless Commands ^WI ^WI Change Wireless Network Settings Description Use this command to change the wireless network settings. Format ^WIa,b,c,d,e,f,g,h,i The following table identifies the parameters for this format. Parameters Details a = IP resolution Accepted Values: A (ALL) B (BOOTP) C (DHCP AND BOOTP) D (DHCP) G (GLEANING ONLY) R (RARP) P (PERMANENT) Note • Use of GLEANING ONLY is not recommended when the Wireless Print Server is installed.
334 Wireless Commands ^WL ^WL Set LEAP Parameters Description Use this command to enable Cisco® Lightweight Extensible Authentication Protocol (LEAP) mode and set parameters. LEAP is user authentication method that is available with some wireless cards. Format ^WLa,b,c The following table identifies the parameters for this format.
Wireless Commands ~WL ~WL Print Network Configuration Label Description Use this command to generate a network configuration label (Figure 4). Format ~WL Figure 4 • Network Configuration Label 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
336 Wireless Commands ^WP ^WP Set Wireless Password Description Use this command to set the four-digit wireless password (not the same as the general printer password). If the wireless password is 0000, the Wireless and Wireless Plus print servers run in an “unprotected” mode, which means that you do not need to enter the wireless password through the control panel to view or modify wireless settings.
Wireless Commands ^WR ^WR Set Transmit Rate Description Use this command to change the transmission parameters. Format ^WRa,b,c,d,e The following table identifies the parameters for this format. Parameters Details a = rate 1 Sets the 1 Mb/s transmit rate. Accepted Values: Y (On), N (Off) b = rate 2 Sets the 2 Mb/s transmit rate. Accepted Values: Y (On), N (Off) c = rate 5.5 Sets the 5.5 Mb/s transmit rate. Accepted Values: Y (On), N (Off) d = rate 11 Sets the 11 Mb/s transmit rate.
338 Wireless Commands ~WR ~WR Reset Wireless Card Description Use this command to reinitialize the wireless card and the print server (wired or wireless) when the Wireless or Wireless Plus print server is running. The command also causes any wireless card in the printer to reassociate to the wireless network. Same function as the RESET NETWORK control panel parameter. Format ~WR 45541L-004 Rev.
Wireless Commands ^WS ^WS Set Wireless Card Values Description Use this command to set the wireless card values for ESSID, Operating Mode, and Card Preamble. Format ^WSe,o,p The following table identifies the parameters for this format. Parameters Details e = ESSID value Accepted Values: Any value up to 32 characters, including all ASCII and Extended ASCII characters, including the space character. When this parameter is left blank, the ESSID is not changed.
340 Wireless Commands ^WS Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ________________________________
A Zebra Code Pages This section provides you with a visual of the different Zebra Code pages. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
342 Zebra Code Pages Zebra Code Page 850 Zebra Code Page 850 This is the Zebra Code Page 850: Note • For hex 5C, a cent sign prints for all printer resident fonts. A backslash prints for downloaded fonts. 45541L-004 Rev.
Zebra Code Pages Zebra Code Page 850 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
344 Zebra Code Pages Zebra Code Page 1252 Zebra Code Page 1252 This is the Zebra Code Page 1252: 45541L-004 Rev.
Zebra Code Pages Zebra Code Page 1252 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
346 Zebra Code Pages Zebra Code Page 1252 Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ________________
B ASCII This section shows the American Standard Code for Information Interchange (ASCII) code used by Zebra printers. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
348 ASCII ASCII Code Chart ASCII Code Chart Shaded areas in Table 16 indicate characters not recommended for command prefix, format prefix, or delimiter characters.
ASCII ASCII Code Chart Table 16 • Zebra Used ASCII Code (Continued) 9/15/06 HEX Character HEX Character HEX Character HEX Character 1E RS 3E > 5E ^ 7E ~ 1F US 3F ? 5F _ 7F DEL ZPL II Programming Guide 45541L-004 Rev.
350 ASCII ASCII Code Chart Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ _______________________________
C Fonts and Bar Codes This section provides information about different fonts (type faces) and bar codes that can be used with the printer. Contents Standard Printer Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Proportional and Fixed Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scalable Versus Bitmapped Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
352 Fonts and Bar Codes Standard Printer Fonts Standard Printer Fonts Most Zebra printers come standard with 15 bitmapped fonts and one scalable font, see Figure 5. Additional downloadable bitmapped and scalable fonts are also available. Character size and density (how dark it appears) depend on the density of the printhead and the media used.
Fonts and Bar Codes Proportional and Fixed Spacing Figure 6 • Recognized HEX Values below 20 HEX Proportional and Fixed Spacing Proportional spacing is different than fixed spacing. In Table 17, the intercharacter gap (space between characters) is constant for fonts A through H, which means that the spacing between all characters is the same. For example, the spacing between the letters MW is the same as between the letters IE.
354 Fonts and Bar Codes Scalable Versus Bitmapped Fonts Scalable Versus Bitmapped Fonts For scalable fonts, setting the height and width equally produces characters that appear the most balanced. Balanced characters are pleasing to the eye because actual height and width are approximately equal to each other. This is achieved through the use of a smooth-scaling algorithm in the printer. For bitmapped fonts, this balancing is built into the font.
Fonts and Bar Codes Scalable Versus Bitmapped Fonts The same principle applies when calculating width. Example: Base height = 9 dots Base width = 5 dots To magnify a bitmapped character with the above specifics 3 times its size: Height parameter = 27 [9 x 3] Width parameter = 15 [5 x 3] Changing Bitmapped Font Size Alphanumeric field command (^A) parameters h and w control the magnification and, therefore, the ultimate size of the font.
356 Fonts and Bar Codes Font Matrices Font Matrices Type Key U = Uppercase, L = Lowercase, D = Descenders 6 dot/mm printhead Matrix Font Character Size Type HxW (in dots) A B C, D E F G H GS 0 9x5 11 x 7 18 x 10 21 x 10 26 x 13 60 x 40 17 x 11 24 x 24 Default: 15 x 12 U-L-D U U-L-D OCR-B U-L-D U-L-D OCR-A SYMBOL HxW (in in.) Char./in. HxW (in mm) Char. /mm 0.059 x 0.039 0.072 x 0.059 0.118 x 0.079 0.138 x 0.085 0.170 x 0.105 0.394 x 0.315 0.111 x 0.098 0.157 x 0.157 25.4 16.9 12.7 11.7 9.53 3.
Fonts and Bar Codes Font Matrices 12 dot/mm (300 dpi) printhead Matrix Font Character Size Type HxW (in dots) A B C, D E F G H GS P Q R S T U V 0 9X5 11 X 7 18 X 10 42 x 20 26 x 13 60 x 40 34 x 22 24 x 24 20 x 18 28 x 24 35 x 31 40 x 35 48 x 42 59 x 53 80 x 71 Default: 15 x 12 U-L-D U U-L-D OCR-B U-L-D U-L-D OCR-A SYMBOL U-L-D U-L-D U-L-D U-L-D U-L-D U-L-D U-L-D U-L-D HxW (in in.) Char./in. HxW (in mm) Char. /mm 0.030 x 0.020 0.036 x 0.030 0.059 x 0.040 0.138 x 0.085 0.085 x 0.053 0.197 x 0.
358 Fonts and Bar Codes Bar Codes Bar Codes Every bar code contains data made up of a sequence of light spaces and dark bars that represent letters, numbers, or other graphic characters. The usable characters differ among the various kinds of bar codes. Each bar code section in the Command Reference provides a table of applicable characters. Start and stop characters and check digits are used by many, but not all, bar codes. These will be indicated in the specific bar code explanations.
Fonts and Bar Codes Bar Codes Figure 7 • Quiet Zone in a Bar Code Quiet Zone Quiet Zone Bar Code Field Instructions To create a bar code, a bar code field command must be contained in the label format. Table 18 shows the bar code field commands. The number in brackets denotes the print ratio. Each command produces a unique bar code. Important • (*) for Fixed Printing Ratio means that the ratio between the width of the bars in the code is a fixed standard and cannot be changed.
360 Fonts and Bar Codes Bar Codes Table 18 • Bar Code Field Commands (Continued) ^BM MSI [2.0 - 3.0] ^BP Plessey [2.0 - 3.0] ^BQ QR Code (*) [Fixed] ^BS UPC/EAN Extensions (*) [Fixed] ^BU UPC-A (*) [Fixed] ^BX Data Matrix (*) [Fixed] ^BZ PostNet (*) [Fixed] Additionally, each bar code field command can be issued with a definition parameter string. The parameter string defines field rotation, height, and interpretation line status for all bar codes.
Fonts and Bar Codes Bar Codes Table 19 • Numeric Only Bar Codes ^BJ Standard 2 of 5 ^BK ANSI Codabar (or NW-7) ^BM MSI ^BP Plessey ^BZ POSTNET Table 20 • Retail Labeling Bar Codes ^B8 EAN-8 ^B9 UPC-E ^BE EAM-13 ^BS UPC/EAN extensions ^BU UPC-A Table 21 • Alphanumeric Bar Code ^B3 Code 39 ^BA Code 93 ^BC Code 128 ^BL LOGMARS Table 22 • Two-Dimensional Bar Codes 9/15/06 ^B4 Code 49 ^B7 PDF417 ^BB CODABLOCK ^BD UPS MaxiCode ^BF MicroPDF417 ^BQ QR Code ^BX Data Mat
362 Fonts and Bar Codes Bar Codes Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ________________________
D Mod 10 and Mod 43 Check Digits This section provides information about Mod 10 and Mod 43 check digits. Contents Mod 10 Check Digit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Mod 43 Check Digit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
364 Mod 10 and Mod 43 Check Digits Mod 10 Check Digit Mod 10 Check Digit The calculations for determining the Mod 10 Check Digit character are as follows: 1. Start at the first position and add the value of every other position together. 0 + 2 + 4 + 6 + 8 + 0 = 20 2. The result of Step 1 is multiplied by 3. 20 x 3 = 60 3. Start at the second position and add the value of every other position together. 1 + 3 + 5 + 7 + 9 = 25 4. The results of steps 1 and 3 are added together. 60 + 25 = 85 5.
Mod 10 and Mod 43 Check Digits Mod 43 Check Digit Mod 43 Check Digit The calculations for determining the Mod 43 check Digit character are as follows: Each character in the Code 39 character set has a specific value, as follows: 0=0 1=1 2=2 3=3 4=4 5=5 6=6 7=7 8=8 9=9 A=10 B=11 C=12 D=13 E=14 F=15 G=16 H=17 I=18 J=19 K=20 L=21 M=22 N=23 O=24 P=25 Q=26 R=27 S=28 T=29 U=30 V=31 W=32 X=33 Y=34 Z=35 - =36 . = 37 Space=38 $=39 /=40 +=41 %=42 Example • Data string 2345ABCDE/ 1.
366 Mod 10 and Mod 43 Check Digits Mod 43 Check Digit Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ____
E ZB64 Encoding and Compression This section describes the Base 64 MIME (ZB64) encoding and compression. This is the same type of MIME encoding that is used in e-mail. Contents Introduction to B64 and Z64. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 B64 and Z64 Encoding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
368 ZB64 Encoding and Compression Introduction to B64 and Z64 Introduction to B64 and Z64 The first encoding, known as B64, encodes the data using the MIME Base64 scheme. Base64 is used to encode e-mail attachments and is specifically designed to address communications path limitations, such as control characters and 7-bit data links. It encodes the data using only the printable ASCII characters: With the use of ZPL, this has the added benefit of avoiding the caret (^) and tilde (~) characters.
ZB64 Encoding and Compression Introduction to B64 and Z64 The parameters are identical to the existing ~DT command: Table 23 • ~DT Command Parameters Parameter Details o = font name Accepted Values: any valid TrueType name, up to 8 characters Default Value: if a name is not specified, UNKNOWN is used In this example, Arial is the specified font.
370 ZB64 Encoding and Compression B64 and Z64 Encoding B64 and Z64 Encoding These download encodings, B64 and Z64, are created as drop-in replacements for the existing ASCII hexadecimal encoding. B64 encoding do the following: • Encode the compressed data using the MIME Base64 algorithm. • Calculate a CRC across the encoded data. • Add a unique header to differentiate the new format from the existing ASCII hex encoding. Z64 encoding do the following: • Compress the data using the LZ77 algorithm.
ZB64 Encoding and Compression B64 and Z64 Encoding The ~DB (Download Bitmap Font) command can use the new encodings in place of the ASCII hexadecimal encoding in data sub-fields. Each character is encoded individually. However, for small amounts of data, the identifying B64 or Z64 header and trailing CRC may negate any gains made by using the new format. For backward compatibility, the ^HG (Host Graphic) command uses the ASCII hexadecimal encoding. It does not use the new encodings.
372 ZB64 Encoding and Compression B64 and Z64 Encoding Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ___
F Field Interactions This section provides you with examples that show how commands interact with various justification parameters. The examples are in charts for these orientations: • Normal • Rotated • Bottom-up • Inverted These charts are designed so that you can identify the location of the field origin and interactions between the rotation, formatting and justification commands. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
374 Field Interactions Normal Orientation Normal Orientation Table 25 shows you the various normal orientation outputs: Table 25 • Normal Orientation Examples ^FPH ^FPV ^FPR ^FO Left Justified ^FT Left Justified ^FO Right Justified ^FT Right Justified 45541L-004 Rev.
Field Interactions Rotated Orientation Rotated Orientation Table 26 shows you the various rotated orientation outputs: Table 26 • Rotated Orientation Examples ^FPH ^FPV ^FPR ^FO Left Justified ^FT Left Justified ^FO Right Justified ^FT Right Justified 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
376 Field Interactions Bottom Up Orientation Bottom Up Orientation Table 27 shows you the various bottom up orientation outputs: Table 27 • Bottom Orientation Examples ^FPH ^FPV ^FPR ^FO Left Justified ^FT Left Justified ^FO Right Justified ^FT Right Justified 45541L-004 Rev.
Field Interactions Inverted Orientation Inverted Orientation Table 28 shows you the various inverted orientation outputs: Table 28 • Inverted Orientation Examples ^FPH ^FPV ^FPR ^FO Left Justified ^FT Left Justified ^FO Right Justified ^FT Right Justified 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
378 Field Interactions Inverted Orientation Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ______________
Glossary This is a glossary of terms. 9/15/06 ZPL II Programming Guide 45541L-004 Rev.
380 Glossary Glossary of Terms Glossary of Terms ASCII American Standard Code for Information Interchange. A 7-bit character set that includes Latin characters, as well as control and punctuation characters. bidirectional text layout The arrangement of characters with mixed directionality on a single line. For example, English and Arabic. big-endian In the encoding, the most significant byte is stored first. byte order mark BOM; indicates big-endian (BE) or little-endian (LE).
Glossary Glossary of Terms ISO 8859-1 An encoding standard for representing Western European languages using the Latin Alphabet. language A system of sounds and scripts used to represent and communicate concepts, ideas, meanings, and thoughts. ligature A glyph representing a combination of two or more characters. little-endian In the encoding, the least significant byte is stored first.
382 Glossary Glossary of Terms Notes • ___________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ __________________________________________________________________________ ___________________________
Index Symbols ^MW, 233 ^NB, network boot, 324 ^NN, set SNMP parameters, 325 ^NP, set primary/secondary device, 326 ^NS, change wired network settings, 327 ^NT, set SMTP, 328 ^NW, set web authentication timeout value, 329 ^WA, set antenna parameters, 330 ^WE, set wireless encryption values, 331 ^WI, change wireless network settings, 333 ^WL, set LEAP parameters, 334 ^WP, set wireless password, 336 ^WR, set transmit rate, 337 ~WL, print network configuration label, 335 ~WR, reset wireless card, 338 ~WS, set
384 Index change wired network settings, 327 circle, 157 CODABLOCK, 43 considerations for ^FD character set, 45 considerations for the ^BY, 45 code 11, 18 code 128 subsets, 49 subsets A and C, 52 subsets a, b, and c, 47 code 39, 22 code 49, 26 automatic mode, 29 field data character set, 29 code 93, 39 full ASCII mode, 40 code validation, 119 command compatibility with printers and firmware, 287 comment, 154 communications diagnostics, 192 enable, 192 concantination, 150 configuation update, 208 configura
Index field field reverse, 148 orientation, 153 parameter, 147 separator, 149 typeset, 150 variable, 152 field block, 136, 137 field clock real time clock, 139 field data, 140 field hexadecimal indicator, 141 field number, 145 field orientation, 153 field origin, 146 field parameter, 147 field reverse print, 148 field separator, 149 field typeset, 150 field variable, 152 firmware supported tag types for each version, 308 ZPL command compatibility, 287 flash memory initialize, 189 font identifier, 121 font
386 Index L label maximum length, 225 reverse print, 219 shift, 220 top, 221 label home, 217 label length, 218 set, 198 language define, 214 LEAP mode setting using ZPL, 334 liability, ii lock RFID tag Gen 2, 315 not Gen 2, 297 log file for RFID, 288 LOGMARS, 74 M map clear, 222 maximum label length, 225 media darkness, 223 feed, 224 ordering, xix tracking, 228 type, 230 media darkness, 223 media sensor set, 267 media sensor calibration, 191 set, 191 media tracking, 228 media type, 230 memory letter desi
Index printer web pages set timeout value, 329 printhead resistance set, 266 printing mirror image of label, 241 programmable pause, 243 programming position set using ZPL, 306 Q QR code normal mode, 85 quantity print, 244 R read power change using ZPL, 314 read RFID tag read or write RFID format (^RF), 297 read RFID tag (^RT), 311 read/write position set using ZPL, 306 real time clock set language, 257 set mode, 257 real time clock date format select, 213 real time clock time format select, 213 recall f
388 Index standard printer fonts, 352 start print, 262 symbol, 162, 166 T tag type specify using ZPL, 305 tear-off adjust position, 273 technical support, xix tilde change, 118 time for real time clock set, 269 timeout value for printer home page, 329 transfer object, 274 transmit rate setting via ZPL, 337 transponders calibration using ZPL (^HR), 289 true type font download, 132 U unbounded true type font download, 133 units of measurement set, 231 UPC/EAN extensions, 92 UPC-A, 97 UPC-E, 37 update conf
Zebra Technologies Corporation 333 Corporate Woods Parkway Vernon Hills, Illinois 60061.3109 U.S.A.
391 Change variables below to match your book, and set conditional text settings so only the appropriate tag(s) shows in Table 1. Okay to import variables, conditional text, paragraph tags, character tags, page layouts, table formats, color definitions, cross-reference formats, and reference pages from this file to create most VH TechPubs books. Some differences may be required for Maintenance Manuals 13979L-001 - x.14 and greater 45541L-002 - x.1- through x.13.. Part #: 45541L-004 Revision Number: Rev.
392 Table 1 • Conditional Text Tags Printer 105SL Brady 200 M-e Brady MVP Brady X-Plus II PAX4 110 PAX4 170 RFID Programming Guide RPAX RXi RXiIIIPlus HF RXMplus Europe RXMplus U.S. S4M Tyco UPS XiIIIPlus Z4M/Z6M Z4Mplus/Z6Mplus Z4Mplus DT ZPL II Programming Guide ZPL x.13 ZPL x.14 -Pinon ZPL x.15 - Tarkus 45541L-004 Rev.