PROGRAMMING GUIDE 333 Corporate Woods Parkway Vernon Hills, Illinois 60061.3109 U.S.A. Telephone +1 847.634.6700 Facsimile +1 847.913.
Proprietary Statement This manual contains proprietary information of Zebra Technologies Corporation. It is intended solely for the information and use of parties operating and maintaining the equipment described herein. Such proprietary information may not be used, reproduced, or disclosed to any other parties for any other purpose without the expressed written permission of Zebra Technologies Corporation.
i Contents Chapter 1 Introduction to ZPL II Scope of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . 1 Zebra Programming Language II (ZPL II). . . . . . . . . . . . . . . 1 Why ZPL II and How it Differs from Standard ZPL . . . . . . . . . 1 Working with Examples . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 2 ZPL II Basics More Information About ZPL II . . . . . . . . . . . . . . . . . . . . 5 Format Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . .
ii CONTENTS Differences Between Download Scalable Fonts and Bitmap Fonts. . . . . 14 Downloadable Scalable Fonts . . . . . . . . . . . . . . . . . . . . . . . . 15 Bar Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Basic Format for Bar Codes . . . . . . . . . . . . . . . . . . . . . . . . . 16 Bar Code Field Instructions . . . . . . . . . . . . . . . . . . . . . . . . . 17 Further ZPL II Basic Concepts . . . . . . . . . . . . . . . . . . . . 20 Introduction to Device Names . . . .
CONTENTS þExercise #4 - Slew Instruction, Form Feed Instruction and Printing Entire Formats in Reverse . . . . . . . . . . . . 43 þExercise # 5 - Using Serialized Fields . . . . . . . . . . . . . . . . . . 48 51 þExercise #7 - Erasing Stored Formats . . . . . . . . . . . . . . . . . . 55 þExercise #8 - Using Variable Data Fields . . . . . . . . . . . . . . . . 58 þExercise #6 - Stored Formats . . . . . . . . . . . . . . . . . . . . . . .
iv CONTENTS Set Dots/Millimeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Changing Delimiters and Instruction Prefixes . . . . . . . . . . . 79 Communication Diagnostics Instructions . . . . . . . . . . . . . . 79 Host Status Instructions. . . . . . . . . . . . . . . . . . . . . . . . 79 Host Identification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Print Configuration Label . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Start Print . . . . . . . . . . . . .
CONTENTS Appendix A ZPL II Command Quick Reference Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 Appendix B ASCII Code Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Appendix C Mod 10 Check Digit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Appendix D Mod 43 Check Digit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 Appendix E Fonts and Font Matrices . . . . . . . . .
vi CONTENTS How Protocol Works . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 Request Packet Formats (from the Host computer) . . . . . . . . . 360 Response From the Zebra Printer . . . . . . . . . . . . . . . . . . 362 Zebra Packet Response . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Disguising Control Code Characters . . . . . . . . . . . . . . . . 365 Rules for Transactions. . . . . . . . . . . . . . . . . . . . . . . . 366 Error Detection Protocol Application . . . . . . . . .
1 CHAPTER 1 Introduction to ZPL II Scope of This Manual This manual is a guide to the functions and features of the Zebra Programming Language II (ZPL II). This manual is effective for the firmware versions listed below and all firmware versions prior to these: 14.8.0 Zebra 105S and S500 printers 18.8.0 Zebra 90XiII, 140XiII, 170XiII & 220XiII printers 21.8.0 Zebra 105Se & 160S printers 22.8.6 Zebra Z Series printers 23.8.2 Zebra T300 printers 25.8.2 Zebra A300 printers 26.8.
2 CHAPTER 1 Introduction to ZPL II NOTE: ZPL II scripts are not 100% compatible with standard ZPL scripts. In reality, the differences between ZPL II and Standard ZPL scripts is minor. Most existing Standard ZPL scripts can be easily modified to take advantage of ZPL II. You can also write ZPL II scripts that are compatible with Standard ZPL printers. There are two major differences between ZPL II and Standard ZPL. 1. With ZPL II, all data fields are formatted as received.
CHAPTER 1 Introduction to ZPL II Printer Configuration Label is shown below with an arrow pointing to the firmware information. FIRMWARE VERSION Printer Configuration Label Working with Examples Examples are used throughout this guide to assist and instruct both new and more experienced users. Each example has two parts; the actual instructions sent to the printer and the results (usually in the form of a printed label) of those instructions.
4 CHAPTER 1 Introduction to ZPL II Before working with the examples, be sure the supplies (ribbon and media) have been loaded and that the printer has been properly adjusted for the media (labels). If unfamiliar with these procedures, refer to the printer user’s guide for assistance. The examples shown in this guide assume a media size of at least 80mm wide and 60mm long. Media of different sizes can be used, however parameters affecting size or location of printed data may need to be modified.
5 CHAPTER 2 ZPL II Basics ZPL II is Zebra Technologies Corporation’s registered trademark for its Zebra Programming Language II. ZPL II instructions sent to a Zebra printer give you the ability to create a wide variety of labels from the simple to the very complex. The labels can include any combination of text, bar codes, and graphics. More Information About ZPL II ZPL II contains a variety of printable character font styles and bar codes.
6 CHAPTER 2 ZPL II Basics ZPL II is both powerful and flexible, providing all of the following features: n Compatibility with PCs, minicomputers, mainframe computers and networks. n Serialized label fields, with user-selected starting value and increment/decrement value. n Programmable label replicate count, batch quantity control, and printer pauses that enable batching of labels into usable groups. n Simple line graphics to eliminate label preprinting. n Scalable fonts.
CHAPTER 2 ZPL II Basics Format Instructions Format instructions are the blueprint of a label. These instructions define label length, field origin, type of field, field data, and other information. Format instructions are always preceded by the caret (^) character. All format instructions are processed in the order received. Most format instructions are, for the most part, “order-independent.
8 CHAPTER 2 ZPL II Basics Control Instructions Control instructions are usually preceded by a tilde (~) character. In most cases, they cause the printer to take a specific action immediately, such as clearing the memory or feeding a blank label. Control instructions may interrupt and preempt any format instructions waiting in the printer’s received data buffer. Prefix Rules and Syntax for Control and Format Instructions Format instructions use the caret (^) prefix.
CHAPTER 2 ZPL II Basics If the default value for an instruction parameter suits your application, you need not specify that parameter. However, parameters are “position-specific.” If you want to change just the third parameter, for example, you must indicate that it is the third parameter that you want to change. To do so, use a comma, the ZPL II delimiter character, to mark each parameter’s place (i.e. ^AA,,60).
10 CHAPTER 2 ZPL II Basics An Example of a Basic Label This exercise is designed to guide you through the basic steps to create a common label which contains text and a bar code. Refer to Chapter 4, Introduction, for more information on how to set up your printer and how to enter ASCII text to send to your printer. Type the programming instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets [ ].
CHAPTER 2 ZPL II Basics LABEL HOME POSITION (^LH30,30) (ZEBRA - Actual Field Data) TEXT (FONT) (^AD) CODE 39 BAR CODE (^B3) Y-AXIS (Dots UP and DOWN) (AAA001 Actual Field Data) X-AXIS (Dots LEFT and RIGHT) Basic Label Example with Text and Bar Code 11
12 CHAPTER 2 ZPL II Basics Zebra Fonts Most Zebra printers come standard with 8 bitmapped fonts and one scalable font. Additional downloadable bitmapped and scalable fonts are also available. Character size and density (how dark it appears) depends on the density of the printhead and the media used. Three different printheads are available: 6 dots/mm, 8 dots/mm and 12 dots/mm. Internal bitmapped fonts can be magnified from 2 to 10 times their normal (default) size.
CHAPTER 2 ZPL II Basics Font A B C,D E F G H GS Ø Matrix H×W (in dots) 9x5 11 x 7 18 x 10 28 x 15 26 x 13 60 x 40 21 x 13 24x24 DEFAULT: 15x12 Type* U-L-D U U-L-D OCR-B U-L-D U-L-D OCR-A SYMBOL ICG and Baseline Intercharacter Baseline Gap (in dots) (in dots) 1 2 2 5 3 8 6 PROPORTIONAL PROPORTIONAL 7 11 14 23 21 15 21 3 x HEIGHT/4 3 x HEIGHT/4 Table 1. Intercharacter Gap and Baseline Parameters Proportional Spacing Proportional spacing is different than fixed spacing.
14 CHAPTER 2 ZPL II Basics Defining only the height or width forces the magnification to be proportional to the parameter defined. If neither is defined, the ^CF height and width are used. For example, if the height is twice the standard height, the width will be twice the standard width. NOTE: If a ^CF instruction, with height and width parameters defined, is used to set the first font, any ^A instructions (to select a different font) that follow must have the height and width parameter filled in.
CHAPTER 2 ZPL II Basics Downloadable Scalable Fonts All dot parameters used in the instructions to create Scalable Fonts are translated into a point size. The printer will convert the dot parameter to some “point” size, since scalable fonts work in point sizes, not dots.
16 CHAPTER 2 ZPL II Basics Bar Codes Zebra printers can print the following kinds of bar codes: ANSI Codabar CODABLOCK Data Matrix Code 11 Code 39 Code 49 Code 93 Code 128 (subsets A, B, and C) EAN-8 EAN-13 Industrial 2 of 5 Interleaved 2 of 5 LOGMARS MSI PDF417 UPS Maxicode Plessey PostNet Standard 2 of 5 UPC-A UPC-E UPC/EAN Extensions Micro-PDF417 QR Code Basic Format for Bar Codes The basic format for bar codes is: quiet zone, start character, data, check digit, stop character and quiet zone.
CHAPTER 2 ZPL II Basics Bar Code Field Instructions To create a bar code, a bar code field instruction must be contained in the label format. Table 2 shows all of the bar code field instructions. The number in brackets denotes the print ratio. Each instruction produces a unique bar code. ^B1 Code 11 (USD-8) [ 2.0 - 3.0 ] ^B2 Interleaved 2 of 5 [ 2.0 - 3.0 ] ^B3 Code 39 (USD-3 & 3 of 9) [ 2.0 - 3.
18 CHAPTER 2 ZPL II Basics Additionally, each bar code field instruction can be issued with a definition parameter string. The parameter string defines field rotation, height, and interpretation line status for all bar codes. For some bar codes, the parameter string also sets a check digit, start character, and/or stop character. Use the definition parameter string to command the printer to print bar codes of appropriate heights and densities that conform to the specifications of the application.
CHAPTER 2 ZPL II Basics The bar code instructions are organized into four groups. Each group represents a particular type of bar code.
20 CHAPTER 2 ZPL II Basics Further ZPL II Basic Concepts An understanding of the following concepts and terms related to ZPL II will be helpful in rounding out your knowledge of ZPL II Basics. Introduction to Device Names Device Names have been assigned to the various storage areas for ZPL II objects (graphic images, label formats, downloaded fonts, etc.) Device Names are used to identify the DRAM, RAM, EPROM, etc.
CHAPTER 2 ZPL II Basics Introduction to ZPL II Object Names and Extensions Each ZPL II Object (graphic images, label format, etc.) must have a name. This name will consist of two parts: an Object Name and an Extension. Object names can be 1 to 8 alphanumeric characters in length. Extensions consist of a period followed by 3 predefined characters. Object name conventions and extensions are similar to MS-DOS file name conventions and extensions. Several ZPL II instructions use these object names.
22 CHAPTER 2 ZPL II Basics Using Device and Object Names with ZPL II Instructions The Device Names and Object Names just described can be used with ZPL II instructions which support a name parameter.
23 CHAPTER 3 ZPL II Printer Configuration In most cases, the printer can be configured from either the front panel or through various ZPL II instructions. Once a configuration instruction is received by the printer, the change will usually affect the current label format and any future label formats until changed, the printer is reset, or the printer power is turned off. The next label printed will reflect the new instruction.
24 CHAPTER 3 ZPL II Printer Configuration n ^JU (Configuration Update) - Allows the user to save the current settings. n ^SZ (Set ZPL) - Allows the user to select either the ZPL or ZPL II Programming Language. Printer configuration instructions must have a parameter in order to be valid. Instructions with a missing or invalid parameter will be ignored.
CHAPTER 3 ZPL II Printer Configuration If you want to save the changes you made using the ZPL II commands just described or through the front panel, there are two ways to do it. 1. Refer to your User’s Guide for specific instructions on how to set up your front panel to manually save the instructions. 2. Use the ^JUa instruction. (See note on page 9.) Print Mode The ^MM (Print Mode) instruction determines the action the printer takes after a label or group of labels has been printed.
26 CHAPTER 3 ZPL II Printer Configuration 2. Non-Continuous Media - This media has some type of physical characteristic (i.e. a web, notch, hole, etc.) that can be detected by the printer to separate the labels. Media Type The ^MT (Media Type) instruction selects the type of media being used in the printer. There are two choices for this instruction: 1. Thermal Transfer Media - This media uses a high carbon black or colored ribbon. The ink on the ribbon is bonded to the media. 2.
CHAPTER 3 ZPL II Printer Configuration Label Top Position The ^LT (Label Top) instruction moves the entire label format a maximum of 64 dot rows up or down from its current position with respect to the top edge of the label (newer firmware versions allow dot rows to adjust +120 to -120; see the ^LT command on page 284). A negative value moves the format towards the top of the label; a positive number moves the format away from the top of the label.
28 CHAPTER 3 ZPL II Printer Configuration Configuration Update The ^JU (Configuration Update) instruction sets the active configuration for the printer. There are three choices for this instruction. They are defined as follows: S = Save Current Settings The current configuration will be saved. This is the configuration that will be used at Power-On. F = Reload Factory Values (Default) The factory values (default values) will be loaded.
CHAPTER 3 ZPL II Printer Configuration Depending on your needs and specific application, the following is a list of the instructions you might want to put into a configuration format. ^XB Suppress Backfeed ^PR Print Rate ^LL Label Length ^LT Label Top ^MM Print Mode ^MT Media Type ^JZ Reprint After Error ^SS Set Media Sensors ^MD Media Darkness ^MN Media Tracking ^JU Configuration Update ^SZ Set ZPL NOTE:You can have as many of these format configurations as you need.
30 CHAPTER 3 ZPL II Printer Configuration
31 CHAPTER 4 ZPL II Programming Exercises Introduction These programming exercises are included to assist and instruct both the new and more experienced user in the use of various ZPL II instructions. If you’re a new user, you may find it helpful to complete all of the exercises. The exercises are simple by design so they can be completed quickly. More experienced users may want to refer only to exercises detailing the use of specific instructions or features.
32 CHAPTER 4 ZPL II Programming Exercises computers. The ZPL II Language uses only printable ASCII characters. Although a Zebra printer may be controlled by mainframes or minicomputers, we’ve chosen the personal computer as a programming source because of its relative familiarity among users. Any word processor or text editor capable of creating ASCII-only files (files without formatting codes and other extraneous information) can be used to create the scripts in these examples.
CHAPTER 4 ZPL II Programming Exercises þExercise # 1 - Saving Label Formats as Graphic Images This exercise illustrates how to save a label format as a graphic image in printer RAM and then recall (load) a label format for printing that has been previously saved. The exercise consists of two scripts. The first contains a label format and the instructions necessary to save the format as a graphic image. The second recalls and prints the label format that was saved as the graphic image.
34 CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets ( [ ] ). ^XA [^XA - Indicates start of label format.] ^LH30,30 [^LH - Sets label home position 30 dots to right and 30 dots down from top edge of label.] ^FO20,10^AFN,56,30^FDZEBRA^FS [^FO - Set field origin relative to label home.
CHAPTER 4 ZPL II Programming Exercises Review Save this file on your computer’s harddrive, name it “EXER1.ZPL.” Copy the file to the printer. Compare your results with those shown below. If your label does not look like the one shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
36 CHAPTER 4 ZPL II Programming Exercises þExercise # 2 - Downloading and Printing Graphic Images This exercise illustrates how to create a hexadecimal graphic image and print it as part of your label. In order to store graphic images, sufficient memory must be allocated (reserved) for them. Memory for storing graphic images is allocated “on the fly” as needed.
CHAPTER 4 ZPL II Programming Exercises Refer to the ~DG command in the Command Reference section for detailed instructions on calculating the total number of bytes and the number of bytes per row. For this exercise, please create a “smile” graphic in a drawing or paint program like the one shown below so that the graphic is 1.5 inches x 1.5 inches at 200 dpi. Save the graphic in .PCX format and name it: SMILE.PCX. Convert this file to the .GRF format using ZTools™ for Windows.
38 CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets ( [ ] ). ~DGR:SMILE.
CHAPTER 4 ZPL II Programming Exercises Review Save this file on your computer’s harddrive, name it “EXER2.ZPL” Copy the file to the printer. Compare your results with those shown below. If your label does not look like the one shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
40 CHAPTER 4 ZPL II Programming Exercises þExercise # 3 - Printing Quantities of Labels, Printing Entire Label in Inverted Orientation, Setting the Print Rate and Suppressing Backfeed This exercise illustrates how to set the print speed, print a predetermined quantity of labels, suppress backfeed for tear-off and print entire labels in an inverted orientation.
CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets. ^XA^PRB^XZ [^XA - Indicates start of label format.] [^PRB - Set print rate to speed “B.” (3 inches/second)] [^XZ - End of ZPL program.] ^XA [^XA - Indicates start of label format.] ^LH360,30 [^LH - Sets label home position 360 dots to right and 30 dots down from top edge of label.
42 CHAPTER 4 ZPL II Programming Exercises ^XZ [^XZ - Indicates end of label format.] Review Save this fileon your harddrive, name it “EXER3.ZPL” Copy the file to the printer. Compare your results with those shown below. If your labels do not look like the ones shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
CHAPTER 4 ZPL II Programming Exercises þExercise #4 - Slew Instruction, Form Feed Instruction and Printing Entire Formats in Reverse This exercise illustrates the slew and form feed (slew to home) instructions and the instructions required for printing the entire label in reverse.
44 CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets. ^XA [^XA - Indicates start of label format.] ^PR2 [^PR2 - Set print rate to speed of 2 inches/second] ^LRY [^LRY - Reverse print entire label.] ^LH30,30 [^LH - Sets label home position 30 dots to right and 30 dots down from top edge of label.] ^FO0,0^GB400,300,300^FS [^FO - Set field origin relative to label home.
CHAPTER 4 ZPL II Programming Exercises ^FO20,160^AF^FDSLEW EXAMPLE^FS [^FO - Set field origin relative to label home. ] [^AF - Select font “F.”] [^FD - Start of field data.] [SLEW EXAMPLE - Actual field data.] [^FS - End of field data.] ^XZ [^XZ - Indicates end of format.] ^XA^PH^XZ [Instructions to feed to next home position.] ^XA [^XA - Indicates start of format.
46 CHAPTER 4 ZPL II Programming Exercises ^FO20,160^AF^FDSLEW EXAMPLE^FS [^FO - Set field origin relative to label home. ] [^AF - Select font “F.”] [^FD - Start of field data.] [SLEW EXAMPLE - Actual field data.] [^FS - End of field data.] ^XZ [^XZ - Indicates end of format.
CHAPTER 4 ZPL II Programming Exercises Review Save this file on your harddrive, name it “EXER4.ZPL” Copy the file to the printer. Compare your results with those shown below. SLEW PORTION OF LABEL (250 DOT ROWS) If your labels do not look like the ones shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
48 CHAPTER 4 ZPL II Programming Exercises þExercise # 5 - Using Serialized Fields This exercise discusses the instructions and parameters required to produce serialized fields as part of a label format.
CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets. ^XA [^XA - Indicates start of label format.] ^LH30,30 [^LH - Sets label home position 30 dots to right and 30 dots down from top edge of label.] ^FO20,10^AF^FDZEBRA^FS [^FO - Set field origin relative to label home. ] [^AF - Select font “F.”] [^FD - Start of field data.] [ZEBRA- Actual field data.] [^FS - End of field data.
50 CHAPTER 4 ZPL II Programming Exercises Review Save this file to your computer’s harddrive, name it “EXER5.ZPL” Copy the file to the printer. Compare your results with those shown below. A total of 10 labels should be printed. The first and last labels are shown here. If your labels do not look like the ones shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
CHAPTER 4 ZPL II Programming Exercises þExercise #6 - Stored Formats This exercise illustrates the instructions and parameters required to use stored formats.
52 CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets. ^XA [^XA - Indicates start of label format.] ^DFFORMAT^FS [^DF - Download and store format.] [FORMAT - Name of format.] [^FS - End of field data.] ^LH30,30 [^LH - Sets label home position 30 dots to right and 30 dots down from top edge of label.] ^FO20,10^AF^FN1^FS [^FO - Set field origin relative to label home.
CHAPTER 4 ZPL II Programming Exercises ^FN1^FDZEBRA^FS [^FN1 - Indicate following data should be inserted in area allocated for field number 1.] [^FD - Indicate start of field data.] [ZEBRA - Field data.] [^FS - End of field data.] ^FN2^FDAAA001^FS [^FN2 - Indicate following data should be inserted in area allocated for field number 2.] [^FD - Indicates start of field data.] [AAA001 - Field data.] [^FS - End of field data.] ^XZ [^XZ- Indicates end of format.] ^XA [^XA - Indicates start of label format.
54 CHAPTER 4 ZPL II Programming Exercises ^XZ [^XZ- Indicates end of format.] Review Save this file to your computer’s harddrive, name it “EXER6.ZPL” Copy the file to the printer. Compare your results with those shown below. If your labels do not look like the ones shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
CHAPTER 4 ZPL II Programming Exercises þExercise #7 - Erasing Stored Formats This exercise illustrates the instructions required to erase any stored formats saved in the printer memory.
56 CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets. ^XA [^XA - Indicates start of label format.] ^EF^FS [^EF - Erase all previously stored formats.] [^FS - End of field data.] ^XZ [^XZ- Indicates end of format.] ^XFFORMAT^FS [^XF - Recall stored format.] [FORMAT - Name of format to be recalled.] [^FS - End of field data.
CHAPTER 4 ZPL II Programming Exercises [NO FORMAT TO RECALL - Field data.] [^FS - End of field data.] ^XZ [^XZ- Indicates end of format.] Review Save this file to your computer’s harddrive, name it “EXER7.ZPL” Copy the file to the printer. Compare your results with those shown below. If your label does not look like the one shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
58 CHAPTER 4 ZPL II Programming Exercises þExercise #8 - Using Variable Data Fields This exercise illustrates the instructions and parameters required to produce serialized fields as part of a label format.
CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets. ^XA^MCY^XZ [^XA - Indicates start of label format.] [^MCY - Map Clear ] [^XZ - End of format.] ^XA [^XA - Indicates start of label format.] ^LH30,30 [^LH - Sets label home position 30 dots to right and 30 dots down from top edge of label.] ^FO20,10^AF^FVZEBRA^FS [^FO - Set field origin relative to label home.
60 CHAPTER 4 ZPL II Programming Exercises ^XA [^XA - Indicates start of label format.] ^FO20,10^AF^FVCUBS^FS [^FO - Set field origin relative to label home. ] [^AF - Select font “F.”] [^FV - Indicates start of VARIABLE field data.] [CUBS- Variable data.] [^FS - End of field data.] ^XZ [^XZ - End of format.] ^XA [^XA - Indicates start of label format.] ^FO20,10^AF^FVBULLS^FS [^FO - Set field origin relative to label home. ] [^AF - Select font “F.”] [^FV - Indicates start of VARIABLE field data.
CHAPTER 4 ZPL II Programming Exercises ^XZ [^XZ - End of format.] ^XA^MCY^XZ [^XA - Indicates start of label format.] [^MCY - Map Clear ] [^XZ - End of format.
62 CHAPTER 4 ZPL II Programming Exercises Review Save this file to your computer’s harddrive, name it “EXER8.ZPL” Copy the file to the printer. Compare your results with those shown below. A total of 4 labels should be printed. They are shown here. If your labels do not look like the one shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
CHAPTER 4 ZPL II Programming Exercises þExercise #9 - Graphic Boxes, Graphic Symbols and Multiple Elements on One Label This exercise illustrates the instructions and parameters required to produce a label which, when combined with elements from the previous exercises, will incorporate multiple graphic and text elements such as a graphic box, line, graphic symbol, bar code and a hexadecimal bitmapped graphic.
64 CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets ( [ ] ). ^XA [^XA - Indicates start of label format.] ^LH0,0 [^LH - Sets label home position at the upper left corner of the label.] ^LL992 [^LL - Sets label length to 992 dots rows along the Y-axis.] ^FO147,639^BY3,3.0^B3N,,228,N^FDSMILE^FS [^FO - Set field origin relative to label home.
CHAPTER 4 ZPL II Programming Exercises ^FO120,306^A0N,89^FDProgramming^FS [^FO - Set field origin relative to label home.] [^A0 - Select default font “0”, normal orientation, character height of 89 dots, standard width.] [^FD - Start of field data.] [Programming - Actual field data.] [^FS - End of field data.] ^FO120,405^A0N,89^FDLanguage^FS [^FO - Set field origin relative to label home.] [^A0 - Select default font “0”, normal orientation, character height of 89 dots, standard width.
66 CHAPTER 4 ZPL II Programming Exercises ^FO377,216^GSN,55,40^FDA^FS [^FO - Set field origin relative to label home.] [^GSN,55,40 - Set graphic symbol with normal orientation to be height of 55 dots, width of 40 dots.] [^FDA - Select field data of registered trademark character.] [^FS - End of field data.] ^FO75,63^GB769,856,10^FS [^FO - Set field origin relative to label home.
CHAPTER 4 ZPL II Programming Exercises Review Save this file on your computer’s harddrive, name it “EXER9.ZPL” Copy the file to the printer. Compare your results with those shown below. If your label does not look like the one shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
68 CHAPTER 4 ZPL II Programming Exercises þExercise # 10 - Deleting Graphic Images This exercise illustrates how to delete a graphic image previously stored in printer memory. Graphic images may be deleted from printer memory using either the ^ID instruction which is used to delete a specific graphic image stored in memory or the ^EG (Erase Download Graphics) instruction which erases ALL graphic images stored in memory.
CHAPTER 4 ZPL II Programming Exercises Programming Instructions Type the instructions (shown in bold) in the order given. An explanation of what each instruction does is in brackets. ^XA [^XA - Indicates start of label format.] ^IDR:SMILE.GRF [^ID - Delete the image called SMILE from memory.] ^XZ [^XZ - Indicates end of label format.] ^XA [^XA - Indicates start of label format.] ^FO50,50^XGR:SMILE.GRF [This line attempts to call the graphic image that was just deleted.
70 CHAPTER 4 ZPL II Programming Exercises Review Save this file on your computer’s harddrive, name it “EXER10.ZPL” Copy the file to the printer. Compare your results with those shown below. If your label does not look like the one shown, confirm that the file you created is identical to the listing at the beginning of this exercise and repeat the printing procedure.
71 CHAPTER 5 ZPL II Advanced Techniques This chapter presents information and instructions for using more advanced techniques such as special effects, serialized data fields, control instructions, program delimiters, communications, and memory cards. Special Effects for Print Fields ZPL II includes a few “Special Effects” instructions which are outlined below. Reverse Printing a Field The ^FR (Field Reverse Print) instruction allows a field to appear as white over black or black over white.
72 CHAPTER 5 ZPL II Advanced Techniques image from left to right. For more information, see the ^PM command on page 301. Printing a Label Inverted 180 Degrees The ^PO (Print Orientation) instruction inverts the label format 180 degrees. In essence, the label is printed upside down. For more information, see the ^PO command on page . Serialized Data The ^SN (Serialization Data) instruction allows the printer to index data fields by a selected increment or decrement value (i.e.
CHAPTER 5 ZPL II Advanced Techniques To create a format do the following: n Design the label. n Replace variable data fields with field numbers. n Allocate space for the size of the field. n Give the format a name. n Save the format to the printer. You can store multiple formats, limited by available DRAM. If you try to save a format that would overload memory, that format is not stored. You DO NOT receive an error message that the format is not stored.
74 CHAPTER 5 ZPL II Advanced Techniques format, use ^FN in conjunction with the ^FD (Field Data) instruction. For more information, see the ^FN command on page 219. Field Allocate Use the ^FA (Field Allocate) instruction to allocate space for the field to be saved. For more information, see the ^FA command on page 213. Recall Stored Format Instruction The ^XF (Recall Format) recalls a stored format to be merged with variable data.
CHAPTER 5 ZPL II Advanced Techniques Second, enter the following format and send it to the printer. The label shown will be printed. Control Instructions Control instructions may be sent from the host at any time to elicit an immediate response from the printer. Control instructions may be sent in a group or singly.
76 CHAPTER 5 ZPL II Advanced Techniques The ~JN (Head Test Fatal) instruction resets the printhead element error override, acting as a toggle for ~JO. Printer then goes into fault status (i.e., turns head indicator on steadily) if any subsequent execution of the printing element test detects bad printing elements. The ~JO (Head Test Non-Fatal) instruction overrides a failure of head element status check and allows printing to continue.
CHAPTER 5 ZPL II Advanced Techniques Cancel/Clear Instructions The following instructions control the contents of the Zebra input buffer: The ~JA (Cancel All) instruction cancels all format instructions in the buffer. It also cancels any batches that may be printing. The printer will stop printing after the current label (if one is printing) is finished printing. All internal buffers will be cleared of data. The “DATA” LED will turn off.
78 CHAPTER 5 ZPL II Advanced Techniques The ^PQ (Print Quantity) instruction 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. The ^PR (Print Rate) instruction determines the media speed during printing and the slew speed (feeding a blank label).
CHAPTER 5 ZPL II Advanced Techniques Changing Delimiters and Instruction Prefixes For some applications, you may need to change the ZPL II delimiter (default “,”) the format instruction prefix (default: “^”), and/or the control instruction prefix (default: “~”). You can change these characters to any ASCII characters you choose, using the appropriate instructions.
80 CHAPTER 5 ZPL II Advanced Techniques Start Print The ^SP (Start Print) instruction allows a label to start printing at a specified point before the entire label has been completely formatted. On extremely complex labels, this instruction can increase the overall throughput of the print. The instruction works as follows. You specify the dot row at which the ^SP instruction is to take affect. This then creates a label ‘segment.
CHAPTER 5 ZPL II Advanced Techniques If your printer is not equipped with an LCD Front Panel, use the following steps to assign network IDs and chain multiple printers within an RS-232C network: 1. Send a ~NR command - to make sure all printers are in transparent mode. (See ~NR on page 299) 2. Send a ~NC000 command - this connects to the first printer in the chain that has an ID of 000. (See ~NC on page 297) 3. Send a ^NIXXX command - this is where XXX is the new ID for the printer.
82 CHAPTER 5 ZPL II Advanced Techniques Graphic Instructions In addition to text and bar codes, three types of graphics can be printed on a Zebra printer: n Boxes and lines. n ZPL II label formats saved as graphic images. n Graphic images in Hexadecimal format. ZPL II has a format instruction that will create boxes and lines as part of any label format. These label formats can also be stored as graphic images and data can be merged with them at print time.
CHAPTER 5 ZPL II Advanced Techniques Alternative Data Compression Scheme for ~DG and ~DB Instructions There is an alternative data compression scheme recognized by the Zebra printer. This scheme further reduces the actual number of data bytes and the amount of time required to download graphic images and bitmapped fonts with the ~DG and ~DB instructions. The following represent the repeat counts 1,2,3,4,5,....,19 on a subsequent Hexadecimal value.
84 CHAPTER 5 ZPL II Advanced Techniques Repeat Values Several repeat values can be used together to achieve any value desired. “vMB” or “MvB” will send 327 hexadecimal B’s to the printer. a comma (,) fills the line, to the right, with zeros (0) until the specified line byte is filled. an exclamation mark (!) fills the line, to the right, with ones (1) until the specified line byte is filled. a colon (:) denotes repetition of the previous line.
CHAPTER 5 ZPL II Advanced Techniques Reducing Download Time of Graphic Images There is a method of reducing the actual number of data bytes sent to the printer when using the ~DG instruction. This is shown in Figures 4.1 and 4.2 along with the graphic. In Figure 4.2, if the HEX string ends in an even number of zeros (0’s), a single comma (,) can be substituted for ALL of the zeros. If the HEX string ends in an odd number of zeros, one zero and a single comma is required.
86 CHAPTER 5 ZPL II Advanced Techniques Transferring Objects Between Storage Devices The ^TO (Transfer Object) instruction is used to copy an object or group of objects from one storage device to another. It is quite similar to the copy function used in PC’s. Source and destination devices must be supplied and must be different and valid for the action specified. Invalid parameters will cause the instruction to be ignored. There are no defaults associated with this instruction.
CHAPTER 5 ZPL II Advanced Techniques The following are various examples of using the ^ID instruction. To delete just stored formats from DRAM: ^XA^IDR:*.ZPL^XZ To delete formats and images named SAMPLE from DRAM regardless of the extension: ^XA^IDR:SAMPLE.*^XZ 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 To delete everything from DRAM: ^XA^IDR:*.
88 CHAPTER 5 ZPL II Advanced Techniques Memory, Flash Cards, Font Cards Zebra printers come with a variety of memory options. These include DRAM, EPROM, PCMCIA, FLASH, SOCKET FLASH and BATTERY BACKED-UP RAM. Depending on which printer model you have, on most Zebra printers you can print out a Printer Configuration Label which will show the letter designation(s) assigned to your printer memory.
CHAPTER 5 ZPL II Advanced Techniques NOTE: This command is only available in certain Zebra printers and based on the firmware installed in the printer. Please consult the Command Quick Reference Chart (Appendix A) for a complete listing of firmware that supports ^JB. Sending the ~HM (Host Memory Status) instruction to the printer immediately returns a memory status message to the host. Use this instruction whenever you need to know the status of the memory.
90 CHAPTER 5 ZPL II Advanced Techniques Shortcuts and Alternate Schemes for Writing ZPL II Scripts ZPL II programming scripts can be written in a variety of ways. There are, however, more efficient ways to write a ZPL II script depending on the application and the commands used. The following are certain ways to write the same ZPL II script, each yeilding the same result.
CHAPTER 5 ZPL II Advanced Techniques Example 2: You may prefer to write your ZPL II scripts in any way that makes sense to you.
92 CHAPTER 5 ZPL II Advanced Techniques Font Shortcuts There are times when you might include a specific font into your script and use it repeatedly within different fields. The following is an example of one way to write this script: ^XA ^FO120,108^A0N,89^FDA Guide to^FS ^FO120,207^A0N,89^FDZPL II^FS ^FO120,306^A0N,89^FDProgramming^FS ^FO120,405^A0N,89^FDLanguage^FS ^XZ Notice that the ^FS command is used on the second to last line to close the field.
CHAPTER 5 ZPL II Advanced Techniques If you wanted to change the font type or size within the script, however, you would need to include the specific font parameters within the field where the change occurs. In this case, you would not want to use the ^FB command because the change in font size (in our example below) will affect the y-axis (up and down) position of the text.
94 CHAPTER 5 ZPL II Advanced Techniques
95 ZPL II Command Reference Introduction The ZPL II Command Reference, a comprehensive guide to ZPL II commands, lists all commands in alphabetical order. This listing includes the commands originally introduced with ZPL II as well as newly introduced parameters for those commands. Some entirely new ZPL II commands have been added due to the introduction of new printer firmware and also for specific applications.
96 ZPL II COMMAND REFERENCE ^A Scalable/Bitmapped Font The ^A (Scalable/Bitmapped Font) instruction is used with the builtin fonts or TrueType® fonts. Scalable fonts (also known as smooth vector fonts) expand the character size horizontally, vertically or in both dimensions on a dot by dot basis. Bitmapped fonts are made up of pixel elements and are slightly taller than their width. Bitmapped fonts are always at the maximum size of the characters cell.
ZPL II COMMAND REFERENCE The format for the ^A instruction is ^Af,o,h,w where ^A = Scalable/Bitmapped Font f= Desired Font Default value: Ø (CG Triumvirate Bold Condensed®) Other values: A thru Z, and 1-9. (Any font in the printer including downloaded fonts, EPROM stored fonts and fonts A-Z and 1-9 can be selected via ^CW.) Instruction ignored if value is incorrect or not specified. o= Font Orientation Default value: ^FW default or last ^FW value.
98 ZPL II COMMAND REFERENCE ^A@ Use Font Name to Call Font The ^A@ (Use Font Name to Call Font) instruction uses the complete name of a font, rather than a character designation, to call the font. Example: ^XA^A@N,25,25,B:Cyrillic.FNT^FO100,20^FS ^FDThis is a test.^FS ^A@N,50,50^FO200,40^FS ^FDThis string uses the B:Cyrillic.FNT^FS^XZ The first command line will search the Font Card/Battery Backed RAM (B:) looking for the “Cyrillic.FNT” font name.
ZPL II COMMAND REFERENCE The format for the ^A@ instruction is: ^A@o,h,w,n Where ^A@ = o= Use Font Name to Call Font (Where @ triggers the search for font name listed by parameter n) Font Orientation Default value: Last ^FW value or N if none. Other values: N = Normal R = Rotated, 90 degrees clockwise; I = Inverted, 180 degrees B = Read from Bottom up, 270 degrees h= Character Height in Dots Default value: Magnification specified by Width, if any or uses last ^CF value, or base height if none.
100 ZPL II COMMAND REFERENCE ^B1 Code 11 Bar Code The ^B1 (Code 11) bar code instruction is 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 plus a dash. Print Ratios Supported: 2.0 to 3.0. ^FD (Field Data) Limitations: 100+ characters. Actual amount of data depends on ^BY ratio and width (length if rotated) of label.
ZPL II COMMAND REFERENCE The format for the ^B1 instruction is: ^B1o,e,h,f,g where ^B1 = Code 11 Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees e= Check Digit Default value: N(No) = 2 digits Other value: Y(Yes) = 1 digit h= Bar Code Height Default value: Value set by ^BY. Other values: 1 dot to 9999 dots.
102 ZPL II COMMAND REFERENCE ^B2 Interleaved 2 of 5 Bar Code The ^B2 (Interleaved 2 of 5) bar code instruction is 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.
ZPL II COMMAND REFERENCE The format for the ^B2 instruction is: ^B2o,h,f,g,e where ^B2 = Interleaved 2 of 5 Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value:
104 ZPL II COMMAND REFERENCE ^B3 Code 39 Bar Code The ^B3 (Code 39) bar code instruction is the standard for many industries, including adoption by the U.S. Department of Defense (DOD) and is one of three symbologies identified in the American National Standards Institute (ANSI) standard MH10.8M-1983. This code is also known as USD-3 code and 3 of 9 code. Each character in Code 39 bar code is composed of nine elements; five bars, four spaces, and intercharacter gap.
ZPL II COMMAND REFERENCE The format for the ^B3 instruction is: ^B3o,e,h,f,g where ^B3 = Code 39 Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees e= Mod-43 Check Digit Default value: N = No Other value: Y = Yes h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No
106 ZPL II COMMAND REFERENCE Full ASCII Mode for Code 39 Code 39 can generate the full 128 ASCII character set using paired characters as shown in tables (A) and (B) below. ASCII Code 39 ASCII Code 39 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 $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 SP ! “ # $ % & ‘ ( ) * ++ ‘ .
ZPL II COMMAND REFERENCE 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 +M +O +P +Q +R +S +T +U +V +W +X +Y +Z %P %Q %R %S %T, %X ] _ (B) Code 39 Full ASCII MODE 107 C O M M A N D R E F E R E N C E
108 ZPL II COMMAND REFERENCE ^B4 Code 49 Bar Code The ^B4 (Code 49) bar code is a multi-row, continuous variable length symbology capable of encoding the full 128 ASCII character set. It is ideally suited to applications where large amounts of data are required in a small space. The code consists of 2 to 8 rows. A row consists of a leading quiet zone, 4 symbol characters encoding 8 code characters, a stop pattern, and a trailing quiet zone. Rows are separated by a 1-module high separator bar.
ZPL II COMMAND REFERENCE The format for the ^B4 instruction is: ^B4o,h,f,m where ^B4 = Code 49 Bar Code o= Orientation Default value: Current ^FW value (^FW defaults to N = Normal at power-up) Other values: R = Rotated (90 Degrees Clockwise) I = Inverted (180 Degrees) B = Bottom (270 Degrees - Read from bottom up) h= Height Multiplier of Individual Rows Defined: This number, multiplied by the module, equals the height of the individual rows in dots.
110 ZPL II COMMAND REFERENCE 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 II COMMAND REFERENCE Code 49 Field Data Character Set The ^FD data sent to the printer when using Starting Modes 0 thru 5 is based on the Code 49 Internal Character Set. This is shown in the first column of the Code 49 table on page .110 The characters : ; < = > and ? are special Code 49 control characters. Valid field data must be supplied when using modes 0 thru 5. Shifted characters are sent as a two-character sequence of a “shift character” followed by a “character in the unshifted character set.
112 ZPL II COMMAND REFERENCE ^B7 PDF417 Bar Code The ^B7 (PDF417) bar code instruction is a two-dimensional multirow, continuous, stacked symbology. This bar code is capable of encoding over 1000 bytes of data per label. It is ideally suited to applications where large amounts of information are required at the time the bar code is read. The code consists of 3 to 90 stacked rows. Each row consists of start/stop patterns and symbol characters called “codewords.
ZPL II COMMAND REFERENCE The format for the ^B7 instruction is: ^B7o,h,s,c,r,t where ^B7 = PDF417 Bar Code o = Orientation Default value: Current ^FW value (^FW defaults to N = Normal at power-up) Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h = Bar Code Height for Individual Rows (This number, multiplied by the module, equals the height of the individual rows in dots.
114 ZPL II COMMAND REFERENCE r = Number of Rows to Encode User can specify number of symbol rows giving control over the height of the symbol. Default value: 1:2 row/column aspect ratio. Other values: 3 to 90 Example: With no row or column values entered, 72 codewords would be encoded into a symbol of 6 columns and 12 rows. (Depending on codewords, aspect ratio will not always be exact.
ZPL II COMMAND REFERENCE Special considerations for the ^BY instruction when using PDF417. The parameters for the ^BYw,r,h instruction when used with a ^B7 PDF417 code are as follows; w = Module width. (Default = 2) Limited to 10. r = Ratio (Default = 3) Fixed. Has no effect on PDF417. h = Height of bars. Overall symbol height. PDF417 uses this as the overall symbol height only when the row height is not specified in the ^B7 ‘h’ parameter.
116 ZPL II COMMAND REFERENCE ^B8 EAN-8 Bar Code The ^B8 (EAN-8) bar code instruction is the shortened version of the EAN-13 bar code. See EAN-13 (page 138) for more information about EAN bar codes. EAN is an acronym for European Article Numbering. Each character in EAN-8 Bar Code is composed of four elements; two bars, two spaces. Print Ratios Supported: Fixed Ratio. ^FD (Field Data) Limitations: Exactly 7 characters.
ZPL II COMMAND REFERENCE The format for the ^B8 instruction is: ^B8o,h,f,g where ^B8 = EAN-8 Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value: N = No Other va
118 ZPL II COMMAND REFERENCE ^B9 UPC-E Bar Code The ^B9 (UPC-E) bar code instruction is a variation of the UPC symbology used for number system 0. UPC is an acronym for Universal Product Code. It is a shortened version of the UPC-A bar code in which zeros are suppressed, resulting in codes that require less printing space. It is used for labeling small items. NOTE: When using the zero suppressed versions of UPC, the user MUST enter the full ten character sequence.
ZPL II COMMAND REFERENCE The format for the ^B9 instruction is: ^B9o,h,f,g,e where ^B9 = UPC-E Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value: N = No Other
120 ZPL II COMMAND REFERENCE ^BA Code 93 Bar Code The ^BA (Code 93) bar code instruction is a variable length, continuous symbology. It is used in many of the same applications as the Code 39 bar code. It uses the full 128 character ASCII Code. ZPL II, however, does not support ASCII control codes or escape sequences, so it uses the substitute characters shown below. This code is also known as USS-93.
ZPL II COMMAND REFERENCE The format for the ^BA instruction is: ^BAo,h,f,g,e where ^BA = Code 93 Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value: N = No Othe
122 ZPL II COMMAND REFERENCE Full ASCII Mode for Code 93 Code 93 can generate the full 128 ASCII character set using paired characters as shown in tables (A) and (B) below. ASCII Code 93 ASCII Code 93 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 ‘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 SP ! “ # $ % & ‘ ( ) * ++ ‘ .
ZPL II COMMAND REFERENCE ASCII Code 93 ASCII Code 93 @ 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 )M )O )P )Q )R )S )T )U )V )W )X )Y )Z ‘P ‘Q ‘R ‘S ‘T ] _ (B) Code 93 Full ASCII MODE 123 C O M M A N D R E F E R E N C E
124 ZPL II COMMAND REFERENCE ^BB CODABLOCK Bar Code The ^BB (CODABLOCK) bar code is a two-dimensional multi-row, stacked symbology. It is ideally suited to applications where large amounts of information are required. Depending on the mode selected, the code consists of 1 to 44 stacked rows. Each row begins and ends with a start/stop pattern. Print Ratios: CODABLOCK A is variable, CODABLOCK E and CODABLOCK F are fixed.
ZPL II COMMAND REFERENCE The format for the ^BB instruction is: ^BBo,h,s,c,r,m where ^BB = CODABLOCK Bar Code o= Field Position Default value: N = Normal Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height for Individual Rows (This number, multiplied by the module, equals the height of the individual rows in dots) Default value: 8 dots Other values: 2 dots to 200 dots s= Security Level (Determines if symbol ch
126 ZPL II COMMAND REFERENCE r= Number of Rows to Encode (User can specify the number of symbol rows giving control over the height of the symbol. Range: CODABLOCK A: 1 to 22 CODABLOCK E and F: 2 to 44. • If values for Number of Characters per Row and for Number of Rows to Encode are not specified, a single row will be produced.
ZPL II COMMAND REFERENCE w = Module width. (Default = 2) Max. is 10. (CODABLOCK A only) r = Ratio (Default = 3) Fixed. Has no effect on CODABLOCK E or F. h = Height of bars. CODABLOCK uses this as the overall symbol height only when the row height is not specified in the ^BB “h” parameter. Special Considerations for the ^FD Character Set when using CODABLOCK The character set sent to the printer depends on the mode selected with the “m” parameter. CODABLOCK A: Uses the same character set as Code 39.
128 ZPL II COMMAND REFERENCE ^BC Code 128 Bar Code (Subsets A, B, and C) The ^BC (Code 128) bar code instruction is a high density, variable length, continuous alphanumeric symbology. It was designed for complex encoded product identification. This is also known as a USD-6 bar code. Code 128 has three subsets of characters. There are 106 printing (encoded) characters in each set. Therefore, each character can have up to three different meanings, depending on the character subset being used.
ZPL II COMMAND REFERENCE The format for the ^BC instruction is: ^BCo,h,f,g,e,m where ^BC = Code 128 Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No NOTE: Intrepretation line can be printed in any available font by
130 ZPL II COMMAND REFERENCE Effective for Version 16.3.0 Other value: A = Automatic Mode The Automatic Mode analyzes the data sent and automatically determines the best packing method. Full ASCII Character Set can be used in the ^FD statement. Printer will determine when to shift subsets. A string of four or more numeric digits will cause automatic shift to subset C.
ZPL II COMMAND REFERENCE Special Conditions if UCC Case Mode is Selected 1. Excess digits (above 19) in ^FD or ^SN will be eliminated. 2. Below 19 digits in ^FD or ^SN adds zeros to right to bring count to 19. (This produces an invalid interpretation line.) Code 128 Subsets The three Code 128 character subsets are referred to as Subset A, Subset B, and Subset C. A subset may be selected in one of two ways. 1.
132 ZPL II COMMAND REFERENCE Example of Code 128 - Subset B Since 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. This is demonstrated in following two samples. The bar codes in the following two samples are identical. Fig. A: Subset B - No Start Character Fig.
ZPL II COMMAND REFERENCE Code 128 - subset B is programmed directly as ASCII text, except for values greater than 94 decimal and a few special characters: ^ > ~ These characters must be programmed by using the invocation codes shown in the table on page 131. Example of Code 128 - Subsets A and C Code 128 subsets A and C are programmed as pairs of digits, 00-99, in the field data string. (Refer to the Code 128 characters chart on page .
134 ZPL II COMMAND REFERENCE ^BD UPS MaxiCode Bar Code The ^BD (UPS MaxiCode) instruction creates a two-dimensional, optically read (not scanned) code. This symbology was developed by UPS (United Parcel Service). The code is generated from the information in the ^FD statement which is described below. Notice that there are no additional parameters for this code. Also, this code does not generate an interpretation line. The ^BY instruction has no affect on MaxiCode, however the ^CV instruction does work.
ZPL II COMMAND REFERENCE The format for the ^BD instruction is: ^BDm,n,t where ^BD = m= MaxiCode Bar Code Mode Default value: 2 Structured Carrier Message - Numeric Postal Code (US) Other values: 3 Structured Carrier Message - Alphanumeric Postal Code (Non-US) 4 Standard Symbol, SEC 5 N/A 6 Reader Program, SEC NOTE: Mode 0 and mode 1 are obsolete. Mode 0, if used, will default to mode 2; mode1 defaults to mode 4. Effective for Versions 14.8.0, 18.8.0, 21.8.0, 23.8.1, 23.8.2, 25.8.1, 25.8.2, 22.8.
136 ZPL II COMMAND REFERENCE The format for the ^FD instruction is: ^FD where ^FD = = Field Data High Priority Message (only applicable in Modes 2 and 3) Valid characters are 0123456789, except where noted. US Style Postal Code (Mode 2) is aaabbbcccccdddd where aaa = three-digit class of service bbb = three-digit country code ccccc = five-digit zip code dddd = four-digit zip code extension NOTE: If there is no ZIP code extension, four zeros (0000) must be entered.
ZPL II COMMAND REFERENCE Address Validation Ship to Street Address Ship to City Ship to State Rs End of Message Gs Gs Gs Gs Rs Eot * Mandatory Data for UPS NOTE: Gs is used to separate fields in a message (0x1D) Rs is used to separate format types (0x1E) Eot is the end of transmission character (0x04) SPECIAL NOTES: n The formatting of and only apply when using modes 2 and 3.
138 ZPL II COMMAND REFERENCE ^BE EAN-13 Bar Code The ^BE (EAN-13) bar code instruction 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.
ZPL II COMMAND REFERENCE The format for the ^BE instruction is: ^BEo,h,f,g where ^BE = EAN-13 Bar Code o= Orientation Default value: N=Normal or current ^FW Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value: N = No Oth
140 ZPL II COMMAND REFERENCE ^BF Micro-PDF417 Bar Code The ^BF (Micro-PDF417) is a two-dimensional multi-row, continuous, stacked symbology identical to PDF417 except that it replaces the 17-module-wide start/stop patterns and left/right row indicators with a unique set of 10-module-wide Row Address Patterns designed to reduce overall symbol width and to allow linear scanning at row heights as low as 2X.
ZPL II COMMAND REFERENCE The format for the ^BF instruction is: ^BFo,h,m where ^BF = o= m= h= Micro-PDF Bar Code Orientation Default value: N or last ^FW value. Other values: N = Normal R = Rotated, 90 degrees clockwise; I = Inverted, 180 degrees B = Read from Bottom up, 270 degrees Mode Default value: 0 (from table) Selections: 0 - 33 (from table shown below) Bar Code Height Default value: Value set by ^BY or 10 dots if none Other values: 1 dot to 9999 dots. Out of range is set to nearest limit.
142 ZPL II COMMAND REFERENCE ^BI Industrial 2 of 5 Bar Code ^BI (Industrial 2 of 5) bar code instruction is a discrete, self-checking continuous numeric symbology. 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 and Interleaved 2 of 5 bar codes are also available in ZPL II. In Industrial 2 of 5, all of the information is contained in the bars.
ZPL II COMMAND REFERENCE The format for the ^BI instruction is: ^BIo,h,f,g where ^BI = Industrial 2 of 5 Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value: N =
144 ZPL II COMMAND REFERENCE ^BJ Standard 2 of 5 Bar Code The ^BJ (Standard 2 of 5) bar code instruction is a discrete, selfchecking continuous numeric symbology. In Standard 2 of 5, all of the information is contained in the bars. Two bar widths are employed in this code, the wide bar being three times the width of the narrow bar. Print Ratios Supported: 2.0 to 3.0. ^FD (Field Data) Limitations: 100+ characters. Actual amount of data depends on ^BY ratio and width (length if rotated) of label.
ZPL II COMMAND REFERENCE The format for the ^BJ instruction is: ^BJo,h,f,g where ^BJ = Standard 2 of 5 Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value: N = N
146 ZPL II COMMAND REFERENCE ^BK ANSI Codabar Bar Code The ^BK (ANSI Codabar) bar code instruction is currently 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 use. Each character in this code is composed of seven elements: four bars and three spaces.
ZPL II COMMAND REFERENCE The format for the ^BK instruction is: ^BKo,e,h,f,g,k,l where ^BK = ANSI Codabar Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees e= Check Digit (not implemented) Default value: N = No Other value: Y = Yes h= Bar Code Height Default value: Value set by ^BY.
148 ZPL II COMMAND REFERENCE ^BL LOGMARS Bar Code The ^BL (LOGMARS) bar code instruction is a special application of Code 39 used by the Department of Defense (DOD). LOGMARS is an acronym for Logistics Applications of Automated Marking and Reading Symbols. Print Ratios Supported: 2.0:1 to 3.0:1. ^FD (Field Data) Limitations: 100+ characters. Actual amount of data depends on ^BY ratio and width (length if rotated) of label. For more information, refer to a LOGMARS bar code specification.
ZPL II COMMAND REFERENCE The format for the ^BL instruction is: ^BLo,h,g where ^BL = LOGMARS Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots g= Print Interpretation Line Above Code Default value: N = No Other value: Y = Yes 149 C O M M A N D R E F E R E N C E
150 ZPL II COMMAND REFERENCE ^BM MSI Bar Code The ^BM (MSI) bar code is a pulse-width modulated, continuous non-self checking symbology. It is a variant of the Plessey bar code. Each character in the MSI bar code is composed of eight elements: four bars and four adjacent spaces . Print Ratios Supported: 2.0:1 to 3.0:1. ^FD (Field Data) Limitations: 1 - 14 digits when parameter ‘e’ is B, C or D, 1 - 13 digits when parameter ‘e’ is A, plus quiet zone.
ZPL II COMMAND REFERENCE The format for the ^BM instruction is: ^BMo,e,h,f,g,h where: ^BM = MSI Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees e= Check Digit Selection Default value: B = 1 Mod 10 Other values: A = No Check Digits C = 2 Mod 10 D = 1 Mod 10 and 1 Mod 11 h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Inte
152 ZPL II COMMAND REFERENCE ^BP Plessey Bar Code The ^BP (Plessey) bar code 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. Print Ratios Supported: 2.0:1 to 3.0:1. ^FD (Field Data) Limitations: 100+ characters. Actual amount of data depends on ^BY ratio and width (length if rotated) of label.
ZPL II COMMAND REFERENCE The format for the ^BP instruction is: ^BPo,e,h,f,g where: ^BP = Plessey Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees e= Print Check Digit (CRC8 2-digits) Default value: N = No Other value: Y = Yes h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other
154 ZPL II COMMAND REFERENCE ^BQ QR Code Bar Code The ^BQ (QR Code) is a matrix symbology consisting of an array of nominally square modules arranged in an overall square pattern. A unique pattern at three of the symbols four corners assists in determining the bar code size, position, and inclination. A wide range of symbol sizes is possible along with four levels of error correction. User-specified Module dimensions provide a wide variety of symbol production techniques.
ZPL II COMMAND REFERENCE The format for the ^BQ instruction is: ^BQa,b,c where ^BQ = a= b= c= QR Code Bar Code Field Position Default value: Normal. Other values: No rotation is available. The ^FW command has no effect on rotation.
156 ZPL II COMMAND REFERENCE Special considerations for the ^FD command when using QR Code The QR switches are formatted into the ^FD field data as follows: There are two types of Data Input Modes, Automatic and Manual. If you specify “A” you do not need to specify the character mode. If you specify “M” you will need to specify the character mode.
ZPL II COMMAND REFERENCE , < : >< : >, ^FS **n = Up to 200 in Mixed mode QR Code switches which can be used in the ^FD field data string: Mixed Mode Switches
158 ZPL II COMMAND REFERENCE Data input A Automatic input (Default) Data character string JIS8 unit, Shift JIS. When the input mode is automatic input, the binary codes of 0x80 to 0x9F and 0xE0 to 0xFF cannot be set. M Manual input Character mode N Numeric (0 - 9) A Alphanumeric (Default) (0 - 9) (A - Z) (SP,$,%,*,+,-,.,/,:) Bxxxx 8-bit Byte mode Handles the 8-bit Latin/Kana character set in accordance with JIS X 0201 (character values 0x00 to 0xFF). xxxx -- No.
ZPL II COMMAND REFERENCE Example: QR Code ^XA ^FO20,20^BQ,2,10^FDQA,0123456789ABCD 2D code^FS ^XZ Q A , High reliability level Automatic setting 0123456789ABCD 2D code Example: QR Code with automatic mask & automatic data ^XA ^FO20,20^BQ,2,10^FDQ,0123456789ABCD 2D code^FS ^XZ Q High reliability level Automatic (default if not specified) , 0123456789ABCD 2D code Example: QR Co
160 ZPL II COMMAND REFERENCE Example: QR Code ^XA ^FO20,20^BQ,2,10^FDMM,AAC-42^FS ^XZ M M , A Standard reliability level Manual input Alphanumeric Data AC-42 Example: QR Code ^XA ^FO20,20^BQ,2,10^FDLM,N0123456789012345,AABC,B0006qrcode^FS ^XZ L M , N , A , B 0006 Hi
ZPL II COMMAND REFERENCE Example: QR Code ^XA ^FO20,20^BQ,2,10^FDD03048F,LM,N0123456789,A12AABB,B0006qrcode^FS ^XZ
162 ZPL II COMMAND REFERENCE ^BS UPC/EAN Extensions The ^BS (UPC/EAN extensions) instruction is the 2- and 5-digit addon used primarily by publishers to create bar codes for ISBN’s (International Standard Book Numbers, issued by R.R. Bowker). These extensions are handled as separate bar codes. Although compatible with the UPC symbol, these extensions cannot be mistaken for a UPC symbol or for part of the UPC symbol by scanners designed to read only standard UPC symbols.
ZPL II COMMAND REFERENCE The format for the ^BS instruction is: ^BSo,h,f,g where ^BS = UPC/EAN Extension o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value: Y = Yes Othe
164 ZPL II COMMAND REFERENCE Care should be taken in positioning the UPC/EAN extension with respect to the UPC-A (or UPC-E) code to insure the resultant composite code is within the UPC specification.
ZPL II COMMAND REFERENCE Additionally, the bar code height for the extension should be 27 dots (0.135 inches) shorter than that of the Primary code. A Primary UPC code height of 183 dots (0.900 inches) would require a extension height of 155 dots (0.765). The figure below shows an example of how to create a normal UPC-A code for the value 7000002198 with an extension equal to 04414.
166 ZPL II COMMAND REFERENCE ^BU UPC-A Bar Code The ^BU (UPC-A) bar code instruction is a fixed length, numeric, continuous symbology. It is primarily used in the retail industry for labeling packages. The UPC-A bar code has 11 data characters. An 8 dot/mm printhead can produce UPC/EAN symbologies at a magnification factor of 77%. For more information, refer to a UPC-A Bar Code Specification. Print Ratios Supported: Fixed Ratio. ^FD (Field Data) Limitations: Exactly 11 characters.
ZPL II COMMAND REFERENCE The format for the ^BU instruction is: ^BUo,h,f,g,e where ^BU = UPC-A Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: Y = Yes Other value: N = No g= Print Interpretation Line Above Code Default value: N = No Other
168 ZPL II COMMAND REFERENCE ^BX Data Matrix Bar Code The ^BX (Data Matrix) bar code is a two-dimensional matrix symbology which is made up of square modules arranged within a perimeter finder pattern.
ZPL II COMMAND REFERENCE The format for the ^BX instruction is: ^BXo,h,s,c,r,f,g where ^BX = Data Matrix Bar Code o= Orientation Default value: N = Normal Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Dimensions of Individual Symbol Elements (one to width of label) The individual elements are square, so this parameter specifies both the module and row height.
170 ZPL II COMMAND REFERENCE 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 r= Rows to Encode (“9” to “49”) Odd values only for quality “0” to “140” (“10”-“144”); even values only for quality “200.” The number of rows and columns in the symbol will be automatically determined.
ZPL II COMMAND REFERENCE f= Format ID (“0” to “6”) — Not used with quality “200” Default value: 6 Field data is full 256 ISO 8-bit set Other values: 1 Field data is numeric + space (0..9,’’) — No \&’’ 2 Field data is upper-case alphanumeric + space (A..Z,’’) — No \&’’ 3 Field data is upper-case alphanumeric + space, period, comma, dash, and slash (0..9,A..Z,".,-/") — No \& 4 Field data is upper-case alphanumeric + space (0..9,A..
172 ZPL II COMMAND REFERENCE specified in the ^BD instruction, the height of symbol value will be divided by the required rows/columns, rounded, limited to a minimum value of one, and used as the dimensions of individual symbol elements. Field Data (^FD) for Data Matrix Quality “000”-“140” n The “\&” and “||” can be used to insert carriage return/line feed and back slash as with PDF417. Other characters in the control character range can only be inserted by using ^FH.
ZPL II COMMAND REFERENCE Quality “200” n If more than 3072 characters are supplied as field data, it is truncated to 3072 characters. 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. n If ^FH is used, field hex processing takes place before the escape sequence processing described below.
174 ZPL II COMMAND REFERENCE ^BY Bar Code Field Default Instruction The ^BY instruction is used to change the values for the Narrow Element Module (Narrow Bar or Space) Width, the Wide Bar to Narrow Bar Width Ratio and the Bar Height. It can be used as often as necessary within a label format. Ratio Selected (r) 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.
ZPL II COMMAND REFERENCE The format for the ^BY instruction is: ^BYw,r,h where ^BY = w= Change Bar Code Default Parameters Module (Narrow Bar) Width Initial power -up value: 2 dots Acceptable values: 1-10 dots r= Wide Bar to Narrow Bar Width Ratio Initial power-up ratio: 3.0 Acceptable ratios: From 2.0 to 3.0 in .1 increments. (No affect on Fixed Ratio bar codes.
176 ZPL II COMMAND REFERENCE ^BZ POSTNET Bar Code The ^BZ (POSTNET) bar code is used to automate the handling of mail. POSTNET uses a series of 5 bars, 2 tall and 3 short, to represent the digits 0 through 9. Print Ratios Supported: Fixed Ratio. ^FD (Field Data) Limitations: 100+ characters. Actual amount of data depends on ^BY ratio and width (length if rotated) of label. NOTE: If ^CV (Code Validation) is active, The length of the data field must be 5, 9 or 11 digits.
ZPL II COMMAND REFERENCE The format for the ^BZ instruction is: ^BZo,h,f,g where: ^BZ = POSTNET Bar Code o= Orientation Default value: Current ^FW setting Other values: N = Normal R = Rotated, 90 degrees clockwise I = Inverted, 180 degrees B = Read from Bottom Up, 270 degrees h= Bar Code Height Default value: Value set by ^BY Other values: 1 dot to 9999 dots f= Print Interpretation Line Default value: N = No Other value: Y = Yes g= Print Interpretation Line Above Code Default value: N = No Other
178 ZPL II COMMAND REFERENCE ^CC Change Caret ~C C The ^CC, ~CC (Change Caret) instruction is used to change the format instruction prefix. The default prefix is the caret (^). The format for the ^CC, ~CC instruction is: ^CCx, ~CCx where ^CC, ~CC = x= Change Caret Any ASCII Character Default value: Parameter is required. If none is used, the next character received is the new prefix character. NOTE 1: ^ and ~ are interchangeable only on the CC command.
ZPL II COMMAND REFERENCE ^CD Change Delimiter ~C D The ^CD, ~CD (Change Delimiter) instruction is used to change the ZPL II delimiter character. This character is used to separate parameter values associated with several ZPL instructions. The default delimiter character is a comma (,). The format for the ^CD, ~CD instruction is: ^CDa, ~CDa where ^CD, ~CD = a= Change Delimiter Any ASCII Character. Default value: Parameter is required.
180 ZPL II COMMAND REFERENCE ^CF Change Alphanumeric Default Font You can use the ^CF (Change Alphanumeric Default Font) instruction to keep your programs simple. For an example of using ^CF in a ZPL II script, see page 92.
ZPL II COMMAND REFERENCE The format for the ^CF instruction is: ^CFf,h,w where ^CF = Change Alphanumeric Default Font f= Specified Default Font: A = font A {I.V.P.} Other values: B thru H, and Ø-9. (Any font in the printer including downloaded fonts, EPROM stored fonts and fonts A-Z and 1-9 can be selected via ^CW.) h= Individual Character Height in Dots Acceptable values: 0-9999 {I.V.P. = 9} w= Individual Character Width in Dots Acceptable values: 0-9999 {I.V.P. = 5} I.V.P.
182 ZPL II COMMAND REFERENCE ^CI Change International Font Zebra printers can print all fonts using various international character sets: USA1, USA2, UK, Holland, Denmark/Norway, Sweden/Finland, Germany, France 1, France 2, Italy, Spain and miscellaneous. ZPL II follows the ISO standards for international characters. The ^CI (Change International Font) instruction enables you to call up the international character set you want to use for printing. You can mix character sets on a label.
ZPL II COMMAND REFERENCE The format for the ^CI instruction is: ^CIa where ^CI = a= Change International Font Desired Character Set 0 = USA1 {I.V.P.} Other acceptable values: 1 = USA2 2 = UK 3 = Holland 4 = Denmark/Norway 5 = Sweden/Finland 6 = German 7 = France 1 8 = France 2 9 = Italy 10 = Spain 11 = Miscellaneous 12 = Japan (ASCII with Yen sign) 13 = IBM Code Page 850 Effective for Version X.7.0, 16.5.
184 ZPL II COMMAND REFERENCE ^CO Cache On The ^CO (Cache On) instruction is used to change the size of the character cache. By definition, a “character cache” (from here on referred to as cache) is a portion of the DRAM reserved for storing scalable characters. All printers have a default 22K cache that is always turned on. The maximum single character size that can be stored, without changing the size of the cache, is 450 dots x 450 dots.
ZPL II COMMAND REFERENCE NOTE: The cache can be resized as often as needed. Any characters in the cache when it is resized are lost. Memory used for the cache reduces the space available for label bitmaps, graphic, downloaded fonts, etc. The format for the ^CO instruction is: ^COa,b,c where: ^CO = Cache On a= Cache On Default value: Y = Yes Other value: N = No b= Amount of Additional ‘K of Memory’ to be Added to Cache. (Default value: 40K (if no number specified) Effective for Version 16.5.
186 ZPL II COMMAND REFERENCE The following is an example using the ^CO instruction. To resize the print cache to 62K: ^COY 40K (default memory) + 22K (existing cache) = 62K To resize the print cache to 100K: ^COY,78 78K (memory added) + 22K (existing cache) = 100K Print Cache Performance For printing large characters, memory added to the cache by the ^CO instruction is not physically added to the 22K cache already in the printer.
ZPL II COMMAND REFERENCE ^CT Change Tilde ~C T The ^CT, ~CT (Change Tilde) instruction is used to change the control instruction prefix. The default prefix is the tilde (~). The format for the ^CT, ~CT instruction is: ^CTa, ~CTa where ^CT, ~CT = a= Change Tilde Any ASCII Character Default value:Parameter is required. If none is used, the next character received is the new prefix character.
188 ZPL II COMMAND REFERENCE ^CV Code Validation The ^CV (Code Validation) instruction acts as a switch to turn the code validation function ON and OFF.
ZPL II COMMAND REFERENCE The following is an example of how the ^CV instruction works. The top sample (both columns) is a correctly printed bar code. It is followed by an example of the error messages.
190 ZPL II COMMAND REFERENCE ^CW Font Identifier All built-in fonts have a one-character identifier i.e. A, B, C, etc. The ^CW (Font Identifier) instruction assigns a single alphanumeric character (A to Z and 0 to 9) to a font downloaded to DRAM R:, MEMORY CARD B:, EPROM E:, or BUILT-IN Z:. 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 will be printed on the label wherever the format calls for the built-in font.
ZPL II COMMAND REFERENCE The format for the ^CW instruction is: ^CWa,d,f where: ^CW = a = Font Identifier Use new font for ZPL II calls. The Letter of the Built-in Font to be Substituted or the New Font to be Added. (A required one character entry.) d = Source Device where Font is Stored (Optional. Default is R:) f = The Name of the Downloaded Font to be Substituted for the Built-in Font or as an Additional Font (Extension fixed at .FNT.) Default: Unknown.
192 ZPL II COMMAND REFERENCE ~DB Download Bitmap Font The ~DB (Download Bitmap Font) instruction sets the printer to receive a downloaded bitmap font, defines native cell size, baseline, space size and copyright. This instruction consists of two portions, a ZPL II instruction which defines the font and a structured data segment which defines each character of the font. The following is an example of how to use the ~DB instruction. It shows the first two characters of a font being downloaded to DRAM.
ZPL II COMMAND REFERENCE The format for the ~DB instruction is: ~DBd,o,x,a,h,w,base,space,#char, ©,DATA where: ~DB = Set Printer to Accept Download Bitmap Font d= Destination Device to Store Font {Fixed. Will always be DRAM(R:)} o= Name of Font, 1-8 Alphanumeric Characters Default: Unknown. x= Extension, 3 Alphanumeric Characters {Fixed. Will always be .FNT} a= Orientation of Native Font (N=Normal=default, R=90, I=180, B=270) Currently, only N is supported. h= Maximum Height of Cell in Dots.
194 ZPL II COMMAND REFERENCE DATA = Structured ASCII Data which 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 II COMMAND REFERENCE 195 C O M M A N D R E F E R E N C E
196 ZPL II COMMAND REFERENCE ^DD Download Direct Bitmap The ^DD (Download Direct Bitmap) command causes a downloaded image to print directly rather than being stored in memory. NOTE: Refer to the ~DG (Download Graphic) description for more information about calculating the parameters needed for this command.
ZPL II COMMAND REFERENCE The format for the ~DD instruction is: ^DDa,b,DATA where ^DD = Download (an image) Direct into Bitmap a= Total Number of Bytes in Graphic Default value: None - entire command is ignored when not specified. Other values: Enter a value corresponding to the number of bytes in the graphic. Range: 1 to 99999. Out of range is set tothe nearest limit. b= Total Number of Bytes per Row Default value: None - entire command is ignored when not specified.
198 ZPL II COMMAND REFERENCE ~DE Download Encoding The standard encoding for TrueType® Windows fonts is always Unicode. Therefore, the ZPL field data must be converted from some other encoding to Unicode. The required translation table is downloaded with the ~DE (Download Encoding) command. These tables are provided with ZTools for Windows. The only font conversion currently supported is JIS and Shift-JIS to Unicode.
ZPL II COMMAND REFERENCE The format for the ~DE instruction is: ~DEn,s,DATA Where ~DE = n= s= DATA = Download Encoding Table for Unbounded Unicode TrueType Font Table Name Default value: NO NAME = The command is ignored Other values: Enter a Destination Indicator followed by the Table Name (up to 8 characters maximum) Destination Indicators: R: = RAM Memory B: = Memory Card Table Size Default value: NO VALUE = The command is ignored Other values: Enter the number of bytes of memory required to hold th
200 ZPL II COMMAND REFERENCE ^DF Download Format The ^DF (Download Format) instruction saves the ZPL II format instructions as text strings to be later merged using ^XF with variable data. The format to be stored may contain Field Number (^FN) instructions to be referenced when recalled. While use of stored formats will reduce transmission time, no formatting time is saved since this instruction saves the ZPL II as text strings which need to be formatted at print time.
ZPL II COMMAND REFERENCE The format for the ^DF instruction is: ^DFd:o.x where ^DF = Download and Store Format d= Destination Device to Store Image. {Fixed. Will always be DRAM(R:)} o= Name of Image, 1-8 Alphanumeric Characters (Default, the name “UNKNOWN” is used.) x= Extension, 3 Alphanumeric Characters {Fixed. Will always be .ZPL} The following is an example of using the ^DF instruction to download and store ZPL II text strings to DRAM. The name used to store the text strings is STOREFMT.ZPL.
202 ZPL II COMMAND REFERENCE ~DG Download Graphic The ~DG (Download Graphic) instruction performs the following functions: 1. Puts the printer into Graphics Mode. 2. Names the graphic. (This name is used to recall it into a label.) 3. Defines the size of the graphic. 4. Downloads the HEX string to the printer. NOTE 1: As far as the printer is concerned, the name used for the graphic image will end at a space, period, or extension.
ZPL II COMMAND REFERENCE The format for the ~DG instruction is: ~DGd:o.x,t,w,DATA where ~DG = Set Printer to Download Graphic Mode d= Destination Device to Store Image Default value:R:(DRAM) Other value: B:(Optional Memory) o= Name of Image, 1-8 Alphanumeric Characters (Default, the name “UNKNOWN” is used.) x= Extension, 3 Alphanumeric Characters {Fixed. Will always be .
204 ZPL II COMMAND REFERENCE The “t” parameter (the total number of bytes in a graphic) can be determined by using the following formula: x x (dots/mm) x ( y x (dots/mm)) = total bytes 8 (bits/byte) where x is the width of the graphic in millimeters, y is the height of the graphic in millimeters and dots/mm is the print density of the printer being programmed.
ZPL II COMMAND REFERENCE ~DN Abort Download Graphic 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 (Abort Download Graphic) instruction.
206 ZPL II COMMAND REFERENCE ~DS Download Scalable Font The ~DS (Download Scalable Font) instruction is used to set the printer to receive a downloadable scalable font and defines the size of the font in bytes. The ~DS instruction, and its associated parameters, are the result of converting a vendor supplied font for use on a Zebra printer. The conversion is done using the Zebra Tools Utility Program called ZFONT. The utility program is available from Zebra Technologies.
ZPL II COMMAND REFERENCE The format for the ~DS instruction is: ~DSd:o.x,s,DATA where: ~DS = Set printer to accept download soft scalable font d= Destination Device to Sore Font Default value:R:(DRAM) Other value: B:(Optional Memory) o= Name of Font, 1-8 Alphanumeric Characters Default: Unknown. x= Extension, 3 Alphanumeric Characters {Fixed. Will always be .FNT} s= Size of Font in Bytes This number was generated by the ZFONT program. It should not be changed.
208 ZPL II COMMAND REFERENCE ~DT Download TrueType® Font The ZTools™ for Windows program must be used to convert the TrueType® font to a Zebra-downloadable format. This program creates a downloadable file that includes a ~DT (Download TrueType®) command. Once downloaded, the font will function just like the earlier Intellifont software.
ZPL II COMMAND REFERENCE The format for the ~DT instruction is: ~DTf,s,DATA where ~DT = Download TrueType® Font f= Font Name Default value: NO NAME = The command is ignored Other values: Enter a Destination Indicator followed by the TrueType Name (up to 8 characters maximum) Destination Indicators: R: = RAM Memory B: = Memory Card s= Font Size Default value: NO VALUE = The command is ignored Other values: Enter the number of bytes of memory required to hold the Zebra Downloadable Format of the Font
210 ZPL II COMMAND REFERENCE ~DU Download Unbounded (TrueType® Font) Some international fonts have more than 256 printable characters. These fonts are supported as “Large TrueType® Fonts” and are downloaded to the printer with the ~DU (Download Unbounded) command. The Field Block (^FB) command cannot support the large TrueType® fonts.
ZPL II COMMAND REFERENCE The format for the ~DU instruction is: ~DUf,s,DATA where ~DU = f= s= DATA = Download Unbounded Unicode TrueType Font Font Name Default value: NO NAME = The command is ignored Other values: Enter a Destination Indicator followed by the TrueType Name (up to 8 characters maximum) Destination Indicators: R: = RAM Memory B: = Memory Card Font Size Default value: NO VALUE = The command is ignored Other values: Enter the number of bytes of memory required to hold the Zebra Downloadab
212 ZPL II COMMAND REFERENCE ^EF Initialize/Erase Stored Formats ~EF The ^EF or ~EF (Erase Format) instruction erases all stored formats. If you use the erase format instruction, you erase all stored formats. (Stored formats can be selectively erased using the ^ID instruction.
ZPL II COMMAND REFERENCE ^F A Field Allocate Use the ^FA (Field Allocate) instruction to allocate space for the field to be saved. The format for the ^FA instruction is: ^FAn where ^FA = n= Field Allocate Number of Character Spaces to be Saved Default value: None Instruction is ignored if no value is specified. Minimum = 1, Maximum = 256 Effective for Versions 14.4.0, 15.4.0, 20.4.0, 23.6.0, 25.6.
214 ZPL II COMMAND REFERENCE ^F B Field Block The ^FB (Field Block) instruction allows you to print text into a defined “block type ” format. This instruction formats an ^FD text string into a block of text using the origin, font and rotation specified for the text string. This instruction also contains an automatic word wrap function. The following is an example of how the ^FB instruction affects the field data.
ZPL II COMMAND REFERENCE The format for the ^FB instruction is: ^FBa,b,c,d,e where ^FB = Define Field Block a= Width of Text Block Line in Dots Valid data: Minimum = one character width. Maximum = label width. Default value: = 0 Acceptable values: 0 - 9999 NOTE: If value is less than font width or not specified, text block will not print. b= Maximum Number of Lines in Text Block Default value: 1 line Acceptable values: 1 - 9999.
216 ZPL II COMMAND REFERENCE Notes Concerning the ^FB Instruction • The following scheme can be used to facilitate special functions. “ \& ” “ \(*)” “ \\ ” = carriage return/line feed = soft hyphen (word break with a dash) = \ (See Item 1 below) Item 1: ^CI13 must be selected in order to print a \. Item 2: If a soft hyphen is placed near the end of a line, the hyphen will be printed. If it is not placed near the end of the line, it will be ignored. (*) = Any alphanumeric character.
ZPL II COMMAND REFERENCE ^F D Field Data The ^FD (Field Data) instruction defines the data string for the field. The field data can be any printable character except those used as instruction prefixes (i.e. ^ and ~). The format for the ^FD instruction is: ^FDa where ^FD = a= Enter Field Data Data to be Printed NOTE 1: The field data string is limited to 3072 characters.
218 ZPL II COMMAND REFERENCE ^F H Field HEX The ^FH (Field HEX) instruction allows you to enter the hexadecimal value for any character directly into the ^FD statement. The ^FH instruction must precede each ^FD instruction in which it will be used. Within the ^FD statement, the HEX indicator must precede each Hexadecimal value. The default HEX indicator is the underscore “_”. The ‘a’ parameter can be added when a different HEX indicator is needed.
ZPL II COMMAND REFERENCE ^F N Field Number Instruction The ^FN (Field Number) instruction is used to number the data fields. This instruction is used in both Store Format and Recall Format operations. In a stored format, the ^FN instruction is used where you would normally use the ^FD (Field Data) instruction. In recalling the stored format, use ^FN in conjunction with the ^FD (Field Data) instruction.
220 ZPL II COMMAND REFERENCE ^F O Field Origin The ^FO (Field Origin) instruction sets a field origin, relative to the label home position designated by the ^LH command. ^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 II COMMAND REFERENCE ^F P Field Parameter The ^FP (Field Parameter) command has been added to ZPL II to support the Kanji character set. This command rotates the font field without rotating the characters within the field. The format for the ^FP instruction is: ^FPd,g where ^FP = d= Field Parameter Direction: H = Horizontal Printing V = Vertical Printing Effective for Versions 14.8.0, 18.8.0, 21.8.0, 23.8.1, 23.8.2, 25.8.1, 25.8.2, 22.8.
222 ZPL II COMMAND REFERENCE ^F R Field Reverse Print The ^FR (Field Reverse Print) instruction allows a field to appear as white over black or black over white. When printing a field, if the dot to print is black, it is made white; if the dot is white, it is made black. The format for the ^FR instruction is: ^FR where ^FR = Field Reverse Print The following is an example of how to use the ^FR instruction.
ZPL II COMMAND REFERENCE ^F S Field Separator The ^FS (Field Separator) instruction denotes the end of the field definition. The field separator instruction can be issued as a single ASCII control code SI (Control-O, HEX 0F).
224 ZPL II COMMAND REFERENCE ^F T Field Typeset The ^FT (Field Typeset) instruction also 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.
ZPL II COMMAND REFERENCE The format for the ^FT instruction is: ^FTx,y where ^FT = Set Field Typeset x= Number of Dots along X-axis Default value: = Position after last formatted text field. Acceptable values: 0 - 9999 y= Number of Dots along Y-axis Default value: = Position after last formatted text field. Acceptable values: 0 - 9999 TEXT - Origin is the start of the character string, at the baseline of the font.
226 ZPL II COMMAND REFERENCE ^F V Field Variable Data The ^FV (Field Variable Data) instruction replaces the ^FD (Field Data) instruction in a label format when the field is variable. The following is an example of how to use the ^MC and ^FV instruction. NOTE: ^FV fields are always cleared after the label is printed. ^FD fields are not cleared.
ZPL II COMMAND REFERENCE The format for the ^FV instruction is: ^FVa where ^FV = a= Field Variable Data Variable Field Data to be Printed (0 to 255 character string) Instruction ignored if no data entered. Effective for Versions 14.4.0, 15.4.0, 20.4.0, 23.6.0, 25.6.
228 ZPL II COMMAND REFERENCE ^F W Field Orientation The ^FW (Field Orientation) instruction sets the default orientation for all instruction fields that have an orientation (rotation) parameter. Fields can be rotated 0, 90, 180, 270 degrees clockwise by using this instruction. The ^FW instruction only affects fields that follow it. Once you have issued a ^FW instruction, the setting is retained until you turn off the printer or send a new ^FW instruction to the printer.
ZPL II COMMAND REFERENCE ^F X Comment The ^FX (Comment) instruction is useful when you want to add a “non-printing” informational comment or statement within a label format. Any data after the ^FX instruction up to the next caret or tilde instruction will not have any effect on the label format. The format for the ^FX instruction is: ^FXc where ^FX = c= Comment A “Non-printing” Instructional Comment or Statement. The following is an example of how to use the ^FX instruction.
230 ZPL II COMMAND REFERENCE ^GB Graphic Box The ^GB (Graphic Box) instruction is used to draw boxes and/or lines as part of a label format. Boxes and lines can be use to highlight important information, divide labels into distinct areas, or just dress up the way the label looks. The same format instruction is used for drawing either boxes or lines. Example for Drawing a Box The following are the instructions to draw a box 1 inch high, 1.5 inches wide and a line thickness of 10 dots.
ZPL II COMMAND REFERENCE The format for the ^GB instruction is: ^GBw,h,t,c where ^GB = Graphic Box w= Width of Box (in dots Default value: Value used for thickness or 1 dot Minimum value: 1 dot Maximum value: 9999 dots h= Height of Box (in dots Default value: Value used for thickness or 1 dot Minimum value: 1 dot Maximum value: 9999 dots t= Thickness of Line (in dots) Default value: 1 dot Minimum value: 1 dot Maximum value: 9999 dots c= Line Color Default value: B = Black Other value: W = White
232 ZPL II COMMAND REFERENCE ^GF Graphic Field The ^GF (Graphic Field) command allows you to download graphic field data directly into the bitmap. This command follows the conventions for any other field meaning a field orientation is included with this command. The graphic field data can be placed at any location within the bitmap space. Example (ZPL and label output): ^FO100,100^GFA,8000,8000,80,ASCII data...
ZPL II COMMAND REFERENCE The format for the ^GF instruction is: ^GFa,b,c,d,DATA where ^GF = c = Graphic Field a = Compression Type Default: ASCII Value: A = ASCII Hex This follows the conventional download format used for all other download commands. B = Binary The data sent to the printer after the ‘c’ parameter is strictly binary. C = Compressed Binary The data sent after parameter ‘c’ is in a compressed binary format.
234 ZPL II COMMAND REFERENCE Value: Total number of bytes comprising graphic format (i.e., width x height), which are sent as parameter d. Count divided by bytes per row gives the number of lines in the image. This number represents the size of the image, not necessarily the size of the data stream (see d.). Range: 1 to 99999. Out of range is set to nearest limit. On the Z130/90/220/105, this number is fixed to 5 digits.
ZPL II COMMAND REFERENCE ^GS Graphic Symbol The ^GS (Graphic Symbol) instruction enables you to generate the registered trademark, copyright symbol and other symbols. The format for the ^GS instruction is: ^GSo,h,w where ^GS = Graphic Symbol o = Font Orientation Default value: N = normal or last ^FW value. Other values: R = Rotate 90 degrees clockwise I = Inverted 180 degrees B = Bottom up, 270 degrees h = Character Height in Dots Proportional to Width Default value: Last ^CF value.
236 ZPL II COMMAND REFERENCE ~HB Battery Status When the Battery Status command, ~HB, is sent to the Zebra printer, a data string is sent back to the Host. The string starts with an Control Code and is terminated by an Control Code sequence. Data String bb.bb,hh.hh,bt bb.bb = current battery voltage reading to nearest ¼ volt hh.
ZPL II COMMAND REFERENCE ^HG Host Graphic The ^HG (Host Graphic) instruction is used to send (upload) the graphic to the host. This graphic image can be stored by the host for future use. It can be downloaded back to the original printer or to any other Zebra printer.
238 ZPL II COMMAND REFERENCE ~H I Host Identification The ~HI (Host Identification) instruction is designed to be sent from the Host to the Zebra printer to find out the type of Zebra printer. Upon receipt, the Zebra printer will respond to the Host with the following information: XXXXXX,V1.0.0,12,512KB,X XXXXXX = Model of Zebra Printer V1.0.0 = 12 512KB Version of Software = Dots/mm (6, 8 or 12 dots/mm printheads) = Memory 512KB or 1024KB (1 MB) Effective for Version 16.3.
ZPL II COMMAND REFERENCE ~H M Host Memory Status Sending the ~HM (Host Memory Status) instruction to the printer immediately returns a memory status message to the host. Use this instruction whenever you need to know the status of the memory. When the Host Memory Status Command, ~HM, is sent to the Zebra printer, a line of data containing three numbers is sent back to the Host. The information contained in that line is described here.
240 ZPL II COMMAND REFERENCE ~H S Host Status Return When the Printer Status Command, ~HS, is sent to the Zebra printer, three data strings are sent back to the Host. Each string starts with an Control Code and is terminated by an Control Code sequence. In this way, to avoid confusion, each String will be displayed/printed on a separate line by the Host.
ZPL II COMMAND REFERENCE aaa = a8 a7 a6 a5 a4 a3 a2 a1 a0 a8 = High Speed Baud Rate 0 = 110 thru 19200 baud 1 = 28800 baud and above a7 = Handshake 0 = Xon/Xoff 1 = DTR a6 = Parity Odd/Even 0 = Odd 1 = Even a5 = Disable/Enable 0 = Disable 1 = Enable a4= Stop Bits 0 = 2 Bits 1 = 1 Bit a3= Data Bits 0 = 7 Bits 1 = 8 Bits a8 0 0 0 0 0 0 0 0 1 1 1 a2 a1 a0 = Baud 000 = 110 001 = 300 010 = 600 011 = 1200 100 = 2400 101 = 4800 110 = 9600 111 = 19200 000 = 28800 001 = 38400 (available only on certain printer mod
242 ZPL II COMMAND REFERENCE String 2 mmm,n,o,p,q,r,s,t,uuuuuuuu,v,www mmm n o p q = = = = = r = s = t = uuuuuuuu = v = www = Function Settings(*) 0 (Unused) “Head Up” Flag (1 = Head in UP Position) “Ribbon Out” Flag (1= Ribbon Out) “Thermal Transfer Mode” Flag (1 = Thermal Transfer Mode Selected) Print Mode 0 = Rewind 1=Peel Off 2=Tear Off 3=Reserved Print Width Mode 6= 4.
ZPL II COMMAND REFERENCE m5= Communications Diagnostics 0 = Off 1 = On m4 m3 m2 m1 = Unused 0 = Always m0 = Print Mode 0 = Direct Thermal 1 = Thermal Transfer String 3 xxxx,y xxxx y = = 0000 (Reserved for future use) 0 (Reserved for future use) 243 C O M M A N D R E F E R E N C E
244 ZPL II COMMAND REFERENCE ^H V Host Verification The ^HV (Host Verification) instruction is used to return data from specified fields, along with an optional ASCII header, to the host.
ZPL II COMMAND REFERENCE The format for the ^HV instruction is: ^HV#,c,ASCII where ^HV = Host Verification #= Specified Field Number Default value: 0 Acceptable values: 0 - 9999. c= Number of Characters to be Returned Default value: 8 characters Acceptable values: 0 - 256. Effective for Version 14.4.0 Acceptable values: 0 - 3072 characters ASCII = Header (in uppercase ASCII characters Default Value: None Acceptable values: 0 - 256 characters Effective for Versions 14.4.0, 15.4.0, 20.4.0, 23.6.
246 ZPL II COMMAND REFERENCE ^HW Host Directory List The ^HW (Host Directory List) is used to transmit a Directory Listing of objects in a specific memory area (storage device) back to the Host computer (the device providing input to the printer). This instruction will return a formatted ASCII string of object names to the HOST via the primary serial port. Each parameter on a line is of fixed length, and the total length of a line is also fixed.
ZPL II COMMAND REFERENCE The format for the ^HW instruction is: ^HWd:o.x where ^HW = Return Directory Listing to Host d= Source Device of Object Listings {Optional. Default is DRAM} o= Name of Object {Optional. Default is “*”. A “?” can also be used.} x= Extension {Optional. Default is “*”. A “?” can also be used.} Effective for Version 22.8.5 Specific changes include the following new descriptive parameter names.
248 ZPL II COMMAND REFERENCE ^ID Image Delete The ^ID (Image Delete) instruction deletes objects, images, fonts, formats etc. from storage areas selectively or in groups. This instruction can be used within a printing format to delete objects just prior to saving new ones or can be in a stand-alone type format simply to delete objects. The image name and extension support the use of the asterisk (*) as a wildcard. This allows for easy deletion of selected groups of objects.
ZPL II COMMAND REFERENCE The format for the ^ID instruction is: ^IDd:o.x where ^ID = d= o= x= Delete Image (object) Source Device Where Object is Stored {R:, B:} Name of Stored Image, 1-8 Alphanumeric Characters. (Default, the name “UNKNOWN” is used.) Extension, 3 Alphanumeric Characters {Default is .GRF} To delete just stored formats from DRAM: ^XA^IDR:*.ZPL^XZ To delete formats and images named SAMPLE from DRAM regardless of the extension: ^XA^IDR:SAMPLE.*^XZ To delete the image SAMPLE1.
250 ZPL II COMMAND REFERENCE ^IL Image Load The ^IL (Image Load) instruction 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. Using this technique to overlay the image of constant information with the variable data greatly increases the throughput of the label format.
ZPL II COMMAND REFERENCE The format for the ^IL instruction is: ^ILd:o.x where ^IL = Load Graphic Image to Bitmap d= Source Device where Image is Stored {Optional. Default is Search Priority.} o= Name of Stored Image 1-8 alphanumeric Characters (Default, the name “UNKNOWN” is used.) x= Extension, 3 alphanumeric characters {Fixed. Will always be .GRF} The following example would recall the stored image SAMPLE2.GRF from DRAM and overlay it with the additional data. ^XA ^ILR:SAMPLE2.
252 ZPL II COMMAND REFERENCE ^IM Image Move The ^IM (Image Move) instruction performs a direct move of an image from storage area into the bitmap. The instruction is identical to the Recall Graphic instruction except that there are no sizing parameters.
ZPL II COMMAND REFERENCE The format for the ^IM instruction is: ^IMd:o.x where ^IM = Move Image to Bitmap. d= Source Device Where Image is Stored {Optional. Default is Search Priority.} o= Name of Stored Image 1-8 Alphanumeric Characters (Default, the name “UNKNOWN” is used.) x= Extension, 3 Alphanumeric Characters {Fixed. Will always be .GRF} NOTE 1: By using the ^FO instruction, the graphic image can be positioned anywhere on the label.
254 ZPL II COMMAND REFERENCE ^IS Image Save The ^IS (Image Save) instruction is used within a ZPL II label format to save that format as a graphic image. This instruction is used within a label format, typically at the end. It instructs the printer to save that label format as a graphic image rather than a ZPL II script file. The image can later be recalled with virtually no formatting time and overlaid with variable data to form a complete label.
ZPL II COMMAND REFERENCE The format for the ^IS instruction is: ^ISd:o.x,p where ^IS = Save Format as a Graphic Image. d= Destination Device to Store Image Default value:R:(DRAM) Other value: B:(Optional Memory) o= Name of Image, 1-8 Alphanumeric Characters (Default, the name “UNKNOWN” is used.) x= Extension, 3 Alphanumeric Characters {Fixed. Will always be .
256 ZPL II COMMAND REFERENCE ~JA Cancel All The ~JA (Cancel All) instruction cancels all format instructions in the buffer. It also cancels any batches that may be printing. The printer will stop printing after the current label (if one is printing) is finished printing. All internal buffers will be cleared of data. The “DATA” LED will turn off. Effective for Version 18.6.
ZPL II COMMAND REFERENCE ^JB Initialize Flash Memory The ^JB (Initialize Flash Memory) instruction is used to initialize the two types of Flash Memory available in the Zebra printers. ^JBa where ^JB = a= Reset Battery Dead Parameter: B = Flash Card (PCMCIA) E = Flash Memory NOTE: This command is only available in certain Zebra printers and based on the firmware installed in the printer. Please consult the Command Quick Reference Chart (Appendix A) for a complete listing of firmware that supports ^JB.
258 ZPL II COMMAND REFERENCE ^JC Set Media Sensor Calibration The ~JC (Set Media Sensor Calibration) is used to force a label length measurement and recalibrate the media and ribbon sensors. NOTE: In continuous mode, only the media and ribbon sensors will be recalibrated.
ZPL II COMMAND REFERENCE ~JE Disable Diagnostics The ~JE (Disable Diagnostics) instruction cancels the diagnostic mode and returns the printer to normal label printing. ~JG Graphing Sensor Calibration The ~JG (Graphing Sensor Calibration) 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.
260 ZPL II COMMAND REFERENCE ^JJ Set Auxiliary Port The ^JJ (Set Auxiliary Port) command allows you to control an online verifier or applicator device via ZPL. The format for the ^JJ instruction is: ^JJo,a where ^JJ = Set Auxiliary Port o= Operational Modes for the Aux Port. Factory Default: 0 Off - The auxiliary port output signal is not provided for the verifier. Initial Value at Power-up: The last value saved. Other Values: 1.
ZPL II COMMAND REFERENCE Effective for Version 18.6.0 a= Applicator Mode Factory Default: 0 Off - The auxiliary port output signal is not provided for the applicator. Initial Value at Power-up: The last value saved. Other Values: 0. Off - The ~END_PRINT output signal is not active in mode zero and the output remains deasserted HIGH, regardless of printer activity. The ~START_PRINT input signal is also ignored in mode 0. 1.
262 ZPL II COMMAND REFERENCE ~JL Set Label Length) The ~JL (Set Label Length) is used to set the label length. Depending on size of label, the printer will feed one or more blank labels.
ZPL II COMMAND REFERENCE ^JM Set Dots/Millimeter Use the ^JM (Set Dots/Millimeter) instruction to change the number of dots per millimeter. Depending on the print head, normal dots per millimeter on a Zebra Printer is 12-dots/mm (304-dots/inch), 8-dots/mm (203-dots/inch) or 6-dots/mm (153-dots/inch). In some applications, this high density is not required. For these applications, a lower density of 4-dots/mm (102-dots/inch) or 3-dots/mm (77dots/inch) can be selected.
264 ZPL II COMMAND REFERENCE ~JN Head Test Fatal The ~JN (Head Test Fatal) instruction resets the printhead element error override, acting as a toggle for ~JO. Printer then goes into fault status (i.e., turns head indicator on steadily) if any subsequent execution of the printing element test detects bad printing elements. ~JO Head Test Non-Fatal The ~JO (Head Test Non-Fatal) instruction overrides a failure of head element status check and allows printing to continue.
ZPL II COMMAND REFERENCE ~JP Pause and Cancel Format The ~JP(Pause and Cancel Format) instruction, clears the format currently being processed and places the printer in the Pause mode. The instruction clears the next format that would print, or the oldest format from the buffer. Each subsequent issuance of ~JP clears the next buffered format until the buffer is empty. The “DATA” indicator turns off when the buffer is empty and nothing is being transmitted.
266 ZPL II COMMAND REFERENCE ~JS Change Backfeed Sequence The ~JS (Change Backfeed Sequence) instruction is used to control the backfeed sequence. This instruction can be used on printers both with and without built-in cutters. The primary applications are: 1) to allow programming of the “rest point” of the cut edge of continuous media, and 2) provide immediate backfeed after peel-off when the printer is used in a print/apply application configuration.
ZPL II COMMAND REFERENCE The format for the ~JS instruction is: ~JSb where ~JS = Change Backfeed Sequence b= Order in which Backfeed Occurs with Respect to Printing Default value: N = Normal (90% backfeed after label is printed) Other values: A = 100 % Backfeed After Printing (and cutting) B = 0% Backfeed After Printing (and cutting) and 100% Before Printing the Next Label Effective for Version 18.6.
268 ZPL II COMMAND REFERENCE ^JT Head Test Interval The ^JT (Head Test Interval) instruction lets you change the printhead test interval from 100 to any desired interval. The printer automatically performs an internal printhead element test which occurs every 100 labels. This takes place during formatting which minimizes a delay in printing. Therefore, the test may be performed while the printer is in PAUSE.
ZPL II COMMAND REFERENCE The format for the ^JT instruction is: ^JT#,a,b,c where ^JT = #= Head Test Interval The Four-Digit Number Representing the Amount of Labels to be Printed Between Head Tests Default value: 0100 Effective for Version 16.4.0 Default value: 0 (Now off) Acceptable values: 0000-9999 Parameters a,b,c Effective for Version 16.4.0 a= Automatically Select Range of Elements to Test Y = Yes {I.V.
270 ZPL II COMMAND REFERENCE ^JU Configuration Update The ^JU (Configuration Update) instruction sets the active configuration for the printer. There are three choices for this instruction. They are defined as follows: S = Save Current Settings The current configuration will be saved. This is the configuration that will be used at Power-On. F = Reload Factory Values (Default) The factory values (default values) will be loaded.
ZPL II COMMAND REFERENCE The format for the ^JU instruction is: ^JUa where ^JU = a = Configuration Update Active Configuration F = Reload Factory Defaults R = Recall Last Saved Values S = Save Current Settings (Instruction ignored if parameter missing or incorrect.
272 ZPL II COMMAND REFERENCE ^JW Set Ribbon Tension The ^JW (Set Ribbon Tension) instruction is used only for the 170 PAX-Series printers. The format for the ^JW instruction is: ^JWt where ^JW = t = ~JX Set Ribbon Tension Tension L = Low M = Medium H = High Cancel Current Partially Input Format The ~JX (Cancel Current Partially Input Format) instruction cancels a format that is currently being sent to the printer.
ZPL II COMMAND REFERENCE ^JZ Reprint After Error The ^JZ (Reprint After Error) instruction is used to reprint a partially printed label caused by a Ribbon Out, Media Out or Head Open error condition. The label will be reprinted as soon as the error condition is corrected. This instruction will remain active until another ^JZ instruction is sent to the printer or the printer is turned off. The format for the ^JZ instruction is: ^JZa where ^JZ = a = Reprint After Error Reprint After Error Y = Yes {I.V.P.
274 ZPL II COMMAND REFERENCE ^KL Define Language The ^KL (Define Language) instruction is used to select the language used for the front panel display. The format for the ^KL instruction is: ^KLa where ^KL = a= Define Language Default value: 1 = English Other Value: 2 = Spanish 3 = French 4 = German 5 = Italian 10 = Spanish Effective for Version 18.6.
ZPL II COMMAND REFERENCE ^KP Define Password The ^KP (Define Password) instruction is used to define the password that must be entered to access the front panel switches and LCD set up mode. NOTE: If the password is forgotten, the printer can be returned to a default setup mode in which the default password of 1234 will be entered. Caution should be used, however, because this will also set the printer configuration values back to default.
276 ZPL II COMMAND REFERENCE ^LH Label Home The ^LH (Label Home) instruction sets the label home position. The default home position of a label is the upper-left corner (position 0,0 along the x-axis 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 Label Home instruction changes this reference point.
ZPL II COMMAND REFERENCE The format for the ^LH instruction is: ^LHx,y where ^LH = Set Label Home x= Number of Dots along X-axis {I.V.P. = 0} Acceptable values: 0 - 9999 y= Number of Dots along Y-axis {I.V.P. = 0} Acceptable values: 0 - 9999 {I.V.P. = Last permanent value saved} Depending on the printhead used in your printer, use one of the following when figuring the values for x and y: 6 dots = 1 mm (millimeter), 152 dots = 1 inch. 8 dots = 1 mm (millimeter), 203 dots = 1 inch. 11.
278 ZPL II COMMAND REFERENCE ^LL Label Length The ^LL (Label Length) instruction defines the length of the label. This instruction is necessary when using continuous media (i.e. media not divided into separate labels by gaps, spaces, notches, slots or holes). To affect the current label, and/or be compatible with existing printers, this instruction must come before the first ^FS instruction.
ZPL II COMMAND REFERENCE The format for the ^LL instruction is: ^LLy where ^LL = y= Set Label Length Number of Dots Along Y-Axis Default value: 1225 for Stripe 1244 for Xi printers NOTE: Value must be entered or instruction is ignored. (8 in. using 6 dot/mm printhead) (6 in. using 8 dot/mm printhead) (3 in. using 12 dot/mm printhead) Acceptable values: from 1 up to some 4-digit number that does not exceed the maximum label size. The following formula can be used for figuring the value of ‘y.
280 ZPL II COMMAND REFERENCE ^LR Label Reverse Print The ^LR (Label Reverse Print) instruction reverses the printing of all fields in the label format. It allows a field to appear as white over black or black over white. When printing a field, if the dot to print is black, it is made white; if the dot is white, it is made black. Using the ^LR is identical to placing a ^FR in all current and subsequent fields. The following is an example of how to use the ^LR instruction.
ZPL II COMMAND REFERENCE The format for the ^LR instruction is: ^LRa where ^LR = a= Label Reverse Print Reverse Print All Fields Y = Yes N = No {I.V.P. = N} [Instruction is ignored if no parameter given.] {I.V.P. = Last permanent value saved} NOTE 1: The ^LR will remain active unless turned off by ^LRN instruction or the printer is powered down. NOTE 2: The effects of an ^LR instruction will not be seen unless fields overlap as shown in the above example.
282 ZPL II COMMAND REFERENCE ^LS Label Shift The ^LS (Label Shift) instruction 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 that the same instructions used on a Z-130 or Z-220 Printer can be used on other Zebra printers. To determine the value for the ^LS instruction use the following formula. Z-130/Z-220 values for ^LHx + ^FOx - (distance from edge of label) = printer value for ^LSa.
ZPL II COMMAND REFERENCE The format for the ^LS instruction is: ^LSa where ^LS = a= Set Label Shift Shift Left Value in Dots {I.V.P. = 0} Acceptable values: 0 to 9999 dots. Effective for Versions 14.4.0, 15.4.0, 20.4.0, 23.6.0, 25.6.0 Acceptable values: -9999 to +9999 dots. NOTE: When entering positive values, it is not necessary to use the plus (+) sign. The value is assumed to be positive unless preceded by a negative (-) sign {I.V.P.
284 ZPL II COMMAND REFERENCE ^LT Label Top The ^LT (Label Top) instruction moves the entire label format a maximum of 64 dot rows up or down from its current position with respect to the top edge of the label. A negative value moves the format towards the top of the label; a positive number moves the format away from the top of the label. This instruction can be used to fine-tune the position of the finished label without having to change any of the existing parameters.
ZPL II COMMAND REFERENCE ^MC Map Clear In normal operation, the bit map is cleared after the format has been printed. The ^MC (Map Clear) instruction is used to retain the current bit map. This applies to current and subsequent labels until cleared with a second ^MCY instruction. The format for the ^MC instruction is: ^MCa where ^MC = a= Map Clear Y = Yes (Clear bit map.) {I.V.P. = N} N = No (Do not clear the bit map.) NOTE: The ^MC instruction retains the image of the current label after formatting.
286 ZPL II COMMAND REFERENCE ^MD Media Darkness This ^MD (Media Darkness) instruction adjusts the darkness relative to the current darkness setting. The minimum value is -30 and the maximum value is 30. Examples for Using the ^MD Instruction If the current value (value on configuration label) is 16, entering the instruction ^MD-9 would decrease the value to 7. If the current value (value on configuration label) is 1, entering the instruction ^MD15 would increase the value to 16.
ZPL II COMMAND REFERENCE The format for the ^MD instruction is: ^MDa where ^MD = a= Media Darkness -30 to 30 depending on the current value. (Positive values do not require a “+ ” sign to be entered.) (Instruction ignored if parameter missing or incorrect.) {I.V.P.
288 ZPL II COMMAND REFERENCE ^MF Media Feed The ^MF (Media Feed) instruction dictates what happens to the media at “power up.” The format for the ^MF instruction is: ^MFp,h where ^MF = Media Feed p= Feed Action at Power Up Default value: F = Feed to first web after sensor. Other values: C = (See ~JC definition) L = (See ~JL definition) N = No Media Feed h= Feed Action After Closing Print Head Default value: F = Feed to first web after sensor.
ZPL II COMMAND REFERENCE ^ML Maximum Label Length The ^ML (Maximum Label Length) instruction lets you adjust the maximum label length via ZPL. The format for the ^ML instruction is: ^MLa where ^ML = a= Maximum Label Length Maximum Label Length in Dot Rows NOTE: In order for calibration to work properly, you must set the maximum label length equal to or greater than your actual label length.
290 ZPL II COMMAND REFERENCE ^MM Print Mode The ^MM (Print Mode) instruction determines the action the printer takes after a label or group of labels has been printed. There are four different modes of operation. 1. Tear-Off - After printing, the label is advanced so that the web is over the tear bar. Label, with backing attached, can then be torn off manually. 2. Rewind - The label and backing are rewound on an (optional) external rewind device.
ZPL II COMMAND REFERENCE The format for the ^MM instruction is: ^MMa,b Where ^MM = a= Print Mode Desired Mode Default value: T = Tear Off Other Values: P = Peel Off (not available on S-300 printers) R = Rewind (Instruction ignored if parameter missing or incorrect.) A = Applicator Effective for Version 14.4.3 C = Cutter (S-500 printers only) (Instruction ignored if parameter missing or incorrect.) Effective for Version 22.8.
292 ZPL II COMMAND REFERENCE ^MN Media Tracking This ^MN (Media Tracking) instruction tells the printer what type of media is being used (continuous or non-continuous) for purposes of tracking. There are two choices for this instruction: 1. Continuous Media - This media has no physical characteristic (i.e. a web, notch, perforation, etc.) to separate labels. Label Length is determined by the ^LL instruction (described on Page 278). 2.
ZPL II COMMAND REFERENCE The format for the ^MN instruction is: ^MNa where ^MN = a= Media Tracking Media Being Used N = Continuous Media Y = Non-Continuous Media Web Sensing Effective for Version 14.5.3, 18.6.0 W = Non-Continuous Media Web Sensing M = Non-Continuous Media Mark Sensing (Instruction ignored if parameter missing or incorrect.
294 ZPL II COMMAND REFERENCE ^MP Mode Protection The ^MP (Mode Protection) instruction is used to disable the various Mode functions on the front panel. Once disabled, the settings for the particular mode function can no longer be changed and the LED associated with the function will not light. Since this instruction has only one parameter, each mode will have to be disabled with an individual ^MP instruction.
ZPL II COMMAND REFERENCE ^MT Media Type This ^MT (Media Type) instruction selects the type of media being used in the printer. There are two choices for this instruction: 1)Thermal Transfer Media - This media uses a high carbon black or colored ribbon. The ink on the ribbon is bonded to the media. 2) Direct Thermal Media - The media is heat sensitive and requires no ribbon.
296 ZPL II COMMAND REFERENCE ^MU Mode Units This command sets the printer units of measurements. The ^MU (Mode Units) command works on a field by field basis. Once the mode units is set, it carries over from field to field until a new mode units is entered. The format for the ^MU instruction is: ^MUa where ^MU = a= Mode Units Units: Default: D = Dots I = Inches M = Millimeters Example (ZPL and label output): Assume 8 dot per millimeter - 203 dot per inch printer.
ZPL II COMMAND REFERENCE ~NC Network Connect The ~NC (Network Connect) instruction is used to connect a particular printer into the network by calling up the printer’s Network ID Number. The format for the ~NC instruction is: ~NC# where ~NC = #= Network Connect The Network I.D. Number Assigned to the Printer Default value: 000 (same as None) Acceptable values: 001–250 Use this instruction at the beginning of any label format to specify which printer on the network is to be used.
298 ZPL II COMMAND REFERENCE ^N I Network ID Number The ^NI (Network ID Number) instruction is used to assign a Network ID number to the printer. This must be done before the printer can be used in a network. The format for the ^NI instruction is: ^NI# where ^NI = #= Network ID Number The I.D. Number to be Assigned to the Printer Factory Default value: 000 (same as None) Acceptable values: 001–250 NOTE: Values must be three digit numbers or they will be ignored. If this happens, last ^NI value is used.
ZPL II COMMAND REFERENCE ~NR Set All Network Printers Transparent The ~NR (Set All Network Printers Transparent) instruction sets all printers in the network, regardless of ID or current mode, transparent. The format for the ~NR instruction is: ~NR where ~NR = ~NT Set Network Printer Transparent Set Currently Connected Printer Transparent The ~NT (Set Network Printer Transparent) instruction sets the currently connected network printer transparent.
300 ZPL II COMMAND REFERENCE ^PF Slew Given Number of Dot Rows The ^PF (Slew Given Number of Dot Rows) instruction causes the printer to slew labels (move labels at a high speed without printing) a specified number of dot rows, at the bottom of the label. This allows faster printing when the bottom portion of a label is blank. The format for the ^PF instruction is: ^PF# where ^PF = #= Slew a Number of Dot Rows Number of Dot Rows to Slew Default value: None.
ZPL II COMMAND REFERENCE ^PM Printing Mirror Image of Label The ^PM (Print Mirror Image of Label) instruction prints the entire printable area of the label as a mirror image. This instruction flips the image from left to right. The format for the ^PM instruction is: ^PMa where ^PM = a= Print Mirror Image Mirror Print Entire Label Y = Yes N = No {I.V.P. = N} [Instruction is ignored if no parameter given.] The following is an example of how to use the ^PM instruction.
302 ZPL II COMMAND REFERENCE ^PO Print Orientation The ^PO (Print Orientation) instruction inverts the label format 180 degrees. In essence, the label is printed upside down. The format for the ^PO instruction is: ^POa where ^PO = a= Set Print Orientation Invert 180 Degrees N = Normal {I.V.P. = N} I = Invert Once you issue a ^PO command, the setting is retained until you turn off the printer or send the opposite ^PO instruction to the printer.
ZPL II COMMAND REFERENCE ^PP Programmable Pause ~PP The ~PP (Programmable Pause) instruction stops printing after the current label is printed (if one is printing) and places the printer in the Pause mode. The ^PP (Programmable Pause) is not immediate. Therefore, several labels may be printed before a pause is performed. This instruction will pause the printer after the format it is in prints. The operation is identical to pressing the PAUSE button on the front panel of the printer.
304 ZPL II COMMAND REFERENCE ^PQ Print Quantity The ^PQ (Print Quantity) instruction 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 II COMMAND REFERENCE Explanations of Values for the ^PQ ‘o’ Parameter With the ‘o’ parameter set to Y, the printer will NOT pause after every group count (‘p’ parameter) of labels has been printed. With the ‘o’ parameter set to N (the default), the printer will pause after every group count of labels has been printed. Examples of the ^PQ Instruction ^PQ50,10,1,Y: Print a total quantity of 50 labels with one replicate of each serial number.
306 ZPL II COMMAND REFERENCE ^PR Print Rate The ^PR (Print Rate) instruction determines the media speed during printing and the slew speed (feeding a blank label). The printer will operate with the selected speeds until the setting is reissued in a subsequent format or the printer is turned off. The print speed is application specific. Since print quality is affected by media and ribbon, printing speeds and printer operating modes, it is very important to run tests for your applications.
ZPL II COMMAND REFERENCE The format for the ^PR instruction is: ^PRp,s,b where ^PR = p= s= Print Rate Print Speed Default value: Speed A Acceptable values : A or 2 50.8 mm/sec. B or 3 76.2 mm/sec. C or 4 101.6 mm/sec. 5 127 mm/sec. D or 6 152.4 mm/sec. E or 8 203.2 mm/sec. (2 inches/sec.) (3 inches/sec.) (4 inches/sec.) (5 inches/sec.) (6 inches/sec.) (8 inches/sec.) Slew Speed Default value: Speed D Acceptable values : A or 2 50.8 mm/sec. (2 inches/sec.) B or 3 76.2 mm/sec. (3 inches/sec.
308 ZPL II COMMAND REFERENCE ~PS Print Start The ~PS (Print Start) instruction causes a printer in the Pause mode to resume printing. The operation is identical to pressing the PAUSE button on the front panel of the printer when the printer is already in the Pause mode. ^PW Print Width The ^PW (Print Width) command lets you set the print width via ZPL.
ZPL II COMMAND REFERENCE ^SC Set Communications The ^SC (Set Communications) command allows you to change the communications parameters you are using. The format for the ^SC command is: ^SCa,b,c,d,e,f where ^SC = Set Communications a= Baud Rate (110-19200 baud) b= Word Length (7 or 8 data bits) c= Parity (N = none, E = even, O = odd) d= Stop Bits (1 or 2) e= Handshake (X = XON/XOFF, D = DTR/DSR) f= Zebra Protocol N = NONE Z = Zebra A = Ack/Nak) Effective for Version 20.5.
310 ZPL II COMMAND REFERENCE ~SD Set Darkness The ~SD (Set Darkness) command lets you set the darkness of printing via ZPL. It is equivalent to the darkness setting parameter on the front panel display. The format for the ~SD instruction is: ~SD# where ~SD = #= Set Darkness A Two-Digit Numeric Value Corresponding to the Desired Darkness Setting Default value: Last permanently saved value Range: 00 to 30 NOTE: The ^MD (Media Darkness) instruction value, if any, is added to the ~SD value.
ZPL II COMMAND REFERENCE ^SE Select Encoding The ^SE (Select Encoding) command has been created to select the desired ZPL/ZPL II encoding table.
312 ZPL II COMMAND REFERENCE ^SF Serialization Field (with a standard ^FD string) The ^SF (Serialization Field) command allows the user to serialize a standard ^FD string. Fields serialized with this command will be right justified or would end with the last character of the string. The increment string is aligned with the mask starting with the right-most position. The maximum size of the mask and increment string is 3K combined.
ZPL II COMMAND REFERENCE The format for the ^SF instruction is: ^SFa,b where ^SF = Serialization Fields a= Mask String 1. 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. The mask is aligned to the characters in the ^FD string starting with the right-most position.
314 ZPL II COMMAND REFERENCE ^SN Serialization Data The ^SN (Serialization Data) instruction allows the printer to index data fields by a selected increment or decrement value (i.e., make the data fields increase or decrease by a specified value) each time a label is printed. This can be performed on up to 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.
ZPL II COMMAND REFERENCE NOTE: Incrementing/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 Print Quantity ^PQ instruction. The format for the ^SN instruction is: ^SNv,n,z where ^SN = Serialized Data v= Starting Value Default value: 1 Other values: 12-digit maximum for portion to be indexed.
316 ZPL II COMMAND REFERENCE Using Leading Zeros In the ^SN instruction, the “z” parameter determines if leading zeros will be printed or suppressed. The default value for this parameter is to not print the leading zeros. Depending on which value is used (Y = Yes, print leading zeros; N = No, do not print leading zeros) the printer will do the following. Printing Leading Zeros The starting value consists of the right most consecutive sequence of digits.
ZPL II COMMAND REFERENCE NOTE: If, during the course of printing serialized labels the printer runs out of either paper or ribbon, the first label printed (after the media or ribbon has been replaced and calibration completed) will have the same serial number as the “partial” label printed before the “out” condition occurred. This is done in case the last label before the “out” condition did not fully print. This is controlled by the ^JZ instruction (see Page 273).
318 ZPL II COMMAND REFERENCE ^SP Start Print The ^SP (Start Print) instruction allows a label to start printing at a specified point before the entire label has been completely formatted. On extremely complex labels, this instruction can increase the overall throughput of the print. The instruction works as follows. You specify the dot row at which the ^SP instruction is to take affect. This then creates a label ‘segment.
ZPL II COMMAND REFERENCE The format for the ^SP instruction is: ^SPa where ^SP = a= Start Print The Dot Row at which Printing is to Start Default value: 0 Other values: Any number up to that used in the ^LL (Label Length) instruction. The following page shows an example of using the ^SP command.
320 ZPL II COMMAND REFERENCE In the following illustration, a label 800 dot rows in length has an ^SP500 instruction. Segment 1 will print while instructions in Segment 2 are being received and formatted.
ZPL II COMMAND REFERENCE ^SR Set Head Resistance The ^SR (Set Head Resistance) command lets you set the printhead resistance via ZPL. The format for the ^SR instruction is: ^SR# where ^SR = #= Set Head Resistance A Numeric Value up to 4 Digits Long Corresponding to the Resistance Value You Want to Use. Default value: Last permanently saved value Range: 488 to 1175 NOTE: To avoid damaging the printhead, this value should be less than or equal to the value shown on the printhead you are using.
322 ZPL II COMMAND REFERENCE ^SS Set Media Sensors The ^SS (Set Media Sensor) instruction is used to change the values for media, web, ribbon and label length that were set during the “media calibration” process. The “Media Calibration” process is described in your specific printer’s user’s guide. In the illustration 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.
ZPL II COMMAND REFERENCE The format for the ^SS instruction is: ^SSw,m,r,l,m2,r2,a.b.c where ^SS = Set Media Sensors w= 3-Digit Value for the Web (000 to 100) Default value: Value shown on the media sensor profile or configuration label. m= 3-Digit Value for the Media (000 to 100) Default value: Value shown on the media sensor profile or configuration label. r= 3-Digit Value for the Ribbon (000 to 100) Default value: Value shown on the media sensor profile or configuration label.
324 ZPL II COMMAND REFERENCE ^SZ Set ZPL The ^SZ (Set ZPL) instruction is used to select the programming language used by the printer. This instruction gives you the ability to print labels formatted in both ZPL or ZPL II. This instruction will remain active until another ^SZ instruction is sent to the printer or the printer is turned off. The format for the ^SZ instruction is: ^SZa where ^SZ = a = Set ZPL Set ZPL 1 = ZPL 2 = ZPL II (Instruction ignored if parameter missing or incorrect.
ZPL II COMMAND REFERENCE ~TA Tear-Off Adjust Position The ~TA (Tear-Off Adjust Position) 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. The format for the ~TA instruction is: ~TA# where ~TA = #= Tear-Off Adjust Position Two-Digit Numeric Value (-64 to +64 Dot Rows) Representing the Desired Change in Media Rest Position Effective for Version 18.6.6, 21.6.
326 ZPL II COMMAND REFERENCE ^TO Transfer Object The ^TO (Transfer Object) instruction is used to copy an object or group of objects from one storage device to another. It is quite similar to the copy function used in PC’s. Source and destination devices must be supplied and must be different and valid for the action specified. Invalid parameters will cause the instruction to be ignored. There are no defaults associated with this instruction.
ZPL II COMMAND REFERENCE The format for the ^TO instruction is: ^TOd:o.x,s,o,x where: ^TO = Transfer Object. d= Source Device where Object is Stored.{R:, B:} o= Name of Stored Object (Supports use of wild cards.) x= Extension, 3 Alphanumeric Characters (Supports use of wild cards) s= Destination Device where Object is to be Stored {R:, B:} o= Name of Object Stored at Destination (Supports use of wild cards.
328 ZPL II COMMAND REFERENCE The following are some examples of using the ^TO instruction. To copy the object ZLOGO.GRF from DRAM to an optional Memory Card and rename it ZLOGO1.GRF: ^XA ^TOR:ZLOGO.GRF,B:ZLOGO1.GRF ^XZ To copy the object SAMPLE.GRF from an optional Memory Card to DRAM and keep the same name ^XA ^TOB:SAMPLE.GRF,R:SAMPLE.GRF ^XZ Transferring Multiple Objects The Asterisk (*) can be used to transfer multiple object files (except *.FNT) from the DRAM to the Memory Card.
ZPL II COMMAND REFERENCE ~WC Print Configuration Label The ~WC (Print Configuration Label) instruction is used to generate a Printer Configuration Label. NOTE: This instruction only works when the printer is idle. The format for the ~WC instruction is: ^WC where ~WC = Print Configuration Label Effective for Version 22.8.
330 ZPL II COMMAND REFERENCE ^WD Print Directory on Label The ^WD (Print Directory on Label) instruction is used to print a label listing bar codes, objects stored in DRAM, or fonts (if an optional font ROM is installed in the printer). For bar codes the list will show the name of the bar code. For fonts the list shows the name of the font, number to use with ^Af instruction and size. For objects stored in DRAM the list shows the name of the object, extension, size and option flags.
ZPL II COMMAND REFERENCE The format for the ^WD instruction is: ^WDd:o.x where ^WD = Print Directory on Label d= Source Device to Store Image {Optional. Default is Search Priority} o= Name of Object {Optional. Default is “*”. A “?” can also be used} x= Extension. Effective for Version 22.8.5 Specific changes include the following new descriptive parameter names: E: ONBOARD FLASH B: MEMORY CARD R: RAM The following are examples of using the ^WD instruction.
332 ZPL II COMMAND REFERENCE ^XA Start Format The ^XA (Start Format) instruction is the beginning (opening) bracket. It indicates the start of a new label format. This instruction can also be issued as a single ASCII control character STX (Control-B, Hex 02).
ZPL II COMMAND REFERENCE ^XB Suppress Backfeed The ^XB (Suppress Backfeed) instruction suppresses forward feed of media to tear-off position depending on the current printer mode. Since no forward feed is done, a backfeed before printing of the next label is not necessary, therefore, throughput will be improved. When printing a batch of labels, the last label should not contain this instruction.
334 ZPL II COMMAND REFERENCE ^XF Recall Format The ^XF (Recall Format) recalls a stored format to be merged with variable data. There can be multiple ^XF instructions and they can be located anywhere in the label format. When recalling a stored format and merging data utilizing the ^FN (Field Number) function, the calling format must contain the (^FN) instruction to properly merge the data.
ZPL II COMMAND REFERENCE The format for the ^XF instruction is: ^XFd:o.x where ^XF = Recall Stored Format d= Source Device of Stored Image {Optional. Default is Search Priority} o= Name of Stored Image, 1-8 Alphanumeric Characters (Default, the name “UNKNOWN” is used.) x= Extension, 3 Alphanumeric Characters {Fixed. Will always be .ZPL} The following is an example of using the ^XF instruction to recall the format STOREFMT.ZPL from DRAM and also send new reference data: ^XA ^XFR:STOREFMT.
336 ZPL II COMMAND REFERENCE ^XG Recall Graphic The ^XG (Recall Graphic) instruction is used to recall one or more graphic images for printing. This instruction is used in a label format to merge pictures such as company logos and piece parts, with text data to form a complete label. An image may be recalled and resized as many times per format as needed. Other images and data may be added to the format.
ZPL II COMMAND REFERENCE The format for the ^XG instruction is: ^XGd:o.x,x,y where ^XG = Recall Graphic Image d= Source Device where Image is Stored {Optional. Default is Search Priority.} o= Name of Stored Image, 1-8 Alphanumeric Characters (Default, the name “UNKNOWN” is used.) x= Extension, 3 Alphanumeric Characters {Fixed. Will always be .
338 ZPL II COMMAND REFERENCE ^XZ End Format The ^XZ (End Format) instruction is the ending (closing) bracket. It indicates the end of a label format. When this instruction is received, a label will be printed. This instruction can also be issued as a single ASCII control character ETX (Control-C, Hex 03). ^ZZ Printer Sleep The ^ZZ (Printer Sleep) instruction places the printer in an idle or shutdown mode.
339 APPENDIX A ZPL II Command Quick Reference Chart This table is a summary of ZPL commands. An asterisk (*) indicates that the command has been supported since the initial release of the firmware. Commands that were added in subsequent releases are signified by the firmware version number. “N/A” means the command is not supported.
COMMAND ^A ^A@ ^B1 ^B2 ^B3 ^B4 ^B7 ^B8 ^B9 ^BA ^BB ^BC ^BD ^BE ^BF ^BI ^BJ ^BK ^BL ^BM ^BP ^BQ ^BS ^BU ^BX ^BY ^BZ ^CC, ~CC ^CD, ~CD ^CF ^CI ^CO ^CT, ~CT DESCRIPTION Scalable/Bitmapped Font Use Font Name to Call Font Code 11 Interleaved 2 of 5 Code 39 Code 49 PDF417 EAN-8 UPC-E Code 93 CODABLOCK Code 128 Maxicode EAN-13 Micro-PDF417 Industrial 2 of 5 Standard 2 of 5 ANSI Codabar LOGMARS MSI Plessey QR Code UPC/EAN Extensions UPC-A Data Matrix Change Narrow Bar Width POSTNET Change Carat Change Delimiter Ch
^EF, ~EF ^EG, ~EG ^FA ^FB ^FD ^FH ^FN ^FO ^FP ^FR ^FS ^FT ^FV ^FW ^FX ^GB ^GF ^GS ~HB ^HG ^DF ^DG ^DN ~DS ~DT ~DU COMMAND ^CV ^CW ~DB ^DD ~DE DESCRIPTION Code Validation Font Identifier Download Bitmapped Font Download Direct Bitmap Download Encoding Table for Unbounded Unicode TrueType Font Download Format Download Graphic Abort Download Graphic Download Scalable Font Download a TrueType Font Download Unbounded Unicode TrueType Font Erase Format Erase Downloaded Graphics Field Allocate Field Block Field
COMMAND ~HI ~HM ~HS ^HV ^HW ^ID ^IL ^IM ^IS ~JA ~JB ^JB ~JC ~JD ~JE ~JG ^JJ ~JL ^JM ~JN ~JO ~JP ~JR ~JS ^JT ^JU ^JW ~JX ^JZ ^KL ^KP ^LH ^LL DESCRIPTION Host Identification Memory Status Host Status Host Verification Host Directory List Image Delete Image Load Image Move Image Save Cancel All Reset Battery Dead Initialize Flash Memory Set Media Sensor Calibration Enable Communications Diagnostics Disable Diagnostics Graphing Sensor Calibration Set Auxiliary Port Set Label Length Set Dots per Millimeter Head
^SN ^SP COMMAND ^LR ^LS ^LT ^MC ^MD ^MF ^ML ^MM ^MN ^MP ^MT ^MU ~NC ^NI ~NR ~NT ^PF ^PH, ~PH ^PM ^PO ^PP, ~PP ^PQ ^PR ~PS ^PW ^SC ~SD ^SE ^SF DESCRIPTION Label Reverse Print Label Shift Label Top Map Clear Media Darkness Media Feed Maximum Label Length Print Mode Media Tracking Mode Protection Media Type Mode Units Network Connect Network ID Number Set all Network Printers Transparent Set Network Printer Transparent Slew Given Number of Dot Rows Slew to Home Position Print Mirror Image Print Orientation P
COMMAND ^SR ^SS ^SZ ~TA ^TO ~WC ^WD ^XA ^XB ^XF ^XG ^XZ ^ZZ DESCRIPTION Set Head Resistance Set Media Sensor Set ZPL Tear Off Adjust Position Transfer Object Print Configuration Label Print Directory on Label Start Format Suppress Backfeed Recall Format Recall Graphic End Format Printer Sleep V14 n/a * * * 14.4.0 * * * * * * * n/a V15 n/a * * * * * * * * * * * n/a V16 16.5.3 * * 16.5.3 * * * * * * * * n/a V18 * * * * * * * * * * * * n/a V20 n/a * * 20.5.
345 APPENDIX B ASCII Code Chart The following page contains a chart of the ASCII (American Standard Code for Information Exchange) Code used by the Zebra printers.
346 APPENDIX B ASCII Code Chart ASCII Code Chart HEX 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F CHAR 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 GS RS US HEX 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F CHAR space ! “ # $ % & ‘ ( ) * + , .
347 APPENDIX C 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.
348 APPENDIX C Mod 10 Check Digit The following is a bar code that illustrates the above example. The digit on the right (5) is the check digit.
349 APPENDIX D Mod 43 Check Digit The calulations for determining the Mod 43 Check Digit character are as follows: Each character in the Code 39 Character set has a specific value. These are shown in the chart below. 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 Sample Data String: 12345ABCDE/ 1.
350 APPENDIX D Mod 43 Check Digit 2. Divide the total by 43. Keep track of the remainder. 115/43 = 2 Remainder is 29 3. The “check digit” is the character that corresponds to the value of the remainder. Remainder = 29. 29 is the value for the letter T. T is the check digit. The following is a bar code that illustrates the above example. The digit on the right (“T”) is the check digit.
351 APPENDIX E Fonts and Font Matrices Standard Printer Fonts
352 APPENDIX E Fonts and Font Matrices Font A B C,D E F G H GS Ø Matrix H×W (in dots) 9x5 11 x 7 18 x 10 21 x 10 26 x 13 60 x 40 17 x 11 24x24 DEFAULT: 15x12 Type* H×W (in in.) U-L-D U U-L-D OCR-B U-L-D U-L-D OCR-A SYMBOL .059 x .039 .072 x .059 .118 x .079 .138 x .085 .170 x .105 .394 x .315 .111 x .098 .157 x .157 Character Size char. H×W (in /in. mm) char. /mm 25.4 16.9 12.7 11.7 9.53 3.18 10.20 6.35 1.01 0.66 0.50 0.46 0.37 0.125 0.40 .251 1.50 x 0.99 1.82 x 1.50 2.99 x 2.00 3.50 x 2.16 4.
APPENDIX E Fonts and Font Matrices Font A B C,D E F G H GS Ø Matrix H×W (in dots) 9x5 11 x 7 18 x 10 42 x 20 26 x 13 60 x 40 34 x 22 24x24 DEFAULT: 15x12 Type* H×W (in in.) U-L-D U U-L-D OCR-B U-L-D U-L-D OCR-A SYMBOL .030 x .020 .036 x .030 .059 x .040 .138 x .085 .085 x .053 .197x .158 .111 x .098 .079 x .079 *U = Uppercase Character Size char. H×W (in /in. mm) char. /mm 50.8 33.8 25.4 23.4 19.06 6.36 10.20 12.70 2.02 1.32 1.00 0.92 0.74 0.25 0.40 0.52 0.75 x 0.50 0.91 x 0.75 1.50 x 1.00 1.
354 APPENDIX E Fonts and Font Matrices
355 APPENDIX F Code Page 850 Chart The following pages contains charts of the Code Page 850 character set used by the Zebra printers.
356 APPENDIX F Code Page 850 Chart
APPENDIX F Code Page 850 Chart 357
358 APPENDIX F Code Page 850 Chart
359 APPENDIX G Error Detection Protocol Introduction There are many instances when it is vitally important that the information sent to the Zebra printer is received completely Error-Free. ZPL II supports an error detection protocol called Zebra Packet Response Protocol to meet this need. NOTE: This protocol only works when using serial interface. It does not function when using parallel interface. What is a Protocol A Protocol is a precisely defined set of rules.
360 APPENDIX G Error Detection Protocol printer has either accepted or rejected the information sent from the Host computer. Information is sent in the form of “Packets.” Packets sent from the Host computer are called Request Packets. When a Request Packet is received, the Zebra printer analyzes the information in the Packet. If the Request Packet is accepted, the Zebra printer will send a positive response back to the Host computer. The Host computer can then send the next Request Packet.
APPENDIX G Error Detection Protocol DST. Z-ID (Destination Zebra-ID) This is the three digit ASCII I.D. number used to identify which Zebra printer is to receive the Request Packet. The Zebra printer compares this number to the Network ID number assigned to it during Printer Configuration. The Zebra printer will act on the Request Packet only if these numbers match. SRC. Z-ID (Source Zebra-ID) This is a three digit ASCII number used to identify the Host computer. This number is determined by the user.
362 APPENDIX G Error Detection Protocol This field can contain from 0 to 1024 characters. If the Format of a label is longer than 1024 characters, the Data Format fields from consecutive packets will be concatenated together in the printer’s Receive Data Buffer as if they were sent as one long direct transmission. Special consideration has been given to the possible requirement to include ASCII Control Characters (values less than 20H) in the Data Format portion of a Request Packet.
APPENDIX G Error Detection Protocol Zebra Packet Response The Packet Response protocol provides the highest degree of error checking and is well suited to the Host-Multiple Printer application. The Response Packet from the Zebra printer will always use the following format. The Response Packet Header Block is comprised of five fixed-length fields which are defined as follows: SOH - (Start of Header Character) The Zebra printer sends this character as the beginning of a new Response Packet.
364 APPENDIX G Error Detection Protocol ‘S’ This character indicates that the Response Packet contains the Zebra Printer Status requested by a ~HS (Host Status) instruction received from the Host. SEQUENCE # (Used to denote the current message sequence number.) This number is identical to the message sequence number in the Request Packet. It denotes the message sequence number to which the Response Packet is replying.
APPENDIX G Error Detection Protocol Disguising Control Code Characters There may be occasions when ASCII Control Codes (00H - 19H) must be included as part of the Data Format block of a Request Packet. To eliminate any problems, these characters must be disguised so that the communication protocol does not act on them. A three step procedure must be used to disguise each Control Code. 1. A SUB (1AH) character must precede each Control Code placed in the Data Format block. 2.
366 APPENDIX G Error Detection Protocol Rules for Transactions 1. Every Transaction is independent of every other Transaction and can only be initiated by the Host computer. 2. A valid Response Packet must be received by the Host computer to complete a Transaction before the next Request Packet is sent. 3. If an error is encountered during a Transaction, the entire Transaction (i.e. Request Packet and Response Packet) must be repeated. 4.
APPENDIX G Error Detection Protocol If there is only one printer connected to the Host computer, the Network ID number should be set to all zeros (default). If there is more than one printer, such as in a broadcast or multi-drop environment, each printer should be assigned its own unique ID number. Printers in this environment, with an ID of all zeros, will receive ALL label formats regardless of the actual printer ID number in the DST. Z-ID block of the Request Packet.
368 APPENDIX G Error Detection Protocol Time-Out Error Conditions and Responses There are certain conditions at the Zebra printer that might cause the Host computer to time-out while processing a Transaction. The following list illustrates these conditions and how the Host computer should respond to them. 1. Error: A Request Packet from the Host computer is not received by the Zebra printer.
APPENDIX G Error Detection Protocol How the Zebra Printer Processes a Request Packet The following describes the steps taken at the Zebra printer to process a Request Packet. 1. The Zebra printer looks for a SOH (Start of Header) character. As soon as it finds one, it places the SOH and all the data after it into its Receive Data Buffer. This process continues until the printer receives an EOT (End of Transmission) character.
370 APPENDIX G Error Detection Protocol used it before. However the printer will send a response back to the host. 3. The printer calculates the CRC and compares it with the one received in the Request Packet. If the CRC is valid, the printer sends a Positive Response Packet to the Host computer. It then transfers the ‘Variable Length’ data from the Receive Buffer to its memory for processing.
APPENDIX G Error Detection Protocol Code for Calculating the CRC for the Zebra Protocol /******************************************************** * * name: do_crc_ccitt * * description: Calculates a 16 bit cyclic redundancy check * character using the CCITT polynomial * X**16 + X**12 + X**5 + 1 which translates * to the magic number 0x1021. * * parameters: crc -- the check character that is being * accumulated.
372 APPENDIX G Error Detection Protocol /* 120 -- */ 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, /* 128 -- */ 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, /* 136 -- */ 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, /* 144 -- */ 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, /* 152 -- */ 0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, /* 160 -- */ 0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
373 GLOSSARY ZPL II and Bar Code Industry Terms alphanumeric Indicating letters, numerals, and characters such as punctuation marks. ANSI American National Standards Institute; an organization that coordinates the development of U.S. voluntary standards used in both the private and public sectors ANSI character set The ANSI-standard character set that defines 256 characters.
374 GLOSSARY bit Binary Digit. A single digit in a binary number (0 or 1), either on or off. binary Meaning two. All input to the computer is converted into binary numbers made up of the two digits 0 and 1 (bits). bitmap A binary representation in which a bit or series of bits correspond to some part of an object such as an image or font. For example, one bit in a black/white system represents one pixel on a computer screen or one pixel printed by a Zebra printer.
GLOSSARY cutter A device that can cut the media into individual labels or tags immediately after it is printed. delimiter character In ZPL II, this is the comma. The delimiter character is used to separate one item or set of data from another. direct thermal A printing method in which the printhead presses directly against the media. Heating the printhead elements causes a discoloration of the heat-sensitive coating on the media.
376 GLOSSARY media sensor This sensor is located behind the printhead to detect the presence of media and, for non-continuous media, the position of the web, hole, or notch used to indicate the start of each label. media supply hanger The stationary arm that supports the media roll. narrow element module The narrow bar or space of a bar code. non-continuous media Consumable printing stock which contains an indication of where one label/printed format ends and the next one begins.
GLOSSARY ribbon A band of material consisting of a base film coated with wax or resin “ink”. The inked side of the material is pressed by the printhead against the media. The ribbon transfers ink onto the media when heated by the small elements within the printhead. Zebra ribbons have a coating on the back that protects the printhead from wear. roll media Media that comes supplied rolled onto a core (usually cardboard). Contrast with fanfold media.
378 GLOSSARY void A space where printing should have occurred, but did not due to an error condition such as wrinkled ribbon or faulty print elements. A void can cause a printed bar code symbol to be read incorrectly or not at all.
379 Index A Abort Download Graphic (~Dn) . . . . . . . . 205 Abort Download Graphic (~DN). . . . . . . . 205 ACSII Code Chart . . . . . . . . . . . . . . . . . . . 346 ASCII characters . . . . . . . . . . . . . . . . . . . 4,32 AUTOEXEC.ZPL Definition and Usage . . . . . . . . . . . . . . 87 Axis Reference Point See Label Home Position B Backfeed . . . . . . . . . . . . . . . . . . . . . . . . . . 266 Bar Code Instructions ANSI Codabar Bar Code (^BK) . . . . 146 CODABLOCK Bar Code (^BB) . . . .
380 INDEX Beginning (Opening) Bracket (^XA) . . . . 332 Bit Map Font Size Explained . . . . . . . . . . . . . . . . . . . . . . . 13 Bitmapped Characters Magnification Factor . . . . . . . . . . . . . . 12 Burn temperature . . . . . . . . . . . . . . . . . . . . . . 4 C Cache On (^CO) . . . . . . . . . . . . . . . . . . . . 184 Notes on Print Cache Performance . . 186 Cancel All (~JA). . . . . . . . . . . . . . . . . . 77,256 Cancel Current Partial Format (~JX). . . . . 272 Caret (^) Character . . . . . .
INDEX Erase Downloaded Graphic (^EG or ~EG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87,212 Erase Format (^EF or ~EF) . . . . . . . . . . . . 212 Error Detection Protocol . . . . . . . . . . . . . . 359 Examples ANSI Codabar Bar Code (^BK) . . . . 146 Bit Map Font Size . . . . . . . . . . . . . . . . 13 Change Alphanumeric Default Font (^CF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 CODABLOCK Bar Code (^BB) . . . . 124 Code 11 Bar Code (^B1) . . . . . . . . . .
382 INDEX Field Data Instruction Maximum Characters Allowed . . . . . 217 Field HEX (^FH) . . . . . . . . . . . . . . . . . . . . 218 Field Number (^FN) . . . . . . . . . . . . . . . . . 219 Field Orientation (^FO) . . . . . . . . . . . . . . . 228 Field Origin (^FO). . . . . . . . . . . . . . . . . . . 220 Field Parameter (^FP) . . . . . . . . . . . . . . . . 221 Field Reverse Print (^FR) . . . . . . . . . . . . . 222 Field Separator (^FS). . . . . . . . . . . . . . . . . 223 Field Typset (^FT). . . . . .
INDEX I I.V.P. Defined . . . . . . . . . . . . . . . . . . . . . . . 9,95 Image Delete (^ID) . . . . . . . . . . . . . . . . . . 248 Image Load (^IL). . . . . . . . . . . . . . . . . . . . 250 Image Move (^IM) . . . . . . . . . . . . . . . . . . 252 Image Save (^IS) . . . . . . . . . . . . . . . . . . . . 254 Format and Parameters . . . . . . . . . . . 254 Initialize Flash Memory (^JB) . . . . . . . 88,257 Intercharacter Gap Defined . . . . . . . . . . . . . . . . . . . . . . . .
384 INDEX P Parameter string. . . . . . . . . . . . . . . . . . . . . . . 5 Pause and Cancel Format (~JP). . . . . . . . . 265 Power On Reset (~JR) . . . . . . . . . . . . . . . . 265 Prefix character . . . . . . . . . . . . . . . . . . . . . 376 Prefix character . . . . . . . . . . . . . . . . . . . . . . . 5 Preprinted Labels Printing on . . . . . . . . . . . . . . . . . . . . . . 16 Print Configuration Label (~WC). . . . . 79,329 Print Directory (^WD). . . . . . . . . . . . . . . .
INDEX Stored Format Instructions Download Format (^DF) . . . . . . . . . . 200 Stored Formats See Download Format (^DF) See Erase Format (^EF or ~EF) See Field Allocate (^FA) See Field Number (^FN) Introduction . . . . . . . . . . . . . . . . . . . . . 72 See Recall Format (^XF) Suppress Backfeed (^XB) . . . . . . . . . . . . . 333 T Tear-Off Adjust Position (~TA) . . . . . . . . 325 Test/Setup Control Instructions Head Test Fatal (~JN). . . . . . . . . . 76,264 Head Test Interval (^JT). . . . . . . .
386 INDEX
PROGRAMMING GUIDE 333 Corporate Woods Parkway Vernon Hills, Illinois 60061.3109 U.S.A. Telephone +1 847.634.6700 Facsimile +1 847.913.