Zebra CPCL Programming Manual

PROMAN-CPCL Rev. PApril. 2005
Proprietary Statement
This manual contains proprietary information of Zebra Technologies Corporation and its subsidiaries (“Zebra Technologies”). It is intended solely for the information and use of parties operating and maintaining the equipment described herein. Such propriety information may not be used, reproduced, or disclosed to any other parties for any other purpose without the expressed written permission of Zebra Technologies.
Product Improvements
Continuous improvement of products is a policy of Zebra Technologies. All specifications and designs are subject to change without notice.
FCC Compliance Statement
Digital apparatus has been tested and found to comply with the limits for a Class B Digital Device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the product manuals, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to correct the interference at his own expense. The user is cautioned that any changes or modifications not expressly approved by Zebra Technologies could void the user’s authority to operate the equipment. This unit was tested with shielded cables on the peripheral devices. Shielded cables must be used with the unit to insure compliance.
WARNING: EXPOSURE TO RADIO FREQUENCY RADIATION ON SOME MODELS. TO CONFORM TO FCC RF EXPOSURE REQUIREMENTS THIS DEVICE SHALL BE USED IN ACCORDANCE WITH THE OPERATING CONDITIONS AND INSTRUCTIONS LISTED IN THE UNIT’S USER’S MANUAL.
Canadian DOC Compliance Statement
Digital apparatus does not exceed the Class A limits for radio noise emissions from digital apparatus as set out in the radio interference regulations of the Canadian Department of Communications.
Liability Disclaimer
Zebra Technologies takes steps to assure that its published Engineering specifications and manuals are correct; however, errors do occur. Zebra Technologies reserves the right to correct any such errors and disclaims liability resulting therefrom.
Limitation of Liability
In no event shall Zebra Technologies or anyone else involved in the creation, production or delivery of the accompanying product (including hardware and software) be liable for any damages whatsoever (including, without limitation, consequential damages including loss of business profits, business interruption or loss of business information) arising out of the use of or the results of use of or inability to use such product, even if Zebra Technologies has been advised of the possibility of such damages. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you.
Copyrights
The copyrights in this manual and the label printer described therein are owned by Zebra Technologies. All rights are reserved. Unauthorized reproduction of this manual or the software in the label printer may result in imprisonment of up to one year and fines of up to $10,000 (17 U.S.C.506). Copyright violators may be subject to civil liability.
© 2005 ZIH Corp. All trademarks and registered trademarks are property of their respective owners. All rights reserved.
Mobile Printer CPCLProgramming Manual iii
TABLE OF CONTENTS
PROGRAMMING INTRODUCTION ......................... P1-1
PROGRAMMING LANGUAGE EMULATION .............................P1-1
PROGRAMMING LANGUAGE RECOMMENDATIONS ............P1-2
GETTING PRINTER INFORMATION .........................................P1-3
GETTING PRINTER INFORMATION EXAMPLE ...................... P1-4
COMMUNICATIONS DIAGNOSTICS MODE.............................P1-7
LABEL COORDINATE SYSTEM ................................................P1-8
LABEL VISTA™ ..........................................................................P1-9
PRINTER COMMANDS............................................ P2-1
PRINTER COMMANDS.............................................................P2-2
PRINT COMMAND .....................................................................P2-3
FORM COMMAND......................................................................P2-4
JOURNAL COMMAND ...............................................................P2-5
UNITS COMMANDS...................................................................P2-6
USING COMMENTS................................................................... P2-8
TEXT ......................................................................... P3-1
RESIDENT FONT SAMPLES .....................................................P3-1
TEXT COMMANDS.....................................................................P3-4
USING FONT GROUPS ............................................................. P3-6
TEXT CONCATENATION COMMANDS.....................................P3-8
MULTILINE (ML) COMMANDS................................................. P3-10
COUNT COMMAND .................................................................P3-12
SETMAG COMMAND ...............................................................P3-14
SCALABLE TEXT .................................................... P4-1
SCALE-TEXT COMMANDS .......................................................P4-2
SCALE-TO-FIT COMMANDS ..................................................... P4-4
SCALABLE CONCATENATION COMMANDS ...........................P4-6
ROTATE COMMANDS................................................................P4-8
LINEAR BAR CODES .............................................. P5-1
INTRODUCTION.........................................................................P5-1
UPC AND EAN/JAN BAR CODES .............................................P5-3
CODE 39 OR CODE 3 OF 9 BAR CODES ................................P5-6
CODE 93 OR CODE 9 OF 3 BAR CODES ................................P5-8
INTERLEAVED 2 OF 5 BAR CODES ......................................... P5-8
CODE 128 AND THE UCC-128 SHIPPING STANDARD...........P5-9
CODABAR................................................................................. P5-11
MSI PLESSEY BAR CODES .................................................... P5-12
POSTNET AND FACING IDENTIFICATION MARKS .............. P5-13
BAR CODE COMMANDS.........................................................P5-15
BARCODE COMMAND ............................................................P5-16
BARCODE-TEXT COMMAND..................................................P5-18
iv Mobile Printer CPCLProgramming Manual
TABLE OF CONTENTS (continued)
COUNT COMMAND .................................................................P5-20
TWO-DIMENSIONAL BAR CODES........................ P6-1
INTRODUCTION.........................................................................P6-1
PDF417 .......................................................................................P6-2
MAXICODE .................................................................................P6-2
TWO-DIMENSIONAL BAR CODE COMMANDS .......................P6-3
PDF417 (PORTABLE DATA FILE)............................................. P6-4
GRAPHICS ............................................................... P7-1
BOX COMMAND.........................................................................P7-1
LINE COMMANDS...................................................................... P7-2
INVERSE-LINE COMMANDS.....................................................P7-4
PATTERN COMMAND................................................................P7-6
GRAPHICS COMMANDS...........................................................P7-8
PCX COMMANDS ....................................................................P7-10
ADVANCED COMMANDS ....................................... P8-1
CONTRAST COMMAND ............................................................P8-1
TONE COMMAND .....................................................................P8-2
JUSTIFICATION COMMANDS ..................................................P8-3
PAGE-WIDTH COMMAND .......................................................P8-4
PACE COMMAND......................................................................P8-6
NO-PACE COMMAND ................................................................P8-9
WAIT COMMAND .....................................................................P8-10
REWIND COMMAND................................................................ P8-11
TENSION COMMANDS............................................................P8-12
SPEED COMMAND .................................................................. P8-13
SETSP COMMAND .................................................................P8-14
ON-OUT-OF-PAPER COMMAND.............................................P8-15
ON-FEED COMMAND..............................................................P8-16
PREFEED COMMAND ............................................................P8-18
POSTFEED COMMAND..........................................................P8-19
PRESENT-AT COMMAND.......................................................P8-20
COUNTRY / CODE PAGE COMMAND ................................... P8-22
USING FORMAT FILES............................................................P8-24
BEEP COMMAND.....................................................................P8-27
CUT COMMAND......................................................................P8-28
PARTIAL-CUT COMMAND...................................................... P8-29
CUT-AT COMMAND .................................................................P8-30
MCR COMMANDS....................................................................P8-31
LINE PRINT MODE .................................................. P9-1
INTRODUCTION.........................................................................P9-1
SPECIAL COMMANDS USING THE UTILITY FUNCTION ...... P9-2
UNITS COMMANDS...................................................................P9-3
SETLP COMMAND.....................................................................P9-4
Mobile Printer CPCLProgramming Manual v
SETLF COMMAND ..................................................................... P9-5
MOVING WITH X AND Y COORDINATES................................. P9-6
LMARGIN COMMAND................................................................ P9-7
SETBOLD COMMAND ............................................................... P9-8
SETSP COMMAND ....................................................................P9-9
PAGE-WIDTH COMMAND & PAGE-HEIGHT COMMAND ...... P9-10
SPECIAL ASCII CHARACTERS...............................................P9-10
SETFF COMMAND................................................................... P9-11
SET-TOF COMMAND ...............................................................P9-12
TEARING OR CUTTING THE PAPER .....................................P9-14
BAR CODES, GRAPHICS AND LINES ....................................P9-15
SETLP-TIMEOUT COMMAND .................................................P9-16
DESIGNING A RECEIPT ..........................................................P9-16
ADVANCED UTILITIES .......................................... P10-1
VERSION UTILITY....................................................................P10-2
CHECKSUM UTILITY ...............................................................P10-3
DEL UTILITY ............................................................................. P10-4
DIR UTILITY..............................................................................P10-5
DEFINE-FILE (DF) UTILITY .....................................................P10-6
TYPE UTILITY ..........................................................................P10-8
BAUD UTILITY.......................................................................... P10-9
COUNTRY / CODE-PAGE UTILITY OR ................................P10-10
CHAR-SET/CODE PAGE UTILITY .........................................P10-10
ANNOUNCE UTILITY .............................................................P10-12
TIMEOUT UTILITY..................................................................P10-14
TIMEOUT UTILITY EXAMPLE ...............................................P10-14
BEEP COMMAND...................................................................P10-15
BEEP COMMAND EXAMPLE ................................................P10-15
ON-LOW-BATTERY COMMAND............................................P10-16
LT COMMAND ........................................................................P10-17
LT COMMAND EXAMPLES....................................................P10-17
SET-TIME UTILITY .................................................................P10-18
GET-TIME UTILITY.................................................................P10-19
SET-DATE UTILITY ................................................................P10-20
GET-DATE UTILITY ................................................................P10-21
PRINTING A TIME STAMP .....................................................P10-22
PRINTING A DA TE STAMP ....................................................P10-23
PAPER-JAM UTILITY ............................................................. P10-24
MAGNETIC CARD READER (MCR) COMMAND.................. P10-25
MCR-QUERY COMMAND......................................................P10-31
MCR-CAN COMMAND ...........................................................P10-33
S-CARD COMMAND .............................................................. P10-34
S-CARD COMMAND EXAMPLES..........................................P10-37
DENSO BHT COMMANDS .................................. P10-38
SETTING THE DATA FORMAT ..............................................P10-38
vi Mobile Printer CPCLProgramming Manual
TABLE OF CONTENTS (continued)
IR OR CABLE INTERFACE SELECTION ..............................P10-40
BHT-BAUD COMMAND..........................................................P10-40
SETTING THE MODE FOR IR DATA TRANSMISSION ........P10-40
CONFIGURING THE BHT FOR IR TRANSMISSION............P10-41
BHT-IR FILE TRANSMISSION ............................................... P10-42
CONFIGURING THE BHT FOR CABLE TRANSMISSION....P10-43
LOADING A .DAT FILE INTO THE BHT .................................P10-44
INTERRUPTED TRANSMISSIONS .......................................P10-45
EXAMPLE .DAT FILE..............................................................P10-46
SRF-ACCESS AND END-SRF-ACCESS COMMANDS ........P10-47
BHT-BAUD COMMAND..........................................................P10-48
BHT MODE COMMANDS.......................................................P10-49
BHT PROTOCOL COMMAND................................................P10-53
PRINTER ESCAPE COMMANDS ...........................P11-1
SET AND READ CODE COMMAND ........................................ P11-1
PRINTER ESCAPE COMMANDS FORMAT ............................ P11-2
STATUS/INFORMATION .......................................................... P11-3
USER LABEL COUNT .............................................................. P11-5
POWER OFF COMMAND ........................................................ P11-5
WIRELESS NETWORK PRINTERS....................... P12-1
INTRODUCTION.......................................................................P12-1
NETWORK PRINTER SAFETY CONSIDERATIONS .............. P12-1
LAN COMMAND .......................................................................P12-1
SETTING THE IP ADDRESS FOR NETWORK PRINTERS....P12-7
LAN COMMAND RESPONSE .................................................. P12-8
NETWORK PRINTER TROUBLESHOOTING ......................... P12-9
WIRELESS LAN REPORT EXAMPLE ...................................P12-10
PROGRAMMING FOR THE DISPLAY OPTION .... P13-1
INTRODUCTION:...................................................................... P13-1
EXAMPLE 1: .............................................................................P13-1
EXAMPLE 2: .............................................................................P13-5
CONFIGURATION/CONTROL COMMANDS......... P14-1
INTRODUCTION.......................................................................P14-1
COMMAND FORMAT ...............................................................P14-1
COMMANDS / PARAMETERS................................................. P14-3
BLUETOOTH® PARAMETERS................................................P14-5
COMM PORT PARAMETERS................................................ P14-11
DEVICE PARAMETERS.........................................................P14-13
DISPLAY PARAMETERS .......................................................P14-15
FILE PARAMETERS...............................................................P14-17
PRINTER MECHANISM PARAMETERS ...............................P14-19
INPUT PARAMETER ..............................................................P14-22
Mobile Printer CPCLProgramming Manual vii
MEDIA PARAMETERS ...........................................................P14-24
MEMORY PARAMETERS ......................................................P14-27
ODOMETER PARAMETERS .................................................P14-28
POWER PARAMETERS.........................................................P14-32
TEST FUNCTION PARAMETERS ......................................... P14-36
NETWORKING PARAMETERS .............................................P14-37
USB PARAMETERS...............................................................P14-59
WLAN PARAMETERS............................................................P14-63
WLAN.XXX FHSS COMPATIBILITY.......................................P14-63
ZEBRA PRINTER MIRROR PROCESS .................................P14-86
PRINTER CONFIGURATION AND SETUP............ P15-1
USING LABEL VISTA FOR PRINTER CONFIGURATION.......P15-1
USING LABEL VISTA FOR WIRELESS CONFIGURATION....P15-3
POWER MANAGEMENT..........................................................P15-4
BATCH FILES ...........................................................................P15-7
RUN.BAT COMMAND/FILE ...................................................... P15-8
RE-RUN COMMAND ................................................................P15-9
GAP-SENSE & BAR-SENSE COMMANDS ...........................P15-10
INDEX ......................................................................... A-1
APPENDIX A-FREQUENTLY ASKED QUESTIONS . A-14
APPENDIX B- INTERFACE CABLES...................... A-19
APPENDIX C- CHARACTER TABLES.................... A-24
APPENDIX D - FONT INFORMATION ..................... A-28
APPENDIX E- BAR CODE QUICK REFERENCE ... A-32
APPENDIX F - PRODUCT SUPPORT ..................... A-34
viii Mobile Printer CPCLProgramming Manual
Programming Section
Mobile Printer CPCLProgramming Manual P1-1
This manual details the various commands in the CPCL language which allow the programmer to utilize the built in text, graphics, bar code printing and communications capabilities of Zebra mobile printers. The following nota­tion conventions are used throughout this manual::
{ }
Required item
[ ]
Optional item
( )
Abbreviated command
< >
Literal item
A space character is used to delimit each field in a com­mand line.
Many commands are accompanied by examples of the command in use. After the word 'Input' in each example, the file name of that example will appear in parentheses.
This manual can also be found on the Accessories CD (Part Number 46984 ) available from Zebra.
PROGRAMMING LANGUAGE EMULATION
Zebra Mobile Printers can emulate the EPL2™ and ZPL
®
programming languages used by other types of Zebra printers. Printers using emulation must be configured with more memory and have a special emulation program loaded. For more information on the appropriate uses of these languages, refer to the following language compari­son chart:
PROGRAMMING INTRODUCTION
continued on next page
P1-2 Mobile Printer CPCLProgramming Manual
PROGRAMMING LANGUAGE RECOMMENDATIONS
Language Native in Reccommended Use CPCL Cameo®, Encore® • In new installations of
QL, RW and older mobiles, where CPCL is easily Comtec® models integrated into the host
application
• When older Comtec models are being upgraded- so that the customer can use existing application without code modifications
ZPL PA/PT Series mobile • When an installation already (emulation printers, Zebra High uses ZPL as a standard language available on Performance/ Industrial & needs to maintain a consistant QL series, /Commercial printers, language for all thermal printers. std. on R-140 RFID printer, • When certain printer functions . QL plus& LP/TLP 2844-Z and are not available in CPCL or RW Series) PAX applicator printers EPL, such as: (ZBI, Datamatrix,
Code 11, Micro PDF)
• When replacing a PA/PT 40x, or another Zebra printer using ZPL, with a Zebra mobile printer
EPL Zebra Desktops, R402 • When an installation already (emulation (RFID printer), TR 220, uses EPL- the most commonly available on PS 21xx Series used Zebra language- as a QL, Encore, standard language and needs to or Cameo maintaina consistant language series and for all thermal printers. std. on RW • If you are replacing Eltron & QL plus Transport or Xport mobile series) printers, a Zebra mobile with an
EPL emulation will ease the transition.
Note: QL Plus and RW Series printers have EPL and ZPL emulation built into their operating system. See the “device.languages” command under the “Device Parameters” topic in Section 14 for more information on setting programming languages with these products.
Mobile Printer CPCLProgramming Manual P1-3
GETTING PRINTER INFORMATION
The printer can produce a report containing information about the application resident in printer memory. A report similar to the example printouts shown on the following pages can be obtained from your printer by doing the fol­lowing:
1. Turn the printer OFF.
2. While holding the FEED key down, turn the printer ON.
3. When printing begins, release the FEED key.
The printer prints a line of interlocking “x” characters and then produces two reports. The first report indicates the printer model, ROM version, serial number, baud rate, etc.
The second report contains application information. The last digits in the application number indicate the software version.(e.g. “Software: HTLK40d” indicates a software version of 40.) If no second report appears, there is no application loaded.
The Wireless Communications report will appear if a Short Range Radio (SRRF), infrared (IrDA) or wireless LAN (RF LAN) option has been installed in the printer. If no wireless options are installed, the Wireless Communi­cations Section will consist of a blank line.
The RF LAN Information section will only appear on Net­work Printers (units equipped with a WLAN card). Net­work printers are covered in detail in Section 12 of this manual.
The Label section shown in the second report reports the maximum size label that can be printed, based on a printer resolution of 203 dots/inch (8 dots/mm).
In the example, the Label Height is 2224 dots, which means for a label width of 576 dots (2.8 inches or 72 mm), you can print labels up to 10.9 inches (278 mm) long. Reducing the label width results in a correspond­ing increase in the maximum label length.
P1-4 Mobile Printer CPCLProgramming Manual
GETTING PRINTER INFORMATION EXAMPLE
Unit Serial Number
Application Number
End of First Report
Printhead Test
RF LAN Section (Network Printers only) Refer to Section 12.
Report appears only on units with wireless options installed. (see RF LAN section below and next page) Units with no wireless options will print an empty line and resume the report.
Second report continues on P1-5
Mobile Printer CPCLProgramming Manual P1-5
GETTING PRINTER INFORMATION EXAMPLE, CONT.
Wireless Communications Section with IR Wireless Option Installed
Wireless Communications Section with Short Range Radio (SRRF) Wireless Option Installed
SRRF Software version
IR Software version
SRRF settings
P1-6 Mobile Printer CPCLProgramming Manual
GETTING PRINTER INFORMATION EXAMPLE, CONT.
Continuation of Second Report
Flash Memory Size
Maximum Label Size Refer to P1-7
Files Loaded in Printer Memory (will include Pre-scaled or Scalable Fonts)
Amount of Memory Available
Resident Fonts
Pre-scaled or Scalable Fonts (if any) loaded in Memory
Instructions on entering Communications Diagnostics (Dump) Mode. Refer to P1-6
Mobile Printer CPCLProgramming Manual P1-7
COMMUNICATIONS DIAGNOSTICS MODE
To aid the user in diagnosing communications problems, the printer features a Communications Diagnostics Mode (Dump Mode). In the dump mode, the printer will print the ASCII hex codes of the data sent to it, and their text representation (or the period '.', if not a printable charac­ter). As a test of the printer the “ALL CHRS.LBL” file on the MPU disk may be sent. To enter Communications Diagnostics Mode:
1.Turn the printer OFF.
2.Hold FEED key down.
3.Turn the printer ON.
4.Release FEED key when printer starts printing the
diagnostics.
5.At the end of 2nd diagnostics report, the printer will
print: "Press FEED key to enter DUMP mode".
6.Now press the FEED key. The printer will print:
"Entering DUMP mode".
Note: If the FEED key is not pressed within 3 sec­onds, the printer will print "DUMP mode not entered" and will resume normal operation.
7.At this point, the printer is in DUMP mode and will
print the ASCII hex codes of the data sent to it, and their text representation (or "." if not a printable character).
Additionally, a file with a “.dmp” extension contain­ing the ASCII information will be created and stored in the printer’s memory. It can be viewed, “cloned” or deleted using the Label Vista application. (Refer to pg. P1-8 and the Label Vista documentation for more information.)
To cancel Communications Diagnostics Mode:
1.Turn the printer OFF.
2.Wait 5 seconds.
3.Turn the printer ON.
P1-8 Mobile Printer CPCLProgramming Manual
LABEL COORDINATE SYSTEM
The x and y coordinates are expressed here in terms of dots. Coordinates in ( ) are for 200 dot per inch printers. On 200 d.p.i. printers, 8 dots (either horizontally or verti­cally) equal 1 millimeter and 203 dots equate approxi­mately to 1 inch. Coordinates in [ ] are for 300 dot per inch printers. On 300 d.p.i. printers 12 dots equal 1 millimeter, and 305 dots equate approximately to 1 inch.
Notes:
1. Coordinates refer to the actual printing area of the printers.
2. ”y” =the available label height which can vary with the resident application. (See Getting Printer Information, Page P1-3.)
4" Printer
2" Printer
3" Printer
(0,0)
Label Width
Label Height
2.25" Printer
(447, 0)
[670,0]
(383, 0)
[574,0]
(575, 0)
[862,0]
(831, 0)
[1246,0]
Print Direction
(383, y)
[574,y]
(447, y)
[670,y]
(575, y)
[862,y]
(831,y)
[1246,y]
Mobile Printer CPCLProgramming Manual P1-9
LABEL VISTA™
Label Vista is a stand-alone program running in Windows
®
95/NT that allows users with little or no pro­gramming background to design labels which can be printed on certain model Zebra portable printers. It com­bines an intuitive graphically based user environment with powerful, but easily mastered, editing tools.
Label Vista allows the creation of printable, fixed-size (pre-scaled) fonts derived from an included library of TrueType™ fonts, which greatly enhances the versatility of this program.
In addition, Label Vista allows the easy creation of format files which can remain resident in the printer and be merged with variable data files sent from the host. This provides a very efficient method of printing labels that have a mixture of data fields that change from label to la­bel and elements that remain constant. Refer to Section 8 of this Manual for more information on format files.
Label Vista also provides a powerful set of diagnostics tools. It is recommended that the Label Vista documen­tation package be consulted for a more detailed descrip­tion of the printer diagnostics available in this program.
Label Vista utilizes a subset of the full Mobile Printing Systems Programming Language described in this manual. Files created in Label Vista are fully compatible with any other label files created using the complete set of Mobile Printer commands.
Label Vista requires an IBM compatible personal com­puter, running Windows 95 or later. A PC with the mini­mum configuration to run Windows 95 will have sufficient memory to run Label Vista.
Note: Label Vista has proven to be compatible with Windows XP in informal testing, however, compatibility problems with certain unusual combinations of hardware and software may arise.
Mobile Printer CPCLProgramming Manual P2-1
PRINTER COMMANDS
A label file always begins with the “!” character followed by an “x” offset parameter , “x” and “y” axis resolutions, a label length and finally a quantity of labels to print. The line con­taining these parameters is referred to as the Command Start Line.
A label file always begins with the Command Start Line and ends with the “PRINT” command. The commands that build specific labels are placed between these two com­mands.
A space character is used to delimit each field in a com­mand line.
Note: Every line in the command session must be terminated with both carriage-return
and line-feed characters. All Printer Commands must be in
uppercase characters ONLY.
P2-2 Mobile Printer CPCLProgramming Manual
<!> {offset} <200> <200> {height} {qty}
where:
<!>:
Use '!' to begin a control session.
{offset}:
The horizontal offset for the entire label. This value causes all fields to be offset horizontally by the specified number of UNITS.
<200>:
Horizontal resolution (in dots-per-inch).
<200>:
Vertical resolution (in dots-per-inch).
{height}:
The maximum height of the label.
The maximum label height is calculated by mea­suring from the bottom of the first black bar (or
label gap) to the top of the next black bar (or label gap). Then 1/16” [1.5mm] is subtracted from this distance to obtain the maximum height. (In dots: subtract 12 dots on 203 d.p.i printers; 18 dots on
306 d.p.i. printers)
PRINTER Commands
Format:
{qty}:
Quantity of labels to be printed. Maximum = 1024.
maximum ht. =
d - .062” [1.5mm]
1
st
black bar or
gap
2
nd
black bar or
gap
“d”
Mobile Printer CPCLProgramming Manual P2-3
PRINT Command
The PRINT command terminates and prints the file. This must always be the last command (except when in Line Print Mode). Upon execution of the PRINT command, the printer will exit from a control session. Be sure to terminate this and all commands with both carriage­return
and line-feed characters.
Format:
{command}
where:
{command}:
PRINT
PRINTER Command Example
Input (HELLO.LBL):
! 0 200 200 210 1 TEXT 4 0 30 40 Hello World FORM
PRINT
Output:
P2-4 Mobile Printer CPCLProgramming Manual
FORM Command
The FORM command instructs the printer to feed to top of form after printing.
Format:
{command}
where:
{command}:
FORM
In the following example, the printer will execute a form feed after the label is printed. See the SETFF (set form feed) command in the section on designing receipts and lists for information on setting printer behavior when the FORM command is executed.
Input: FORM.LBL
! 0 200 200 3 1 IN-CENTIMETERS CENTER TEXT 4 1 0 .5 Form Command FORM PRINT
Mobile Printer CPCLProgramming Manual P2-5
JOURNAL Command
By default, the printer will check for correct media align­ment if it encounters the eye-sense mark (black horizon­tal bars on back of media) during a print cycle (LABEL mode). If necessary, the JOURNAL command can be used to disable this automatic correction feature. The user's program is responsible for checking and assuring presence of paper in JOURNAL mode. Please refer to the status inquiry command for details on checking for out-of-paper condition.
Format:
{command}
where:
{command}:
JOURNAL
P2-6 Mobile Printer CPCLProgramming Manual
UNITS Commands
The units commands are used to specify a measurement system for all subsequent command fields in a control session. Coordinates, widths, and heights for all control commands can be entered with precision to four decimal places. By placing a units command immediately after the first line in a control session, the specified measure­ment system will also apply to the offset and height fields. The printer measurement system will default to dots until a units command is issued.
Format:
{command}
where:
{command}:
Choose from the following: IN-INCHES Measurement in inches. IN-CENTIMETERS Measurement in centimeters. IN-MILLIMETERS Measurement in millimeters. IN-DOTS Measurement in dots.
Mobile Printer CPCLProgramming Manual P2-7
UNITS Examples
Input 1 (UNITS1.LBL):
! 0.3937 200 200 1 1 IN-INCHES T 4 0 0 0 1 cm = 0.3937" IN-DOTS T 4 0 0 48 1 mm = 8 dots B 128 1 1 48 16 112 UNITS T 4 0 48 160 UNITS FORM PRINT
Output 1:
Output 2:
Input 2 (UNITS2.LBL):
! 0 200 200 2.54 1 IN-CENTIMETERS T 4 0 1 0 1" = 2.54 cm IN-MILLIMETERS T 4 0 0 6 203 dots = 25.4 mm B 128 0.125 1 6 12 14 UNITS T 4 0 16 20 UNITS FORM PRINT
P2-8 Mobile Printer CPCLProgramming Manual
USING COMMENTS
Comments can be added between the first line of a command session and the “PRINT” command.
A comment is placed in the file by starting a line with the ';' character in the first column. Any remaining text to the end of the line will be ignored. Comments are illegal between the CONCAT and ENDCONCAT commands.
Mobile Printer CPCLProgramming Manual P2-9
Input (COMMENT.LBL):
! 0 200 200 25 1 IN-MILLIMETERS JOURNAL ; Center justify text CENTER ; Print the words 'A COMMENT' TEXT 5 1 0 5 A COMMENT ; Print the label and go to top of next fo FORM PRINT
Output:
COMMENTS Example
Mobile Printer CPCLProgramming Manual P3-1
RESIDENT FONT SAMPLES
TEXT
P3-2 Mobile Printer CPCLProgramming Manual
RESIDENT FONT SAMPLES (continued)
Loading...
+ 346 hidden pages