08 ESC % n Select/Cancel user-defined character set
09 ESC & Define user-defined characters
10 ESC * Select bit-image mode
11 ESC - n Turn underline mode on/off
12 ESC 2 Select default line spacing
13 ESC 3 n Set line spacing
14 ESC < Return home
15 ESC ? n Cancel user-defined characters
16 ESC @ Initialize printer
17 ESC D [n]k NUL Set horizontal tab position
18 ESC E n Turn emphasized mode on/off
19 ESC G n Turn double-strike mode on/off
20 ESC J n Print and feed paper
21 ESC K n Print and reverse feed paper
22 ESC M n Select an character font
23 ESC R n Select an international character set
24 ESC U n Turn unidirectional print mode on/off
25 ESC a n Select justification mode
26 ESC c 5 n Enable/Disable panel button
27 ESC d n Print and feed n lines
28 ESC e n Print and reverse feed n lines
29 ESC p m t1 t2 Generate pulse for drawer
30 ESC r n Select print color (#)
31 ESC t n Select character code table
32 ESC { n Turn upside-down printing mode on/off
33 GS ( A pL pH n m Hexadecimal Dumping mode
34 GS V m GS V m n Select cut mode and cut paper
35 GS a n Enable/Disable Automatic status back
36 GS r n Transmit status
37 GS z 0 t1 t2 Set on-line recovery wait time
38 FS ! n Set Kanji character font mode
39 FS & Select Kanji character mode
40 FS - n Select/Cancel Kanji character underline mode
41 FS . Cancel Kanji characters mode
42 FS 2 c1 c2 d1...dk Define user-defined Kanji characters
43 FS ? c1 c2 Cancel user-defined Kanji characters
44 FS S n1 n2 Set Kanji characters spacing
45 FS W n Select/Cancel Kanji character double and
quadruple-size print
46
GS ( F pL pH a m nL nH
Set the offset of black mark position
47 GS FF Feed paper to the black mark position
48 ESC ^ n Set reverse feed length (*)
49 ESC ~ nL nH Set length of the receipt (*)
50 ESC DEL Feed paper to the end of receipt (*)
51 GS < Reset print head and feed black-mark paper to
the start position
52 ESC 0E9H Print start code (*)
53 ESC } Print end code (*)
2. COMMANDS
2 . 1 Command Notation
X X X X
Name] The name of the command.
[
Format] The code sequence.
[
Range] Gives the allowable ranges for the arguments.
[
Description] Describes the command’s function.
[
Notes] Provides important information on setting and using the printer command, if necessary.
[
Details] Describes the usage of the command in detail.
[
[Default] Gives the default values, if any, for the command parameters.
Reference] Lists related commands.
[
Example] Gives examples of how to use the command.
[
ASCII indicates the American Standard Code for Information Interchange
Hex indicates the hexadecimal equivalents.
Decimal indicates the decimal equivalents.
[ ]k indicates the contents of the bracket [ ] should be repeated k times.
2. 2 Explanation of Terms
(1) Receive buffer
The receive buffer is a buffer that stores, as is, the data received from the host (the reception
data). The reception data is stored in the receive buffer temporarily, and is then processed
sequentially.
(2) Print buffer
The print buffer is a buffer that stores the image data to be printed.
(3) Print buffer full
This is the state where the print buffer is full. If new print data is input while the print buffer is
full, the data in the print buffer is printed out and a line feed is executed. This is the same
operation as the LF command operation.
(4) Start of line
The start of line state satisfies the following condition:
• There is no print data (including spaces and portions of data skipped due to bit image data)
currently in the print buffer.
(5) Printable area
The maximum range of print area under the printer’s specifications. The max print area of the
printer is 400/160 inch.
(6) Ignore
The state in which all codes, including parameters, are read in and discarded, and nothing
happens.
(7) Invalidation
The state in which command codes are read in and discarded, and parameters are processed
as normal data.
(8) Inch
A unit of length. One inch is 25.4 mm.
(9) MSB
Most Significant Bit
(10) LSB
Least Significant Bit
2. 3 Control Commands
1.HT
[Name] Horizontal Tab
[Format] ASCII HT
Hex 09
Decimal 10
[Description] Moves the print position to the next horizontal tab position.
[Details] • This command is ignored unless the next horizontal tab position has been set.
• If the next horizontal tab position exceeds the printing area, the printer sets the printing
position to [Printing area width + 1].
• Horizontal tab positions are set with ESC D.
• The default setting of the horizontal tab position for the paper roll is font B (9 X 9) every 8
characters (9th, 17th, 25th, ... column).
[Reference] ESC D
2.LF
[Name] Print and line feed
[Format] ASCII LF
Hex 0A
Decimal 10
[
Description] Prints the data in the print buffer and feeds one line based on the current line
[Detail] This command sets the print position to the beginning of the line.
[Reference] ESC 2,ESC 3
3.CR
[Name] Print and carriage return
[Format] ASCII CR
Hex 0D
Decimal 13
Description] Print out the data in the print buffer but do not feed paper.
[
[Detail] Sets the print starting position to the beginning of the line.
[Reference] LF
4.DLE EOT n
[Name] Real-time status transmission
[Format] ASCII DLE EOT n
Hex 10 04 n
Decimal 16 4 n
[Range] 1 ≤ n ≤ 4
[Description] Transmits the selected printer status specified by n in real-time, according to the
following parameters:
n = 1: Transmit printer status
n = 2: Transmit off-line status
n = 3: Transmit error status
n = 4: Transmit paper roll sensor status
[Details] • In sending status, printer sends a byte without validation of DSR signal.
• This command is executed even when the printer is off-line, the receive buffer is full, or
there is an error status with a serial interface model.
• With a parallel interface model, this command can not be executed when the printer is
busy.
• When use GS a to enable Automatic Status Back (ASB), the status transmitted by DLE EOT and the ASB status must be differentiated by using the table in Appendix D.
• This command is valid even when the printer is disabled with ESC = (Select peripheral
device).
• This command is being processed as soon as received by the printer.
[Note] • The status is transmitted whenever the data sequence of <10>H<04>H<n>(1 n 4)
is received.
Example:
In ESC m nL nH d1...dk, d1=<10>H, d2=<04>H, d3=<01>H
• This command should not be used within the data sequence of another command
that consists of 2 or more bytes.
Example:
If you attempt to transmit ESC 3 n to the printer, but DTR (DSR for the host
computer) goes to MARK before n is transmitted and then DLE EOT 3 interrupts
before n is received, the code <10>H for DLE EOT 3 is processed as the code for
ESC 3 <10>H.
n = 1: Printer Status
Bit 0/1 Hex Decimal Function
0 0 00 0 Fixed to Off.
1 1 02 2 Fixed to On.
2 0 00 0 Drawer open
1 04 4 Drawer close
3 0 00 0 On-line
1 08 8 Off-line
4 1 10 16 Fixed to On.
5 0 00 00 Recover until on-line
1 20 32 Wait for on-line recover
6 -- -- -- Undefined.
7 0 00 00 Fixed to Off.
n = 2: Off-line Status
Bit 0/1 Hex Decimal Function
0 0 00 0 Fixed to Off.
1 1 02 2 Fixed to On.
2 0 00 0 Top cover close
1 04 4 Top cover open
3 0 00 0 Paper is not being fed by
using the FEED button.
1 08 8 Paper is beging fed by the
FEED button.
4 1 10 16 Fixed to On.
5 0 00 0 No shortage of paper
1 20 32 Shortage of paper
6 0 00 0 No error
1 40 64 Error occurs
7 0 00 0 Fixed to Off.
n = 3: Error Status
Bit 0/1 Hex Decimal Function
0 0 00 0 Fixed to Off.
1 1 02 2 Fixed to On.
2 --- --- Undefined.
3 0 00 0 No auto-cutter error.
1 08 8 Auto-cutter error occurs.
4 1 10 16 Fixed to On.
5 0 00 0 No unrecoverable error.
1 20 32 Unrecoverable error occurs.
6 0 00 0 Temperature and voltage of
print head is normal
1 40 64 Temperature and voltage of
print head is over range
7 0 00 0 Fixed to Off.
n = 4: Feed Status
Bit 1/0 Hex Decimal Function
0 0 00 0 Fixed to Off.
1 1 02 2 Fixed to On.
2,3 0 00 0 Roll paper near-end sensor:
paper adequate.
1 0C 12 Roll paper near-end sensor:
paper near end.
4 1 10 16 Fixed to On.
5,6 0 00 0 Paper present.
1 60 96 Paper not present.
7 0 00 0 Fixed to Off.
5.DLE ENQ n
[Name] Send real-time request to printer
[Format] ASCII DLE ENQ n
Hex 10 05 n
Decimal 16 5 n
[Range] n = 0,n = 2
[Description] Responds to a request from the host computer.
n = 0: Recover from an error;
n = 2: Recover from an error after clearing the receive and print buffers;
[Details] • The command n=0 is ignored unless the error caused by paper shortage has
occurred.
• The command n=2 is effective only when a mechanical error or an auto-cutter error
occurs.
• The printer starts processing data upon receiving this command.
• This command is executed even when the printer is off-line, the receive buffer is full,
or there is an error status with a serial interface model. With a parallel interface
model, this command can not be executed when the printer is busy.
• DLE ENQ 2 enables the printer to recover from an error after clearing the data in the
receive buffer and the print buffer. The printer retains the settings (by ESC !, ESC 3,
etc.) that were in effect when the error occurred. The printer can be initialized
completely by using this command and ESC @. This command is enabled only for
errors that have the possibility of recovery, except for print head temperature error.
• When the printer is disabled with ESC = (Select peripheral device), the error recovery
functions (DLE ENQ 1 and DLE ENQ 2) are enabled, and the other functions are
disabled.
[Note] • ESC * m nL nH [ d ] nL + 2 5 6 nH d1=<10>H d2=<05>H d3=<1>HThe
status is also transmitted whenever the data sequence of <10>H<05>H< n>(1 n
• This command should not be contained within another command that consists of two
or more bytes.
Example:
If you attempt to transmit ESC 3 n to the printer, but DTR (DSR for the host
computer) goes to MARK before n is transmitted, and DLE ENQ 2 interrupts
before n is received, the code <10>H for DLE ENQ 2 is processed as the code
for ESC 3 <10>H.
[Reference] DLE EOT,GS z 0
6.ESC SP n
[Name] Set right-side character spac ing
[Format] ASCII ESC SP n
Hex 1B 20 n
Decimal 27 32 n
[Range] 0 ≤n ≤255
[Description] Sets the character spacing for the right side of the character to [n × 0.159mm {1/160inch}]
[Details] • The right-side character spacing for double-width mode is twice the normal value. When
characters are enlarged, the right-side character spacing is n times normal value.
[Default] n = 0
7.ESC ! n
[Name] Select print mode(s)
[Format] ASCII ESC ! n
Hex 1B 21 n
Decimal 27 33 n
[Range] 0 ≤n ≤255
[Description] Selects print mode(s) using n as follows:
Bit 1/0 Hex Decimal Function
0 00 0 Character font A (9 x 9)
0
1 01 1 Character font B (7 x 9)
1,2 --- --- Undefined.
0 00 0 Emphasized mode not selected.
3
1 08 8 Emphasized mode selected.
0 00 0 Double-height mode not selected.
4
1 10 16 Double-height mode selected.
5 0 00 0 Double-width mode not selected.
1 20 32 Double-width mode selected.
6 --- --- Undefined.
0 00 0 Underline mode not selected.
7
1 80 128 Underline mode selected.
[Details] • When both double-height and double-width modes are selected, quadruple size
characters are printed.
• The printer can underline all characters, but can not underline the space set by HT or 90°
clockwise rotated characters.
• The underline mode set by this command do not affect the Kanji character print mode,
which is set by HT command.
[Default] n = 1
[Reference] ESC –,ESC E
8.ESC % n
[Name] Select/cancel user-defined character set
[Format] ASCII ESC % n
Hex 1B 25 n
Decimal 27 37 n
[Range] 0 ≤n ≤255
[Description] Selects or cancels the user-defined character set.
• When the LSB of n is 0, the user-defined character set is canceled, and the built-in
character set is automatically selected.
• When the LSB of n is 1, the user-defined character set is selected.
[Details] • n is available only for the least significant bit.
• When the user-defined character set is canceled, the internal character set is
automatically selected.
[Default] n = 0
[Reference] ESC &,ESC ?
9.ESC & y c1 c2 [ x1 d1 . . . d ( y× x 1 ) ] . . . [ x k d 1 . . . d ( y× x k ) ]
[Name] Define user-defined characters
Hex 1B 26 y c1 c2 [x1 d1...d(y×x1)]...[xk d1... d(y×xk)]
Decimal 27 38 y c1 c2 [x1 d1...d(y×x1)]...[xk d1... d(y×xk)]
[Range] y = 2
32 ≤c1 ≤c2≤126
0 ≤x ≤12 Font A (9 x 9)
0 ≤x≤9 Font B(7 x 9)
0 ≤d1 ... d(y x x) ≤255
[Description] Defines user-defined characters.
• y specifies the number of bytes in the vertical direction.
• c1 specifies the beginning character code for the definition, and c2 specifies the final
code.
• x specifies the number of dots in the horizontal direction.
[Details] • The allowable character code range is from ASCII code <20>H to <7E>H (95
characters).
• It is possible to define multiple characters for consecutive character codes. If only one
character is desired, use c1 = c2.
• d is the dot data for the characters. The dot pattern is in the horizontal direction from the
left side. Any remaining dots on the right side are blank.
• The data to define a user-defined character is (y ╳ x) bytes.
• Set a corresponding bit to 1 to print a dot or 0 to not print a dot.
• This command can define different user-defined character patterns by each fonts. To
select a font, use ESC !
• The user-defined character definition is cleared when:
1) ESC @ is executed.
2) ESC ? is executed.
3) The printer is reset or the power is turned off.
• The max number of characters is 8.
• When the maximum number of user-defined characters is defined, it is possible to
redefine user-defined characters for the defined ASCII code, but not for the new