CPCL Commands Manual 1.1
CPCL Commands Manual 1.1
TABLE OF CONTENTS
1. Programming Introduction 5
2. Printer Commands 6
A. Printer Commands 6
B. PRINT Command 7
C. FORM Command 7
D. JOURNAL Command 7
E. UNITS Command 8
F. Using Commend 9
3. TEXT 10
A. TEXT Command 10
B. FONT-GROUP(FG) Command 11
C. TEXT CONCATENATION Command 12
D. MULTILINE(ML) Command 13
E. COUNT Command 14
F. SETMAG Command 14
6. Graphics 20
A. BOX Command 20
B. LINE Commands 20
C. INVERSE-LINE Commands 21
D. PATTERN Command 21
E. GRAPHICS Commands 22
F. PCX Commands 23
2
Command Manual
7. Advanced Commands 24
A. CONTRAST Command 24
B. TONE Command 24
C. JUSTIFICATION Commands 24
D. PAGE-WIDTH Command 25
E. PACE Command 26
F. NO-PACE Command 26
G. WAIT Command 26
H. SPEED Command 27
I. SETSP Command 27
J. ON-OUT-OF-PAPER Command 27
K. ON-FEED Command 28
L. BACKFEED Command 29
M. PREFEED Command 29
N. POSTFEED Command 29
O. COUNTRY/CODE PAGE Command 30
P. USING FORMAT FILES 30
Q. BEEP Command
8. Line Print Mode 31
A. SETLP Command 31
B. SETLF Command 31
C. Moving With X and Y Coordinates 31
D. LMARGIN Command 32
E. SETBOLD Command 32
F. SETSP Command 32
G. PAGE-WIDTH Command 33
H. PAGE-HEIGHT Command 33
I. Special ASCII Characters 33
J. SETFF Command 33
K. SET-TOF Command 34
L. SETLP-TIMEOUT 34
3
Command Manual
9. Advanced Utilities 35
A. VERSION Utility 35
B. CHECKSUM Utility 35
C. DEL Utility 35
D. DIR Utility 35
E. DEFINE-FILE(DF) Utility 36
F. TYPE Utility 36
G. BAUD Utility 36
H. TIMEOUT Utility 37
I. ON-LOW-BATTERY Command 37
J. LT Command 37
K. SET-TIME Utility 38
L. GET-TIME Utility 38
M. SET-DATE Utility 38
N. GET-DATE Utility 39
O. Printing a Time Stamp 39
P. Printing a Date Stamp 39
Q. PAPER-JAM Utility 40
4
Command Manual
1. Programming introduction
This manual details the various commands in the CPCL language which allow the programmer to utilize
the built in text, graphics, bar code printing and communications capabilities. The following notation
conventions are used throughout this manual.
{} Required item
[] Optional item
() Abbreviated command
<> Literal item
The printing will contain information about printer model, ROM version, serial number, baud rate, USB, Bluetooth,
font extra information which has been saved in the printer. In addition, certain amount of ASII hex codes will be
printed to check the printing quality.
If you require to set for communication Diagnostic Mode, press FEED button again after printing information by
following the steps above. The printer then indicates received information with hexadecimal.
LabelMaker
As LaberMaker has similar interface as general graphic edit tool, you can design readily without specific expertise
for programming and print the data through LUKHAN Portable Printer. Moreover, you are able to save the label
image into your PC with LBL file format. Saved label file can be reopening and edited.
Apart from the function of designing, you can save the file by communicating with printer, reopen saved file or see
the state information of the printer.
5
Command Manual
2. Printer commands
A label file always begins with the “!” character followed by an “x” offset parameter, “x” and “y” axis
resolutions, a label length and finally a quantity of labels to print. The line containing these parameters is
referred to as the Command Start Line.
A label file always begins with the Command Start Line and ends with the “PRINT” command. The
commands that build specific labels are placed between these two commands.
☞ NOTE: Every line in the command session must be terminated with both carriage-return and line –feed
characters. All printer Commands must be in uppercase character ONLY.
A. PRINTER Commands
Form <!> {offset} <200> <200> {height} {qty}
<!> Session start
{offset} The value of label horizontal offset
<200> Horizontal resolution
<200> Vertical resolution
{height} Maximum value of Label Height
The Maximum height of the label is the numerical value deducted 1/16” (1.5mm) from the value which
is measured from first bar (or gap) to the next bar (or gab). (In dots: 12donts on 203 dpi).
6
Command Manual
B. Print command
The print command terminates and prints the file. This must always be the last command (except
when in Line Pint Mode). Upon execution of the Print command, the printer will exit from a control
session. Be sure to terminate this and all commands with both carriage-return and line-feed characters.
Format
Format {command}
Command & option
{command} PRINT
C. FORM Command
The Form command will execute a form feed after the label is printed and instructs the printer to feed
to top of form after printing.
Format {command}
Command & option
{command} FORM
D. JOURNAL Command
Be default, the printer will check for correct media alignment if it encounters the eye-sense mark
during a print cycle. If necessary, the Journal command can be used to disable this automatic
correction feature.
Format {command}
Command & option
{command} JOURNAL
7
Command Manual
E. UNITS Command
The Units commands are used to specify a measurement system for all subsequent command fields
in a control session. Coordinates, widths, and heights for all control commands can be entered with
precision for four decimal places. The printer measurement system will default to dots until a units
command is issued.
Format {command}
Command & option
{command} IN-INCHES Measurement in inches.
IN-CENTIMETERS Measurement in centimeters
IN-MILLIMETER Measurement in millimeters.
IN-DOTS Measurement in dots
8
Command Manual
F. Using Comments
Comments can be added between the first line of a command start line and the print command.
A comment is placed in the file by starting a line with the ‘;’ character in the first column. Any
remaining text to the end of the line will be ignored. Comments are illegal between the CONCAT and
ENDCONCAT commands.
9
Command Manual
3. TEXT
A. TEXT Commands
The TEXT command is used to place text on a label. This command and its variants control the
specific font number and size used, the location of the text on the label.
Format {command} {font} {size} {x} {y} {data}
Command & option
{command} TEXT (or T) Prints text horizontally
VTEXT (or VT) Prints text (vertically) rotated 90degrees counterclockwise
TEXT90 (or T90) Same as VTEXT above.
TEXT180 (or T180) Prints text (upside down) rotated 180 degrees
counterclockwise
TEXT270 (or T270) Prints text (vertically) rotated 270 degrees
counterclockwise
{font} font의 Name/number
{size} font의 size
{x} Horizontal starting position
{y} Vertical starting position
{data} The text to be printed
10
Command Manual
B. FONT-GROUP(FG) Command
The FG command gives a user the ability to group up to 10 pre-scaled font files into a single group. A
user can later specify the font group in a TEXT command. If a font group is used in a text command,
the printer will use the largest font specified in the font group that will produce the required text data
and still remain within the available width of the label the text. When specified in the TEXT command,
the {font} parameter is specified as FG, and the {size} parameter is specified as the {fg}. Note that a
user can also specify an FG command within a CONCAT/ENCONCAT command.
Format {command} {fg fn fs} {fn, fs} …
Command & option
{command} FG
{fg} Font group number. Up to 10font groups can be specified, Valid font groups
rage from 0 to 9.
{fn} Number of the font
{fs} Size identifier for the font
11
Command Manual
C. TEXT CONCATENATION Command
Text concatenation allows you to assign different character styles to strings, printing them with
uniform spacing on the same text line. This command should be used in combination with CONCAT
Command and ENDCONCAT Command.
Format {command} {x} {y}
{font} {size} {offset} {data}
…………
{font} {size} {offset} {data}
<ENDCONCAT>
Command & option
{command} CONCAT Horizontal concatenation
VCONCAT Vertical concatenation
{x} Horizontal starting position.
{y} Vertical starting position
{font} font의 Name/number.
{size} Name/number of the font
{offset} Unit-value to offset text from the starting position. Used to align individual text
strings or create superscript/subscript characters
{data} Text to be printed
<ENDCONCAT> Terminates concatenation
12
Command Manual
D. MULTILINE(ML) Command
MULTILINE (ML) allow you to print multiple lines of text using the same number of font and
line-height.
Format {command} {height}
{text} {font} {size} {x} {y}
{data}
………
{data}
<ENDMULTILINE>
Command & option
{command} MULTILINE (or ML) MULTILINE Prints multiple lines of text.
{height} Unit-height for each line of text
{text} Text command (TEXT, VTEXT, etc.)
{font} Name/number of the font
{size} Size identifier for the font
{x} Horizontal starting position.
{y} Vertical starting position
{data} Text to be printed
<ENDMULTILINE> Terminates NULTILINE
(or ENDML)
13
Command Manual
E. COUNT Command
The COUNT command is used for printing multiple labels where a numeric text field or numeric data
encoded in a bar code is to be incremented or decremented for each label. The TEXT/BACODE
command string must contain this numeric data as the last characters of the string. The numeric data
portion can be up to 20characters, and can be preceded by the ‘-’ sign. Incrementing or decrementing
the numeric data thru ‘0’ is not allowed, Leading Zeros will be retained. Up to 3 COUNT commands can
be used in a label file.
Format {command} {numeric value}
Command & option
{command} COUNT
{numeric value} Any integer value up to 20 characters. The value can be preceded by a ‘ – ’
sign if decrementing of the TEXT/BARCODE value is desired, Leading zeros will
be retained in the output.
F. SETMAG Command
The SETMAG command magnifies a resident font to the magnification factor specified.
Format {command} {w} {h}
Command & option
{command} SETMAG
{w} Width magnification of the font (1~16)
{h} Height magnification of the font (1~16)
☞ NOTE: The SETMAG command stays in effect after printing a label. To cancel any SETMAG values and allow
the printer to use its default font sizes, use “SETMAG 0 0”.
14
Command Manual
4. Linear Bar Codes
A. BARCODE Command
The BARCODE command prints bar codes in both vertical and horizontal orientations at specified
widths and heights.
15
Command Manual
B. BARCODE-TEXT Command
The BARCODE-TEXT command is used to label bar codes with the same data used to create the bar
code. The command eliminates the need to annotate the bar code using separate text commands.
Use BARCODE-TEXT OFF (or BT OFF) to terminate.
Format {command} {font number} {font size} {offset}
Command & option
{command} BARCODE-TEXT (or BT)
{font number} The font number to use when annotating the bar code
{font size} The font size to use when annotating the bar code
{offset} Unit distance to offset text away from the barcode
16
Command Manual
5. Two-Dimensional Bar Codes
A. PDF417 (PORTABLE DATA FILE)
The following commands are used for the creation and formatting of two-dimensional bar codes.
17
Command Manual
B. MAXICODE
This revision supports only Mode 2 bar codes.
Format {command} {type} {x} {y}
{tag} {options}
…
{tag} {options}
<ENDMAXICODE>
Command & option
{command} BARCODE or B Prints bar code
{type} MAXICODE
{x} Horizontal starting position
{y} Vertical starting position
{tag} Tags not supplied will be filled with default values.
Use only the tags that you require. Tags can be in any order.
<ENDMAXICODE> Final tag in Maxicode bar code.
18
Command Manual
HEAD Transportation data format 01[GS]98
header
TN Tracking Number [GS]
SCAC Standard Carrier Alpha Code UPSN
SHIPPER UPS Shipper Number [GS]
PICKDAY Julian day of pickup [GS]
SHIPID Shipment ID Number [GS]
NX Package N of X (n/x) [GS]
WEIGH Package weight [GS]
VAL Address validation (Y or N) [GS]
STADDR Ship to street address [GS]
CITY Ship to city [GS]
ST Ship to state [GS]
EXTRA Extra user defined fields - empty -
EOT End of transmission character 0x004h
GS Field separator character [GS] 0x01Dh
RS Format type separator [RS] 0x01Eh
19
Command Manual
6. Graphics
A. BOX Command
The BOX command provides the user with the ability to produce rectangular shapes of specified line
thickness.
Format {command} {x0} {y0} {x1} {y1} {width}
Command & option
{command} BOX
{x0} X-coordinate of the top left corner
{y0} Y-coordinate of the top left corner
{x1} X-coordinate of the bottom right corner
{y1} Y-coordinate of the bottom right corner
{width} Unit-width (or thickness) of the lines forming the box.
B. LINE Commands
Lines of any length, thickness and angular orientation can be drawn using the LINE command.
Format {command} {x0} {y0} {x1} {y1} {width}
Command & option
{command} LINE (or L)
{x0} X- coordinate of the top-left corner
{y0} Y- coordinate of the top-left corner
{x1} X-coordinate of :-top right corner for horizontal.
- bottom left corner for vertical
{y1} Y-coordinate of :-top right corner for horizontal
- bottom left corner for vertica
{width} Unit-width( or thickness) of the line
20
Command Manual
C. INVERSE-LINE Commands
The INVERSE-LINE Command has the same syntax as the LINE command. Previously created objects
that lie within the area defined by the INVERSE-LINE command will have their black areas re-drawn
white, and white areas re-drawn black.
D. PATTERN Command
The PATTERN command is used with the LINE and SCALE-TEXT commands to change the patterns
used to fill these shapes. In the diagonal line by using Line command, Pattern Command can not be
used, and the default is 100 in solid black.
Format {command} {pattern number}
Command & option
{command} PATTERN
{pattern number} 100 Filled (solid black/default pattern).
101 Horizontal lines.
102 Vertical lines.
103 Right rising diagonal lines.
104 Left rising diagonal lines.
105 Square pattern.
106 Cross hatch pattern.
21
Command Manual
E. GRAPHICS Commands
Bit- mapped graphics can be printed by using graphics commands. ASCii HEX is used for expanded
graphics data. Data size can be reduced to one-half by utilizing the COMPRESSED GRAPHICS
commands with the equivalent binary character(s) of the hex data.
Format {command} {width} {height} {x} {y} {data}
Command & option
{command} EXPANDED-GRAPHICS Prints expanded (or EG) graphics horizontally.
VEXPANDED-GRAPHICS Prints expanded (or VEG) graphics vertically.
COMPRESSED-GRAPHICS Prints compressed (or CG) graphics horizontally.
VCOMPRESSED-GRAPHICS Prints compressed (or VCG) graphics vertically.
{width} Byte-width of image
{height} Dot-height of image
{x} Horizontal starting position
{y} Vertical starting position
{data} Graphics data
22
Command Manual
F. PCX Commands
The PCX command gives a user the ability to send “.PCX” graphics formatted images to the printer.
The .PCX image MUST be encoded as a black and white image.
Format {command} {x} {y} {data}
Command & option
{command} PCX
{x} X-coordinate of the top-left corner
{y} Y-coordinate of the top-left corner
{data} PCX image data.
23
Command Manual
7. Advanced Commands
A. CONTRAST Command
The contrast command is used to specify the print darkness for the entire label. The lightest printout is
at contrast level 0. The darkest contrast level is 3. The printer defaults to contrast level 0 on power up.
Contrast level must be specified for each label file.
Format {command} {level}
Command & option
{command} CONTRAST
{level} Contrast level.
0 = Default
1 = Medium
2 = Dark
3 = Very Dark
B. TONE Command
The TONE Command can be used instead of the CONTRAST Command to specify the print darkness
for all labels. The lightest printout is at tone level-99. The darkest tone level is 200. The printer
defaults to tone level 0 on power up. Tone level settings remain in effect for all printing tasks until
changed. The TONE and CONTRAST commands cannot be used in combination with one another.
Format {command} {level}
Command & option
{command} TONE
{level} select a value from -99→200.
Contrast to Tone level equivalents.
Contrast 0 = Tone 0
Contrast 1 = Tone 100
Contrast 2 = Tone 200
Contrast 3 = No equivalent
C. JUSTIFICATION Commands
Alignment of fields can be controlled by using the justification commands. By default, the printer will
left justify all subsequent fields until another justification command is specified.
Format {command} [end]
Command & option
{command} CENTER Center justifies all subsequent fields.
LEFT Left justifies all subsequent fields.
RIGHT Right justifies all subsequent fields.
[end] End point of justification. If no parameter is entered, justification commands
use the print head’s width for horizontal printing or zero (top of form) for
vertical printing.
24
Command Manual
D. PAGE-WIDTH Command
The command specifies the page width
Format {command} {width}
Command & option
{command} PAGE-WIDTH (or PW)
{width} Unit –width of the page
25
Command Manual
E. PACE Command
When PACE is activated, the user must depress the printer’s ‘FEED’ key to print additional labels until
the bath quantity is exhausted.
Format {command}
Command & option
{command} PACE
F. NO-PACE Command
This command cancels the PACE and AUTO-PACE mode
G. WAIT Command
This command is used to introduce a delay after a label is printed.
Format {command} {delay-time}
Command & option
{command} WAIT
{delay-time} Delay time- Delay time in 1/8 seconds
In the example below, the printer will pause 10 seconds after printing each label.
26
Command Manual
H. SPEED Command
This SPEED command selects a speed level within a range of 0 to 5, with 0the slowest speed.
Format {command} {speed level}
Command & option
{command} SPEED
{speed level} A number between 0 and 5, 0 being the slowest speed.
I. SETSP Command
The SETSP command is used to change spacing between text characters.
Format {command} {spacing}
Command & option
{command} SETSP
{spacing} Unit measurement between characters. The default for spacing is zero.
☞ NOTE: That this command is affected by the UNIT command setting.
J. ON-OUT-OF-PAPER Command
ON-OUT-OF-PAPER can be issued to instruct the printer as to the course of action to action to take
when it encounters an error while printing the label. There are two instructions; PURGE and WAIT
Format {command} {action} {number of retries}
Command & option
{command} ON-OUT-OF-PAPER
{action} PURGE: Discard the label if printer error is encountered after the specified
number of attempts. WAIT: Do not discard the label if printer error is
encountered. In this mode the printer will wait for the error to be corrected
before making eh nest print attempt.
The default printer configuration is ON-OUT-OF-PAPER PURGE 2
27
Command Manual
K. ON-FEED Command
Your printer can be configured to ignore, form-feed, or reprint the last label when the feed key is
pressed or when it receives a form-feed character.
Format {command} {action}
Command & option
{command} ON-FEED
{action} IGNORE: Do not take any action when the feed key is pressed or when the
form-feed character is received .
FEED: Feed to top-of –form when the feed key is pressed or when the form-
feed character is received.
REPRINT: Reprint the last label when the feed key is pressed or when the
form-feed character is received.
28
Command Manual
L. BACKFEED
Format {command}
Command
{ Command } BACKFEED
M. PREFEED Command
The PREFEED command instructs the printer to advance the media a specified amount prior to printing.
Format {command} {length}
Command & option
{command} PREFEED
{length} Unit length the printer advances media prior to printing.
29
Command Manual
N. POSTFEED Command
The POSTFEED command instructs the printer to advance the media a specified amount after printing.
Format {command} {length}
Command & option
{command} POSTFEED
{length} Unit length the printer advances media after printing.
30
Command Manual
P. USING FORMAT FILES
When you used the same form repeatedly, you can print the label only sending variable date to the
printer by using a pre-loaded format.
In order to save a specified form, use “! DE” and to recall the saved format, use “! UF”.
Q. BEEP Command
This command instructs the printer to sound the beeper for a given time length.
Format {command} {beep length}
Command & option
{command} BEEP
{beep length} Duration of beep, specified in 0.125ms.
31
Command Manual
8. Line Print Mode
The “! UTILITIES” command, or “! U” for short, must be ended by the terminator “PRINT” followed by a
CR/LF to end the utility session. Also, the “! U1” command can be placed anywhere in a text line o
execute the command.
A. SETLP Command
This command will be used to select the font, size and lint height
Format ! U1 SETLP {font name or number} {size} {unit height}
{font name or number} Font number
{size} Font size
{unit height} Real font size to use
B. SETLF Command
This command is to specify the distance between lines.
32
Command Manual
C. Moving With X and Y Coordinates
Even though the printer is in a line print mode, it can still move down and across the paper using X
and Y values.
Format ! U1 X {unit value}
! U1 Y {unit value}
! U1 XY {x unit value} {y unit value}
! U1 RX {unit x value to move relative to present position}
! U1 RY {unit y value to move relative to present position}
! U1 RXY{unit x value to move relative to present position} {unit x value to move
relative to present position}
{unit value} Unit value
{x unit value} X Unit value
{y unit value} Y Unit value
{unit x value to move relative to present position} Unit X value to move relative to present
position
{unit y value to move relative to present position} Unit Y value to move relative to present
position
D. LMARGIN Command
The LMARGIN command sets the left margin in line print mode.
Format ! U1 LMARGIN {dots to offset from left}
{dots to offset from left} The value of Left margin
E. SETBOLD Command
The SETBOLE command will make text bolder and slightly wider. The value is an offset number from
0 to 5. Be sure to issue a “! U1 SETBOLE 0” command to turn the bolding off when done.
Format ! U1 SETBOLD {value}
{value} Value Range from 0 to 5
F. SETSP Command
The SETSP command is used to change spacing between text characters.
Format ! U1 SETSP {unit to separate characters}
{unit to separate characters} The space between each characters
33
Command Manual
G. PAGE-WIDTH Command
This command let you control the width.
Format ! U1 PW {unit width}
{unit width} Printing width for unit
H. PAGE-HEIGHT Command
This command let you control the height.
Format ! U1 PH {unit height}
{unit height} Print height
J. SETFF Command
The SETFF command is used to align top of media to printhead. Once this command is executed, the
alignment will occur when:
Feed key is pressed
Form-feed character is issued
FORM command is issued
Format <!> <UTILITIES>
{command} {max-feed} {skip-length}
<PRINT>
Command & option
{command} SETFF
{max-feed} Maximum unit-length the printer advances searching for the next eye-sense
mark to align top of from. Valid values are 0-20,000
{skip-length} Unit-length printer advances past top of from. Valid values are 5-50.
34
Command Manual
K. SET-TOF Command
This command is used to program the distance between the top-of-form and the end of the next or
previous eye-sense mark or gap.
Format ! U1 {command} {d}
Command & option
{command} SET-TOF
{d} The distance between the top of form and the end of the next or previous eye-
sense mark or gap.
L. SETLP-TIMEOUT
If the printer does not receive any characters after a set time, it will begin to print. This delay can be
set with the SETLP-TIMEOUT command. The range of the time out is 0 to 255.
Format ! U1 {command} {time in 1/8 second units}
Command & option
{command} SETLP-TIMEOUT
{time in 1/8 second units} Multiply the seconds to wait by 8 to get the correct time for the
command (125ms)
35
Command Manual
9. Advanced Utilities
A. VERSION Utility
This command reports the firmware version as a four character null-terminated ASCII string.
Format <!> <UTILITIES>
{command}
<PRINT>
Command & option
{command} VERSION
B. CHECKSUM Utility
This command reports the application checksum as a four character null-terminated ASCII string.
C. DEL Utility
The DEL command deletes the specified file.
Format <!> <UTILITIES>
{command} {name.ext}
<PRINT>
Command & option
{command} DEL
{name.ext} Name of file to be deleted
D. DIR Utility
The DIR command sends the file directory to a host.
Format <!> <UTILITIES>
{command}
<PRINT>
Command & option
{command} DIR
36
Command Manual
E. DEFINE-FILE(DF) Utility
The DF command defiles a file name for a file to be loaded into the printer. If a file with the same
name already exists in the printer. it will be overwritten with the new file.
Format <!> {command} {filename.ext}
{data}
{terminator}
Command & option
{command} DF
{filename.ext}
{data}
{terminator} PRINT: If the PRINT terminator is used, it is also written to the file.
END: If the END terminator is used, it is not written to the file.
F. TYPE Utility
The TYPE command allows you to read a text file by sending it from the printer to host
Format <!> <UTILITIES>
{command} {name.ext}
<PRINT>
Command & option
{command} TYPE
{name.ext}
G. BAUD Utility
The BAUD command enables you to set the printer serial port baud rate.
Format <!> <UTILITIES>
{command} {baud}
<PRINT>
Command & option
{command} BAUD
{baud} 1200
4800
9600
19200
38400
57600
115200
37
Command Manual
H. TIMEOUT Utility
If no data is received after the specified timeout, the printer will turn itself off to save energy and
preserve battery life. You can disable the timeout feature by setting the timeout value to 0.
Format <!> <UTILITIES>
{command} {time}
<PRINT>
Command & option
{command} TIMEOUT
{time} Time in 1/8 seconds of inactivity before printer will turn itself off.
I. ON-LOW-BATTERY Command
This command can be issued to instruct the printer as to what action to take when the battery voltage
fallos below the level set by the ‘low battery shut-down’ setting.
Format {command} {options}
Command & option
{command} OLB
{options} ALERT: The printer will transmit any message included between quote marks
out the serial port.
ALARM: Sounds the printer’s beeper in a set time.
J. LT Command
This command specifies the command line terminator character(s). The default terminator characters
are CR/LF or LF
Format {command} {mode}
Command & option
{command} LT
{mode} CR: Carriage-return (0x0D) character is the line terminator.
LF : Line-feed (0x0A) character is the line terminator.
CR-LF: Carriage-return/line-feed (0x0D 0x0A) characters are the line
terminator.
CR-X-LF: Line terminator is a carriage-return (0x0D) followed by any number
of characters followed by the line-feed (0x0A) character.
Characters found between the carriage-return and line-feed characters are
discarded.
38
Command Manual
K. SET-TIME Utility
This command sets the time in the real time clock module.
Format <!> <UTILITIES>
{command} {time-stamp}
<PRINT>
Command & option
{command} SET-TIME
{time-stamp} hh:mm:ss
hh = hours (00 – 23)
mm = minutes (00 – 59)
ss = seconds (00 – 59)
L. GET-TIME Utility
This command reports the current time recalled from the real time clock module.
Format <!> <UTILITIES>
{command}
<PRINT>
Command & option
{command} GET-TIME
Printer output hh:mm:ss\ 0
hh = hours (00 – 23)
mm = minutes (00 – 59)
ss = seconds (00 – 59)
null terminator (00H)
M. SET-DATE Utility
The command sets the date in the real time clock module.
Format <!> <UTILITIES>
{command} {date-stamp}
<PRINT>
Command & option
{command} SET-DATE
{date-stamp} mm-dd-yyyy
mm = month (01 – 12)
dd = day (01 – 31)
yyyy = year (1990 – 2089)
39
Command Manual
N. GET-DATE Utility
This command reports the current date.
Format <!> <UTILITIES>
{command}
<PRINT>
Command & option
{command} GET-DATE
Printer output mm:dd:yyyy\ 0
mm = month (01 – 12)
dd = day (01 – 31)
yy = year (1990 – 2089)
null terminator (00H)
O. Printing a Time Stamp
To print a time stamp on a label, use any text command and insert “ !< TIME” in the place of the text
to be printed.
!<DATE-EU -> dd : mm : yy
Input (DATE-EU.LBL)
! 0 200 200 210 1
TEXT 4 0 0 100 !<DATE-EU
FORM
PRINT
Output:
40
Command Manual
24-02-1998
Q. PAPER-JAM Utility
This command establishes the parameters that allow the printer to report a paper jam.
Format <!> <UTILITIES>
{command} {method} {bar distance} {alert “message”}
<PRINT>
Command & option
{command} PAPER-JAM
{method} PRESENTATION
BAR
GAP
This parameter establishes which sensor will be used to detect a paper jam.
{bar-distance} Maximum distance within which index mark of next label is expected
{alert “message”} ALERT “Paper jam detected” : The {alert} parameter is optional.
Message which is informing that paper jam is detected
41
Command Manual
10. Printer Escape Commands
A. SET AND READ CODE Command
Printer command sessions normally start with the ‘!’ character. When the printer is used in Generic
Text Mode (or Line-Print Mode) and if the user expects to print the ‘!” character in that mode, then
the CCL code must be changed.
Set CCL Code
ESC(0x1b) ‘}’(0x7d) ‘W’(0x57) ‘1’(0x31) <new CCL code>
Where {new CCL code} is a one-bye character representing the new CCL code.
Once the CCL Code is changed, all CCL session should be stared with the new CCL code.
The printer will retain the new CCL code for as long as it remains powered.
☞ NOTE: The escape commands should not be used while in a control/utility session
(“! UTILITIES … PRINT” or ! 0 … PRINT”)
B. STATUS/INFORMATION
1. Get Printer Status
ESC (0x1b) ‘f’(0x68)
This command requests a status byte form the printer. It should be called before loading or
printing a label in order to make sure that the host software is synchronized with the printer. A
status byte from the printer is as follows
43
Command Manual
11. Configuration/Control Commands
The following section covers a set of commands to configure and query printer parameters and perform
various printer control functions. For example, this set of commands include querying printer’s baud rate
or setting the specified value of baud rate. This set of commands is referred to as the set/get/do
command.
A. Command Format
3. setvar command
This command are used to configure printer operating parameters to specified values.
Format setvar “{parameter name}”
{parameter name}” Please refer to the parameter list below.
4. getvar command
The getvar command is used to get the current value of printer parameter.
Format getvar “{parameter name}” “{value}”
{parameter name}” Please refer to the parameter list below.
{value} The customized value
5. do command
The do command can be used to instruct the printer to the specified parameter
Format Do “{parameter name}”
{parameter name}” Please refer to the parameter list below.
6. Usage
This set/get/do command is used in combination with “U1” Command
Format ! U1 setvar “{parameter name}”
! U1 getvar “{parameter name}” “{value}”
! U1 do “{parameter name}”
B. Commands/Parameters
parameter command value description
Application Parameters
appl.date getvar Printer’s application date
appl.name getvar Printer’s application name
appl.version getvar Printer’s application version
Bluetooth Parameters
bluetooth.address getvar Bluetooth device address
bluetooth.authentication getvar This parameter sets Bluetooth authentication mode and
works in combination with the
setvar “off”
“bluetooth.bluetooth_pin”
“default”
parameter.
“setpin”
default “off”
bluetooth.bluetooth_pin setvar text string This parameter is used to connect to the printer only
up to 10 when the “bluetooth.authentication” parameter is set to
44
Command Manual
characters “setpin”. This parameter is not used when the
“bluetooth.authentication” parameter is set to “default”
or “off”. See “bluetooth.authentication”.
bluetooth.date getvar This parameter is the release date of the Bluetooth
module.
bluetooth.discoverable getvar This parameter sets the Bluetooth discoverable mode
setvar “on”
default “on”
“off”
bluetooth.friendly_name getvar This parameter sets the friendly_name, which is part of
setvar any srring the local_name used during service discovery and also
bluetooth.local_name getvar This parameter is the local name that will be provided
during service discovery. It is a combination of the
printer model name and the friendly_name
bluetooth.version getcar This parameter is the Bluetooth library version number
setvar “9600”
“19200” default “19200”
“38400”
“57600”
“115200”
comm.stop_bits getvar Printer’s comm. port stop bits
setvar “1”
default “1”
“2”
Device Parameters
device.friendly_name getvar This parameter refers to the device’s friendly name. The
printer will report its serial number as friendly name if a
setvar A string of
name has not been assigned to it yet.
Up to 16
characters
device.reset do Instructs the printer to perform a soft reset.
device.languages getvar This parameter sets the programming language
recognized by the printer.
device.restore_defaults do Instructs the printer to restore factory default values for
the specified category of parameters.
File Parameters
file.delete do This command can be used to delete printer files.
file.dir getvar This parameter refers to the printer file directory
file.print do This command can be used to print the contents of
45
Command Manual
printer files.
file.rename do This command can be used to rename printer files.
file.run do This command can be used to execute a batch file or
label file stored in the printer’s file system.
file.type do This command can be used to retrieve contents of a
file.
default “off”
media.width_sense.in_mm getvar This parameter returns the current media width
installed in the printer measured in millimeters. The
“media.width_sense.enable” parameter must be set to
“on”.
media.width_sense.in_cm getvar This parameter returns the current media width
installed in the printer measured in centimeters. The
“media.width_sense.enable” parameter must be set to
“on”.
media.width_sense.in_dots getvar This parameter returns the current media width
installed in the printer measured in dots. The
“media.width_sense.enable” parameter must be set to
“on”.
media.width_sense.in_inches getvar This parameter returns the current media width
installed in the printer measured in inches. The
“media.width_sense.enable” parameter must be set to
“on”.
Media Parameters
default “16”
media.type getvar This parameter refers to the media type that is being
setvar “label” used.
46
Command Manual
“journal”
default “label”
Memory Parameters
Odometer Parameters
odometer.label_dot_length getvar Reports the length of the last label printed (or fed), in
dots. The label dot-length is set to zero when the
printer is turned on. This parameter is updated every
time the printer feeds or prints a label and detects a
marker, either gap or bar, while printing or feeding.
odometer.latch_open_count getvar This parameter refers to the number of times the
setvar “0” printer’s latch has been opened. The latch open count
default “0”
odometer.media_marker_count getvar This parameter refers to the media marker count. The
media marker counter keeps track of how many labels
have passed through the printer, (if they have been
printed or not) by counting the bar sense marks on the
back of the media.
odometer.user_label_count getvar This parameter refers to the user label count. The user
setvar “0” label counter keeps track of how many labels have been
~ printed.since the last re-set of the counter. The user’s
“65535” label count can be set to an initial value and
ncremented every time a label is printed.
default “0”
Power Parameters
setvar “0”
~ A value of “0” disables inactivity timeout
power.low_battery_timeout getvar This parameter refers to the low battery timeout. When
47
Command Manual
setvar “0” the printer reaches the low battery state this timeout
~ will become active. The printer will shut down after the
“65535” specified low battery time out
USB Parameters
48
Command Manual
GAP-SENSE & BAR-SENSE Commands
These commands are used to instruct the printer as to which means of top-of-form detection should be employed.
Printers default to GAP-SENSE if no command is specified.
Format {command}
Command & option
{command} GAP-SENSE # (0-255)
BAR-SENSE
Gap Sense commands can be followed by a number to adjust sensitivity
! UTILITIES
BAR-SENSE
PRINT
49