The words on the left side of this screen are bookmark s for all the
topics in this guide .
Use the scroll ba r next to the bookmarks to find any topic you
want. Click a bookmark to instantly jump to its topic. (If you wish,
you can increase the size of the bookmark area by dragging the
dividing bar to the right. )
Use the zoo m tools to magnify or reduce the page display .
Click the Fin d button if you want to search for a particular term.
(However, using the bookmarks is usually quicker. )
Complete online documentation for Acrobat Reader is located in the Help directory for Acrobat Reader .
EPSON
®
Guide to
TM-L60II/L60IIP
SEIKO EPSON CORPORATION
400617700
The programming examples in this manual are provided for the sole purpose of illustrating the
functions of the products. Seiko Epson Corporation makes no warranty, either expressed or implied,
as to their reliability and appropriateness for other uses.
All rights reserved. No part of this publication 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. No patent liability is
assumed with respect to the use of the information contained herein. While every precaution has been
taken in the preparation of this book, 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 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 is a registered trademark of Seiko Epson Corporation.
ESC/POS is a trademark of Seiko Epson Corporation.
NOTI CE: The contents of this manual are subject to change without notice.
2070 Kotobuki Koaka, Matsumoto-shi, Nagano-ken 399, Japan
Introduction
ESC/POS™
The market for store automation equipment is changing rapidly with the widespread
introduction of POS (point of sale) terminals. These terminals are now appearing even in small
retail stores and specialty shops. They occupy a secure position in the range of applications
available for personal computers.
As more personal computers come to be used as POS terminals, the demand for matching
standardized peripheral devices is expected to rise. At present, however, many of the competing
POS terminal printer displays on the market employ mutually incompatible command sets. This
imposes limits on the expandability and range of applications possible with PC-based systems.
There is a need for a new command set designed to provide the expandability and universal
applicability demanded by the market.
To meet this need, Seiko Epson Corporation proposes the adoption of a newly developed
command set to standardize POS terminal peripheral devices: ESC/POS (Epson Standard Code
for Point of Sale).
The aim when developing ESC/POS was to create a set of control codes that could be used to
operate any output device connected to a POS terminal. These new codes are intended to replace
the mutually incompatible command sets previously in use.
TM/DM series models already support ESC/POS, and they have been evaluated highly in the
marketplace.
Seiko Epson Corporation plans to produce new models in the TM/DM series offering ESC/POS
support and to continue to work for the standardization of the entire POS environment to
promote the dissemination of ESC/POS.
About This Manual
❏ Chapter 1 contains a table of supported commands, descriptions of all the commands
arranged by function with program examples and print samples, and character code tables.
❏ Chapter 2 contains an example showing several commands used in a program for issuing a
coupon containing bar codes.
❏ Chapter 3 contains a table of the commands listed by function type and a table showing
which commands are supported by various EPSON printers.
Rev. Ai
Features
The TM-L60II (RS-232 serial interface) and TM-L60IIP (parallel interface) are line thermal
printers that can print on roll paper and thermal labels. The printers have the following features:
❏ Light weight and ultra-compact size.
❏ High speed printing: 12 lines per second.
❏ Low-noise thermal printing.
❏ High reliability due to few moving parts.
❏ Easy maintenance for tasks such as head cleaning.
❏ Easy paper insertion with semi-auto loading for both roll paper and labels.
❏ Label ejection commands prevent extraneous label feeding.
❏ Serial numbers can be printed on labels.
❏ Command protocol based on the ESC/POS standard.
❏ Various layouts possible using page mode.
❏ Font selection (12 × 24 or 9 × 24) possible using a command.
❏ Character extension (up to 64 times the standard size) and character smoothing.
❏ Four different print densities selectable via DIP switch settings.
❏ Four-way routing of the interface, drawer control, and power cables: on either side,
underneath, or from the back of the case.
❏ Controls on the front of the printer for easy operation, without requiring access to the sides
and back.
❏ Water-resistant operation panel.
❏ Bar code printing possible both in the vertical direction (fence bar code) and horizontal
direction (ladder bar code in page mode) using a command.
❏ Repeated operation and copy printing possible using macro definitions.
❏ Control capability for two drawers via the built-in interface.
❏ Bidirectional parallel interface based on the IEEE 1284 Nibble/Byte Modes standard.
❏ Thermal paper or thermal label can be selected via DIP switch settings.
ii Rev. A
The TM-L60II can also be used as the following:
❏ A one-station printer for ECR and POS.
❏ A ticket-issuing device.
❏ An output device for weighing and other types of measurement.
❏ A small scale label-marker for stores.
GS C 0Select counter print modeMiscellaneous function1-63
GS C 1Select count mode (A)Miscellaneous function1-64
GS C 2Set counterMiscellaneous function1-64
GS C ;Select count mode (B)Miscellaneous function1-66
GS HSelect printing position of HRI charactersBar code1-53
GS ITransmit printer IDMiscellaneous function1-59
GS LSet left marginPrint position1-32
GS PSet horizontal and vertical motion unitsMiscellaneous function1-58
GS WSet printing area widthPrint position1-32
GS \Set relative vertical print position in page modePrint position1-36
GS ^Execute macroMacro function1-55
GS aEnable/disable Automatic Status Back (ASB)Status1-41
GS bTurn smoothing mode on/offCharacter1-23
Se lect paper sensor(s) to output paper-end
signals
n
linesPrint 1-7
Paper sensor1-27
Page
number
1-2 Command DescriptionsRev. A
TM–L60II/L60IIP Information Manual
Command NameFunction type
GS cPrint c ounterMiscellaneous function1-63
GS fSet font for HRI charactersBar code1-53
GS hSelect bar code heightBar code1-49
GS kPrint bar codeBar code1-51
GS rTransmit statusStatus1-43
GS wSet bar code widthBar code1-50
Page
number
Rev. A Command Descriptions 1-3
Using Bit Value Tables
For each command that has a complex method of determining the variable n, there is a table showing
how to calculate the variable in three numbering systems: binary, hexadecimal, and decimal.
When you look at the table, first find the value of each component of the variable. Then add the
values of the components together to determine the value of the variable n.
For example, here is how you would use the table below, which sets the print mode, to combine
double height, double width, and underline. In the table, you see that bit 4 on (or hex 10 or decimal
16) turns on double height, bit 5 on (or hex 20 or decimal 32) turns on double width, and bit 7 on (or
hex 80 or decimal 128) turns on underline mode.
To combine all three, turn on bits 4, 5, and 7, which is 10110000 in binary. Or you can add the hex
values 10, 20, and 80 for the hex sum of B0, or you can add the decimal values 16, 32, and 128 for the
decimal value of 176.
Therefore, you send the following to turn on double height, double width, and underline, depending
on the numbering system used:
ASCIIESC!n
Hex1B21B0
Decimal2833176
BitOff/On HexDecimal Function
Off000Character font-A selected.
1
On011Character font-B selected.
2———Undefined.
Off000Emphasized mode not selected.
3
On088Emphasized mode selected.
Off000Double-height mode not selected.
4
On1016Double-height mode selected.
Off000Double-width mode not selected.
5
On2032Double-width mode selected.
6———Undefined.
Off000Underline mode not selected.
7
On80128Underline mode selected.
Note that the program examples throughout this chapter use decimal numbers, but binary, decimal,
and hexadecimal numbers all have the same printing results.
1-4 Command DescriptionsRev. A
TM–L60II/L60IIP Information Manual
Print Commands
The TM-L60II/L60IIP printers support the following commands for printing characters and
advancing paper:
CommandName
LFPrint and line feed
CRPrint and carriage return
ESC JPrint and feed paper
ESC dPrint and feed n lines
ESC FFPrint data in page mode
FF➀ Print and return to standard mode (in page mode)
➁ Print and feed label to print starting position (on label)
GS FFPrint and eject label
LF
[Name]Print and line feed
[Format]ASCIILF
Hex0A
Decimal10
LF prints the data in the print buffer and feeds one line. The amount of paper fed per line is based on
the value set using the line spacing command. The default setting is 1/6 inch.
When auto line feed is enabled, the CR command functions in the same way as the LF command.
When auto line feed is disabled, CR is ignored. The DIP switch setting enables or disables auto line
feed. When using the serial interface, CR is ignored.
[Range]0 ≤ n ≤ 255
ESC J n prints the data in the print buffer and feeds the paper [n× (vertical or horizontal motion unit)]
inches. This command is used to temporarily feed a specific length without changing the line spacing
set by other commands. The maximum paper feed amount is 40 inches. When standard mode is
selected, the vertical motion unit set by GS P is used. When page mode is selected, the vertical or
horizontal motion unit set by GS P is used for the print direction set by ESC T.
ESC J used to pr int one line and the n adv ance
the paper b y 100 /180 inch
1-6 Command DescriptionsRev. A
TM–L60II/L60IIP Information Manual
ESC d n
[Name]Print and feed n lines
[Format]ASCIIESCdn
Hex1B64n
Decimal27100n
[Range]0 ≤ n ≤ 255
ESC d n prints the data in the print buffer and feeds n lines. The amount of paper fed per line is based
on the value set using the line spacing command. The maximum paper feed amount is 40 inches. The
default setting of the paper feed amount is 1/6 inch.
ESC d us ed to print one line and
advance the paper by six lines
Rev. A Command Descriptions 1-7
ESC FF
[Name]Print data in page mode
[Format]ASCIIESCFF
Hex1B0C
Decimal2712
FF
[Name]➀ Print and return to standard mode (in page mode)
[Format]ASCIIFF
Hex0C
Decimal12
ESC FF prints all buffered data in the printable area collectively, in page mode. This command is
enabled only in page mode. After printing, the printer does not clear the buffered data or values set
by other commands. When the printer returns to standard mode, FF or ESC S should be executed.
FF prints the data in the print buffer collectively and returns to standard mode. The buffer data is
deleted after being printed. This command returns the values set by the ESC W command to the
default values. The value set by ESC T command is maintained. This command is enabled only in
page mode.
[Name]➁ Print and feed label to print starting position (on label)
[Format]ASCIIFF
Hex0C
Decimal12
GS FF
[Name]Print and eject label
[Format]ASCIIGSFF
Hex1D0C
Decimal2912
FF prints the data and feeds the next label to the print starting position when thermal label is selected
in standard mode.
GS FF prints the data in the print buffer and ejects the label. This command is effective only when
thermal label is selected with the paper selection DIP switch. When the printer label is advanced so
that the label can be peeled off, the PAPER LED blinks as it waits for the PAPER FEED switch to be
pressed. When the PAPER FEED switch is pressed, the next label is fed to the print start position. After
advancing the label, the line moves to the print start position.
This command is only effective when thermal label is selected with the paper selection DIP switch,
and is enabled only in standard mode.
Program ExamplePrint Sample
PRINT #1, "AAAAA"; CHR$(&HA);AAAAA
PR IN T #1, "BBBBB"; CH R$(&H1D);CHR$(&HC);BB BBB
PR IN T #1, "CCCCC"; CH R$(&HA) ;
CC CCC
Rev. A Command Descriptions 1-9
Line Spacing Commands
The TM-L60II/L60IIP printers support the following commands for setting line spacing. These
commands only set the line spacing; they do not actually advance the paper. The line spacing set
using these commands affects the results of the LF and ESC d commands. The paper is advanced
using the paper feed button (PAPER FEED).
CommandName
ESC 2Select default line spacing
ESC 3Set line spacing
ESC 2
[Name]Select default line spacing
[Format]ASCIIESC2
Hex1B32
Decimal2750
ESC 3 n
[Name]Set line spacing
[Format]ASCIIESC3n
Hex1B33n
Decimal2751n
[Range]0 ≤ n ≤ 255
ESC 2 sets the line spacing to 1/6 inch. This is equivalent to 30 dots.
ESC 3 n sets the line spacing to [n× (vertical or horizontal motion unit)] inches. The default setting of
the paper feed amount is 1/6 inch (n=60). The maximum line spacing amount is 40 inches. When
standard mode is selected, the vertical motion unit set by GS P is used. When page mode is selected,
the vertical or horizontal motion unit set by GS P is used for the print direction set by ESC T.
Program Ex amplePrint Sample
PRINT #1, CHR$(&H1D);"P";CHR$(180);CHR$(180);
FOR n=25 TO 50 STEP 5
PRINT #1, CHR$(&H1B);"3";CHR$(n); ← S et line spacing
PR INT #1, "AAAAA"; CHR $(&HA);
NEXT n
PRINT #1, CHR$(&H1B);"2"; ← Set defa ult line spacing
PRINT #1, "BBBBB"; CHR$(&HA);
PRINT #1, "CCCCC"; CHR$(&HA);
AAAAA
AAAAA
AAAAA
AAAAA
AAAAA
AAAAA
BBBBB
CCCCC
25/180-i nch ( 25-dot) line spacing
30/180-i nch ( 30-dot) line spacing
35/180-i nch ( 35-dot) line spacing
40/180-i nch ( 40-dot) line spacing
45/180-i nch ( 45-dot) line spacing
50/180-i nch ( 50-dot) line spacing
1/6-inch (30- dot) line spacing
1-10 Command DescriptionsRev. A
TM–L60II/L60IIP Information Manual
Character Commands
The TM-L60II/L60IIP supports the following commands for setting character font and size.
CommandName
ESC SPSet right-side character spacing
ESC %Select/cancel user-defined character set
ESC &Define user-defined characters
ESC ?Cancel user-defined characters
ESC RSelect an international character set
ESC tSelect character code table
ESC !Select print mode(s)
ESC –Turn underline mode on/off
ESC ETurn emphasized mode on/off
ESC GTurn double-strike mode on/off
ESC {Turn upside-down printing mode on/off
ESC VTurn 90° clockwise rotation mode on/off
GS !Set character size
GS BTurn white/black reverse printing mode on/off
GS bTurn smoothing mode on/off
CANCancel print data in page mode
Rev. A Command Descriptions 1-11
ESC SP n
[Name]Set right-side character spacing
[Format]ASCIIESCSPn
Hex1B20n
Decimal2732n
[Range]0 ≤ n ≤ 255ESC SP n sets the right-side character spacing in [n× (vertical or horizontal motion unit)] inches. It is
used to change the spacing between characters. The default setting is n=0. When standard mode is
selected, the horizontal motion unit set by GS P is used. When page mode is selected, the vertical or
horizontal motion unit set by GS P is used for the print direction set by ESC T.
Program ExamplePrint Sample
PRINT #1, CHR$(&H1D);"P";CHR$(180);CHR$(180);
PRINT #1, CHR$(&H1B);" ";CHR$(0);← Character spacing set to 0
PRINT #1, "AAAAA "; CHR$(&HA);
PRINT #1, CHR$(&H1B);" ";CHR$ (6);← Character spacing s et to 6
PRINT #1, "BBBBB "; CHR$(&HA);
PRINT #1, CHR$(&H1B);" ";CHR$ (12);← Charac ter spacing set to 12
PRINT #1, "CCCCC "; CHR$(&HA);
AAAAA ← 0-inch right- side chara cter spaci ng
BB BB B ← 6/180-inch r ight- side character spacing
CCCCC ← 12/180-i nch right- side chara cter spaci ng
1-12 Command DescriptionsRev. A
TM–L60II/L60IIP Information Manual
ESC % n
[Name]Select/cancel user-defined character set
[Format]ASCIIESC%n
Hex1B25n
Decimal2737n
[Range]0 ≤ n ≤ 255(Only the least significant bit of n is enabled.)
ESC % n selects or cancels the user-defined character set. When the LSB (least significant bit) of n is 1,
the user-defined character set is selected. When it is 0, the internal character set is selected; this is the
default setting.
ESC & y c1 c2 [x1 d1 ... d(y ×x1)] ... [xk d1 ... d(y × xk)] defines user-defined characters from character
code c1 to c2. y and x are the configuration of a user-defined character. y specifies the number of
bytes in the vertical direction. x specifies the number of dots in the horizontal direction. Character
code range from ASCII code 20H (32) to 7EH (126) can be defined by c1 and c2. Data (d) specifies a bit
printed to 1 and not printed to 0. At the default, user-defined characters are not defined and the
internal character set is printed. Once the user-defined characters have been defined, they are
available until ESC @, ESC ?, or GS
✻ is executed; the user-defined characters are redefined; the
power is turned off; or the printer is reset. The downloaded bit image is canceled.
Rev. A Command Descriptions 1-13
ESC ? n cancels the user-defined characters defined for the character code n. After the user-defined
characters are canceled, the internal character set is printed.
P rogra m Ex ample
y=3
PRINT #1, CHR$(&H1B);"&";CHR$(y);"AC";
x=9: PRINT #1, CHR$(x );
FOR i=1 TO y*x
READ d: PRINT #1, CHR$(d );
NEX T i
x=11: PRINT #1, CHR$(x);
FOR i=1 TO y*x
READ d: PRINT #1, CHR$(d );
NEX T i
x=12: PRINT #1, CHR$(x);
FOR i=1 TO y*x
READ d: PRINT #1, CHR$(d);
NEX T i
PRINT #1, CHR$(&H1B);"%";CHR$(0); ← Select the internal chara cter set
PRINT #1, "A B C D E"; CHR$(&HA);
PRINT #1, CHR$(&H1B);"%";CHR$(1); ←Sele ct the user-defined charac ter s et
PRINT #1, "A B C D E"; CHR$(&HA):
PRINT #1, CHR$(&H1B);"?";"A"; ← Canc el the user-defined chara cter set
PRINT #1, "A B C D E"; CHR$(&HA);
Defines the
user-de fined
charact ers as
"A", "B ", and "C"
DAT A &H0 0,&H20,&H00, &H00,&H20,&H00,&H 00,&H7 0
DAT A &H0 0,&H00,&HF8, &H00,&H07,&HFF,&H 00,&H0 0
DAT A &HF 8,&H00,&H00, &H70,&H00,&H00,&H 20,&H0 0
DAT A &H0 0,&H20,&H00
DAT A &H0 0,&H20,&H00, &H00,$HF8,&H00,&H 03,&H8 E
DAT A &H0 0,&H0E,&H03, &H80,&H38,&H00,&H E0,&HE 0
DAT A &H0 0,&H38,&H38, &H00,&HE0,&H0E,&H 03,&H8 0
DAT A &H0 3,&H8E,&H00, &H00,&HF8,&H00,&H 00,&H2 0
DAT A &H0 0
DAT A &H0 0,&H30,&H00, &H00,&HF0,&H00,&H 03,&HF 0
DAT A &H0 0,&H0F,&H3F, &HF8,&H3C,&H3F,&H F8,&HF 0
DAT A &H0 0,&H18,&HF0, &H00,&H18,&H3C,&H 3F,&HF 8
DAT A &H0 F,&H3F,&HF8, &H03,&HF0,&H00,&H 00,&HF 0
DAT A &H0 0,&H00,&H30, &H00
Print Samp le
ABCDE ← Characters from internal cha racte r set
♦ ◊ ↑ DE ← Charac ters from user-def ined character set
A ◊ ↑ DE ← Character s from user-defined chara cter set (1 character ca nceled)
1-14 Command DescriptionsRev. A
TM–L60II/L60IIP Information Manual
ESC R n
[Name]Select an international character set
[Format]ASCIIESCRn
Hex1B52n
Decimal2782n
[Range]0 ≤ n ≤ 10
ESC R n selects an international character set n as follows. The default value is U.S.A. (n=0).
n Country
0U.S.A.
1France
2Germany
3U.K.
4Denmark I
5Sweden
6Italy
7Spain
8Japan
9Norway
10Denmark II
[Name]Select character code table
[Format]ASCIIESCtn
Hex1B74n
Decimal27116n
[Range]0 ≤ n ≤ 5, n = 255
ESC t n selects a page n from the character code table as follows. The alphanumeric characters [20H
(decimal 32) to 7FH (decimal 127)] are the same for each page. The graphic characters [80H (decimal
128) to FFH (decimal 255)] are different for each page. The default setting is page 0.
AA: N ormal
BB: E mphasized
CC: D ouble-height
DD: E mphasized + Double-height
EE: D ouble-width
FF: E mphasized + Double-width
GG: D ouble-height + Double-wid th
HH: E mphasized + Double-height + Do uble-width
ESC – n turns underline mode on or off. When n=1 or 49, underline mode (one-dot width) is turned
on; when n=2 or 50, underline mode (two-dot width) is turned on; and when n=0 or 48, underline
mode is turned off. The underline mode is on, 90° clockwise rotated characters and white/black
inverted characters cannot be underlined. The default setting is n=0.
Program E xampleP rint Sample
PRINT #1, CHR$(&H1B);"-";CHR$(1); ← SelectAAAAA← Underline ( one-d ot width) turned on
PRINT #1, "AAAAA"; CHR$(&HA);BBBBB ← Underline turn ed off
PRINT #1, CHR$(&H1B);"-";CHR$(0); ← Cancel
PRINT #1, "BBBBB"; CHR$(&HA);
[Range]0 ≤ n ≤ 255(Only the least significant bit of n is enabled.)
ESC E n turns emphasized mode on or off. When the LSB (least significant bit) of n is 1, emphasized
mode is turned on; when it is 0, emphasized mode is turned off. The default setting is n=0.
Emphasized and double-strike printing appear the same.
[Range]0 ≤ n ≤ 255(Only the least significant bit of n is enabled.)
ESC G n turns double-strike mode on or off. When the LSB (least significant bit) of n is 1, double-
strike mode is turned on; when it is 0, double-strike mode is turned off. The default setting is n=0.
Double-strike and emphasized printing appear the same.
[Range]0 ≤ n ≤ 255(Only the least significant bit of n is enabled.)
ESC { n turns upside-down printing mode on or off. When the LSB (least significant bit) of n is 1,
upside-down printing mode is turned on; when it is 0, upside-down printing mode is turned off. The
default setting is n=0. When upside-down mode is turned on, the printer prints 180°-rotated
characters from right to left. The line printing order is not reversed; therefore be careful of the order of
the data transmitted. In standard mode, this command is enabled only when input at the beginning of
a line. In page mode, an internal flag is activated and this command is enabled when the printer
returns to standard mode.
ESC V n turns the 90° clockwise rotation mode on or off. When n=1 or 49, 90° clockwise rotation
mode is turned on; when n=0 or 48, this mode is turned off. This command is enabled only in
standard mode. If this command is entered in page mode, an internal flag is activated and the
command is enabled when the printer returns to standard mode.
Program ExamplePr int Sample
PRINT #1, CHR$(&H1D);"P";CHR$(180);CHR$(180);
PRINT #1, CHR$(&H1B);" ";CHR$(20);← Set right-s ide spacing
PRINT #1, CHR$(&H1B);"3";CHR$ (15);← Set line spacin g
PRINT #1, CHR$(&H1B);"V";CHR$ (1);← Turn on
GOSUB printing
PRINT #1, CHR$(&H1B);"2";← Set line spacing
PRINT #1, CHR$(&H1B);"V";CHR$ (0);← Turn off
GOSUB printing
END
[Range]0≤ n ≤ 255(Only the least significant bit of n is enabled.)
GS B n turns the white/black reverse printing mode on or off. When the LSB (least significant bit) of
n is 1, white/black reverse printing mode is turned on. When it is 0, white/black reverse printing
mode is turned off. The default setting is n=0. In white/black reverse printing mode, characters are
printed in white on a black background.
[Range]0≤ n ≤ 255(Only the least significant bit of n is enabled.)GS b n turns the smoothing mode on or off. When the LSB (least significant bit) of n is 1, smoothing
mode is turned on. When it is 1, smoothing mode is turned off. The default setting is n=0. Smoothing
is available for quadruple-size or larger characters.