41
2-inch Label Technical 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.
Follow sequence to read the CCL code:
Read CCL Code
ESC(0x1b) ‘}’(0x7d) ‘R’(0x52) ‘1’(0x31)
After the above command is issued, the printer will return the one-character CCL code.
PRINTER ESCAPE COMMANDS FORMAT
Format
{escape} {command} [parameters]
Command & option
{escape}
The ESC characte (0x1b)
{command}
Choose from the escape commands in this section
[parameters]
Parameters for the escape commands
☞
☞
☞
☞ NOTE:
NOTE:
NOTE:
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
Bit0
Status(0: ready, 1: busy)
Bit1
Paper(0: present, 1: out of paper)
Bit2
Latch(0: closed, 1: open)
Bit3
Battery Level(0: OK, 1: Low)
Bit4 ~ 7
Reserved
Bit8 ~ 11
Contrast(0 ~ 3)
Bit12 ~ 15
Reserved