Home

CPCL for Link-OS™ Enabled Printers

image

Contents

1. CPCL Command Description ABORT Yes No Aborts current label format 246 BAUD No Yes Changes serial port baud rate 256 BEEP Yes Yes Makes the printers beeper sound 257 CAPTURE Yes _ Yes Captures incoming print data to file 258 CHECKSUM No Yes Returns application checksum 259 CHAR COUNT CC No Yes Returns number of characters received so far 260 DELAYED ACTIONS Yes _ Yes Perform an action in some fixed amount of time 261 DISPLAY No Yes Places text on the display 262 DO Yes Yes Alias for SETVAR 284 do Yes Yes Lower case alias for SETVAR 284 DUMP Yes Yes Enters dump mode Alias for CAPTURE PRINT 264 DUMP IMAGE Yes No Dumps label memory 265 GET DATE Yes Yes Returns current date 267 GET TIME Yes _ Yes Returns current time 268 GETVAR Yes Yes Returns SGD configuration setting value 269 getvar Yes Yes Lower case alias of GETVAR 269 LT Yes Yes Specifies the end of line terminator for label and utilities sessions 272 MAX LABEL HEIGHT No Yes _ Returns maximums supported label height 274 ON FEED Yes Yes Perform an action when the feed key is pressed 275 ON LOW BATTERY OLB Yes Yes Perform an action when battery is low 276 RE RUN Yes Yes Re executes a stored format once it completes 277 SET Yes Yes Sets up a macro substitution 278 SET DATE Yes Yes Sets current date 281
2. Parameter Type Description Valid Range Pre scaled Font Syntax FontNameOrNumber Space Terminated String A font name or number to create the representation See Below FontSize 3 Digit Number The size of the font 0 to 999 Offset 3 Digit Unit Number How far in units the text is from the barcode 0 to 999 Alternate Syntax TTF Font Syntax TrueTypeFontName Space Terminated String The filename of the TTF font with extension See Below XScale 3 Digit Number The X size of the font in dots 0 to 999 Y Scale 3 Digit Number The Y size of the font in dots 0 to 999 Offset 3 Digit Unit Number How far in units the text is from the barcode 0 to 999 FontNameOrNumber The name or the number of the pre scaled or internal font to use when printing the barcode text This can be a number defined in the font file or the font s name with or without file extension FontSize The size of the font to print These sizes are defined within the font specified See page 190 for size values for built in fonts The size selection can be overridden by SETMAG CPCL FOR LINK OS PRINTERS Page 85 of 329 1073699 001 TrueTypeFontName Specifies the name of the TrueType font to use when printing the barcode text The entire filename of the font including extension must be specified The file must have a TTF or FNT extension XScale YScale The X and Y size of the TrueType font in dots Using the same size
3. CONFIG SYS Executed at startup used for configuration Executed First AUTOEXEC BAT Executed at startup used for configuration Executed Second RUN BAT Executed at startup used for configuration Executed Third SEL BAT Executed when the OK key is pressed on the keypad FTN BAT Executed when the RIGHT key is pressed on the keypad FF BAT Executed when the FORM FEED key is pressed on the keypad FF3 BAT Executed when the FORM FEED key is pressed three times rapidly The BEFORE BAT AFTER BAT and DIAGS BAT files supported in legacy CPCL are not supported in Link OS CPCL 13 4 1 CONFIG SYS AUTOEXEC BAT RUN BAT The files CONFIG SYS AUTOEXEC BAT and RUN BAT are all executed by the printer as it starts up if they are present on the E drive These files are all executed via the USE FORMAT command and thus the placement of the sequence used in USE FORMAT will cause the printer to wait at startup until data is received from any port to complete the formats These three files are not executed if the key sequence to print a two key report is used See page 246 for more information The configuration files can contain one or more sessions of any type except additional USE FORMAT sessions After being processed via USE FORMAT if Line Print mode is disabled the files are also sent to the ZPL parser 13 4 2 SEL BAT FTN BAT FF BAT The files SEL BAT FTN BAT and FF BAT files are executed when various keys on the p
4. In addition CPCL provides a number of specific commands for configuring aspects of line print in the form of CPCL Utilities session commands A complete list of these commands can be found in Section 7 on page 163 Each of these commands has a dedicated section for its documentation but the overall system theory will be described here To begin with here is a list of line print system defaults that are configured at power on When the first printable line print data is received by the parser a block of memory is allocated for the text to be drawn to The width of this block is defined by the current PAGE WIDTH setting see page 127 The height of this block is defined by the SETLP BUFFER command see page 179 By default the height of this block is 2400 pixels tall As characters are received by the printer for line print printing they are imaged into this buffer starting at position 0 0 Each time a character is printed the X coordinate is incremented by the amount defined in the currently selected font as defined by the SETLP command see page 176 This amount can be variable or fixed depending on the font Characters continue to be drawn along the horizontal plane until there is not enough room for the next character to be drawn completely At this time the X cursor is reset to 0 and the Y cursor is advanced the amount specified by the SETLP command plus the amount specified by the SETLF command see page 175 If the fo
5. Width This represents the width of a narrow bar within the barcode in units The entire range of values is supported This dot is automatically incremented by one dot after it is converted from units Ratio This represents the ratio of a narrow bar to a wide bar The Ratio column above indicates if a particular barcode type supports the use of this field If it is not supported it is ignored but must be provided Refer to the following table for the valid ratio values If the ratio is not one of these values the barcode will not be printed even if the specified barcode type does not support ratios 0 1 5 1 1 20 1 2 25 1 3 3 0 1 4 3 5 1 20 2 0 1 21 2 1 1 22 2 2 1 23 23 24 2 4 1 25 25 1 26 2 6 1 27 2 7 1 28 2 8 29 2 9 1 30 3 0 1 When using the PostNet barcode type Ratio represents the size of the fixed spacing between each symbol in the barcode This value becomes measured in dots and one is added to the value to determine what spacing to use Height This represents the height of the barcode in units There is no limit on this value A value of zero will result in no barcode being printed CPCL FOR LINK OS PRINTERS Page 41 of 329 1073699 001 X Y The X and Y coordinates in units specifying where the barcode is to be placed These coordinates are affected by the alignment commands CENTER LEFT and RIGHT Data The data to be encoded in the barcode The data
6. CPCL FOR LINK OS PRINTERS Page 151 of 329 1073699 001 t Font 4 has two character sets contained within it Sizes greater than 1 use a different character set which only contains numbers and symbols 4B 4 1 2 4B 5 1 3 4B 6 1 4 4B 7 1 5 5 0 1 1 5 1 1 2 5 2 2 2 5 3 2 3 6 0 1 1 7 0 1 1 7 1 1 2 2 Font 4 Size 2 is half height which is represented as 1 in its definition You cannot simu ate this effect with SETMAG In the case the that font specified has multiple bitmap sets such as is the case with Font 4 the original sizing parameter selects which bitmap set to use and then SETMAG sets the width and height Examples SETMAG IbI 0 200 200 625 SETMAG 0 0 lt CR gt lt T 7 0 20 20 SET SETMAG 1 1 lt CR gt lt T 7 0 20 50 SET SETMAG 1 2 lt CR gt lt EP 020 78 SET SETMAG 2 2 lt CR gt lt 1 lt CR gt lt LF gt LF gt LF gt AG 1 1 Font 7 Size 0 lt CR gt lt LF gt LF gt AG 1 2 Font 7 Size 0 lt CR gt lt LF gt LF gt T 7 0 20 126 SETMAG 2 2 Font 7 Size 0 lt CR gt lt LF gt SETMAG 2 2 lt CR gt lt LF gt T 7 1 20 178 SETMAG 2 2 Font 7 Size 1 lt CR gt lt LF gt SETMAG 0 0 lt CR gt lt LF gt ML 24 T 7 0 20 250 lt CR gt lt LF gt SETMAG 2 2 Example with CONCAT lt CR gt lt LF gt Note how SETMAG ENDML lt CR gt lt LF gt SETMAG 2 2 lt CR gt lt CONCAT 20 330 lt C 000 Size 0 lt C 010 Size 1 lt C
7. FORM lt CR gt lt LF gt Command Name FORM Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None The FORM command when used in a label session signals that after the label session is close with PRINT or END and is done printing the printer should attempt to synchronize to a mark or gap on the media after the label is printed taking into account all adjustments the TOF value from SET TOF and label skip from SETFF The command may appear anywhere in the label session but always applies at the end The command is not persistent and must appear in each label session in order to take effect The printer will search for the distance specified by the SETFF command or by the media feed_length SGD for the mark before giving up No error occurs if the printer cannot find the mark This differs from the command when used in a utilities session which is covered in the next section Command Notes and Interactions None 9 7 FORM Utilities Command FORM lt CR gt lt LF gt Command Name FORM Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD None The FORM command when used in a utilities session signals that the printer should attempt to synchronize to a mark or gap on the media right now taking into account all adjustments the TOF value from SET TOF and label skip from SETFF This command can be used to synchronize to a mark in lin
8. What comes after this character determines which of the primary roles will be used to execute commands These roles are called sessions The character signals to the printer that the CPCL interpreter is the target of this data stream and is a request to begin a session If this character does not start a line of transmission the data will fall through to the next parser In CPCL all commands should be transmitted in upper case String values for commands may be transmitted in either case By default transmission of CPCL is performed in 8 bit ASCII characters Once you have entered a CPCL session using the character every line in the session must be terminated with the CR and LF characters Sessions are ended with a specific command which terminates them See each session below for more details If you transmit a command that CPCL doesn t know how to process or a command in the wrong case the entire line containing the command is ignored up to the next lt CR gt and lt LF gt character sequence If you transmit an invalid or unrecognized session command the entire session will fall through to the line print system if it is enabled or if it is not enabled the next parser in the system For more information on line print see section 3 7 on page 25 Advanced Notes M See CPCL Line Print on page 164 for more information the handling of data which does not begin with an exclamation mark as well as parsing order
9. lt BEL gt Command Name lt BEL gt Valid Session Types Not valid in sessions lt BEL gt is an escape command which sounds the printer s bell It has no parameters The lt BEL gt character is ASCII character 7 Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 291 of 329 1073699 001 11 31 lt BS gt Backspace lt BS gt Command Name lt BS gt Valid Session Types Line print or Label Sessions See below lt BS gt is an escape character which is used to back up the text cursor one position along the X axis The amount backed up is determined by the last character printed If no character has been printed no motion occurs This command applies to line print mode as well as any label command in the family of TEXT commands see page 158 The BS command us not supported when using TrueType fonts with ROTATE values besides 0 Command Notes and Interactions If the text is rotated with one of the ROTATE commands the backspace position is properly calculated based on the rotation CPCL FOR LINK OS PRINTERS Page 292 of 329 1073699 001 11 32 lt ESC gt Get or Set CCL Key lt ESC gt W1 Key lt ESC gt R1 Command Name lt ESC gt W1 lt ESC gt R1 Valid Session Types Not valid in sessions lt ESC gt W1 is an escape command which is used to set the CCL key in CCPL and lt ESC gt R is an escape command which is used to retrieve the curr
10. END when used in a label session is an alias for the PRINT command which terminates the label session and effects printout See the PRINT command on page 139 for full documentation including examples 6 11 EXPANDED GRAPHICS EXPANDED GRAPHICS ByteWidth Height X Y Data lt CR gt lt LF gt VEXPANDED GRAPHICS ByteWidth Height X Y Data lt CR gt lt LF gt Command Name EXPANDED GRAPHICS VEXPANDED GRAPHICS Short Form Aliases EG VEG Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The EXPANDED GRAPHICS command is used to print ASCII encoded bitmap data to the label VEXPANDED GRAPHICS is the same except it is oriented vertically Unless the communication method does not permit the use of binary data graphical data is more efficiently represented by using the COMPRESSED GRAPHICS command See this on page on page 94 for more information Parameters Quick Reference Parameter Type Description Valid Range ByteWidth 3 Digit Number The byte width of the image being transmitted 0 to 999 Height 5 Digit Unit Number The height of the data to follow in units 0 to 65535 x 5 Digit Unit Number The X origin of the graphic 0 to 65535 Y 5 Digit Unit Number The Y origin of the graphic 0 to 65535 Data Raw String The data that makes up the bitmap to be printed See below CPCL FOR LINK OS PRINTERS Page 104 of 329 1073699 0
11. Command Name lt ESC gt g Valid Session Types Valid in line print only The lt ESC gt g command is used to print graphics in line print mode Each lt ESC gt g command is used to print a single pixel line of graphic data The width of the line is specified in the first two bytes following the lt ESC gt g command as a 16 bit integer All current printers with CPCL only require a single byte to represent maximum width though both bytes must be specified The design intent of the lt ESC gt g command is that the SETLP and SETLF commands first be used to configure the total line height to 1 pixel since each lt ESC gt g command only prints one line at a time lt ESC gt g by itself will not affect any print out the lt CR gt or lt LF gt commands must be used at the end of the line to terminate it Generally this involves setting the LF height to 1 with the SETLF command and setting the font height to 0 with the SETLP command See the example below for more information The lt ESC gt g command positions its output at the current line print cursor location The LMARGIN RX RY RXY X Y and XY commands can all be used to control the position of the line print cursor The LMARGIN command is often used to avoid having to specify large blocks of blank space at the start of lines The RY command can be used to easily skip areas of blank paper without having to send large amounts of NUL data Parameters Quick Reference Parameter Type Descript
12. ON OUT OF PAPER is used to specify what happens when the printer runs out of paper or encounters an unexpected mark or gap while printing a label in LABEL mode When the printer is used in LABEL mode the printed area of the label should not encounter a mark or gap Instead the FORM command should be used after the label content is printed to synchronize to the end of the form The label area defined in the label session should be 32 dots less than the actual size of the label to ensure proper functionality If the printer detects a mark or gap while printing the label not while using the FORM command this command specifies what happens In addition the command provides two separate configuration items regarding if the configuration applies to line print mode and also specify an optional file to run when the end of form situation occurs unexpectedly The default values for this command is PURGE 1 and PURGE LP OFF and RUN mode is disabled When RUN mode is activated PURGE and WAIT are disabled as is the Retries parameter The retries is forced to 1 when RUN mode is being used Newly received labels are handled as if the printer is in WAIT mode Parameters Quick Reference Parameter Type Description Valid Range Standard Syntax Mode Space Terminated String A font name or number to create the representation PURGE or WAIT Retries 5 Digit Number The number of attempts to make before aborting 0 to 65535 Po PURGELP S
13. Parameters Quick Reference Parameter Description Valid Range Mode Space Terminated String Sensor to use for detecting jam condition See Below Unused 5 Digit Number Required unused parameter for some modes See Below Mode Specifies the mode to use when detecting paper jams This value must be one of the following values Mode Description Requires Unused NONE Disable all paper jam detection default No PRESENTATION Use peeler sensor to detect paper jams No INDEX Use mark or gap sensor to detect paper jams No BAR Use mark or gap sensor to detect paper jams Yes GAP Use mark or gap sensor to detect paper jams Yes In the past INDEX BAR and GAP had separate meanings but now all have the same function The sensor used is based on the GAP SENSE or BAR SENSE command Some values of MODE require specification of the Unused parameter If the table above says Unused is required it must be provided or parsing will fail This value was used in legacy CPCL but has no effect on operations At power on the value used in NONE which means the printer will never detect a paper jam condition CPCL FOR LINK OS PRINTERS Page 225 of 329 1073699 001 If the PRESENTATION option is used the printer must have a peeler sensor and the sensor must be correctly engaged in order for the function to work If the printer does not have a peeler sensor no jams will be detected Unused An optional unused numeric value
14. Specifies how bold the text should be how many times its redrawn For very large fonts a large value may be necessary to see any effect For smaller fonts generally values of 1 to 4 work best At the start of each new label session the Boldness is reset to 0 which indicates no bolding is added to the text This value can also be used in a label session to turn off boldness Because boldness is represented as a unit number use of systems besides dots is not recommended Examples SETBOLD IbI 0 200 200 600 1 lt CR gt lt LF gt T 7 0 20 40 SETBOLD Example Font 7 Size O0 lt CR gt lt LF gt SETBOLD 0 lt CR gt lt LF gt T 7 0 20 64 SETBOLD 0 ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 S amp lt CR gt lt LF gt SETBOLD 1 lt CR gt lt LF gt T 7 0 20 88 SETBOLD 1 ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 S5 amp lt CR gt lt LF gt SETBOLD 2 lt CR gt lt LF gt T 7 0 20 112 SETBOLD 2 ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 amp lt CR gt lt LF gt SETBOLD 3 lt CR gt lt LF gt T 7 0 20 136 SETBOLD 3 ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 amp lt CR gt lt LF gt ETBOLD 0 lt CR gt lt LF gt 0 20 180 SETBOLD Example Font 4 Size 3 lt CR gt lt LF gt 0 20 204 SETBOLD 0 lt CR gt lt LF gt 3 20 228 1234 56 lt CR gt lt LF gt 0 20 310 SETBOLD 3 lt CR gt lt LF gt ETBOLD 3 lt CR gt lt LF gt T 4 3 20 334 1234 56 lt CR gt lt LF gt SETBOLD 0 lt CR gt lt LF gt T 7 0 20 41
15. Both the Find and Replace parameters are specified in a macro control language defined herein Macro Language Limitations Before starting to use the macro language it is important to know its limitations A maximum of 100 macros can be defined with the SET command At power on two special purpose macros are defined by default lt and gt The lt macro is used for several functions related to sourcing data for replacement This includes the lt TIME lt DATE and lt CCL key functions in addition to the lt Filename function See more about these functions on page 250 The gt macro is for an incomplete function to capture return data to a file and cannot be used This leaves 98 macros remaining for user definition The total size of all macros must not exceed 4096 bytes Each macro consumes the size of the macro s Find and Replace string plus 5 bytes At power on If the number of macros or macro size is exceeded no macro will be defined but no error occurs Macros are processed in first come first serve order Defining a macro with the same Find string twice does not result in the first one being replaced but rather a second macro being defined Because this new macro appears in the macro list after the existing one it will never be processed and the first defined one remains in effect The macro list can be completely cleared using the following command This also clears the two pre defined macros allowing them to b
16. CISDFCRC16 lt CR gt lt LF gt lt CRC16 gt lt CR gt lt LF gt lt Filename gt lt CR gt lt LF gt lt File Size gt lt CR gt lt LF gt lt lt Checksum gt lt CR gt lt LF gt File Data gt A CISDFRCRC16 is very similar to the CISDFCRC16 session except the file is only stored in RAM and is removed when the printer is powered off or rebooted When using a CISDFRCRC16 file the checksum is ignored CISDFRCRC16 lt CR gt lt LF gt lt CRC16 gt lt CR gt lt LF gt lt Filename gt lt CR gt lt LF gt lt File Size gt lt CR gt lt LF gt lt lt Checksum gt lt CR gt lt LF gt File Data gt Field Name Description Valid Range CRC16 A special CRC 16 that represents the lt CR gt lt LF gt 0 to FFFF as up to four checksum of all data to follow including Terminated String hexadecimal digits If the remainder of the header value is 0 CRC is ignored Filename The name of a filename to create on the lt CR gt lt LF gt 38 alpha numeric file system Terminated String characters plus drive letter and period for extension File Size The size of the file in hex lt CR gt lt LF gt 0 to FFFFFFFF as up to 8 Terminated String hex digits Limited to free space Checksum The 16 least significant bits of the result lt CR gt lt LF gt 0 to FFFF as up to four CPCL FOR LINK OS PRINTERS Page 24 of 329 1073699 001 of adding each byte of the file
17. If the value for rotate is not 0 TTF fonts cannot be used with the SCALE TEXT commands within CONCAT CPCL FOR LINK OS PRINTERS Page 100 of 329 1073699 001 CONCAT works correctly with all justification commands LEFT CENTER and RIGHT 6 9 COUNT COUNT Adjust lt CR gt lt LF gt Command Name COUNT Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware Yes The COUNT command is used to increment or decrement a field on a label when the labels are printed in a batch that is with a quantity greater than one on in the label session definition See section 6 1 on page on page 38 for more information on adjusting print quantities The command is negative aware COUNT fields are not cleared at the start of each new label session If you try to use COUNT on an unsupported field or use COUNT without a field and you previously adjusted a field successfully the old field definition will be used for the second label and on in the batch adjusts don t take effect until the second label No more than 30 COUNT commands can appear in a single label session Any beyond this amount will have no effect Parameters Quick Reference Parameter Description Valid Range Adjust lt CR gt lt LF gt Terminated The amount to adjust the field Up to 20 ASCII digits signed String Adjust A sign definition or none followed by up to 20 ASCII digits Each time the COU
18. Parameter Type Description Valid Range x 5 Digit Unit Number The X origin of the PCX 0 to 65535 Y 5 Digit Unit Number The Y origin of the PCX 0 to 65535 XMag 5 Digit Unit Number The X magnification factor of the PCX 0 to 65535 YMag 5 Digit Unit Number The Y magnification factor of the PCX 0 to 65535 Data Raw String Binary data containing the PCX file See below X Y The X and Y coordinates in units specifying where the origin of the line is to be placed XMag YMag The X and Y scaling factors of the image These can be any number but the recommended range is 1 to 32 A value of 0 is interpreted as 1 The scaling does not have to be square each parameter can be a different number This parameter is in unit number so use of other measurement systems besides dots is not recommended Data The entire PCX file to be printed This must include the header and the RLE compressed data The data size to be transmitted is determined by the PCX file format itself and does not need to be specified The Data field must be terminated with a lt CR gt lt LF gt after the last character of the binary data Data may contain all binary values including NUL characters Examples PCXMAG LBL CPCL FOR LINK OS PRINTERS Page 136 of 329 1073699 001 The label data for PCXMAG LBL contains a large amount of binary data and is not meaningful to represent in text form The label file named PCXMAG LBL is included in the label files set included
19. TrueTypeFontName Space Terminated String The filename of the TTF font with extension See Below XScale 5 Digit Unit Number The X size of the font in units 10 to 1450 dots YScale 5 Digit Unit Number The Y size of the font in units 10 to 1450 dots LineSpacing 5 Digit Unit Number The amount of space to place between lines in units 0 to 65535 FontNameOrNumber The name or the number of the pre scaled or internal font to use when rendering line print text This can be a number defined in the font file or the font s name with or without file extension FontSize The size of the font to print These sizes are defined within the font specified See page 190 for size values for built in fonts The size selection can be overridden by SETMAG CPCL FOR LINK OS PRINTERS Page 176 of 329 1073699 001 TrueTypeFontName Specifies the name of the TrueType font to use when printing line print text The entire filename of the font including extension must be specified The file must have a TTF or FNT extension XScale YScale The X and Y size of the TrueType font in units Using the same value for XScale and YScale will make the font appear proportionally correct The valid range is 10 to 1450 dots A value less than 10 dots is interpreted as 10 dots A value greater than 1450 dots is interpreted as 1450 dots For most labels this printer has 200 dots per inch so an X and Y of 200 dots will make a character approxima
20. 0 200 200 1000 1 lt CR gt lt LF gt URNAL lt CR gt lt LF gt RCODE RSS 40 20 2 0 0 0 7 123456789012 2D Barcode Data lt CR gt lt LF gt 24 T 7 0 300 20 lt CR gt lt LF gt C A lt CR gt lt LF gt pe 7 lt CR gt lt LF gt th Composite Scale 2 lt CR gt lt LF gt ta 123456789012 2D Barcode Data lt CR gt lt LF gt DML lt CR gt lt LF gt RCODE RSS 40 280 2 0 0 0 8 1234567 2D Barcode Data lt CR gt lt LF gt 24 T 7 0 300 280 lt CR gt lt LF gt C E lt CR gt lt LF gt pe 8 lt CR gt lt LF gt th Composite Scale 2 lt CR gt lt LF gt ta 1234567 2D Barcode Data lt CR gt lt LF gt DML lt CR gt lt LF gt RCODE RSS 40 480 2 0 0 0 9 123456789012 2D Barcode Data lt CR gt lt LF gt 24 T 7 0 300 480 lt CR gt lt LF gt 13 lt CR gt lt LF gt pe 9 lt CR gt lt LF gt th Composite Scale 2 lt CR gt lt LF gt CL FOR LINK OS PRINTERS Page 64 of 329 1073699 001 Data 123456789012 2D Barcode Data lt CR gt lt LF gt ENDML lt CR gt lt LF gt BARCODE RSS 40 740 2 0 0 0 10 1234567 2D Barcode Data lt CR gt lt LF gt ML 24 T 7 0 300 740 lt CR gt lt LF gt EAN 8 lt CR gt lt LF gt Type 10 lt CR gt lt LF gt With Composite Scale 2 lt CR gt lt LF gt Data 1234567 2D Barcode Data lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt Ata kL E ed 1 UPC A Type 7 With Composite Scale 2 Data 12345678901212D Barcode Data RSS UPCE n mBasa teasnobdbascanddPGe Eo UPC E
21. Amount lt CR gt lt LF gt Command Name SET TOF Short Form Aliases None Valid Session Types Utilities or Label Sessions Linked SGD media tof to Amount Negative Aware Yes The SET TOF command is used to adjust where the sensing of a mark or gap occurs relative to the print line With the default value of 0 the printer positions the trailing edge of the mark or gap at the print line so that when the next dot row is printed it will be placed just after the mark or gap All space up to this point is part of the previous label and similarly the same space at the end of the label is included in this label s space Adjusting this value to be a positive number moves the resting position of the end of the mark or gap to be closer to the source roll of media inside the printer body Adjusting the value to be a negative number moves the resting position of the end of the mark or gap to be further from the print line outside the printer The feed skip value specified by SETFF is always applied after this positioning operation If used in a utilities session the setting takes effect on the FORM operation If used in a label session the setting takes effect on that label session In both cases the setting is persistent until power cycle The setting can be made permanent using the zpl save SGD Parameters Quick Reference Parameter Description Valid Range Amount 5 Digit Unit Number How much to feed in uni
22. CPCL FOR LINK OS PRINTERS Page 42 of 329 1073699 001 Use in Utilities Sessions for Line Print In versions of Link OS Firmware greater than 19 6 The BARCODE command and all its variants can be used in a utilities session to print a barcode in line print mode The printer does not have to be in line print mode for this command to be used in utilities mode The BARCODE TEXT command applies to barcodes printed in a utilities session The X and Y parameters of the barcode must be specified but have no effect instead the X Y RX RY XY or RXY commands must be used to specify the location of the barcode Note that only the BARCODE command operates in line print mode VBARCODE does not It may be necessary to use the SET LF command to be able to see the entire height of the barcode See the line print section on page 25 for more information The height of barcodes in line print mode should not exceed the height specified by SETLP BUFFER Utilities Example U1 SETLF 160 lt CR gt lt LF gt U1 BARCODE TEXT 7 0 0 lt CR gt lt LF gt U1 BARCODE 128 1 2 150 0 0 12345 lt CR gt lt LF gt Command Notes and Interactions When printing a vertical barcode the Y coordinate will be increased by two By default numbers are not printed below barcodes in CPCL but this feature can be enabled using the BARCODE TEXT command see page 85 The above example uses this command to print the text under the barcodes CPCL FOR LINK OS PRINTERS Page 43 of
23. ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 160 of 329 Y 280 lt CR gt lt LF gt Y 320 Additional Text lt CR gt lt LF gt 1073699 001 TEXT example Pre Scaled Font 7 Size at X 20 Y 20 TEXT example Pre Scaled Font 7 Size 1 at X 20 Y 48 TEXT example TrueType 30x30 size X 20 Y 120 TrueType GOx30 size TEXT example TrueType 30x60 size X 20 Y 200 TEXT FG example Sizing Automatic s 2H Y 200 TEXT FG example Sizing Automatic X 20 Y J320 Additional Text TEST FG example OgT1XIL TEXT m gt lt N Example showing various fixed rotation text commands Uses TrueType font each sized 40x40 and all with origin at 416 650 Command Notes and Interactions SETMAG and SETSP and SETBOLD can change the rendering of text printed using the TEXT command See those commands for more information CPCL FOR LINK OS PRINTERS Page 161 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 162 of 329 1073699 001 7 Line Print Commands The following is a list of commands that can be used in utilities sessions for use in line print mode CPCL Utilities Commands Alias Description LMARGIN Sets left margin for line print text 164 LP LF EQUALS CRLF Sets LF to mean lt CR gt lt LF gt in line print mode 168 LP ORIENT Sets the orientation of line print text 170 RX Sets the line print cursor relative to where
24. Linked SGD None Negative Aware No The ROTATE command is used to specify the rotation of a scalable or TrueType font within the printer The following commands support rotation CONCAT VCONCAT SCALE TEXT VSCALE TEXT SCALE TO FIT VSCALE TO FIT ROTATE can also be used with any of these commands when they are part of a MULTI LINE session but not within the MULTI LINE session itself For all of these commands if the rotated text extends off the top or right edge of the label the text will be truncated and the final character on the line may not be fully formed In the left and bottom direction a fully formed partial character will be printed instead SCALE TO FIT and CONCAT does not support use of the ROTATE command with TrueType fonts Parameters Quick Reference Parameter Description Valid Range Degrees 5 Digit Number The number of degrees to rotate counter clockwise 0 to 65535 Degrees Specifies the number of degrees to rotate the text in the counter clockwise direction The value can be any number within the 0 to 65535 range Once set the value of degrees is persistent in the label format Examples ROTATE LBL 0 200 200 680 1 lt CR gt lt LF gt XY 250 250 lt CR gt lt LF gt ROTATE 45 lt CR gt lt LF gt SCALE TEXT VERAMONO TTF 15 15 Rotate 45 lt CR gt lt LF gt ROTATE 315 lt CR gt lt LF gt SCALE TEXT VERAMONO TTF 15 15 Rotate 315 lt CR gt lt LF gt ROTATE 225 lt CR gt l
25. M t is possible to change the character used to begin sessions from the exclamation point to other characters This character is called the CCL key and documentation on changing it can be found on page 293 At power on it is always set to the by default This document will assume you are using this default M Some examples in the past have shown CPCL lines terminated with space characters While this may function in some cases use of this syntax is not recommended for new labels as it is not compatible with all commands CPCL FOR LINK OS PRINTERS Page 17 of 329 1073699 001 M t is possible to change the way lines are terminated in CPCL See the LT command in on page 272 for more information At power on it is always set to lt CR gt lt LF gt by default This document will assume you are using this default M One CPCL Command SET is not lt CR gt lt LF gt terminated but quote terminated See this command on page 278 for more information M f you are using a non standard terminator set by LT lines starting with invalid commands are still consumed up to the next lt CR gt lt LF gt 3 1 Sessions In CPCL there are four types of sessions that can be started with the character Some commands may act differently depending on the kind of session you are currently using Each of these types are explained in this section In addition just after the Label Session documentation there is a section which explains each t
26. MaxiCode barcodes are always of a fixed size there are no options to adjust its size Parameters Quick Reference Parameter Type Description Valid Range x 5 Digit Unit Number The X position where the barcode begins 0 to 65535 units Y 5 Digit Unit Number The Y position where the barcode begins 0 to 65535 units Field Space Terminated String The ratio of wide to narrow bars lor2 Data lt CR gt lt LF gt Terminated Unit width of the barcode in dots 0 to 65535 dots String X Y The X and Y coordinates in units specifying where the barcode is to be placed Field Specifies the name of the field to be filled within the barcode See the table below for a list of fields supported by the barcode Each field name is terminated by a space and must be followed by data The fields may appear in any order within the label If a field is specified more than once the last value specified is used If an invalid field is specified no barcode is printed Data Specifies the data for the previously specified field See the table below for a list of fields and values Each line of data must be terminated with the CR and LF characters If the data provided is too long it is truncated according to the data specification CPCL FOR LINK OS PRINTERS Page 69 of 329 1073699 001 Note that none of the fields can accept NUL within their data it is stripped out before processing Configuration Fields The following fiel
27. TEXT180 FG FontGroupNumber X Y Data lt CR gt lt LF gt T180 FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt T180 TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt T180 FG FontGroupNumber X Y Data lt CR gt lt LF gt Rotated 270 Degrees TEXT270 FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt TEXT270 TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt TEXT270 FG FontGroupNumber X Y Data lt CR gt lt LF gt T270 FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt T270 TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt T270 FG FontGroupNumber X Y Data lt CR gt lt LF gt Command Name TEXT VTEXT or TEXT90 TEXT180 TEXT270 Short Form Aliases T VT T90 T180 T270 Valid Session Types Label and Sessions Linked SGD None Negative Aware No CPCL FOR LINK OS PRINTERS Page 158 of 329 1073699 001 The TEXT command is used to print text in CPCL The command can be used with both pre scaled and TrueType fonts but not with scalable fonts use SCALE TEXT for these instead The TEXT command can also be used to print using font groups There are three syntaxes to the command The first is for pre scaled fonts the second for TrueType fonts and the third is for font group The alignment commands CENTER LEFT and RIGHT are supported for all forms of
28. There is additional documentation for these commands in the label formatting commands starting on page 37 If one of these commands is the very first command after a label session command it affects the label session command The command otherwise takes effect immediately for any commands which use unit numbers that follow When reading in unit numbers CPCL uses the number interpretation rules mentioned below 3 3 1 2 Numbers CPCL FOR LINK OS PRINTERS Page 19 of 329 1073699 001 Regular numeric parameters in CPCL are any parameter that expresses a quantity that is not in terms of any label formatting These values are taken directly and when you see them documented in this manual the unit will be provided When reading numbers CPCL uses the number interpretation rules mentioned below 3 3 1 3 Number Interpretation Rules When a number is read by CPCL it follows the same set of reading rules if the value is a raw number or a unit number Numbers in CPCL can be positive or negative and can have a fractional portion with up to four decimal places If the number is negative the minus character must precede the first digit of the number If the minus sign is not present the number is assumed to be positive The may also be specified but is not necessary Many functions in CPCL are not sensitive to negative numbers and as such will simply use the absolute value when a negative number is specified Each command in this ma
29. Type 8 With Composite Scale 2 Data 123456712D Barcode Data Wis kL e 1 EAN 13 Type 9 With Composite Scale 2 Data 12345678901212D Barcode Data ad EAN 8 Type 10 With Composite Scale 2 Data 123456712D Barcode Data CPCL FOR LINK OS PRINTERS Page 65 of 329 1073699 001 Example BARCODE GS1 128 CC LBL This example shows GS1 128 Barcodes with composite components 1 0 200 200 L000 T lt C JOURNAL lt CR gt lt LF gt CENTER 576 lt CR gt lt LF gt BARCODE RSS 40 20 2 ML 24 T 7 0 40 220 lt C GS1 128 Type 11 R gt lt LF gt R gt lt LF gt icroPDF CC A CC B lt CR gt lt LF gt With Composite Scale 2 lt CR gt lt LF gt 1D Data 910005886 F 2D Data 1A1B2C3D4E5 ENDML lt CR gt lt LF gt BARCODE RSS 40 340 2 C1 100000410549 FNC1 9905 lt CR gt lt LF gt F6G7H8 lt CR gt lt LF gt lt CR gt lt LF gt 70 2 0 12 70 2 0 11 910005886 lt 128 gt 100000410549 lt 128 gt 9905 LA1IB2C3D4E5F6G7H8 lt CR gt lt LF gt 910005886 lt 128 gt 100000410549 lt 128 gt 9905 ABCDEFGHIUKLMNOPORSTUVWXYZabcd1234567ABCDEFGHIJKLMNOPQRSTUVWX YZabcd1234567ABCDEFG ML 24 T 7 0 40 560 lt C GS1 128 Type 12 R gt lt LF gt PDF417 HIJKLMNOPQRSTUVWXYZabcd1234567 lt CR gt lt LF gt CC C lt CR gt lt LF gt With Composite Scale 2 lt CR gt lt LF gt 1D Data 910005886 F 2D Data repeated 3 C1 100000410549 FNC1 9905 lt CR gt lt LF gt times lt CR gt lt LF gt ABCDEFGHIJKLMNOPORSTUVWXY
30. Ul SETLP 0 0 12 lt CR gt lt LF gt Here is font 0 size 0 for line print text lt CR gt lt LF gt Here is font 0 size 0 for line print text lt CR gt lt LF gt Here is font 0 size 0 for line print text lt CR gt lt LF gt U1 SETLP 7 0 45 lt CR gt lt LF gt You can even change Ul SETLP 5 1 45 lt CR gt lt LF gt MID LINE U1 SETLP 7 0 45 lt CR gt lt LF gt and then back lt CR gt lt LF gt U1 SETLP VERAMONO TTF 40 40 0O lt CR gt lt LF gt True Type font example lt CR gt lt LF gt U1 SETLP 7 0 24 lt CR gt lt LF gt And back to default lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 177 of 329 1073699 001 SETLP Demonstration his is text with the default SETLP settings his 1s text with the default SETLP settings size 2 for line print size 2 for line print ere is font size for line print text ere is font B size B for line print text ere is font B size for line print text ou can even change MID LINE and then back rue Type font example And back to default Command Notes and I nteractions The AUTOCAL command performs a SETLP 7 0 40 as part of its process CPCL FOR LINK OS PRINTERS Page 178 of 329 1073699 001 7 8 SETLP BUFFER SETLP BUFFER Height lt CR gt lt LF gt Command Name SETLP BUFFER Short Form Aliases None Valid Session Types Utilities sessions only Linked SGD None Negative Aware No SETLP B
31. and then wait for its removal before printing the next label which can be part of a batch or can be a single quantity label The batch is defined by the quantity parameter which is part of the label session definition See page 18 for more information on the label session No other printing operations will occur while the printer is waiting for the label to be taken including line print or prints from other languages On some models the peeler sensor must be physically activated before it can be used and not all models have the peeler accessory See your user manual for more information On printers which do not have the peeler accessory AUTO PACE acts the same as the PACE command See documentation for that command on page 224 AUTO PACE takes an optional parameter that is used to specify a delay between labels The command is always persistent when used If used in a label session it takes effect on the label that will be printed when the session ends and any subsequent sessions Parameters Quick Reference Parameter Description Valid Range Delay 5 Digit Unit Number How long to delay in 0 125 second increments 0 to 65535 Delay An optional parameter which specifies how long to delay from when a label is taken until the next label prints This time is in addition to any sensing time the system needs to poll the peeler sensor which can be significant on some printers or firmware versions The value is in 1 8 of a second incr
32. instead the X Y RX RY XY or RXY commands must be used to specify the location of the barcode Note that only the BARCODE command operates in line print mode VBARCODE does not For Aztec barcodes the X parameter of the X XY RX and RXY commands is not used instead the X value of the command itself is used It may be necessary to use the SET LF command to be able to see the entire height of the barcode See the Introduction to Line Print on page 25 for more information Utilities Example Ul SETLF 160 lt CR gt lt LF gt Ul B AZTEC 0 0 lt CR gt lt LF gt AZTEC BARCODE lt CR gt lt LF gt ENDAZTEC lt CR gt lt LF gt Command Notes and I nteractions The BARCODE TEXT command cannot be used to print data representations under barcode created with this command no text will print The justify commands LEFT RIGHT and CENTER do not have any effect on barcodes created with this command The optional parameters may be specified in any order but this is not recommended The Data parameter if empty causes an empty barcode to be created The reading behavior is poorly defined on many barcode readers in this case and use of it is not recommended CPCL FOR LINK OS PRINTERS Page 50 of 329 1073699 001 6 2 3 Data Matrix Barcode BARCODE DATAMATRIX X Y H Scale S ECC C Columns R Rows F Format G EscapeChar lt CR gt lt LF gt Data lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt VBARCODE DATAMATR
33. lt CR gt lt LF gt This command is used to print barcodes in the CPCL language There are numerous sub types of barcodes in CPCL each having their own specific formats for data See the tables below for more information VBARCODE is identical to BARCODE except it is oriented vertically Parameters Quick Reference Parameter Type Description Valid Range Type Space Terminated String The type of barcode to print See table below Width 5 Digit Unit Number The width of a narrow bar 0 to 65535 units Ratio 5 Digit Number The ratio of wide to narrow bars 0 to 4 20 to 30 Height 5 Digit Unit Number The height of the barcode 0 to 65535 units x 5 Digit Unit Number The X position where the barcode begins 0 to 65535 units Y 5 Digit Unit Number The Y position where the barcode begins 0 to 65535 units Data lt CR gt lt LF gt Terminated The data to be encoded into a barcode Up to 8191 bytes of Alpha String Numeric Data Type This represents the type of barcode that is to be printed Some types of barcodes may take specific amounts of data or may have to include checksum information If the type is not one of the types below no barcode will be printed See the table below for supported types and what data is accepted Type Symbology Ratio Data Specification 128 Code 128 No Subtype A B or C is auto determined based on data provided 128A Code 128A No ASCII characters
34. when used with CPF fonts acts transparently and characters simply pass though unmodified If the font in use is a TTF font however the CP874 characters will be extracted from the true type font based on their UTF 16 code points that is to use Thai with CP874 ensure that UTF 16 characters required for Thai are present in the font in the range of 0E01 to OE5B 8 3 4 Font Encodings Multi byte In addition to the single byte encodings there are also multi byte encodings Multi byte fonts can either use TTF or CPF fonts in CPCL For TTF fonts they all function similar to the way COUNTRY CP874 works the specified encoding will be converted to its UTF 16 code points and then printed This is true for all TTF fonts and countries Each of the following sections discusses how ECPF fonts are used to represent the specified encodings CPCL FOR LINK OS PRINTERS Page 202 of 329 1073699 001 8 3 4 1 CHINA JAPAN and KOREA Encodings These encodings all specify data using GBK encodings When using an ECPF font to represent this encoding the following technique is used to determine which sizes page to draw the character from Different size definitions are used to represent different pages of data in the font When low ASCII characters are encountered they are referenced as a character from page 0 size 0 of the font When a high ASCII character is encountered the high bit is stripped off of the character and that value is saved as the first cha
35. 0 to 95 128B Code 128B No ASCII characters 32 to 127 128C Code 128C No ASCII digits only 128E Code 128 Extended No Any character ASCII 127 or less 39 Code 39 Yes Any character ASCII 127 or less 39C Code 39 with Check Digit Yes Any character ASCII 127 or less 93 Code 93 No Any character ASCII 127 or less CODABAR CodaBar Yes Digits 0 9 and symbols A B C and D are valid as first or last character start and stop characters CODABAR16 CodaBar with Checksum Yes Same as CODABAR but includes Mod16 Checksum EAN13 EAN 13 No 12 ASCII digits checksum will be calculated and added 13 ASCII digits including checksum EAN132 EAN 13 Plus 2 No 12 or 13 followed by a space then 2 digits CPCL FOR LINK OS PRINTERS Page 40 of 329 1073699 001 Type Symbology Ratio Data Specification EAN135 EAN 13 Plus 5 No 12 or 13 followed by a space then 5 digits EAN8 EAN 8 No 6 digits will be prefixed with 0 and checksum added at end 7 digits checksum will be added at end 8 digits EAN82 EAN 8 Plus 2 No 6 7 or 8 ASCII digits followed by space then 2 ASCII digits EAN85 EAN 8 Plus 5 No 6 7 or 8 ASCII followed by space then ASCII 5 digits F39 Code 39 Full Yes Any ASCII character numbering 127 or less F39C Code 39 Full With Check Yes Any ASCII character numbering 127 or less Digit FIM Facing Identification Mark No A or B or C only 1 character I20F5 Interleaved
36. 02 0 Size 2 lt C 0 3 0 Size 3 lt C 0 4 O Size 4 lt C 05 0 Size 5 lt C ENDCONCAT lt CR gt lt L SETMAG 0 0 lt CR gt lt overrides built in sizing lt CR gt lt LF gt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt F gt LF gt T 7 0 20 375 Same line with SETMAG 0 2 overrides only Height lt CR gt lt LF gt SETMAG 0 2 lt CR gt lt ONCAT 20 424 lt C Size 0 lt C Size 1 lt C Size 2 lt C Size 3 lt C Size 4 lt C Size 5 lt C NCAT lt CR gt lt L oe eteneneon N 0 1 2 3 4 5 D OoOoo0coocoPp ENDC SETMAG 0 0 lt CR gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt R gt lt LF gt F gt LF gt T 7 0 20 469 Same line with SETMAG 2 0 overrides only Width lt CR gt lt LF gt SETMAG 2 0 lt CR gt lt CONCAT 20 518 lt C LF gt R gt lt LF gt CPCL FOR LINK OS PRINTERS Page 152 of 329 AG Example with Font 7 Note how size is overridden lt CR gt lt LF gt 1073699 001 0 Size 0 lt CR gt lt LF gt 0 Size 1 lt CR gt lt LF gt 0 Size 2 lt CR gt lt LF gt 0 Size 3 lt CR gt lt LF gt 0 Size 4 lt CR gt lt LF gt 0 Size 5 lt CR gt lt LF gt 0 0 0 0 0 0 0 E NCAT lt CR gt lt LF gt 0 a 2 3 4 5 D NDC SETMAG 0 0 lt CR gt lt LF gt PRINT lt CR gt lt LF gt SETMAG Example with Font 7 Note how
37. 1073699 001 BELL This option specifies that when a card is successfully swiped the printer s bell is to be sounded giving feedback to the user By default if not specified this feature is disabled ERRORS This option specifies that card read errors are to be reported to the host If this option is enabled if a swipe is attempted and has a read error a message will either sent directly to the host if QUERY is disabled or will be retrieved next time MCR QUERY is issued If an error occurs the track data will be replaced with the text Read Error If the Timeout elapses without a read the track data will be replaced with Time out TN and NTN This option is used to control whether or not the information read from the card reader is prepended with the track number By default the TN option is used which enables the addition of the track number data to the replies from the reader The DEL parameter option determines which characters are used with to represent the track number See below for more information If NTN is specified only the raw data from the tracks and the delimiter specified by DEL is transmitted Parameters Quick Reference Parameter Description Valid Range Timeout 5 Digit Number The timeout of the MCR command 0 to 65535 Delimiter Space Terminated String The delimiter for the track number designators Any 2 characters ErrorPrefix Space Terminated String Text placed before an error message
38. 2 10 3 10 4 10 5 NAME VERSION lt ESC gt h Printer Status lt ESC gt i Extended Printer Status lt ESC gt v Get Version Information 11 UTILITY AND DIAGNOSTIC COMMANDS 11 1 11 1 1 Two Key Report Information Two Key Items without equivalent SGDs 11 1 1 1 OS 11 1 1 2 Pres Gap and Bar Sections 11 1 1 3 Voltage 11 1 1 4 Resident Fonts 11 2 11 2 1 11 2 2 11 2 3 11 2 4 11 2 5 Parameter Insert Commands Insert Current Date Insert Current Time Insert SGD Value Insert Custom Result Insert File 11 2 5 1 Difference between USE FORMAT and File Insert 11 2 6 Using More Than One Insert per Line CPCL FOR LINK OS PRINTERS Page 7 of 329 220 221 224 225 227 228 229 230 231 232 233 234 235 236 237 240 241 241 242 243 244 245 246 248 249 249 249 249 250 250 251 251 252 252 253 254 1073699 001 11 3 11 4 11 5 11 6 11 7 11 8 11 9 11 10 11 11 11 12 11 13 11 14 11 15 11 16 11 17 11 18 11 19 11 20 11 21 11 22 11 23 11 24 11 25 11 26 11 27 11 28 11 29 11 30 11 31 11 32 11 33 11 34 11 35 11 36 11 37 ABORT BAUD BEEP CAPTURE CHECKSUM CHAR COUNT DELAYED ACTIONS DISPLAY DUMP DUMP MAGE GET DATE GET TIME GETVAR LT Line Terminator MAX LABEL HE GHT ON FEED ON LOW BATTERY RE RUN SET SET DATE SET TIME SET VERSION SETVAR and DO TIMEOUT WAIT VCHECKSUM X Y XY Label Sessions lt BEL gt Sound Pri
39. 20 20 lt CR gt lt LF gt 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 262 of 329 1073699 001 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lt CR gt lt LF gt 20 20 20 20 20 20 20 4D 65 6E 75 20 20 20 20 20 lt CR gt lt LF gt 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 The t_pos indicates the current position that the WML system is currently processing within the active WML file That is followed by the contents of the display in text Equivilent to the display text SGD and then a hex representation of that same text data Example TEXT syntax U1 DISPLAY TEXT This is a line of text lt CR gt lt LF gt This example displays a short line of text on the display for a moment Command Notes and Interactions This command temporarily sets the display text SGD which cannot be set via SETVAR CPCL FOR LINK OS PRINTERS Page 263 of 329 1073699 001 11 11 DUMP DUMP lt CR gt lt LF gt Command Name DUMP Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No DUMP is an alias for CAPTURE PRINT in Link OS printers See that command on page 258 for more information Example Ul DUMP lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 264 of 329 1073699 001 11 12 DUMP IMAGE DUMP IMAGE BITS LineCount Start lt CR gt lt LF gt DUMP I
40. 200 200 75 1 lt CR gt lt LF gt TEXT 7 0 0 0 The current CCL Key is lt LT gt CCL lt CR gt lt LF gt lt ESC gt R1 lt CR gt lt LF gt PRINT lt CR gt lt LF gt This example is useful for determining what the current CCL key is It uses the current CCL key obtained with the lt ESC gt R1 command see page 293 to start a label session and then in that label session prints out the current key 11 2 5 Insert File This function allows you to replace a parameter with the contents of a file on the printer s file system Normally this command is used as the final or only item on a given command line and is terminated with CR and LF however the special LF termination mode can be used to continue parsing afterwards See section 11 2 5 1 for details and examples This function is quite often used to print PCX or other graphics files which are stored on the printer but the function can be used to simply execute files or otherwise use stored in the printer flash as well CPCL FOR LINK OS PRINTERS Page 252 of 329 1073699 001 See the next section for an important note on the difference between Insert File and the USE FORMAT command If the file does not exist or is protected the text of the insert command is used in place of the file The following protected file types cannot be used for file inserts CPF CSF FNT BAZ NRD PAC TTF TTE BAE PRF WKF Examples DF TEXTLINES
41. 209 AUTO PACE Yes Yes Delays future prints until previous is taken 210 BAR SENSE Yes Yes Enables the media mark or bar sensor 212 CONTRAST Yes Yes Changes print darkness coarsely 213 FEED No Yes Moves paper forward 214 FORM Yes No Advanced paper to the next mark at end of label 215 FORM Utilities Command No Yes Advances paper to the next mark now 215 GAP SENSE Yes _ Yes Enables the gap or notch sensor 216 JOURNAL Yes_ Yes _ Specifies that a label does not end when a mark is found 217 LABEL Yes Yes Specifies that a label ends when a mark is found 218 MULTI Yes Yes Used to set horizontal label quantity 219 NO PACE Yes Yes Disables delaying of printing between labels 220 ON INDEX MARK ERROR Yes Yes Alias for PAPER J AM 225 ON OUT OF PAPER Yes Yes Perform an action when out of paper error occurs 221 PACE Yes Yes Delay printing next label until feed key is pressed 224 PAPER JAM PJ Yes Yes Sets paper jam detection mechanism 225 POSTFEED Yes Yes Sets amount to feed after a label has printed 227 PREFEED Yes_ Yes _ Sets amount to feed before a label is printed 228 PRESENT AT PA Yes Yes Sets amount to feed before and after a label is printed 229 REVERSE Yes No Reverses media before the next label print 230 REVERSE Utilities Command No Yes Reverse media now 231 SETFF Yes Yes Sets mark search and skip distances 232 SET TOF Yes Yes Set top of form offset relative to mark 233 SPEED Yes
42. 329 1073699 001 6 2 2 Aztec Code Barcode BARCODE AZTEC X Data lt CR gt lt LF gt ENDQR lt CR gt lt LF gt VBARCODE AZTEC X Data lt CR gt lt LF gt ENDQR lt CR gt lt LF gt Command Name BARCODE AZTEC VBARCODE AZTEC Short Form Aliases B AZTEC VB AZTEC Valid Session Types Label Sessions Only Linked SGD None Negative Aware No Y XD Width EC ERL F Flags ME Menu M Multi ID ID lt CR gt lt LF gt Y XD Width EC ERC F Flags ME Menu M Multi ID ID lt CR gt lt LF gt The BARCODE AZTEC command is used to print Aztec Code barcodes in the CPCL language VBARCODE AZTEC is identical to BARCODE except it is oriented vertically Note that this command has optional parameters XD EC F ME M and ID In order to use these parameters the optional parameter must be followed by a space then a number which complies with the table below Parameters Quick Reference Parameter Type Description Valid Range x 5 Digit Unit Number The X position where the barcode begins 0 to 65535 units Y 5 Digit Unit Number The Y position where the barcode begins 0 to 65535 units Width 5 Digit Number The dot width of a single element in the code 1 to 36 ERL 5 Digit Number The error recovery level or size See below Flags 5 Digit Number Is the barcode using flag escapes Oorl Menu 5 Digit Number Is the barcode a menu Qorl Multi 5 Digit Number Is the barcode
43. 6 2 7 QR Code Barcode BARCODE OR X Y Config Data lt CR gt lt LF gt ENDQR lt CR gt lt LF gt VBARCODE OR X Config ENDQR lt CR gt lt LF gt M Model U UnitWidth lt CR gt lt LF gt Y M Model U UnitWidth lt CR gt lt LF gt Data lt CR gt lt LF gt Command Name BARCODE QR VBARCODE QR Short Form Aliases B QR VB QR Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The BARCODE QR command is used to print QR Code barcodes in the CPCL language VBARCODE QR is identical to BARCODE except it is oriented vertically Note that this command has optional parameters M U In order to use these parameters the M or U character must be followed by a space then a number which complies with the table below Parameters Quick Reference Parameter Type Description Valid Range X 5 Digit Unit Number The X position where the barcode begins 0 to 65535 units Y 5 Digit Unit Number The Y position where the barcode begins 0 to 65535 units Model 5 Digit Number The ratio of wide to narrow bars lor2 Width 5 Digit Number Unit width of the barcode in dots 0 to 65535 dots Config Raw String Configuration options for barcode See Below Data Raw String Data for barcode See Below X Y The X and Y coordinates in units specifying where the barcode is to be placed M Model Specifies the mo
44. 72 mm media width_sense_in_dots Height 65535 dots 8191 mm Fixed Text Sensors Adj Fixed Text Pres DAC 255 Thr 60 Cur 221 o equivalent Label Removed sensor peeler Media 48 384 dots width_sense ad media width_sense in_dots o equivalent Gap DAC 120 Thr 50 Cur 61 media Bar DAC 255 Thr 70 Cur 9 o equivalent Temperature 34C 78 sensor read_head_temperature_in_celsius sensor read_head_temperature Voltage 8 4V 215 power voltage No Equivalent Resident Fonts o Equivalent to this section Font Sizes Chars 0 0 6 20 FF 1 0 20 80 2 0 1 20 59 4 0 7 20 FF 5 0 3 20 FF 6 0 20 44 7 0 1 20 FF FRE12PT CPF 0 55 SWISS721 CPF 0 W g 0 File Directory file dir with some additional formatting File Size E FF BAT 13 E IMAGE BMP 7262 E INDEXTEST WML 1235 E VERAMONO TTF 49224 E ZEB_LOGO PCX 4135 67044864 Bytes Free Command Language CCL Key 21 ZPL Configuration Information Rewind Print Mode ezpl print_mode Ma kicn 2 646 ee ees Media Type ezpl media_type 10 0 seen eee eres Darkness print tone_zpl 00 6 hee ees Tear Off Adjust ezpl tear_off 2030 ieee eee ee Label Length zpl label_length FOMM ss ee 6s ee Ge Print Width ezpl print_width divided by 8 TENS 0s eed ose Control Prefix zpl command_prefix DEN
45. Aztec Code Minimal Form lt CR gt lt LF gt Default Width 6 lt CR gt lt LF gt Default Error Correction 23 lt CR gt lt LF gt Data lt CR gt lt LF gt AZTEC BARCODE lt CR gt lt LF gt ENDML lt CR gt lt LF gt B AZTEC 25 180 XD 6 EC 65 F 1 lt CR gt lt LF gt lt ESC gt OFNC Barcode Example lt CR gt lt LF gt ENDAZTEC lt CR gt lt LF gt ML 24 T 7 0 270 180 lt CR gt lt LF gt Aztec Code lt CR gt lt LF gt Width 6 Use Flags lt CR gt lt LF gt Error Correction 65 lt CR gt lt LF gt Data lt CR gt lt LF gt FNC1L FNC Barcode Example lt CR gt lt LF gt ENDML lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 47 of 329 1073699 001 B AZTEC 25 350 XD 5 EC 206 lt CR gt lt LF gt Type 218 Barcode Example lt CR gt lt LF gt ENDAZTEC lt CR gt lt LF gt ML 24 T 7 0 270 350 lt CR gt lt LF gt Aztec Code lt CR gt lt LF gt Width 5 lt CR gt lt LF gt Manual Size 206 41x41 lt CR gt lt LF gt Data lt CR gt lt LF gt Type 206 Barcode Example lt CR gt lt LF gt ENDML lt CR gt lt LF gt B AZTEC 25 600 XD 8 EC 300 lt CR gt lt LF gt 129 lt CR gt lt LF gt ENDAZTEC lt CR gt lt LF gt ML 24 T 7 0 270 600 lt CR gt lt LF gt Aztec Code Rune lt CR gt lt LF gt Width 8 lt CR gt lt LF gt Manual Size 300 Simple Rune lt CR gt lt LF gt Data 129 lt CR gt lt LF gt ENDML lt CR gt lt LF gt B AZTEC 25 740 XD 5 EC 102 M 6 lt CR gt lt LF gt AAABBBCCC111222333444 AAABBBCCC111222333444
46. CPF KOREA V32F55 CPF VIETNAM 8 4 CHAR SET and COUNTRY CHAR SET Name lt CR gt lt LF gt COUNTRY Name lt CR gt lt LF gt Command Name CHAR SET COUNTRY Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None This command is used to set the encoding for CPF CSF and TTF fonts in CPCL For more information about the various internal supported options see the previous section Besides the list of internally supported encodings custom encodings from ZPL can also be used in CPCL by using the filename in place of the Name option above These files are referred to by the filename without their extension which must be DAT See the ZPL documentation for more information on custom character mappings Parameters Quick Reference Parameter Type Description Valid Range lt CR gt lt LF gt Terminated Name of the encoding to set the system to String Name A CR LF terminated parameter which specifies the name of the encoding system to switch to The following choices are valid For more information on each of these encoding types see earlier in this section There are tables for each country provided in that section Name Encoding Type CPCL FOR LINK OS PRINTERS Page 205 of 329 1073699 001 BIG5 BIG5 Encoding TTF maps to UTF points multi byte CHINA EUC CN Encoding TTF maps to UTF poi
47. Data lt CR gt lt LF gt ML 24 T 7 0 300 260 lt CR gt lt LF gt GS1 Databar Stacked Omnidirectional lt CR gt lt LF gt Type 4 2 Dot Separator lt CR gt lt LF gt With Composite Scale 2 lt CR gt lt LF gt Data 1234567890123 2D Barcode Data lt CR gt lt LF gt ENDML lt CR gt lt LF gt BARCODE RSS 40 480 2 0 2 4 6 ABCDEF12345678 2D Barcode Data lt CR gt lt LF gt ML 24 T 7 0 300 480 lt CR gt lt LF gt GS1 Databar Expanded lt CR gt lt LF gt Type 6 2 Dot Separator lt CR gt lt LF gt 4 Segments lt CR gt lt LF gt With Composite Scale 2 lt CR gt lt LF gt Data ABCDEFGHIJ1234567890 2D Barcode Data lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 63 of 329 1073699 001 tpn th GS1 Databar Type 1 2 Dot Separator With Composite Scale 2 Data 123456789012312D Barcode Data H Ky GS1 Databar Stacked 1 i Type 3 2 Dot Separator I l With Composite Scale 2 Data 1234567890123 12D Barcode Data n GS1 Databar Stacked Omnidirectional Type 4 2 Dot Separator With Composite Scale 2 Data 123456789012312D Barcode Data GS1 Databar Expanded Type 6 2 Dot Separator 4 Segments With Composite Scale 2 Data ABCDEFGHIJ123456789012D Barcode Data Example BARCODE UPC EAN CC LBL Th JO BA Li p Y al a ORK UR PB SES oa Bae eg aaa EA Ty Wi CP is example shows UPC and EAN barcodes with composite components
48. Forced to R CISDF lt CR gt lt LF gt lt Filename gt lt CR gt lt LF gt lt File Size gt lt CR gt lt LF gt lt Checksum gt lt CR gt lt LF gt lt File Data gt A CISDFCRC16 is very similar to the CISDF session but adds a more robust mechanism for detecting errors during transfer in the form of a CRC A CISDFCRC16 file is stored always stored to flash memory CISDFCRC16 lt CR gt lt LF gt lt CRC16 gt lt CR gt lt LF gt lt Filename gt lt CR gt lt LF gt lt File Size gt lt CR gt lt LF gt lt lt Checksum gt lt CR gt lt LF gt File Data gt A CISDFRCRC16 is very similar to the CISDFCRC16 session except the file is only stored in RAM and is removed when the printer is powered off or rebooted CISDFRCRC16 lt CR gt lt LF gt lt CRC16 gt lt CR gt lt LF gt lt Filename gt lt CR gt lt LF gt lt File Size gt lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 311 of 329 1073699 001 lt Checksum gt lt CR gt lt LF gt lt File Data gt Field Name Description Type Valid Range CRC16 Custom CRC16 of the checksum lt CR gt lt LF gt Terminated 4 Hex Digits or 0000 Filename The Filename which is being defined eases Terminated See below File Size The size of the file in hex lt S EIF Terminated 8 Hex Digits lensen Sum ofall byes mod 65536 eee Terminated 4 Hex Digis oF 0000 File Data The data for the fie _ T String Must be
49. Interactions None CPCL FOR LINK OS PRINTERS Page 326 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 327 of 329 1073699 001 14 Removed and Unsupported Commands The following commands which were present in the older versions of CPCL are not available in CPCL for Link OS CPCL Command IEE Comtec Escape Command ANNOUNCE lt ESC gt lt SO gt ANNOUNCE CODES lt ESC gt lt SI gt BARCODE EGP BEGP lt ESC gt BLIT lt ESC gt L BMP BMP90 BMP180 BMP270 lt ESC gt O BOARDING PASS lt ESC gt T CASE SENSITIVE CS lt ESC gt U COLOR lt ESC gt W COLOR TONE lt ESC gt X CUT lt ESC gt Y CUT AT lt ESC gt Z CUTTER lt ESC gt a E lt ESC gt b EMULATE lt ESC gt c ENCRYPTED_DATA ED lt ESC gt d ENHANCE VBARCODE EVB lt ESC gt k EPL lt ESC gt m ESCAPE Y ADJUST lt ESC gt o FILE TRANSFER lt ESC gt q FLASH FILE DEBUG lt ESC gt r IN CINCHES lt ESC gt t INPUT lt ESC gt z LA LH LINE MODE MCE MOTOR NO CUTTER PAGE MODE PARTIAL CUT PECTAB POST TENSION POWER MODE PRE TENSTION PRINT DENSITY REWIND OFF REWIND ON S CARD SRF ACCESS SRF OFF SRF ON TCP ACCESS T DIRECT T TRANSFER WAIT STATES X PRINT SHIFT ZBI ZBO CPCL FOR LINK OS PRINTERS Page 328 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 329 of 329 1073699 001
50. LF combination This behavior is provided only for backwards compatibility 11 2 1 Insert Current Date This function allows you to replace any parameter with the current date as set by the SET DATE command see page 281 or the printer s internal real time clock CPCL FOR LINK OS PRINTERS Page 250 of 329 1073699 001 Normally this command is used as the final or only item on a given command line and is terminated with CR and LF however the special LF termination mode can be used to continue parsing afterwards See section 11 2 5 1 for details and examples Example 0 200 200 75 1 lt CR gt lt LF gt TEXT 7 0 0 50 The current date is lt LT gt DATE lt CR gt lt LF gt PRINT lt CR gt lt LF gt 11 2 2 Insert Current Time This function allows you to replace any parameter with the current date as set by the SET TIME command see page 282 or the printer s internal real time clock This command may come at the start of a line of text or may have characters before it but it must be the final parameter on a given line to operate correctly The command must also be terminated with a CR and LF Normally this command is used as the final or only item on a given command line and is terminated with CR and LF however the special LF termination mode can be used to continue parsing afterwards See section 11 2 5 1 for details and examples Example 0 200 200 75 1 lt CR gt lt LF gt TEXT 7 0 0 50 The current time is lt L
51. LF gt o U1 RXY 25 10 lt CR gt lt LF gt lt CR gt lt LF gt Here is an example of using the RX 25 command to put spaces between Line print letters Another example with the RXY 25 10 comma nd with an 80 LMARGIN Command Notes and I nteractions Specifying a negative RX value can override a LMARGIN value CPCL FOR LINK OS PRINTERS Page 182 of 329 1073699 001 7 11 lt LF gt Line Feed lt LF gt Command Name lt LF gt Valid Session Types Valid in line print only lt LF gt is a line print character which is used to advance the cursor along the Y axis while not resetting the X axis The height advanced in the Y direction is specified by the SETLF command By default the value is 10 and can be adjusted by the SETLF command see page 175 Example LF Ibl Example of the LF character in line print lt CR gt lt LF gt Text Line Terminated Text Line Terminated Text Line Terminated Text Line Terminated lt CR gt lt LF gt 1 lt LF gt 2 lt L 3 lt L 4 lt L 5 lt L 6 lt LF gt lt CR gt lt LF gt E gt F gt E gt F gt with LF Only lt LF gt with LF Only lt LF gt with LF Only lt LF gt with LF Only lt LF gt Example of the LF character in line print ext Line Terminated with LF OnlYText Line Termi ated with LF OnlYText Line Terminated with LF 0 lYText Line Terminated with LF Only Taz 4 5 6 Command Notes and Interactions The LP LF EQUA
52. LINK OS PRINTERS Page 310 of 329 1073699 001 Even though normally a replaces an entire parameter we can see here text is present before the characters This will work fine because while will terminate a parameter it will not have any effect on data which was processed before the was encountered Finally a blank line is replaced with a complete CPCL command 13 2 3 USE FORMAT Reentrance Once the printer is in a USE FORMAT session any attempt to enter another USE FORMAT session will fail and the session command will be ignored Any data intended for field replacement will be sent through to the CPCL parser in this case 13 3 CISDF CISDFCRC16 and CISDFRCRC16 File Sessions This session is used to transfer Binary or ASCII files to the printer but require more pre processing than DEFINE FORMAT session files CISDF files have a header which is used to inform the printer about the siize name and checksum of the file This data does not get put into the final file CISDF sessions are not terminated they end after the amount of data specified in their header is received by the printer There are three types of CISDF sessions Session Command _CRC16 Filename File Size Checksum Target Drive CISDF Must Not Be Present Required Required Required or 0000 Forced to E CISDFCRC16 Required or 0000 Required Required Required or 0000 Forced to E CISDFRCRC16 Required or 0000 Required Required Required or 0000
53. ON lt CR gt lt LF gt LF is now and CR and LF lt LF gt Test line One lt LF gt Test line Two lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt U1 LP LF EQUALS CRLF OFF lt CR gt lt LF gt LF is now just LF lt LF gt Test line One lt LF gt Test line Two lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 168 of 329 1073699 001 Demonstration of LP LF EQUALS CRLF command LF is now and CR and LF est Line One est Line Two Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 169 of 329 1073699 001 7 4 LP ORIENT LP ORIENT Option lt CR gt lt LF gt Command Name LP ORIENT Short Form Aliases None Valid Session Types Utilities sessions only Linked SGD None Negative Aware No The LP ORIENT command is used to specify if line print operates in standard mode or in rotated mode The implementation of LP ORIENT is such that the data received is only reversed and rotated and as such to create readable text significant modification of the format of the text is required before transmission to the printer to make it readable See the example for an indication on how to send the data There is only one rotation supported which is 270 degrees The only other supported option is 0 which is the power on default The value specified is retained until it is changed or the printer s power is cycled Only line print text is affected by t
54. PRINTERS Page 9 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 10 of 329 1073699 001 1 1 Purpose This document is a non final formatted version of a user manual intended to be the final version of documentation for the CPCL language as implemented in Link OS enabled printers 1 2 Scope The document shall cover an introduction to the language language concepts and documentation for every command in CPCL The documentation also touches on SGD but does not provide an extensive set of documentation for that system only to explain the SGD equivalents of various CPCL commands Documentation in all sections from section 2 to section 14 are intended directly for customer use and contain no information that should not be exposed to customers 1 3 Documentation Format The text in this document is intended to be formatted into a form that can be used directly in a user manual or guide CPCL FOR LINK OS PRINTERS Page 11 of 329 1073699 001 2 Welcome to CPCL Welcome to the CPCL for Link OS enabled printers manual This manual is intended to help you understand how the CPCL formatting language works and also provide a full reference of all the supported commands within the CPCL language This manual is divided into several sections If you are completely new to working with CPCL it is recommended that you proceed through the manual section by section starting with the Introduction to Working With CPCL Introduction to Working W
55. PageOffset gt lt CR gt lt LF gt A END FONT INFO lt CR gt lt LF gt Field Name Description Type Valid Range Description Description of the font file lt CR gt lt LF gt Terminated Up to 30 characters String FontNumber The font number optional lt CR gt lt LF gt Terminated 8 to 63 String SizeCount The number of entries in the sizes table lt CR gt lt LF gt Terminated 1 to 255 String HeightMult The height scaling factor of this size Space Terminated String 0 to 65535 WidthMult The width scaling factor of this size Space or CRLF Terminated 0 to 65535 PageOffset The address location of the bitmaps 4 binary bytes uint32 All values valid DESC Description A CR LF Terminated string of up to 30 characters which describe the font This field is required in the font header If it is absent the font will not be usable This information is never used or displayed by the printer It does not have to be unique NUMBER FontNumber An optional number that can be used to reference the font This number must be in the range of 8 to 63 Values less than 8 are reserved for internal fonts The printer will display font information on the two key report even if a font has an invalid font number The font will not be usable SIZES SizeCount Specifies the number of integer scaled size definitions are defined for the font The valid values for SizeCount are 1 to 255 This paramet
56. Prints ASCII graphics on a label 104 FONT GROUP FG Yes Yes Defines a font group 107 MAGE Yes Yes Sets drawing mode 107 N CENTIMETERS Yes No Specifies that label is represented in centimeters 112 N DOTS Yes No Specifies that label is represented in dots 112 N INCHES Yes No Specifies that label is represented in inches 112 N MILLIMETERS Yes No Specifies that label is represented in millimeters 112 NVERSE LINE IL Yes No Draws an inverted line 114 LEFT Yes No Specifies alignment for text fields 117 LINE L Yes No Draws a line 118 MOVE Yes Yes Moves label origin 120 MULTILINE ML Yes No Prints multiple lines of text with same style 124 PAGE WIDTH PW Yes Yes _ Specify the width of a label 127 PATTERN Yes No Specifies fill pattern 130 PCX Yes No Prints a PCX file on a label 134 PCX180 Yes No Prints a PCX file on a label rotated 180 degrees 134 PCX270 Yes No Prints a PCX file on a label rotated 270 degrees 134 PCX90 Yes No Prints a PCX file on a label rotated 90 degrees 134 PCXMAG Yes No Prints a PCX file magnified 136 PERSIST Yes Yes Determines if label is cleared once session is complete 138 PRINT Yes No Ends a label session and prints it 139 REVERSE LINE RL Yes No Alias for INVERSE LI NE 114 RIGHT Yes No Specifies alignment for text fields 140 ROTATE R Yes Yes Sets rotation for scaled font printing 142 SCALE TEXT ST Yes No Prints test from a scalable font 144 SCALE TO FIT STF Yes No Prints text scal
57. Small Glyphs Large Glyphs Pen Adjusts Non Compressed Glyph Data Compressed Glyph Data Font Encodings Single Byte USA or Dynamic COUNTRY USA United Kingdom COUNTRY UK French COUNTRY FRANCE Italian COUNTRY ITALY Swedish COUNTRY SWEDEN Spanish COUNTRY SPANISH Norwegian COUNTRY NORWAY LATIN 9 Encoding COUNTRY LATINO Code Page 850 Encoding COUNTRY CP850 8 3 3 10 Code Page 874 Encoding COUNTRY CP874 8 3 4 8 3 4 1 8 3 4 2 8 3 4 3 8 3 4 4 8 3 4 5 8 3 4 6 Font Encodings Multi byte CHINA J APAN and KOREA Encodings BIG5 Encoding J APAN S Shift J 1S Encoding THAI Encoding VIETNAM Encoding Encoding Types for Common Fonts CHAR SET and COUNTRY 9 MEDIA MANAGEMENT COMMANDS AUTOCAL AUTO PACE BAR SENSE CONTRAST 9 1 9 2 9 3 9 4 9 5 9 6 9 7 9 8 9 9 9 10 9 11 FEED FORM FORM Utilities Command GAP SENSE J OURNAL LABEL MULTI CPCL FOR LINK OS PRINTERS Page 6 of 329 194 194 194 195 195 196 198 198 198 200 200 200 201 201 201 202 202 202 203 204 204 204 204 205 205 208 209 210 212 213 214 215 215 216 217 218 219 1073699 001 9 12 9 13 9 14 9 15 9 16 9 17 9 18 9 19 9 20 9 21 9 22 9 23 9 24 9 25 9 26 NO PACE ON OUT OF PAPER PACE PAPER AM POSTFEED PREFEED PRESENT AT REVERSE REVERSE Utilities Command SETFF SET TOF SPEED TONE TURN lt FF gt Form Feed 10 STATUS ENQUIRY COMMANDS 10 1 10
58. TEXT is truncated with SCALE TEXT SETSP is not supported for TrueType fonts SETSP is reset at the start of each label to 0 for pre scaled fonts It is not reset for scaled fonts Parameters Quick Reference Parameter p Description Valid Range Spacing 3 digit Unit Number Sets the spacing between characters of a font See Below Spacing Specifies how much space is added between each character in units For pre scaled fonts the valid range is 0 to 255 Values larger than this are interpreted as the modulo of the value specified and 256 For scaled fonts however the valid range is 0 to 999 Use in Utilities Sessions for Line Print The SETSP command may be used in a utilities session to adjust the spacing of line print text The value for SETSP when set in a utilities session is not used within label sessions and vice versa The line print value is independent of commands used in labels sessions and only applies to line print Utilities Example Example of line print text with increased SETSP value lt CR gt lt LF gt Ul SETSP 20 lt CR gt lt LF gt This text has spacing of 20 lt CR gt lt LF gt U1 SETSP 0 lt CR gt lt LF gt Spacing is now normal lt CR gt lt LF gt Examples SETSP Ibl 0 200 200 280 1 lt CR gt lt LF gt T 7 0 20 20 SETSP Example lt CR gt lt LF gt SETSP 0 lt CR gt lt LF gt T 7 0 20 60 SETSP with a value of 0 lt CR gt lt LF gt SETSP 1 lt CR gt lt LF gt T 7 0 20 84 SETSP with
59. TEXT supports the alignment commands CENTER LEFT and RIGHT but only when used with scaled fonts CSF files and not TTF fonts CPCL FOR LINK OS PRINTERS Page 145 of 329 1073699 001 6 29 SCALE TO FIT SCALE TO FIT STF ScaledFontName ScaledFontName VSCALE TO FIT ScaledFontName Width Width Height X Y Width Height X Y Height X Y VSTF ScaledFontName Width Height X Y Data lt CR gt lt LF gt Command Name SCALE TO FIT VSCALE TO FIT Short Form Aliases STF VSTF Valid Session Types Label Sessions Only Linked SGD None Negative Aware No Data lt CR gt lt LF gt Data lt CR gt lt LF gt Data lt CR gt lt LF gt The SCALE TO FIT command is used print scaled text which is to fit within a particular bounding box in CPCL The command is similar in syntax to the SCALE TEXT command but the difference is that the sizing parameters XScale and YScale are now replaced with Width and Height The font s vertical and horizontal size will be selected to fit within the box specified SCALE TO FIT can be used with TrueType or scaled fonts VSCALE TO FIT has the same functionality but orients the text rotated 90 degrees Because SCALE TO FIT can only contain a single line of text the height of the output text is always Height Parameters Quick Reference Parameter Type Description Valid Range ScaledFontName S
60. TTF fonts The table contains a list of font numbers This includes the built in fonts as well as any user loaded fonts The font number is displayed followed by a list of defined sizes Following that a range of the characters that is defined is displayed Note that the list of defined characters is only for the 0 page in the font in the case of an ECPF font CPCL FOR LINK OS PRINTERS Page 249 of 329 1073699 001 After that a list of user installed fonts is provided The list consists of the font number followed by the name in parenthesis Depending on the font file s definition it may not have a number In this case these fonts can only be referred to by name Following the name there is a list of the sizes defined If there is only one size defined a 0 will be displayed otherwise the range will be listed 11 2 Parameter Insert Commands A small number of special utility commands are provided in CPCL which can be used to replace parameters in CPCL commands with designated data These commands can be used at any point and are a special function of the macro replacement language facilitated by the SET command see page 278 In order for any of these commands to work the pre defined macros that are provided at power on must not be erased See the SET command for more information Normally only one insert can be used per command line any subsequent inserts on that line or any other SET commands for that matter will be ignored Ther
61. Ul DIR lt CR gt lt LF gt Example Response Directory CHEESE2 PCX FF BAT FRE12PT CPF IMAGE BMP INDEXTEST WML PLNB_LAT CSF TEST FMT VERAMONO TTF SWISS721 CPF r TEST PCX r 66807808 Bytes Free Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 320 of 329 1073699 001 13 7 END File Session END lt CR gt lt LFE gt Command Name END Short Form Aliases None Valid Session Types Define File Session Only Linked SGD None Negative Aware No The END command when used in a DEFINE FILE or DF session instructs the printer to terminate the session and close the file being defined This command is an alternative to the PRINT command which closes file after writing the PRINT command to the file This command is quite commonly used when defining batch files for the printer as they typically contain only configuration commands and not any material to be printed See page 316 for more information Example DF TEST FMT lt CR gt lt LF gt This is text intended for line print that needs no PRINT lt CR gt lt LF gt At the end of it to operate lt CR gt lt LF gt END lt CR gt lt LF gt This example defines a file called TEST FMT and defines several lines of text and then terminates the file with the END command See page 308 for more information on define file sessions Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 321 of 329 10736
62. Ul SETLP TIMEOUT 24 lt CR gt lt LF gt This line will print after 3 seconds Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 180 of 329 1073699 001 7 10 X Y XY X XValue lt CR gt lt LF gt Y YValue lt CR gt lt LF gt XY XValue YValue lt CR gt lt LF gt Command Name X Y XY Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD None Negative Aware Yes X Y and XY are used in line print mode to specify that an element should be positioned The command can be used at any time to adjust the line print cursor position even in the middle of a string of line print characters This command only impacts line print text and the lt ESC gt g command It has no effect on labels or utilities based line print commands Parameters Quick Reference Parameter Type Description Valid Range XValue 5 Digit Number Specifies the value to use for the X position 32767 to 32767 YValue 5 Digit Number Specifies the value to use for the Y position 32767 to 32767 XValue YValue Specifies the X or Y The value can either be positive or negative The cursor cannot be moved to a negative position in either direction however it can be used to move the cursor back from the edge specified by the LMARGIN command but not back beyond the area specified by the PW command Before printing a character if the line print cursor s X positio
63. Unit Number Media detection threshold for bar media 0 to 255 Threshold Specifies an optional parameter which is used to detect the difference between plain media and a mark used for synchronization Generally there is no need to set this value as the default value of 70 can be used to detect most marks on media The valid range is technically 0 to 255 though in reality only values between 30 and 225 can provide meaningful mark detection When the threshold is set with this command it is not permanently stored and only applies for this power on session however it can be made permanent with the example shown below The threshold parameter is a unit value so use of unit systems besides dots is not recommended Examples Ul BAR SENSE lt CR gt lt LF gt The following example sets the threshold as well and stores the values permanently Ul BAR SENSE 70 lt CR gt lt LF gt Ul SETVAR zpl save lt CR gt lt LF gt Command Notes and I nteractions Controls the same configuration setting as the MN command CPCL FOR LINK OS PRINTERS Page 212 of 329 1073699 001 9 4 CONTRAST CONTRAST Value lt CR gt lt LF gt Command Name CONTRAST Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD print contrast to Value Negative Aware No The CONTAST command is a legacy form of print darkness adjustment which gives a coarse adjustment to the darkness of printed label
64. YScale Offset Data lt CR gt lt LF gt ST ScaledFontName XScale YScale Offset Data lt CR gt lt LF gt VSCALE TEXT ScaledFontName XScale YScale Offset Data lt CR gt lt LF gt VST ScaledFontName XScale YScale Offset Data lt CR gt lt LF gt FG FontGroupNumber Offset Data lt CR gt lt LF gt Coal ENDCONCAT lt CR gt lt LF gt VCONCAT has the identical syntax as above except for the VCONCAT in place of CONCAT Command Name CONCAT VCONCAT Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The CONCAT command is used to concatenate multiple fonts and sizes of text on to a single line and to align their top lines in a specific way The command starts with a CONCAT command followed by one or more sub commands Each sub command adds more text onto the concatenation from left to right The basic syntax of the command is the first line of the CONCAT command followed by up to 40 sub commands in any combination Any fields beyond 40 will parsed and ignored The CONCAT command supports all three font technologies supported in CPCL pre scaled fonts including internal true type fonts and legacy scaled fonts Font groups are also supported When using this command with ST or SCALE TEXT in one of the sub commands the vertical component is determined by the CONCAT command itself using CONCAT or V
65. Yes Set print speed 234 TONE Yes Yes Changes print darkness 235 TURN Yes Yes Sets label out orientation 236 Binary Commands Description lt FF gt Advances paper to the next mark now 291 CPCL FOR LINK OS PRINTERS Page 208 of 329 1073699 001 9 1 AUTOCAL AUTOCAL lt CR gt lt LF gt Command Name AUTOCAL Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD None The AUTOCAL command is used to calibrate the detection thresholds of the printer based on the currently selected media type By default the printer is preset to calibration thresholds of 70 for mark bar media and 50 for gap media These values are selected to be compatible with a wide range of medias however if the media is unusual performance may be improved through this calibration process The current values are viewable on the two key report see page 246 for more information The command uses two labels worth of media to perform the calibration When the AUTOCAL command is used the media in the printer is scanned and the current sensor as selected by either BAR SENSE or GAP SENSE commands threshold is set When the command completes a text message is returned via the same port the command was issued to which looks similar to the message shown below lt CR gt lt LF gt Bar sense set to xx lt CR gt lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt The word Bar
66. a structured append part Oorl ID lt CR gt lt LF gt Or Space The structured append ID field Up to 25 ASCII Characters Terminated String Data lt CR gt lt LF gt Terminated The data to be encoded in the barcode See below String X Y The X and Y coordinates in units specifying where the barcode is to be placed XD Width The dot width of a single element within the barcode There is no limit on the width value but values above 36 are not recommended as they will wrap rendering the barcode unreadable A value of 0 will result in no barcode being printed If not specified a value of 6 is used The use of values 1 and 2 are not recommended as the barcode may be difficult to scan EC ERL This value is used to specify the level of error correction data to encode in the barcode or to specify the exact size of the barcode The following values are valid 0 default Default error correction 1 to 99 Specify minimum error correction in percent 101 to 104 1 to 4 layer compact symbol 201 to 232 1 to 32 layer full range symbol CPCL FOR LINK OS PRINTERS Page 44 of 329 1073699 001 300 Print simple rune only Values of 0 to 99 are used for specifying error recovery data and represent how much recovery information to include in the barcode in percent Values 101 to 104 and 201 to 232 are used to specify exactly what size barcode is printed When using one of the siz
67. be cut off at the bottom due to encountering the synchronization mark Examples Please see the example label for the MOVE command on page 120 The TEMP MOVE command is nearly identical to that command except that it is not persistent CPCL FOR LINK OS PRINTERS Page 156 of 329 1073699 001 Command Notes and I nteractions When used with a PAGE WIDTH less wide than the printer s print head TEMP MOVE will allow the label image to be shifted to the left or right fully intact without wrapping until the label reaches the edge of the physical print head If the TEMP MOVE command horizontally shifts further than the print head can fully image in the negative direction the label will wrap but only across the PAGE WIDTH specified with the print being aligned to the left and the portion shifted off the page being just to the right of the edge of the label In the positive direction if the label extends off the print head no wrapping occurs the label is clipped The TEMP MOVE command with a MoveUp of 1 can be used to eliminate the one dot blank line that appears at the start of all CPCL labels Negative values for MoveUp don t actually increase the size of the label memory in use but instead just execute a PREFEED command in the amount specified before printing the label This is added to any other PREFEED value that already exists CPCL FOR LINK OS PRINTERS Page 157 of 329 1073699 001 6 34 TEXT Horizontal TEX FontNam
68. be specified to define the group though two or more is recommended When a text command using a font group is used the printer will automatically select a font from the font group which allows the text to fit in the area from the X and Y coordinates specified in the text command to the edge of the label area as defined by the PAGE WIDTH command In order to make the text fit the printer can not only select any of the fonts but can change the spacing of the font decreasing the space between characters to attempt to make it fit If even after decreasing the spacing to a minimal amount the text will not fit the text command is aborted and no text is printed all for that text command Font groups are supported in the TEXT and CONCAT commands in CPCL Font groups do work with the MULTILINE command however only one member of the font group is selected for the entire MULTI LINE set based on the font size needed for the widest line of text in the MULTI LINE group Once defined in a label or utilities session a font group remains defined until power is cycled By default at power on no font groups are defined Parameters Quick Reference Parameter Type Description Valid Range 5 Digit Number Specifies the group number to define 0 to 9 Space Terminated String A font name or number to create the representation FontSize 5 Digit Number The size of the font 0 to 65535 Group Specifies the font group number to define The valid ran
69. command See page 139 for more information on these commands In the definition of each command you will see if the command operates label sessions utilities sessions or both With very few exceptions utilities commands act the same whether they are in label or utilities sessions If there are exceptions they will be noted in the individual commands If you use label printing commands within a utilities session they are ignored Note that some utilities commands can move media so keep this in mind when making utilities sessions Sample Utilities Session This small sample utilities session configures the printer with a pair of configuration commands UTILITIES lt CR gt lt LF gt ONTRAST 0 lt CR gt lt LF gt EEP 8 lt CR gt lt LF gt ND lt CR gt lt LF gt Fl e See the CONTRAST command on page 213 and the BEEP command on page 257 for more information 3 5 Single Line Utilities Session A single line utilities session is very similar to a utilities session except it is used to execute exactly one utilities command and does not require the termination command END or PRINT A single line utilities session is terminated by a lt CR gt lt LF gt U1 CPCL Utilities Command with all parameters lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 22 of 329 1073699 001 Sample Single Line Utilities Session Ul CONTRAST O0O lt CR gt lt LF gt Ul BEEP 8 lt CR gt lt LF gt These two
70. commands are each complete single line utilities sessions These two commands have the same function as the full form utilities section shown in the above section 3 6 File Sessions Although they will not be covered in detail here there are three types of file definition sessions in CPCL These sessions are used when you are defining a file or format which will be stored in the printer s flash memory file system These are covered in detail starting in section 13 2 on page 308 These file sessions are initiated via the following commands 3 6 1 Define Format File Session This session is used to define a file with the filename specified and is typically used to define label or utilities format files in ASCII It is not recommended to transfer binary files to the printer instead use the CISDF session mentioned below DEFINE FORMAT Filename lt CR gt lt LF gt DF Filename lt CR gt lt LF gt Field Name Description Valid Range Filename The name of a filename to create on the lt CR gt lt LF gt 38 alpha numeric file system Terminated String characters plus drive letter and period for extension Define Format file sessions are terminated by an END or PRINT command If terminated with the PRINT command a line containing the PRINT command is appended to the end of the file The filename in this session can include a drive letter For more extensive information about DEFINE FORMAT and a discussion o
71. configuration_number Name XXQLJ122500196 device friendly_name Program 05262530 No Equivalent PLD 2 Rev 3 device pld model device pld rev PSPT 3 Rev 27 device fpga version device fpga revision Firmware V68 19 72Z appl name Checksum DA86 No SGD Equivalent see the CHECKSUM command Cable Communications 38400 BPS null 8 1 comm baud comm parity comm data_bits comm stop_bits Handshake rts cts comm handshake DSR 0 comm dsr 0 off 1 on Universal Serial Bus 2 0 Full Speed Device Fixed text Vendor ID No 0x0A5F usb vendor_id Product ID No 0x00BD usb product_id Manufacturer String Zebra Technologies usb manufacturer_string Product String ZTC QLn320 203dpi CPCL usb product_string ID string on usb device_unique_id Bluetooth iOS supported device feature mfi line will be absent if not present Version 4 2 1 bluetooth version Date 09 10 2012 bluetooth date Baud 115200 bluetoth baud Device Printer Fixed text Mode Slave Fixed text CPCL FOR LINK OS PRINTERS Page 246 of 329 1073699 001 Friendly Name XXQLJ122500196 bluetooth friendly_name Minimum Security Mode 1 bluetooth minimum_security_mode Discoverable on bluetooth discoverable Bluetooth Spec 3 0 bluetooth radio_version Enabled on bluetooth enable Address 00 22 58 6
72. double quotation marks Some settings permit the setting of blank strings It is valid to specify a pair of double quotes for an empty parameter Using Double Quotes in Setting Values Sometimes it may be desirable to specify a double quote mark inside the value of a setting Support for this is included To specify a double quote in the string place a backslash before the double quote as in the example shown below This is not specifically a feature of GETVAR but rather of quoted string parameters See page 21 for more information U1 SETVAR device user_pl Quote Neat lt CR gt lt LF gt Ul GETVAR device user_p1 lt CR gt lt LF gt The output from this example is as follows Quote Neat Examples Ul SETVAR comm baud 115200 lt CR gt lt LF gt This example sets the comm baud rate SGD to 115200 U1 DO device reset lt CR gt lt LF gt Ul SETVAR device reset lt CR gt lt LF gt The above two lines are equivalent both will reset the printer via the device reset SGD Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 285 of 329 1073699 001 11 26 TIMEOUT TIMEOUT Value lt CR gt lt LF gt Command Name TIMEOUT Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD power inactivity timeout Negative Aware No TIMEOUT is used to set the amount of time the printer will sit idle before it powers down This f
73. glyphs are encoded with a run length encoding algorithm called Squeeze This algorithm compacts sections of white dots 0 s in the data stream and black dots 1 s in the data stream to represent single lines horizontal lines of the glyph An entire line can also be repeated for further optimization Data from the stream is decoded until the height specified in the header is reached The compressed data itself does not have a fixed length though it is dictated by the other addresses in the file The first byte of each scan line has two functions First if the high bit of the byte is set it indicates that the next byte in the stream is the number of times this row is to be repeated Otherwise the lower 7 bits indicate how many pairs of off then on bits there are in the stream Each pair consists of two bytes the first byte is how many dots to skip then how many black dots to draw Example lt SEQ 820502060305 gt This compressed sequence starts with a 82 indicating that the row will be repeated and that the row consists of 2 pairs The second byte 05 indicates the row will be repeated 5 times Next the 02 indicates that the 2 dots are to be skipped Next 06 indicates that six dots are to be drawn Next 3 dots are to be skipped and then 7 dots are to be drawn This whole line will be repeated 5 times so the final bitmap output by this sequence is as follows The total size of each of the rows is still defined by the header s
74. gt lt LF gt 0 200 200 50 1 lt CR gt lt LF gt T 7 000A single line lt CR gt lt LF gt PRINT lt CR gt lt LF gt his is the first line ow there s a second The important point in this example is that replacements can affect not just parameters but can affect commands themselves Here is another example U1 SET DEFTEXT TEXT 7 0 0 0 200 200 50 1 lt CR gt lt LF gt DEFTEXT 0 Some default text lt CR gt lt LF gt DEFTEXT 25 Some default text at 25 lt CR gt lt LF gt PRINT lt CR gt lt LF gt Some default text Some default text at 25 In this example we define a new CPCL command DEFTEXT which simply fills in some parameters of the TEXT command that we don t expect to change and leaves the one we do change alone Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 280 of 329 1073699 001 11 22 SET DATE SET DATE Date lt CR gt lt LF gt Command Name SET DATE Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD rtc date Negative Aware No SET DATE sets the current date on the printer s real time clock While all printers have a real time clock not all of them are battery backed up to preserve the time when the printer is powered off See your printer s documentation for more information The date is formatted in the form mm dd yyyy The date can be read via the rtc date SGD or via the GET DATE CPCL command
75. gt lt LF gt This example configures the alarm for a 3 second beep and a message to be displayed Neither of the activities will occur until the battery is low Ul ON LOW BATTERY NONE lt CR gt lt LF gt This example restores the default behavior Command Notes and Interactions None 11 20 RE RUN RE RUN lt CR gt lt LF gt Command Name RE RUN Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No RE RUN is a special purpose command that can only be used within formats which are stored on the printer The command instructs the printer to run the format file again once it has completed execution Placing RE RUN in a normal label format will have no effect It only operates when activated in one of the following ways e One of the automatically executing files on the printer which are CONFIG SYS AUTOEXEC BAT RUN BAT e The file specified by the ON OUT OF PAPER RUN command e Any USE FORMAT session see page 308 for information on this session type CPCL FOR LINK OS PRINTERS Page 277 of 329 1073699 001 It does not apply to FF BAT SEL BAT FTN BAT or FF3 BAT For more information on built in batch files see page 316 RE RUN is of particular usefulness when using field replacement mode inside a USE FORMAT session If the format you are using contains any field replacements as specified with in place of a field and RE RUN is included t
76. gt lt LF gt BOX 0 30 46 205 O0 lt CR gt lt LF gt BOX 48 30 94 205 O lt CR gt lt LF gt BOX 96 30 142 205 O lt CR gt lt LF gt BOX 144 30 190 205 O lt CR gt lt L BOX 192 30 238 205 O lt CR gt lt L BOX 240 30 286 205 O lt CR gt lt L BOX 288 30 334 205 O lt CR gt lt L BOX 336 30 382 205 O lt CR gt lt LE BOX 384 30 430 205 O lt CR gt lt L BOX 432 30 478 205 O lt CR gt lt L BOX 480 30 526 205 O lt CR gt lt L BOX 528 30 574 205 0 lt CR gt lt L LINE 0 150 576 150 O0 lt CR gt lt LE ML 48 T270 7 1 576 160 lt CR gt lt LF gt 100 lt CR gt lt LF gt 97 lt CR gt lt LE 94 lt CR gt lt L 87 lt CR gt lt L 75 lt CR gt lt L 62 lt CR gt lt L 50 lt CR gt lt L 37 lt CR gt lt L 25 lt CR gt lt L 12 lt CR gt lt L 6 lt CR gt lt LF gt 3 lt CR gt lt LF gt ENDML lt CR gt lt LF gt PATTERN 101 lt CR gt lt LF gt BOX 0 220 94 340 48 lt CR gt lt LF gt PATTERN 102 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 132 of 329 1073699 001 PATTERN 6 lt CR gt lt LF gt BOX 48 30 94 150 24 lt CR gt lt LF gt PATTERN 12 lt CR gt lt LF gt BOX 96 30 142 150 24 lt CR gt lt LF gt PATTERN 25 lt CR gt lt LF gt BOX 144 30 190 150 24 lt CR gt lt LF gt PATTERN 37 lt CR gt lt LF gt BOX 192 30 238 150 24 lt CR gt lt LF gt PATTERN 50 lt CR gt lt LF gt BOX 240 30 286 150 24 lt CR gt lt LF gt PATTERN 62 lt CR gt lt LF gt BOX 288 30 334 150 24 lt CR gt lt LF gt PATTERN 75 lt CR gt lt LF gt BOX 336 30 382 150 2
77. impact is when line spacing is set small enough that characters overlap each other PATTERN commands are ignored when using LINE in IMAGE XOR mode CPCL FOR LINK OS PRINTERS Page 111 of 329 1073699 001 6 14 IN CENTIMETERS IN DOTS IN INCHES IN MILLIMETERS IN CENTIMETERS lt CR gt lt LE gt IN DOTS lt CR gt lt LF gt IN INCHES lt CR gt lt LF gt IN MILLIMETERS lt CR gt lt LF gt Command Name IN CENTIMETERS IN DOTS IN INCHES IN MILLIMETERS Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware N A The various IN commands change the system of measurement for all parameters in CPCL which are identified as unit numbers to centimeters At the beginning of each new label the system is reset to dots the equivalent of the IN DOTS command If any of these commands are the very first one in a label session the session definition s height parameter is re evaluated in the new system of measurement Otherwise the command only affects subsequent fields in the label session You can change the system of measurement as many times as necessary per label The printer operates natively in dots When any other system is selected the values are converted to dots using the following conversion factors Requested Unit CPCL Command Conversion Factor to Dots Dots Default IN DOTS lt CR gt lt LF gt 1 Centimeters IN CENTIMETERS l
78. in dots 112 N INCHES Label Formatting Yes Yes Line Print Specifies that label is represented in inches 112 N MILLIMETERS Label Formatting Yes Yes Line Print Specifies that label is represented in millimeters 112 NVERSE LINE Label Formatting Yes No Draws an inverted line 114 JOURNAL Media Management__ Yes Yes Specifies that a label does not end when a mark is found 217 L Label Formatting Yes No Alias of LINE 118 LABEL Media Management __ Yes Yes Specifies that a label ends when a mark is found 218 LEFT Label Formatting Yes Yes Line Print Specifies alignment for text fields 117 LINE Label Formatting Yes No Draws a line 105 LMARGIN Line Print No Yes Line Print Sets left margin for line print text 164 LP LF EQUALS CRLF Line Print No Yes Line Print Sets LF to mean lt CR gt lt LF gt in line print mode 168 LP ORIENT Line Print No Yes Line Print Sets the orientation of line print text 170 LT Utility amp Diagnostic Yes Yes Specifies the end of line terminator for label and utilities sessions 272 MAX LABEL HEIGHT Utility amp Diagnostic No Yes Returns maximum supported label height 274 MCR Card Reader No Yes Configures the magnetic card reader 299 MCR CAN Card Reader No Yes Cancels any pending magnetic card reader requests 303 MCR QUERY Card Reader No Yes Retrieves card reader data when in query mode 304 ML Label Formatting Yes No Alias for MULTILINE 124 MOVE Label Formatting Yes Yes Moves label origin 120 MULTI Media Management Yes Y
79. is referred to as a composite barcode The 2D portion is optional but the 1D portion is required If the parameters of the barcode are incorrect in place of the barcode a text message indicating the problem encountered while trying to form the barcode will be printed CPCL FOR LINK OS PRINTERS Page 58 of 329 1073699 001 Parameters Quick Reference Parameter Type Description Valid Range x 5 Digit Unit Number The X position where the barcode begins 0 to 65535 Y 5 Digit Unit Number The Y position where the barcode begins 0 to 65535 Scale 5 Digit Unit Number The X and Y scaling factor of the barcode 0 to 65535 LHeight 5 Digit Unit Number Height of the linear part of the barcode 0 to 65535 SHeight 5 Digit Unit Number Height of the separator between barcode parts 0 to 65535 Segs 5 Digit Unit Number The maximum number of segments per row 0 to 65535 Type 5 Digit Number The type of RSS barcode to print 1 to 12 Data lt CR gt lt LF gt Terminated 1D and 2D Data to Print 8191 alphanumeric characters String X Y The X and Y coordinates in units specifying where the barcode is to be placed Note that the X position at which the barcode begins may not be the exact value you specify Some barcode types are spaced for their composite component even if you do not specify the existence of one The offset is generally small on the order of 5 dots multiplied by Scale Scale The scale of the barco
80. it appears in an example lt SEQ 5468697320697320616E206578616D706C65206F662062696E61727920646174612E gt This represents This is an example of binary data This example is provided for ease of understanding but typically this representation will only be used for data that is otherwise contains unreadable characters notably binary image data CPCL FOR LINK OS PRINTERS Page 15 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 16 of 329 1073699 001 3 Introduction to CPCL CPCL short for Comtec Printer Control Language is the name of a printer control language that was used in printers originally made by Comtec Information Systems which Zebra Technologies acquired in 2000 The language consists of two parts a label formatting language and an unformatted test printing system called line print mode Although the ZPL Zebra Printer Language is the preferred language for new development support for CPCL is still included in select Link OS enabled ZPL printers for compatibility with existing applications It is important to understand that CPCL is maintained only for backwards compatibility and new features added to ZPL are generally not made available in CPCL Commands in the CPCL formatting language are almost entirely represented in human readable ASCII There are two modes of operation in the CPCL language depending on the operation you intended to perform All operations in CPCL begin with the exclamation mark character
81. it determines the exact size of the File Data parameter The hexadecimal digits may be in upper or lower case For all three session types there must be sufficient space on the designated drive in order for the file to be processed The printer will compare the file size to the free space on the drive If there is insufficient space the text Not enough flash to store Filename lt CR gt will be printed and the contents of the file will be disposed of Checksum Specifies four hex digits which represent a simple checksum of the contents of the File Data parameter All four hex digits must be provided The digits may be in upper or lower case See the section below for information on how to calculate the simple checksum The digits 0000 can be used to disable the check the printer does for the checksum on the file If the value for checksum is non zero and the checksum does not match the data received the file is not placed on the disk and no feedback is given The header is not included in the checksum only the File Data parameter is used in its calculation CPCL FOR LINK OS PRINTERS Page 312 of 329 1073699 001 File Data Specifies the information to place into the file Any data including NUL characters may be contained within the File Data but it must be the exact size specified by File Size There is no terminator on the File Data parameter because the size is already known Any data exceeding File Size is fed into the p
82. ki eT a es me I VVVVVVVVV VV VV VV VV VV VV VV VV VV 7 ESC g Line Print SET commands do not take effect in the Data field of this command CPCL FOR LINK OS PRINTERS Page 186 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 187 of 329 1073699 001 8 Font Commands Commands covered in this section are as follows CPCL Command L U Description Page CHAR SET Yes No Alias for COUNTRY 205 COUNTRY Yes Yes Changes code page 205 CPCL FOR LINK OS PRINTERS Page 188 of 329 1073699 001 8 1 Introduction to CPCL Font Types In CPCL for Link OS there are three types of fonts supported These types are CPF fonts CSF fonts and TTF or TrueType fonts In the legacy versions of CPCL AGFA Intellifont type fonts could also be used in the printer This feature is no longer available in the Link OS implementation of CPCL Each font type and their capabilities will be reviewed in this section and then detailed information will be provided on the makeup and formats of CPF fonts 8 1 1 CPF Comtec Pre scaled Fonts CPF or Cometc Pre Scaled fonts are the original and primary type of font in CPCL These fonts are bitmap fonts and while they can be scaled only by whole numbers twice as tall three times as wide for example they do not scale as cleanly as the other font types and may look pixelated when scaled The fonts which are built into CPCL are CPF fonts See page 190 for m
83. lt CR gt lt LF gt 80x210 dot output box lt CR gt lt LF gt Thickness 46 45 dots thick lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt Box from 30 30 to 149 150 120x120 dot output box Thickness 1 2 dots thick Box from 30 180 to 259 240 230x60 dot output box Thickness 19 18 dots thick Box from 30 270 to 109 480 8 x210 dot output box Thickness 46 45 dots thick Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 90 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 91 of 329 1073699 001 6 6 CENTER CENTER Range lt CR gt lt LF gt Command Name CENTER Short Form Aliases None Valid Session Types Label or Utilities Sessions Linked SGD None Negative Aware No The CENTER command is used to change the justification of supported fields It is part of a series of justification commands which includes LEFT CENTER and RIGHT The following commands support justification BARCODE all 1D types BARCODE MAXICODE BOX CONCAT INVERSE LINE REVERSE LINE LINE PCX PCX90 PCX180 PCX270 PCXMAG SCALE TEXT SCALE TO FIT TEXT TEXT90 TEXT180 TEXT270 COMPRESSED GRAPHICS EXPANDED GRAPHICS This command takes an optional parameter range which specifies the number of pixels from the left edge of the page to use when centering CENTER is persistent within the label format but the field alignment is always set t
84. more information on the MCR CAN command Example U1 MCR O T1 T3 QUERY MULTIPLE lt CR gt lt LF gt Ul MCR CAN lt CR gt lt LF gt This example issues an MCR command with no timeout and multiple reads and them immediately cancels it with MCR CAN Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 303 of 329 1073699 001 12 3 MCR QUERY MCR QUERY lt CR gt lt LF gt Command Name MCR QUERY Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD mcr quer Negative Aware No MCR QUERY is used to obtain the result of a magnetic card reader swipe when the MCR configuration command contains the QUERY option By default the MCR command will return scanned card data directly to the host as soon as the card is scanned If this behavior is not desirable the QUERY option can be added to the MCR command to indicate that the MCR QUERY command is used to obtain the data on the card once it is scanned rather than sending it as soon as it is available The MCR QUERY command will only return card data one time As soon as it returns the card data the card data is cleared from the printer s memory so issuing the command more than one time per card read will not work If you issue the MCR QUERY command and there is no read data present no data will be returned by the printer In the case that the MULTIPLE option was specified in the MCR command along with QUERY i
85. must follow the format outlined in the table above or no barcode will be printed Some barcode Code 128 in particular types allow the encoding of the NUL LF and CR characters Because nulls are stripped out of the Data parameter when it is read and LF and CR characters are used to terminate the parameter if you wish to encode these characters the following special values can be sent in place of these characters to encode them Note that these are not ASCII numbers but rather a single binary ASCII character In addition there are a number of special characters that are related to the barcode specification which can be encoded To represent this character Send ASCII Code Code 128A Code128B Code 128 C FNC3 FNC 3 N A 128 FNC2 FNC 2 N A 129 Shift to B Shift to A N A 130 Code C Code C N A 131 Code B FNC4 Code B 132 FNC4 Code A Code A 133 FNC1 FNC1 FNC1 134 NUL ASCII 0 135 LF ASCII 10 136 CR ASCII 13 137 Examples BARCODE 1D LBL D ll Code 128 0 200 200 1000 1 lt CR gt lt LF gt VURGUN OUOU VINOU TL UY OI VA Code 39 12345 JOURNAL lt CR gt lt LF gt BT 7 0 2 lt CR gt lt LF gt E RV Code 93 12345 BARCODE 128 1 2 20 25 0 12345 lt CR gt lt LF gt T 7 0 300 0 Code 128 lt CR gt lt LF gt BARCODE 39 1 2 20 25 50 12345 lt CR gt lt LF gt n SUNN MUL A A CodaBar T 7 0 300 50 Code 39 lt CR gt lt LF gt A12345B BARCODE 93 1 2 20 25 100 12345 lt CR gt lt LF gt WIV AMT AVE ALUN
86. not horizontally CPCL FOR LINK OS PRINTERS Page 119 of 329 1073699 001 6 18 MOVE MOVE MoveRight MoveUp lt CR gt lt LF gt Command Name Move Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware Yes The MOVE command moves the origin of a label The effect is most pronounced when using a media that synchronizes to marks It does affect continuous mode labels but the effects may be difficult to see particularly with the MoveUp parameter The values specified by MOVE are added to those specified by TEMP MOVE to determine the final position Note that TEMP MOVE and MOVE are both negative aware This means that if a MOVE 20 20 was in effect and a TEMP MOVE 20 20 was also in effect the net location used would be 0 0 The MOVE command is available in both label and utilities sessions and is persistent between labels but is reset when the printer is power cycled Parameters Quick Reference Parameter Type Description Valid Range MoveRight 5 Digit Unit Number How far to move the label to the right 0 to 65535 MoveUp 5 Digit Unit Number How far to move the label up 0 to 65535 MoveRight Specifies how far to move the label to the right in units Positive values move the label image right negative values move the label left If the MOVE command places label data beyond the right side of the print head the label data will be di
87. of 0 is used which means no pre feed operation Example No example is provided for REVERSE in label sessions Command Notes and I nteractions The value specified for REVERSE is subtracted from the value specified for PREFEED to determine the final motion amount See the PREFEED command on page 228 for more information CPCL FOR LINK OS PRINTERS Page 230 of 329 1073699 001 9 20 REVERSE Utilities Command REVERSE Amount lt CR gt lt LF gt Command Name REVERSE Short Form Aliases None Valid Session Types Utilities Session Only Linked SGD None Negative Aware No The REVERSE command when used in a utilities session causes an immediate reverse feed operation Its function is identical to that of FEED when used with a negative value although reverse only supports positive values Note that there is no mechanism that prevents you from reversing an excessively large value causing the printer to lose control of the media The REVERSE operation will ignore all gap or marks on the paper but will terminate if the printer detects an out of media or other error condition Parameters Quick Reference Parameter Description Valid Range Amount 5 Digit Unit Number How much to feed in units 0 to 4000 dots Amount Specifies the amount to reverse in units After the conversion from the current unit to dots the resulting amount must be between 0 and 4000 If it is not no feed operation occ
88. printed and printers without displays will print a small graphic indicating that the two key is about to print Note that when the two key report is printed at startup the three startup configuration files CONFIG SYS AUTOEXEC BAT and RUN BAT are not executed for that power cycle Custom WML pages are also not loaded See page 316 for more information In addition there are two CPCL commands that can be used to either print or return the contents of the two key report They are the lt ESC gt I command which returns the text contents of the report to the host see page 294 and lt ESC gt V command which effects printout of the two key report as if it was requested at startup see page 296 Most items listed on the two key report have equivalent SGD settings The following table shows each line of the lt ESC gt I version of a 2 key report accompanied with the associated SGD which provided that information For SGDs for which there is no equivalent following the table a list explaining what each item represents is provided For documentation on those SGDs see the SGD documentation manual Not all printers may have all sections depending on their configuration details This simulated report artificially shows all fields Zebra Technologies device company_name QLn320 device product_name Serial Number XXQLJ122500196 device serial_number PCC QN3 AUNAOE00 00 device
89. rule below applies When count expands a field s digits it is expanded to the adjust size minus one If the number of digits in the field is greater than or equal to of digits in Adjust the field data will not be expanded and all leading digits will be preserved and utilized For example if you have as a text field twenty 0 characters and use an Adjust of 1 all twenty of the 0 s will become 9s In this case if field data overflows that is becomes greater than the number of digits defined in the field or becomes less than 0 the overflowed number or the fact that the value is now negative is discarded The size of the field data is never reduced by the COUNT command only expanded in the one case that it is shorter in number of digits than Adjust Examples COUNT LBL This example prints a total of five individual labels 0 200 200 300 5 lt CR gt lt LF gt TEXT 7 0 25 0 Text field followed by a COUNT of 1 lt CR gt lt LF gt TEXT 7 0 25 26 Label Number 1 lt CR gt lt LF gt COUNT 1 lt CR gt lt LF gt BI 7 0 10 lt CR gt lt LF gt TEXT 7 0 25 54 Barcode field followed by a COUNT of 2480 lt CR gt lt LF gt BARCODE 128 1 2 20 20 85 2457 lt CR gt lt LF gt COUNT 2480 lt CR gt lt LF gt TEXT 7 0 25 160 Barcode field followed by a COUNT of 2480 lt CR gt lt LF gt BARCODE 128 1 2 20 20 186 2457 lt CR gt lt LF gt COUNT 2480 lt CR gt lt LF gt PRINT lt CR gt lt LF gt Text field followed by a
90. speed is 3 Note that print speed in CPCL is not in units but rather is a scale from 0 to 5 Higher values indicate faster printing and lower values indicate slower printing In addition print speed is not absolute in CPCL The printer may print slower than the value selected based on factors such as print head temperature or battery levels This command sets the SGD media speed but does not set it to the number specified by Value instead the number specified is converted to inches per second which is what media speed is represented in and set The actual value media speed is set to varies from printer model to printer model based on the capabilities of the printer Using the SPEED command causes the speed to be set permanently persisting not only though label and utilities sessions but through reboots as well Parameters Quick Reference Parameter Type Description Valid Range 1 Digit Number Maximum speed to print in an arbitrary scale 0 to 5 Value Specifies the maximum speed the printer is to print as described above The valid range is 0 to 5 and the default value is 3 Values outside this range will result in no change to the print speed or media speed setting Example Ul SPEED 5 lt CR gt lt LF gt Command Notes and I nteractions The setting of this command interacts with the ZPL control language via the first parameter of PR CPCL FOR LINK OS PRINTERS Page 234 of 329 1073699 001 9 24 TONE TONE Value l
91. stream CPCL FOR LINK OS PRINTERS Page 46 of 329 1073699 001 Flag Mode When Flag set to 1 lt ESC gt n is is used to encode FLG characters into the data stream and lt ESC gt lt ESC gt is used to encode the escape character If set to 0 no such conversion is made and encoding FLG characters is not possible The nina flag command is an ASCII character 0 to 7 The value of 0 serves a de facto special purpose as FNC1 and is used to specify GS 1 style data similar to a GS1 128 barcode Values 1 6 followed by 1 6 digits respectively specify the ECI Extended Chanel Interpretations identifier the data is encoded with A value of 7 is reserved for future use and serves no function Rune Mode When EAL is 300 a special Aztec rune is drawn which encodes just one character The Data field should be an ASCII number from 0 255 representing the rune to encode Termination of Data The data string in either mode manual or automatic is terminated with the following sequence No part of this data is encoded in the data that is put into the barcode lt CR gt lt LF gt ENDAZTEC lt CR gt lt LF gt This termination structure must appear at the end of the barcode or the barcode is not terminated Examples BARCODE AZTEC LBL 0 200 200 1000 1 lt CR gt lt LF gt B AZTEC 25 25 lt CR gt lt LF gt AZTEC BARCODE lt CR gt lt LF gt ENDAZTEC lt CR gt lt LF gt ML 24 T 7 0 270 25 lt CR gt lt LF gt
92. than CISDF files Also any macros activated by the SET command or any insert commands are disabled within DEFINE FORMAT sessions their unmodified text will pass directly into the file being defined Examples DEFINE FORMAT PRINTLABEL FMT lt CR gt lt LF gt 0 200 200 200 1 lt CR gt lt LF gt TEXT 7 0 0 0 Message Here is a test label lt CR gt lt LF gt BT 7 0 2 lt CR gt lt LF gt BARCODE 128 1 2 75 25 40 TestData lt CR gt lt LF gt BT OFF lt CR gt lt LF gt PRINT lt CR gt lt LF gt USE FORMAT PRINTLABEL FMT lt CR gt lt LF gt U1 DELETE PRINTLABEL FMT lt CR gt lt LF gt This example defines a label PRINTLABEL FMT which contains a simple label which prints a text line and a barcode The format is then DF FF BAT lt CR gt lt LF gt 0 200 200 50 1 lt CR gt lt LF gt TEXT 7 0 0 0 You pressed the feed key lt CR gt lt LF gt FORM lt CR gt lt LF gt PRINT lt CR gt lt LF gt This example defines the FF BAT file which is automatically run by the printer when the feed key is pressed To try it out press the feed key on the printer This is another common use case for the DEFINE FORMAT command To delete this file and restore normal feed key operation issue the following command Ul DELETE FF BAT lt CR gt lt LF gt 13 2 2 Defining Fields in DEFINE FORMAT Sessions for use with USE FORMAT CPCL FOR LINK OS PRINTERS Page 309 of 329 1073699 001 If the intention of the file format used with DEFINE
93. the TEXT command Parameters Quick Reference Parameter Type Description Valid Range Pre scaled Font Syntax FontNameOrNumber Space Terminated String A font name or number to create the representation See Below FontSize 5 Digit Number The size of the font 0 to 65535 x 5 Digit Unit Number The X origin of the text in units 0 to 65535 Y 5 Digit Unit Number The Y origin of the text in units 0 to 65535 Data CR LF Terminated String The text data to be printed Up to 8191 characters Alternate Syntax TTF Font Syntax TrueTypeFontName Space Terminated String The filename of the TTF font with extension See Below XScale 5 Digit Number The X size of the font in dots 10 to 1450 YScale 5 Digit Number The Y size of the font in dots 10 to 1450 x 5 Digit Unit Number The X origin of the text in units 0 to 65535 Y 5 Digit Unit Number The Y origin of the text in units 0 to 65535 Data CR LF Terminated String The text data to be printed Up to 8191 characters Alternate Syntax Font Group FontGroupNumber Space Terminated String The number of the font group to use 0 to 10 x 5 Digit Unit Number The X origin of the text in units 0 to 65535 Y 5 Digit Unit Number The Y origin of the text in units 0 to 65535 Data CR LF Terminated String The text data to be printed Up to 8191 characters X Y The X and Y coordinates in units specifying where the text string is to be placed FontName
94. the barcode to be out of specification and not readable CPCL FOR LINK OS PRINTERS Page 72 of 329 1073699 001 6 2 6 PDF417 BARCODE PDF 417 X Y XD XDot YD YDot C Columns R Rows S ECC B BinaryMode lt CR gt lt LF gt Data lt CR gt lt LF gt ENDPDF lt CR gt lt LF gt VBARCODE PDF 417 X Y XD xXDot YD YDot C Columns R Rows S ECC B BinaryMode lt CR gt lt LF gt Data lt CR gt lt LF gt ENDPDF lt CR gt lt LF gt Command Name BARCODE PDF 417 VBARCODE PDF 417 Short Form Aliases B PDF 417 VB PDF 417 Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The BARCODE PDF 417 command is used to print PDF417 barcodes in the CPCL language The command has a number of optional parameters any number of which may be specified If a parameter is specified more than once the last value specified is used If a PDF 417 barcode s parameter s cause an error that would cause it not to print a detailed error message will be displayed instead There is no option to use structured append PDF 417 barcodes in CPCL Parameters Quick Reference Parameter Type Description Valid Range x 5 Digit Unit Number The X position where the barcode begins 0 to 65535 units Y 5 Digit Unit Number The Y position where the barcode begins 0 to 65535 units XDot 5 Digit Number The X size of a single element in dots 0 to 65535 YDot 5 Digit Numbe
95. the print being aligned to the left and the portion shifted off the page being just to the right of the edge of the label In the positive direction if the label extends off the print head no wrapping occurs the label is clipped The MOVE command with a MoveUp of 1 can be used to eliminate the one dot blank line that appears at the start of all CPCL labels Negative values for MoveUp don t actually increase the size of the label memory in use but instead just execute a PREFEED command in the amount specified before printing the label This is added to any other PREFEED value that already exists CPCL FOR LINK OS PRINTERS Page 123 of 329 1073699 001 6 19 MULTILINE MULTILINE LineHeight TextCommand lt CR gt lt LF gt Data lt CR gt lt LF gt ENDMULTILINE lt CR gt lt LF gt Command Name MULTILINE Short Form Aliases ML Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The MULTILINE command is used to print a number of lines of text using the same font without having to manually specify the spacing or positioning of each line The basic format of the command is the MULTILINE command followed by LineHe ght and then a fully formed text command without its final parameter which would specify the data to print followed by a CR and LF After that as many Data lines as necessary can be specified without limit Each field will be printed as if it was a
96. the printer receives an LF character in line print mode in units Any value specified is added to the value specified by SETLP Example SETLF Ibl SETLF Demonstration lt CR gt lt LF gt UL SETLF 20 lt CR gt lt LF gt lt CR gt lt LF gt These lines are at a SETLF of 20 lt CR gt lt LF gt These lines are at a SETLF of 20 lt CR gt lt LF gt These lines are at a SETLF of 20 lt CR gt lt LF gt U1 SETLF 0 lt CR gt lt LF gt lt CR gt lt LF gt These lines are at a SETLF of 0 lt CR gt lt LF gt These lines are at a SETLF of 0 lt CR gt lt LF gt These lines are at a SETLF of 0 lt CR gt lt LF gt Ul SETLF 10 lt CR gt lt LF gt lt CR gt lt LF gt These lines are at the default SETLF of 10 lt CR gt lt LF gt These lines are at the default SETLF of 10 lt CR gt lt LF gt These lines are at the default SETLF of 10 lt CR gt lt LF gt Command Notes and Interactions The AUTOCAL command performs a SETLF 0 as part of its process CPCL FOR LINK OS PRINTERS Page 175 of 329 1073699 001 7 7 SETLP SETLP FontNameOrNumber FontSize LineSpacing lt CR gt lt LF gt SETLP TrueTypeFontName XScale YScale LineSpacing lt CR gt lt LF gt Command Name SETLF Short Form Aliases None Valid Session Types Utilities sessions only Linked SGD None Negative Aware No SETLP is used to set the name or number and size of the font which is to be used
97. thickens to the right Two Inverse Line Commands Over Text 30 240 to 200 240 at 25 Width 30 280 to 30 450 at 25 Width Note how first thickens downward and second thickens to the right If you have a line that has the same X and EndX with justification commands CENTER LEFT and RIGHT the justification is applied vertically not horizontally CPCL FOR LINK OS PRINTERS Page 116 of 329 1073699 001 6 16 LEFT LEFT Range lt CR gt lt LF gt Command Name LEFT Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The LEFT command is used to change the justification of supported fields It is part of a series of justification commands which includes LEFT CENTER and RIGHT LEFT is the default justification for labels Each time a new label session is started it is set to LEFT alignment specifically LEFT 0 Once used LEFT is persistent within the label session The following commands support justification BARCODE all 1D types BARCODE MAXICODE BOX CONCAT INVERSE LINE REVERSE LINE LINE PCX PCX90 PCX180 PCX270 PCXMAG SCALE TEXT SCALE TO FIT TEXT TEXT90 TEXT180 TEXT270 COMPRESSED GRAPHICS EXPANDED GRAPHICS Parameters Quick Reference Parameter Description Valid Range Range 5 Digit Unit Number Sets FONT GROUP field width 0 to 65535 Range While all justify commands use the same syntax LEFT RIGHT and CENTE
98. time the feed operation stops If no such mark is found the feed operation ends without error This also applies if the feed key is pressed or a form feed character is sent in line print If continuous media is in use the printer still searches for the mark or gap for this amount so this becomes the length of the form feed FeedSkip Specifies how much to feed after a mark or gap has finished detecting in units This value is converted to dots and once converted it must be in the range of 5 to 50 The default value is 5 dots Adjusting the feed skip allows detail adjustment of the printed area of the label The printable area of a label when using LABEL mode is defined as the current starting position of the label to the trailing edge of the mark or gap as detected by crossing the current threshold plus four dots plus the amount specified by feed skip The FeedSkip only applies when the printer has successfully detected a mark and used it for synchronization such as in a FORM operation or form feed key press Examples Ul SETFF 1050 10 lt CR gt lt LF gt Ul SETFF 2030 5 lt CR gt lt LF gt Ul SETVAR zpl save lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 232 of 329 1073699 001 Command Notes and I nteractions Although the range for FeedSkip is 5 to 50 if the underlying SGD media feed_skip is set directly the valid range is 0 to 50 The minimum of 5 is for backwards compatibility 9 22 SET TOF SET TOF
99. use this particular J E command when in CAPTURE PRINT even if ZPL is disabled on the current printer or if the printer is in line print mode CAPTURE OFF cannot be used to exit CAPTURE PRINT only JE can Example Ul CAPTURE RUN lt CR gt lt LF gt Ul NAME lt CR gt lt LF gt Ul CAPTURE OFF lt CR gt lt LF gt This example enables CAPTURE RUN which will create a DMP file on the E drive The NAME command is then used Because we are in CAPTURE RUN the command will be processed and the firmware s name will be returned to the host We then disable CAPTURE with CAPTURE OFF CPCL FOR LINK OS PRINTERS Page 258 of 329 1073699 001 Command Notes and I nteractions The DUMP command is an alias for CAPTURE PRINT 11 7 CHECKSUM CHECKSUM lt CR gt lt LF gt Command Name CHECKSUM Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD None Negative Aware No CHECKSUM returns a four byte null terminated pre calculated checksum of the firmware image on the printer In earlier printers this command calculated the checksum of the firmware and returned it Because it takes an extended amount of time to calculate the checksum this command returns a fixed checksum for compatibility and the new VCHECKSUM command is used to verify the checksum Example Ul CHECKSUM lt CR gt lt LF gt Example Response 6819 lt NUL gt Command Notes and I nteractions None CPCL FOR LIN
100. value specified in a utilities or in a label session applies to both session types Only the image portion of the label is rotated with this command any media alignment commands function as expected Parameters Quick Reference Parameter Description Valid Range Degrees 5 Digit Number The orientation of the label 0 or 180 Degrees Specifies the rotation of the label either 0 top out first or 180 degrees bottom out first The default is 0 Specifying any value besides 180 is interpreted as 0 Use in Utilities Sessions for Line Print When printing in line print mode with TURN 180 each line print buffer is rotated individually and the math that is used between the buffers can result in some text lines being closer together than they should be The lines will not overlap however and should remain readable Example Ul TURN 180 lt CR gt lt LF gt Command Notes and I nteractions This command does not interact with the ZPL command for print orientation PO CPCL FOR LINK OS PRINTERS Page 236 of 329 1073699 001 9 26 lt FF gt Form Feed lt FF gt Command Name lt FF gt Valid Session Types Not valid in sessions lt FF gt is used to simulate pressing of the form feed key on the printer when the printer is not in a session This causes the printer to immediately attempt to synchronize to a mark or gap on the media taking into account all adjustments the TOF value from SET TOF and label skip
101. version 244 CPCL FOR LINK OS PRINTERS Page 33 of 329 1073699 001 5 How Commands Are Documented In this section we will see sample documentation for a command and go over what each of the sections means in detail Documentation for each command begins with the command name This name is case sensitive J ust after that there will be a format line This line shows the format of the command including all parameters Immediately after this there is the key properties table This table has key information for each command and includes the following fields e Command Name This is the name of the command e Short Form Aliases Many commands in CPCL have short forms with identical syntax and parameters If the command has any such aliases they are listed here e Valid Session Types Many commands are only valid in certain session types The supported session types are listed in this field e Linked SGD A number of configuration commands in CPCL have SGD equivalents If the command has an SGD which can do the same or a similar function it will be listed here e Negative Aware Not all commands in CPCL support the use of negative numbers When they do not a numeric parameters sign is ignored and the absolute value of the parameter is taken If the command does react differently based on negative numbers this field will be yes Just after that there is a description of the function of the command which giv
102. was not used and that the low option was selected for error correction Binary or Byte Encoding In this encoding mode the entire ASCII range can be represented from 0 to 255 however the CPCL implementation does not support encoding NUL ASCII 0 into the stream CPCL FOR LINK OS PRINTERS Page 80 of 329 1073699 001 When using this mode the number of bytes being encoded must be specified as a four digit ASCII number immediately following the B character All four characters must be provided including leading zeros When binary data is scanned it is interpreted to be ISO IEC 8859 1 data by most barcode scanners In this mode up to 2 953 characters can be encoded assuming concatenation mode was not used and that the low option was selected for error correction Kanji and Kana Encoding In this encoding mode only Shift J IS characters can be encoded Each character in Shift J IS is two bytes in size when encoded so the data provided must be even in length Note that the range of characters in Shift IS encoding is very specific this mode is not suitable for general data In this mode up to 1 817 characters can be encoded assuming concatenation mode was not used and that the low option was selected for error correction Automatic Data If no data input mode was specified or if the mode selected was A for automatic the Data parameter simply represents the data to be encoded in the barcode The printer will automatically switch be
103. which once specified the distance that the mark must be found within The printer now automatically tracks the marks and gaps to determine the space that the mark or gap should appear in and this value is no longer used See the Mode parameter above to determine if this value should be specified ALERT Message Optionally specifies a message to be returned to the host via the last active communication port at the time the condition occurs The parameter may be up to 100 characters in length and must be contained within double quotation marks ASCII code 34 Any non null character may be placed within this string including spaces and CR LF Double quotes may be encoded with The message is transmitted to the host each time the error occurs The word ALERT must precede the message Examples Ul PAPER JAM INDEX ALERT A paper jam error has occurred lt CR gt lt LF gt Ul PAPER JAM NONE lt CR gt lt LF gt Command Notes and I nteractions Technically the ALERT parameter and the associated message may appear before any of the MODE parameters in this command For simplicity s sake it is not shown in the examples When the command is active bit 4 of the response of lt ESC gt i can be used to determine if a paper jam condition has occurred The status will continue to be active until the condition is resolved See page 243 for more information on the lt ESC gt i command CPCL FOR LINK OS PRINTERS Page 226 of 329 1073699
104. will be replaced with Gap if the printer is currently selected sensor is the gap sensor The text xx will be replaced with the new value being used for the threshold This value is saved as a permanent setting automatically and will be preserved upon power cycle If a mark or gap cannot be found or cannot be reliably detected the following message can also be returned In this case no values are changed or saved lt CR gt lt LF gt Bar not detectable xx lt CR gt lt LF gt Current value unchanged lt CR gt lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt Resetting the Values The BAR SENSE and GAP SENSE commands have an optional parameter that can be used to manually set the values The values can then be saved using the zpl save SGD See those commands on page 212 and 216 for more information Example Ul AUTOCAL lt CR gt lt LF gt Command Notes and I nteractions CPCL FOR LINK OS PRINTERS Page 209 of 329 1073699 001 AUTOCAL performs a SETLP 7 0 40 and also performs a SETLF 0 See these commands on page 176 and 175 respectively for more information 9 2 AUTO PACE AUTO PACE Delay lt CR gt lt LF gt Command Name AUTOCAL Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None For printers which have the peeler accessory the AUTO PACE activates the use of the peeler sensor and will cause the printer to print one label
105. with the manual The following text representation does not function but demonstrates the command 0 200 200 500 1 lt CR gt lt LF gt PCXMAG 20 15 2 2 BinaryPCXData lt CR gt lt LF gt T 7 0 20 120 PCXMAG Command Exmaple 2x2 Scaling lt CR gt lt LF gt PCXMAG 20 185 6 4 BinaryPCXData lt CR gt lt LF gt T 7 0 20 395 PCXMAG Command Exmaple 6x4 Scaling lt CR gt lt LF gt PRINT lt CR gt lt LF gt PCXMAG Command Exmaple 6x4 Scaling A fully functional example of this label is shown in the section on file insertion on page 252 Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 137 of 329 1073699 001 6 24 PERSIST PERSIST Option lt CR gt lt LF gt Command Name PERSIST Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No PERSIST is used to determine if label memory is erased at the end of each label session By default when a label session ends the label memory is cleared This option can be changed so that the image of the last label is retained and merged with any subsequent label commands The setting is preserved between label sessions but is always set to OFF at startup Parameters Quick Reference Parameter Description Valid Range Option lt CR gt lt LF gt Terminated When set to ON label images persist ON or OFF String Option Specifies the behavior of PERSIST If set to ON label memory is no
106. 00 25 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 118 of 329 1073699 001 LINE 30 200 200 30 25 lt CR gt lt LF gt ML 24 T 7 0 250 30 lt CR gt lt LF gt Two Line Commands lt CR gt lt LF gt 30 30 to 200 200 at 25 Width lt CR gt lt LF gt 30 200 to 200 30 at 25 Width lt CR gt lt LF gt lt CR gt lt LF gt Note how line always thickens to lt CR gt lt LF gt the right lt CR gt lt LF gt ENDML lt CR gt lt LF gt LINE 30 240 200 240 25 lt CR gt lt LF gt LINE 30 280 30 450 25 lt CR gt lt LF gt ML 24 T 7 0 250 240 lt CR gt lt LF gt Two Line Commands lt CR gt lt LF gt 30 240 to 200 240 at 25 Width lt CR gt lt LF gt 30 280 to 30 450 at 25 Width lt CR gt lt LF gt lt CR gt lt LF gt Note how first thickens downward lt CR gt lt LF gt and second thickens to the right lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt Command Notes and I nteractions Two Line Commands 30 30 to 200 200 at 25 Width 30 200 to 200 30 at 25 Width Note how Line always thickens to the right Two Line Commands 30 248 to 200 240 at 25 Width 30 280 to 30 450 at 25 Width Note how first thickens downward and second thickens to the right When used with IMAGE XOR all LINE commands become INVERSE LINE commands and thus do not support PATTERN If you have a line that has the same X and EndX with justification commands CENTER LEFT and RIGHT the justification is applied vertically
107. 0000000000 0000110000001100000 000011000011000111 000011100011100110000111 000001100001101100000000 100000111000000000 100000111000000000 000000000001101100000000 000000000011000110000000 000000100011000110000000 1001100000110000000 0000000000000000000000 lt CR gt lt 0000000000000000000000 lt CR gt lt 0000000000000000000000 lt CR gt lt 0000000000000000000000 lt CR gt lt 1111100000000000000000 lt CR gt lt 1111100000000000000000 lt CR gt lt 0000000000000000000000 lt CR gt lt 0000000000000000000000 lt CR gt lt 0000000000000000000000 lt CR gt lt 0000000000000000000000 lt CR gt lt 0000000000000000000000 lt CR gt lt 1000100000000000000000 lt CR gt lt 1111100000000000000000 lt CR gt lt 0001100000001100000001111000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 266 of 329 LF gt LE gt LE gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt LF gt L
108. 000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FFOOOFFOOOOOOFFOOOFF gt lt SEQ FFOOOFFOOOOOOFFOOOFF gt lt SEQ FFOOOOFFFFFFFFOOOOFF gt lt SEQ FFOOOOFFFFFFFFOOOOFF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FFFFFFFFFFFFFFFFFFFF gt lt SEQ FFFFFFFFFFFFFFFFFFFF gt lt CR gt lt LF gt T 7 0 270 30 Compressed Graphics Example lt CR gt lt LF gt T 7 0 270 56 10 byte width 27 lines lt CR gt lt LF gt PRINT lt CR gt lt LF gt Compressed Graphics Example 10 byte width 27 Lines A second example is provided in the label files set included with the manual named COMPRESSED GRAPHICS 2 LBL This example is similar in design to this one but has a larger more meaningful graphical example Due to its size it is not included in the text of this document Command Notes and Interactions COMPRESSED GRAPHICS commands can be aligned using one of the justify commands CENTER LEFT or RIGHT CPCL FOR LINK OS PRINTERS Page 95 of 329 1073699 001 SET commands do not take effect in the Data field of this command 6 8 CONCAT CONCAT X Y lt CR gt lt LF gt FontNumberOrName FontSize Offset Data lt CR gt lt LF gt or any of these in any combination up to 40 times SCALE TEXT ScaledFontName XScale
109. 001 9 16 POSTFEED POSTFEED Amount lt CR gt lt LF gt Command Name POSTFEED Short Form Aliases None Valid Session Types Utilities or Label Sessions Linked SGD None Negative Aware Yes The POSTFEED command is used to perform an additional media movement once a label or line print section has finished printing POSTFEED can be used with both negative and positive numbers Note that there is no mechanism that prevents you from feeding an excessively large negative value causing the printer to reverse the media to the point that it must be reloaded by the operator Using the POSTFEED command in a utilities session will cause it to be persistent until power off and will also cause the setting to affect line print If used in a label session it will only apply to the label session in which it is used The POSTFEED operation will ignore all gap or marks on the paper but will terminate if the printer detects an out of media or other error condition Parameters Quick Reference Parameter Description Valid Range Amount 5 Digit Unit Number How much to feed in units 4000 to 4000 dots Amount Specifies the amount to feed in units After the conversion from the current unit to dots the resulting amount must be between 4000 and 4000 If it is not no feed operation occurs At power on a value of 0 is used which means no post feed operation Example Ul POSTFEED 50 lt CR gt lt LF g
110. 01 ByteWidth Specifies the width in bytes of the data that is to be printed If this value exceeds the physical width of the print head the data will wrap the edge of the page and back to the beginning Height Specifies the height of the data to be printed in units Use care when using non dot unit systems as this value in combination with ByteWidth is used to determine how large the Data parameter is For this reason the use of dots is recommended X Y The X and Y coordinates in units specifying where the graphic is to be placed The Y coordinate in this function is reduced by one This allows print on the very first dot row of the printout which is otherwise not accessible See section 6 1 aboveon page on page 38 for more information Data This field contains hex encoded ASCII data which represents the bytes that make up the graphic to be placed The data should be the upper case ASCII hexadecimal characters 0 to 9 and A to F Characters other than these values may produce output due to the way ASCII characters are converted to image but use of this behavior is not recommended It is important to remember that a lt CR gt lt LF gt must be placed after the data to terminate the command even though the size of Data is exact Use in Utilities Sessions for Line Print The EXPANDED GRAPHICS command and its alias can be used in utilities sessions without a label header in order to directly print graphics When using th
111. 01 FontGroupNumber The number of the font group to be used for the text Even though this is a space terminated string it must be an ASCII number of a font group and must be in the range of 0 to 9 the max supported font group and must have been previously defined with a FONT GROUP command If these requirements are not met the particular CONCAT command fails and the remainder of the text is processed as additional label commands Data The text data to be added to the concatenation The text data is added left to right so the first sub command will be the left most text The total size of all data fields across all sub commands must not exceed 2024 characters If it does any additional data is discarded without error Termination of Sub Commands The series of sub commands must be terminated with the following command which exits the CONCAT session and renders the output ENDCONCAT lt CR gt lt LF gt This termination structure must appear at the end of the CONCAT command or the command is not terminated Examples CONCAT LBL 0 200 200 950 1 lt CR gt lt LF gt PW 576 lt CR gt lt LF gt FG000020 0 6 lt CR gt lt LF gt FG 1 0 3 0 6 lt CR gt lt LF gt CONCAT 20 20 lt CR gt lt LF gt 7 0 30 Subscript lt CR gt lt LF gt 7 1 5 Normal lt CR gt lt LF gt 7 0 0 Superscript lt CR gt lt LF gt ENDCONCAT lt CR gt lt LF gt T 7 0 20 120 Concat Example lt CR gt lt LF gt T 7 0 20 144 Bitmap font superscript an
112. 1 10 1 NAME NAME lt CR gt lt LF gt Command Name NAME Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD appl name Negative Aware No NAME returns the null terminated name of the application currently running on the printer In Link OS printers this is the same as the appl name SGD Example Ul NAME lt CR gt lt LF gt Example Response V68 19 6Z lt NUL gt Command Notes and Interactions None 10 2 VERSION VERS ION lt CR gt lt LF gt Command Name VERSION Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD appl version Negative Aware No VERSION returns a four byte null terminated representation of the version number of the version currently running on the printer In Link OS printers this is the same as the appl version SGD Example Ul VERSION lt CR gt lt LF gt Example Response 6819 lt NUL gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 241 of 329 1073699 001 10 3 lt ESC gt sh Printer Status lt ESC gt h Command Name lt ESC gt h Valid Session Types Not valid in sessions lt ESC gt h is an escape command which is used to determine printer status This command is an escape command and is not valid within sessions It can only be used when the printer is not currently in a session The command returns a single byte whic
113. 12 48 48x48 348 259 172 52 52x52 408 304 202 64 64x64 560 418 278 72 72x72 736 550 336 CPCL FOR LINK OS PRINTERS Page 52 of 329 1073699 001 Numeric Capacity Alphanumeric Capacity 8 bit Binary Capacity 80 80x80 912 682 454 88 88x88 1152 862 572 96 96x96 1392 1042 694 104 104x104 1632 1222 814 120 120x120 2100 1573 1048 132 132x132 2608 1954 1302 144 144x144 3116 2335 1556 F Format When using ECC values other than 200 this parameter specifies the encoding of the barcode When using ECC 200 the barcode will automatically switch between the best data type to use based on the data to be encoded If not specified or outside of the valid range a value of 6 is used Format Values for ECC O to 140 Value Description Valid Characters 1 Numeric 0 9 and space 2 Alphabetic A Z and space 3 Alphanumeric with Punctuation A Z 0 9 space period comma dash and slash 4 Alphanumeric A Z 0 9 and space 5 7 Bit All ASCII Characters 0 127 6 8 Bit All ASCII Characters 0 255 If a format is specified and the data provided does not comply with the format no barcode is printed G EscapeChar Specifies the escape character to use when using ECC 200 allowing the encoding of unprintable binary and special control characters The character can be any single character except space tab and NUL CR and LF By default the character is the underscore ch
114. 16 symbol position 1 17 total symbols For example symbol 9 of 16 would be 16 9 1 17 16 or 129 Symbol 3 of 7 would be 16 3 1 17 7 or 42 The file identification is encoded in two bytes represented by 000 and ppp in the structured append data These values must be 001 to 254 each Together they combine to form a unique value from 64516 possible values which identify the structured append set Each barcode that is part of a set of structured append barcodes must have identical values for ooo and ppp respectively in order to be processed as part of the set In the CPCL implementation of structured append ECI data cannot be specified Extended Channel Data ECI CPCL FOR LINK OS PRINTERS Page 54 of 329 1073699 001 To encode ECI data specify the _7 sequence followed by 6 digits These digits will be encoded as the extended channel data within the barcode If any of the characters are not numbers no barcode will be printed The full range of values 000000 999999 is supported Control Characters Although all binary characters can be encoded with _d there is a second mechanism to specify low ASCI character values using _c where c is a character Use the following escape sequences to represent the control characters Note that the default escape character underscore cannot be used to represent the _ control sequence as this is overridden by the encode escape character command which is processe
115. 17 Use LHeight Up to 48 ASCII characters less than 127 For Type 11 Barcodes the type of Code 128 barcode created is auto selected based on the data within the Data field For Type 3 barcodes the height is fixed The first row will be 7 dots tall and following rows will be 5 dots tall For the stacked barcode types the height will be multiplied by the number of stacks plus the height of the separators Data The data for the barcode If the barcode is composite the 1D portion of the data comes first as indicated above Note that while the data is validated for length it is not validated for content with this command Providing data which does not comply with the above table will result in unreadable barcodes or barcodes which contain unexpected data For GS1 128 barcodes substitution of the NUL character is provided along with FNC No substitution for CR and LF are provided and cannot be encoded in GS 128 composite barcodes Do not put spaces or parenthesis in the data To represent this character Send ASCII Code NUL ASCII 0 128 FNC1 129 FNC2 130 FNC3 131 FNC4 132 2D Data Following the 1D data additional data for a 2D Barcode can be specified which becomes a composite placed at the top of the 1D Barcode above a separator All types support the addition of composite 2D data For Types 1 to 11 the 2D portion of the composite barcode is a MicroPDF barcode with either type CC A
116. 2 5 Designations Binary Data 3 INTRODUCTION TO CPCL 3 1 Sessions 3 2 Label Sessions 3 3 Parameters for Sessions and Commands 3 3 1 Numeric Parameters 3 3 1 1 Unit Numbers 3 3 1 2 Numbers 3 3 1 3 Number Interpretation Rules 3 3 2 String Parameters 3 3 2 1 Terminated String Parameters 3 3 2 2 Quoted String Parameters 3 3 2 3 Raw String Parameters 3 4 Utilities Sessions 3 5 Single Line Utilities Session 3 6 File Sessions 3 6 1 Define Format File Session 3 6 2 Use Format File Session 3 6 3 CISDF Format File Session 3 7 Line Print Mode CPCL FOR LINK OS PRINTERS Page 3 of 329 11 11 11 11 12 13 14 14 15 15 17 18 18 19 19 19 19 20 20 21 21 21 22 22 23 23 23 24 25 1073699 001 4 CPCL COMMANDS OVERVIEW 4 1 Alphabetical Command Lists 4 2 Escape Commands List 5 HOW COMMANDS ARE DOCUMENTED 6 LABEL FORMATTING COMMANDS 6 1 Label Session Details 6 2 BARCODE 6 2 1 1D Barcodes 6 2 2 Aztec Code Barcode 6 2 3 Data Matrix Barcode 6 2 4 GS1 DataBar RSS and Composite Barcodes 6 2 5 MaxiCode Code Barcode 6 2 6 PDF417 6 2 7 QR Code Barcode 6 3 BARCODE TEXT 6 4 BAT INDICATOR 6 5 BOX 6 6 CENTER 6 7 COMPRESSED GRAPHICS 6 8 CONCAT 6 9 COUNT 6 10 END 6 11 EXPANDED GRAPHICS 6 12 FONT GROUP 6 13 IMAGE 6 14 IN CENTI METERS IN DOTS IN INCHES IN MILLI METERS 6 15 INVERSE LI NE 6 16 LEFT 6 17 LINE 6 18 MOVE 6 19 MULTILINE 6 20 PAGE WIDTH 6 21 PATTERN 6 22 PCX 6 23 PCX
117. 2 of 5 Yes ASCII digits only I20F5C 2 of 5 with Checksum Yes ASCII digits only I20F5G German Post Code Yes 11 14 ASCII digits INDUST20F5 Interleaved 2 of 5 Yes Identical to 120F5 INDUST2OF5C 2 of 5 with Checksum Yes Identical to 2OF5C MSI MSI Yes Up to 13 ASCII digits No check digit MST10 MSI Yes Up to 13 ASCII digits Single modulo 10 check digit MST1010 MSI Yes Up to 13 ASCII digits Two modulo 10 check digits MST1110 MSI Yes Up to 13 ASCII digits Modulo 11 and modulo 11 check digits NW7 Codabar Yes Identical to CODABAR NW7HEX Codabar Yes Identical to CODABAR PLESSEY MSI Yes Up to 13 ASCII digits Fixed ratio of 2 1 otherwise same as MSI 10 PLUS2 Plus 2 Barcode Only No 2 ASCII Digits PLUS5 Plus 5 Barcode Only No 5 ASCII Digits POSTNET Post Net Yes Any number of ASCII digits Dash character valid but stripped out UCCEAN128 GS1 128 No See the GS1 128 standard UCCEAN128E GS1 128 Extended No See the GS1 128 standard UPCA UPC A No 12 ASCII digits 12 will be stripped off and replaced with checksum 11 ASCII digits Checksum will not be added UPCA2 UPC A Plus 2 No 11 or 12 followed by space then 2 digits Checksum will be installed if 12 UPCA5 UPC A Plus 5 No 11 or 12 followed by space then 5 digits Checksum will be installed if 12 UPCE UPC E No 7 digits 6 digits will be prefixed with 0 UPCE2 UPC E Plus 2 No 6 or 7 followed by space then 2 digits UPCE5 UPC E Plus 5 No 6 or 7 followed by space then 5 digits
118. 29 1073699 001 Auto Encoding lt CR gt lt LF gt Data Basic QR Code lt C ENDML lt CR gt lt LF gt B QR 50 250 M 2 U 6 lt C H4A Basic QR Code lt CR gt lt LF gt ENDOR lt CR gt lt LF gt ML 24 T 7 0 270 250 lt C QR Code lt CR gt lt LF gt Mode 2 Width 6 Ma High Error Recovery lt C Auto Encoding lt CR gt lt LF gt Data Basic QR Code lt C ENDML lt CR gt lt LF gt B QR 50 475 M 2 U 4 lt C ENDOR lt CR gt lt LF gt ZL 24 T 7 0 270 475 lt C QR Code lt CR gt lt LF gt High Error Recovery lt C anual Encoding lt CR gt lt L Data lt CR gt lt LF gt Alphanumeric ABCDEFG R gt lt R gt lt R gt lt sk R gt lt R gt lt R gt lt R gt lt R gt lt F gt HIJ LF gt LF gt 4 lt CR gt lt LF gt LF gt LF gt LF gt H2M N123456789123456789 AABCDEFGHIJKLM B0017 _ abcdefg lt CR gt lt LF gt LE gt ode 2 Width 4 Mask 2 lt CR gt lt LF gt LF gt umeric 123456789123456789 lt CR gt lt LF gt LM lt CR gt lt LF gt Binary _ abcdefg lt CR gt lt LF gt ENDML lt CR gt lt LF gt B QR 50 700 M 2 U 6 lt C 010276 HM ABARCODE 1 ENDOR lt CR gt lt LF gt iw ML 24 T 7 0 270 700 lt C QR Code lt CR gt lt LF gt Mode 2 Width 6 Au Structured Append 1 R gt lt OF R gt lt to of LF gt 2 lt CR gt lt LF gt LF gt ask lt CR gt lt LF gt 2 lt CR gt lt LF gt Parity 0x76 11
119. 329 1073699 001 Data ABCDEFGHIJ1234567890 lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS GS1 Databar Type 1 No Composite Scale 2 Data 1234567890123 GS1 Databar Stacked Type 3 2 Dot Seperator No Composite Scale 3 Data 1234567890123 GS1 Databar Expanded Type 6 2 Segments 2 Dot Seperator No Composite Scale 2 Data ABCDEFGHIJ1234567890 GS1 Databar Expanded Type 6 4 Segments 2 Dot Seperator No Composite Scale 2 Data ABCDEFGHIIJ123456789 Page 62 of 329 1073699 001 Example BARCODE GS1 WITH CC LBL This example shows GS1 Databar Barcodes with composite components 0 200 200 680 1 lt CR gt lt LF gt JOURNAL lt CR gt lt LF gt BARCODE RSS 40 20 2 0 2 0 1 1234567890123 2D Barcode Data lt CR gt lt LF gt ML 24 T 7 0 300 20 lt CR gt lt LF gt GS1 Databar lt CR gt lt LF gt Type 1 2 Dot Separator lt CR gt lt LF gt With Composite Scale 2 lt CR gt lt LF gt Data 1234567890123 2D Barcode Data lt CR gt lt LF gt ENDML lt CR gt lt LF gt BARCODE RSS 40 140 2 0 2 0 3 1234567890123 2D Barcode Data lt CR gt lt LF gt ML 24 T 7 0 300 140 lt CR gt lt LF gt GS1 Databar Stacked lt CR gt lt LF gt Type 3 2 Dot Separator lt CR gt lt LF gt With Composite Scale 2 lt CR gt lt LF gt Data 1234567890123 2D Barcode Data lt CR gt lt LF gt ENDML lt CR gt lt LF gt BARCODE RSS 40 260 2 0 2 0 4 1234567890123 2D Barcode
120. 4 lt CR gt lt LF gt PATTERN 87 lt CR gt lt LF gt BOX 384 30 430 150 24 lt CR gt lt LF gt PATTERN 94 lt CR gt lt LF gt BOX 432 30 478 150 24 lt CR gt lt LF gt PATTERN 97 lt CR gt lt LF gt BOX 480 30 526 150 24 lt CR gt lt LF gt R 2 Ely REE zI 5 Nk a J VVVVVVV VV eT J Vv ioe SS I EES ET E J v koi VVVVVVVV BOX 96 220 190 340 48 lt CR gt lt LF gt A A A A fy fy fy fy a J J J v v v v A A A A A ag ag OG fag ied oO vo vo O H Vv Vv Vv Vv Vv foe foe foe co A lt lt ea vo NONODOANDADA YN pte th tht ho Ijmngmnununy v v v v Vw ROANNADWDATAD MComonmnrwmnram ONOMOTONDO Vv Vv Vv Vv Vos MOoTONDVAOCD ONONONONO INANANANHA SO N N lt fo N Ka a o O e o Woe AA T O a a AO BH BE B B B Hox Hx Hx Hox Hx GOMOMOKOCKO amananMmanama BOX 96 220 190 395 0 lt CR gt lt LF gt BOX 192 220 286 395 0 lt CR gt lt LF gt BOX 288 220 382 395 0 lt CR gt lt LF gt BOX 384 220 478 395 0 lt CR gt lt LF gt BOX 480 220 574 395 0 lt CR gt lt LF gt LINE 0 340 576 340 O0 lt CR gt lt LF gt ML 96 T270 7 1 576 350 lt CR gt lt LF gt 106 lt CR gt lt LF gt 105 lt CR gt lt LF gt 104 lt CR gt lt LF gt 103 lt CR gt lt LF gt 102 lt CR gt lt LF gt 101 lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt v a pa Q S x Lu Lj a P P 5 ai PAE AAAA A TAIETE AAEE Se
121. 6 SETBOLD 6 lt CR gt lt LF gt SETBOLD 6 lt CR gt lt LF gt T 4 3 20 440 1234 56 lt CR gt lt LF gt SET Th T 7 T 4 T 7 SET PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 148 of 329 1073699 001 SETBOLD Example Font 7 Size SETBOLD ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 AR C SETBOLD 1 ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 A8 C SETBOLD 2 ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 FEXAS FC SETBOLD 3 ABCDEFGHLIJKLMNOPQRSTUVRKYZ1234567890 FEAS CEC SETBOLD Example Font 4 Size 3 SETBOLD 1234 56 SETBOLD 3 1234 56 SETBOLD 6 1234 56 Command Notes and Interactions When using SETBOLD it may be desirable to set the value of SETSP to the same value used for SETBOLD to increase readability CPCL FOR LINK OS PRINTERS Page 149 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 150 of 329 1073699 001 6 31 SETMAG SETMAG Width Height lt CR gt lt LF gt Command Name SETMAG Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No SETMAG is used to set the output scaling of pre scaled fonts overriding the sizing behaviors defined in the font files themselves When a non zero value for SETMAG is used that value replaces that element in the sizing of all pre scaled fonts regardless of what command is used to draw them SETMAG s value is preserved between labels and al
122. 67890 lt CR gt lt LF gt ENDPDF lt CR gt lt LF gt ML 24 T 7 0 40 100 lt CR gt lt LF gt Simple PDF 417 Barcode lt CR gt lt LF gt Element Size 2x6 Default lt CR gt lt LF gt 3 Columns Auto Rows Default lt CR gt lt LF gt ECC Mode 2 Automatic Compaction lt CR gt lt LF gt Data 1234567890 lt CR gt lt LF gt ENDML lt CR gt lt LF gt B PDF 417 40 260 XD 3 YD 7 C 5 R 53 S 6 B1 lt CR gt lt LF gt ABCDEFGHIJKLMNOPORSTUVWXY Zabcdefghi jklmnopqrstuvwxyz1234567890 lt CR gt lt LF gt ABCDEFGHIJKLMNOPORSTUVWXY Zabcdefghi jklmnopqrstuvwxyz1234567890 lt CR gt lt LF gt ENDPDF lt CR gt lt LF gt ML 24 T 7 0 40 665 lt CR gt lt LF gt PDF 417 Barcode lt CR gt lt LF gt Element Size 3x7 lt CR gt lt LF gt 5 Columns 53 Rows lt CR gt lt LF gt ECC Mode 6 Force Binary Compact ion lt CR gt lt LF gt Data ABCDEFGHIJKLMNOPQRSTUVWXYZ lt CR gt lt LF gt abcdefghijklmnopqrstuvwxyz1234567890 lt RAW gt lt CR gt lt LF gt lt ENDRAW gt lt CR gt lt LF gt ABCDEFGHIJKLMNOPQRSTUVWXYZ lt CR gt lt LF gt abcdefghijklmnopqrstuvwxyz1234567890 lt RAW gt lt CR gt lt LF gt lt ENDRAW gt lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 75 of 329 1073699 001 sea Il Simple PDF 417 Barcode Element Size 2x6 Default 3 Columns Auto Rows Default ECC Mode 2 Automatic Compaction Data 1234567890 PDF 417 Barcode Element Size 3x7 5 Columns 53 Rows ECC Mode 6 For
123. 7 0 270 400 Barcode Text Off lt CR gt lt LF gt PRINT lt CR gt lt LF gt 0 lt CR gt lt LF gt a D W Ea n o a w o ya h a s Command Notes and Interactions TET TT 1 0I 1E TITA 12345abc 1234dabe TR LUT II EITE 12345abc Barcode Text Font 7 Size Offset Barcode Text Font 4 Size 1 Offset 10 Barcode Text Font VERAMOIT TTF Size 35x35 points Offset 5 Barcode Text Off The BARCODE TEXT command works correctly with COUNT to change as multiple labels are printed CPCL FOR LINK OS PRINTERS Page 86 of 329 1073699 001 6 4 BAT INDICATOR BAT INDICATOR X Y S M L DBG P lt CR gt lt LF gt BI X Y Size S M L DBG P lt CR gt lt LF gt Command Name BAT INDICATOR Short Form Aliases BI Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No BAT I NDI CATOR is used to print a graphical representation of the current charge state of the battery on a label The BAT INDICATOR command takes a series of optional parameters to specify its size and configuration Parameters Quick Reference Parameter Type Description Valid Range x 5 Digit Unit Number The X origin of the graphic 0 to 65535 Y 5 Digit Unit Number The Y origin of the graphic 0 to 65535 X Y The X and Y coordinates in units specifying where the graphic is to be placed S M L An S M or L can be optionally added to the command to adjust the size of t
124. 8 decimal lt CR gt lt LF gt High Error Recovery lt C Manual Encoding lt CR gt lt L Data lt CR gt lt LF gt R gt lt F gt LF gt Alphanumeric BARCODE 1 OF 2 lt CR gt lt LF gt ENDML lt CR gt lt LF gt BOR 50 925 M72 U 6C D020275 HM ABARCODE 2 ENDQR lt CR gt lt LF gt L 24 T 7 0 270 925 lt C R Code lt CR gt lt LF gt nEOs tructured Append 2 ode 2 Width 6 Aut R gt lt OF R gt lt O of LF gt 2 lt CR gt lt LF gt LF gt ask lt CR gt lt LF gt 2 lt CR gt lt LF gt Parity 0x75 117 decimal lt CR gt lt LF gt High Error Recovery lt C Manual Encoding lt CR gt lt L Data lt CR gt lt LF gt R gt lt F gt LF gt Alphanumeric BARCODE 2 OF 2 lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 82 of 329 1073699 001 CPCL FOR LINK OS PRINTERS QR Code Minimal Form Automatic Mode 2 Automatic Width 6 Automatic Mask Low Error Recovery Auto Encoding Data Basic QR Code QR Code Mode 2 Width 6 Mask 4 High Error Recovery Auto Encoding Data Basic QR Code QR Code Mode 2 Width 4 Mask 2 High Error Recovery Manual Encoding Data Numeric 123456789123456789 Alphanumeric ABCDEFGHIJKLM Binary _ AC abcdefg QR Code Mode 2 Width 6 Auto Mask Structured Append 1 of 2 Parity x76 118 decimal High Error Recovery Manual Encoding Data Alphanu
125. 9 1073699 001 Modern UPS Barcodes In modern UPS barcodes not all of the above fields are used The fields marked above are used in addition to the POST CC and SC values which are part of the standard data fields In addition the EXTRA field contains compressed data which contains the remainder of the fields The tracking number only consists of 1Z followed by 8 digits These are the last eight digits of the tracking number The full tracking number can be reassembled by taking 1Z then the shipper number then the last two digits of the service class then the last 8 digits of the tracking number Termination of Data The data string in either mode manual or automatic is terminated with the following sequence No part of this data is encoded in the data that is put into the barcode ENDMAXICODE lt CR gt lt LF gt Examples BARCODE MAXI CODE LBL 0 200 200 600 1 lt CR gt lt LF gt BARCODE MAXICODE 25 25 lt CR gt lt LF gt ZIPPER 1 lt CR gt lt LF gt CC 840 lt CR gt lt LF gt SC 001 lt CR gt lt LF gt P Mi POST 555555555 lt CR gt lt LF gt oft at aot MSG Maxicode Test Barcode lt CR gt lt LF gt eR 8 ENDMAXICODE lt CR gt lt LF gt Maxicode Barcode Zipper Enabled Country Code 840 Service Class 001 ZIP Code 55555 5555 Low Priority Message Maxicode Test Barcode ML 24 T 7 0 340 25 lt CR gt lt LF gt Maxicode Barcode lt CR gt lt LF gt Zipper Enabled lt CR gt lt LF gt Country Code 840 lt CR gt
126. 99 001 13 8 FILE FILE FileName CRC16 RENAME NewFileName lt CR gt lt LF gt Command Name FILE Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD file rename Negative Aware No The FILE command has two functions The first is the ability to rename existing files similar to the file rename SGD The second function is the ability to calculate a CRC16 on an existing file on the printer The format of this CRC is the same format used in the CISDFCRC16 format discussed starting on page 311 Either or both of the options may be specified in any order though the new file name must follow the RENAME command Parameters Quick Reference Parameter Type Description Valid Range FileName CR LF Terminated String The name of the file to operate on See below NewFileName CR LF Terminated String The new name of the file if using the RENAME option See below FileName Specifies the name of the file to operate on The file name is not case sensitive All filenames in Link OS are in upper case Filenames in Link OS can be from 1 character with no extension up to 38 characters with a 5 character extension after the dot If a drive letter is not specified the file is searched for first on the E drive then on the R drive Files from the Z drive can also have their checksums calculated but cannot be renamed but the Z drive letter must be specified in the file n
127. AAABBBCCC111222333444 AAABBBCCC111222333444 AAABBBCCC111222333444 AAABBBCCC111222333444 lt CR gt lt LF gt ENDAZTEC lt CR gt lt LF gt CENTER 670 lt CR gt lt LF gt ML 24 T 7 0 0 870 lt CR gt lt LF gt Aztec Code Multi lt CR gt lt LF gt Width 5 Six Multi lt CR gt lt LF gt Manual Size 101 15x15 Compact lt CR gt lt LF gt Data repeated 6 times AAABBBCCC111222333444 lt CR gt lt LF gt ENDML lt CR gt lt LF gt LEFT lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 48 of 329 1073699 001 Aztec Code Minimal Form Default Width 6 Default Error Correction 23 Data AZTEC BARCODE Aztec Code Width 6 Use Flags Error Correction 65 Data FNC1 FNC Barcode Example Aztec Code Width 5 Manual Size 206 41x41 Data Type 206 Barcode Example Aztec Code Rune Width 8 Manual Size 300 Simple Rune Data 129 Aztec Code Multi Width 5 Six Multi Manual Size 101 15x15 Compact Data repeated 6 times AAABBBCCC111222333444 Use in Utilities Sessions for Line Print CPCL FOR LINK OS PRINTERS Page 49 of 329 1073699 001 In versions of Link OS greater than 19 6 The BARCODE command and all its variants can be used in a utilities session to print a barcode in line print mode The printer does not have to be in line print mode for this command to be used in utilities mode The X and Y parameters of the barcode must be specified but have no effect
128. BARCODE TEXT FontNameOrNumber FontSize Offset lt CR gt lt LF gt BARCODE TEXT TrueTypeFontName XScale YScale Offset lt CR gt lt LF gt BARCODE TEXT OFF lt CR gt lt LF gt Command Name BARCODE TEXT Short Form Aliases BT Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No BARCODE TEXT is used to specify if a human readable text representation of barcode data should be printed below 1D barcodes This text is applied for both line print and label based barcodes The BARCODE TEXT command has no effect on GS 1 Databar Compsite or 2D barcode types As with all commands which work with fonts there are two formats of the command one for pre scaled CPF fonts and another for TTF fonts You cannot use CSF fonts with BARCODE TEXT See page 189 for information on internal font numbers and using TTF files To turn off the addition of the text representation use the format BARCODE TEXT OFF with no additional parameters The barcode text is always center justified under the barcode If the text cannot fit on the page it will wrap around the page in either direction to be able to be printed The command is persistent between labels The last value set in a label will be carried to the next label This command can also be used as a stand alone command in a utilities session where it will take effect on the next barcode printed Parameters Quick Reference
129. BUDO I FAN13 T 7 0 300 100 Code 93 lt CR gt lt LF gt BARCODE CODABAR 1 2 20 25 150 A12345B lt CR gt lt LF gt 1234567890128 T 7 0 300 150 CodaBar lt CR gt lt LF gt E LUMEN EAN8 BARCODE EAN13 1 2 20 25 200 123456789012 lt CR gt lt LF gt 01234567 T 7 0 300 200 EAN13 lt CR gt lt LF gt ILII FIM BARCODE EAN8 1 2 20 25 250 01234567 lt CR gt lt LF gt A T 7 0 300 250 EAN8 lt CR gt lt LF gt BARCODE FIM 1 2 20 25 300 A lt CR gt lt LF gt MUANI NV I2 of 5 T 7 0 300 300 FIM lt CR gt lt LF gt 12345 BARCODE I20F5 1 2 20 25 350 12345 lt CR gt lt LF gt MTT NT MSI 12345 T 7 0 300 350 I2 of 5 lt CR gt lt LF gt BARCODE MSI 1 2 20 25 400 12345 lt CR gt lt LF gt T 7 0 300 400 MSI lt CR gt lt LF gt BARCODE POSTNET 1 2 20 25 450 12345 lt CR gt lt LF gt T 7 0 300 450 PostNet lt CR gt lt LF gt BARCODE UPCA 1 2 20 25 500 123456789012 lt CR gt lt LF gt OUTTA WA ORNA A UPC A T 7 0 300 500 UPC A lt CR gt lt LF gt BARCODE UPCE 1 2 20 25 550 1234567 lt CR gt lt LF gt MELOEN OA 1 AI UPC E T 7 0 300 550 UPC E lt CR gt lt LF gt 1234567 BARCODE UPCE5 1 2 20 25 600 1234567 12345 lt CR gt lt LF gt WANA AMT AAU MODUN LNE UPC E Plus 5 T 7 0 300 600 UPC E Plus 5 lt CR gt lt LF gt 1234567 12345 BARCODE F39 1 2 20 25 650 a lt 135 gt c lt CR gt lt LF gt T 7 0 300 650 Full Code 39 lt CR gt lt LF gt VAMUN 1 YOON VON VY OO UV 1 A A PRINT lt CR gt lt LF gt ac Jnllihhallihihhlilhhl PostNet 12345 Full Code 39
130. C gt N command the value of that bit changes to 0 and remains so until the printer is reset Example lt ESC gt N Command Notes and I nteractions None 11 36 lt ESC gt p Shut Down Printer lt ESC gt p Command Name lt ESC gt p Valid Session Types Not valid in sessions Linked SGD power shutdown lt ESC gt p is used to shut down the printer This feature only applies to printers which can shut themselves down which includes all battery based Link OS printers As soon as the command is received the printer will power off This function is equivalent to setting the power shutdown SGD to anything Example lt ESC gt p Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 295 of 329 1073699 001 11 37 lt ESC gt V Print Two Key Report lt ESC gt V Command Name lt ESC gt V Valid Session Types Not valid in sessions lt ESC gt V is used to instruct the printer print a copy of the two key report the two key report For a breakdown of the two key report see page 246 Example lt ESC gt V Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 296 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 297 of 329 1073699 001 12 Magnetic Card Reading Commands Commands covered in this section are as follows CPCL Command WES Description MCR Yes Yes Configures the magnetic card reader 299 MCR CAN Yes Yes C
131. C16 format discussed starting on page 311 Example DF HELLOWORLD TXT lt CR gt lt LF gt Hello world from the HELLOWORLD TXT file lt CR gt lt LF gt END lt CR gt lt LF gt Ul FILE HELLOWORLD TXT CRC16 lt CR gt lt LF gt This example uses the DEFINE FORMAT session see page 308 to create a file named HELLOWWORLD TXT and then uses the FILE command to calculate the CRC16 checksum which is then returned to the host The return value is as follows 233B lt NUL gt DF HELLOWORLD TXT lt CR gt lt LF gt Hello world from the HELLOWORLD TXT file lt CR gt lt LF gt END lt CR gt lt LF gt Ul FILE HELLOWORLD TXT RENAME HI TXTCR gt lt LF gt This example demonstrates the renaming function of the FILE command by renaming the HELLOWORLD TXT file to HI TXT Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 323 of 329 1073699 001 13 9 PRINT File Session PRINT lt CR gt lt LF gt Command Name PRINT Short Form Aliases None Valid Session Types Define File Session Only Linked SGD None Negative Aware No The PRINT command when used in a DEFINE FILE or DF session instructs the printer write the PRINT command to the file and then close it This command is an alternative to the END command which closes the file without any additional data Example DF TEST FMTI lt CR gt lt LF gt 0 200 200 200 1 lt CR gt lt LF gt TEXT 7 0 20 20 This is the file TEST FMT lt C
132. CLFFCIFCC2001FC1LFFC1FFC1IF8C2000FCLFFCIFFC1FOO008007C1FFCIFFC1EO gt lt SEQ 004003C1FFC1FFC1C0O052001C1FFC1FF80C300C1FFC1IFFO3C1F1C1F2087FCLFE gt lt SEQ 02C20A083FC1FC020A01101FC1F8020A00A00FC1F003C1F2004007C1E0C20200 gt lt SEQ A003C1C0C20201100180C2020A0800001201C1F2880000082000A00000228D22 gt lt SEQ 0400008950896B0000644A692080 gt In this example a CISDFRCRC16 session is used to define the file SAMPLEPCX PCX on the R drive In this example both the CRC and the checksum are provided for full validation of the file Also note how the file data contains a wide range of characters including NULs See page 252 for an example which uses this file to print the PCX image 13 3 1 Calculating the CRC16 Checksum The CRC16 checksum used in for CISDFCRC16 and CISDFRCRC16 sessions and also as a return value of the FILE CRC16 command is not a standardized checksum type It is very similar to XMODEM CRC16 but it does not augment and this has different results The calculation of the CRC is not practical to do by hand instead the following C code can be used to calculate the checksum const U16 crctab 256 0x0000 0x1021 0x2042 0x3063 0x4084 0x50a5 O0x60c6 0x70e7 0x8108 0x9129 Oxal4a Oxbl6b Oxcl8c Oxdlad Oxelce Oxflef 0x1231 0x0210 0 3273 0x2252 0x52b5 0x4294 0x72f7 0x62d6 0x9339 0x8318 Oxb37b Oxa35a Oxd3bd Oxc39c Oxf3ff Oxe3de 0x2462 0x3443 0x0420 0x1401 0x64e6 0x74c7 0x44a4 0x5485 Oxa56a Ox
133. CONCAT and not by the sub commands That is to say using VST or VSCALE TEXT with CONCAT will not cause the subcommand to appear vertical and using ST or SCALE TEXT with VCONCAT will not cause the text to appear horizontal In this command there is no text version substitution of the command for true type fonts like there is in the TEXT command Instead use the ST or SCALE TEXT command For this command FontNameOrNumber must be a pre scaled font file CONCAT supports the use of font groups to allow all or part of the data s font to be selected based on the width of the data provided Multiple font group sub commands work together to determine the largest size each font group sub command can be while still maintaining full size of the non font group elements of the command See page 107 for more information on font groups Note that only FG is supported and not the long form FONT GROUP The total size of all Data fields within a CONCAT command must not exceed 2024 bytes If the data exceeds this amount any data fields or sub commands that follow will be ignored CPCL FOR LINK OS PRINTERS Page 96 of 329 1073699 001 Unlike many commands in CPCL which wrap around the edge of the label if the concatenated text data will not fit on the page PAGE WIDTH for CONCAT the label session height for VCONCAT nothing is printed at all If the fit is close the printer will automatically try to adjust the spacing of the pre scaled fonts in the s
134. COUNT of 1 Label Number 1 Barcode field followed by a COUNT of 2480 MENTENI INI 2457 Barcode field followed by a COUNT of 2480 MEDEN M 2457 CPCL FOR LINK OS PRINTERS Page 102 of 329 1073699 001 Text field followed by Label Number 2 Barcode field followed MENN MTEMI 4937 Barcode field followed TUDE i I 9977 Text field followed by Label Number 3 Barcode field followed NET MEIN 7417 Barcode field followed TL HDI 7497 Text field followed by Label Number 4 Barcode field followed MEE IE TT 9897 Barcode field followed MENTE II 5017 Text field followed by Label Number 5 Barcode field followed METIAN T 2377 Barcode field followed MEEI DEII 2537 CPCL FOR LINK OS PRINTERS a COUNT of 1 by a COUNT of by a COUNT a COUNT of by a COUNT by a COUNT a COUNT of by a COUNT by a COUNT a COUNT of by a COUNT by a COUNT Page 103 of 329 1073699 001 Command Notes and I nteractions When COUNT adjusts a field it erases the pixels which previously contained the field and redraws it with the new value When this happens if you had other information which intersected the field such as a BOX with a PATTERN or LINE commands they will not be redrawn 6 10 END PRINT lt CR gt lt LF gt END lt CR gt lt LE gt Command Name END PRINT Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware N A
135. CPCL CPCL FOR LINK OS PRINTERS Page 12 of 329 1073699 001 o The CPCL File System This section contains information on using files within CPCL including special file designations and commands to create and delete files o Utility and Diagnostic Commands This section contains information on commands related to diagnostic and utility functions These include commands to dump printed data 2 1 Designations Unprintable ASCII While most of CPCL is in plain ASCII text proper termination of lines is critical to proper operation The line termination characters as well as some characters from the Comtec escape language are not printable characters As such this document will use the following designations to indicate binary data In this manual text which denotes an example will be designated using the Courier New font as shown in this simple example below 0 200 200 100 1 lt CR gt lt LF gt TEXT 4 0 0 This is a line of text lt CR gt lt LF gt PRINT lt CR gt lt LF gt lt ESC gt h The greater than and less than symbols are used to designate areas of data that are to be converted to binary the lt CR gt is a visual representation of the non printable carriage return character while the lt LF gt is the visual representation of the non printable line feed character If you were streaming binary directly to the printer you would not send the lt CR gt but instead send a carriage return character ASCII Ch
136. CPCL Programming Guide for Link OS Enabled Printers ZEBRA TECHNOLOGIES P1073699 001 Rev A 2 Copyright and Liability Disclaimer 2014 ZIH Corp The copyrights in this manual and the software and or firmware in the printer described therein are owned by ZIH Corp and Zebra s licensors Unauthorized reproduction of this manual or the software and or firmware in the printer may result in imprisonment of up to one year and fines of up to 10 000 17 U S C 506 Copyright violators may be subject to civil liability This product may contain ZPL ZPL I and Link OS programs Element Energy Equalizer Circuit Eo and Monotype Imaging fonts Software ZIH Corp All rights reserved worldwide Zebra the Zebra head graphic CPCL Link OS ZPL and ZPL II are trademarks of ZIH Corp registered in many jurisdictions worldwide All rights reserved All other brand names product names or trademarks belong to their respective holders For additional trademark information please see Trademarks on the product CD 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 proprietary information may not be used reproduced or disclosed to any other parties for any other purpose without the express w
137. CPCL commands must be in upper case but this one is supported in both cases for backwards compatibility When used to access settings the GETVAR command returns the current value of the setting Some settings are preserved between power cycles and some settings can also have temporary values that will be reset to the saved value with the printer is reset The GETVAR command cannot be used to determine properties about the setting only its current operating value See the documentation of each SGD for more information The response to GETVAR is a quote bound string specifying the value of the setting requested If the setting is not available or not valid on this printer the response will be a double quote bound question mark Requesting some settings which are not supported my result in an empty pair of double quotes SGD settings are organized into branches which group settings of similar type The available setting branches vary depending on the model of printer Parameters Quick Reference Parameter Description Valid Range SettingName Quoted File Type The name of the setting to retrieve or a special See below Parameter value as outline below SettingName Specifies the name of a setting to retrieve the current value of This string should be bound by double quotation marks Single Settings CPCL FOR LINK OS PRINTERS Page 269 of 329 1073699 001 When a single setting is requested the current operating value will be r
138. CR gt lt LF gt VST ScaledFontName XScale YScale X Y Data lt CR gt lt LF gt Command Name SCALE TEXT VSCALE TEXT Short Form Aliases ST VST Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The SCALE TEXT command is used print scaled text in CPCL from either a scaled or TrueType font VSCALE TEXT has the same functionality but orients the text rotated 90 degrees When the text generated by SCALE TEXT flows off the edge of the page it does not wrap On the top edge it is truncated to the nearest character that will fully fit when using VSCALE TEXT On the right edge it is truncated to at the last pixel of the page width including any partial characters Parameters Quick Reference Parameter Type Description Valid Range ScaledFontName Space Terminated String A scaled font used to create the text See Below XPoints 5 Digit Number The X size of the scaled font in points 0 to 65535 YPoints 5 Digit Number The Y size of the scaled font in points 0 to 65535 x 5 Digit Unit Number The X origin of the scaled text in units 0 to 65535 Y 5 Digit Unit Number The Y origin of the scaled text in units 0 to 65535 Data CR LF Terminated String The text data to be printed Up to 8191 characters ScaledFontName Specifies the name of the TrueType or CSF font file to use when printing the scaled text The entire filename of the font including ext
139. D 3E 4B bluetooth address Wireless Radio 802 11 a b g n card cardid 9118 a b g n all others b g Region usa canada wlan region_code Country usa canada wlan country_code Enabled on wlan enable MAC Address 00 22 58 6d 3e 4a wlan mac_addr IP Address 10 10 10 10 wlan ip addr Netmask 255 255 255 0 wlan netmask Gateway 10 10 10 1 wlan gateway Operating Mode infrastructure wlan operating_mode International Mode off wlan international_mode Preamble Length long wlan preamble Security wpa psk wlan security Stored ESSID ZebraPrinter wlan essid can be blanked out with wlan secure_ssid Associated yes wlan associated DHCP on wlan ip dhcp enable DHCP CID type 1 wlan ip dhcp cid_type DHCP CID 0022586d3e4a wlan ip dhcp cid_prefix Power Save on wlan power_save Ethernet MAC Address 00 07 4D 43 FE BF internal_wired mac_addr IP Address 0 0 0 0 internal_wired ip addr Netmask 255 255 255 0 internal_wired ip netmask Gateway 0 0 0 0 internal_wired ip gateway DHCP on internal_wired dhcp enable DHCP CID type 1 internal_wired dhcp cid_type DHCP CID 00074D43FEBF internal_wired dhcp cid_prefix Active Network Information Active Network Wireless ip active_network Ethernet if internal wired IP Address 10 14 204 185 Based on active network setting from above Netmask 255 255 255 0 Based on active network setting from above Gateway 10 14 204 2 Based on active network setting from above TCP Port 6101 ip port Al
140. E OxFC CPCL FOR LINK OS PRINTERS Page 200 of 329 1073699 001 8 3 3 6 Spanish COUNTRY SPANISH Substitute This Character With This Character 0x23 OxA3 0x40 OxA7 S 0x5B OxAl i 0x5C OxD1 N 0x5D OxBF 0x7B 0xBO a Ox7C OxF1 0e7D OxE7 0x7E OxAF 7 8 3 3 7 Norwegian COUNTRY NORWAY Substitute This Character With This Character 0x5B OxC6 E 0x5C 0xD8 0x5D 0xC5 0x7B OxE6 Ox7C OxF8 0e7D OxE5 a Ox7E OxAF T 8 3 3 8 LATIN 9 Encoding COUNTRY LATIN9 Substitute This Character With This Character OxA4 0x80 OxA6 Ox8A OxA8 4 0x8D 0xB4 0x8E OxB8 A Ox9F vA 0xBC K 0x9D OxBD 0x9C ce OxBE n Ox8F x CPCL FOR LINK OS PRINTERS Page 201 of 329 1073699 001 8 3 3 9 Code Page 850 Encoding COUNTRY CP850 The font layout described in section 8 3 3 does not contain all the necessary characters to fill out Code Page 850 in particular the line drawing and blocks As a result any characters which are not available are replaced with the space character The highlighted characters in the following code page 850 chart are not available in CPCL using the standard mappings 8 3 3 10 Code Page 874 Encoding COUNTRY CP874 CP874
141. EFIX ErrorPrefix Specifies a prefix to use if a track being read has an error The ERRORS option must be enabled for this prefix to have any effect The text of ErrorPrefix may be up to 11 characters in length Any number greater than that will be ignored and only the first 11 will be used This text is placed before any track information if so enabled By default this delimiter is set to Error CPCL FOR LINK OS PRINTERS Page 300 of 329 1073699 001 PREFIX Prefix Specifies a prefix to use if a track being read is read successfully The text of Prefix may be up to 11 characters in length Any number greater than that will be ignored and only the first 11 will be used This text is placed before the track number and is always present if specified POSTFIX PostFix Specifies a postix to use if a track being read is read successfully The text of Postfix may be up to 11 characters in length Any number greater than that will be ignored and only the first 11 will be used This text is placed after the data but before the lt CR gt lt LF gt terminating each line in the response Example 1 U1 MCR 80 T1 lt CR gt lt LF gt This example shows the most basic form of the MCR command The 80 value for Timeout equates to 10 seconds The user has 10 seconds to swipe a card If they do they will receive the following data back on the port that requested the data If the data on the card was Track 1 Data this is how the repl
142. EFT lt CR gt lt LF gt T 7 0 30 180 This text has left justification lt CR gt lt LF gt CENTER 576 lt CR gt lt LF gt T 7 0 30 240 This text has center justification lt CR gt lt LF gt T 7 0 30 264 but uses 576 as the range lt CR gt lt LF gt PRINT lt CR gt lt LF gt This text has no Cdefault Left justification This text has right justification This text has center justification This text has left justification This text has center justification but uses 576 as the range Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 93 of 329 1073699 001 6 7 COMPRESSED GRAPHICS COMPRESSED GRAPHICS ByteWidth Height X Y Data lt CR gt lt LF gt VCOMPRESSED GRAPHICS ByteWidth Height X Y Data lt CR gt lt LF gt Command Name COMPRESSED GRAPHICS VCOMPRESSED GRAPHICS Short Form Aliases CG VCG Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The COMPRESSED GRAPHICS command is used to print raw binary bitmap data to the label VCOMPRESSED GRAPHICS is the same except it is oriented vertically The data itself is not compressed per say it is just more efficiently represented than in the EXPANDED GRAPHICS command The binary data is not compressed in this command Parameters Quick Reference Parameter Type Description Valid Range ByteWidth 3 Digit Number The byte width of the image being
143. ESC gt i Valid Session Types Not valid in sessions lt ESC gt i is an escape command which is used to determine additional printer status This command is an escape command and is not valid within sessions It can only be used when the printer is not currently in a session The command returns a single byte which is a bit field indicating various status attributes To get the status of a particular field mask off the unused bits The bit fields are as follows Bit Number Mask If Set 1 If Clear 0 1 3 0x01 Unused always 0 4 0x10 Paper Jam Detected No Paper Jam 5 0x20 Last Label Not Removed Last Label Removed 6 0x40 Paper Is Out Paper is OK 7 0x80 No Ribbon Installed Ribbon Installed Paper Jam When the PAPER AM command is active bit 4 of the response determines of the configured paper jam condition has occurred When the PAPER AM command is not in use this bit is set to 0 Last Label Removed The sensor used for the status of this bit is the same sensor used for the AUTO PACE command In order for this bit to give valid results the peeler sensor must be engaged Not all models have the peeler accessory See your user manual for more information Paper Is Out In older printers bit 6 of this command was used to determine if the paper supply was low No current Link OS printers which support CPCL support this feature so this bit simply represents if paper is out or not for compatibility Ribb
144. ETE Short Form Aliases DEL Valid Session Types Utilities Sessions Only Linked SGD file delete Negative Aware No DELETE is used to remove a file from disk The file to be deleted can either be on the E drive or the R drive All files on these drives can be deleted Parameters Quick Reference Parameter Description Valid Range FileName CR LF Terminated String The name of the file to delete See below FileName Specifies the name of the file to delete The file name is not case sensitive All filenames in Link OS are in upper case Filenames in Link OS can be from 1 character with no extension up to 38 characters with a 5 character extension after the dot If a drive letter is not specified the file is searched for first on the E drive then on the R drive If the same file exists with both names on both the R and the E drive both will be deleted if the drive letter is not specified Files from the Z drive are read only and cannot be deleted Wildcards are supported in this command The format of the wildcard is the standard UNIX format for wildcards outlined below Any one character except a leading dot Zero or more characters except a leading dot O Defines a class of characters using for range and to exclude There are a couple specific exceptions to the above The or wildcard will not match the following file extensions NRD PAC PRF WKF WML These files
145. F and CISDFCRC functions are not needed in particular the automatic configuration files covered on page 13 2 1 DEFINE FORMAT and USE FORMAT DEFINE FORMAT or it alias DF is used to create formats for use with USE FORMAT or it s alias UF or for general use within the printer The format of the sessions is as follows DEFINE FORMAT Filename lt CR gt lt LF gt DF Filename lt CR gt lt LF gt USE FORMAT Filename lt CR gt lt LF gt UF Filename lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 308 of 329 1073699 001 Field Name Description Type Valid Range Filename The name of a filename to create on the lt CR gt lt LF gt 38 alpha numeric file system Terminated String characters plus drive letter and period for extension Both DEFINE FORMAT and USE FORMAT follow the same rules for the filename parameter For details on the file names in Link OS see page 307 DEFINE FORMAT sessions can contain any ASCII data label or utilities session data and are terminated by an END or PRINT command If terminated with the PRINT command a line containing the PRINT command and a lt CR gt lt LF gt is appended to the end of the file See these commands on page 321 and 324 for more information Note that it is not recommended to use DEFINE FORMAT sessions for download large files They must be partly parsed as they are received to look for PRINT and END commands and thus transfer far slower
146. F gt LF gt LF gt 1073699 001 11 13 GET DATE GET DATE lt CR gt lt LF gt Command Name GET DATE Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD rtc date Negative Aware No GET DATE returns the current date as set on the printer s real time clock to the host While all printers have a real time clock not all of them are battery backed up to preserve the time when the printer is powered off See your printer s documentation for more information The date is formatted in the form mm dd yyyy followed by a NUL character The date can be set either via the rtc date SGD or the SET DATE CPCL command To print the current date on a label or in line print see the Insert Current Date substitution command on page 250 Example Ul GET DATE lt CR gt lt LF gt Example Response 05 13 2013 lt NUL gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 267 of 329 1073699 001 11 14 GET TIME GET TIME lt CR gt lt LF gt Command Name GET TIME Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD rtc time Negative Aware No GET TIME returns the current time as set on the printer s real time clock to the host While all printers have a real time clock not all of them are battery backed up to preserve the time
147. F8000C1FCC1F9IC2FFC2007DC1FDC1LFFC1FEC2003FC1 gt lt SEQ FFCLFFCIFCC2001FC1LFFC1FFC1IF8C2000FCLFFCIFFC1FOO008007C1FFCIFFC1EO0 gt lt SEQ 004003C1FFC1FFC1C0052001C1FFC1FF80C300C1FFC1IFFO3C1F1C1F2087FCLFE gt lt SEQ 02C20A083FC1FC020A01101FC1F8020A00A00FC1F003C1F2004007C1E0C20200 gt lt SEQ A003C1C0C20201100180C2020A0800001201C1F2880000082000A00000228D22 gt lt SEQ 0400008950896B0000644A692080 gt 0 200 200 500 1 lt CR gt lt LF gt PCXMAG 20 15 2 2 lt LT gt SAMPLEPCX PCX lt CR gt lt LF gt T 7 0 20 120 PCXMAG Command Example 2x2 Scaling lt CR gt lt LF gt PCXMAG 20 185 6 4 lt LT gt SAMPLEPCX PCX lt CR gt lt LF gt T 7 0 20 395 PCXMAG Command Example 6x4 Scaling lt CR gt lt LF gt PRINT lt CR gt lt LF gt This example downloads a file to RAM using the CISDFRCRC16 command and then uses the insert file function to insert that file into the label two times via the PCXMAG command see page 136 11 2 5 1 Difference between USE FORMAT and File Insert CPCL FOR LINK OS PRINTERS Page 253 of 329 1073699 001 At first glance it may appear that USE FORMAT and File Insert accomplish the same function however this is not true Although both will execute commands inside a file stored on the printer the USE FORMAT command allows for field replacement while the file insert function does not See the USE FORMAT command on page 308 for more information 11 2 6 Using More Than One Insert per Line When you terminate an insert wi
148. FFFFFFFFFOOOFE F0000000000000000FF F0000000000000000FF F0000000000000000FF F0000000000000000FF FFFFFFFFFFFFFFFFFFE FFFFFFFFFFFFFFFFFFF lt CR gt lt LF gt 7 0 270 30 Expanded Graphics Example lt CR gt lt LF gt 7 0 270 56 10 byte width 27 lines lt CR gt lt LF gt RINT lt CR gt lt LF gt J J J J ai Ni aia a LE UHHH a g g g a Expanded Graphics Example 10 byte width 27 lines Command Notes and I nteractions EXPANDED GRAPHICS commands can be aligned using one of the justify commands CENTER LEFT or RIGHT SET commands do not take effect in the Data field of this command CPCL FOR LINK OS PRINTERS Page 106 of 329 1073699 001 6 12 FONT GROUP FONT GROUP Group FontNameOrNumber Size lt CR gt lt LF gt FG Group FontNameOrNumber Size lt CR gt lt LF gt Command Name FONT GROUP Short Form Aliases FG Valid Session Types Label And Utilities Sessions Linked SGD None Negative Aware No FONT GROUP is used to define groups of pre scaled fonts which can be used to for automatic font size calculation when used with various text commands in CPCL Up to a total of 10 font groups can be defined numbering from 0 to 9 Each FONT GROUP command defines a single font group which an in turn contain up to 10 pairs of font name or number and size values These values are repeated as many times as desired in the FONT GROUP command before being CR LF terminated At least one pair must
149. FORMAT is to be used with USE FORMAT a special designation a pair of backslashes can be used within the file defined with DEFINE FORMAT such that when USE FORMAT accesses it it knows to replace the designators with the definitions provided with the USE FORMAT command When a file is executed by USE FORMAT any time the character sequence is encountered the printer stops processing the file and goes back to the port from which the USE FORMAT command was encountered and begins reading data which it will use as a replacement to the sequence Data is read and fed into the position where the characters were placed until a CR and LF character are encountered from the active port at which point the CR is not inserted into the data stream but the LF is and processing resumes from the file Although it is not demonstrated in this manual LF can be used in place of CR and LF to terminate not only CPCL command lines but also individual parameters of commands Each sequence is intended to replace a single parameter in the defined format and thus each which is replaced is properly terminated There can be multiple sequences per line but keep in mind that typically will terminate the active parameter so it not possible to use more than one per parameter Any part of CPCL as long as it is one or more parameters can be replaced by In order for field replacement to work the file need only be executed with USE FORMAT Alt
150. File Size in length CRC16 Specifies four hex digits which represent the CRC16 checksum of the File Data parameter All four hex digits must be provided The digits 0000 can be used to disable the check the printer does for the checksum on the file The hexadecimal digits may be in upper or lower case If the value for checksum is non zero and the checksum does not match the data received the file is not placed on the disk and the text File CRC Error is printed on the printer The header is not included in the checksum only the File Data parameter is used in its calculation See the section below for information on how to calculate the CRC16 checksum Filename Specifies the name of the file to operate on The file name is not case sensitive All filenames in Link OS are in upper case Filenames in Link OS can be from 1 character with no extension up to 38 characters with a 5 character extension after the dot For all types of CISDF sessions the drive letter may be provided but it is always ignored and the type of CISDF session determines the target drive of the file CISDF and CISDFCRC16 always place the file on the E Drive and CISDFRCRC16 always places the file on the R drive For more information on drives and the file system in general see page 307 File Size Specifies eight hex digits which represent the size of the file All eight hex digits must be provided and this field must be properly populated as
151. Font Group 2 lt CR gt lt L ENDCONCAT lt CR gt lt L F gt R gt lt LF gt F gt R gt lt LF gt F gt LF gt LF gt E gt LF gt t Group 1 lt CR gt lt LF gt F gt R gt lt LF gt using TEXT and CONCAT lt CR gt lt LF gt h extra text lt CR gt lt LF gt h a very large amount of extra text lt CR gt lt LF gt TEXT 7 0 20 445 MULTI LINE command lt CR gt lt LF gt LTILI ort lt C ENDML lt C LTILI ESC t qui ENDML lt C PRINT lt C R gt lt R gt lt E R gt lt te R gt lt R gt lt Li U nN FG 0 lt CR gt lt LF gt ot Long lt CR gt lt LF gt Li 4 Li E 0 lt CR gt lt LF gt s short lt CR gt lt LF gt a Li F gt F gt E 40 TEXT FG 0 20 480 lt CR gt lt LF gt O TEXT FG 0 20 630 lt CR gt lt LF gt F gt F gt F gt CPCL FOR LINK OS PRINTERS Page 108 of 329 1073699 001 Font Group Example using TEXT and CONCAT TEXT command Font Grour H Font Group B with extra text Font Group with a very large amount of extra text CONCAT command Non Font Group Fa 1 FG 2 Non Font Group Font Group 1 Font Group 2 Non Font Group HHH Font Grouer 1 Font Group 2 MULTI LINE command Mot Long Short FG Not quite as short Command Notes and I nteractions The SETMAG command affects font groups in the same way it affects all text See the SETMAG command on page 151 for more informat
152. GROUP command in on page 107 for more information CPCL FOR LINK OS PRINTERS Page 159 of 329 1073699 001 Data The text data to be printed This can be up to 8191 characters and can be any character with ASCII values of 32 to 255 Examples TEXT Ibl 0 200 200 1020 1 lt CR gt lt LF gt TEXT TEXT TEXT TEXT TEXT FG 0 TEXT TEXT TEXT TEXT 7 0 20 20 TEXT example Pre Scaled Font 7 Size 0 at X 20 Y 20 lt CR gt lt LF gt 7 1 20 48 TEXT example Pre Scaled Font 7 Size 1 at X 20 Y 48 lt CR gt lt LF gt VERA TTF 30 30 20 140 TEXT example TrueType 30x30 size X 20 Y 120 lt CR gt lt LF gt VERA TTF 60 30 20 180 TrueType 60x30 size lt CR gt lt LF gt VERA TTF 30 60 20 220 TEXT example TrueType 30x60 size X 20 Y 200 lt CR gt lt LF gt 0002 0 3 0 6 lt CR gt lt LF gt FG 0 20 330 TEXT FG example Sizing Automatic X 20 FG 0 20 370 TEXT FG example Sizing Automatic X 20 FG 0 20 410 TEXT FG example lt CR gt lt LF gt VERAMONO TTF 40 40 416 650 TEXT lt CR gt lt LF gt TEXT90 VERAMONO TTF 40 40 416 650 TEXT90 lt CR gt lt LF gt TEXT180 VERAMONO TTF 40 40 416 650 TEXT180 lt CR gt lt LF gt TEXT270 VERAMONO TTF 40 40 416 650 TEXT270 lt CR gt lt LF gt CENTER lt CR gt lt LF gt ML 24 T 7 0 0 840 lt CR gt lt LF gt Example showing various fixed rotation text commands lt CR gt lt LF gt Uses TrueType font each sized 40x40 and all lt CR gt lt LF gt with origin at 416 650 lt CR gt lt LF gt
153. Generally there is no need to set this value as the default value of 50 can be used to detect most marks on media The valid range is technically 0 to 255 though in reality only values between 30 and 225 can provide meaningful gap detection When the threshold is set with this command it is not permanently stored and only applies for this power on session however it can be made permanent with the example shown below The Threshold parameter in GAP SENSE is a unit number making it difficult to use in unit systems besides dots Examples Ul GAP SENSE lt CR gt lt LF gt The following example sets the threshold as well and stores the values permanently Ul GAP SENSE 50 lt CR gt lt LF gt Ul SETVAR zpl save lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 216 of 329 1073699 001 9 9 JOURNAL JOURNAL lt CR gt lt LF gt Command Name JOURNAL Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD media type to journal The JOURNAL command and the associated LABEL command determine which of the two modes of operation are used when a mark or gap is encountered while a label is being printed after a label session is completed Both commands can be used either in a utilities session in which case they become the default until power cycle or in a label session If used in a label session the setting only takes effect for the
154. Height Specifies the scale of the barcode A value of one means each element of the Data Matrix barcode is one dot in width and height Values of 5 to 20 are recommended A value of 0 is interpreted as a value of 1 If not specified a value of 6 is used S ECC Specifies the level of error correction data put in the barcode The following levels are supported 0 No Correction Data Error detection only 50 2 8 Recovery Convolution Based Error Correction 80 5 5 Recovery Convolution Based Error Correction 100 12 6 Recovery Convolution Based Error Correction 140 25 Recovery Convolution Based Error Correction 200 25 Recovery Reed Solomon Based Error Correction CPCL FOR LINK OS PRINTERS Page 51 of 329 1073699 001 Values other than 200 should only be used when very specific backwards compatibility is required as many readers will not support these older formats The default is 0 All examples provided below use type 200 The error recovery data is much more efficiently represented in ECC 200 barcodes and the resulting symbol will be smaller C Columns R Rows Specifies the number of columns or rows to use when creating the barcode The CPCL implementation of Data Matrix only supports square symbols so it is only necessary to specify one value If both are specified and they are not the same no barcode will be printed The value must be one of the following values from the table below If it
155. II number up to 5 digits 0 to 65535 1 MSG Set low priority message Up to 88 ASCII characters Empty UPS Data Fields The following fields are only applicable when the UPS5 option in the configuration field table is selected These fields replace the MSG field in the standard data field All fields should be specified in upper case though it is not required Field Description Data Specification Modern Default SCAC Set standard carrier alpha code Up to 9 ASCII characters Yes UPSN HEAD Set transportation data format header Up to 9 ASCII characters Yes 01 lt 29 gt 96 SHIPPER Set shipper number Up to 6 ASCII characters Yes Empty PICKDAY Set Julian day of pickup Up to 3 ASCII characters No Empty SHIPID Set shipment ID number Up to 30 ASCII characters No Empty NX Set package number n of x Up to 7 ASCII characters No Empty WEIGH Set package weight Up to 3 ASCII characters No Empty VAL Set address validation One ASCII character No Empty STADDR Set ship to address Up to 35 ASCII characters No Empty TN Set tracking number Up to 18 ASCII characters Yes Use 1Z then 9 Empty ASCII Digits CITY Set city name Up to 20 ASCII characters No Empty ST Set state abbreviation 2 ASCII characters No Empty EXTRA Set additional user defined fields Up to 81 ASCII characters Yes Compressed Empty t The lt 29 gt is a raw binary values not ASCII text see page 15 CPCL FOR LINK OS PRINTERS Page 70 of 32
156. IT is used to add a delay in a label session after a label is printed Only one WAIT command can be used per label session The final WAIT command in the label is the one which is executed If the label is reprinted or if it is part of a batch the wait will occur each time it is printed Parameters Quick Reference Parameter Description Valid Range Duration 5 Digit Number Length to delay in 1 8ths of a second 0 to 65535 Duration Specifies the duration to wait before printing the label in 1 8 of a second increments Example 0 200 200 50 3 lt CR gt lt LF gt T 7 0 0 4 This is an example of the WAIT command lt CR gt lt LF gt WAIT 40 lt CR gt lt LF gt PRINT lt CR gt lt LF gt This example prints 3 labels with a 5 second delay after each one Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 287 of 329 1073699 001 11 28 VCHECKSUM VCHECKSUM lt CR gt lt LF gt Command Name VCHECKSUM Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No VCHECKSUM is used to validate that the checksum returned by the CHECKSUM command matches the actual checksum of the firmware The CHECKSUM function returns a pre calculated checksum in order to provide a quick response to the command for backward compatibility To validate that the firmware actually matches that checksum the VCHECKSUM command is used The VCHECKSUM command can
157. IX X Y H Scale S ECC C Columns R Rows F Format G EscapeChar lt CR gt lt LF gt Data lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt Command Name BARCODE DATAMATRIX VBARCODE DATAMATRIX Short Form Aliases B DATAMATRIX VB DATAMATRIX Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The BARCODE DATAMATRIX command is used to print Data Matrix barcodes in the CPCL language The command has a number of optional parameters any number of which may be specified If a parameter is specified more than once the last value specified is used Parameters Quick Reference Parameter Type Description Valid Range x 5 Digit Unit Number The X position where the barcode begins 0 to 65535 units Y 5 Digit Unit Number The Y position where the barcode begins 0 to 65535 units Scale 5 Digit Number The scale of the barcode 0 to 65535 ECC 5 Digit Number Specifies the level of error correction See Below Columns 5 Digit Number Specifies the number of columns to use See Below Rows 5 Digit Number Specifies the number of rows to use See Below Format 5 Digit Number Specifies the data format when ECC is not 200 1to6 EscapeChar Space Terminated String Specifies the escape character to use See Below Data Raw String Data for barcode See Below X Y The X and Y coordinates in units specifying where the barcode is to be placed H
158. K OS PRINTERS Page 259 of 329 1073699 001 11 8 CHAR COUNT CHAR COUNT lt CR gt lt LF gt Command Name CHAR COUNT Short Form Aliases CC Valid Session Types Utilities Sessions Only Linked SGD None Negative Aware No CHAR COUNT returns a null terminated string indicating the number of characters received since the last time the CHAR COUNT command was issued The value is always set to 0 at startup When the value is read out it is reset to 0 The size of the CHAR COUNT command is always included in the number of characters counted because the value is returned after the command is parsed CHAR COUNT counts the received characters for all data received by the printer s parsers on all interfaces not just data which is received by the CPCL parser Example Ul CHAR COUNT lt CR gt lt LF gt Example Response 17 lt NUL gt Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 260 of 329 1073699 001 11 9 DELAYED ACTIONS DELAYED ACTIONS Filename Delay lt CR gt lt LF gt Command Name DELAYED ACTIONS Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No DELAYED ACTIONS is used to execute a file that is stored on the printer after a delay Parameters Quick Reference Parameter Type Description Valid Range FileName Space Terminated String Filename to execute after delay A val
159. LS CRLF command causes the LF command to be interpreted as a combination of CR and LF CPCL FOR LINK OS PRINTERS Page 183 of 329 1073699 001 7 12 lt CR gt Carriage Return lt CR gt Command Name lt CR gt Valid Session Types Valid in line print only lt CR gt is a line print character which is used to advance the cursor along the Y axis and also reset the X axis to 0 The height advanced in the Y direction is specified by height parameter of the the SETLP command see page 176 By default the value is 24 Example CR IbI This is a demonstration of lt CR gt lt LF gt lt CR gt lt LF gt Line with CR Only lt CR gt Line with CR Only lt CR gt Line with CR Only lt CR gt lt CR gt lt LF gt ormal line with CR and LF ormal line with CR and LF ormal line with CR and LF CR lt CR gt lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt ote how the CR only lines do not have the lt CR gt lt LF gt additional spacing added by the LF lt CR gt lt LF gt his is a demonstration of CR ormal line with CR and LF ormal line with CR and LF ormal line with CR and LF ote how the CR only lines do not have the dditional spacing added by the LF Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 184 of 329 1073699 001 7 13 lt ESC gt g Line Print Graphics lt ESC gt g lt ByteWidth gt lt Data gt
160. MAG 6 24 PERSIST CPCL FOR LINK OS PRINTERS Page 4 of 329 27 29 33 34 37 38 40 40 44 51 58 69 73 78 85 87 89 92 94 96 101 104 104 107 110 112 114 117 118 120 124 127 130 134 136 138 1073699 001 6 25 6 26 6 27 6 28 6 29 6 30 6 31 6 32 6 33 6 34 PRINT RIGHT ROTATE SCALE TEXT SCALE TO FIT SETBOLD SETMAG SETSP TEMP MOVE TEXT 7 LINE PRINT COMMANDS 7 1 7 2 7 3 7 4 7 5 7 6 7 7 7 8 7 9 7 10 7 11 7 12 7 13 Line Print System Details LMARGIN LP LF EQUALS CRLF LP ORIENT RX RY RXY SETLF SETLP SETLP BUFFER SETLP TIMEOUT X Y XY lt LF gt Line Feed lt CR gt Carriage Return lt ESC gt g Line Print Graphics 8 FONT COMMANDS 8 1 Introduction to CPCL Font Types 8 1 1 CPF Comtec Pre scaled Fonts 8 1 2 CSF Comtec Scaleable Fonts 8 1 3 TTF True Type Fonts 8 2 8 3 Built in CPCL Fonts Detailed CPF File Format Information 8 3 1 File Header 8 3 2 Character Pages 8 3 2 1 Header 8 3 2 2 Offset Table 8 3 2 3 Glyph Data CPCL FOR LINK OS PRINTERS Page 5 of 329 139 140 142 144 146 148 151 154 156 158 163 164 166 168 170 173 175 176 179 180 181 183 184 185 188 189 189 189 189 190 190 191 192 192 193 194 1073699 001 8 3 2 4 8 3 2 5 8 3 2 6 8 3 2 7 8 3 2 8 8 3 2 9 8 3 3 8 4 8 3 3 1 8 3 3 2 8 3 3 3 8 3 3 4 8 3 3 5 8 3 3 6 8 3 3 7 8 3 3 8 8 3 3 9 Glyphs Types
161. MAGE BYTES LineCount Start lt CR gt lt LF gt Command Name DUMP IMAGE Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No DUMP IMAGE dumps the label memory of a label session currently being rendered The command can either dump label memory in bytes or in bits If the BYTES option is specified the label data is returned in hexadecimal bytes otherwise it is returned in binary This command can only be used in label sessions and the label data is dumped at the time the command is parsed Note that the dumping can take a rather long time and during that time no other system operations can occur Parameters Quick Reference Parameter Type Description Valid Range LineCount 5 Digit Number The number of dot lines to dump 0 to 65535 Start 5 Digit Number The starting dot line to dump 0 to 65535 LineCount Specifies how many dot lines do dump The dumped data is always the entire byte width of the label as determined by the PAGE WIDTH command If the LineCount plus the Start is greater than the defined height of the label session as defined on the first line of the session the LineCount will be automatically reduced to the maximum amount that can be transmitted based on the value of Start Start An optional parameter which specifies the dot row that dumping is to begin on 0 represents the first dot row If the value f
162. N value CPCL FOR LINK OS PRINTERS Page 174 of 329 1073699 001 7 6 SETLF SETLF Height lt CR gt lt LF gt Command Name SETLF Short Form Aliases None Valid Session Types Utilities sessions only Linked SGD None Negative Aware No SETLF is used in line print mode to set how much media is fed by the printer when the LF character is received by the printer At power on this value is set to 10 which puts a space of 10 pixels between each row of line print printed characters Note that this space is an addition to any space defined by the font itself which is specified by the SETLP command on page 176 Any value set is persistent until reboot except if the AUTOCAL command is run which sets it to 0 SETLF can perform an important function regarding the ability to print PCX images and barcodes in line print mode When a barcode or PCX image is printed in line print without any modifications the maximum height of the output will be the value specified by SETLF 10 by default plus the height value specified for SETLP 24 by default or 34 pixels Adjusting the SETLF value up allows a larger maximum height to be printed See page 175 for an introduction to line print for more information Parameters Quick Reference Parameter Description Valid Range Height 5 digit Unit Number Specifies the height fed when an LF is received 0 to 32767 Height Specifies the height in units which is fed with
163. NT command is encountered the previous field will be adjusted by the amount specified Specifying a at the start of the value is the same as specifying no sign character at all the default is positive Field Specifications for Use with COUNT The COUNT command always appears after the line it is to affect The TEXT command including all rotations TEXT90 TEXT180 TEXT270 and so on and the BARCODE command are the only commands that COUNT will have an effect on COUNT will automatically affect the text portion of a barcode when using the BARCODE TEXT command Using COUNT to adjust TEXT lines that use TrueType fonts or BARCODE TEXT fields which use TrueType fonts is not supported A text line to be adjusted with COUNT can contain any text letters spaces and numbers but must end with one or more digits and the total size of the field must be less than 59 characters If it does not meet these requirements the COUNT command is ignored CPCL FOR LINK OS PRINTERS Page 101 of 329 1073699 001 The digit or digits at the end of the field are the ones adjusted by the amount specified by the Adjust parameter each time the label is printed The number of digits of the field affected by COUNT is based on how many digits are present in the field being modified If the number of digits in the field is less than the number of digits in Adjust not including the sign the field data will be expanded the number of digits in Adjust and then the
164. NTERS Page 189 of 329 1073699 001 True Type fonts for CPCL are unmodified and fully comply to the standard for TTF fonts Any standard TTF font can be used with the printer by adding an appropriate downloadable header see the CISDFCRC16 session type on page 311 and transmitting it to the printer 8 2 Built in CPCL Fonts There are 7 built in bitmap fonts in CPCL with numbers from 0 to 7 there is no font 3 The following table shows the font numbers as they would be used in the printer then the size value Following that there is the width and height multipliers then the character height and character width F S Width Height Char Height Char Width 0 0 1 1 9 8 0 1 2 1 9 16 0 2 1 2 18 8 0 3 2 2 18 16 0 4 3 2 18 32 0 5 2 3 36 16 0 6 3 3 36 32 1 0 1 1 48 8 25 Variable 2 0 1 1 12 20 2 1 1 2 24 20 4 A 0 1 1 47 8 43 Variable 4 A 1 1 2 94 8 43 Variable 4 B 2 1 Y 45 26 51 Variable 4 B 3 1 1 90 26 51 Variable 4 B 4 1 2 180 26 51 Variable 4 B 5 1 3 270 26 51 Variable 4 B 6 1 4 360 26 51 Variable 4 B 7 1 5 450 26 51 Variable 5 0 1 1 24 5 23 Variable 5 1 1 2 48 5 23 Variable 5 2 2 2 46 8 39 Variable 5 3 2 3 92 8 39 Variable 6 0 1 1 27 28 7 0 1 1 24 12 7 1 1 2 48 12 The table shows font 4 with both A and B options This font is only referred to as font 4 but has two glyph sets it is an ECPF font 8 3 Detailed CPF Fil
165. Note that the following barcode and text are b oth offset 80 pixels whereas this text is 20 This text is offset 80 pixels Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 167 of 329 1073699 001 7 3 LP LF EQUALS CRLF LP LF EQUALS CRLF Option lt CR gt lt LF gt Command Name LP LF EQUALS CRLF Short Form Aliases None Valid Session Types Utilities sessions only Linked SGD None Negative Aware No The LP LF EQUALS CRLF command is used to tell the printer that when printing line print text the LF character is equivalent to the two characters CR and LF This command only applies to line print text it has no effect on any other part of the printer s operation The value is persistent until reboot or until changed The default value is OFF Parameters Quick Reference Parameter Description Valid Range Option Space terminated string Specifies the enable or disable of the function ON or OFF Option Specifies if the printer is to interpret LF characters as CR and LF together If the value is ON the printer will interpret the LF character as CR and LF If it is set to OFF which is default it will interpret the LF character as LF only Any other value is ignored and results in no change to the setting Example LP LF EQUALS CRLF Ibl Demonstration of LP LF EQUALS CRLF command lt CR gt lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt Ul LP LF EQUALS CRLF
166. OO00000FFO00F FOOOFFOOQOOOFFOOOE FOOOFFOOQOOOFFOOOE FOOOFFOOQOOOFFO00 F0000000000000000F 0000000000000000 F0000000000000000F F0000000000000000F 0000000000000000 FOOOFFOOOQOOOFFOOOE FOOOFFOOQOOOFFO00 FOOOOFFFFFFFFOOOOF FOOOOFFFFFFFFOOOOF F0000000000000000F F0000000000000000F 0000000000000000 F0000000000000000F 0000000000000000 F0000000000000000F FEFEFFEFEFEFFEFEFEFE FEFEFFFEFFFEFFFEFE F gt R gt lt LF gt Ul LMARGIN 0 lt CR gt lt LF gt Command Notes and I nteractions E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C F gt lt C F gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C E gt lt C raphics command I R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt Example printing with Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li Li g 7 I i A a k2 ey ki Ki ki 7 7 zI ki a 7 es ki
167. ORT Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No ABORT terminates a label session in progress without performing any printing Any label data received so far as part of this session is lost except if PERSIST is enabled see below Example within a label session ABORT lt CR gt lt LF gt Command Notes and I nteractions If the PERSIST command is set to ON a partially received label format terminated with ABORT will be drawn to the label memory CPCL FOR LINK OS PRINTERS Page 255 of 329 1073699 001 11 4 BAUD BAUD Value lt CR gt lt LF gt Command Name BAUD Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD comm baud Negative Aware No BAUD sets the current baud rate of the serial port When executed it permanently sets the comm baud SGD When the command is issued it takes effect immediately and is persistent through reboots The command has no effect on printers which do not have serial ports The default value of BAUD depends on the particular printer Parameters Quick Reference Parameter Description Valid Range Value 5 Digit Number The baud rate of the serial port See below Value Specifies the baud rate to set the serial communications port to Valid values are 115200 57600 38400 19200 4800 2400 and 1200 Not all printers support all baud rate
168. OrNumber The name or the number of the pre scaled or internal font to use when rendering the text string This can be a number defined in the font file or the font s name with or without file extension FontSize The size of the font to print These sizes are defined within the font specified See page 190 for size values for built in fonts The size selection can be overridden by SETMAG TrueTypeFontName Specifies the name of the TrueType font to use when printing the barcode text The entire filename of the font including extension must be specified The file must have a TTF or FNT extension XScale YScale The X and Y size of the TrueType font in dots Using the same value for XScale and YScale will make the font appear proportionally correct A value less than 10 is interpreted as 10 A value greater than 1450 is interpreted as 1450 For most labels this printer has 200 dots per inch so an X and Y of 200 will make a character approximately 1 inch high FG FontGroupNumber The number of the font group to be used for the text Even though this is a space terminated string it must be an ASCII number of a font group and must be in the range of 0 to 9 the max supported font groups and must have been previously defined with a FONT GROUP command If it is not the TEXT command fails and the remainder of the text is processed as additional label commands Note that the text FG must precede the font group number See the FONT
169. Parameters Quick Reference Parameter Description Valid Range Date CR LF Terminated String The date to set the real time clock to See below Date A CR LF terminated string parameter that has contains the date to set the real time clock to The format of the date is mm dd yyyy All digits must be provided when setting the date including any leading zeros The valid range for the year parameter is 1990 to 2089 If any part of the date is invalid the date is not set Example Ul SET DATE 05 04 2013 lt CR gt lt LF gt Command Notes and I nteractions The range for the date is different between rtc date and this command rtc date having a somewhat wider range CPCL FOR LINK OS PRINTERS Page 281 of 329 1073699 001 11 23 SET TIME SET TIME Time lt CR gt lt LF gt Command Name SET TIME Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD rtc time Negative Aware No SET TIME sets the current time on the printer s real time clock While all printers have a real time clock not all of them are battery backed up to preserve the time when the printer is powered off See your printer s documentation for more information The time is formatted in the form hh mm ss The time can be read via the rtc time SGD or via the GET TIME CPCL command Parameters Quick Reference Parameter Description Valid Range Time CR LF Terminated String The time to set the
170. R the Range with LEFT has no effect on the printed output in terms of the functions it performs for CENTER and RIGHT in terms of specifying the center point or right most point of the label When used with LEFT the only function Range performs is a field specification function for FONT GROUP specifying the right edge for text printed either with the TEXT command or CONCAT and used to control sizing See the FONT GROUP documentation on page 107 for more information Range is an optional parameter and is set to 0 if omitted Examples CENTER LBL See the CENTER command in on page 92 for an example which uses LEFT Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 117 of 329 1073699 001 6 17 LINE LINE X Y EndX Endy Thickness lt CR gt lt LF gt L X Y EndX Endy Thickness lt CR gt lt LF gt Command Name LINE or L Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The LINE command is used to draw a line LINE has two modes of operation based on whether or not one side of the line is flat If the line is straight X and EndX are the same or Y and EndY are the same you can align the line using the CENTER LEFT and RIGHT commands You can also use the PATTERN command to fill the line with a pattern The PATTERN command can be used to create white lines If the line is diagonal it cannot be aligne
171. R LINK OS PRINTERS Page 67 of 329 1073699 001 The BARCODE TEXT command cannot be used to print numeric representations under barcode created with this command no text will print The justify commands LEFT RIGHT and CENTER do not have any effect on barcodes created with this command The height of a single element within the 2D portion or a composite barcode is always 2 and cannot be adjusted CPCL FOR LINK OS PRINTERS Page 68 of 329 1073699 001 6 2 5 MaxiCode Code Barcode BARCODE MAXICODE X Y lt CR gt lt LF gt Field Data lt CR gt lt LF gt ENDMAXICODE lt CR gt lt LF gt VBARCODE MAXICODE X Y lt CR gt lt LF gt Field Data lt CR gt lt LF gt ENDMAXICODE lt CR gt lt LF gt Command Name BARCODE MAXICODE VBARCODE MAXICODE Short Form Aliases B MAXICODE VB MAXICODE Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The BARCODE MAXICODE command is used to print MaxiCode barcodes in the CPCL language Only type 2 MaxiCode barcodes which contain formatted data with a structured carrier message a d numeric postal code can be used in CPCL VBARCODE MAXICODE is identical to BARCODE MAXI MaxiCode barcodes do not print in vertical orentation The barcode consists of fields that are represented with a field name followed by data This field and data line can be repeated as many times as necessary to complete the barcode
172. R gt lt LF gt PRINT lt CR gt lt LF gt This example defines a file called TEST FMT and defines a short label within the format and then uses the PRINT command to both write the PRINT command to the file and then terminate the DEFI NE FI LE session See page 308 for more information on define file sessions Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 324 of 329 1073699 001 13 10 TYPE TYPE FileName lt CR gt lt LF gt Command Name TYPE Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD file type Negative Aware No The type command is used instruct the printer to transmit the contents of a file to the host The file will be transmitted on the same port on which the command was received Not all files can be typed The same rules apply to this command as do to the file type SGD The following file extensions cannot be typed An attempt to type a file with any of these extensions will result in no data being returned CPF CSF FNT BAZ NRD PAC TTF TTE BAE PRF WKF If the file specified does not exist the text File Not Found lt cR gt lt LF gt will be returned Parameters Quick Reference Parameter Description Valid Range FileName CR LF Terminated String The name of the file to operate on See below FileName Specifies the name of the file to return the contents of Th
173. RS Page 28 of 329 1073699 001 4 1 Alphabetical Command Lists This section provides an alphabetical list of all CPCL commands their basic function their classification and on what page in this document full documentation can be found CPCL Command Type Label Utilities Description ABORT Utility amp Diagnostic Yes No Aborts current label format 255 AUTOCAL Media Management No Yes Calibrates sensor thresholds 209 AUTO PACE Media Management Yes Yes Delays future prints until previous is taken 210 B Label Formatting Yes Yes Line Print Alias for BARCODE 38 BARCODE Label Formatting Yes Yes Line Print Prints a barcode in label mode 38 BARCODE TEXT Label Formatting Yes Yes Turns on or off text line below barcodes 85 BAR SENSE Media Management Yes Yes Enables the media mark or bar sensor 212 BAT INDICATOR Label Formatting Yes No Prints an indicator showing battery charge 87 BAUD Utility amp Diagnostic No Yes Changes serial port baud rate 256 BEEP Utility amp Diagnostic Yes Yes Makes the printers beeper sound 257 BI Status Enquiry Yes No Alias for BAT INDICATOR 87 BOX Label Formatting Yes No Draws a box 89 BT Label Formatting Yes Yes Alias for BARCODE TEXT 85 CAPTURE Utility amp Diagnostic Yes Yes Captures incoming print data to file 258 cc Utility amp Diagnostic No Yes Alias for CHAR COUNT 260 CENTER Lab
174. SCI characters from font size page 0 and interprets any high ASCII character as an entry into a two byte sequence The first character has the high bit stripped and is saved for use as the size character page to use for the character The next character is used as the character index into the page Unlike the previous encodings the high bit is not stripped and there are no issues with interleaved low ASCII characters as they are valid second characters in the sequence Example sequences e Only low ASCII characters The byte sequence 0x40 0x41 0x42 will print the characters 0x40 0x41 and 0x42 from size character page 0x00 e High ASCII sequence The byte sequence OxCA OxFE will print the character OxFE from size character page Ox4A e High ASCII gt low ASCII character The byte sequence 0xCA 0x40 will print the character 0x40 from size 0x4A 8 3 4 3 JAPAN S Shift JIS Encoding The J APAN S country code is similar to BIG5 except that the high ASCII characters 0xA0 through OxDF the half width Kana characters are not entry points into a multi byte sequence but are printed from size character page 0 8 3 4 4 THAI Encoding The THAI country code has 2 types of characters single byte and double byte characters The single byte characters are those that fall into these ranges inclusive 0x10 0x20 0x23 Ox7E These characters are referenced directly from size character page 0 All other characters are the first byt
175. SET TIME Yes Yes Sets current time 282 SET VERSION No Yes Sets response of the VERSION command 283 SETVAR Yes Yes Seta configuration setting 284 setvar Yes_ Yes Lower case alias of SETVAR 284 TIMEOUT No Yes Sets power off inactivity timeout 286 VCHECKSUM No Yes Validates the application checksum 288 WAIT Yes No Delays the specified amount of time 287 X Yes No Specifies a constant X coordinate to use in label formatting functions 289 XY Yes No Specifies a constant X and Y coordinate to use in label formatting functions 289 Y Yes No Specifies a constant Y coordinate to use in label formatting functions 289 lt BEL gt Sounds the printer s bell 291 lt BS gt Backs up the text cursor one character 292 lt ESC gt Set or Get CCL Key 293 lt ESC gt 1 Send Two key report to host 294 lt ESC gt JRU Send user label count 294 lt ESC gt N Acknowledge reset 295 lt ESC gt p Shut printer down 295 lt ESC gt V Print Two Key report 296 CPCL FOR LINK OS PRINTERS Page 245 of 329 1073699 001 11 1 Two Key Report Information The two key report is a diagnostic and settings report that all CPCL printers can print It can be obtained in several ways All Link OS printers that support CPCL can be made to print a two key report at startup by holding down the feed button at startup while powering on the printer It is only necessary to hold the key for 5 seconds Printers with displays will advise you that the two key report will be
176. T gt TIME lt CR gt lt LF gt PRINT lt CR gt lt LF gt 11 2 3 Insert SGD Value This function allows you to replace any parameter the value of an SGD setting Normally this command is used as the final or only item on a given command line and is terminated with CR and LF however the special LF termination mode can be used to continue parsing afterwards See section 11 2 5 1 for details and examples Note that only up to 512 bytes of an SGD can be inserted in this way due to buffer limitations in the printer Any data beyond the 512 byte mark will be truncated This function can be used to set an SGD to the value of another SGD if you use the special multi substitution LF character to terminate See the example below and further below for information on how this works Examples 0 200 200 75 1 lt CR gt lt LF gt TEXT 7 0 0 50 Firmware Name lt LT gt appl name lt CR gt lt LF gt PRINT lt CR gt lt LF gt This example prints out the appl name SGD in a label Ul SETVAR device user_pl lt LT gt device unique_id lt LF gt lt CR gt lt LF gt Ul GETVAR device user_p1 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 251 of 329 1073699 001 This example sets the value of the device user_p1 SGD to the current value of the device unique_id SGD Note how the device unique_id SGD is terminated with an LF This is the special operation mode mentioned below and is used here to terminate the text being placed via the inse
177. TXT lt CR gt lt LF gt T 7 0 0 0 This is text line 1 lt CR gt lt LF gt T 7 0 0 25 This is text line 2 lt CR gt lt LF gt T 7 0 0 50 This is text line 3 lt CR gt lt LF gt END lt CR gt lt LF gt 0 200 200 100 1 lt CR gt lt LF gt lt LT gt TEXTLINES TXT lt CR gt lt LF gt PRINT lt CR gt lt LF gt This example defines the TEXTLINES TXT command which contains three CPCL text commands and then uses the insert function to insert that file into the label printing those text lines as CPCL commands CISDFRCRC16 lt CR gt lt LF gt 4384 lt CR gt lt LF gt SAMPLEPCX PCX lt CR gt lt LF gt 000001EE lt CR gt lt LF gt 4362 lt CR gt lt LF gt lt SEQ 0A050101000000002F002F00480048000F0FOFOEOEOEODODODOCOCOCOBOBOBOA gt lt SEQ 0A0A090909080808070707060606050505040404030303020202010101000000 gt lt SEQ 0001060001 000000000000000000000000000000000000000000000000000000 gt lt SEQ 0000000000000000000000000000000000000000000000000000000000000000 gt lt SEQ 037775BAC1DDA0015A9EC1CF66C1CO000A5C1E2B4BB0000017BC1D70D0000396D gt lt SEQ 7554000044C20040008040C1CFC1CE4C00C1C038C2295201C1E004C1E9295E03 gt lt SEQ C1F045C2295007C1F838C1E92E4COFCIFCC20008001FC1FE003FC1E8003FC1FF gt lt SEQ 000540007FC1FF800AB800C1FFCLFFC1C006C1D001C1FFCLEEC1E002C1C00377 gt lt SEQ CLEEC1F001400777C1EEC1F800800F77C1EECIFCC2001F77C1EECIFEC2003F77 gt lt SEQ CLEECIFFC2007F77C2FF8000C1FF779F3FC1LCO01C2FFCICE7FCLEO0O3C1FFO7C1 gt lt SEQ FLCLFFC1CO01C1FE73C2F
178. The COMPRESSED GRAPHICS command and its alias can be used in utilities sessions without a label header in order to directly print graphics When using this command in this mode the X and Y parameters are not used instead use the line print X Y and XY commands to position the graphics See page 181 for more information on those commands CPCL FOR LINK OS PRINTERS Page 94 of 329 1073699 001 In this mode the height of the graphics is also limited to the height of the line print buffer as set by SETLP BUFFER command see page 179 By default this value is set to 2400 pixels If based on the current Y position the graphic will not fit in the remaining area in the buffer the buffer will be immediately printed and the Y cursor reset to 0 Any attempt to print more than will fit in that buffer will be parsed but disposed of Examples COMPRESSED GRAPHICS LBL Be sure to see page 15 for information on how binary data is represented with SEQ 0 200 200 150 1 lt CR gt lt LF gt COMPRESSED GRAPHICS 10 27 30 30 lt SEQ FFFFFFFFFFFFFFFFFFFF gt lt SEQ FFFFFFFFFFFFFFFFFFFF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FFOOOFFOOOO00FFOOOFF gt lt SEQ FFOOOFFOOOOOOFFOOOFF gt lt SEQ FFOOOFFOOOOOOFFOOOFF gt lt SEQ FFOOOFFOOOOOOFFOOOFF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000000000000000FF gt lt SEQ FF0000
179. The RIGHT command is used to change the justification of supported fields It is part of a series of justification commands which includes LEFT CENTER and RIGHT The following commands support justification BARCODE all 1D types BARCODE MAXICODE BOX CONCAT INVERSE LINE REVERSE LINE LINE PCX PCX90 PCX180 PCX270 PCXMAG SCALE TEXT SCALE TO FIT TEXT TEXT90 TEXT180 TEXT270 COMPRESSED GRAPHICS EXPANDED GRAPHICS This command takes an optional parameter range which specifies the number of pixels from the left edge of the page to use when centering RIGHT is persistent within the label format but the field alignment is always set to LEFT when the session ends Parameters Quick Reference Parameter Description Valid Range Range 5 Digit Unit Number Sets the location of the right side to justify to 0 to 65535 Range The range parameter is an optional parameter that changes the width of the media that is used perform the right alignment operation Specifying a value of 0 means to right align subsequent fields over the entire active width as specified by the PAGE WIDTH command If not specified a value of 0 is used If for some reason the value for Range is invalid justification is reset to LEFT The range can be larger than the physical page width but this may cause text to wrap around the edge of the label and appear on the other side If the field being centered is wider than the range the f
180. UFFER is used to set the height of the line print buffer This buffer represents the maximum area that can be written to in a single line print transaction Typically the size of this buffer does not require adjustment because Link OS CPCL will seamlessly join line print buffers while printing normal text or line print graphics There are a small number of cases for which this command is needed however such as printing a PCX or Barcode longer than the default SETLP BUFFER size The default buffer at power on is 2400 dots Any value set will remain active until it is changed or until reboot Parameters Quick Reference Parameter p Description Valid Range Height 5 digit Unit Number Specifies the size of the line print buffer in units 0 to 2400 dots Height Specifies the height in units of the line print buffer The line print buffer can be set to values between 0 and 2400 dots Specifying a value of 0 or a value greater than 2400 will result in it being set to 2400 Example SETLP BUFFER IbI This example needs replacement U1 SETLP BUFFER 2600 lt CR gt lt LF gt Ul SETLF 2600 lt CR gt lt LF gt Ul BT 7 0 0 lt CR gt lt LF gt Ul BARCODE 128 1 2 2600 0 0 12345 lt CR gt lt LF gt No example image is provided for this label because it causes the printer to crash Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 179 of 329 1073699 001 7 9 SETLP TIMEOUT SETLP TIMEOUT Timeout lt CR g
181. Up to 12 characters Prefix Space Terminated String Unit width of the barcode in dots Up to 12 characters PostFix Space Terminated String Configuration options for barcode Up to 12 characters Timeout Specifies the timeout of the MCR command in 1 8 second increments The timeout specifies how long the MCR command remains active before expiring Once the command expires the MCR system is disabled and no reading will occur This parameter must be specified If the value is invalid the MCR command is ignored If the ERRORS option is enabled and the timeout elapses without a read a Time out error will be raised A timeout value of zero specifies that there is no timeout and the MCR system will remain active until the MCR CAN command is received or until a new MCR command overrides the current one DEL Delimiter Specifies two characters which are used in combination with the track number in order to indicate the track number information in the reply to the host The track number is inserted between the two characters specified in the output By default the two characters are T and which in the output create T1 T2 and T3 as the track numbers This would be represented as follows DEL T The inserting of the track number into the output is control by the TN and NTN options The delimiter is always added to the output of a successful read Any characters except NUL and space can be used for the delimiter EPR
182. X Y The X and Y coordinates in units specifying where the origin of the line is to be placed Data The entire PCX file to be printed This must include the header and the RLE compressed data The data size to be transmitted is determined by the PCX file format itself and does not need to be specified The Data field must be terminated with a lt CR gt lt LF gt after the last character of the binary data Data may contain all binary values including NUL characters Use in Utilities Sessions for Line Print The PCX command used in utilities sessions without a label header in order to directly print graphic images When using this command in this mode the X and Y parameters are not used instead use the line print X Y and XY commands to position the graphics See page 181 for more information on those commands CPCL FOR LINK OS PRINTERS Page 134 of 329 1073699 001 In this mode the height of the PCX image is limited to the height of the line print buffer as set by SETLP BUFFER command see page 179 By default this value is set to 2400 pixels If based on the current Y position the graphic will not fit in the remaining area in the buffer the buffer will be immediately printed and the Y cursor reset to 0 Any attempt to print more than will fit in that buffer will be parsed but disposed of Examples PCX LBL The label data for PCX LBL contains a large amount of binary data and is not meaningful to represent in tex
183. Zabcd1234567 lt CR gt lt LF gt ENDML lt CR gt lt LF gt LEFT lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 66 of 329 1073699 001 GS1 128 Type 11 MicroPDF CCC A CC B With Composite Scale 2 1D Data 910005886 FNC1 100000410549 FNC1 9905 2D Data 1A41B2C3D4E5F6G7H8 His Vath is iat ata tw EC Heat ts 9 GS1 128 Type 12 PDF417 CC C With Composite Scale 2 1D Data 910005886 FNC1 1090000410549 FNC1 9905 2D Data repeated 3 times ABCDEFGHIJKLMNOPQRSTUVWXYZabcd1234567 Use in Utilities Sessions for Line Print In versions of Link OS greater than 19 6 The BARCODE command and all its variants can be used in a utilities session to print a barcode in line print mode The printer does not have to be in line print mode for this command to be used in utilities mode The X and Y parameters of the barcode must be specified but have no effect instead the X Y RX RY XY or RXY commands must be used to specify the location of the barcode Note that only the BARCODE command operates in line print mode VBARCODE does not It may be necessary to use the SET LF command to be able to see the entire height of the barcode See the Introduction to Line Print on page 25 for more information Utilities Example Ul SETLF 160 lt CR gt lt LF gt Ul BARCODE RSS 0 0 2 0 0 0 10 1234567 2D Barcode Data lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt Command Notes and I nteractions CPCL FO
184. a value of 1 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 154 of 329 1073699 001 20 110 SETSP with a value of 2 lt CR gt lt LF gt pD 0 p 0 20 134 SETSP with a value of 3 lt CR gt lt LF gt SETSP 5 lt CR gt lt LF gt 0 20 158 SETSP with a value of 5 lt CR gt lt LF gt pD 0 D 20 182 SETSP with a value of 10 lt CR gt lt LF gt 0 lt CR gt lt LF gt PRINT lt CR gt lt LF gt SETSP Example SETSP with a value of SETSP with a value of 1 SETSP with a value of 2 SETSP with a value of 3 SETSP with a value of 5 SETSP with a value of 1 Command Notes and Interactions When using SETBOLD it may be desirable to set the value of SETSP to the same value used for SETBOLD to increase readability CPCL FOR LINK OS PRINTERS Page 155 of 329 1073699 001 6 33 TEMP MOVE TEMP MOVE MoveRight MoveUp lt CR gt lt LF gt Command Name Move Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware Yes The TEMP MOVE command moves the origin of the next or current label session The effect is most pronounced when using a media that synchronizes to marks It does affect continuous mode labels but the effects may be difficult to see particularly with the MoveUp parameter The TEMP MOVE command is available in both label and utilities sessions and only applies to the next or current label session After the ses
185. a width_sense_enable SGD the sensor will be read each time a label session is started and that value will be used as the page width If Width is zero and the printer does not have a media width sensor or it is disabled the last non zero value that was set for PAGE WIDTH is used If no value for page width besides 0 was ever set in this case the value is the physical width of the print head on the printer If Width is larger than the physical print head width the width is set to the full width of the print head Examples PAGE WIDTH LBL This example changes the page width using the PAGE WIDTH command You may wish you reset the page width after using this example This example prints three labels CPCL FOR LINK OS PRINTERS Page 127 of 329 1073699 001 0 200 200 250 1 lt CR gt lt LF gt PAGE WIDTH 300 lt CR gt lt LF gt BOX 0 0 299 249 O0 lt CR gt lt LF gt LINE 0 0 299 249 0 lt CR gt lt LF gt LINE 299 0 0 249 0 lt CR gt lt LF gt CENTER lt CR gt lt LF gt T 7 0 0 0 Top Edge Of Label lt CR gt lt LF gt T90 7 0 0 249 Left Edge of Label lt CR gt lt LF gt T 7 0 0 225 Bottom Edge Of Label lt CR gt lt LF gt T270 7 0 299 0 Right Edge of Label lt CR gt lt LF gt T 7 1 0 60 Page Width lt CR gt lt LF gt T 7 10 100 Value 300 lt CR gt lt LF gt PRINT lt CR gt lt LF gt 0 200 200 250 1 lt CR gt lt LF gt PAGE WIDTH 576 lt CR gt lt LF gt BOX 0 0 575 249 0 lt CR gt lt LF gt LINE 0 0 575 249 0 lt CR gt lt LF
186. ach individual line must not exceed the corresponding Data field in TextCommand which is typically 8191 bytes CPCL FOR LINK OS PRINTERS Page 124 of 329 1073699 001 Data lines are permitted to be blank When this occurs an empty line of LineHeight size will be inserted Termination Each MULTILINE command must be terminated with either the ENDML or ENDMULTILINE command followed by a CR and LF Both terminating commands work for both the long and short form of MULTILINE Examples MULTILINE LBL 0 200 200 580 1 lt CR gt lt LF gt MULTILINE 24 TEXT 7 0 40 20 lt CR gt lt LF gt Multiline Example With TEXT command lt CR gt lt LF gt Pre Scaled Font 24 dots between lines lt CR gt lt LF gt lt CR gt lt LF gt Each line is terminated with a CR and LF lt CR gt lt LF gt Left Aligned lt CR gt lt LF gt lt CR gt lt LF gt ENDML lt CR gt lt LF gt CENTER lt CR gt lt LF gt MULTILINE 30 SCALE TEXT VERA TTF 10 10 40 160 lt CR gt lt LF gt Multiline Example With SCALE TEXT lt CR gt lt LF gt True Type Font 30 lt CR gt lt LF gt dots between lines lt CR gt lt LF gt Each line is terminated with a CR and LF lt CR gt lt LF gt Center Aligned lt CR gt lt LF gt ENDML lt CR gt lt LF gt UL ul True Type Font 40 lt CR gt lt LF gt Ea ot Aligned lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt TILINE 40 SCALE TO FIT VERASEBD TTF 378 40 40 320
187. age 113 of 329 1073699 001 6 15 INVERSE LINE NVERSE LINE X Y L X Y Endx EndX Endy Thickness lt CR gt lt LF gt EndY Thickness lt CR gt lt LF gt Th Y I VERSE LINE X L X Y Endx EndX EndY Thickness lt CR gt lt LF gt Endy ickness lt CR gt lt LF gt J JHH lt Command Name INVERSE LI NE or IL REVERSE LINE or RL Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The INVERSE LI NE command is used to draw a line which inverts the label area over which it is drawn LINE has two modes of operation based on whether or not one side of the line is flat If the line is straight X and EndX are the same or Y and EndY are the same you can align the line using the CENTER LEFT and RIGHT commands If the line is diagonal it cannot be aligned or filled Parameters Quick Reference Parameter Type Description Valid Range x 5 Digit Unit Number The X origin of the line 0 to 65535 Y 5 Digit Unit Number The Y origin of the line 0 to 65535 EndX 5 Digit Unit Number The X coordinate where the line ends 0 to 65535 EndY 5 Digit Unit Number The Y coordinate where the line ends 0 to 65535 Thickness 5 Digit Unit Number The thickness of the line 0 to 65535 X Y The X and Y coordinates in units specifying where the origin of the li
188. also be used to advance the form For a more detailed explanation of how line print works see section 7 1 on page 164 CPCL FOR LINK OS PRINTERS Page 25 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 26 of 329 1073699 001 4 CPCL Commands Overview Once you enter a CPCL session as documented on page 38 you can then use CPCL commands to accomplish printing or configuration tasks This section provides documentation for all CPCL commands supported in the Link OS version of CPCL and is divided into a number of section areas based on functions The layout of this section of the manual is as follows Alphabetical Command List o CPCL Command List o Comtec Escape Command List Understanding How Commands are Documented CPCL Label Formatting Commands o Introduction to Label Formatting Commands o CPCL Label Formatting Commands CPCL Line Printing Commands o Introduction to Line Printing in CPCL o CPCL Line Printing Commands CPCL Font Commands o Introduction to Fonts in CPCL o CPCL Code Page and Encoding Commands o CPCL Font Formats Media Management Commands o Overview and Common Cases in Media Management Status Enquiry Commands Utility and Diagnostic Commands o Two Key Diagnostic Report Magnetic Card Reader Commands File System Commands o Introduction to the CPCL file system in Link OS o Define and Use File Sessions o CISDF and CIDSFCRC File Sessions CPCL FOR LINK OS PRINTERS Page 27 of 329 1073699 001 CPCL FOR LINK OS PRINTE
189. alue of the command itself is used Note that only the BARCODE command operates in line print mode VBARCODE does not It may be necessary to use the SET LF command to be able to see the entire height of the barcode See the Introduction to Line Print on page 25 for more information Utilities Example U1 SETLF 160 lt CR gt lt LF gt U1 B DATAMATRIX 0 0 S 200 lt CR gt lt LF gt Basic Data Matrix lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt Command Notes and Interactions The BARCODE TEXT command cannot be used to print data representations under barcode created with this command no text will print The justify commands LEFT RIGHT and CENTER do not have any effect on barcodes created with this command 6 2 4 GS1 DataBar RSS and Composite Barcodes BARCODE RSS X Y Scale LHeight SHeight Segs Type Data lt CR gt lt LF gt VBARCODE RSS X Y Scale LHeight SHeight Segs Type Data lt CR gt lt LF gt Command Name BARCODE RSS Short Form Aliases B RSS Valid Session Types Label Sessions Only None Linked SGD None Negative Aware No This command is used to print GS1 Databar also known reduced space symbology barcodes in CPCL as well as Composite barcodes There are 12 supported sub types of GS1 Databar Composite barcodes All barcode types supported by this command can consist of both a 1D and 2D component If the barcode contains a 2D component the output
190. ame The drive letter is specified before the filename and must be followed by a colon Wildcards are not supported with this command and will return a File Not Found message For more information on drives and the file system in general see page 307 If the file specified by FileName does not exist the text File Not Found lt cr gt lt LF gt will be returned RENAME NewFileName Specifies the file name that the file specified by FileName is to be renamed to The new file name follows the same rules as the old name see above Only files on the E drive can be renamed The following file types cannot be renamed An attempt to do so will fail without message CPF CSF FNT BAZ NRD PAC TTF TTE BAE PRF WKF Similarly RENAME will not overwrite if a file named NewFileName already exists Note that the RENAME text must appear before the new file name in order for the command to work CPCL FOR LINK OS PRINTERS Page 322 of 329 1073699 001 Using the CRC16 Option If the CRC16 option is specified the CRC of the file will be calculated The text CRC16 must be added after the FileName parameter in order for the checksum to be calculated Unlike the RENAME option any file can be the subject of CRC calculation The return data is 5 bytes 4 hexadecimal digits representing the calculated CRC and a NUL terminating the data The format of this CRC is the same format used in the CISDFCR
191. ame way SETSP does to try to make it fit Any command besides the ones listed above provided as a sub command will be completely ignored up to the next CR and LF where processing will resume Parameters Quick Reference Parameter Description Valid Range Master Syntax x 5 Digit Unit Number The X origin of the text string 0 to 65535 Y 5 Digit Unit Number The Y origin of the text string 0 to 65535 Sub command Standard Text Pre Scaled FontNameOrNumber Space Terminated String A font name or number to create the text See Below FontSize 5 Digit Number The size of the pre scaled font 0 to 65535 Offset 5 Digit Unit Number How far from Y is the top of this text 0 to 65535 Data CR LF Terminated String The text data to be concatenated Up to 2024 characters Sub Command Scale Text all Forms VST ST SCALE TEXT VSCALE TEXT ScaledFontName Space Terminated String A scaled font used to create the text See Below XPoints 5 Digit Number The X size of the scaled font in points 0 to 65535 YPoints 5 Digit Number The Y size of the scaled font in points 0 to 65535 Offset 5 Digit Unit Number How far from Y is the top of this text 0 to 65535 Data CR LF Terminated String The text data to be concatenated Up to 2024 characters Sub command Font Group FontGroupNumber Space Terminated String The number of the font group to use 0 to 10 Offset 5 Digit Unit Number How far from Y is the top of this t
192. ana Command Notes and I nteractions None 1073699 001 Page 133 of 329 CPCL FOR LINK OS PRINTERS 6 22 PCX PCX X Y Data lt CR gt lt LF gt PCX90 X Y Data lt CR gt lt LF gt PCX180 X Y Data lt CR gt lt LF gt PCX270 X Y Data lt CR gt lt LF gt Command Name PCX PCX90 PCX180 PCX270 Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The PCX command is used to print a ZSoft PCX file The PCX file must be a 2 color 1 plane RLE encoded PCX file If it is not command is aborted and the binary data of the PCX flows into the label data often causing the printer to enter an unpredictable state PCX supports the justification commands LEFT RIGHT and CENTER but if the PCX is too wide to fit on the current label as determined with PAGE WIDTH no image will be printed at all This does not occur if the image is too tall it will be properly clipped in this case The origins of the rotated versions of the PCX commands PCX90 PCX180 and PCX270 do not use the same math for their origins as TEXT and other commands do See the example for more details Parameters Quick Reference Parameter Type Description Valid Range X 5 Digit Unit Number The X origin of the PCX 0 to 65535 Y 5 Digit Unit Number The Y origin of the PCX 0 to 65535 Data Raw String Binary data containing the PCX file See below
193. ancels any pending magnetic card reader requests 303 MCR QUERY Yes Yes Retrieves card reader data when in query mode 304 CPCL FOR LINK OS PRINTERS Page 298 of 329 1073699 001 12 1MCR MCR Timeout Tl T2 T3 QUERY MULTIPLE SINGLE BELL ERRORS TN NIN DEL Delimiter EPREFIX ErrorPrefix PREFIX Prefix POSTFIX POSTFIX TCP SRF SER lt CR gt lt LF gt Command Name MCR Short Form Aliases None Valid Session Types Utilities or Label Sessions Linked SGD mcr enable Negative Aware No The MCR command is used to configure all aspects of the magnetic card reading system in CPCL The Timeout parameter and at least one track must be specified but all other parameters are optional The MCR command is very versatile and can be used in a number of ways Be sure to see the examples section for some examples of the various ways the command can be used At the start of each MCR command all options in the MCR system are reset to the values listed as defaults below for both options and parameters On printers without magnetic card readers this command is parsed but ignored Options Quick Reference Option Description Default T1 T2 T3 Enables the reading of tracks 1 2 and 3 respectively All Disabled QUERY The MCR system will not send data back the MCR QUERY command must be used Disabled MULTIPLE Multiple readings are permitted within the timeout Opposi
194. and will not change over the life of the printer The threshold for the presentation sensor cannot be adjusted but the threshold for the gap and bar sensor can be specified as an optional second parameter of the GAP SENSE and BAR SENSE commands The current sensor reading reflects the reading at the time the two key report started This value is compared to the threshold For the pres sensor if the reading is greater than the threshold there is a paper or label present at the presentation sensor For the gap sensor if the value is less than the threshold the sensor is currently detecting a gap in the media the liner For the bar sensor if the value is more than the threshold we are detecting a bar 11 1 1 3 Voltage While the current battery voltage can be read out with power voltage SGD there is no equivalent for the value in parenthesis which follows it which is the raw AD reading of the 8 bit sensor which is detecting the voltage value This value is then converted by the printer into the power voltage reading which is more useful in determining the state of the battery 11 1 1 4 Resident Fonts This section contains information about the resident fonts installed in the system which includes the built in fonts and any fonts that are stored in the file system While some of the information in this report can be obtained via the FONT INFO command other parts cannot be The list only contains CPF and ECPF fonts it does not list CSF or
195. appl version SGD Any value longer than 20 characters in length will be ignored and will not be set There is no minimum number of characters for the string Example Ul SET VERSION 6816 lt CR gt lt LF gt This example sets the reply of the version command to 6816 Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 283 of 329 1073699 001 11 25SETVAR and DO SETVAR SettingName Value lt CR gt lt LF gt setvar SettingName Value lt CR gt lt LF gt DO SettingName Value lt CR gt lt LF gt do SettingName Value lt CR gt lt LF gt Command Name GETVAR getvar Short Form Aliases DO do Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No SETVAR is the primary method of setting the value of a printer configuration setting These configuration settings are called SGD settings short for Set Get Do which outlines the three commands that can be used to interact with the settings SETVAR GETVAR and DO These three commands SETVAR GETVAR and DO are always available on every Link OS printer regardless of current language selected Even Link OS Printers which do not support the CPCL language support these CPCL commands The SETVAR command and its alias DO can be in lower or upper case but must be of a single case it cannot be mixed Generally CPCL commands must be in upper case but this one is supported in both cases for ba
196. aracter _ Data Any number of lines of data to be encoded in the barcode lt CR gt lt LF gt s may be included but are stripped out before the barcode data is encoded When using ECC 0 to 140 it is not possible to encode CR LF or NUL characters in the data regardless of the value of Format When using ECC 200 there are a number of functions which can be accessed using the escape character defined with EscapeChar Escape Functions when using ECC 200 The following table summarizes the escape functions available when using ECC 200 In the function name the underscore is used to represent the escape character Some of these functions are only available as the very first character of the data stream and as such are mutually exclusive Otherwise they may be repeated in the format as many times as desired The operations are processed in the order provided in the table The use of escape sequences besides the ones listed below will result in no label being printed Function Description Start Only Format _dnnn Encode this binary character into data stream No Always 3 digits 0 to 255 Encode escape character No None _1 Encode FNC1 character into the data stream No None _2nnnoooppp Encode FNC2 Structured Append Data Yes See Below CPCL FOR LINK OS PRINTERS Page 53 of 329 1073699 001 Function Description Start Only Format _3 Encode FNC3 Reader Programming Character Y
197. aracter 13 hex 0x0D Typically in this document each lt CR gt and lt LF gt will be followed by a new line within the document This new line is not transmitted and is only for ease of reading of examples These designations are the standard ASCII names for these non printable characters however a table of the binary values of the characters is also included here In the case that the greater than or less than characters are needed in an example they will be represented by lt GT gt and lt LT gt to avoid confusion Command Byte transmitted CPCL FOR LINK OS PRINTERS Page 13 of 329 1073699 001 Command Byte transmitted lt ma gt b ars ho as m er f E so ha ks hs os hie acr hi cz gt hie css fis oca ho lt SP gt 32 lt LT gt 60 Kor fe lt DEL gt 127 2 2 Designations Parameters For many functions in CPCL there are required and optional parameters These parameters are represented with the following syntax SAMPLECOMMAND Required 1 Required 2 Opt Parameter 1 Required parameters will appear in non italics and will each bear a unique name Optional parameters will appear in italics and will be preceded by the abbreviation Opt Below each such designation a list of the parameters with their functions options and meanings will be shown 2 3 Designations Advanced Notes CPCL FOR LINK OS PRINTERS Page 14 of 329 1073699 001 This document is designed to b
198. arser as normal commands CPCL FOR LINK OS PRINTERS Page 313 of 329 1073699 001 Examples CISDF lt CR gt lt LF gt TEST DAT lt CR gt lt LF gt 0000001B lt CR gt lt LF gt 0000 lt CR gt lt LF gt This text is in TEST DAT lt CR gt lt LF gt In this example a CISDF session is used to define the file TEST DAT In this example 0000 is used to avoid the calculation of the checksum but note how the size must still be calculated and specified CISDFRCRC16 lt CR gt lt LF gt 4384 lt CR gt lt LF gt SAMPLEPCX PCX lt CR gt lt LF gt 000001EE lt CR gt lt LF gt 4362 lt CR gt lt LF gt lt SEQ 0A050101000000002F002F00480048000F0FOFOE0E0E0DODODOCOCOCOBOBOBOA gt lt SEQ 0A0A090909080808070707060606050505040404030303020202010101000000 gt lt SEQ 0001060001000000000000000000000000000000000000000000000000000000 gt lt SEQ 0000000000000000000000000000000000000000000000000000000000000000 gt lt SEQ 037775BAC1DDA0015A9EC1CF66C1C000A5C1E2B4BB0000017BC1D70D0000396D gt lt SEQ 7554000044C20040008040C1CFC1CE4C00C1C038C2295201C1E004C1E9295E03 gt lt SEQ C1F045C2295007C1F838C1E92E4COFC1FCC20008001FC1FE003FC1E8003FC1FF gt lt SEQ 000540007FC1FF800AB800C1FFC1FFC1C006C1D001C1FFC1EEC1E002C1C00377 gt lt SEQ C1EEC1F001400777C1EEC1F800800F77C1EEC1FCC2001F77C1EEC1FEC2003F77 gt lt SEQ C1EEC1FFC2007F77C2FF8000C1FF779F3FC1C001C2FFC1CE7FC1E003C1FF07C1 gt lt SEQ FLCLFFC1CO01C1FE73C2FF8000C1FCC1F9C2FFC2007DC1FDC1FFC1FEC2003FC1 gt lt SEQ FF
199. as 1 At power on the value of 1 is used which means the full width of the page is used for a single horizontal label Examples Ul MULTI 3 lt CR gt lt LF gt Ul MULTI 1 lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 219 of 329 1073699 001 9 12 NO PACE NO PACE lt CR gt lt LF gt Command Name NO PACE Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None NO PACE terminates the use of PACE or AUTO PACE and disables any pause operation that occurs between prints NO PACE is the default state for the printer at power on The command is always persistent when used If used in a label session it takes effect on the label that will be printed when the session ends and any subsequent sessions Examples Ul NO PACE lt CR gt lt LF gt Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 220 of 329 1073699 001 9 13 ON OUT OF PAPER ON OUT OF PAPER Mode Retries lt CR gt lt LF gt ON OUT OF PAPER PURGE LP State lt CR gt lt LF gt ON OUT OF PAPER RUN Filename Unused lt CR gt lt LF gt OOP Mode Retries lt CR gt lt LF gt OOP PURGE LP State lt CR gt lt LF gt OOP RUN Filename Unused lt CR gt lt LF gt Command Name ON OUT OF PAPER Short Form Aliases OOP Valid Session Types Label and Utilities Sessions Linked SGD None
200. as the data Track 1 Data on track 1 the following will be returned T1l Track 1 Data lt CR gt lt LF gt MCRError T3 Read Error lt CR gt lt LF gt In a normal successful read if the data on track 3 is Track 3 Data the following would be returned T1l Track 1 Data lt CR gt lt LF gt MCRError T3 Read Error lt CR gt lt LF gt Command Notes and Interactions The DELAY parameter which was used to delay MCR output in legacy CPCL has been removed from the Link OS implementation This option is still parsed but ignored The VERBOSE option which gave extended error information is also still parsed but ignored in the same way CPCL FOR LINK OS PRINTERS Page 302 of 329 1073699 001 12 2 MCR CAN MCR CAN lt CR gt lt LF gt Command Name MCR CAN Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD mcr cancel Negative Aware No MCR CAN is used to abort an active MCR command The command can be used to abort sessions with the MUTLIPLE option in the MCR command and also will abort an MCR session with a timeout which has not yet expired Any reads attempted once MCR CAN has been issued will be ignored If a read has occurred which has not yet been retrieved via the MCR QUERY command that data will still be available via the MCR QUERY command and is not cleared If no MCR session is active the MCR CAN command has no effect See the MCR command in the previous session for
201. ated Examples BARCODE DATAMATRI X LBL 0 200 200 1050 1 lt CR gt lt LF gt B DATAMATRIX 60 20 S 200 lt CR gt lt LF gt Basic Data Matrix lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt ML 24 T 7 0 30 160 lt CR gt lt LF gt Data Matrix Example lt CR gt lt LF gt ECC 200 Height 6 Default lt CR gt lt LF gt Data lt CR gt lt LF gt Basic Data Matrix lt CR gt lt LF gt ENDML lt CR gt lt LF gt B DATAMATRIX 60 300 H 7 S 200 lt CR gt lt LF gt _2015001001Structured lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt B DATAMATRIX 260 300 H 7 S 200 lt CR gt lt LF gt _2031001001Append lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt ML 24 T 7 0 30 450 lt CR gt lt LF gt Data Matrix Structured Append Example lt CR gt lt LF gt Two barcodes 1 Left 2 Right lt CR gt lt LF gt ECC 200 Height 7 lt CR gt lt LF gt Data lt CR gt lt LF gt Structured Append lt CR gt lt LF gt ENDML lt CR gt lt LF gt B DATAMATRIX 60 600 S 200 H 3 R 64 lt CR gt lt LF gt Line 1 Data Terminated with CR LF_M_J lt CR gt lt LF gt Line 2 Data Terminated with CR LF_d013_d010 lt CR gt lt LF gt Line terminated with the underscore character __ lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt ML 24 T 7 0 30 850 lt CR gt lt LF gt Data Matrix Example with Escapes lt CR gt lt LF gt ECC 200 Height 3 Forced size 64x64 lt CR gt lt LF gt Data lt CR gt lt LF gt Line 1 Data Termi
202. ats 6 times 15 18 05030303 Data 5 skip 3 black 3 skip 3 black y 19 1A 8102 Data This row has one pair and repeats 2 times 1B 1C 000E Data 0 skip 14 black T i kllCLrlr 1D 01 Data This row has one pair 1E 1F 000D Data 0 skip 13 black A n The final bitmap with all row repeats looks as follows CPCL FOR LINK OS PRINTERS Page 197 of 329 1073699 001 8 3 3 Font Encodings Single Byte In CPCL there are a number of different supported character encodings The active encoding in CPCL is selected by the COUNTRY or CHAR SET command See that command on page 205 for more information Each country code is given a name which is used with the COUNTRY or CHAR SET command to activate it Available encodings are divided into two categories single byte and multi byte Multi byte fonts are covered in the next section In the single byte encodings there are tables which relocate characters in the font to make up the encoding For these encodings the character pages in the font must be defined using the following character placement This encoding is Code page 1252 with a couple of modifications which are highlighted Not all characters are defined in all fonts including the built in fonts The following encodings use this table by moving characters 8 3 3 1 USA or Dynamic COUNTRY USA The USA country code has no rep
203. atting Yes No Prints a vertical box 89 VCG Label Formatting Yes No Alias for VCOMPRESSED GRAPHICS 94 VCHECKSUM Utility amp Diagnostic No Yes Verifies application checksum 288 VCOMPRESSED GRAPHICS Label Formatting Yes No Prints a vertically oriented binary image 94 VCONCAT Label Formatting Yes No Vertically rotated version of CONCAT 96 VEG Label Formatting Yes No Alias for VEXPANDED GRAPHICS 104 VERSION Status Enquiry No Yes Returns short version number 241 VEXPANDED GRAPHICS Label Formatting Yes No Prints a vertically oriented ASCII image 104 VSCALE TEXT Label Formatting Yes No Prints vertically oriented text from a scalable font 144 VSCALE TO FIT Label Formatting Yes No Prints vertically oriented text scaled to fit an area from a scaled font 146 VST Label Formatting Yes No Alias for VSCALE TEXT 144 VSTF Label Formatting Yes No Alias for VSCALE TO FIT 146 VT Label Formatting Yes No Alias for TEXT90 158 VTEXT Label Formatting Yes No Alias for TEXT90 158 WAIT Utility amp Diagnostic Yes No Delays the specified amount of time 287 X Utility amp Diagnostic Yes No Specifies a constant X coordinate to use in label formatting functions 289 X Line Print Line Print No Yes Specifies the X position to start from in line print 181 XY Utility amp Diagnostic Yes No Specifies a constant X and Y coordinate to use in label formatting functions 289 XY Line Print Line Print No Yes Specifies the X and Y position to start from in line print 181 Y Uti
204. b54b 0x8528 0x9509 OxeSee Oxf5cf OxcSac 0Oxd58d 0x3653 0x2672 0x1611 0x0630 Ox76d7 Ox66f6 0x5695 0x46b4 Oxb75b 0xa77a 0x9719 0x8738 Oxf7df 0xe7fe Oxd79d 0xc7bc 0x48c4 0x58e5 0x6886 0x78a7 0x0840 0x1861 0x2802 0x3823 Oxc9cc Oxd9ed Oxe98e Oxf9af O0x8948 0x9969 Oxa90a Oxb92b Ox5af5 Ox4ad4 Ox7ab7 0x6a96 Oxla71l 0x0a50 Ox3a33 Ox2al2 CPCL FOR LINK OS PRINTERS Page 314 of 329 1073699 001 Oxdbfd Oxchbdc Oxfbbf Oxeb9e 0x9b79 O0x8b58 Oxbb3b Oxabla Ox6ca6 Ox7c87 Ox4ce4 Ox5cc5 Ox2c22 0x3c03 Ox0c60 Oxlc4l1 Oxedae Oxfd8f Oxcdec Oxddcd Oxad2a Oxbd0b Ox8d68 0x9d49 Ox7e97 Ox6eb6 Ox5ed5 Ox4ef4 0x3e13 0x2e32 0xle51 0x0e70 Oxff9f Oxefbe Oxdfdd Oxcffc Oxbflb Oxaf3a Ox9f59 Ox8f78 0x9188 Ox81a9 Oxblca Oxaleb Oxdl0Oc Oxcl2d Oxfl4e Oxel6f 0x1080 0Ox00al Ox30c2 O0x20e3 0x5004 0x4025 0x7046 0x6067 0x83b9 0x9398 Oxa3fb Oxb3da Oxc33d Oxd3lc Oxe37f Oxf35e Ox02b1 0x1290 Ox22f3 O0x32d2 0x4235 0x5214 O0x6277 0x7256 Oxb5ea Oxa5ch 0x95a8 0x8589 Oxf56e Oxe54f Oxd52c Oxc50d 0x34e2 0x24c3 Ox14a0 0x0481 0x7466 0x6447 0x5424 0x4405 Oxa7db Oxb7fa 0x8799 Ox97b8 Oxe75f Oxf77e Oxc7ld Oxd73c 0x26d3 Ox36f2 O0x0691 Oxl6b0 0x6657 Ox7676 O0x4615 0x5634 Oxd94c Oxc96d Oxf90e Oxe92f Ox99c8 0x89e9 Oxb98a Oxa9ab 0x5844 0x4865 0x7806 0x6827 0x18c0 Ox08el 0x3882 0x28a3 Oxcb7d Oxdb5c Oxeb3f Oxfble Ox8bf9 O0x9bd8 Oxabbb Oxbb9a O
205. can all still be deleted either by name or by wildcard but it must be specifically specified such as NRD or WML as the wildcard For more information on drives and the file system in general see page 307 Example DF HELLOWORLD TXT lt CR gt lt LF gt Hello world from the HELLOWORLD TXT file lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 318 of 329 1073699 001 END lt CR gt lt LF gt U1 TYPE HELLOWORLD TXT lt CR gt lt LF gt Ul DELETE HELLOWORLD TXT lt CR gt lt LF gt This example uses the DEFINE FORMAT session see page 308 to create a file named HELLOWWORLD TXT and then uses the TYPE command to return the contents to the host see page 325 The file is then deleted with the DELETE command Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 319 of 329 1073699 001 13 6 DIR DIR lt CR gt lt LF gt Command Name DIR Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD file dir Negative Aware No DIR is used to retrieve a listing of the files on the E drive and R drive of the printer The files are returned in a list format with the file name on the left side and the file size on the right side Files on the R drive are represented by the presence of r after their file name The files are displayed in the order they were loaded on to their respective drive The R drive files always appear last on the list Example
206. ce Binary Compaction Data ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefgh1jklmnoparstuvwxyz1234567890 lt CR gt lt LF gt ABCDEFGHIJKLMNOPQRSTUVWX YZ abcdefghijkLmnoparstuvwxyz1234567890 lt CR gt lt LF gt Use in Utilities Sessions for Line Print In versions of Link OS greater than 19 6 The BARCODE command and all its variants can be used in a utilities session to print a barcode in line print mode The printer does not have to be in line print mode for this command to be used in utilities mode The X and Y parameters of the barcode must be specified but have no effect instead the X Y RX RY XY or RXY commands must be used to specify the location of the barcode CPCL FOR LINK OS PRINTERS Page 76 of 329 1073699 001 Note that only the BARCODE command operates in line print mode VBARCODE does not It may be necessary to use the SET LF command to be able to see the entire height of the barcode See the Introduction to Line Print on page 25 for more information Utilities Example U1 SETLF 160 lt CR gt lt LF gt Ul B PDF 417 0 0 S 2 lt CR gt lt LF gt 1234567890 lt CR gt lt LF gt ENDPDF lt CR gt lt LF gt Command Notes and I nteractions The BARCODE TEXT command cannot be used to print data representations under barcode created with this command no text will print The justify commands LEFT RIGHT and CENTER do not have any effect on barcodes created with this command CPCL FOR LINK OS PRINTERS Page 77 of 329 1073699 001
207. ce between a label and other types of sessions If you need to specify value less than one for the offset prepend the value with a 0 such as 0 56 rather than 56 This ensures that the offset will be processed as expected If the first character of the offset is not a digit and is not an alpha character the data passed through to the next parser will have the space after the character removed If the Quantity exceeds 1024 or the Height exceeds the available label memory the label operation is aborted and any commands that would have made up the label fall through to the next parser For the Horizontal and Vertical resolution any value except 100 is interpreted as 200 If any values except offset are negative their absolute value is used The label session will be considered invalid if a negative offset is used and will fall through to the next parser A CPCL label always has a single blank dot line at in the top most row of the label which cannot be drawn to by most commands CPCL FOR LINK OS PRINTERS Page 38 of 329 1073699 001 When a new label session is started the following settings are cached and restored when the session ends This allows you to modify them in the label session without changing the system wide settings Option Associated Command Contrast CONTRAST Tone TONE Print Resolution None Media Sense Mode BAR or GAP Character Spacing SETSP Character Bolding SETBOLD Horizontal Quan
208. ckwards compatibility Some settings are not actually settings but triggers for actions These are commonly called DO commands The device reset SGD is one such example of a DO Setting the device reset SGD to any value including an empty string causes the printer to reboot It is the setting which determines if an action is taken or if a setting is changed Either setting command may be used to activate the function When SETVAR is used to set a setting which is persistent between power cycles SETVAR will set the setting in such a way that it is saved This statement may seem obvious but some commands which set settings set them in such a way that they will be restored to the last saved value on power cycle Not all settings persist between power cycles see the documentation of each SGD for more information Parameters Quick Reference Parameter Type Description Valid Range Parameter Value Quoted File Type The value to set the setting to See below Parameter SettingName Specifies the name of a setting to which is to be set This string should be bound by double quotation marks Value Specifies the value to set the setting to This string should be bound by double quotation marks CPCL FOR LINK OS PRINTERS Page 284 of 329 1073699 001 Note that the valid values for Value depend on the SGD being set with SettingName Each setting determines which values are valid however the setting value must always be bound by
209. cle The default value at startup is 0 Parameters Quick Reference Parameter Description Valid Range Offset 3 Digit Unit Number Specifics the distance from the left edge in units 0 to 999 Offset Specifies the distance in units that print is to be offset from the left edge of the page The range is 0 to 999 with 0 being the default When this command is applied to the list of commands mentioned above if the image exceeds the print head width it will wrap around to the next line of the print out as in labels If the width is exceeded when printing line print however the text will wrap and will not overflow Thus if the value specified for Offset exceeds the width of the print head only one line print character will appear on each line of the printout Example LMARGIN IbI Ul LMARGIN 20 lt CR gt lt LF gt Ul SETLF 0 lt CR gt lt LF gt lt CR gt lt LF gt Barcode and text offset example lt CR gt lt LF gt lt CR gt lt LF gt Note that the following barcode and text are both offset 80 pixels whereas this text is 20 pixels lt CR gt lt LF gt Ul SETLF 160 lt CR gt lt LF gt Ul LMARGI 80 lt CR gt lt LF gt Ul BARCODE 128 1 2 150 0 0 Barcode lt CR gt lt LF gt lt CR gt lt LF gt This text is offset 80 pixels UL LMARGIN 20 lt CR gt lt LF gt U1 SETLF 10 lt CR gt lt LF gt lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 166 of 329 1073699 001 Barcode and text offset example
210. cluding the type is as follows Field Name Data Size Description Type 1 byte Defines the type of Glyph 2 or 3 for large glyphs Padding 1 byte A padding byte ignored Byte Width 2 byte Number of bytes needed to represent the glyph s width Vertical Skip 2 byte The number of dots to move down before starting the character Dot Height 2 byte The number of dots high the image of the glyph is Left Pen Adjust Signed Word _ The number of dots to move left before drawing the glyph Right Pen Adjust _ Signed Word The number of dots to move right after drawing the glyph CPCL FOR LINK OS PRINTERS Page 194 of 329 1073699 001 8 3 2 7 Pen Adjusts The pen adjusts represent signed bytes or signed words which are used to adjust the drawing cursor before the character is drawn and after the character is drawn These values can either be positive or negative The left adjust is applied before the character is drawn and positive values move the cursor to the left The right adjust is applied after the character is drawn positioning the cursor for the next character and moves the cursor to the right Negative values will move the cursor in the opposite of their normal direction respectively 8 3 2 8 Non Compressed Glyph Data Following the header non compressed characters are stored as raw binary data in the size defined in the glyph header byte width times dot height All bytes must be specified Example Uncompresse
211. command and the print contrast SGD are ignored When TONE is set to zero if CONTRAST is non zero it will be used Note that unlike TONE CONTRAST does not save its value permanently when set Parameters Quick Reference Parameter Type Description Valid Range 5 Digit Number The relative darkness of the printout 100 to 200 Value Specifies the darkness of the printout The valid range is 100 to 200 and the default is 0 100 is the least dark on most printers no print will be visible and 200 is the most dark Example Ul TONE 50 lt CR gt lt LF gt Command Notes and I nteractions See the above notes for interaction with the CONTRAST command The setting of this command interacts with the ZPL control language via SD CPCL FOR LINK OS PRINTERS Page 235 of 329 1073699 001 9 25 TURN TURN Degrees lt CR gt lt LF gt Command Name TURN Short Form Aliases None Valid Session Types Utilities or Label Sessions Linked SGD None Negative Aware No TURN changes the orientation of the printed label or of line print text specifying either 0 degree rotation top out first or 180 degree rotation bottom out first When using this feature with line print mode each line print buffer is individually rotated which may cause some unexpected issues For more information about line print buffers see page 164 Once set via a label or utilities session the command is persistent until power cycle The
212. configuring label sessions see section 6 1 on page 38 Sample Label Session Below is a very simple label session which prints a small text message 0 200 200 203 1 lt CR gt lt LF gt EXT 4 0 40 40 Hello World lt CR gt lt LF gt PRINT lt CR gt lt LF gt H See the TEXT command on page 158 for more information on that command 3 3 Parameters for Sessions and Commands CPCL sessions and commands use numeric and string parameters in order to specify data This section discusses each of the parameter types you will see used throughout the manual 3 3 1 Numeric Parameters In the example shown above you see several references to numbers and unit numbers It is important to understand how each of these parameter types are used as they are used continually throughout the CPCL language M For all numeric parameters null characters within the numbers will be ignored 3 3 1 1 Unit Numbers In the CPCL language values related to size or positioning may be specified in units By default these values are measured in dots but commands are provided to allow any unit value to be interpreted in dots centimeters millimeters and inches These commands are as follows Requested Unit CPCL Command Conversion Factor to Dots Dots Default IN DOTS lt CR gt lt LF gt 1 Centimeters IN CENTIMETERS lt CR gt lt LF gt 80 Millimeters IN MILLIMETERS lt CR gt lt LF gt 8 Inches IN INCHES lt CR gt lt LF gt 203 2
213. current value of CONTRAST can also be read via the final two bits of the lt ESC gt h command See page 242 9 5 FEED FEED Amount lt CR gt lt LF gt Command Name FEED Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD None Negative Aware Yes The FEED command is used to move media the specified amount as soon as the command is processed FEED can be used with both negative and positive numbers Note that there is no mechanism that prevents you from feeding an excessively large negative value causing the printer to lose control of the media The FEED operation will ignore all gap or marks on the paper but will terminate if the printer detects an out of media condition or other error Parameters Quick Reference Parameter Type Description Valid Range 5 Digit Unit Number How much to feed in units 4000 to 4000 dots Amount Specifies the amount to feed in units After the conversion from the current unit to dots the resulting amount must be between 4000 and 4000 If it is not no feed operation occurs Example Ul FEED 50 lt CR gt lt LF gt Ul FEED 50 lt CR gt lt LF gt Command Notes and I nteractions Using a negative value for Amount performs the same operation as using a positive value with the REVERSE command See page 230 for more information on that command CPCL FOR LINK OS PRINTERS Page 214 of 329 1073699 001 9 6 FORM
214. d 180 degrees 134 PCX270 Label Formatting Yes Yes Line Print Prints a PCX file on a label rotated 270 degrees 134 PCX90 Label Formatting Yes Yes Line Print Prints a PCX file on a label rotated 90 degrees 134 PCXMAG Label Formatting Yes No Prints a PCX file magnified 136 PERSIST Label Formatting Yes Yes Determines if label is cleared once session is complete 138 PJ Media Management Yes Yes Alias for PAPER AM 225 POSTFEED Media Management Yes Yes Sets amount to feed after a label has printed 227 PREFEED Media Management__ Yes Yes Sets amount to feed before a label is printed 228 PRESENT AT Media Management __ Yes Yes Sets amount to feed before and after a label is printed 229 PRINT Label Formatting Yes No Ends a label session and effects printout 139 PRINT File Session Command File Commands No Yes Ends a stored format with a PRINT command 324 PW Label Formatting Yes Yes Alias for PAGE WIDTH 127 R Label Formatting Yes Yes Alias for ROTATE 142 RE RUN Utility amp Diagnostic Yes Yes Re executes a stored format once it completes 277 REVERSE LINE Label Formatting Yes Yes Line Print Alias for INVERSE LINE 114 REVERSE Media Management Yes No Reverses media before the next label print 230 REVERSE Utilities Command Media Management__ No Yes Reverse media now 231 RIGHT Label Formatting Yes Yes Line Print Specifies alignment for text fields 140 RL Label Formatting Yes No Alias for INVERSE LINE 114 ROTATE Label Formatting Yes Yes Set
215. d Glyph This example shows the binary data of an example glyph in this case the character Z from the built in font 7 size 0 The table below shows the meaning of each byte of data in the glyph Address 00 01 02 03 04 05 06 07 08 09 Oa Ob Oc Od Oe OF 00 00 02 05 Of ff 05 ff cO ff cO 00 cO 01 80 03 00 10 06 00 06 00 Oc 00 18 00 18 00 30 00 60 00 c0 00 20 ff c0 ff cO Offset Data Section Description 00 00 Header Glyph type small uncompressed glyph 01 02 Header Byte Width 2 bytes 16 dots of data will be defined per line 02 05 Header Vertical Skip 5 dots will be skipped before the glyph starts 03 OF Header Dot Height This glyph is 15 dots high 04 01 Header Left Pen Adjust Move one dot to the left before drawing 05 05 Header Right Pen Adjust Move five dots to the right after drawing 06 07 FFCO Data Binary Data 08 09 FFCO Data Binary Data i 0A 0B 00CO Data Binary Data n 0C 0D 0180 Data Binary Data y 0E 0F 0300 Data Binary Data t 10 11 0600 Data Binary Data 12 13 0600 Data Binary Data 14 15 0C00 Data Binary Data My 16 17 1800 Data Binary Data 18 19 1800 Data Binary Data 1A 1B 3000 Data Binary Data 1C 1D 6000 Data Binary Data E 1E 1F C000 Data Binary Data 20 21 FFCO Data Binary Data 22 23 FFCO Data Binary Data n CPCL FOR LINK OS PRINTERS Page 195 of 329 1073699 001 8 3 2 9 Compressed Glyph Data Compressed
216. d first For this table the escape character has been changed to the tilde character for clarity Sequence ASCII Value Char Description 0 NUL Null A 1 SOH Start of Heading B 2 STX Start of Text C 3 ETX End of Text D 4 EOT End of Transmission E 5 ENQ Enquiry F 6 ACK Acknowledge G 7 BEL Bell H 8 BS Backspace I 9 TAB Tab J 10 LF New Line K 11 VT Vertical Tab L 12 FF Form Feed M 13 CR Carriage Return N 14 SO Shift Out O 15 SI Shift In P 16 DLE Data Link Escape Q 17 DC1 Device Control 1 R 18 DC2 Device Control 2 S 19 DC3 Device Control 3 T 20 DC4 Device Control 4 U 21 NAK Negative Acknowledge V 22 SYN Synchronous Idle W 23 ETB End of Transmission Block X 24 CAN Cancel Y 25 EM End of Medium Z 26 SUB Substitute 27 ESC Escape 28 FS File Separator 29 GS Group Separator me 30 RS Record Separator wes 31 US Unit Separator Note that in this table ESC Escape does not mean the EscapeChar but means ASCII character 27 Termination of Data The data string is terminated with the following sequence No part of this data is encoded in the data that is put into the barcode lt CR gt lt LF gt ENDDATAMATRIX lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 55 of 329 1073699 001 This termination structure must appear at the end of the barcode or the barcode is not termin
217. d or filled Parameters Quick Reference Parameter Type Description Valid Range x 5 Digit Unit Number The X origin of the line 0 to 65535 Y 5 Digit Unit Number The Y origin of the line 0 to 65535 EndX 5 Digit Unit Number The X coordinate where the line ends 0 to 65535 EndY 5 Digit Unit Number The Y coordinate where the line ends 0 to 65535 Thickness 5 Digit Unit Number The thickness of the line 0 to 65535 X Y The X and Y coordinates in units specifying where the origin of the line is to be placed EndX EndY The X and Y coordinates in units specifying where the line ends The EndX and EndY coordinates can be less than X and Y the line will be drawn appropriately Thickness The thickness in units of the lines drawn when creating the line When using dots a value of 0 yields a thickness of 1 dot 1 yields a thickness of 2 dots and so on In this way you can never create an invisible line regardless of unit selection If the line is straight the thickness is created by drawing away from the straight side of the line either downwards or right depending if the top or left side is straight If the line is diagonal the thickness of the line is created by drawing to the right of the base line by the thickness specified As such the top and bottom of the line are always parallel to the top and bottom of the label Examples LINE LBL 0 200 200 500 1 lt CR gt lt LF gt LINE 30 30 200 2
218. d subscript lt CR gt lt LF gt CONCAT 20 195 lt CR gt lt LF gt 7 0 59 Fnt 7 Sz 0 lt CR gt lt LF gt 7 1 39 Fat 7 Sz 2 lt CR gt lt LF gt 4 1 0 Fnt 4 Sz 1 lt CR gt lt LF gt ENDCONCAT lt CR gt lt LF gt T 7 0 20 295 Concat Example 3 Pre scaled Fonts lt CR gt lt LF gt T 7 0 20 319 Aligned to 59 39 and 0 bottom aligned lt CR gt lt LF gt CONCAT 20 369 lt CR gt lt LF gt 7 1 10 Text lt CR gt lt LF gt FG 1 32 Group lt CR gt lt LF gt ST VERAMONO TTF 18 9 0 Scale lt CR gt lt LF gt 5 1 12 Text lt CR gt lt LF gt ST VERAMOIT TTF 10 9 23 Scale lt CR gt lt LF gt FG 0 14 Group lt CR gt lt LF gt ENDCONCAT lt CR gt lt LF gt T 7 0 20 459 Concat Example Mixing Font Types lt CR gt lt LF gt T 7 0 20 483 Groups bitmap and scaled all bottom aligned lt CR gt lt LF gt CONCAT 20 543 lt CR gt lt LF gt 7 1 4 Part Number lt CR gt lt LF gt FG 1 15 10235393 lt CR gt lt LF gt FG 0 15 Toy Cat lt CR gt lt LF gt ENDCONCAT lt CR gt lt LF gt CONCAT 20 602 lt CR gt lt LF gt 7 1 4 Part Number lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 98 of 329 1073699 001 FG 1 15 10245810 lt C FG 0 15 Huge Ceramic Cow lt CR gt lt LF gt ENDCONCAT lt CR gt lt L Cc 7 F ONCAT 20 662 lt C F gt R gt lt L 1 4 Part Number G1 15 1022341 0 lt C R gt lt LF gt F gt lt CR gt lt LF gt R gt lt LF gt FG 0 15 Tiny Blue Ceramic Horse lt CR gt lt LF gt ENDCONCAT l
219. de If this value is 0 no barcode is printed If 1 the barcode is printed at 1x magnification if 2 at 2x magnification and so on The recommended range is 0 to 10 This field is represented as a unit number so using it in systems besides dots can result in very large barcodes LHeight This is the height in units of the linear part of the barcode in the combined symbol This option is ignored for most values of Type and instead replaced with fixed values Refer to the Height field in the table below to see the fixed values Sca e can still be used to control the overall height though only in multiples SHeight This is the height in units of the separators between 1D and 2D composite sections and the height of the separators in a non composite stacked barcode represented in units There is no limit on the value but it is generally advisable to use values of 1 or 2 This value does not apply to the separator marks on barcode types 7 8 9 and 10 when used in composite mode which are of a fixed height of 6 dots times scale factor A value of 0 for height is not supported Segs This represents the segment width It is only used for type 6 RSS Expanded barcodes The fewer the number of segments the taller the barcode will be and the more separators there will be The recommended range of values for this parameter is even numbers from 2 to 22 If the Type 6 barcode is composite consisting of both 1D and 2D parts the
220. del of QR code to print This value must be 1 or 2 If it is outside this range no barcode will be printed This parameter is optional If not provided model 2 is used U UnitWidth Specifies the unit width of the QR code to print in pixels A single on or off element of the pattern will be this width when printed This parameter is optional If not provided a value of 6 is used While there is no limit on this value values greater than 32 generally do not make sense to use as they are too large to be printed on a label A value of 0 results in no barcode being printed Config Specifies configuration information about the barcode This parameter must be contains the following options in exactly this order The config string must contain at least the error correction value and a comma Function Required Options Concatenation No D This Total Parity See Below Error Correction Yes L Low Up to 7 Damage Recoverable M Medium Up to 15 Damage Recoverable Default Q Quality Up to 25 Damage Recoverable H High Up to 30 Damage Recoverable Mask No 0 7 Select specific mask value CPCL FOR LINK OS PRINTERS Page 78 of 329 1073699 001 8 No Mask Unspecified Automatic Selection Default Data Input Mode No A Automatic Default M Manual See Below Concatenation Concatenation mode also known as structured append allows data for QR codes to be encoded across m
221. ds are used to configure the barcode Description Data Specification Default x Set X Position Same as X above ASCII number up to 5 digits 0 to 65535 X Y Set Y Position Same as X above ASCII number up to 5 digits 0 to 65535 Y H Parsed but has no function ASCII number up to 5 digits 0 to 65535 210 FILLC Low priority message fill character One ASCII character NOTEXT Parsed but has no function One ASCII character N A ZIPPER Enable barcode zipper and contrast pattern If ASCII 1 enabled otherwise disabled 1 UPSS5 Use only UPS Tags Disables MSG If ASCII 1 enabled otherwise disabled 0 EOT Set end of transmission character One ASCII character lt 4 gt RS Set record separator One ASCII character lt 30 gt GS Set segment separator One ASCII character lt 29 gt LPMS Set low priority message start character Three ASCII characters gt These are raw binary values not ASCII text see page 15 The use of X and Y overrides the values specified in the BARCODE command itself Standard Data Fields By default the following fields are supported If the UPS5 option is enabled the MSG field is no longer available as it is used by the UPS data Field Description Data Specification Default POST Set zip code Zip 4 Up to 9 ASCII characters Padded with 0s Empty ce Set country code ASCII number up to 5 digits 0 to 65535 840 sc Set service class ASC
222. e Specifies the drawing mode to use The mode must either be OR or XOR If it is any other value the IMAGE command has no effect and the last valid mode is used Examples I MAGE LBL 0 200 200 550 1 lt CR gt lt LF gt IMAGE XOR lt CR gt lt LF gt BOX 30 30 240 90 30 lt CR gt lt LF gt T 7 0 50 50 This text is drawn in XOR Mode lt CR gt lt LF gt T 7 0 30 110 Example Text in XOR Mode drawn over a box lt CR gt lt LF gt IMAGE OR lt CR gt lt LF gt BOX 30 160 240 220 30 lt CR gt lt LF gt T 7 0 50 180 This text is drawn in OR Mode lt CR gt lt LF gt T 7 0 30 240 Example Text in OR Mode drawn over a box lt CR gt lt LF gt 1 50 290 This text is drawn in OR Mode lt CR gt lt LF gt T 7 T 7 0 30 350 Example Line in OR mode drawn over regular text lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 110 of 329 1073699 001 50 420 This text is drawn in OR Mode lt CR gt lt LF gt TATL T 7 0 30 480 Example Line in XOR mode drawn over regular text lt CR gt lt LF gt LINE 50 310 395 310 7 lt CR gt lt LF gt IMAGE XOR lt CR gt lt LF gt LINE 50 440 395 440 7 lt CR gt lt LF gt IMAGE OR lt CR gt lt LF gt PRINT lt CR gt lt LF gt Example Text in XOR Mode drawn over a box Example Text in OR Mode drawn over a box Example Line in OR mode drawn over regular text Example Line in XOR mode drawn over regular text Command Notes and Interactions IMAGE also affects line print mode however the only
223. e 193 of 329 1073699 001 8 3 2 3 Glyph Data After the header and the offset table the first glyph begins Each glyph has a header which precedes the data The first byte of that data is the character type which determines how the rest of the font is laid out 8 3 2 4 Glyphs Types There are four glyph types defined for CPCL The value for the type is based on the table below Glyph Size Data is compressed Type 0 Small No Type 1 Small Yes Type 2 Large No Type 3 Large Yes If the type value is not one of these processing of this glyph is skipped 8 3 2 5 Small Glyphs Small glyphs are the most common type of character The characters can be up to about 8 inches wide and one inch tall The complete header for a small glyph character including the type is as follows Field Name Data Size Description Type 1 byte Defines the type of Glyph 0 or 1 for small glyphs Byte Width 1 byte Number of bytes needed to represent the glyph s width Vertical Skip 1 byte The number of dots to move down before starting the character Dot Height 1 byte The number of dots high the image of the glyph is Left Pen Adjust Signed Byte The number of dots to move left before drawing the glyph Right Pen Adjust __ Signed Byte The number of dots to move right after drawing the glyph 8 3 2 6 Large Glyphs Large glyphs are for defining larger characters The complete header for a large glyph character in
224. e Format Information This section describes the format of the CPCL bitmap font formats CPF Cometc Pre scaled Font and its extended version ECPF Extended Pre scaled Font Both types of fonts have a set of character glyphs and also a table which defines scaling sizes of the character bitmaps in integer increments There can be many different sizes defined in the font but they all operate from the same bitmap images The primary difference between the two types is the number of character glyphs they can contain A CPF font can contain up to 256 glyphs while a ECPF font can theoretically contain up to 65536 glyphs ECPF fonts are be used to represent dual byte encodings in CPCL CPCL FOR LINK OS PRINTERS Page 190 of 329 1073699 001 8 3 1 File Header CPF and ECPF fonts both begin with a human readable file header followed by binary data The header contains identification information and the size table mentioned above All CPF fonts begin with the text CISBF This identifies the file as a font At startup all files on the printer are checked for this header and if it is found the printer attempts to load them as CPF fonts The items beginning with a dash may appear in any order in the font file although the END FONT INFO must be at the end CISBF lt CR gt lt LF gt DESC Description lt CR gt lt LF gt NUMBER FontNumber lt CR gt lt LF gt SIZES SizeCount lt CR gt lt LF gt HeightMult gt lt WidthMult gt 0 lt
225. e disabled if necessary l Ul SET The two default macros defined by the system are as follows Ul SET lt 1 s Ul SET gt 1 s Even though the macros are blank the system has special code to handle these cases but the macros must be present for them to activate Plain Text Plain text can be specified simply in the macro control language Here is an example showing a simple replacement of text Notice that the SET command is not lt CR gt lt LF gt terminated This is correct and how this command operates CPCL FOR LINK OS PRINTERS Page 279 of 329 1073699 001 Ul SET Hello World Welcome to the set command 0 200 200 50 1 lt CR gt lt LF gt T 7 0 0 0 Hello World lt CR gt lt LF gt PRINT lt CR gt lt LF gt In this example the small label which prints out the following text elcome to the set command Note how the Hello World text has been replaced with the text in the set command This represents the simplest form of the SET command directly replacing text This replacement can extend across multiple lines on both the Find and Replace parameters In this example we replace part of one line with new text and also add a new text command which prints a second line Note that the lt CR gt lt LF gt characters represent the binary lt CR gt lt LF gt characters U1 SET A single line lt CR gt lt LF gt This is the first line lt CR gt lt LF gt T 7 0 0 24 Now there s a second lt CR
226. e file name is not case sensitive All filenames in Link OS are in upper case Filenames in Link OS can be from 1 character with no extension up to 38 characters with a 5 character extension after the dot If a drive letter is not specified the file is searched for first on the E drive then on the R drive Files from the Z drive can also be typed provided they meet the extension requirements set out above but the Z drive letter must be specified in the file name The drive letter is specified before the filename and must be followed by a colon Wildcards are not supported with this command and will return a File Not Found message For more information on drives and the file system in general see page 307 Example UL TYPE Z INDEX WML lt CR gt lt LF gt This example types a file on the Z drive named INDEX WML Most printer models with displays have this file on the Z drive DF HELLOWORLD TXT lt CR gt lt LF gt Hello world from the HELLOWORLD TXT file lt CR gt lt LF gt END lt CR gt lt LF gt U1 TYPE HELLOWORLD TXT lt CR gt lt LF gt U1 DELETE HELLOWORLD TXT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 325 of 329 1073699 001 This example uses the DEFINE FORMAT session see page 308 to create a file named HELLOWWORLD TXT and then uses the TYPE command to return the contents to the host The file is then deleted with the DELETE command See page 311 for information on the DELETE command Command Notes and
227. e is however a special mode that allows more than one to be used by replacing the terminator with the LF character See page 254 for details and examples All of these functions in this section can be used in line print or in label sessions They are disabled in other types of sessions This set of commands also includes the lt GT gt command which is an incomplete function to permit these functions to operate in reverse direction and output to a file on the printer This function is incomplete and should not be used Note that in the table below and in this entire section the text lt LT gt is used to represent the less than character lt See Section 2 1 on page 13 for information on the representation of binary characters Function Command Termination Options Page Insert Current Date lt LT gt DATE lt CR gt lt LF gt lt LF gt 250 Insert Current Time lt LT gt TIME lt CR gt lt LF gt lt LF gt 251 Insert SGD Value lt LT gt SGD Name lt CR gt lt LF gt lt LF gt Space 251 Insert Custom Result lt LT gt CCL lt CR gt lt LE gt lt CR gt lt LF gt lt LF gt Space 252 Insert File lt LT gt FileName lt CR gt lt LF gt lt LF gt Space 252 The terminator selected should be based on the place that data is being inserted Although use of it is not at all recommended the ETX character as well as the carret character can be used to terminate insert commands in place of the CR and
228. e less dot than the value specified The EndX and EndY coordinates can be less than X and Y the box will be drawn appropriately Thickness The thickness in units of the lines drawn when creating the box When using dots a value of 0 yields a thickness of 1 dot 1 yields a thickness of 2 dots and so on In this way you can never create an invisible box regardless of unit selection The thickness is drawn from the outside in so a box with the same coordinates but different thickness will have the same exterior size For efficiency and to ensure predictable results Thickness should not exceed half the length of the shortest side of the box plus one Thickness equal to half the shortest length will create a filled box Examples BOX LBL 0 200 200 570 1 lt CR gt lt LF gt BOX 30 30 149 150 1 lt CR gt lt LF gt ML 24 T 7 0 300 30 lt CR gt lt LF gt Box from 30 30 to 149 150 lt CR gt lt LF gt 120x120 dot output box lt CR gt lt LF gt Thickness 1 2 dots thick lt CR gt lt LF gt ENDML lt CR gt lt LF gt BOX 30 180 259 240 19 lt CR gt lt LF gt ML 24 T 7 0 300 180 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 89 of 329 1073699 001 Box from 30 180 to 259 240 lt CR gt lt LF gt 230x60 dot output box lt CR gt lt LF gt Thickness 19 18 dots thick lt CR gt lt LF gt ENDML lt CR gt lt LF gt BOX 30 270 109 480 46 lt CR gt lt LF gt ML 24 T 7 0 300 270 lt CR gt lt LF gt Box from 30 270 to 109 480
229. e of a 2 byte sequence This encoding differs from the other encodings as they do not strip the high bit off the first nor the second byte 8 3 4 5 VIETNAM Encoding The VIETNAM encoding decodes a subset of UTF 8 characters those used for the phonetic Vietnamese alphabet and converts them into 2 bytes sequences that are used to index into the CPF font files Single byte UTF 8 sequences U 0000 through U 007F are directly printed as that character from size character page 0 Two byte sequences U 0080 through U 07FF follow the binary form 110ABCDE 10FGHIJK where the letters can be either 0 or 1 These are then transformed into 2 bytes 00000ABC which is used as the size character page for the font and DEFGHIJ K which is the character in that page CPCL FOR LINK OS PRINTERS Page 204 of 329 1073699 001 Three byte sequences U 0800 through U FFFF follow the binary form 1110ABCD 10EFGHI 10KLMNOP These are transformed into 2 bytes OBCDEFGH which is which is used as the size character page and IJ KLMNOP which is used as the character index into that page 8 3 4 6 Encoding Types for Common Fonts The following table lists the correct country to use for commonly encountered CPF fonts which maybe already installed in your printer depending on the product s configuration Font name Associated COUNTRY Command CS24F55 CPF CHINA CT16F55 CPF CHINA GB16F55 CPF CHINA GT16NF55 CPF JAPAN GT24NF55 CPF JAPAN HLM24F55 CPF KOREA TGM16F55
230. e print mode The printer will search for the distance specified by the SETFF command or by the media feed_length SGD for the mark before giving up No error occurs if the printer cannot find the mark Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 215 of 329 1073699 001 9 8 GAP SENSE GAP SENSE Threshold lt CR gt lt LF gt Command Name GAP SENSE Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD media sense_mode to gap The GAP SENSE command is used to configure the system to use the transmissive sensor for detecting media and synchronization marks This is the recommended setting for media with gaps or notches This command is the opposite of BAR SENSE GAP SENSE takes an optional parameter which is used to set the detection threshold Once set either in a label or utilities session it is persistent for all subsequent labels until power off The setting as well as the threshold can be made permanent using the zpl save SGD See the examples for more information The setting is shared with the ZPL setting specified by MN and is equivalent to MNW Parameters Quick Reference Parameter Type Description Valid Range 5 Digit Unit Number Media detection threshold for gap media 0 to 255 Threshold Specifies an optional parameter which is used to detect the difference between plain media and a gap used for synchronization
231. e used by both people who are new to the CPCL language and those who have worked with it extensively and are looking to understand a subtle detail of the system For the more advanced user after text which provides a basic explanation of the functionality of a particular area an Advanced Notes section may appear This section will provide technical information on the command or function If you are new to the language or only require a basic understanding the Advanced Notes Sections can safely be skipped in order to keep to the core concepts of the topic being discussed 2 4 Designations Raw ASCII and Hex When necessary this manual will use a designation to indicate the transmission of raw ASCII data The formatting of data is very similar to what was mentioned above The greater than and less than symbols are used to designate areas of data that are to be converted to binary the lt 15 gt means send the ASCII character 15 Using the above system this would be the same as using lt SI gt 2 5 Designations Binary Data When necessary this manual will use a designation to indicate the transmission of raw binary data To designate areas of data that are to be converted to binary the manual will use a less than symbol then the text SEQ followed by a series of hexadecimal characters and finally a greater than symbol The net output of this is the binary equivalent to the hexadecimal data provided See the example below As
232. e values the error correction is automatically calculated and cannot be separately specified Values 101 to 104 are using the Compact Aztec Code symbology variant while 201 to 232 are using the normal Aztec Code specification The following table shows how much data can be encoded into each of the various values The capacity values in this table are recommendations leaving room to encode the default 23 error correction data It may be possible to encode additional data but it will reduce the error recovery percentage and is not recommended Any remaining space for fixed size Aztec code barcodes will be filled with error recovery data ERL Value Size Capacity Digits Capacity Text Capacity Binary 101 15x15 13 12 6 102 19x19 40 33 19 103 23x23 70 57 33 104 27x27 110 89 53 201 19x19 18 12 6 202 23x23 49 40 24 203 27x27 84 68 40 204 31x31 128 104 62 205 37x37 178 144 87 206 41x41 232 187 114 207 45x45 294 236 145 208 49x49 362 291 179 209 53x53 433 384 241 210 57x57 516 414 256 211 61x61 601 482 298 212 67x67 691 554 343 213 71x71 793 636 394 214 75x75 896 749 446 215 79x79 1008 808 502 216 83x83 1123 900 559 217 87x87 1246 998 621 218 91x91 1378 1104 687 219 95x95 1511 1210 753 220 101x101 1653 1324 824 221 105x105 1801 1442 898 222 109x109 1956 1566 976 223 113x113 2216 1694 1056 224 117x117 2281 1826 1138 225 121
233. eOrNumber FontSize X Y Data lt CR gt lt LF gt TEX TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt TEXT FG FontGroupNumber X Y Data lt CR gt lt LF gt T FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt T TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt T FG FontGroupNumber X Y Data lt CR gt lt LF gt Vertical Rotated 90 Degrees VTIEX FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt EX TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt EXT FG FontGroupNumber X Y Data lt CR gt lt LF gt VT FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt V rueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt VT FG FontGroupNumber X Y Data lt CR gt lt LF gt EXT90 FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt EXT90 TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt TEXT90 FG FontGroupNumber X Y Data lt CR gt lt LF gt T90 FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt T90 TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt T90 FG FontGroupNumber X Y Data lt CR gt lt LF gt Rotated 180 Degrees TEXT180 FontNameOrNumber FontSize X Y Data lt CR gt lt LF gt TEXT180 TrueTypeFontName XScale YScale X Y Data lt CR gt lt LF gt
234. eader there can be one in the case of a CPF font or more in an ECPF font character pages Character pages are completely represented in binary data Character pages start with two byte header as follows Field Name Data Size Description First Character 1 byte Defines the first character in the page Last Character 1 byte Defines the last character in the page The first and last character define the first and last character which is defined for this character page Often this character is ASCII 32 the space character Generally CPCL cannot print characters lower than ASCII 32 Normally the last character will either be 127 128 or 255 The range of defined characters must be contiguous although empty characters can be defined 8 3 2 2 Offset Table Following the first and last characters there is a table of 4 byte offsets These offsets are stored in as 32 bit big endian integers The table must contain the number of entries defined by the First and Last Character fields inclusive If a font defined its first character as 32 and its last character as 255 the offset table must contain 224 4 byte entries The address of this offset is relative to the end of the font header the same as the character page offset in the ECPF header If a glyph in the character page is to be specified as undefined the offset should be set to all zeros This signals that there is no data for this character CPCL FOR LINK OS PRINTERS Pag
235. eans no pre feed operation Example Ul PREFEED 50 lt CR gt lt LF gt Ul PREFEED 0 lt CR gt lt LF gt Command Notes and Interactions The value specified for REVERSE if it is used in a label session is subtracted from the value specified for PREFEED to determine the final motion amount See the REVERSE command on page 230 for more information CPCL FOR LINK OS PRINTERS Page 228 of 329 1073699 001 9 18 PRESENT AT PRESENT AT Amount Delay lt CR gt lt LF gt PA Amount Delay lt CR gt lt LF gt Command Name PRESENT AT Short Form Aliases PA Valid Session Types Utilities or Label Sessions Linked SGD None Negative Aware No When enabled the PRESENT AT command causes the printer to feed an additional amount once a label or line print section has been printed and then when the next feed operation of any kind occurs the motion is undone via an equal reverse feed This allows the print to be pushed out to be at the correct tear off position but still have the next print be registered to the start of the print operation PRESENT AT can be used in either a utilities session or a label session The effect is persistent until power cycle and in both cases takes effect as soon as the next print operation completes To disable PRESENT AT set Amount and Delay to 0 These are also the values used at power on If PRESENT AT was being used and was then disabled the printer will still properly r
236. easurements are in centimeters 112 IN DOTS Specifies that line print measurements are in dots 112 IN INCHES Specifies that line print measurements are in inches 112 IN MILLIMETERS Specifies that line print measurements are in millimeters 112 PCX Prints a PCX file in line print 134 PCX180 Prints a PCX file in line print rotated 180 degrees 134 PCX270 Prints a PCX file in line print rotated 270 degrees 134 PCX90 Prints a PCX file in line print rotated 90 degrees 134 SETMAG Set magnification of a font in line print 151 SETSP Set the spacing of a font in line print 154 TURN Sets the orientation for line print text 236 CPCL FOR LINK OS PRINTERS Page 163 of 329 1073699 001 7 1 Line Print System Details Once enabled any characters greater than ASCII 32 received by the printer which do not start a session or are not part of a session are printed and in addition there are a number of control characters which have special functions The following special control characters are processed by line print mode Line Print Commands Hex Value Description Page lt BEL gt 0x07 Sounds the printer s bell lt BS gt 0x08 Backs up the line print cursor one character lt LF gt Ox0A Advances the Y coordinate for printing without resetting the X lt FF gt 0x0C Completes the page and advances to the next form lt CR gt 0x0D Resets the X and advances the Y coordinate for printing lt ESC gt g 0x1B67 Print line print graphics
237. ecifying other values results in no change in value Example Ul LT CR X LF lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 272 of 329 1073699 001 Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 273 of 329 1073699 001 11 17 MAX LABEL HEIGHT MAX LABEL HEIGHT lt CR gt lt LF gt Command Name MAX LABEL HEIGHT Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD None Negative Aware No MAX LABEL HEIGHT is a command provided for backwards compatibility In previous CPCL products it returned the maximum number of dot lines a label session could be due to memory limitations In Link OS this value is always 65535 which is the maximum label height supported in CPCL The value is null terminated Example Ul MAX LABEL HEIGHT lt CR gt lt LF gt Example Return Data 65535 lt NUL gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 274 of 329 1073699 001 11 18 ON FEED ON FEED Value lt CR gt lt LF gt Command Name ON FEED Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No ON FEED specifies what occurs when the user presses the feed button By default and each time the printer is powered on the feed button on the printer causes the printer to feed to the next mark or gap
238. ed NONE ALERT Mode AlertText When the ON LOW BATTERY command contains the ALERT keyword it must be be followed with a double quote encapsulated string parameter which contains a message to be transmitted back to the host via the last active port when the battery becomes low The string may be up to 100 characters in length Any longer string will cause the value to not be set If the quoted string is empty the ALERT is disabled The power low_battery_text_alert SGD will be temporarily set to this value To make the effect permanent set the SGD directly ALARM Mode CPCL FOR LINK OS PRINTERS Page 276 of 329 1073699 001 AlertLength When the ON LOW BATTERY command contains the ALARM keyword it must be be followed with an up to 5 digit numeric parameter containing the length of an alarm to create in 1 8 of a second increments The valid range is 0 to 65535 though the use of values over 40 is not recommended as printing may be delayed during long audio alerts If the value specified is 0 the audio alarm is disabled The power low_battery_audio_alert SGD will be temporarly set to this value To make the effect permanent set the SGD directly NONE Mode Specifying NONE in the ON LOW BATTERY command causes both the text alert and the alarm to be disabled by setting the alert to an empty string and setting the alarm to zero This is also the default behavior Example Ul ON LOW BATTERY ALARM 24 ALERT The battery is low lt CR
239. ed to fit a particular area from a scaled font 146 SETBOLD Yes Yes Sets text bold mode 148 SETMAG Yes No Set magnification of a font 151 SETSP Yes No Set the spacing of a font 154 TEMP MOVE Yes Yes Sets x and y print offset for the next label only 156 TEXT T Yes No Prints text on a label 158 TEXT180 T180 Yes No Prints text on a label rotated 180 degrees 158 TEXT270 T270 Yes No Prints text on a label rotated 270 degrees 158 TEXT90 T90 Yes No Prints text on a label rotated 90 degrees 158 VT VTEXT VBARCODE VB Yes No Prints a vertical barcode 40 VBOX Yes No Prints a vertical box 89 VCOMPRESSED GRAPHICS VCG Yes No Prints a vertically oriented binary image 94 VCONCAT Yes No Vertically rotated version of CONCAT 96 VEXPANDED GRAPHICS VEG Yes No Prints a vertically oriented ASCII image 104 VSCALE TEXT VST Yes No Prints vertically oriented text from a scalable font 144 VSCALE TO FIT VSTF Yes No Prints vertically oriented text scaled to fit a particular area from 146 a scaled font CPCL FOR LINK OS PRINTERS Page 37 of 329 1073699 001 6 1 Label Session Details A label that contains information to be printed begins with the character followed by a series of ASCII numbers which represent information about the label that follows In order for this session to be detected the first character of the Offset parameter must be a digit Offset Horizontal Res Vertica
240. el Formatting Yes Yes Line Print Specifies alignment for text fields 92 CG Label Formatting Yes Yes Line Print Alias for COMPRESSED GRAPHICS 94 CHAR COUNT Utility amp Diagnostic No Yes Returns number of characters received so far 260 CHAR SET Font Commands Yes No Alias for COUNTRY 205 CHECKSUM Utility amp Diagnostic No Yes Gets application checksum 259 COMPRESSED GRAPHICS Label Formatting Yes Yes Line Print Places binary graphics on a label 94 CONCAT Label Formatting Yes No Use text of different fonts or sizes on the same line 96 CONTRAST Media Management Yes Yes Changes print darkness coarsely 213 COUNT Label Formatting Yes No Creates text fields which increment or decrement 101 COUNTRY Font Commands Yes Yes Changes code page 205 DEL File Commands No Yes Alias for DELETE 318 DELAYED ACTIONS Utility amp Diagnostic Yes Yes Perform an action in some fixed amount of time 261 DELETE File Commands No Yes Delete a file from disk 318 DIR File Commands No Yes Show file directory 320 DISPLAY Utility amp Diagnostic No Yes Used to show text on printer s display 262 DO Utility amp Diagnostic Yes Yes Alias for SETVAR 284 do Utility amp Diagnostic Yes Yes Lower case alias for SETVAR 284 DUMP Utility amp Diagnostic Yes Yes Enters dump mode 264 DUMP IMAGE Utility amp Diagnostic Yes No Dumps label data 265 EG Label Formatting Yes Yes Line Print Alias for EXPANDED GRAPHICS 104 END Label Formatting Yes No Alias for PRINT 104 END Fi
241. ements If not specified a value of 4 is used The range is 0 to 65535 The value is retained between labels but not between power cycles The delay parameter of AUTO PACE is a unit number so use of unit systems besides dots is not recommended Examples Ul AUTO PACE lt CR gt lt LF gt Ul AUTO PACE 0 lt CR gt lt LF gt Command Notes and I nteractions CPCL FOR LINK OS PRINTERS Page 210 of 329 1073699 001 None CPCL FOR LINK OS PRINTERS Page 211 of 329 1073699 001 9 3 BAR SENSE BAR SENSE Threshold lt CR gt lt LF gt Command Name BAR SENSE Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD media sense_mode to bar The BAR SENSE command is used to configure the system to use the reflective sensor for detecting media and synchronization marks This is the recommended setting for media with marks and for continuous media This command is the opposite of GAP SENSE BAR SENSE takes an optional parameter which is used to set the detection threshold Once set either in a label or utilities session it is persistent for all subsequent labels until power off The setting as well as the threshold can be made permanent using the zpl save SGD See the examples for more information The setting is shared with the ZPL setting specified by MN and is equivalent to MNM Parameters Quick Reference Parameter Type Description Valid Range 5 Digit
242. en and locked to binary mode with this option A value of BO indicates the system is not forced to binary mode B1 indicates that it is forced to binary mode Note that unlike all other options there is no space between the B and the number BO or B1 is the correct format of the option Values besides BO and B1 are interpreted as BO BO is the default Data Specifies the data to be encoded in the barcode The data may be any binary data but any NUL characters will be stripped out It is not possible to encode NULs in PDF417 barcodes in CPCL The data parameter itself may be up to 8191 bytes but PDF417 will not encode more than 2684 bytes in the best case scenario numbers only PDF417 has a total of 929 code words available for use less the amount consumed by the ECC selection The data rates for various types of data are as follows CPCL FOR LINK OS PRINTERS Page 74 of 329 1073699 001 Data Type Code Words Used Text 0 5 to 1 per character Numeric Up to 15 per 44 digits Binary 5 per six bytes Termination of Data The data string is terminated with the following sequence No part of this data is encoded in the data that is put into the barcode lt CR gt lt LF gt ENDPDF lt CR gt lt LF gt This termination structure must appear at the end of the barcode or the barcode is not terminated Examples BARCODE PDF417 LBL 0 200 200 920 1 lt CR gt lt LF gt B PDF 417 40 40 S 2 lt CR gt lt LF gt 12345
243. ence Parameter Type Description Valid Range 5 Digit Number The pattern number to use 0 to 106 Pattern Specifies the pattern to use when filling The pattern changes based on the value selected Refer to the following table for the available patterns If the value specified isn t one of the values below a value of 100 is used Pattern Number Description Sample 0 All White 1 to 4 3 Black CPCL FOR LINK OS PRINTERS Page 130 of 329 1073699 001 Pattern Number Description 5 to 9 6 Black 10 to 18 12 Black 19 to 31 25 Black 32 to 44 37 Black 45 to 56 50 Black 57 to 67 62 Black 68 to 81 75 Black 82 to 90 87 Black 91 to 95 94 Black 96 to 98 97 Black 99 to 100 100 Black 101 Horizontal Lines 102 Vertical Lines 103 45 Lines Right 104 45 Lines Left 105 Squares 106 Diamonds CPCL FOR LINK OS PRINTERS Page 131 of 329 1073699 001 Examples PATTERN LBL This example changes the page width using the PAGE WIDTH command You may wish you reset the page width after using this example 0 200 200 400 1 lt CR gt lt LF gt PW 576 lt CR gt lt LF gt CENTER lt CR gt lt LF gt T 7 0 0 0 Pattern Examples lt CR gt lt LF gt LEFT lt CR gt lt LF gt PATTERN 3 lt CR gt lt LF gt BOX 0 30 46 150 24 lt CR gt lt LF gt PATTE 100 lt CR gt lt LF gt BOX 528 30 574 150 24 lt CR gt lt LF gt PATTERN 100 lt CR
244. ension must be specified The file must have a TTF CSF or FNT extension XPoints YPoints The X and Y size of the TrueType or CSF font in points Using the same size for the XPoints and YPoints will make the character appear proportionally normal An XPoints and YPoints of 72 will make a character approximately 1 inch high If XPoints is zero the command is aborted just after XPoints If YPoints is zero it is interpreted to be a value of 1 X Y The X and Y coordinates in units specifying where the string of scaled text is to be placed Data The text to print This string may be up to 8191 characters in length Examples SCALE TEXT LBL 0 200 200 620 1 lt CR gt lt LF gt SCALE TEXT VERAMONO TTF 72 72 40 40 72 Pnt lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 144 of 329 1073699 001 SCALE TEXT VERAMONO TTF 36 36 40 240 36 Points lt CR gt lt LF gt SCALE TEXT VERAMONO TTF 18 18 40 340 18 Points lt CR gt lt LF gt SCALE TEXT VERAMONO TTF 9 9 40 390 9 Points lt CR gt lt LF gt SCALE TEXT VERAMONO TTF 4 4 40 420 4 Points lt CR gt lt LF gt 40 470 Demonstration of SCALE TEXT with a TrueType font at lt CR gt lt LF gt T 7 0 T 7 0 40 494 point sizes of 72 36 18 9 and 4 lt CR gt lt LF gt PRINT lt CR gt lt LF gt 72 Pnt 36 Points 18 Points 9 Points 4 Points Demonstration of SCALE TEXT with a TrueType font at point sizes of 72 36 18 9 and 4 Command Notes and Interactions SCALE
245. ensions have special functions See below in section 13 1 6 for more information 13 1 5 File Functions Provided By CPCL CPCL provides a set of functions for working with files The table below outlines these functions Function Command Page Create a File DF or CISDF file definition commands 308 Delete a File DELETE command 316 Execute a File UF command lt Function 308 252 Get a List of Files DIR command 320 Get the Contents of a File TYPE command 325 Rename a File FILE RENAME command 322 Use a File as a Parameter lt Function 252 13 1 6 Special File Types Certain file types in Link OS become read only once they are transferred to the printer The files at this point can be deleted with the DELETE command and their checksums can be obtained with the FILE CRC16 command but they cannot be renamed or typed or used a parameter on the insert functions CPF CSF FNT BAZ NRD PAC TTF TTE BAE PRF WKF 13 2 Define and Use Format Sessions The define and use format Sessions in CPCL are used for two purposes The first and primary purpose is to define formats which can then be used with the USE FORMAT session which provides the ability to specify variable data which is to be filled in in the format session See below for examples The second purpose is the definition of simple non binary files in which the more robust features of the CISD
246. ent CCL key The CCL Key is the character used to start sessions By default and at power on the Key is set to the exclamation point character It is possible however to change this key with the lt ESC gt W1 command Generally there is no reason to use this function It is provided for backwards compatibility and unusual cases The lt ESC gt R1 function returns a single byte which represents the current CCL key Parameters Quick Reference Parameter Type Description Valid Range Single Raw Byte Specifies the CCL Key lt 0 gt to lt 255 gt Key Specifies the new key to use as a raw byte The value of 0 is a special purpose value that disables all CPCL sessions Use of it is not recommended Command Notes and Interactions Note that changing the CCL key does not have any effect on the lt and gt macros These are constant regardless of the setting of the CCL key See the SET command on page 278 for more information of the I lt and gt macros CPCL FOR LINK OS PRINTERS Page 293 of 329 1073699 001 11 33 lt ESC gt I Send Two Key Report to Host lt ESC gt I Command Name lt ESC gt Valid Session Types Not valid in sessions lt ESC gt I is used to instruct the printer to transmit the two key report to the host rather than printing it The lt ESC gt V command is used to print the two key report See that command on page 296 for more information on that command See page 246 for a discussi
247. er is required If it is absent or if a value of 0 is provided the font will not be usable The SIZES command line must be followed by a list of sizes one on each line and each line lt CR gt lt LF gt terminated Each line has three required parameters and one optional parameter The syntax for these lines is as follows Note the 0 in the line While unused this parameter must be present lt HeightMult gt lt WidthMult gt 0 lt PageOffset gt lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 191 of 329 1073699 001 HeightMult Specifies the height to multiply the stored bitmap to obtain the desired size While the valid range is 0 to 65535 it is generally recommended not to exceed values outside of 1 to 16 and 65534 to 65530 A value of 0 results in no output Values of 1 to 16 increase the height of characters by the specified number of times Values of 65534 to 65530 reduce the height of the characters by a fraction 65534 is half height 65533 is one third height 65532 is one fourth height and so on WidthMult Specifies the width to multiply the stored bitmap by to obtain the desired size While the valid range is 1 to 65535 it is generally recommended not to exceed values outside of 1 to 16 The width does not support the high values used to reduce size The use of a value of 0 is not supported PageOffset This is an optional parameter which specifies where the bitmaps for this size start This parameter is a bina
248. es None _5 Encode ANSI Application dentifier Yes None _6 Encode AIAG Data Identifier Yes None _8 Encode AIAG Application Identifier Yes None _9 Encode ANSI Data Identifier Yes None _ 7nnnnnn Encode Extended Channel Data ECI Yes See Below _c Encode Control Character No See Below GS1 Data Matrix GS1 Data Matrix barcodes can be encoded similar to other barcode types of GS1 barcodes by using ECC 200 and using the FNC1 prefix to the data Binary Data To encode binary data within the data string use the _dnnn escape sequence where nnn is the ASCII value of the character to be encoded This can be any value from 0 to 255 and must be padded to 3 digits This is the mechanism for encoding the CR and LF characters as they are stripped out during parsing of the Data parameter If the value is greater than 255 no barcode will be printed Structured Append Data Matrix supports structured append functionality Up to 16 symbols may be linked In addition the barcode includes a two byte file identifier Structured append is enabled by specifying the _2 sequence followed by 9 digits _2nnnoooppp Each set of three digits represents a digit from 1 to 254 Values outside this range are invalid and will result in no barcode being printed All three digits must be provided including any leading zeros as necessary The first three indicate both the total number of symbols and the current symbol number encoded as follows nnn
249. es Used to set horizontal label quantity 219 MULTILINE Label Formatting Yes No Prints multiple lines of text with same style 124 NAME Status Enquiry No Yes Returns current firmware version 241 NO PACE Media Management Yes Yes Disables delaying of printing between labels 220 OLB Utility amp Diagnostic Yes Yes Alias for ON LOW BATTERY 276 ON FEED Utility amp Diagnostic Yes Yes Perform an action when the feed key is pressed 275 ON INDEX MARK ERROR Media Management Yes Yes Alias for PAPER J AM 225 ON LOW BATTERY Utility amp Diagnostic Yes Yes Perform an action when battery is low 276 ON OUT OF PAPER Media Management Yes Yes Perform an action when out of paper error occurs 221 PA Media Management Yes Yes Alias for PRESENT AT 229 CPCL FOR LINK OS PRINTERS Page 30 of 329 1073699 001 CPCL Command Label Utilities Description PACE Media Management __ Yes Yes Delay printing next label until feed key is pressed 224 PAGE WIDTH Label Formatting Yes Yes Specify the width of a label 127 PAPER JAM Media Management Yes Yes Sets paper jam detection mechanism 225 PATTERN Label Formatting Yes No Specifies fill pattern 130 PCX Label Formatting Yes Yes Line Print Prints a PCX file on a label 134 PCX180 Label Formatting Yes Yes Line Print Prints a PCX file on a label rotate
250. es a reasonable level of detail to be able to utilize the command Following this is a quick reference of the parameters used in the command in table form The entries in this table are as follows e Parameter The name of the parameter as outlined in the format line of the command CPCL FOR LINK OS PRINTERS Page 34 of 329 1073699 001 e Parameter Type This represents the type of the parameter which is always one of the types outlined in section 3 3 starting on page 19 e Description A brief description of the parameter s function e Valid Range The valid range of data taken by the parameter in a quick simple form After this there is a detailed breakout of each parameter that repeats all of the information in the table and also provides more detail and additional information about the behavior when out of range values are used Next an example session showing the command in use is provided On the example line there will be the name of an LBL file This is the filename of the label in the included samples label package There may also be a bitmap image shown which shows the expected output of the printer to the left side of the screen Lastly there is a section entitled Command Notes and Interactions which contains more advanced details about subtle behaviors of the command or how it interacts with other commands and systems For most users this information is only necessary to review when you are trying to perform a very specific
251. eturned to the user The data returned by the printer in response to the command will be encapsulated in double quotation marks and is not NUL or lt CR gt lt LF gt terminated If the setting requested is not valid a double quote encapsulated question mark will be returned Special Setting Name Values Retrieving All Settings In addition to the setting name there are special values which can be used to obtain lists of all user accessible SGD values SettingName Value Description allcv Returns the names values and choices for all settings all Returns the names of all settings allc Returns the names and choices for all settings allv Returns the names and values of all settings Each one of these special options must be specified in lower case Each option returns a complete list of the printer s settings but with different portions of the available information For each branch of SGD settings returned the format is a single line with the branch name terminated with a period and lt CR gt lt LF gt followed by any settings in the branch It is possible for a branch to be empty if no settings are contained within it Below is an example of what each individual setting looks like for each of these options Value Example data for comm baud allev comm baud 19200 Choices 4800 9600 14400 19200 28800 38400 57600 115200 lt CR gt lt LF gt All comm baud lt CR gt lt LF gt alle comm baud Ch
252. everse the last PRESENT AT operation to ensure proper registration Typically PRESENT AT values are small usually up to about 40 Using longer values may cause registration issues as the media drifts left to right as it is reversed Parameters Quick Reference Parameter Type Description Valid Range 5 Digit Unit Number How much to feed in units 0 to 20000 dots Delay 5 Digit Number How long to delay before feeding in 1 8 of seconds 0 to 240 Amount Specifies the amount to feed in units after a print ended and then to be fed again in reverse before the subsequent print operation After the conversion from the current unit to dots the resulting amount must be between 0 and 20000 Values greater than 20000 will be interpreted as 20000 Delay Specifies how long to delay before starting the PRESENT AT motion after a print operation is complete in 1 8 of a second increments The Delay parameter is used so that if labels are coming in succession the printer does not need to perform and then immediately undo the PRESENT AT operation If another print operation is performed during the delay the PRESENT AT is canceled and the timer will be restarted after the new print operation is completed The valid range is 0 to 240 1 8 of a second periods or 30 seconds Values larger than this are interpreted as 240 Examples Ul PRESENT AT 24 2 lt CR gt lt LF gt Ul PRESENT AT 0 0 lt CR gt lt LF gt Command Notes and Interacti
253. ext 0 to 65535 Data CR LF Terminated String The text data to be concatenated Up to 2024 characters 1 The size of all data fields in all sub commands must not exceed 2024 characters X Y The X and Y coordinates in units specifying where the concatenated string is to be placed FontNameOrNumber The name or the number of the pre scaled or internal font to use when rendering the current portion of the concatenated string This can be a number defined in the font file or the font s name with or without file extension FontSize The size of the font to print These sizes are defined within the font specified See page 190 for size values for built in fonts The size selection can be overridden by SETMAG Offset The distance in units that the top is of text is placed off of the Y coordinate This is used as the method to align fonts of various sizes ScaledFontName Specifies the name of the TrueType or CSF font file to use when printing thecurrent portion of the concatenated string The entire filename of the font including extension must be specified The file must have a TTF CSF or FNT extension XScale YScale The X and Y size of the TrueType or CSF font in points Using the same size for the XPoints and YPoints will make the character appear proportionally normal An XPoints and YPoints of 72 will make a character approximately 1 inch high CPCL FOR LINK OS PRINTERS Page 97 of 329 1073699 0
254. f 329 1073699 001 9 11 MULTI MULTI Quantity lt CR gt lt LF gt Command Name MULTI Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None MUTLI is used to set the number of labels which print horizontally across the page The horizontal labels are exact duplicates across the page it is not possible to specify unique content for each horizontal label When MULTI is active with a value of 2 or 3 the maximum print width is divided by the factor specified and this becomes the new maximum value for the PAGE WIDTH command Similar to PAGE WIDTH MULTI can affect the size of the drawing canvas when activated For that reason it is recommended to place the MULTI command as the first item in the label session before the PAGE WIDTH or any drawing commands Value of 2 and 3 are not supported on Epoch printers If used in a utilities session the value specified applies only to line print and is persistent If used in a label session the setting only applies to the current label being printed and is not persistent The MULTI command has no effect in line print if the text being printed is more than one line long Parameters Quick Reference Parameter Description Valid Range Quantity 5 Digit Unit Number How many labels to print across the page 1 to 3 Quantity Specifies the number of horizontal labels to print across the page Values other and 2 are 3 are interpreted
255. f file names see page 308 3 6 2 Use Format File Session This session is used to execute a previously defined format with filename specified These formats are typically ones previously defined with the Define Format syntax mentioned above USE FORMAT lt Filename gt lt CR gt lt LF gt UF lt Filename gt lt CR gt lt LF gt Field Name Description Valid Range Filename The name of a filename of the format to lt CR gt lt LF gt 38 alpha numeric use on the file system Terminated String characters plus drive letter and period for extension CPCL FOR LINK OS PRINTERS Page 23 of 329 1073699 001 The filename in this session can include a drive letter For more extensive information about USE FORMAT and a discussion of file names see page 308 3 6 3 CISDF Format File Session This session is used to transfer Binary or ASCII files to the printer A CISDF session is the basic session for transferring a binary file to the printer A CISDF file is always stored to flash memory CISDF lt CR gt lt LF gt Filename gt lt CR gt lt LF gt File Size gt lt CR gt lt LF gt Checksum gt lt CR gt lt LF gt File Data gt A CISDFCRC16 is very similar to the CISDF session but adds a more robust mechanism for detecting errors during transfer in the form of a CRC A CISDFCRC16 file is stored always stored to flash memory When using a CISDFCRC16 file the checksum is ignored but still must be specified
256. for printing line print text The font can either be a pre scaled font or a TrueType font The default values for SETLP use the pre scaled font syntax and specify font number 7 size 0 and a line spacing of 24 The command to configure these defaults is as follows Ul SETLP 7 0 24 lt CR gt lt LF gt The values specified by SETLP remain persistent until changed or until power cycle Note that when using TTF fonts with this command note that the XScale and YScale parameters are in units rather than dots This behavior is from legacy CPCL and is maintained for backwards compatibility In legacy CPCL it was possible so specify AGFA formatted fonts using the TTF font syntax This is not supported in the Link OS implementation of CPCL You can change the font multiple times per line however only the first line spacing value used on a line will apply Thus if you change from a small font to a large font with a small line spacing the larger font will get cut off When you change fonts in this way text is always aligned from the top of the line Parameters Quick Reference Parameter Description Valid Range Pre scaled Font Syntax FontNameOrNumber Space Terminated String A font name or number to create the representation See Below FontSize 3 Digit Number The size of the font 0 to 65535 LineSpacing 5 Digit Unit Number The amount of space to place between lines in units 0 to 65535 Alternate Syntax TTF Font Syntax
257. for the X and Y will make the character appear proportionally normal For most labels this printer has 200 dots per inch so an X and Y of 200 will make a character approximately 1 inch high See page 38 for more details on label sessions Offset Specifies the distance in units that the top of the human readable text is placed from the bottom of the barcode Note that many fonts have built in spacing at the top This space will be included even of the offset specified is 0 Examples BARCODE TEXT LBL 0 200 200 500 1 lt CR gt lt LF gt JOURNAL lt CR gt lt LF gt BARCODE TEXT 7 0 0 lt CR gt lt LF gt B 128 1 2 20 25 25 12345abc lt CR gt lt LF gt L 24 T 7 0 270 25 lt CR gt lt LF gt arcode Text lt CR gt lt LF gt ont 7 lt CR gt lt LF gt ize 0 Offset DML lt CR gt lt LF gt ARCODE TEXT 4 1 10 lt CR gt lt LF gt 128 12 20 25 150 12345abc lt CR gt lt LF gt L 24 T 7 0 270 150 lt CR gt lt LF gt arcode Text lt CR gt lt LF gt ont 4 lt CR gt lt LF gt ize 1 Offset 10 lt CR gt lt LF gt DML lt CR gt lt LF gt ARCODE TEXT VERAMOIT TTF 35 35 5 lt CR gt lt LF gt 128 12 20 25 275 12345abc lt CR gt lt LF gt L 24 T 7 0 270 275 lt CR gt lt LF gt Barcode Text lt CR gt lt LF gt Font VERAMOIT TTF lt CR gt lt LF gt Size 35x35 points lt CR gt lt LF gt Offset 5 lt CR gt lt LF gt ENDML lt CR gt lt LF gt BARCODE TEXT OFF lt CR gt lt LF gt B 128 1 2 20 25 400 12345abc lt CR gt lt LF gt T
258. from SETFF The printer will search for the distance specified by the SETFF command or by the media feed_length SGD for the mark before giving up No error occurs if the printer cannot find the mark The command is very similar to the utilities FORM command but has an important difference The FF command will cause the printer to execute the feed action as defined with the ON FEED command see page 275 If this command is set to IGNORE FF will have no function If set to REPRINT FF will reprint the last printed label session By default the printer is set to ON FEED FEED so the command will cause a feed operation Note that the FF BAT file activated by physically pressing the feed key is not connected to the FF command the bat file will not run when FF is received by the printer Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 237 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 238 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 239 of 329 1073699 001 10 Status Enquiry Commands Commands covered in this section are as follows CPCL Command L U Description NAME No Yes Returns current firmware version 241 VERSION No Yes Returns short version number 241 Comtec Escape Command Description lt ESC gt h Send printer status 242 lt ESC gt i Send secondary printer status 243 lt ESC gt V Send firmware version 244 CPCL FOR LINK OS PRINTERS Page 240 of 329 1073699 00
259. function or understand an unusual behavior of a command CPCL FOR LINK OS PRINTERS Page 35 of 329 1073699 001 X X SAMPLE COMMAND SAMPLE COMMAND SampleX SampleY SampleData lt CR gt lt LF gt Command Name SIMPLE COMMAND Short Form Aliases SC Valid Session Types Label Sessions Only Linked SGD None Negative Aware No This is the documentation of a sample command in CPCL This command doesn t actually exist it is just for the sake of helping you understand the layout of the command Running the example label will only print a blank label Parameters Quick Reference Parameter Type Description Valid Range SampleX 5 Digit Unit Number The X value for this sample command 0 to Label Width in Units SampleY 5 Digit Unit Number The Y value for this sample command 0 to Label Height in Units SampleData lt CR gt lt LF gt Terminated Data for the sample command Up to 8191 bytes String Samplex This is where there would be detail about the Sample X Parameter We would include here the size of the parameter that is accepted the valid range and information about what happens when invalid values are specified SampleY This is where there would be detail about the Sample Y Parameter We would include here the size of the parameter that is accepted the valid range and information about what happens when invalid values are specified SampleData This is where we would be detail on
260. ge 185 for documentation on this command Besides printing text and raw graphic data barcodes and PCX images can also be printed in line print mode For a complete list of commands supported in line print see section 7 on page 163 The entire orientation of line print output can be changed using the TURN 180 command Note that when the line print buffer is full the spacing between buffers may result in some lines having uneven vertical spacing This only occurs when using the TURN 180 command See that command on page 236 for more information CPCL FOR LINK OS PRINTERS Page 165 of 329 1073699 001 7 2 LMARGIN LMARGIN Offset lt CR gt lt LF gt Command Name LMARGIN Short Form Aliases None Valid Session Types Utilities sessions only Linked SGD None Negative Aware No The LMARGIN command is used to offset line print printing by a fixed amount This command affects all data printed via line print text or any utilities command which results in printout This consists of the following commands when used in utilities sessions BARCODE PCX PCX90 PCX180 PCX270 lt ESC gt g COMPRESSED GRAPHICS EXPANDED GRAPHICS The value specified by offset is added to the X position of any line print operation The offset is calculated from the position established by the PAGE WIDTH command See page 127 for more information on this command This command is persistent until it is changed or until power cy
261. ge is 0 to 9 If the font group specified is too large the definition is ignored and the existing font group definition is left intact FontNameOrNumber The name or the number of the pre scaled or internal font to use when creating the font group This can be a number defined in the font file or the font s name with or without file extension CPCL FOR LINK OS PRINTERS Page 107 of 329 1073699 001 FontSize The size of the font to use in the font group These sizes are defined within the font specified See page 190 for size values for built in fonts The size selection can be overridden by SETMAG Examples FONT GROUP LBL 0 200 200 800 1 lt CR gt lt LF gt FONT GROUP 0 0 0 0 2 0 3 0 6 lt CR gt lt FONT GROUP 1 0 3 0 6 lt CR gt lt LF gt TEXT 7 0 20 20 Font Group Example TEXT 7 0 20 65 TEXT command lt CR gt lt LF gt LF gt TEXT FG 0 20 100 Font Group 0 lt CR gt lt LF gt TEXT FG 0 20 150 Font Group 0 wit TEXT FG 0 20 190 Font Group 0 wit TEXT 7 0 20 250 CO CONCAT 20 270 lt C R gt lt LF gt CAT command lt C 7 1 4 Non Font Group lt CR gt lt LF gt FG 115 FG 1 lt C R gt lt LF gt FG 0 15 FG 2 lt CR gt lt LF gt ENDCONCAT lt CR gt lt L CONCAT 20 320 lt C 7 1 4 Non Font Group lt CR gt lt FG 1 15 Font Group 1 lt CR gt lt FG 0 15 Font Group 2 lt CR gt lt L ENDCONCAT lt CR gt lt L CONCAT 20 370 lt C 7 1 4 Non Font Group lt CR gt lt FG 1 15 Fon FG 0 15
262. gt LINE 575 0 0 249 0 lt CR gt lt LF gt CENTER lt CR gt lt LF gt T 7 0 0 0 Top Edge Of Label lt CR gt lt LF gt T90 7 0 0 249 Left Edge of Label lt CR gt lt LF gt T 7 0 0 225 Bottom Edge Of Label lt CR gt lt LF gt T270 7 0 575 0 Right Edge of Label lt CR gt lt LF gt T 7 1 0 60 Page Width lt CR gt lt LF gt T 7 10 100 Value 576 lt CR gt lt LF gt PRINT lt CR gt lt LF gt 0 200 200 250 1 lt CR gt lt LF gt PAGE WIDTH 832 lt CR gt lt LF gt BOX 0 0 831 249 0 lt CR gt lt LF gt LINE 0 0 831 249 0 lt CR gt lt LF gt LINE 831 0 0 249 0 lt CR gt lt LF gt CENTER lt CR gt lt LF gt T 7 0 0 0 Top Edge Of Label lt CR gt lt LF gt T90 7 0 0 249 Left Edge of Label lt CR gt lt LF gt T 7 0 0 225 Bottom Edge Of Label lt CR gt lt LF gt T270 7 0 831 0 Right Edge of Label lt CR gt lt LF gt T 7 1 0 60 Page Width lt CR gt lt LF gt T 7 10 100 Value 832 lt CR gt lt LF gt PRINT lt CR gt lt LF gt S Top Edge Of Label eqn 40 ebpq 3461 U me S 4 Oo vo S T5 W pP 4 uv Bottom Edge Of Label CPCL FOR LINK OS PRINTERS Page 128 of 329 1073699 001 Top Edge Of Label Left Edge of Label 12927 40 6p3 461 Bottom Edge Of Label Top Edge Of Label Left Edge of Label 12907 40 6p3 461 Bottom Edge Of Label Command Notes and Interactions PAGE WIDTH is the only command that actually specifies the width of the drawing area of the label Other commands such as MOVE may move t
263. gt lt LF gt Command Name PAGE WIDTH Short Form Aliases PW Valid Session Types Label And Utility Sessions Linked SGD None Negative Aware No The PAGE WIDTH command is used to specify the width a label session The height of the session is defined in the session header Some printers have built in sensors to detect the width of the currently installed media If this sensor is installed and enabled setting a PAGE WIDTH of 0 will use the detected media width for the label The PAGE WIDTH command must either be used in a utilities session or before any command which creates output on the label is used If used in a label session it should be the first command after the session line or the second if you are using a units command such as IN CENTI MERES to modify the session line It is not recommended to change PAGE WIDTH once you have started drawing to the label as any fields drawn so far will become corrupted Parameters Quick Reference Parameter Description Valid Range Width 5 Digit Unit Number Spacing between each line in units 0 to 65535 Width Specifies the width of the label in units The power on default value is 0 The value is persistent between label sessions Values will be converted to the rounded to the nearest multiple of 8 A value of zero is a special value that has several meanings If Width is zero and the printer has a media width sensor and it is enabled using the medi
264. gt lt LF gt 30 200 to 200 30 at 25 Width lt CR gt lt LF gt Note how line always thickens to lt CR gt lt LF gt lt CR gt lt LF gt the right ENDML lt CR gt lt ML 24 T 7 Test Text Test Text Test Text Test Text Test Text Test Text Test Text Test Text Test Text ENDML lt CR gt lt INVERSE LI INVERSE LI ML 24 T 7 0 250 240 lt CR gt lt LF gt lt CR gt lt L LE gt Line lt C Line lt C Line lt C Line lt C Line lt C Line lt C Line lt C Line lt C Line lt C LF gt F gt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt lt 1 30 220 lt C Li Li Li Li Li Li Li Li Li R gt lt LF gt F gt kai p2 ea koi xl ki Al 7 VVVVVVVV E 30 240 200 240 25 lt CR gt lt LF gt E 30 280 30 450 25 lt CR gt lt LF gt Two Inverse Line Commands Over Text lt CR gt lt LF gt 30 240 to 200 240 at 25 Width lt CR gt lt LF gt 30 280 to 30 450 at 25 Width lt CR gt lt LF gt lt CR gt lt LF gt Note how first thickens downward lt CR gt lt LF gt and second thickens to the right lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 115 of 329 1073699 001 ji l l l l l l l Command Notes and I nteractions Two Inverse Line Commands Over a Box 30 30 to 200 200 at 25 Width 30 200 to 200 30 at 25 Width Note how Line always
265. guages The command disables AUTO PACE if it is in effect The command is always persistent when used If used in a label session it takes effect on the label that will be printed when the session ends and any subsequent sessions Examples Ul PACE lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 224 of 329 1073699 001 9 15 PAPER JAM PAPER JAM Mode Unused ALERT Message lt CR gt lt LF gt PJ Mode Unused ALERT Message lt CR gt lt LF gt ON INDEX MARK ERROR Mode Unused ALERT Message lt CR gt lt LF gt Command Name PAPER J AM ON INDEX MARK ERROR Short Form Aliases PJ Valid Session Types Label and Utilities Sessions Linked SGD None The PAPER J AM command specifies how a paper jam condition is detected and what happens when it occurs The function can use either the media sensor and check to see if a mark or gap occurs to find if there has been a paper jam or can use the peeler sensor to detect if no label is present after a label session is sent for printing When using any mode besides NONE if a paper jam is detected an error will occur requiring the user to open the head remove the jam and then close the head before printing will continue The command can also return an optional message to the host when a jam occurs see the ALERT parameter The command is persistent once set either in a label or in a utilities session
266. h is a bit field indicating various status attributes To get the status of a particular field mask off the unused bits The bit fields are as follows Bit Number Mask If Set 1 If Clear 0 0 0x01 Printer is Busy Printer is Ready 1 0x02 Paper is Out Paper is OK 2 0x04 Head Latch is Open Head Latch is Closed 3 0x08 Battery is Low Battery is OK 4 0x10 Printer has been reset Reset has been acknowledged 5 0x20 Last Motor Direction was Reverse Last Motor Direction was Forward 6 7 0xC0 Current Contrast Setting 0 3 Reset Acknowledgement When the printer first starts up bit 4 of lt ESC gt h will always be set indicating that the printer has been reset To acknowledge the reset and clear the bit send the lt ESC gt N command See the documentation for this command on page 295 for more information Contrast Setting The final two bits of the response indicate a 0 3 value which represents the last setting of the CONTRAST command or the value of the print contrast SGD Example lt ESC gt h Example Response lt 16 gt This response indicates that everything is normal and that the reset bit but 4 has not been acknowledged with lt ESC gt N If the reset bit had been acknowledged the response would be lt 0 gt Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 242 of 329 1073699 001 10 4 lt ESC gt i Extended Printer Status lt ESC gt L Command Name lt
267. h of pixels The default value if the value is not specified is 0 disabling mutli encoding M Multi is ignored when using ECL 300 only one rune is printed regardless of the value ID ID Specifies a string which is encoded into each barcode when using the Multi option This string is often used as a description It cannot exceed 25 characters any characters in excess of 25 will be ignored ID must be an ASCII string that complies with the Text data mode as shown below When Multi is disabled the value is ignored By default this field is empty Data Specifies the data to be encoded in the barcode The most efficient data type will be automatically selected based on the data provided and the barcode will automatically switch between data types as necessary The system starts in encoding type upper and each switch takes at least the space of one character of the current mode to change The full range of characters can be encoded Codes 0 127 are ANSI X3 4 and 128 255 are encoded in ISO 8859 1 This corresponds to an ECI of 3 see Flag Mode below The following modes are supported Upper Text Uppercase A Z and space Lower Text Lowercase A Z and space Mixed Text _ I characters low ASCII and space Punct Text ESS SUN REA aap A lt CR gt lt CR gt lt LF gt Digit 0 9 comma period and space Binary ASCII Values 0 255 Note that in CPCL you cannot encode ASCII NUL in the data
268. haracters than we ve seen before lt CR gt lt LF gt ML 24 T 7 0 40 300 lt CR gt lt LF gt SCALE TO FIT demonstration using TrueType Font lt CR gt lt LF gt Each line has 250 width and 50 height lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt gt Sa A few A bit more Hany more characters He me clare thy et er SCALE TO FIT demonstration using TrueType Font Each Line has 25 width and 50 height Command Notes and Interactions SCALE TO FIT supports the alignment commands CENTER LEFT and RIGHT but only when used with scaled fonts CSF files and not TTF fonts CPCL FOR LINK OS PRINTERS Page 147 of 329 1073699 001 6 30 SETBOLD SETBOLD Boldness lt CR gt lt LF gt Command Name SETBOLD Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No SETBOLD is used to add a faux bolding effect to pre scaled fonts in CPCL It accomplishes this by redrawing the text one or more times shifting one pixel to the right side of the page each time The spacing of the characters does not change as a result of the bolding The number of shifts and writes is specified by the Boldness parameter The command affects any pre scaled text drawing in CPCL no matter what command it comes from Parameters Quick Reference Parameter Type Description Valid Range 3 digit Unit Number Sets the boldness of the text 0 to 999 Boldness
269. he LP ORIENT command When using LP ORIENT 270 the LMARGIN and SETLF commands have no effect the LMARGIN is fixed at 0 and SETLF is forced to 10 When using LP ORIENT 270 the height of the page is determined by the number of lines transmitted LP ORIENT 270 is not supported for TrueType fonts Parameters Quick Reference Parameter Description Valid Range Option Space terminated string Specifies the amount of rotation 0 or 270 Option Specifies the rotation option for line print text either 0 or 270 Any value besides 270 is interpreted as zero Any other value is ignored and results in no change to the setting Example LP ORI ENT Ibl U1 LP ORIENT 0 lt CR gt lt LF gt This is a paragraph of text that will be used to demonstrate the impact of the LP ORIENT command lt CR gt lt LF gt lt CR gt lt LF gt This is what happens to standard text is printed in LP ORIENT 270 This is the same paragraph as above lt CR gt lt LF gt lt CR gt lt LF gt U1 LP ORIENT 270 lt CR gt lt LF gt This is a paragraph of text that will be used to demonstrate the impact of the LP ORIENT command lt CR gt lt LF gt U1 LP ORIENT 0 lt CR gt lt LF gt lt CR gt lt LF gt Here is data correctly formatted for LP ORIENT 270 lt CR gt lt LF gt L Ul LP ORIENT 270 lt CR gt lt LF gt Tttcm lt CR gt lt LF gt heota lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 170 of 329 1073699 001 ix n lt CR gt lt LF g
270. he area but do not change its size CPCL FOR LINK OS PRINTERS Page 129 of 329 1073699 001 6 21 PATTERN PATTERN PatternNumber lt CR gt lt LF gt Command Name PATTERN Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The PATTERN command is used to change the fill patterns of the SCALE TEXT and SCALE TO FIT when using CSF fonts only some LINE commands must be horizontal or vertical lines and all BOX commands By default and at the start of each label session PATTERN is set to 100 which is solid black PATTERN is persistent within the same label session Lines or boxes drawn with PATTERN values besides 100 start and end one dot higher than their pixel position indicates This behavior does not occur with SCALE TEXT See below for a demonstration of each of the patterns If two areas of different patterns overlap there may be extra areas drawn in the 16 pixels to the left and right of the pattern being drawn This does not occur with PATTERN 100 or if the pattern is byte aligned horizontally This label shows this behavior 0 200 200 300 1 lt CR gt lt LF gt PATTERN 100 lt CR gt lt LF gt BOX 20 20 220 220 12 lt CR gt lt LF gt PATTERN 25 lt CR gt lt LF gt BOX 30 30 230 230 4 lt CR gt lt LF gt PATTERN 50 lt CR gt lt LF gt ST PLB_LAT CSF 50 50 27 27 TEXT lt CR gt lt LF gt PRINT lt CR gt lt LF gt Parameters Quick Refer
271. he parser always consumes the data up to the next CR LF regardless of the setting of LT The various parameter types in CPCL act differently with regard to how they handle excess characters besides the specific ones specified or other details on how they are terminated For example while a numeric parameter will consume any excess CRs before an LF a file parameter such as in GETVAR will not It is also possible to terminate commands with spaces and in some cases arbitrary characters The rules vary based on the parameter type that is the last one in the command or in some cases the command itself For this reason it is best to select the proper terminator and use it as specified to ensure correct behavior Parameters Quick Reference Parameter Description Valid Range Mode lt CR gt lt LF gt Terminated Specifies Line Termination Option See Below String Mode Specifies what terminator is to be used for lines in CPCL The valid modes are as follows Mode Value Description LF Lines are terminated with LF A single CR before the LF is always ignored CR LF Same as LF CR Lines are terminated with CR or LF An LF character after a CR will not be processed and will fall out to the next parser CR X LF Lines are terminated with lt CR gt lt LF gt but zero or more characters including NULs may appear between the CR and the LF These characters between the CR and LF will be consumed and ignored Sp
272. he printed graphic The default size is M if not specified which makes an indicator 100 pixels high The S size makes the indicator 50 pixels high and L makes the indicator 200 pixels high Note that this is not a parameter it is similar in syntax to the BAT INDICATOR command itself DBG P The P character can be added to the end of the BAT INDICATOR command so that a text based percentage of the battery is printed next to the graphical indicator The DBG option can also be used which provides the same text based percentage in addition to an indication of the current battery voltage level and ADC as well as the current user label count the odometer user_label_count SGD Note that this is not a parameter it is similar in syntax to the BAT INDICATOR command itself Example 0 200 200 770 1 lt CR gt lt LF gt BAT INDICATOR 30 30 lt CR gt lt LF gt T 7 0 30 180 Battery Indicator lt CR gt lt LF gt T 7 0 30 204 Medium Size Default lt CR gt lt LF gt BAT INDICATOR 30 250 S P lt CR gt lt LF gt T 7 0 30 350 Battery Indicator lt CR gt lt LF gt T 7 0 30 374 Small Size S with P Option lt CR gt lt LF gt BAT INDICATOR 30 405 L DBG lt CR gt lt LF gt T 7 0 30 655 Battery Indicator lt CR gt lt LF gt T 7 0 30 684 Large Size L with DBG Option lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 87 of 329 1073699 001 Battery Full Low Battery Indicator Medium Size Defaul
273. he printer does not have to be in line print mode for this command to be used in utilities mode The X and Y parameters of the barcode must be specified but have no effect instead the X Y RX RY XY or RXY commands must be used to specify the location of the barcode Note that only the BARCODE command operates in line print mode VBARCODE does not It may be necessary to use the SET LF command to be able to see the entire height of the barcode See the Introduction to Line Print on page 25 for more information Utilities Example Ul SETLF 160 lt CR gt lt LF gt U1 BARCODE MAXICODE 0 0 lt CR gt lt LF gt ZIPPER 1 lt CR gt lt LF gt CC 840 lt CR gt lt LF gt SC 001 lt CR gt lt LF gt POST 555555555 lt CR gt lt LF gt MSG Maxicode Test Barcode lt CR gt lt LF gt ENDMAXICODE lt CR gt lt LF gt Command Notes and Interactions The BARCODE TEXT command cannot be used to print data representations under barcode created with this command no text will print The NOTEXT option which was to be used to print barcode text in previous printers is not supported in Link OS The justify commands LEFT RIGHT and CENTER do function on barcodes created with this command unlike all other 2D symbologies VBARCODE has no effect on MaxiCode barcodes and is treated as if the BARCODE command was used including orientation and coordinate system used in placement Using a MaxiCode barcode with a label session resolution of 100 will cause
274. he printer will wait for you to send the data for all the fields before printing and then after printing will go back to waiting to receive more data In this way you need only send raw CR LF terminated text strings to fill out your label allowing for much simpler data transmission to fill out a pre defined label format See page 309 for information on the field replacement mode of USE FORMAT Example DF PRINT BAT lt CR gt lt LF gt 0 200 200 50 1 lt CR gt lt LF gt T 7 0 0 0 Hello world lt LT gt TIME lt CR gt lt LF gt lt CR gt lt LF gt RE RUN lt CR gt lt LF gt PRINT lt CR gt lt LF gt UF PRINT BAT lt CR gt lt LF gt This example creates the file PRINT BAT on the printer using a DEFINE FORMAT session and prints a small label that has the current time on it which includes the RERUN command Then the PRINT BAT file is executed using a USE FORMAT session The result is that the printer continuously prints labels which have the time on them In order to stop the printer reboot it Command Notes and Interactions In legacy CPCL printers all files which could be run from the printer supported RE RUN Now only the ones listed above are supported however any of the non supported files can use the USE FORMAT session to activate another file on the printer which has a RE RUN command as a workaround 11 21SET SET Find Replace Command Name SET Short Form Aliases None Valid Session Types Utili
275. hough typically defined with DEFINE FORMAT any of the other file definition commands CISDF CISDFCRC16 and CISDFRCRC16 can all be used to define a file to be used with USE FORMAT Examples DEFINE FORMAT TEST FMT lt CR gt lt LF gt 0 200 200 50 1 lt CR gt lt LF gt TEXT 7 0 0 0 lt CR gt lt LF gt PRINT lt CR gt lt LF gt USE FORMAT TEST FMT lt CR gt lt LF gt Hello World lt CR gt lt LF gt This example demonstrates the simplest form of the usage of fields in a define format and use format session Note how the appears in the define format session and that just after the use format command there is the Hello World line which will be substituted where the is located DF TEST FMT lt CR gt lt LF gt 0 200 200 lt CR gt lt LF gt TEXT 0 0 0 Text Before lt CR gt lt LF gt lt CR gt lt LF gt lt CR gt lt LF gt PRINT lt CR gt lt LF gt UF TEST FMT lt CR gt lt LF gt 75 5 lt CR gt lt LF gt 7 lt CR gt lt LF gt The Rest of the Text lt CR gt lt LF gt TEXT 7 0 0 50 This is a complete CPCL command lt CR gt lt LF gt This example demonstrates other forms of fields in the define format and use format sessions In the first one we can see the providing two fields the height and quantity of the label session Next there is a line with two field replacements The first is replacing the font parameter of the TEXT command with a number followed by a text replacement CPCL FOR
276. icant byte first Error Correction The error correction value specifies how much of the barcode can be lost before the barcode is unreadable It is specified by a single letter within Config The default value is M which allows up to 15 to become damaged before the barcode is unreadable If a value besides one of the values in the able above is specified a value of M will be used Specification of the error correction parameter is required Mask The mask is a transposing of the bitmap data which represents the barcode in order to improve scanability In most cases it is desirable to have the printer select the best mask for the particular barcode The mask is represented by a single digit Any of 8 masks can be selected with values from 0 to 7 Additionally the mask can be disabled with the value of 8 A mask value of 9 is interpreted as 8 If the mask value is omitted the printer automatically selects the best mask which is recommended for the best results CPCL FOR LINK OS PRINTERS Page 79 of 329 1073699 001 Almost all QR Code scanners cannot decode barcodes in which the mask has been disabled so use of this mode is not recommended Data Input Mode QR code barcodes can either specify automatic or manual data mode for the Data field See the Data parameter for more information If this value is not specified or is any value besides M for manual A is used Data Following the Config parameter the data to be encoded is s
277. id filename Delay 5 Digit Number Time to delay in 8 of a second increments 0 to 65535 Filename Specifies how long to wait before the file is executed in 1 8 of second increments The file will be passed to the CPCL parser and thus may only contain CPCL commands Delay Specifies how long to wait before the file is executed in 1 8 of second increments Example DF BEEPER BAT lt CR gt lt LF gt Ul BEEP 8 lt CR gt lt LF gt END lt CR gt lt LF gt Ul DELAYED ACTIONS BEEPER BAT 16 lt CR gt lt LF gt This example creates the file BEEPER BAT with a define format session see page 308 and then uses DELAYED ACTIONS to run the file after 2 seconds Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 261 of 329 1073699 001 11 10 DISPLAY DISPLAY TEXT Message lt CR gt lt LF gt DISPLAY T Message lt CR gt lt LF gt DISPLAY LCD DBG INFO lt CR gt lt LF gt Command Name DISPLAY Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD display text Negative Aware No DISPLAY is used to display raw text on the display of the printer The command is parsed but has no effect on printers which do not have displays The command has two options TEXT and its alias T are used to place text on the display and the LCD DBG INFO option is used to obtain information about the display Parameters Quick Reference Paramete
278. ield will not be centered and will print as if left aligned Range also performs a field specification function for FONT GROUP specifying the right edge for text printed either with the TEXT command or CONCAT and used to control sizing See the FONT GROUP documentation on page 107 for more information Examples RI GHT LBL 0 200 200 350 1 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 140 of 329 1073699 001 T 7 0 30 30 This text has no default left justification lt CR gt lt LF gt RIGHT lt CR gt lt LF gt T 7 0 30 80 This text has right justification lt CR gt lt LF gt CENTER lt CR gt lt LF gt T 7 0 30 130 This text has center justification lt CR gt lt LF gt LEFT lt CR gt lt LF gt T 7 0 30 180 This text has left justification lt CR gt lt LF gt RIGHT 576 lt CR gt lt LF gt T 7 0 30 240 This text has right justification lt CR gt lt LF gt T 7 0 30 264 but uses 576 as the range lt CR gt lt LF gt PRINT lt CR gt lt LF gt This text has no default left justification This text has right justification This text has center justification This text has left justification This text has right justification but uses 576 as the range Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 141 of 329 1073699 001 6 27 ROTATE ROTATE Degrees lt CR gt lt LF gt Command Name ROTATE Short Form Aliases R Valid Session Types Label Sessions Only
279. in the output using the NTN command and the delimiter is configured to be two asterisks The BELL option is also specified which will sound the printer s bell on a successful read Because this MCR command has no timeout the command can only be terminated by the MCR CAN command or by sending a new MCR command If the read completes successfully because of the SINGLE option the MCR command will also terminate CPCL FOR LINK OS PRINTERS Page 301 of 329 1073699 001 Assuming the user scanned a card containing Track 3 Data on track 3 the reply from MCR QUERY would be the following Track 3 Data lt CR gt lt LF gt Example 4 Ul MCR 160 T1 T3 ERRORS EPREFIX MCRError lt CR gt lt LF gt This example uses a timeout value of 160 to specify a 20 second timeout T1 and T3 are specified to indicate those two tracks are to be gathered The ERRORS option is used to indicate that we want to see if any errors occur and MULTIPLE is used which means that the printer will continue to attempt to read for the entire timeout duration The EPREFIX command is used to set the prefix that is placed before an error is reported This is set to MCRError If the user does not scan a card within 20 seconds the following would be returned by the printer MCRError T1l Time out lt CR gt lt LF gt MCRError T3 Time out lt CR gt lt LF gt If a card is scanned within the timeout which has an error on track 3 or has no data on track three but h
280. ine The minimum calculation for the cursor position after RX and RY is 0 0 The default line print position at the beginning of each line print block is 0 0 For more information on line print blocks see the SETLP TIMEOUT command on page 180 Example RX RY RXY Ibl U1 LMARGIN 0 lt CR gt lt LF gt Here is an example of using the RX 25 command to put spaces between line print letters lt CR gt lt LF gt H Ul RX 50 lt CR gt lt LF e U1 RX 50 lt CR gt lt LF 1 Ul RX 50 lt CR gt lt LE 1 U1 RX 50 lt CR gt lt L o U1 RX 50 lt CR gt lt L lt CR gt lt LF gt Another example with the RY 25 command lt CR gt lt LF gt H Ul RY 25 lt CR gt lt LF e Ul RY 25 lt CR gt lt LE 1 Ul RY 25 lt CR gt lt LE 1 Ul RY 25 lt CR gt lt LE o Ul RY 25 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 173 of 329 1073699 001 lt CR gt lt LF gt U1 LMARGIN 80 lt CR gt lt LF gt Another example with the RXY 25 10 command with an 80 LMARGIN lt CR gt lt LF gt H Ul RXY 25 10 lt CR gt lt LF gt e Ul RXY 25 10 lt CR gt lt LF gt 1 Ul RXY 25 10 lt CR gt lt LF gt 1 U1 RXY 25 10 lt CR gt lt LF gt o U1 RXY 25 10 lt CR gt lt LF gt lt CR gt lt LF gt Here is an example of using the RX 25 command to put spaces between Line print letters Another example with the RXY 25 10 comma nd with an 80 LMARGIN Command Notes and I nteractions Specifying a negative RX value can override a LMARGI
281. ion CPCL FOR LINK OS PRINTERS Page 109 of 329 1073699 001 6 13 IMAGE IMAGE Mode lt CR gt lt LF gt Command Name IMAGE Short Form Aliases None Valid Session Types Label And Utilities Sessions Linked SGD None Negative Aware No IMAGE is used to change the drawing method of pre scaled text commands and LINE commands By default image data drawn to a label ORed with existing label data that is if there is already a black dot at the location being drawn to the dot will continue to appear black By using the IMAGE command you can change this behavior to XOR new drawing with existing label data which means that if there is an existing black dot at the location being drawn to the dot will be erased and replaced with a white dot IMAGE is persistent between labels with the most recent setting in either a label or utilities session taking precedence It can be changed as many times as needed per label At power on the OR mode is selected by default The IMAGE command only affects pre scaled text including internal fonts and the LINE command If XOR mode is used with the LINE command it overrides the type of line called out by the command that is a LINE or INVERSE LINE in IMAGE XOR mode is always an INVERSE LINE In OR mode lines follow their defined type Parameters Quick Reference Parameter Description Valid Range Mode CR LF Terminated String Specifies the drawing mode OR or XOR Mod
282. ion Valid Range 2 Byte Binary Number The byte width of the data for this dot line 0 to 104 in practice Data Raw String The data that makes up the bitmap to be printed See below ByteWidth Specifies the width in bytes of the data that is to be printed as a two byte binary value The high byte should come first and for all Link OS applications it should be NUL The second byte represents the number bytes that make up the command line The maximum value for ByteWidth should not exceed the value specified by the PAGE WIDTH command see page 127 If it does the data will wrap around on to the next line of the printout Due to the nature of line print buffers printing data in this way is unpredictable at the edge of the buffer and its use is not supported Data The raw binary data that contains the 1 bit image data The size of this field must be exactly ByteWidth in size This data may contain any binary including NUL s It is important to remember that a lt CR gt or lt LF gt is must be placed after the data to terminate the command even though the size of Data is exact Examples ESCG Ibl Be sure to see page 15 for information on how binary data is represented with SEQ Example printing with ESC g Line Print lt CR gt lt LF gt Graphics command lt CR gt lt LF gt lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 185 of 329 1073699 001 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1
283. ion setting 284 CPCL FOR LINK OS PRINTERS Page 31 of 329 1073699 001 CPCL Command Label Utilities Description setvar Utility amp Diagnostic Yes Yes Lower case alias of SETVAR 284 SPEED Media Management Yes Yes Set print speed 234 ST Label Formatting Yes No Alias for SCALE TEXT 144 STF Label Formatting Yes No Alias for SCALE TO FIT 146 T Label Formatting Yes No Alias for TEXT 158 T180 Label Formatting Yes No Alias for TEXT180 158 T270 Label Formatting Yes No Alias for TEXT270 158 T90 Label Formatting Yes No Alias for TEXT90 158 TEMP MOVE Label Formatting Yes Yes Sets x and y print offset for the next label only 156 TEXT Label Formatting Yes No Prints text on a label 158 TEXT180 Label Formatting Yes No Prints text on a label rotated 180 degrees 158 TEXT270 Label Formatting Yes No Prints text on a label rotated 270 degrees 158 TEXT90 Label Formatting Yes No Prints text on a label rotated 90 degrees 158 TIMEOUT Utility amp Diagnostic No Yes Sets power off inactivity timeout 286 TONE Media Management Yes Yes Changes print darkness 235 TURN Media Management Yes Yes Sets label out orientation 236 TYPE File Commands No Yes Returns the contents of a file 325 VB Label Formatting Yes No Alias for VBARCODE 38 VBARCODE Label Formatting Yes No Prints a vertical barcode 38 VBOX Label Form
284. is command in this mode the X and Y parameters are not used instead use the line print X Y and XY commands to position the graphics See page 181 for more information on those commands In this mode the height of the graphics is also limited to the height of the line print buffer as set by SETLP BUFFER command see page 179 By default this value is set to 2400 pixels If based on the current Y position the graphic will not fit in the remaining area in the buffer the buffer will be immediately printed and the Y cursor reset to 0 Any attempt to print more than will fit in that buffer will be parsed but disposed of Examples EXPANDED GRAPHI CS LBL Note that there are no CRs and LFs at the end of each single line of graphic data only at the end of the data The data is laid out this way for ease of understanding 0 200 200 150 1 lt CR gt lt LF gt EXPANDED GRAPHICS 10 27 30 30 EPPP PPE REDE PEPE EEE EE EFFFFFFFFFFFFFFFFFFE F0000000000000000FF F0000000000000000FF F0000000000000000FF F0000000000000000FF FOOOFFOO00000FFO00FF FOOOFFOO00O000FFO00FF FOOOFFOO00000FFO00FF FOOOFFOOO000OFFO00FF F0O000000FF0000000FF F0O000000FF0000000FF F0000000000000000FF F0000000000000000FF F0000000000000000FF FOOOFFFFFFFFFFOOOFF CPCL FOR LINK OS PRINTERS Page 105 of 329 1073699 001 0 bal Me ele banks ne ae aah MRE Slee OE 2 a Re a ei FOOOFFOOOOOOFFOOOF FOOOFFOOOOOOFFOOOF FOOOFFOOOQOOOOFFOOOF FOOOFFOOOOOOFFOOOF FOOOF
285. is not or the data to encode specified by Data cannot be made to fit inside the barcode size requested no barcode is printed The values to be used are based on the value of ECC A value of 0 means to automatically select the best symbol size for the data provided This value is the default Values for Columns and Rows when using ECC 0 to 140 When using ECC 0 to 140 the sizing for rows and columns value should be an odd number between 9 and 49 specifying the number of rows The table below shows the maximum field sizes with a 49x49 barcode Values for Columns and Rows when Using ECC 200 ECCLevel Size Numeric Capacity Alphanumeric Capacity 8 bit Binary Capacity 49 0 49x49 596 413 271 49 50 49x49 457 305 200 49 80 49x49 402 268 176 49 100 49x49 300 200 131 49 140 49x49 144 96 63 For ECC 200 the following values for columns and rows are supported The capacity numbers in the table are best case numbers and it may not always be possible to fit the entire amount of data in the symbol Numeric Capacity Alphanumeric Capacity 8 bit Binary Capacity 0 Automatic Any of the below Any of the below Any of the below 10 10x10 6 3 1 12 12x12 10 6 3 14 14x14 16 10 6 16 16x16 24 16 10 18 18x18 36 25 16 20 20x20 44 31 20 22 22x22 60 43 28 24 24x24 72 52 34 26 26x26 88 64 42 32 32x32 124 91 60 36 36x36 172 127 84 40 40x40 228 169 1
286. it in the specified number of columns usually only when in combination with using rows an error message will print R Rows Optionally specifies the number of rows to use in the barcode The valid range is 0 to 90 where 0 means automatically select the number of rows to use Values outside this range will cause an error message to print If not specified the default value is 0 meaning automatic S ECC Optionally specifies how much error correction data to encode in the barcode The valid range is 0 to 8 Using higher error correction levels reduce the capacity of the barcode The barcode can have no more than 928 code words including data and error correction data The error correction levels reduce the capacity as follows Value Code Words Consumed by ECC Recommended For Data Of Size 0 0 Not recommended 1 2 Not recommended 2 6 1 to 40 code words 3 14 41 to 160 code words 4 30 161 to 320 code words 5 62 321 to 863 code words 6 126 No recommendation 7 254 No recommendation 8 510 No recommendation Values for ECC outside of the range listed above are not supported The default value if not specified is 1 which is minimum B BinaryMode Specifies if the compaction of data in the barcode is automatic or explicitly set to binary By default the printer will automatically optimize the data compaction and switch between data modes to reduce usage of code words This behavior can be overridd
287. it is now 173 RXY Sets the line print cursor relative to where it is now 173 RY Sets the line print cursor relative to where it is now 173 SETLF Sets the height of a line feed operation 175 SETLP Sets the font to be used in line print 176 SETLP BUFFER Set the size of the line print dot buffer 179 SETLP TIMEOUT Set delay before printing line print data 180 X Specifies the X position to start from in line print 181 XY Specifies the X and Y position to start from in line print 181 Y Specifies the Y position to start from in line print 181 Line Print Commands Hex Value Description lt BEL gt 0x07 Sounds the printer s bell 291 lt BS gt 0x08 Backs up the text cursor one character 292 lt LF gt 0x0A Advances the Y coordinate for printing without resetting the X 183 lt FF gt 0x0C Advances paper to the next mark now 237 lt CR gt 0x0D Resets the X and advances the Y coordinate for printing 184 lt ESC gt g 0x1B67 Print line print graphics 185 In addition to the above commands the following label commands have line print variants which are documented in their respective commands in the label section CPCL Command Alias Description Page BARCODE B Prints barcodes in line print mode 38 COMP RESSED GRAPHICS CG Prints binary graphics in line print mode 94 EXPANDED GRPAHICS EG Prints ASCII graphics in line print mode 104 IN CENTIMETERS Specifies that line print m
288. ith CPCL CPCL Sessions This section will provide you with details about the overall format and structure of labels and commands within CPCL CPCL Commands Reference This section provides documentation for each CPCL command Examples for many commands will be provided and notes about how this command works with other commands is also provided The CPCL command reference section is sub divided so that you can easily find information about the areas you are looking for To start off the section there is a master list of all commands and the page their documentation appears on Following that each section contains an introduction discussion outlining the functions followed by commands o CPCL Label Formatting Commands This section contains all commands related to label layout and formatting that is the graphical content of the label This includes barcodes text and graphics o CPCL Line Print Commands This section contains all commands related to line print operations in which the printer can be configured to receive raw ASCII text and print it o CPCL Fonts This section contains all commands related to custom fonts in CPCL including file and data formats and usage o CPCL Media Management This section contains information related to commands for feeding media and also controlling how media is detected and sensed o CPCL Status and Enquiry Commands This section contains information on how to obtain printer status via
289. l Res Height Quantity lt CR gt lt LF gt Field Name Description Valid Range Offset The number of units to offset all fields Units Number 0 to 65535 from the left side of the label horizontally Horizontal The horizontal resolution of this label Number in dpi 100 or 200 Res expressed in dots per inch Vertical Res The vertical resolution of this label Number in dpi 100 or 200 expressed in dots per inch Height The height of the label in units Unit Number 0 to 65535 Quantity The number of copies of the label to Number in quantity 0 to 1024 print After the header the label session can consist any number of utility or printing commands To terminate the session it can use the PRINT or END command When this command is received the label will be printed See page 139 for documentation on these commands Advanced Notes All of the above values have a maximum of five digits For more information see the rules on Numeric Interpretation Rules on page 20 If the Offset is greater than the print width as set by the PRINT WIDTH command the label will wrap around the label memory space with data wrapping to the following pixel line if it moves off the right edge of the label In this case it is also set to the modulo of the value specified Offset is byte aligned If the first character of the Offset is not a digit the entire label will fall through to the next parser as this is the method used to detect the differen
290. lacements and all characters pass through directly as defined in the font file This can be used to replicate encodings which CPCL doesn t support by making a custom font 8 3 3 2 United Kingdom COUNTRY UK CPCL FOR LINK OS PRINTERS Page 198 of 329 1073699 001 Substitute This Character 0x23 With This Character OxA4 Ox7E OxAF CPCL FOR LINK OS PRINTERS Page 199 of 329 1073699 001 German COUNTRY GERMANY Substitute This Character With This Character 0x40 OxA7 0x5B Oxc4 A 0x5C OxD6 0x5D OxDC U 0x7B OxE4 a Ox7C OxF6 3 0x7D OxFC Ox7E OxDF B 8 3 3 3 French COUNTRY FRANCE Substitute This Character With This Character 0x23 OxA4 0x40 OxEO a 0x5B 0xB0 a 0x5C OxE7 0x5D 0xA7 S 0x60 0xB5 u 0x7B OxE9 Ox7C OxF9 0e7D OxE8 0x7E OxA8 4 8 3 3 4 Italian COUNTRY ITALY Substitute This Character With This Character 0x23 OxA4 0x40 OxA7 0x5B 0xBO o 0x5C OxE7 0x5D OxE9 0x60 OxE9 0x7B OxEO a Ox7C OxF2 0e7D OxE8 Ox7E OxEC 8 3 3 5 Swedish COUNTRY SWEDEN Substitute This Character With This Character 0x23 0xA3 a 0x40 Oxc9 E 0x5B 0xC4 A 0x5C OxD6 0x5D 0xC5 0x5E A 0xDC 0x60 OxE9 0x7B OxE4 a Ox7C OxF6 3 0e7D 0xE5 a Ox7
291. le Session Command File Commands Yes No Ends the definition of a stored format 321 CPCL FOR LINK OS PRINTERS Page 29 of 329 1073699 001 CPCL Command Label Utilities Description EXPANDED GRAPHICS Label Formatting Yes Yes Line Print Prints ASCII graphics on a label 104 FEED Media Management No Yes Moves paper forward 214 FG Label Formatting Yes No Alias of FONT GROUP 107 FILE File Commands No Yes Renames or gets checksums of files 322 FONT GROUP Label Formatting Yes Yes Defines a font group 107 FORM Media Management Yes No Advanced paper to the next mark at end of label 215 FORM Utilities Command Media Management No Yes Advances paper to the next mark now 215 GAP SENSE Media Management Yes Yes Enables the gap or notch sensor 216 GET DATE Utility amp Diagnostic Yes Yes Returns current date 267 GET TIME Utility amp Diagnostic Yes Yes Returns current time 268 GETVAR Utility amp Diagnostic Yes Yes Returns SGD configuration setting value 269 getvar Utility amp Diagnostic Yes Yes Lower case alias of GETVAR 269 L Label Formatting Yes No Alias of INVERSE LINE 114 MAGE Label Formatting Yes Yes Sets drawing mode 107 N CENTIMETERS Label Formatting Yes Yes Line Print Specifies that label is represented in centimeters 112 N DOTS Label Formatting Yes Yes Line Print Specifies that label is represented
292. lity amp Diagnostic Yes No Specifies a constant Y coordinate to use in label formatting functions 289 Y Line Print Line Print No Yes Specifies the Y position to start from in line print 181 CPCL FOR LINK OS PRINTERS Page 32 of 329 1073699 001 4 2 Escape Commands List Some commands still supported in CPCL are from an older language called the Comtec Escape Language CEL These commands unlike CPCL Commands are represented in short binary sequences rather than human readable ASCII characters These commands are not processed while CPCL is within a session of any type they only operate when CPCL is not in a session The documentation for these commands is integrated with each of their respective sections based on the command type Comtec Escape Command Type Description Page lt ESC gt Utility amp Diagnostic Set Get the CCL Key 293 lt ESCog Line Print Print line print graphics 185 lt ESC gt h Status Enquiry Send printer status 242 lt ESC gt I Utility amp Diagnostic Send Two key report to host 294 lt ESC gt i Status Enquiry Send secondary printer status 243 lt ESC gt JRU Utility amp Diagnostic Retrieve current user label count 294 lt ESC gt N Utility amp Diagnostic Acknowledge Reset 295 lt ESC gt p Utility amp Diagnostic Power printer off 295 lt ESC gt V Utility amp Diagnostic Print Two key report 296 lt ESC gt Vv Status Enquiry Send firmware
293. lt CR gt lt LF gt tiline Example With SCALE TO FIT lt CR gt lt LF gt dots between lines lt CR gt lt LF gt ch line is terminated with a CR and LF lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 125 of 329 1073699 001 Multiline Example With TEXT command Pre Scaled Font 24 dots between lines Each line is terminated with a CR and LF Left Aligned Multiline Example With SCALE TEXT True Type Font 30 dots between lines Each line is terminated with a CR and LF Center Aligned Multiline Example With SCALE TO FIT True Type Font 40 dots between lines Fach line is terminated with a CR and LF Not Aligned Command Notes and I nteractions The justification commands LEFT RIGHT and CENTER work correctly with MULTILINE as long as the underlying TextCommand does all do except SCALE TO FIT when using True Type Fonts Each Data line is individually justified An alternate syntax of this command has the a lt CR gt lt LF gt after the LineHeight parameter and then has the text command on a new line without the final Data parameter of the text command This syntax is valid and supported in addition to the one listed here If using MULTILINE with a FONT GROUP the font group is not reselected for each line instead all lines are evaluated and a single font is selected based on the widest line in the MULTI LINE set CPCL FOR LINK OS PRINTERS Page 126 of 329 1073699 001 6 20 PAGE WIDTH PAGE WIDTH Width lt CR
294. lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 lt ESC gt g lt 0 gt lt 1 1 1 1 i Ul SETLF 1 lt CR gt lt LF gt Ul SETLP 7 0 0Q lt CR gt lt LF gt Ul LMARGIN 40 lt CR gt 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F 0 gt lt SEQ F U1 RY 100 lt CR gt lt LF gt U1 SETLF 10 lt CR gt lt L Ul SETLP 7 0 24 lt C lt LF gt PEPE PER R EPP EPP PE EE FFFFFFFFFFFFFFFFFE F0000000000000000F F0000000000000000F 0000000000000000 F0000000000000000F FOOOFF
295. lt LF gt Service Class 001 lt CR gt lt LF gt ZIP Code 55555 5555 lt CR gt lt LF gt Low Priority Message lt CR gt lt LF gt Maxicode Test Barcode lt CR gt lt LF gt ENDML lt CR gt lt LF gt LGR ARCODE MAXICODE 50 340 lt CR gt lt LF gt PS5 1 lt CR gt lt LF gt C 840 lt CR gt lt LF gt C 012 lt CR gt lt LF gt OST 030415555 lt CR gt lt LF gt HIPID 888888 lt CR gt lt LF gt ete wth A UPS Maxicode Barcode 1299999999 lt CR gt lt LF gt eee XTRA COMPRESSED DATA HERE lt CR gt lt LF gt sears i Country Code 840 DMAXICODE lt CR gt lt LF gt re Pwd Service Class 12 oe 3 Postal Code 03041 5555 AMHHNVHNACwW L 24 T 7 0 340 340 lt CR gt lt LF gt PS Maxicode Barcode lt CR gt lt LF gt ountry Code 840 lt CR gt lt LF gt Poa REO oe Shipper 888888 ervice Class 012 lt CR gt lt LF gt Ain Ka 2 ee ha Tracking 1299999999 ostal Code 03041 5555 lt CR gt lt LF gt eee ere Extra ae ges COMPRESSED DATA HERE hipper 888888 lt CR gt lt LF gt eee racking 1299999999 lt CR gt lt LF gt ot KVAS Ta xtra lt CR gt lt LF gt OMPRESSED DATA HERE lt CR gt lt LF gt DML lt CR gt lt LF gt RINT lt CR gt lt LF gt VRHAMHHVTHACE CPCL FOR LINK OS PRINTERS Page 71 of 329 1073699 001 Use in Utilities Sessions for Line Print In versions of Link OS greater than 19 6 The BARCODE command and all its variants can be used in a utilities session to print a barcode in line print mode T
296. meric BARCODE 1 OF 2 QR Code Mode 2 Width 6 Auto Mask Structured Append 2 of 2 Parity x75 117 decimal High Error Recovery Manual Encoding Data Alphanumeric BARCODE 2 OF 2 Page 83 of 329 1073699 001 Use in Utilities Sessions for Line Print In versions of Link OS greater than 19 6 The BARCODE command and all its variants can be used in a utilities session to print a barcode in line print mode The printer does not have to be in line print mode for this command to be used in utilities mode The X and Y parameters of the barcode must be specified but have no effect instead the X Y RX RY XY or RXY commands must be used to specify the location of the barcode It may be necessary to use the SET LF command to be able to see the entire height of the barcode See the Introduction to Line Print on page 25 for more information Note that only the BARCODE command operates in line print mode VBARCODE does not Utilities Example U1 SETLF 160 lt CR gt lt LF gt l Ul B QR O O lt CR gt lt LF gt L Basic QR Code lt CR gt lt LF gt ENDQR lt CR gt lt LF gt Command Notes and I nteractions The BARCODE TEXT command cannot be used to print data representations under barcode created with this command no text will print The justify commands LEFT RIGHT and CENTER do not have any effect on barcodes created with this command CPCL FOR LINK OS PRINTERS Page 84 of 329 1073699 001 6 3 BARCODE TEXT
297. minimum value for segments is 4 otherwise the minimum value is 1 This field is represented as a unit number so using it in systems besides dots is not recommended The use of the value of 0 for this parameter is not supported CPCL FOR LINK OS PRINTERS Page 59 of 329 1073699 001 Type The type of the barcode to print This is an ASCII number as represented by the data below Type Symbology Height 1D Data Specification 1 GS1 Databar Fixed at 33 13 Numeric Characters Checksum will be calculated automatically 2 GS1 Databar Truncated Fixed at 13 13 Numeric Characters Checksum will be calculated automatically 3 GS1 Databar Stacked See Below 13 Numeric Characters Checksum will be calculated automatically 4 GS1 Databar Stacked Omnidirectional Fixed at 33 13 Numeric Characters Checksum will be calculated automatically 5 GS1 Databar Limited Fixed at 33 13 Numeric Characters Checksum will be calculated automatically 6 GS1 Databar Expanded Fixed at 33 Up to 74 numeric or 41 alphanumeric characters 7 UPC A Fixed at 74 12 Numeric Characters Checksum will be calculated automatically 9 EAN 13 Fixed at 74 12 Numeric Characters Checksum will be calculated automatically 10 EAN 8 Fixed at 60 7 Numeric Characters Checksum will be calculated automatically 11 GS1 128 with CC A or CC B MicroPDF Use LHeight Up to 48 ASCII characters less than 127 12 GS1 128 with CC C PDF4
298. n exceeds the value specified by the PAGE WIDTH command the print line will be advanced as if an LF had been transmitted and the character will be printed at the start of the new line This means that even if very large RX values are used the farthest the character can ever go is to the 0 position of the very next line The minimum calculation for the cursor position after RX and RY is 0 0 The default line print position at the beginning of each line print block is 0 0 For more information on line print blocks see the SETLP TIMEOUT command on page 180 Example RX RY RXY Ibl U1 LMARGIN 0 lt CR gt lt LF gt Here is an example of using the RX 25 command to put spaces between line print letters lt CR gt lt LF gt H Ul RX 50 lt CR gt lt LF e U1 RX 50 lt CR gt lt LF 1 Ul RX 50 lt CR gt lt LE 1 U1 RX 50 lt CR gt lt L o U1 RX 50 lt CR gt lt L lt CR gt lt LF gt Another example with the RY 25 command lt CR gt lt LF gt H Ul RY 25 lt CR gt lt LF e Ul RY 25 lt CR gt lt LE 1 Ul RY 25 lt CR gt lt LE 1 Ul RY 25 lt CR gt lt LE o Ul RY 25 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 181 of 329 1073699 001 lt CR gt lt LF gt U1 LMARGIN 80 lt CR gt lt LF gt Another example with the RXY 25 10 command with an 80 LMARGIN lt CR gt lt LF gt H Ul RXY 25 10 lt CR gt lt LF gt e U1 RXY 25 10 lt CR gt lt LF gt 1 Ul RXY 25 10 lt CR gt lt LF gt 1 Ul RXY 25 10 lt CR gt lt
299. n individual text command with the vertical position increasing by LineHeight for each line The following text commands are supported for use with MULTILINE e TEXT TEXT90 TEXT180 TEXT270 VTEXT T T90 T180 T270 VT e SCALE TO FIT VSCALE TO FIT STF VSTF SCALE TEXT VSCALE TEXT ST VST Parameters Quick Reference Parameter Type Description Valid Range LineHeight 5 Digit Unit Number Spacing between each line in units 0 to 65535 TextCommand Command A command specifying formatting for the text See Below Data CR LF Terminated String A text line to print using the formatting See Below LineHeight Specifies how much each line of Data is separated by in units The first line is placed at the X and Y of the 7extCommand and after that they are placed at the same X and the Y is incremented by LineHeight for each Data line specified When using MULTILINE with SCALE TO FIT the value of LineHe ght should be similar to the WindowHeight parameter of that command Each line of Data is given its own WindowHeight TextCommand A full text command This should be one of the commands specified in the list above with all parameters except for final parameter of the command specifying the text to print which should be replaced with a lt CR gt lt LF gt Data A line of text that is to be printed As many of these lines as desired may be specified Each one must be lt CR gt lt LF gt terminated The size of e
300. n of ON OUT OF PAPER representing a file on the printer to be executed when the out of paper condition occurs This file name must be located on the E drive of the printer and must contain CPCL commands The RUN function of ON OUT OF PAPER does not function when the printer encounters an unexpected mark it only operates when the printer runs out of paper Unused An unused numeric parameter that must be specified when using the RUN option of ON OUT OF PAPER Examples Ul ON OUT OF PAPER PURGE 1 lt CR gt lt LF gt Ul ON OUT OF PAPER WAIT 2 lt CR gt lt LF gt Ul ON OUT OF PAPER RUN 2 lt CR gt lt LF gt Command Notes and Interactions CPCL FOR LINK OS PRINTERS Page 222 of 329 1073699 001 None CPCL FOR LINK OS PRINTERS Page 223 of 329 1073699 001 9 14 PACE PACE lt CR gt lt LEF gt Command Name PACE Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None PACE is used with label sessions with a print quantity greater than one to pause between each label If such a label session is initiated the printer will print one label then stop and wait for the feed key to be pressed before printing the next label This behavior continues until all labels in the batch are printed After the final label is printed normal operation is resumed No other printing operations will occur while the printer is printing including line print or prints from other lan
301. nated with CR LF lt RAW gt lt CR gt lt LF gt lt ENDRAW gt lt CR gt lt LF gt Line 2 Data Terminated with CR LF lt RAW gt lt CR gt lt LF gt lt ENDRAW gt lt CR gt lt LF gt Line terminated with the underscore character _ lt CR gt lt LF gt lt CR gt lt LF gt ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 56 of 329 1073699 001 Data Matrix Example ECC 200 Height 6 Default Data Basic Data Matrix Lk Data Matrix Structured Append Example Two barcodes 1 Left 2 Right ECC 200 Height 7 Data Structured Append Data Matrix Example with Escapes ECC 200 Height 3 Forced size 64x64 Data Line 1 Data Terminated with CR LF lt CR gt lt LF gt Line 2 Data Terminated with CR LF lt CR gt lt LF gt Line terminated with the underscore character _ CPCL FOR LINK OS PRINTERS Page 57 of 329 1073699 001 Use in Utilities Sessions for Line Print In versions of Link OS greater than 19 6 The BARCODE command and all its variants can be used in a utilities session to print a barcode in line print mode The printer does not have to be in line print mode for this command to be used in utilities mode The X and Y parameters of the barcode must be specified but have no effect instead the X Y RX RY XY or RXY commands must be used to specify the location of the barcode For DataMatrix barcodes the X parameter of the X XY RX and RXY commands is not used instead the X v
302. nd GETVAR commands which must be lt CR gt lt LF gt or space terminated See those commands for more information 3 3 2 3 Raw String Parameters CPCL FOR LINK OS PRINTERS Page 21 of 329 1073699 001 Raw string parameters are typically used when the parameter consists entirely of binary data which may include nulls or other control characters Raw string parameters are typically used when the size of the parameter is specified directly as part of the command such as with the COMPRESSED GRAPHICS command or are part of a structured file which contains its own size information such as the PCX command Raw string parameters are typically not limited in size like other types of string parameters but their output is limited to available memory Each command which uses raw string parameters will explain how their limits are used 3 4 Utilities Sessions A utilities session contains commands that specify configuration information but does not result in any printed output This session is started by a character followed by either the upper case word UTILTIES or the upper case letter U followed by a CR and LF UTILTIES lt CR gt lt LF gt U lt CR gt lt LF gt As demonstrated here there are a number of commands in CPCL which have short forms which are functionally identical to their long forms When commands have a short form it will be documented at the start of each command Utilities sessions are terminated by the PRINT or END
303. ne is to be placed EndX EndY The X and Y coordinates in units specifying where the line ends The EndX and EndY coordinates can be less than X and Y the line will be drawn appropriately Thickness The thickness in units of the lines drawn when creating the line When using dots a value of 0 yields a thickness of 1 dot 1 yields a thickness of 2 dots and so on In this way you can never create an invisible line regardless of unit selection If the line is straight the thickness is created by drawing away from the straight side of the line either downwards or right depending if the top or left side is straight If the line is diagonal the thickness of the line is created by drawing to the right of the base line by the thickness specified As such the top and bottom of the line are always parallel to the top and bottom of the label CPCL FOR LINK OS PRINTERS Page 114 of 329 1073699 001 As INVERSE LINE draws each element of the line is drawn in inverted mode Due to the way lines are drawn a diagonal solid INVERSE LINE may have pixels that are double inverted within the line Examples I NVERSE LI NE LBL 0 200 200 525 1 lt CR gt lt LF gt BOX 15 15 245 215 115 lt CR gt lt LF gt INVERSE LINE 30 30 200 200 25 lt CR gt lt LF gt INVERSE LINE 30 200 200 30 25 lt CR gt lt LF gt ML 24 T 7 0 250 30 lt CR gt lt LF gt Two Inverse Line Commands Over a Box lt CR gt lt LF gt 30 30 to 200 200 at 25 Width lt CR
304. ngle SGD Ul GETVAR comm baud lt CR gt lt LF gt Example Response 19200 Example Branch Ul GETVAR comm lt CR gt lt LF gt Example Response comm lt CR gt lt LF gt comm baud 115200 Choices 4800 9600 14400 19200 28800 38400 57600 115200 lt CR gt lt LF gt comm data_bits 8 Choices 7 8 lt CR gt lt LF gt comm parity null Choices null odd even n 0 e lt CR gt lt LF gt comm stop_bits 1 Choices 1 2 lt CR gt lt LF gt comm dsr off lt CR gt lt LF gt comm handshake rts cts Choices xon xoff rts cts lt CR gt lt LF gt comm halt no Choices yes no lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 271 of 329 1073699 001 11 16LT Line Terminator LT Mode lt CR gt lt LF gt Command Name LT Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No LT is used to change the way CPCL lines are terminated At power on all lines in CPCL must be terminated with lt CR gt lt LF gt All examples and text within this document refer to this default behavior It is possible however to change the way lines are terminated using this command Regardless of what mode is selected lines can always be LF terminated and any CR that exists before the LF will be consumed Lines can also always be NUL terminated When an invalid command is received by CPCL t
305. nly Linked SGD None Negative Aware Yes RX RY and RXY are used in line print mode to specify that an element should be positioned relative to the line print text element printed The command can be used at any time to adjust the line print cursor position even in the middle of a string of line print characters This command only impacts line print text and the lt ESC gt g command It has no effect on labels or utilities based line print commands Parameters Quick Reference Parameter Type Description Valid Range XValue 5 Digit Number Specifies the value to use for the X position 32767 to 32767 YValue 5 Digit Number Specifies the value to use for the Y position 32767 to 32767 XValue YValue Specifies the amount to adjust the current line print cursor position by The value can either be positive or negative The cursor cannot be moved to a negative position in either direction however it can be used to move the cursor back from the edge specified by the LMARGIN command but not back beyond the area specified by the PW command Before printing a character if the line print cursor s X position exceeds the value specified by the PAGE WIDTH command the print line will be advanced as if an LF had been transmitted and the character will be printed at the start of the new line This means that even if very large RX values are used the farthest the character can ever go is to the 0 position of the very next l
306. nt selected by the SETLP font is a TrueType font an additional amount specified by the font will be added If at any point in the text a CR character is received the X cursor is reset to 0 and the Y cursor is advanced by the amount specified in SETLP If an LF is received the Y cursor is advanced by the amount specified in SETLF Whenever the Y cursor is incremented the printer checks to ensure the next line will fit vertically in the allocated buffer The height check is calculated using the heights from SETLF and SETLP added together If the amount of space left in the buffer vertically is less than this amount the used portion of the buffer is printed and a new buffer is created and the coordinates are reset to 0 0 In addition if the printer receives no additional data within a timeout the printer will print the used portion of the buffer The data will be terminated as if a CR and LF had been appended to the data This timeout can be set or disabled with the SETLP TIMEOUT command see page 180 By default this timeout is 500ms CPCL FOR LINK OS PRINTERS Page 164 of 329 1073699 001 At any time the cursor position can be moved within the current buffer using the X Y XY commands see page 181 or can be moved relative to the current cursor position using RX RY and RXY see page 173 For compatibility with older applications there is an escape command provided which prints raw graphics in line print lt ESC gt g See pa
307. nter Bell lt BS gt Backspace lt ESC gt Get or Set CCL Key lt ESC gt I Send Two Key Report to Host lt ESC gt JRU Send User Label Count lt ESC gt N Acknowledge Reset lt ESC gt p Shut Down Printer lt ESC gt V Print Two Key Report 12 MAGNETIC CARD READING COMMANDS 12 1 MCR CPCL FOR LINK OS PRINTERS Page 8 of 329 255 256 257 258 259 260 261 262 264 265 267 268 269 272 274 275 276 277 278 281 282 283 284 286 287 288 289 291 292 293 294 294 295 295 296 298 299 1073699 001 12 2 MCR CAN 303 12 3 MCR QUERY 304 13 FILE COMMANDS 306 13 1 CPCL File System Introduction 307 13 1 1 The E Drive 307 13 1 2 The R Drive 307 13 1 3 The Z Drive 307 13 1 4 Filenames 307 13 1 5 File Functions Provided By CPCL 308 13 1 6 Special File Types 308 13 2 Define and Use Format Sessions 308 13 2 1 DEFINE FORMAT and USE FORMAT 308 13 2 2 Defining Fields in DEFINE FORMAT Sessions for use with USE FORMAT 309 13 2 3 USE FORMAT Reentrance 311 13 3 CISDF CISDFCRC16 and CISDFRCRC16 File Sessions 311 13 3 1 Calculating the CRC16 Checksum 314 13 3 2 Calculating the Simple Checksum 315 13 4 Pre defined Special Purpose Files 316 13 4 1 CONFIG SYS AUTOEXEC BAT RUN BAT 316 13 4 2 SEL BAT FTN BAT FF BAT 316 13 4 3 FF3 BAT 317 13 5 DELETE 318 13 6 DIR 320 13 7 END File Session 321 13 8 FILE 322 13 9 PRINT File Session 324 13 10 TYPE 325 14 REMOVED AND UNSUPPORTED COMMANDS 328 CPCL FOR LINK OS
308. nting is purged Retries A numeric value that specifies the number of times the print is to be reattempted when the printer encounters an unexpected bar or gap while printing in LABEL mode or if the printer encounters an error while printing the label such as head open or out of paper By default this value is set to 1 meaning each label is given one attempt to print Setting it to higher values will allow the label to be attempted more than one time The valid range for Retries is 1 to 65535 A value of zero is interpreted as 1 For example if Retries is set to 3 and the head is opened during the first print attempt and then closed the printer will attempt to print the label again from the start If from there the printer encounters a mark half way through the label the print will be restarted a third and final time If an error occurs or a mark is sensed during the third attempt the label will not be reprinted Having the value of Retries be one also enables the standard CPCL behavior of printing labels in LABEL mode up to the bar and then stopping State A string parameter used with the PRUGE LP option of ON OUT OF PAPER to specify how line print is handled when an error occurs The valid options are ON and OFF and the default is OFF When set to ON if the printer encounters a bar or gap while printing line print any additional line print data will be purged Filename A string parameter used only with the RUN optio
309. nts multi byte CP850 USA with substitutions single byte Box and graphics chars not supported CP874 Font defines encoding for CPF TTF maps to UTF points single byte FRANCE USA with 7 bit substitutions single byte GERMANY USA with 7 bit substitutions single byte ITALY USA with 7 bit substitutions single byte JAPAN GBK Encoding TTF maps to UTF points multi byte JAPAN S GBK Encoding TTF maps to UTF points multi byte KOREA GBK Encoding TTF maps to UTF points multi byte LATIN9 USA with substitutions single byte NORWAY USA with 7 bit substitutions single byte SPAIN USA with 7 bit substitutions single byte SWEDEN USA with 7 bit substitutions single byte THAI Thai multi byte encoding Superseded by CP874 UK USA with 7 bit substitutions single byte USA Font defines encoding single byte VIETNAM Font defines ECPF encoding TTF maps to UTF points multi byte Custom single byte encodings can also be defined See above for more information Examples Ul COUNTRY KOREA lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 206 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 207 of 329 1073699 001 9 Media Management Commands Commands covered in this section are as follows CPCL Command Alias L U Description AUTOCAL No Yes Calibrates sensor thresholds
310. nual is documented regarding its behavior with negative numbers Following the designation of sign there can be any number of leading zeroes These are bypassed until the first non zero digit is found Next a number of digits determined by the particular command in use is collected Each command documented in this manual reports on the number of digits it expects CPCL numbers may have up to four digits after the decimal point If you need to specify a number with a fractional portion use the period character to designate that there is a fractional portion If the entire value of the parameter is fractional that is there is no decimal component a leading zero is optional 0 56 and 56 are both valid forms CPCL functions accept up to four decimal places of accuracy for fractional portions This is true for all CPCL functions which accept numbers A number or unit number parameter is terminated by a space character This signals to CPCL that the number has ended If a number is the last parameter of a command or session line a lt CR gt lt LF gt can terminate the line In this case a space is not necessary and should not be added If the number of digits is exceeded not including leading zeroes or symbols the number is considered complete and processing of the next parameter starts with the next character If a character within a number is not a digit this also completes the number and processing of the next parameter begins wi
311. o CAPTURE provides a tool that can be used to capture data that the printer receives to a file on the printer and can also optionally be used to put the printer into a dump mode which prints the characters received rather than interpreting them The CAPTURE command directly sets the input capture SGD until reboot Parameters Quick Reference Parameter Description Valid Range Mode CR LF Terminated String The capture mode to enable PRINT RUN OFF Mode Specifies the behavior of the CAPTURE command The valid options are PRINT RUN and OFF When set to RUN the printer will log any data received to files that will be stored on the printer s file system The files are created in sequential order and named INXXX DMP where the XXX is replaced with an incrementing number Periodically the buffer is flushed and a new DMP file will be created While in RUN mode commands received by the printer are both logged and processed The RUN mode of CAPTURE can be turned off by sending CAPTURE OFF which disables capture and completes the current DMP file When set to PRINT the printer will log received data as with RUN but will also print any characters received directly including a hex representation of the character In this mode no commands received are processed by the printer they are only printed To exit CAPTURE PRINT it is necessary to either manually reboot the printer or send the ZPL command E Note that it is possible to
312. o for this example let s say its 3 or 24 dots wide total Note that the compressed data doesn t fill the entire 3 byte width This is acceptable 0206 W CPCL FOR LINK OS PRINTERS Page 196 of 329 1073699 001 Example Compressed Glyph This example shows the binary data of an example compressed glyph in this case the character 1 from the built in font 2 size 1 The table below shows the meaning of each byte of data in the glyph Address 00 01 02 03 04 05 06 07 08 09 Oa Ob Oc Od Oe OF 00 01 02 03 15 fd ff 81 03 O00 08 81 08 05 03 02 05 10 03 04 01 82 06 05 03 03 03 81 02 00 Oe 01 00 Od Offset Data Section Description 00 00 Header Glyph type small compressed glyph 01 02 Header Byte Width 2 bytes 16 dots of data will be defined per line 02 05 Header Vertical Skip 3 dots will be skipped before the glyph starts 03 OF Header Dot Height This glyph is 15 dots high 04 FD Header Left Pen Adjust Move three dots to the right before drawing 05 FF Header Right Pen Adjust Move one dot to the left after drawing 06 07 8103 Data This row has one pair and repeats 3 times 08 09 0008 Data 0 skip 8 black 7S a 0A 0B 8108 Data This row has one pair and repeats 8 times 0C 0D 0503 Data 5 skip 3 black OE 02 Data This row has two pairs OF 12 05030401 Data 5 skip 3 black 4 skip 1 black 1 D A 13 14 8206 Data This row has two pairs and repe
313. o LEFT when the session ends Parameters Quick Reference Parameter Description Valid Range Range 5 Digit Unit Number The width of the area to center on from the left side 0 to 65535 Range The range parameter is an optional parameter that changes the width of the media that is used to center over Specifying a value of 0 means to center subsequent fields over the entire active width as specified by the PAGE WIDTH command If not specified a value of 0 is used If for some reason the value for Range is invalid justification is reset to LEFT The range can be larger than the physical page width but this may cause text to wrap around the edge of the label and appear on the other side If the field being centered is wider than the range the field will not be centered and will print as if left aligned Range also performs a field specification function for FONT GROUP specifying the right edge for text printed either with the TEXT command or CONCAT and used to control sizing See the FONT GROUP documentation on page for more information Examples CENTER LBL 0 200 200 350 1 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 92 of 329 1073699 001 T 7 0 30 30 This text has no default left justification lt CR gt lt LF gt RIGHT lt CR gt lt LF gt T 7 0 30 80 This text has right justification lt CR gt lt LF gt CENTER lt CR gt lt LF gt T 7 0 30 130 This text has center justification lt CR gt lt LF gt L
314. oes both Each can be individually activated and deactivated When the label session ends the X Y and XY commands are deactivated Parameters Quick Reference Parameter Type Description Valid Range 5 Digit Number Specifies the value to use for the X position 1 to 65535 YValue 5 Digit Number Specifies the value to use for the Y position 1 to 65535 XValue YValue Specifies the X or Y values to use and permits the omission of the specified parameter The valid range for both parameters is 1 to 65535 The value of 1 is a special value which signals that the value is no longer to be omitted and must now be specified Example O 200 200 203 1 lt CR gt lt LF gt XY 50 50 lt CR gt lt LF gt TEXT 7 2 Test Text lt CR gt lt LF gt Y 1 lt CR gt lt LF gt TEXT 7 2 100 Test Text Line Two lt CR gt lt LF gt PRINT lt CR gt lt LF gt Note how the first TEXT command in this example is missing the X and Y paramaters The XY commands specifies that 50 and 50 should be used in their place Next the Y command is used with 1 as its parameter which disables the replacement of the Y parameter Note how the next text command now has three parameters The added parameter is specifying the Y value which is no longer omitted Command Notes and Interactions CPCL FOR LINK OS PRINTERS Page 289 of 329 1073699 001 None CPCL FOR LINK OS PRINTERS Page 290 of 329 1073699 001 11 30 lt BEL gt Sound Printer Bell
315. of 329 1073699 001 11 19 ON LOW BATTERY ON LOW BATTERY ALERT AlertText ALARM AlarmLength NONE lt CR gt lt LF gt OLB ALERT AlertText ALARM AlarmLength NONE lt CR gt lt LF gt Command Name ON LOW BATTERY Short Form Aliases OLB Valid Session Types Label and Utilities Sessions Linked SGDs power low_battery_audio_alert power low_battery_text_alert Negative Aware No ON LOW BATTERY specifies an optional alarm and message which is presented to the user when the battery of the printer is low The three options in the command ALERT ALARM and NONE are all optional any number or none of them may be present though if none are the command is parsed but has no effect By default both the audio and text alert are disabled which is equivalent to the NONE option The notifications only take effect on the point of transition to battery low If the battery is already low when the commands are sent they will not have any effect until the battery transitions from normal to low again Parameters Quick Reference Parameter Type Description Valid Range AlertText Quoted String Parameter Specifies the text to be displayed when the battery 0 to 100 characters is low on the display AlarmLength 5 Digit Numeric Specifies length of audible alarm in 1 8 of a second 0 to 65535 Parameter increments Alarm modes The command has two modes ALERT ALARM and a third one to disable both call
316. oices 4800 9600 14400 19200 28800 38400 57600 115200 lt CR gt lt LF gt allv comm baud 19200 lt CR gt lt LF gt Each individual setting is lt CR gt lt LF gt terminated in its reply Not all settings have options for choices Unlike a normal SGD the response of these special SGDs is not bound in double quotes Instead an empty pair of double quotes will appear at the end of the transmission to indicate that it is complete Branch Retrieval In addition to single settings and the above special values in Link OS printers you can also retrieve entire branches of SGD settings by specifying the root name of the branch All of the settings under the branch will be returned in the same format as the allcv option noted above including the branch name except that it is not terminated by a pair of double quotation marks Ul GETVAR comm lt CR gt lt LF gt This example retrieves all settings on the comm branch which are related to serial communication Some branches have sub branches which can also be retrieved using this method When you request a SGD branch that has sub branches all of the sub branches will be included Ul GETVAR device syslog lt CR gt lt LF gt This example retrieves all settings in the device syslog sub branch which are related to the syslog sub system If you retrieve the device branch this sub branch is also included CPCL FOR LINK OS PRINTERS Page 270 of 329 1073699 001 Example Si
317. on In older printers bit 7 of this command was used to determine if a ribbon was installed in the printer for thermal transfer usage No current Link OS printers which support CPCL have ribbons so this bit will always be set to 1 Example lt ESC gt i CPCL FOR LINK OS PRINTERS Page 243 of 329 1073699 001 Example Response lt 128 gt This response indicates that no paper jam was detected or the command is not enabled that the last label printed is not present Command Notes and Interactions None 10 5 lt ESC gt v Get Version Information lt ESC gt v Command Name lt ESC gt v Valid Session Types Not valid in sessions lt ESC gt v is an escape command which is used to obtain a string with printer information This command is an escape command and is not valid within sessions It can only be used when the printer is not currently in a session The response of the command is a null terminated string of variable length which contains the product name firmware version compile date CRC and the device s serial number Example lt ESC gt v Example Response Zebra Technologies QLn320 v68 19 6Z 9 18 2013 C27C XXQLJ112800137 lt NUL gt This response indicates that this printer is a QLn320 running V68 19 6Z firmware Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 244 of 329 1073699 001 11 Utility and Diagnostic Commands Commands covered in this section are as follows
318. on of the contents of the two key report The two key report returned via this command has the same fields and information as the printed report although it omits any barcodes that may be printed on the report Command Notes and Interactions None 11 34 lt ESC gt JRU Send User Label Count lt ESC gt JRU Command Name lt ESC gt J RU Valid Session Types Not valid in sessions Linked SGD odometer user label count lt ESC gt J RU is used to retrieve the user label count which is incremented any time a label is printed regardless of control language the label originated from The value is returned as a 16 bit number 2 bytes which represent the same value as contained in the SGD odometer user_label_ count Example lt ESC gt JRU Example Return Data lt 3 gt lt 249 gt To convert this data to the count multiply the first byte by 256 and then add the second in this case resulting in 1017 which is the current value of the user label count Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 294 of 329 1073699 001 11 35 lt ESC gt N Acknowledge Reset lt ESCON Command Name lt ESC gt N Valid Session Types Not valid in sessions lt ESC gt N is used to acknowledge the fact that the printer has been reset The reset status is part of the lt ESC gt h command representing bit 4 At power on that bit initially is a value of 1 After issuing the lt ES
319. one label session in which it was used and is reset to the value used before the label session was started once the label is printed The effect of JOURNAL or LABEL in a utilities session can be made permanent using the zpl save SGD When in LABEL mode if the printer encounters a mark or gap while printing the printer will truncate the label at the point the mark is found taking into account any TOF or skip adjustments After each label is printed the media will end in a synchronized position When in JOURNAL mode if the printer encounters a mark or gap while printing the printer will ignore it and continue to print through the mark to the label length defined in the label session When in J OURNAL mode the only way to synchronize to a mark or gap is to use the FORM command The default setting value is LABEL Examples U1 JOURNAL lt CR gt lt LF gt The following example sets the mode to JOURNAL as well as save it to be the power on value Ul JOURNAL lt CR gt lt LF gt Ul SETVAR zpl save lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 217 of 329 1073699 001 9 10 LABEL LABEL lt CR gt lt LF gt Command Name LABEL Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD media type to label The LABEL command and the associated JOURNAL command determine which of the two modes of operation are used when a mark o
320. ons CPCL FOR LINK OS PRINTERS Page 229 of 329 1073699 001 None 9 19 REVERSE REVERSE Amount lt CR gt lt LF gt Command Name REVERSE Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The REVERSE command when used in a label session is used to perform an additional media movement before a label is printed Its function is identical to that of PREFEED when used with a negative value although reverse only supports positive values Note that there is no mechanism that prevents you from reversing an excessively large value causing the printer to lose control of the media The REVERSE operation will ignore all gap or marks on the paper but will terminate if the printer detects an out of media or other error condition Once set the setting is persistent until power cycle The label session version of REVERSE also affects line print but there is no way to change the setting except in a label session due to the different way REVERSE operates in utilities sessions Parameters Quick Reference Parameter Description Valid Range Amount 5 Digit Unit Number How much to feed in units 0 to 4000 dots Amount Specifies the amount to reverse in units at the start of the print After the conversion from the current unit to dots the resulting amount must be between 0 and 4000 If it is not no feed operation occurs At power on a value
321. or CC B selected automatically based on the amount of data specified For Type 12 it is a PDF417 barcode also known as type CC C CPCL FOR LINK OS PRINTERS Page 60 of 329 1073699 001 The 2D Data is specified after the 1D data by placing a pipe character after the 1D data and then following it with the 2D Data The pipe character is ASCII 124 The data may be numeric ASCII or binary however it is not possible to encode the binary characters lt NUL gt lt CR gt or lt LF gt in the stream attempting to do so will cause an invalid barcode to print with no data The types 1 though 11 the size of the 2D data must not exceed 167 code words if a CC A barcodes is required If the data amount exceeds this a CC B barcode is automatically created which may contain up to 336 code words For type 12 barcodes using CC C the size of the 2D data must not exceed 863 encoded code words If the limit is exceeded an error occurs and a message is printed indicating this It can be difficult to determine exactly how much data encoded code words take but you can use the chart below as a general guideline Encoding Type Code Words Used Text Upper case 1 per 2 characters Binary All characters except lt NUL gt lt CR gt lt LF gt 5 per 6 bytes Numbers Up to 15 per 44 digits Do not exceed the codeword maximum for type 12 barcodes or the barcode will be unreadable If the data exceeds the size specifications and error mes
322. or Start is greater than the height of the label as defined in the label session no data will be dumped If the value is not specified zero is used Return Data The return data is either in hexadecimal or binary format depending on the option selected The data is provided in lines with each line being the width of the current label as defined by the PAGE WIDTH command Each line is terminated with a CR LF Example 0 200 200 25 1 lt CR gt lt LF gt PW 60 lt CR gt lt LF gt TEXT 7 0 0 0 Text lt CR gt lt LF gt DUMP IMAGE BITS 25 0 lt CR gt lt LF gt PRINT lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 265 of 329 1073699 001 Example Return Data 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 0000000000000000000000000000000000000000000000000000000000000000 lt CR gt lt 111110000000000000000000000000000000000000000000000000000 lt CR gt lt 11111 11111 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 111110000 000000000 000000000 000000000 0000000 0000000 000000110 0000001 0000001 000000110 000000110 0000000 0000000 000000000 000000000000000000000000 000000000000000000000000 00000000000000
323. or in the case of continuous media the page length set by SETFF See page 232 for more information on that command This command allows to you change the function of the feed button to either have it reprint the last label or ignore the key press Parameters Quick Reference Parameter Description Valid Range Value CR LF Terminated String Specifies the function of the feed key See below Value Specifies what behavior occurs when the user presses the feed key on the printer Value Description FEED Paper is fed to mark or gap as described above This is the default behavior REPRINT The last label printed is printed again If no label has been printed since power on no motion occurs IGNORE The key press is ignored and no motion occurs If the last print transaction was line print only the last line print buffer is reprinted in REPRINT mode See information about the line print buffer on page 164 The reprinted label will be the last label printed by the printer from any source and control language not necessarily the last printed CPCL label Example Ul ON FEED FEED lt CR gt lt LF gt This example instructs the printer to make the feed button perform its normal function of feeding paper Command Notes and Interactions This command not only affects the functionality of the feed button but also the functionality of the FF command See page 237 for more information CPCL FOR LINK OS PRINTERS Page 275
324. ore information on the built in fonts There are two types of CPF fonts CPF and ECPF ECPF Extended Comtec Pre Scaled Font adds capabilities which allow it to be used for multi byte encoding CPF and ECPF fonts can be used with the COUNTRY command to indicate the encoding of the font CPF fonts can have up to 256 characters but typically start at character 32 space as the lower ASCII characters are not printable in line print and NUL is never printable See below for a detailed look at the format and makeup of CPF fonts 8 1 2 CSF Comtec Scaleable Fonts CSF or Comtec Scaleable fonts were a type of scaleable font that was used in CPCL prior to the introduction of TTF support Only SCALE TEXT and SCALE TO FIT support the use of CSF files in CPCL Internally they are based on the Adobe Type 1 format with slight modifications CSF files have been largely replaced with the significantly more ubiquitous TTF or TrueType font which also extends the capabilities offered to many other commands including line print The detailed format of CSF fonts will not be covered in this document 8 1 3 TTF True Type Fonts TTF or True Type fonts replaced CSF fonts for use in scaleable applications in CPCL before the time of Link OS In addition to being supported in the SCALE TEXT and SCALE TO FIT commands they are also supported anywhere a pre scaled font can be used including the TEXT command and in line print mode CPCL FOR LINK OS PRI
325. pace Terminated String A scaled font used to create the text See Below Width 5 Digit Unit Number The width of the box to contain the text 0 to 65535 Height 5 Digit Unit Number The height of the box to contain the text 0 to 65535 x 5 Digit Unit Number The X origin of the scaled text in units 0 to 65535 Y 5 Digit Unit Number The Y origin of the scaled text in units 0 to 65535 Data CR LF Terminated String The text data to be printed Up to 8191 characters ScaledFontName Specifies the name of the TrueType or CSF font file to use when printing the scaled text The entire filename of the font including extension must be specified The file must have a TTF CSF or FNT extension Width Height Specifies the width and height of the bounding box to contain the text specified by Data in X Y The X and Y coordinates in units specifying where the string of scaled text is to be placed Data The text to print This string may be up to 8191 characters in length Examples SCALE TO FIT LBL 0 200 200 420 1 lt CR gt lt LF gt SCALE TO FIT VERAMONO TTF 250 50 40 20 A lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 146 of 329 1073699 001 SCALE TO FIT VERAMONO TTF 250 50 40 70 A few lt CR gt lt LF gt SCALE TO FIT VERAMONO TTF 250 50 40 120 A bit more lt CR gt lt LF gt SCALE TO FIT VERAMONO TTF 250 50 40 170 Many more characters lt CR gt lt LF gt SCALE TO FIT VERAMONO TTF 250 50 40 220 Even more c
326. pecified The format of this data is based on the data input mode selected as part of the Config parameter Manual Data If manual data input mode was specified the Data parameter is sequence of commands that indicate encoding type and data Each of these commands consists of a single letter followed by data Multiple encoding types can be encoded into a single barcode To encode multiple types end the current encoding with a comma and then restart using the single letter to indicate the new mode followed by data The following data formats are supported within QR code Encoding Type Specify With Max Capacity Numeric only N 7 089 Alphanumeric A 4 296 Binary or Byte BXXXX 2 953 Kanji and Kana K 1 817 Up to 200 type changes may occur in a single barcode Note that each type change consumes data space within the barcode which may reduce the maximum capacity If the data capacity is exceeded no barcode will be printed Numeric Only Encoding In numeric mode only the ASCII characters 0 9 can be encoded The largest possible number of digits that can be encoded is 7 089 assuming concatenation mode was not used and that the low option was selected for error correction Alphanumeric Encoding In alphanumeric encoding the ASCII characters 0 9 A Z uppercase only and space as well as the following punctuation characters SSx In this mode up to 4 296 characters can be encoded assuming concatenation mode
327. r s internal flash memory and is retained even when the printer is powered off Every Link OS printer with CPCL has an E drive available to the user of at least 32MB in size many with 64MB drives 13 1 2 The R Drive The R Drive is provided for the temporary storage of user graphics or fonts that are being used while printing The contents of the R drive are in the printer s RAM and while they can be accessed quickly are lost each time the printer is powered off or restarted All Link OS Printers with CPCL have an R drive which is between 4MB and 8MB in size most with the 8MB drive 13 1 3 The Z Drive The Z drive is where Zebra created files needed for printer operation are stored This includes a number of built in fonts the WML for the built in menu system and a number of other files necessary for printer operation The Z drive is read only and cannot be written to The size of the drive varies as needed based on the files required for the model of printer being used 13 1 4 Filenames The filenames in use on Link OS Printers are an expansion of the original filenames used in legacy CPCL In Link OS CPCL the filenames may be up to 38 characters long followed by a dot followed by a 5 character extension Filenames in CPCL and ZPL are always uppercase and if specified in lower case will be automatically converted to upper case CPCL FOR LINK OS PRINTERS Page 307 of 329 1073699 001 Some filenames or specifically their ext
328. r Description Valid Range Message lt CR gt lt LF gt Terminated Text to place on the screen Any Text String Message Contains the text to be placed on the screen Only a single line can be shown and it is displayed in the font for the current WML Only text is supported control characters have no effect The text will remain on the screen until the WML is refreshed by a timer or by a key press LCD DBG I NFO The LCD DBG INFO option of DISPLAY returns selection of information about the display including the current processing position within the active WML file and a hex representation of the screen s text Example U1 DISPLAY LCD DBG INFO lt CR gt lt LF gt Example Return Data lt CR gt lt LF gt t_pos 130 lt CR gt lt LF gt Zebra QLn320 FW Ver V68 19 72 Baud Rate 115200 Battery ok IP Addr 10 10 100 100 Menu lt CR gt lt LF gt 20 20 20 20 20 20 20 SA 65 62 72 61 20 51 4C 6E lt CR gt lt LF gt 33 32 30 20 20 20 20 20 20 20 46 57 20 56 65 72 lt CR gt lt LF gt 3A 20 20 20 20 56 36 38 2E 31 39 2E 37 5A 50 32 lt CR gt lt LF gt 33 39 39 32 42 61 75 64 20 52 61 74 65 3A 20 31 lt CR gt lt LF gt 31 35 32 30 30 20 20 20 20 20 20 20 20 20 42 61 lt CR gt lt LF gt 74 74 65 72 79 3A 20 20 20 6F 6B 20 20 20 20 20 lt CR gt lt LF gt 20 20 20 20 20 20 20 20 49 50 20 41 64 64 72 3A lt CR gt lt LF gt 20 20 20 31 30 2E 31 34 2E 32 30 34 2E 31 38 35 lt CR gt lt LF gt 20 20 20 20 20 20 20 20 20 20 20 20 20 20
329. r The Y size of a single element in dots 0 to 65535 Columns 5 Digit Number Specifies the number of columns to use 1 to 30 Rows 5 Digit Number Specifies the number of rows to use 0 to 90 ECC 5 Digit Number Specifies the error recovery level 1to 8 BinaryMode Single Digit Force binary compaction mode Oorl Data Raw String The data to be encoded in the barcode See below X Y The X and Y coordinates in units specifying where the barcode is to be placed XD XDot Optionally specifies the width of a single element of the barcode There is no limit on the value but the recommended range is 1 to 32 A value of 0 will produce no output but will not cause an error If not specified the default value is 2 YD YDot Optionally specifies the height of a single element of the barcode There is no limit on the value but the recommended range is 1 to 32 A value of 0 will produce no output but will not cause an error If not specified the default value is 6 CPCL FOR LINK OS PRINTERS Page 73 of 329 1073699 001 In order for most scanners to be able to read the barcode the value of YDot must be at least 2 greater than the value for XDot C Columns Optionally specifies the number of columns to use in the barcode The valid range is 1 to 30 Values outside this range will cause an error message to print If not specified the default value is 3 A value of 0 for columns is not supported If the barcode cannot be f
330. r gap is encountered while a label is being printed after a label session is completed Both commands can be used either in a utilities session in which case they become the default until power cycle or in a label session If used in a label session the setting only takes effect for the one label session in which it was used and is reset to the value used before the label session was started once the label is printed The effect of JOURNAL or LABEL in a utilities session can be made permanent using the zpl save SGD When in LABEL mode if the printer encounters a mark or gap while printing the printer will truncate the label at the point the mark is found taking into account any TOF or skip adjustments After each label is printed the media will end in a synchronized position When in JOURNAL mode if the printer encounters a mark or gap while printing the printer will ignore it and continue to print through the mark to the label length defined in the label session When in J OURNAL mode the only way to synchronize to a mark or gap is to use the FORM command The default setting value is LABEL LABEL mode is also used for all line print operations Examples Ul LABEL lt CR gt lt LF gt The following example sets the mode to JOURNAL as well as save it to be the power on value Ul LABEL lt CR gt lt LF gt Ul SETVAR zpl save lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 218 o
331. racter of a multi byte sequence When a subsequent high ASCI character is encountered the high bit is also stripped off and saved as the second byte of the sequence The first character is used as the size character page for the font and the second character is used as the character index into that page Some known issues with these encodings e Ifa low ASCII character is encountered after a high ASCII character the low ASCII character is printed and the high ASCI first byte is still saved as the first character of a multi byte sequence When a subsequent high ASCI character is received it will be treated as the second character of the sequence and printed e These encodings were designed around an older GBK encoding standard and do not support second byte characters lt 0xA1 even though code page 936 as characters defined in these regions Example sequences e Only low ASCII characters The byte sequence 0x40 0x41 0x42 will print the characters 0x40 0x41 and 0x42 from size character page 0x00 e High ASCII sequence The byte sequence OxCA OxFE will print the character 0x7E from size character page Ox4A e Interleaved low ASCII character The byte sequence OxCA 0x40 OxFE will print the character 0x40 from size 0x00 followed by character 0x7E from size 0x4A CPCL FOR LINK OS PRINTERS Page 203 of 329 1073699 001 8 3 4 2 BIG5 Encoding The BIG5 encoding is similar to the previous set of encodings in that it prints low A
332. real time clock to See below Date A CR LF terminated string parameter that has contains the time to set the real time clock to The format of the time is hh mm ss All digits must be provided when setting the time including any leading zeros For the hour portion of the parameter the valid values are 0 to 23 If any part of the time is invalid the time is not set Example Ul SET TIME 17 15 00 lt CR gt lt LF gt Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 282 of 329 1073699 001 11 24SET VERSION SET VERSION Version lt CR gt lt LF gt Command Name SET VERSION Short Form Aliases None Valid Session Types Utilities Sessions Only Linked SGD appl version Negative Aware No SET VERSION is used to set the response of the VERSION command as well as the appl version SGD This function is provided so that applications that rely on a particular reply for the VERSION command can continue to function with newer versions of software The change of value is temporary and cannot be stored permanently Upon reboot it will always reset to its default value which Parameters Quick Reference Parameter Description Valid Range Version lt CR gt lt LF gt Terminated The version to set appl version to Up to 20 characters String Version A string up to 20 characters in length specifying the response to return for the CPCL VERSION command as well as the
333. rinter are pressed SEL BAT is activated when the OK button is pressed check mark on some printers FTN BAT is activated when the right arrow button is pressed and FF BAT is activated when the feed key is pressed Not all printers have all of these buttons but all printers at least have the feed key If the button specified is not present on the printer no effect occurs as a result of these files These files are sent directly to the top level parser when activated as if the data had been received via a communications port and will travel though all parsers These files are not disabled by the two key sequence CPCL FOR LINK OS PRINTERS Page 316 of 329 1073699 001 13 4 3 FF3 BAT FF3 BAT is very similar to the other key based execution files but it requires three taps of the key in rapid succession in order to activate When this file is present the responsiveness of the feed key changes because the printer has to check to see if the next press will follow A single press may take longer to execute when this file is present FF3 BAT is sent directly to the top level parser when activated as if the data had been received via a communications port and will travel though all parsers These files are not disabled by the two key sequence CPCL FOR LINK OS PRINTERS Page 317 of 329 1073699 001 13 5 DELETE DELETE FileName lt CR gt lt LF gt DEL FileName lt CR gt lt LF gt Command Name DEL
334. ritten 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 Liability Disclaimer Zebra Technologies takes steps to ensure 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 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 CPCL FOR LINK OS PRINTERS Page 2 of 329 1073699 001 TABLE OF CONTENTS 1 DESCRIPTION 1 1 Purpose 1 2 Scope 1 3 Documentation Format 2 WELCOME TO CPCL 2 1 Designations Unprintable ASCII 2 2 Designations Parameters 2 3 Designations Advanced Notes 2 4 Designations Raw ASCII and Hex
335. rt without adding any additional characters such as a space or lt CR gt lt LF gt to the data inserted into the SGD See below for more information 11 2 4 Insert Custom Result This function allows you to replace a parameter with a custom result The two most common insert types SGD and File leave this command with a limited number of useful applications but there are special cases in which it can be helpful When activated the function gives you a single execution of the CPCL command parser with which to issue a command and get the result When active data that would normally be directed back to the host is redirected into a buffer When the command is complete the buffer is used as the data for the insertion This insert is syntactically different than the other inserts It must be directly terminated with a CR and LF character before starting the command Following that a single complete CPCL command must be specified and properly terminated This command cannot be used to direct the lt ESC gt I command as that command is already redirecting the output mode to return to the host as opposed to a normal two key which is to the printer Examples The current checksum is lt LT gt CCL lt CR gt lt LF gt Ul CHECKSUM lt CR gt lt LF gt lt CR gt lt LF gt This line print example prints out the current application checksum as obtained with the CHECKSUM command on page 259 lt LT gt CCL lt CR gt lt LF gt lt ESC gt R1 0
336. ry uint32 which specifies the address in the file where the font page begins This address is relative to the first character after the LF of the line containing the END FONT INFO designation so the first character page is at lt SEQ 00000000 gt This parameter being present is also what designates a file ECPF If it is absent there is assumed to only be one page in the font and it starts just after the header Different sizes entries can reference the same character page If the offset is not specified it is assumed to be 0 or the first character after the LF of the END FONT INFO designator End of Header Designation Both ECPF and CPF font file headers are terminated with the following sequence END FONT INFO lt CR gt lt LF gt This sequence must be present in the header Example Header CISBF lt CR gt lt LF gt DESC Example Font Header lt CR gt lt LF gt NUMBER 36 lt CR gt lt LF gt SIZES 3 lt CR gt lt LF gt 1 1 0 lt SEQ 00000000 gt 2 2 0 lt SEQ 00000000 gt 1 1 0 lt SEQ 00000CAE gt END FONT INFO lt CR gt lt LF gt This font header shows all the elements required for an ECPF font The font is given the number 36 it could be referred to by this number or by its filename on the printer Three sizes are defined two of which reference the same character table and a third which does not 8 3 2 Character Pages 8 3 2 1 Header CPCL FOR LINK OS PRINTERS Page 192 of 329 1073699 001 Following the font h
337. s If the baud rate isn t supported on the current printer or is invalid the BAUD command has no effect and the baud rate remains unchanged Example Ul BAUD 19200 lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 256 of 329 1073699 001 11 5 BEEP BEEP Duration lt CR gt lt LF gt Command Name BEEP Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No BEEP causes the printer to produce an audible beep The length of the beep is specified in 1 8 of a second increments While the beep is active other tasks such as printing may be paused Parameters Quick Reference Parameter Description Valid Range Duration 5 Digit Number The length of the beep in 1 8ths of a second 0 to 65535 Duration Specifies the length of the beep to create in 1 8 of second increments The use of beeps longer than 3 seconds is not recommended as it may affect system responsiveness A value of 0 produces no beep Example Ul BEEP 8 lt CR gt lt LF gt This example produces a 1 second beep Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 257 of 329 1073699 001 11 6 CAPTURE CAPTURE Mode lt CR gt lt LF gt Command Name CAPTURE Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD input capture Negative Aware N
338. s Setting CONTRAST temporarily sets the print contrast SGD to the value provided The TONE command provides significantly more granularity for configuring the darkness of printed labels TONE and CONTRAST are unique settings in CPCL and are not interchangeable The value set for TONE overrides CONTRAST if the value of TONE is not zero This includes if the SGD print tone is set to a value other than zero even during if no CPCL TONE command has been issued In order for CONTRAST to have any effect TONE must be zero The default value for CONTRAST is 0 but at power on the current CONTRAST value is set to the value of the print contrast SGD Parameters Quick Reference Parameter Description Valid Range Value 1 Digit Number The level of darkness 0 to 3 Value Value is a single digit number that represents the level of darkness to use from 0 to 3 although values 2 and 3 are identical Refer to the following table for the various equivalents for CONTRAST values CONTRAST value TONE Value SD Value 0 0 10 1 100 20 2 200 30 3 200 30 Examples Ul CONTRAST 2 lt CR gt lt LF gt The following example sets the contrast and stores the value permanently Ul CONTRAST 1 lt CR gt lt LF gt Ul SETVAR zpl save lt CR gt lt LF gt Command Notes and Interactions CPCL FOR LINK OS PRINTERS Page 213 of 329 1073699 001 See above information for regarding interaction with TONE Besides the SGD the
339. s rotation for scaled font printing 142 RX Line Print No Yes Line Print Sets the line print cursor relative to where it is now 173 RXY Line Print No Yes Line Print Sets the line print cursor relative to where it is now 173 RY Line Print No Yes Line Print Sets the line print cursor relative to where it is now 173 SCALE TEXT Label Formatting Yes No Prints test from a scalable font 144 SCALE TO FIT Label Formatting Yes No Prints text scaled to fit a particular area from a scaled font 146 SET Utility amp Diagnostic Yes Yes Sets up a macro substitution 278 SETBOLD Label Formatting Yes Yes Sets text bold mode 148 SET DATE Utility amp Diagnostic Yes Yes Sets current date 281 SET VERS ION Utility amp Diagnostic No Yes Sets response of GET VERSION 283 SETFF Media Management Yes Yes Sets mark search and skip distances 232 SETLF Line Print No Yes Sets the height of a line feed operation 175 SETLP Line Print No Yes Sets the font to be used in line print 176 SETLP BUFFER Line Print No Yes Set the size of the line print dot buffer 179 SETLP TIMEOUT Line Print No Yes Set delay before printing line print data 180 SETMAG Label Formatting Yes Yes Line Print Set magnification of a font 151 SETSP Label Formatting Yes No Set the spacing of a font 154 SET TIME Utility amp Diagnostic Yes Yes Sets current time 282 SET TOF Media Management Yes Yes Set top of form offset relative to mark 233 SETVAR Utility amp Diagnostic Yes Yes Set a configurat
340. sage will be printed indicating so Example BARCODE GS1 NO CC LBL This example shows GS1 Databar Barcodes without composite components 0 200 200 750 1 lt CR gt lt LF gt JOURNAL lt CR gt lt LF gt BARCODE RSS 40 0 2 0 0 0 1 1234567890123 lt CR gt lt LF gt ML 24 T 7 0 300 0 lt CR gt lt LF gt GS1 Databar Type 1 lt CR gt lt LF gt No Composite Scale 2 lt CR gt lt LF gt Data lt CR gt lt LF gt 1234567890123 lt CR gt lt LF gt ENDML lt CR gt lt LF gt BARCODE RSS 40 120 3 0 2 0 3 1234567890123 lt CR gt lt LF gt L 24 T 7 0 300 120 lt CR gt lt LF gt GS1 Databar Stacked lt CR gt lt LF gt Type 3 2 Dot Seperator lt CR gt lt LF gt o Composite Scale 3 lt CR gt lt LF gt Data 1234567890123 lt CR gt lt LF gt ENDML lt CR gt lt LF gt BARCODE RSS 40 240 2 0 2 2 6 ABCDEF12345678 lt CR gt lt LF gt L 24 T 7 0 300 240 lt CR gt lt LF gt GS1 Databar Expanded lt CR gt lt LF gt Type 6 2 Segments lt CR gt lt LF gt 2 Dot Seperator lt CR gt lt LF gt o Composite Scale 2 lt CR gt lt LF gt Data ABCDEFGHIJ1234567890 lt CR gt lt LF gt ENDML lt CR gt lt LF gt BARCODE RSS 40 560 2 0 2 L 24 T 7 0 300 560 lt CR gt lt GS1 Databar Expanded lt CR gt Type 6 4 Segments lt CR gt lt 2 Dot Seperator lt CR gt lt LF gt o Composite Scale 2 lt C 4 6 ABCDEF12345678 lt CR gt lt LF gt LE gt lt LF gt LE gt R gt lt LF gt CPCL FOR LINK OS PRINTERS Page 61 of
341. scarded and will not wrap around to the other side as with most commands The value of MoveRight is aligned to the nearest 8 Adjustments less than 8 have no effect MoveUp Specifies how far to move the label up in units Positive values mean shift the top of the label upwards which effectively cuts off the top most pixels of the label The pixels cut off when moving up do not wrap and are disposed of Negative values will shift the label contents down by adding blank space at the start of the label This will extend the size of the label in JOURNAL mode but in LABEL mode the label will be cut off at the bottom due to encountering the synchronization mark Examples MOVE LBL This example changes the page width using the PW command You may wish you reset the page width after using this example The sample output of this example is from a 4 inch printer but the example will work on all widths This example prints four labels CPCL FOR LINK OS PRINTERS Page 120 of 329 1073699 001 0 200 200 250 1 lt CR gt lt LF gt MOVE 0 0 lt CR gt lt LF gt PW 300 lt CR gt lt LF gt BOX 0 0 299 249 0 lt CR gt lt LF gt LINE 0 0 299 249 0 lt CR gt lt LF gt LINE 299 0 0 249 0 lt CR gt lt LF gt CENTER lt CR gt lt LF gt T 7 0 0 0 Top Edge Of Label lt CR gt lt LF gt T90 7 0 0 249 Left Edge of Label lt CR gt lt LF gt T 7 0 0 225 Bottom Edge Of Label lt CR gt lt LF gt T270 7 0 299 0 Right Edge of Label lt CR g
342. sion ends TEMP MOVE is reset to zero The values specified by TEMP MOVE are added to those specified by MOVE to determine the final position Note that TEMP MOVE and MOVE are both negative aware This means that if a MOVE 20 20 was in effect and a TEMP MOVE 20 20 was also in effect the net location used would be 0 0 Syntax and functionality wise TEMP MOVE is identical to MOVE Parameters Quick Reference Parameter Description Valid Range MoveRight 5 Digit Unit Number How far to move the label to the right 0 to 65535 MoveUp 5 Digit Unit Number How far to move the label up 0 to 65535 MoveRight Specifies how far to move the label to the right in units Positive values move the label image right negative values move the label left If the TEMP MOVE command places label data beyond the right side of the print head the label data will be discarded and will not wrap around to the other side as with most commands The value of MoveRight is aligned to the nearest 8 Adjustments less than 8 have no effect MoveUp Specifies how far to move the label up in units Positive values mean shift the top of the label upwards which effectively cuts off the top most pixels of the label The pixels cut off when moving up do not wrap and are disposed of Negative values will shift the label contents down by adding blank space at the start of the label This will extend the size of the label in JOURNAL mode but in LABEL mode the label will
343. size is overridden SETMAG 1 1 Font 7 Size SETMAG 1 2 Font 7 Size SETMAG 2 2 Font 7 Size SETMAG 2 2 Font 7 Size 1 SETMAG 2 2 Example with CONCAT Note how SETMAG overrides built in sizing size WY Size 1 Size 2 Size 3 Size 4 Size 5 Same Line with SETMAG 2 overrides only Height Siz Size 1 fiezSize 3 Size 4 Size 5 Same Line with SETMAG 2 overrides only Width Size 0 Size 1 Gize 2 Bize Size d Gizo F Command Notes and Interactions SETMAG overrides the sizing of FONT GROUP sets in the same way it does for all text The difference in font groups is that the outcome size not the defined size is used to determine the sizing selected meaning SETMAG is applied to the font group size calculation before the font is selected CPCL FOR LINK OS PRINTERS Page 153 of 329 1073699 001 6 32 SETSP SETSP Spacing lt CR gt lt LF gt Command Name SETSP Short Form Aliases None Valid Session Types Label and Utilities sessions Linked SGD None Negative Aware No SETSP is used to set the horizontal spacing between characters The command adjusts the spacing of both pre scaled and scaled fonts The command can only increase the spacing between characters it cannot decrease it If the spacing is large enough this may cause the text to flow off the edge of the page In this case what happens to the extra text is a function of the underlying command used to print the text i e wraps with
344. so shared with line print mode Parameters Quick Reference Parameter Type Description Valid Range Width 3 digit Number Sets the width multiplier of the font 0 to 16 Height 3 digit Number Sets the height multiplier of the font 0 to 127 Width Specifies how many times the width of all pre scaled fonts is to be multiplied A value of 0 means to use the sizing information specified in the font size definition The valid range is 0 to 16 Values greater than 16 will be interpreted as 16 Height Specifies how many times the height of all pre scaled fonts is to be multiplied A value of 0 means to use the sizing information specified in the font size definition The valid range is 0 to 127 but values greater than 16 generally do not produce useful output Values greater than 127 cause no printed output to occur from pre scaled fonts At power on SETMAG is always set to the default of 0 for both width and height Font Sizing When a font size is specified in a pre scaled font it is actually a definition in the font file made up of two sizing elements a width and a height When you use SETMAG you override one or both of these defined sizes For reference here is the SETMAG equivalent of each of the built in CPCL pre scaled fonts Font Size Number Width Height 0 0 1 1 0 1 2 1 0 2 1 2 0 3 2 2 0 4 3 2 0 5 2 3 0 6 3 3 1 0 1 1 2 0 1 1 4A 0 1 1 4A 1 1 2 4B 2 1 T 4B 3 1 1
345. t Battery Full 100 Full Low Battery Indicator Small Size CS with P Option Battery Full 8 39 215 100 Full Cnt 757 Low Battery Indicator Large SizeCL with DBG Option Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 88 of 329 1073699 001 6 5 BOX BOX X Y EndX EndY Thickness lt CR gt lt LF gt Command Name BOX Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The BOX command is used to draw a box By default BOX draws a box in solid black but the pattern used to fill the box can be changed with the PATTERN command The BOX command can be used with the justify commands CENTER LEFT and RIGHT to align the box Parameters Quick Reference Parameter Type Description Valid Range X 5 Digit Unit Number The X origin of the box 0 to 65535 Y 5 Digit Unit Number The Y origin of the box 0 to 65535 Endx 5 Digit Unit Number The X coordinate where the box ends 0 to 65535 Endy 5 Digit Unit Number The Y coordinate where the box ends 0 to 65535 Thickness 5 Digit Unit Number The thickness of the lines in the box 0 to 65535 X Y The X and Y coordinates in units specifying where the box is to be placed EndX EndY The X and Y coordinates in units specifying where the box ends Due to a requirement to maintain compatibility the Y coordinate used will be on
346. t Ul POSTFEED 0 lt CR gt lt LF gt Command Notes and Interactions None CPCL FOR LINK OS PRINTERS Page 227 of 329 1073699 001 9 17 PREFEED PREFEED Amount lt CR gt lt LF gt Command Name PREFEED Short Form Aliases None Valid Session Types Utilities or Label Sessions Linked SGD None Negative Aware Yes The PREFEED command is used to perform an additional media movement before a label or line print section is printed PREFEED can be used with both negative and positive numbers Note that there is no mechanism that prevents you from feeding an excessively large negative value causing the printer to lose control of the media Using the PREFEED command in a utilities session will cause it to be persistent until power off and will also cause the setting to affect line print If used in a label session it will only apply to the label session in which it is used The PREFEED operation will ignore all gap or marks on the paper but will terminate if the printer detects an out of media or other error condition Parameters Quick Reference Parameter Description Valid Range Amount 5 Digit Unit Number How much to feed in units 4000 to 4000 dots Amount Specifies the amount to feed in units After the conversion from the current unit to dots the resulting amount must be between 4000 and 4000 If it is not no feed operation occurs At power on a value of 0 is used which m
347. t stdod lt CR gt lt LF gt ef lt CR gt lt LF gt itm lt CR gt lt LEF shot lt CR gt lt L anh lt CR gt lt L atse lt CR gt lt L t lt CR gt lt L pwrL lt CR gt lt L aiaP lt CR gt lt L rlt lt CR gt lt L aleO lt CR gt lt L g R lt CR gt lt L rbtI lt CR gt lt L aehE lt CR gt lt L p eN lt CR gt lt L hu T lt CR gt lt L si lt CR gt lt L oemc lt CR gt lt L fdpo lt CR gt lt L am lt CR gt lt LF U1 LP ORIENT 0 lt CR gt lt LF gt lt CR gt lt LF gt kc Nae Meee a Ne ee A a J v a io aS aa ae VVVVVVVVVV VV VV VV et J Vv his is a paragraph of text that will be used to demonstrate the impact of the LP ORIENT command his is what happens to standard text is printed in LP ORIENT 270 This is the same paragraph as above 3 c ere is data correctly formatted for LP ORIENT 2 Wod INITYO d1 844 40 39 podul y bua suowep o pesn aq 111M by x 40 ydbaBbouod b sil s1yL CPCL FOR LINK OS PRINTERS Page 171 of 329 1073699 001 Command Notes and I nteractions It is generally not desirable to use lt BS gt when using LP ORIENT 270 due to the way the data is formatted CPCL FOR LINK OS PRINTERS Page 172 of 329 1073699 001 7 5 RX RY RXY RX XValue lt CR gt lt LF gt RY YValue lt CR gt lt LF gt RXY XValue YValue lt CR gt lt LF gt Command Name RX RY RXY Short Form Aliases None Valid Session Types Utilities Sessions O
348. t lt LF gt Command Name SETLP TIMEOUT Short Form Aliases None Valid Session Types Utilities sessions only Linked SGD None Negative Aware No SETLP TIMEOUT sets how long the printer waits for additional line print text data before forcing termination and printing of un terminated data Normally lines in line print text are terminated with a CR an LF or a CR and LF character If data arrives which is not terminated with a CR or LF this timeout specifies how long the printer will wait for more data before terminating the line and printing the data Each time a character destined for line print is received the timer is reset In addition the timer is reset when a line print barcode or PCX command is processed The default value at power on is 4 representing 500ms The value is persistent until power cycle or changed with this command Setting this command to a value of 0 disables the line print timeout and characters will be held forever until a terminator is received Parameters Quick Reference Parameter Type Description Valid Range Timeout 5 digit Number Specifies line print timeout in 1 8 of a second 0 to 99999 increments Timeout Specifies the time to hold un terminated line print characters before they are force terminated and printed The time is specified in 1 8 of a second increments The valid range is 0 to 99999 A value of zero disables the timeout completely Example
349. t lt LF gt T 7 1 0 60 T 7 1 0 100 PRINT lt CR gt lt L 0 200 200 ove Example lt CR gt lt LF gt O RIGHT 0 UP lt CR gt lt LF gt F gt 250 1 lt CR gt lt LF gt MOVE 32 32 lt CR gt lt LF gt PW 300 lt CR gt lt BOX 0 0 299 LINE 0 0 29 LINE 299 0 CENTER lt CR gt lt LF gt 249 0 lt CR gt lt LF gt 9 249 0 lt CR gt lt LF gt 0 249 0 lt CR gt lt LF gt LF gt T 7 0 0 0 Top Edge Of Label lt CR gt lt LF gt T90 7 0 0 249 Left Edge of Label lt CR gt lt LF gt T 7 0 0 225 Bottom Edge Of Label lt CR gt lt LF gt T270 7 0 299 0 Right Edge of Label lt CR gt lt LF gt T 7 10 60 Tod Or BOO PRINT lt CR gt lt L 0 200 200 MOVE 0 O lt CR PW 300 lt CR gt lt BOX 0 0 299 LINE 0 0 29 LINE 299 0 CENTER lt CR gt lt ove Example lt CR gt lt LF gt 32 RIGHT 32 UP lt CR gt lt LF gt F gt 250 1 lt CR gt lt LF gt gt lt LF gt LF gt 249 0 lt CR gt lt LF gt 9 249 0 lt CR gt lt LF gt 0 249 0 lt CR gt lt LF gt LE gt T 7 0 0 0 Top Edge Of Label lt CR gt lt LF gt T90 7 0 0 249 Left Edge of Label lt CR gt lt LF gt T 7 0 0 225 Bottom Edge Of Label lt CR gt lt LF gt T270 7 0 299 0 Right Edge of Label lt CR gt lt LF gt T 7 1 0 60 T 7 1 0 100 PRINT lt CR gt lt L 0 200 200 MOVE 32 3 PW 300 lt CR gt lt BOX 0 0 299 LINE 0 0 29 LINE 299 0 CENTER lt CR gt lt ove Example lt CR gt lt LF gt O RIGHT 0 UP lt CR gt lt LF gt F gt 250 1 lt CR gt lt LF gt 2 l
350. t CR gt lt L e 7 F ONCAT 20 722 lt C 1 4 Part Numb G 1 15 1048184 F gt R gt lt L er oe Se FG 0 15 N A lt CR gt lt LF gt sal M Cc T N E DCONCAT lt CR gt lt L DML lt CR gt lt LF gt RINT lt CR gt lt LF gt F gt F gt lt CR gt lt LF gt R gt lt LF gt L 24 T 7 0 20 792 lt CR gt lt LF gt oncat Example Using Font Groups lt CR gt lt LF gt wo Font Groups Same groups for each label lt CR gt lt LF gt ote how the spacing of Part Number changes lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 99 of 329 1073699 001 Superscript subscripeNOMtdl Concat Example Bitmap font superscript and subscript mer se oft 722 Pt 4 OZ Concat Example 3 Pre scaled Fonts Aligned to 59 39 and bottom aligned Texter our9Calelextscaidak OUP Concat Example Mixing Font Types Groups bitmap and scaled all bottom aligned Part Number 192953939 Tou Cat Part Number 16245814 Huge Ceramic Cow Part Number 142239416 Tiny Blue Ceramic Horse Port Number 1 Adal Ede NAA Concat Example Using Font Groups Two Font Groups Same groups for each Label Note how the spacing of Part Number changes Command Notes and Interactions SET MAG has non obvious effects on font groups See SET MAG on page 151 for more information ROTATE will take effect on this command but only if the concatenation contains only scaled font elements Bitmap font elements cannot be rotated arbitrarily
351. t CR gt lt LF gt Command Name TONE Short Form Aliases None Valid Session Types Utilities or Label Sessions Linked SGD Affects print tone see below Negative Aware Yes The TONE command is used to set the darkness of the printout from the printer It provides the same kind of adjustment ability as the CONTRAST command but with more fine control The range for TONE is 100 to 200 and the default is 0 Higher values are more dark and lower values are less dark The TONE and CONTRAST command both take precedence over SPEED and the printout will be slowed as necessary to reach the desired darkness value When the value is set in a label or utilities session the value becomes permanent similar to SPEED This command affects the print tone SGD but due to print tone s interaction with the print tone_format SGD the print tone value may be in a different format than that of the TONE command If the print tone_format SGD is set to CPCL the value of the print tone SGD exactly mirrors that of the TONE command If the print tone_format SGD is set to ZPL the value specified by the TONE command will be mapped to a 0 0 to 30 0 value system used by ZPL s SD command The converted darkness is identical to the original TONE value The CONTRAST command which predated the TONE command provides more rough control over the darkness level of the printout When the TONE command is set to a non zero value the CONTRAST
352. t CR gt lt LF gt LE gt 249 0 lt CR gt lt LF gt 9 249 0 lt CR gt lt LF gt 0 249 0 lt CR gt lt LF gt LE gt T 7 0 0 0 Top Edge Of Label lt CR gt lt LF gt T90 70 0 249 Left Edge of Label lt CR gt lt LF gt T 7 0 0 225 Bottom Edge Of Label lt CR gt lt LF gt T270 7 0 299 0 Right Edge of Label lt CR gt lt LF gt T 7 1 0 60 Move Example lt CR gt lt LF gt T 7 1 0 100 32 RIGHT 32 UP lt CR gt lt LF gt PRINT lt CR gt lt LF gt Ul FEED 50 lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 121 of 329 1073699 001 ah Ss Top Edge Of Label Left Edge of Labe aqo7 40 e6py 461 Bottom Edge Of Label Hove Exame 32 RIGHT 32 UP Left Edge of Lab aqo7 40 6p3 48 Bottom Edge Of Label Top Edge Of Label W aqo 40 abpy 461 U me S 1 4 o Leb S So lu p 4 u Bottom Edge Of Label Top Edge Of Label x Left Edge of Labe qpq 40 a6pq 451 Bottom Edge Of Label Command Notes and Interactions CPCL FOR LINK OS PRINTERS Page 122 of 329 1073699 001 When used with a PAGE WIDTH less wide than the printer s print head MOVE will allow the label image to be shifted to the left or right fully intact without wrapping until the label reaches the edge of the physical print head If the MOVE command horizontally shifts further than the print head can fully image in the negative direction the label will wrap but only across the PAGE WIDTH specified with
353. t CR gt lt LF gt 80 Millimeters IN MILLIMETERS lt CR gt lt LF gt 8 Inches IN INCHES lt CR gt lt LF gt 203 2 Unit numbers are processed with up to four decimal places Any beyond this amount are ignored Examples UNITS LBL 0 200 200 600 1 lt CR gt lt LF gt IN DOTS lt CR gt lt LF gt T 00 2 2 Position 2 2 In Dots lt CR gt lt LF gt IN MILLIMETERS lt CR gt lt LF gt T 00 2 2 Position 2 2 In Millimeters lt CR gt lt LF gt IN CENTIMETERS lt CR gt lt LF gt T 00 2 2 Position 2 2 In Centimeters lt CR gt lt LF gt IN INCHES lt CR gt lt LF gt T 00 2 2 Position 2 2 In Inches lt CR gt lt LF gt IN DOTS lt CR gt lt LF gt BOX 30 450 130 550 5 lt CR gt lt LF gt T 0 2 58 560 Dots lt CR gt lt LF gt IN MILLIMETERS lt CR gt lt LF gt BOX 20 56 25 32 5 68 75 0 625 lt CR gt lt LF gt T 0 2 21 70 Millimeters lt CR gt lt LF gt IN CENTIMETERS lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 112 of 329 1073699 001 BOX 3 625 5 625 4 875 6 875 0 0625 lt CR gt lt LF gt T 0 2 3 72 7 Centimeters lt CR gt lt LF gt IN INCHES lt CR gt lt LF gt BOX 2 0659 2 2145 2 559 2 7066 0 0246 lt CR gt lt LF gt T 0 2 2 20 2 7559 Inches lt CR gt lt LF gt PRINT lt CR gt lt LF gt Position 2 2 In Dots Position 2 2 In Millimeters Position 2 2 In Centimeters Position 2 2 In Inches OLL Dots illimeters Centimeters Inches Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS P
354. t LF gt SCALE TEXT VERAMONO TTIF 15 15 Rotate 225 lt CR gt lt LF gt ROTATE 135 lt CR gt lt LF gt VSCALE TEXT VERAMONO TTF 15 15 Rotate 135 lt CR gt lt LF gt XY 1 1 lt CR gt lt LF gt ML 24 T 7 0 40 530 lt CR gt lt LF gt Rotate example TTF Font lt CR gt lt LF gt 4 Lines with adjustment before each line lt CR gt lt LF gt Note how origin behavior matches standard rotations lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 142 of 329 1073699 001 ENDML lt CR gt lt LF gt PRINT lt CR gt lt LF gt Rotate example TIF Font 4 Lines with adjustment before each line Note how origin behavior matches standard rotations Command Notes and I nteractions Using the ROTATE command overrides the rotation specified by adding a V to the name such as VSCALE TEXT or VCONCAT The only exception to this is when using SCALE TO FIT with MULTI LINE and ROTATE each line is individually rotated off of a straight line either a vertical line for SCALE TO FIT or a horizontal one for VSCALE TO FIT The entire block is not rotated but rather each individual line is rotated from this origin line CPCL FOR LINK OS PRINTERS Page 143 of 329 1073699 001 6 28 SCALE TEXT SCALE TEXT ScaledFontName XScale YScale X Y Data lt CR gt lt LF gt ST ScaledFontName XScale YScale X Y Data lt CR gt lt LF gt VSCALE TEXT ScaledFontName XScale YScale X Y Data lt
355. t erased at the end each label session If set to OFF label memory is erased at the end of each label session The default behavior is OFF When PERSIST OFF is received the printer immediately erases the label memory Example Ul PERSIST ON lt CR gt lt LF gt Command Notes and I nteractions If used with the ABORT command the label elements drawn by the partially receved label session will be visible if the PERSIST ON command is used CPCL FOR LINK OS PRINTERS Page 138 of 329 1073699 001 6 25 PRINT PRINT lt CR gt lt LF gt END lt CR gt lt LFE gt Command Name END PRINT Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No PRINT and its alias END is used to terminate a CPCL label session and create the resulting print out Every CPCL label session must be terminated with a PRINT command Every example for this section uses the PRINT command to terminate labels Command Notes and Interactions As a label starts a number of print related settings are saved After the PRINT command these saved settings are restored See Section 6 1 on page 38 for the list of settings that are restored CPCL FOR LINK OS PRINTERS Page 139 of 329 1073699 001 6 26 RIGHT RIGHT Range lt CR gt lt LF gt Command Name RIGHT Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No
356. t form The label file named PCX LBL is included in the label files set included with the manual The following text representation does not function but demonstrates the command 0 200 200 280 1 lt CR gt lt LF gt CENTER lt CR gt lt LF gt T 7 0 0 0 PCX Command Example lt CR gt lt LF gt PCX 0 30 BinaryPCXData lt CR gt lt LF gt PRINT lt CR gt lt LF gt PCX Command Example ZEBRA TECHNOLOGIES Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 135 of 329 1073699 001 6 23 PCXMAG PCXMAG X Y XMag YMag Data lt CR gt lt LF gt Command Name PCXMAG Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No The PCXMAG command is used to print a ZSoft PCX file that has been magnified vertically and horizontally The requirements for the PCX file itself are identical to the PCX command The only difference between this command and PCX is the addition of the magnification parameters PCXMAG supports the justification commands LEFT RIGHT and CENTER Unlike with PCX if the image flows off the right side of the page it does not wrap the remainder of the image data is disposed of If the unscaled image is too wide to fit on the page as defined by page width no image will be printed The use of alignment commands RIGHT and CENTER with PCXMAG is not supported Parameters Quick Reference
357. t is possible that if the user scans multiple cards in the interval between reads reads can be lost MCR QUERY will only return the data for the most recent scan in this case Example Ul MCR QUERY lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 304 of 329 1073699 001 CPCL FOR LINK OS PRINTERS Page 305 of 329 1073699 001 13 File Commands All file commands in CPCL cannot be used in label sessions Most are used in utilities sessions except for the file download sessions themselves CPCL Command Alias Description DELETE DEL Delete a file from disk 318 DiR Show a file directory 820 FILE Renames or gets checksums of files 322 PRINT File Session Ends a stored format with the PRINT command 324 TYPE Returns the contents of a file 325 CPCL FOR LINK OS PRINTERS Page 306 of 329 1073699 001 13 1CPCL File System Introduction In Link OS the printer has a three part internal file system which is used to manage the storage of both internal and user files in the printer The file system is divided into three drives as follows Drive Letter Primary Function E Flash based User Storage R Temporary RAM Drive Z Internal Zebra Files Read Only 13 1 1 The E Drive The E Drive is provided so that users can store configuration formats fonts custom WML certificate and general files The data on the E drive is stored in the printe
358. take many seconds to execute as it calculates the checksum Once complete it will return either two or three characters either the word yes or no with no termination During the time of calculation the printer is unavailable to receive other commands If the command returns yes the checksum provided by CHECKSUM has been validated If the command returns no the checksum calculated did not match that provided by CHECKSUM Example Ul VCHECKSUM lt CR gt lt LF gt Example Response yes Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 288 of 329 1073699 001 11 29 X Y XY Label Sessions X XValue lt CR gt lt LF gt Y YValue lt CR gt lt LF gt XY XValue YValue lt CR gt lt LF gt Command Name X Y XY Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware Yes X Y and XY are used to specify the value of X and Y parameters in label sessions eliminating the need to specify them in label formatting commands The X Y and XY commands have a different effect if used in Line Print mode See those commands on page 181 for more information These commands affect many functions in CPCL Anywhere the parameter names X or Y are used in this document this function will replace them if the commands are used in label sessions X permits you to set and omit the X parameter Y permits you to set and omit the Y parameter and XY d
359. te of SINGLE Disabled SINGLE Only one reading is permitted within the timeout Opposite of MULTIPLE Enabled BELL The printer s bell is to be sounded when a read is successful Disabled ERRORS Specifies that errors should be reported Disabled TN Specifies that the track number should be returned Opposite of NTN Enabled NIN Specifies that the track number should not be returned Opposite of TN Disabled T1 T2 T3 These three options specify which tracks are to be read by the card reader Any or all can be specified but at least one must be specified to get any data from the magnetic card reader QUERY By default if this option is not specified the printer will return the data to the host as soon as a card is read via the active port If you would prefer to query the printer for the result rather than receive the result without request this option must be added to the MCR string When this option is enabled the printer will not return any data when the card has been swiped instead the MCR QUERY command must be used to retrieve the data See that command on page 304 for more information MULTIPLE and SINGLE This option specifies whether the MCR command is good for just a single read or is good for many reads If the SINGLE option is used which is also the default as long as the Timeout parameter is not 0 the MCR system will shut down after a single read or after the timeout elapses CPCL FOR LINK OS PRINTERS Page 299 of 329
360. tely 1 inch high LineSpacing Specifies the amount of space to put between each line of line print printed text in units The valid range is 0 to 65535 Note that the total line spacing used is a combination of this value and the value specified by the SETLF commands When using a TrueType font for line print this value specifies an additional amount of feed to add in addition to the value specified for line spacing in the font to which then the value specified by SETLF is then added so generally a value of 0 is desirable This is not the case when using prescaled fonts where this value specifies the total line spacing and using a value of 0 in combination with a SETLF of zero results in no print out See the table below for recommended values for line spacing for the built in fonts Font Number Sizel Size2 Size 3 Size 4 Size 5 Size 6 Size 7 0 9 9 18 18 18 36 36 1 48 2 12 24 4 47 94 45 90 180 270 360 450 5 24 48 46 92 6 27 7 24 48 Example SETLP Ibl U1 SETLP 7 0 24 lt CR gt lt LF gt Ul SETLF 10 lt CR gt lt LF gt SETLP Demonstration lt CR gt lt LF gt This is text with the default SETLP settings 0 lt CR gt lt LF gt This is text with the default SETLP settings lt CR gt lt LF gt lt CR gt lt LF gt U1 SETLP 5 2 34 lt CR gt lt LF gt Font 5 size 2 for line print lt CR gt lt LF gt Font 5 size 2 for line print lt CR gt lt LF gt lt CR gt lt LF gt
361. ternate TCP Port 9100 ip port_alternate TCP JSON Config Port 9200 ip port_json_config UDP Port 6101 ip port Remote Server ip remote Remote Server Port 10013 ip report_port TCP on ip tcp enable UDP on ip udp enable LPD on ip lpd enable DHCP on Based on active network setting from above BOOTP on ip bootp enable FTP on ip ftp enable HTTP on ip http enable SMTP on ip smtp enable POP on ip pop3 enable SNMP on ip snmp enable TELNET on ip telnet enable MIRROR off ip mirror auto UDP Discovery on ip discovery enable Weblink off weblink enable DHCP CID type 1 Based on active network setting from above DHCP CID 0022586d3e4a Based on active network setting from above Peripherals MCR Not installed device feature mcr may be absent LCD Installed Fixed Text Power Management In activity Timeout 0 Secs power inactivity_timeout Low battery Timeout 60 Secs power low_battery_timeout Remote DTR pwr off Disabled power dtr_power_off on Enabled off Disabled CPCL FOR LINK OS PRINTERS Page 247 of 329 1073699 001 Voltage 78 39 power voltage Low bat Warning 176 power low_battery_warning Low bat Shut down 166 power low_battery_shutdown Power On Cycles 219 power power_on_cycles Battery Health good power health Battery Cycle Count 16 power cycle_ count Memory Flash 67108864 Bytes memory flash_size RAM 8388608 Bytes memory ram_size Label Width 576 dots
362. th the next character This is also the case if the number of decimal numbers exceeds four M t is recommended that you only terminate your numbers with space characters in order to improve readability of your session data 3 3 2 String Parameters Strings are a parameter type in CPCL that is used to represent data There are three main types of string parameters in CPCL terminated string parameters quotation string parameters and raw string parameters CPCL FOR LINK OS PRINTERS Page 20 of 329 1073699 001 3 3 2 1 Terminated String Parameters Terminated string parameters are a series of aloha numeric characters that are terminated by the CR and LF at the end of a line or by a space character or either of the two The terminator is determined by the specific command in which the parameter is used Each command which uses terminated string parameters will specify what the terminator is Typically terminated string parameters are limited to 8191 bytes in size There are some exceptions to this so each command which uses terminated string parameters will also call out the maximum size of the string parameter These terminated string parameters accept any character except the chosen terminator Space or CR and LF by default although null characters will be stripped out of the stream as if they did not exist If the number of characters provided exceeds the limit the command which contained the parameter will fail and the remainder of
363. th both a CR and LF those characters are used not only to terminate the insert but are also fed back into the system to terminate the parent command in which the insert appears In Link OS CPCL only there is a special operation mode that allows you to use more than one substitution per line This mode can be activated by terminating the substitution with the LF character This does not apply to the first line of a Custom Result CCL but does apply to the last line of it The substitutions do not have to be of the same type Examples 0 200 200 75 1 lt CR gt lt LF gt TEXT 7 0 0 50 Date Time lt LT gt DATE lt LF gt lt LT gt TIME lt CR gt lt LF gt PRINT lt CR gt lt LF gt In this example both the DATE and TIME insert functions are used to insert both the date and the time on a single line Note how the DATE command is lt LF gt terminated Ul SETVAR device user_pl 15 lt CR gt lt LF gt 0 200 200 200 1 lt CR gt lt LF gt TEXT 7 0 0 0 y 0 lt CR gt lt LF gt TEXT 7 0 0 lt LT gt device user_p1 lt LF gt y device user_pl lt LT gt device user_p1 lt LF gt lt CR gt lt LF gt PRINT lt CR gt lt LF gt In this example the value of device user_p1 is used twice once as the y coordinate for the TEXT command and then again in the text string of the text command Note how each one is LF terminated CPCL FOR LINK OS PRINTERS Page 254 of 329 1073699 001 11 3 ABORT ABORT lt CR gt lt LF gt Command Name AB
364. the SampleData Parameter We would include here the size of the parameter that is accepted the valid range and information about what happens when invalid values are specified Example SAMPLE COMMAND IbI t 0 200 200 150 1 lt CR gt lt LF gt SAMPLE COMMAND 100 100 Cheesecakes lt CR gt lt LF gt PRINT lt CR gt lt LF gt Command Notes and Interactions In this section any advanced notes about the command s behavior as well as interaction with commands and other systems CPCL FOR LINK OS PRINTERS Page 36 of 329 1073699 001 6 Label Formatting Commands The following list of commands can be used in label sessions For this chart it is assumed that line print mode is disabled with regard to the use of commands in utilities sessions CPCL Command Aliases L U Description BARCODE B Yes No Prints a barcode in label mode 4038 BARCODE TEXT BT Yes Yes Turns on or off text line below barcodes 85 BAT INDICATOR BI Yes No Prints a battery charge indicator 87 BOX Yes No Draws a box 89 CENTER Yes No Specifies alignment for text fields 92 COMPRESSED GRAPHICS CG Yes No Places binary graphics on a label 94 CONCAT Yes No Use text of different fonts or sizes on the same line 96 COUNT Yes No Creates text fields which increment or decrement 101 END Yes No Alias for PRINT 104 EXPANDED GRAPHICS EG Yes No
365. the command line up to the next lt CR gt lt LF gt will be discarded 3 3 2 2 Quoted String Parameters Quoted string parameters are similar to raw string parameters except they are bound by a double quotation mark on each end It is important to note that the proper character to use when transmitting a quoted string parameter is the ASCII character 34 hex 0x22 Typically quoted string parameters are limited to 8191 bytes in size There are some exceptions to this so each command which uses raw string parameters will also call out the maximum size of the string parameter If necessary the double quotation character can be included in a quoted string parameter This can be accomplished by placing a backslash character before a double quotation character as shown below This example has a double quote here The actual output of this string would be as follows This example has a double quote here Note that the sequence has been replaced by a double quotation mark Within quoted string parameters all other ASCII characters including CR and LF with the exception of null are permitted and valid Null characters are stripped out M Although it is not technically necessary to terminate a series quoted string parameters with a space it is highly recommended for readability This is also true of lt CR gt lt LF gt termination of commands that end with a quoted string parameter The notable exception to this is the SETVAR a
366. ties Sessions Only Linked SGD None Negative Aware Yes but unsupported SET is used to create on on line macros which are applied to data which is received by the CPCL parser These macros can be used to manipulate the data received for a variety of purposes typically patching of label formats to work on various models of printers One unusual aspect about this command is that it is not lt CR gt lt LF gt terminated it is terminated on the last quotation mark after the Destination If the command is part of a full fledged utilities session A UTILITITES session not a U1 a lt CR gt lt LF gt may be safely used to terminate it as it will be ignored Parameters Quick Reference CPCL FOR LINK OS PRINTERS Page 278 of 329 1073699 001 Parameter Type Description Valid Range Find Quoted File Type Specifies the data that is to be replaced See below Parameter Replace Quoted File Type Specifies the data that is to replace the Source See below Parameter parameter Find Specifies the data to locate within the incoming stream The string must be a double quote encapsulated and may contain any data including lt CR gt lt LF gt s See below for the macro language Replace Specifies the data which replaces the data specified by the Find paramneter The string must be a double quote encapsulated and may contain any data including lt CR gt lt LF gt s See below for the macro language Macro Language
367. tity HQUANTITY At the start of each new label session the following values are set Option Associated Command Set to Value Set End of Print Feed Operation FORM as if not present do not feed to mark Set Contrast CONTRAST Last valid utilities value or 0 Set Tone TONE Last valid utilities value or SGD value Set Left Justification LEFT 0 justify over whole label Set Additional Character Spacing SETSP 0 no additional spacing Set Amount to Reverse REVERSE 0 no reverse Set Debug Flag DEBUG as if not present no debug output Set Wait Value WAIT 0 no delay Set Unit System to Dots IN DOTS no parameters Set Field Rotation ROTATE 0 no rotation Set Fill Pattern PATTERN 100 solid black Set Bolding SETBOLD 0 not bold Set Horizontal Quantity HQUANTITY 0 one copy Set X and Y Substitution XY 0 0 disable substitution CPCL FOR LINK OS PRINTERS Page 39 of 329 1073699 001 6 2 BARCODE The barcode command has several syntaxes based on the type of barcode being printed The most common syntax is the 1D barcode format 6 2 1 1D Barcodes BARCODE VBARCODE Width Width Type Type Ratio Ratio Height X Y Height X Y Command Name BARCODE VBARCODE Short Form Aliases B VB Valid Session Types Label or Utilities Sessions Linked SGD None Negative Aware No Data lt CR gt lt LF gt Data
368. together Terminated String hexadecimal digits File Data Binary file data containing the number of Raw String Any data of File Size bytes specified by File Size length The filenames for these sessions can include a drive letter but it will be overridden if it does not match the type specified For information on the CRC format and more details on the file sessions see page 311 3 7 Line Print Mode Line print mode is a component of the CPCL formatting language which allows non formatted text to be transmitted to the printer directly for printing This mode may or may not be enabled by default depending on your printer model but the command to enable it is the same for all Link OS printers which support CPCL Note that when CPCL line print mode is enabled the printer can no longer process ZPL commands or commands from any other control language except CPCL To enable CPCL line print mode use the following command Ul SETVAR device languages line_print lt CR gt lt LF gt And to disable it and enable the ZPL control language use the following command Ul SETVAR device languages hybrid_xml_zpl lt CR gt lt LF gt Once enabled printing with line print is very simple Sending text terminated with CR and LF characters is all that is required for basic operation Characters which are not terminated with CR and LF will print after a short timeout or when the printer s buffer fills The FF character can
369. transmitted 0 to 999 Height 5 Digit Unit Number The height of the data to follow in units 0 to 65535 x 5 Digit Unit Number The X origin of the graphic 0 to 65535 Y 5 Digit Unit Number The Y origin of the graphic 0 to 65535 Data Raw String The data that makes up the bitmap to be printed See below ByteWidth Specifies the width in bytes of the data that is to be printed If this value exceeds the physical width of the print head the data will wrap the edge of the page and back to the beginning Height Specifies the height of the data to be printed in units Use care when using non dot unit systems as this value in combination with ByteWidth is used to determine how large the Data parameter is For this reason the use of dots is recommended X Y The X and Y coordinates in units specifying where the graphic is to be placed The Y coordinate in this function is reduced by one This allows print on the very first dot row of the printout which is otherwise not accessible See the note at section 6 1 on page 38 for more information Data The raw binary data that contains the 1 bit image data The size of this field must be exactly ByteWidth times Height bytes in size This data may contain any binary including NUL s It is important to remember that a lt CR gt lt LF gt must be placed after the data to terminate the command even though the size of Data is exact Use in Utilities Sessions for Line Print
370. ts 400 to 400 dots Amount Specifies the amount to adjust the position in units After the conversion from the current unit to dots the resulting amount must be between 400 and 400 dots however if the value is positive it is limited to the physical distance between the media sensor and the print line 120 dots for most models If the value set is greater than the largest physically supported value it will be reduced to the largest value supported If the value is outside the 400 to 400 range it will not be set Example Ul SET TOF 50 lt CR gt lt LF gt Ul SET TOF 0 lt CR gt lt LF gt Ul SETVAR zpl save lt CR gt lt LF gt Command Notes and Interactions CPCL FOR LINK OS PRINTERS Page 233 of 329 1073699 001 The setting of this command interacts with the ZPL control language the second parameter of MN but in opposite sign for example 120 for SET TOF is equivalent to 120 for the second parameter of MN 9 23 SPEED SPEED Value lt CR gt lt LF gt Command Name SPEED Short Form Aliases None Valid Session Types Utilities or Label Sessions Linked SGD Sets media speed but not to Value Negative Aware No The SPEED command is used to set the maximum speed at which printout occurs When used in a label session the SPEED command takes effect on the label When used as a utilities command it takes effect immediately for all subsequent printouts The default
371. tween the various modes supported within a QR Code barcode to most efficiently pack the data Because of the way binary and kanji QR Code encoding modes overlap not all characters can be represented in automatic data mode Kanji characters using Shift JIS encoding are represented with two bytes which start with characters between ASCII 128 and 160 or greater than 224 If automatic detection mode encounters one of these characters it will enter kanji encoding mode Thus these characters should not be placed in an automatic data stream with the intent of encoding them in binary mode If use of these characters is required the use of manual binary mode is recommended Termination of Data The data string in either mode manual or automatic is terminated with the following sequence No part of this data is encoded in the data that is put into the barcode lt CR gt lt LF gt ENDQR lt CR gt lt LF gt This termination structure must appear at the end of the barcode or the barcode is not terminated Examples BARCODE QR LBL 0 200 200 1200 1 lt CR gt lt LF gt B QR 50 25 lt CR gt lt LF gt L Basic QR Code lt CR gt lt LF gt ENDQR lt CR gt lt LF gt ML 24 T 7 0 270 25 lt CR gt lt LF gt QR Code Minimal Form lt CR gt lt LF gt Automatic Mode 2 lt CR gt lt LF gt Automatic Width 6 lt CR gt lt LF gt Automatic Mask lt CR gt lt LF gt Low Error Recovery lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 81 of 3
372. ultiple QR code barcodes These barcodes can be read in any order and will be reassembled into the complete data stream correctly If you wish to use this mode it must appear as the first option within the Config string and must be exactly 8 characters long including the trailing comma There are no spaces or other delimiters between the options The sub parameters of the concatenation mode are as follows D This Total Parity This A two digit decimal number specifying which barcode in the sequence of barcodes this is For example the first barcode in a three barcode sequence would be 01 the second 02 and the third 03 The range for this value is 1 to 16 If the value is exceeded no barcode is printed Total A two digit decimal number specifying the total number of barcodes within the sequence In our above example this would be 03 The valid range for this value is 2 to 16 Values outside this range result in no barcode being printed Parity A two digit hexadecimal number specifying the parity calculation for the data within this barcode This value is calculated by taking all bytes of data to be encoded and XORing them together Note that if you are using manual encoding the data to be XORed is only the actual data bytes Do not include the M or A characters or the commas used to separate data blocks in manual encoding mode If you are attempting to calculate parity in Kanji mode XOR each byte individually most signif
373. unction generally only applies to printers powered by batteries Idle is considered by the printer to be a state without printouts user interaction with the keypad or changes in printer status such as head open to close Setting the TIMEOUT to zero disables the power down on idle functionality This function explicitly sets power inactivity_timeout but the value set by TIMEOUT only persists until reboot or power down Setting the SGD explicitly will make the setting permanent See the SGD documentation for more information on the function Parameters Quick Reference Parameter Type Description Valid Range 5 Digit Number The length of the timeout in 1 8ths of a second 0 to 65535 Value Specifies the length of time to wait when idle before powering down in 1 8 of a second increments The value should be a multiple of 8 Any modulo of 8 will be ignored Example Ul TIMEOUT 14400 lt CR gt lt LF gt This example sets the timeout to 1800 seconds or a half hour Command Notes and Interactions While this command specifies time in 1 8ths of a second the SGD operates in seconds directly This command properly converts the 1 8ths of a second to seconds before setting CPCL FOR LINK OS PRINTERS Page 286 of 329 1073699 001 11 27 WAIT WAIT Duration lt CR gt lt LF gt Command Name WAIT Short Form Aliases None Valid Session Types Label Sessions Only Linked SGD None Negative Aware No WA
374. urs Example Ul REVERSE 50 lt CR gt lt LF gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 231 of 329 1073699 001 9 21 SETFF SETFF FeedLength FeedSkip lt CR gt lt LF gt Command Name SETFF Short Form Aliases None Valid Session Types Utilities or Label Sessions Linked SGD Set media feed_length to FeedLength Set media feed_skip to FeedSkip Negative Aware No SETFF is used to configure the length of a feed operation and the advance amount after a mark or gap ends before the next label begins The values set with this command are persistent until power off regardless of whether set from a label or utilities session They can be made permanent by using the zpl save SGD See the examples below Parameters Quick Reference Parameter Description Valid Range FeedLength 5 Digit Unit Number How long is a form feed operation in units 0 to 20000 dots FeedSkip 5 Digit Unit Number How long to move after a mark or gap ends 5 to 50 dots FeedLength Specifies how long a form feed operation is in units This value is converted to dots and once converted it must be in the range of 0 to 20000 If the value exceeds 20000 it is not set The default value is 2030 dots or 10 inches When a FORM operation is performed either in a utilities or label session this value determines how far the printer will feed in search of a mark or gap If such a mark is found during that
375. when the printer is powered off See your printer s documentation for more information The time is formatted in the form hh mm ss followed by a NUL character The time is always in 24 hour format The time can be set either via the rtc time SGD or the SET TIME CPCL command To print the current time on a label or in line print see the Insert Current Date substitution command on page 251 Example Ul GET TIME lt CR gt lt LF gt Example Response 23 29 15 lt NUL gt Command Notes and I nteractions None CPCL FOR LINK OS PRINTERS Page 268 of 329 1073699 001 11 15 GETVAR GETVAR SettingName lt CR gt lt LF gt getvar SettingName lt CR gt lt LF gt Command Name GETVAR getvar Short Form Aliases None Valid Session Types Label and Utilities Sessions Linked SGD None Negative Aware No GETVAR is the primary method of retrieving the current setting of a configuration setting from the printer These configuration settings are called SGD settings short for Set Get Do which outlines the three commands that can be used to interact with the settings SETVAR GETVAR and DO These three commands are always available on every Link OS printer regardless of current language selected Even Link OS Printers which do not support the CPCL language support these CPCL commands The GETVAR command can be in lower or upper case but must be of a single case it cannot be mixed Generally
376. wie cris 46 Gre He Format Prefix zpl format_prefix COs eter eee ee eek Delimiter zpl delimiter OO hs wes eed dn4 Top Position zpl label_top No Motion Media Power Up ezpl power_up_action Feed Media Head Closed ezpl head_close_action OOK SG se aes ene eae axe Left Margin zpl left_position BBA ik nie eae ake Dots per row ezpl print_width End ZPL Configuration End of report 11 1 1 Two Key Items without equivalent SGDs Page 248 of 329 1073699 001 CPCL FOR LINK OS PRINTERS A small number of the fields on the two key report do not have equivalent SGD representations Each of these items will be listed in this section with a brief explanation of their meaning 11 1 1 1 OS This value represents the value of the underlying core operating system within the printer not to be confused with the Link OS release version 11 1 1 2 Pres Gap and Bar Sections These three sections each have three values representing the DAC which controls how much light is emitted by the sensor the threshold and the current sensor reading The Pres section refers to the presentation sensor which is used for the AUTO PACE command to detect when a label has been removed The gap and bar sensors are used to detect media when the printer is in GAP SENSE and BAR SENSE respectively Each value ranges from 0 to 255 There are no public SGD equivalents for these values The DAC value is set during the printer s manufacturing process
377. x121 2452 1963 1224 226 125x125 2632 2107 1314 227 131x131 2818 2256 1407 228 135x135 3007 2407 1501 229 139x139 3205 2565 1600 230 143x143 3409 2728 1702 231 147x147 3616 2894 1806 232 151x151 3832 3067 1914 300 N A 3 up to 255 N A N A See the data section for more information on each of the capacity types CPCL FOR LINK OS PRINTERS Page 45 of 329 1073699 001 The value of 300 is a special symbol that can only encode 3 numbers up to 255 See the Data section for more details The default value if the value is not specified is 0 which means an error correction factor of about 23 F Flags A zero or one value that specifies if flag characters are able to be encoded in the data stream Any non zero value is interpreted as 1 The default value if the value is not specified is 0 disabling flag encoding ME Menu Specifies if the barcode is a menu This is a flag signaling if the barcode contains configuration information for the scanner Any non zero value is interpreted as 1 The default value if the value is not specified is 0 disabling flag encoding M Multi Specifies the barcode is to be split into multiple barcodes This value must be between 1 and 26 and specifies the total number of symbols that make up the complete barcode The barcode data will be distributed between all the barcodes and the barcodes will be placed next to each other on the horizontal axis Each symbol will be separated by one element s wort
378. x4a75 0x5a54 Ox6a37 Ox7al6 Ox0Oafl OxladO Ox2ab3 0x3a92 Oxfd2e Oxed0f Oxdd6c Oxcd4d Oxbdaa Oxad8b O0x9de8 O0x8dc9 Ox7c26 Ox6c07 Ox5c64 O0x4c45 Ox3ca2 0x2c83 OxlceO 0Ox0Occl Oxeflf Oxff3e Oxcf5d Oxdf7c Oxaf9b Oxbfba Ox8fd9 Ox9ff8 Ox6el7 Ox7e36 Ox4e55 Ox5e74 O0x2e93 Ox3eb2 Ox0edl Oxlef0O U16 update_crc U8 c U16 current_crc return crctab current_crc gt gt 8 amp Oxff current_cre lt lt 8 c Call the update_crc function for each byte of data in the checksum to be calculated The final result converted to hex and padded to four digits is the value which goes in the CISDFCRC16 or CISDFRCRC16 section The value of 0000 can also be used to indicate that the checksum should be ignored 13 3 2 Calculating the Simple Checksum The simple checksum can be calculated simply by adding the bytes in FileData together and after each addition performing a logical AND with the value and 65535 This ensures that the value stays in the 16 bit range The value of 0000 can also be used to indicate that the checksum should be ignored CPCL FOR LINK OS PRINTERS Page 315 of 329 1073699 001 13 4 Pre defined Special Purpose Files There are a number of filenames in CPCL which have special purposes When these files are defined in the printer certain actions can trigger their execution automatically The list of file names which have special purposes is listed in the table below
379. y would look Tl Track 1 Data lt CR gt lt LF gt If no card was scanned in the timeout no error occurs and no data is returned If there was a read error no data would be returned Example 2 U1 MCR 80 T1 T2 T3 QUERY PREFIX Data DEL lt CR gt lt LF gt The 80 value for Timeout equates to 10 seconds The user has 10 seconds to swipe a card When they do no data will be returned to the host because of the QUERY option Instead the data must be retrieved with the MCR QUERY command The data will be available after the timeout expires If no card is swiped the MCR QUERY command will return no data The command also specifies a special prefix for the data as well as a custom delimiter Assuming the user scanned a card containing Track 1 Data on track 1 and Track 2 Data on track 2 and a read error on track 3 the reply from MCR QUERY would be the following Data 1 Track 1 Data lt CR gt lt LF gt Data 2 Track 2 Data lt CR gt lt LF gt Note that the track 3 data is not included If the ERRORS option is not specified tracks with errors will not be transmitted to the host Example 3 Ul MCR 0 T3 QUERY SINGLE NIN DEL BELL lt CR gt lt LF gt This example uses a timeout value of 0 to specify that there is no timeout this MCR request will remain active until the operation completes We request to read only track 3 and we request that the data be retrieved via the MCR QUERY command The track number is turned off
380. yntax S o State _ _ ___ _Space Terminated String Specifies the state for line print purging ONorOFF RUN Syntax Filename Space Terminated String The filename to run when an error occurs Any valid filename Unused 5 Digit Unit Number An unused parameter that must be specified 0 to 65535 Mode A space terminated string that specifies what is done with labels that are received while the printer is in an error state such as head open or out of paper Valid values for MODE are PURGE and WAIT The default state is PURGE CPCL FOR LINK OS PRINTERS Page 221 of 329 1073699 001 If the mode is WAIT labels are kept until the error condition is cleared and in PURGE labels are parsed but no printing occurs The setting does not affect attempts to reprint the current label which is handled by the Retries parameter This parameter only affects what action occurs with regard to labels newly received when the printer is in an error state The Retries parameter specifics what happens to the current label being printed The PURGE state does not purge a label received while an error is active such as out of paper or head open If using PURGE mode with a batch of labels a label session with a quantity greater than one and the cpcl synchronous_mode is set to On and Retries is set to 1 when one label is purged due to an error condition all labels that are pending are purged Otherwise only the one label currently pri
381. ype of parameter that can be used in CPCL e Label Session This session is used to create labels to perform printing e Utilities Session This session is used to execute a series of non printing configuration commands e One Line Utilities Session This session is used to execute a single configuration command e Files Sessions There are several types of file sessions These will not be documented here but full documentation is provided in the CPCL File System section on page 307 3 2 Label Sessions A label that contains information to be printed begins with the character followed by a series of ASCII numbers which represent information about the label that follows After the header the label session can contain any number of utility or printing commands To terminate the session use the PRINT or END command See page 139 for more information on this command When the PRINT or END command is received the label will be printed The format of the numbers which configure a label session are as follows Offset Horizontal Res Vertical Res Height Quantity lt CR gt lt LF gt CPCL FOR LINK OS PRINTERS Page 18 of 329 1073699 001 Typically a value of 0 is used for the offset indicating the label is aligned to the right edge of the media The resolution values are typically both 200 The height can be set to any value and is measured in the active unit and any value for the quantity For more detailed information about

Download Pdf Manuals

image

Related Search

Related Contents

monty 1620 monty 1625 - Snap  Netgear 308U Quick Start Guide  MOULF35-Notice HomeBread  Automated Grain Dispensing System Final Report  N° modelo KX-VC1300 / KX-VC1600 KX-VC1300SX / KX  "取扱説明書"  ST 290 ST 290  One Bay SATA/IDE Turbo NAS User Manual  Model AC2003 Manual    

Copyright © All rights reserved.
Failed to retrieve file