Miscellaneous Commands (continued)
ESC p m t1 t2
Outputs pulse to Drawer kick-out port.
m = 0, "0": connector pin 2, m = 1, "1": connector pin 5
t1: on time (×2ms), t2: off time (×2ms)
DLE DC4 1 m t fn=1 RT
Outputs pulse to Drawer kick-out port in real-time.
m = 0: connector pin 2, m = 1: connector pin 5
t = 1–8: On time / Off time (×100 ms)
GS ( H 6 0 48 48 d1 d2 d3 d4 fn=48
Transmits process ID specified by (d1, d2, d3, d4) after
execution of prior print or command.
d=32–126: visible character
Send data: 55 + 34 + d1 + d2 + d3 + d4 + NUL
GS I n Transmits printer ID or printer information.
2: supported Multi-byte character
3: not supported
"=#0"+NUL: normal mode
"=#1"+NUL: 42 column mode
95+strings+NUL
depends on firmware
95+Serial number (10 bytes)+NUL
additional fonts
depends on printers
GS g 0 0 nL nH
Initialize resettable maintenance counter.
Number of head energizations
Number of lines fed (after the print
head was replaced)
Number of autocutter operations
Duration of printer operation
GS g 2 0 nL nH
Transmits value of resettable or cumulative maintenance
counter.
counter unit
Number of head energizations
Number of lines fed (after the
lines 22 150
Number of autocutter operations
Duration of printer operation
Send data: 95 + Value + NUL
Value: "0"–"9999999999" (1–10 bytes length)
GS ( K 2 0 50 m fn=50
Selects print speed.
m = 0, "0": speed customized by GS ( E (fn = 5, a = 6)
m = 1–13 (slow–fast)
Miscellaneous Commands (continued)
ESC ( A 3 0 97 n c fn=97
Sounds optional external buzzer.
n specifies the sound pattern. (n = 1–7)
c specifies the repeat times. (c = 0: infinitely)
DLE DC4 3 0 0 0 1 0 fn=3 RT
Stops sounding optional external buzzer and transmits 4
bytes: 55, 84, 64, 0.
DLE DC4 2 1 8 fn=2 RT
Executes printer power-off sequence and transmits 3
bytes: 59, 48, 0.
DLE DC4 8 1 3 20 1 6 2 8 fn=8 RT
Clears both receive and print buffers, and transmits 3
bytes: 55, 37, 0, as the Clear response.
Page Mode Commands
• Page mode is a free layout mode. Any print data can be put in any place on the
print area and be printed by FF or ESC FF command.
ESC L Switches from standard mode to page mode.
ESC S Switches from page mode to standard mode.
FF Prints all data and switches from page mode to standard
mode.
ESC FF Prints all data in page mode. After printing, the printer
does not clear the buffered data, the print position, and
values set by other commands.
ESC W xL xH yL yH dxL dxH dyL dyH
Sets the print area size and the logical origin in page
mode.
xL + xH×256, yL + yH×256: position of the logical origin
dxL + dxH×256: width of the print area
dyL + dyH×256: height of the print area
ESC T n Selects the print direction and the starting position in
page mode.
n print direction starting position
0, "0" left to right upper left
1, "1" bottom to top lower left
2, "2" right to left lower right
3, "3" top to bottom upper right
GS $ nL nH
In page mode, moves the vertical print position from the
starting position set by ESC T.
nL + nH×256: absolute print position
GS \ nL nH
In page mode, moves the vertical print position from the
current position.
nL + nH×256: relative print position (-32,768–32,767)
CAN Cancels print data in page mode.
Other Commands
• For details, refer to TM-T20 product specification or ESC/POS Application
Programming Guide for Paper Roll Printers.
• OC : obsolete command
Character Commands
ESC !
Selects character font and styles.
Miscellaneous Commands
GS P
Sets horizontal and vertical motion units.
GS ( A Executes test print.
Bit Image Commands
GS v 0 Prints raster bit image OC
NV Bit Image Commands
FS q Defines NV bit image in NV graphics area. OC
FS p Prints NV bit image defined by FS q. OC
Downloaded Bit Image Commands
GS ∗ Defines downloaded bit image. OC
GS / Prints downloaded bit image defined by GS ∗ OC
Status Commands
ESC u Transmits peripheral device status as 1 byte. OC
ESC v Transmits status of paper sensor as 1 byte. OC
Mechanism Control Commands
ESC i Executes paper cut. OC
ESC m Executes paper cut. OC
Customize Commands
FS g 1 Writes data to NV user memory. OC
FS g 2 Transmits data in NV user memory. OC
User Setup Commands
GS ( E
(fn=1) Enters User setting mode and transmits the mode
change notice.
GS ( E (fn=2) Ends User setting mode and performs software
reset.
GS ( E (fn=3) Sets memory switch setting values.
GS ( E (fn=4) Transmits memory switch setting values.
GS ( E (fn=5) Sets customized setting values.
GS ( E (fn=6) Transmits customized setting value.
GS ( E (fn=11) Sets configuration item for serial interface.
GS ( E (fn=12) Transmits configuration value.
GS ( E (fn=15) Selects configuration item: Class of USB interface.
GS ( E (fn=16) Transmits configuration value for Class of USB
interface.