Download Print this page
Epson TM-T20 Quick Reference Manual
Epson TM-T20 Quick Reference Manual

Epson TM-T20 Quick Reference Manual

Esc/pos
Hide thumbs Also See for TM-T20:

Advertisement

ESC/POS Quick Reference
ESC/POS
®
Command System
EPSON ESC/POS is a proprietary POS printer command system based on the
escape sequence and includes patented or patent pending commands. ESC/POS is
compatible with most type of EPSON POS printers and displays.
ESC/POS is designed to reduce the processing load on the host computer in POS
environments. It comprises a set of highly functional and efficient commands and
also offers the flexibility to easily make future upgrades.
Aim of the Quick Reference
Quick Reference is a guide to using ESC/POS command to control the printer.
Command Notation
RT
: real-time command (executed as soon as received)
fn=
: function number of the command
Numbers are written in decimal numeral.
n specifies 1 byte parameter in the range 0–255.
• n
, n
specify 1 word (2 bytes) parameter as (n
L
H
0–65,535.
pL, pH specify the number of parameters after pH as (pL+pH×256) in the range
1–65,535
p1, p2, p3, p4 specify the number of parameters after p4 as
(p1+p2×256+p3×65,536+p4×16,777,216) in the rage 1–4,294,967,295.
kc1, kc2 specify key code (2 bytes) of NV graphics or download graphics. Each
range of kc1 and kc2 is 32–126.
Control codes are as follows:
name
code
NUL
0
EOT
4
ENQ
5
HT
9
LF
10
FF
12
CR
13
DLE
16
DC4
20
CAN
24
ESC
27
FS
28
GS
29
No part of this document may be reproduced, stored in a retrieval system, or transmitted in any form
or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of Seiko Epson Corporation.
The contents of this document are subject to change without notice. Please contact us for the latest
information.
While every precaution has been taken in the preparation of this document, Seiko Epson Corporation
assumes no responsibility for errors or omissions.
Neither is any liability assumed for damages resulting from the use of the information contained
herein.
Neither Seiko Epson Corporation nor its affiliates shall be liable to the purchaser of this product or
third parties for damages, losses, costs, or expenses incurred by the purchaser or third parties as a
result of: accident, misuse, or abuse of this product or unauthorized modifications, repairs, or
alterations to this product, or (excluding the U.S.) failure to strictly comply with Seiko Epson
Corporation's operating and maintenance instructions.
Seiko Epson Corporation shall not be liable against any damages or problems arising from the use of
any options or any consumable products other than those designated as Original EPSON Products or
EPSON Approved Products by Seiko Epson Corporation.
EPSON and ESC/POS are registered trademarks of Seiko Epson Corporation in Japan and other
countries/regions.
Copyright© 2012 Seiko Epson Corporation. All rights reserved.
Print Commands
In page mode, these commands only move the print position and do not execute
actual printing.
LF
CR
ESC J n
ESC d n
Line Spacing Commands
ESC 2
ESC 3 n
Character Commands
ESC SP n
+ n×256) in the range
L
ESC
n
ESC E n
ESC G n
ESC M n
GS ! n
GS b n
GS B n
ESC { n
ESC V n
ESC & 3 c1 c2 [x1 d1...d(3 × x1)]...[xk d1...d(3 × xk)]
ESC % n
M00051201
Prints data and feeds one line.
Functions the same as LF when auto line feed is enabled.
CR is ignored when auto line feed is disabled or when the
serial interface model is used.
Prints data and feeds paper n dots.
Prints data and feeds paper n lines.
Selects default line spacing.
Sets line spacing to n dots.
Sets right-side character spacing to n dots.
Selects underline.
n = 0: underline off, n = 1: 1-dot width, n = 2: 2-dot width
Turns emphasized character On or Off.
n = odd: On, n = even: Off
Turns double-strike character On or Off.
n = odd: On, n = even: Off
Selects a character font.
n = 0, "0": Font A, n = 1, "1": Font B
Selects character size (height/width magnification).
Upper 4 bits of n: width magnification
Lower 4 bits of n: height magnification
The both can be set 0(×1) to 7(×8)
Turns smoothing On or Off for magnified characters.
n = odd: On, n = even: Off
Turns white/black reverse print On or Off for characters.
n = odd: On, n = even: Off
Turns upside-down print mode On or Off in standard
mode.
n = odd: On, n = even: Off
Turns 90° clockwise rotation On or Off for characters in
standard mode.
n = 1, 2, "1", "2": On, n = 0, "0": Off
Defines user-defined characters for character code: c1 to
c2 of the current font.
x = width of the defined pattern
d1...d(3×x) = pattern data for a character
Selects or cancels user-defined character set.
n = odd: Select, n = even: Cancel
Character Commands (continued)
ESC ? n
Cancel the user-defined character and return the font
pattern to the resident one for the current font.
n = character code to be cleared the user-defined font
ESC t n
Selects page n from the character code table.
n
n
code table
code table
0
PC437: USA, Standard Europe
34
PC855: Cyrillic
1
Katakana
35
PC861: Icelandic
2
PC850: Multilingual
36
PC862: Hebrew
3
PC860: Portuguese
37
PC864: Arabic
4
PC863: Canadian-French
38
PC869: Greek
5
PC865: Nordic
39
ISO8859-2: Latin2
11
PC851: Greek
40
ISO8859-15: Latin9
12
PC853: Turkish
41
PC1098: Farsi
13
PC857: Turkish
42
PC1118: Lithuanian
14
PC737: Greek
43
PC1119: Lithuanian
15
ISO8859-7: Greek
44
PC1125: Ukrainian
16
WPC1252
45
WPC1250: Latin2
17
PC866: Cyrillic #2
46
WPC1251: Cyrillic
18
PC852: Latin2
47
WPC1253: Greek
19
PC858: Euro
48
WPC1254: Turkish
20
KU42: Thai
49
WPC1255: Hebrew
21
TIS11: Thai
50
WPC1256: Arabic
26
TIS18: Thai
51
WPC1257: Baltic Rim
30
TCVN-3: Vietnamese
52
WPC1258: Vietnamese
31
TCVN-3: Vietnamese
53
KZ-1048: Kazakhstan
32
PC720: Arabic
255 User-defined page
33
WPC775: Baltic Rim
ESC R n
Selects an international character set by n.
n
n
country
country
0
USA
9
Norway
1
France
10
Denmark II
2
Germany
11
Spain II
3
U.K.
12
Latin America
4
Denmark I
13
Korea
5
Sweden
14
Slovenia/ Croatia
6
Italy
15
China
7
Spain I
16
Vietnam
8
Japan
17
Arabia
Print Position Commands
HT
Moves print position to the next horizontal tab position.
ESC D n1...nk NUL
Sets tab stops at n1 to nk character columns.
GS L nL nH
Sets left margin in standard mode.
nL + nH×256: number of dots for left margin
GS W nL nH
Sets print area width in standard mode.
nL + nH×256: number of dots for print area width
ESC a n
Aligns all data in one line to the selected layout in
standard mode.
n = 0, "0": Left justification
n = 1, "1": Centering
n = 2, "2": Right justification

Advertisement

loading

Summary of Contents for Epson TM-T20

  • Page 1 Sets print area width in standard mode. Neither Seiko Epson Corporation nor its affiliates shall be liable to the purchaser of this product or Defines user-defined characters for character code: c1 to nL + nH×256: number of dots for print area width third parties for damages, losses, costs, or expenses incurred by the purchaser or third parties as a c2 of the current font.
  • Page 2 NV Graphics Commands (continued) Download Graphics Commands (continued) Print Position Commands (continued) GS ( L pL pH 48 67 48 kc1 kc2 1 xL xH yL yH 49 d1...dk GS ( L 4 0 48 80 "KC" fn=67 fn=80 ESC $ nL nH Transmits the key code list for download graphics.
  • Page 3 Logo Print Commands (continued) Two-Dimensional Code Commands (continued) Status Commands (continued) FS ( E 6 0 60 2 c "CLR" GS r n Transmits status specified by n as 1 byte after completion fn=60 of prior print or command. Clears set values in NV memory for top or bottom logo function printing.
  • Page 4 Miscellaneous Commands (continued) Other Commands Miscellaneous Commands (continued) For details, refer to TM-T20 product specification or ESC/POS Application • ESC ( A 3 0 97 n c fn=97 ESC p m t1 t2 Programming Guide for Paper Roll Printers. Sounds optional external buzzer.