Epson L60IIP - TM B/W Direct Thermal Printer, ESC/POS TM-L60II, ESC/POS TM-L60IIP Information Manual

TM-L60II/L60II P
Using this online information guid e
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.
Copyright© 1996 by Seiko Epson Corporation, Nagano, Japan.
ESC/POS™ Information Manual
Guide to TM–L60II/L60IIP 9604-00
SEIKO EPSON CORPORATION SYSTEM DEVICE D IVISION
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. A i
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.
Option
EPSON power supply unit, PS-150.
Specifications
Printing specifications
Printing method: Thermal line printing Printing speed: Approximately 12 lines/second (1/6-inch feed) Dot density: 180 dpi × 180 dpi Printing width: Thermal paper: 54.19 mm (2.13”), 384 dot positions
Thermal label : 51.93 mm (2.04”), 368 dot positions
Character specifications
Character fonts: 12 × 24/9 × 24 Characters per line: Thermal paper : 32/42
Thermal label : 30/40
Character size: 1.41(W) × 3.39(H) mm/.99(W) × 3.39(H) mm Character sets: ASCII: 95 characters
International: 32 characters Extended graphics: 128 characters × 6 pages
Paper size: Thermal paper : 59.0-60.5(W) mm × 83.0 mm diameter
Thermal label : 59.5-61.0(W) mm × 83.0 mm diameter
Interface: RS-232 (serial interface)
or IEEE 1284 (parallel interface)
Receive buffer: 4K or 45 bytes (selectable by DIP switch)
Rev. A iii
iv Rev. A
TM–L60II/L60IIP Information Manual
Chapter 1
Command Descriptions
Following this table are all the commands organized by function and described with program examples and print samples.
Supported Commands
Command Name Function type
HT Horizontal tab Print position 1-31
LF Print and line feed Print 1-5
Print and return to standard mode
FF
CR Print and carriage return Print 1-6
CAN Cancel print data in page mode Character 1-24
DLE E OT Real-time status transmission Status 1-44
ESC FF Print data in page mode Print 1-8
ESC SP Set right-side character spacing Character 1-12
ESC ! Se lect print mode(s) Character 1-17
ESC $ Set absolute print position Print position 1-29
ESC % Se lect/cancel user-defined character set Character 1-13
ESC & Define user-defined characters Character 1-13
Select bit-image mode Bit image 1-37
ESC
ESC – Turn underline mode on/off Character 1-18
ESC 2 Select de fault line s pacing Line spacing 1-10
ESC 3 Set line spacing Line spacing 1-10
ESC = Se lect peripheral device Miscellaneous function 1-60
ESC ? Cancel user-defined characte rs Character 1-13
ESC @ Initialize printer Miscellaneous function 1-57
ESC D Set horizontal tab positions Print position 1-31
ESC E Turn emphasized mode on/off Character 1-18
ESC G Turn double-strike mode on/off Character 1-19
ESC J Print and feed paper Print 1-6
ESC L Select page mode Miscellaneous function 1-61
ESC R Select an international character set Character 1-15
ESC S Select standard mode Miscellaneous function 1-61
ESC T Se lect print direction in page mode Print position 1-34
(in page mode) Print and feed label to print starting position
(on label)
Print 1-8
Print 1-9
Page number
Rev. A Command Descriptions 1-1
Command Name Function type
ESC V Turn 90° clockwise rotation mode on/off Character 1-21
ESC W Set printing area in page mode Print position 1-33
ESC \ Set relative print position Print position 1-29
ESC a Select justification Print position 1-30
ESC c 3
ESC c 4 Se lect paper sensor(s) to stop printing Paper sensor 1-26
ESC c 5 Enable/disable panel buttons Panel button 1-25
ESC d Print and feed
ESC p Generate pulse Miscellaneous function 1-60
ESC t Select character code table Character 1-16
ESC u Transmit peripheral device status Status 1-47
ESC v Transmit paper sensor status Status 1-48
ESC { Turn upside-down printing mode on/off Character 1-20
GS FF Print and eject label Print 1-9
GS ! Set character size Character 1-22
GS $ Set absolute vertical print position in page mode Print position 1-36
Define downloaded bit image Bit image 1-39
GS
GS / Print downloaded bit image Bit image 1-39
GS : Start/end macro definition Macro function 1-55
GS < Initialize printer mechanism Miscellaneous function 1-62
GS A Adjust label print starting position Miscellaneous function 1-62
GS B Turn white/black reverse printing mode on/off Character 1-23
GS C 0 Select counter print mode Miscellaneous function 1-63
GS C 1 Select count mode (A) Miscellaneous function 1-64
GS C 2 Set counter Miscellaneous function 1-64
GS C ; Select count mode (B) Miscellaneous function 1-66
GS H Select printing position of HRI characters Bar code 1-53
GS I Transmit printer ID Miscellaneous function 1-59
GS L Set left margin Print position 1-32
GS P Set horizontal and vertical motion units Miscellaneous function 1-58
GS W Set printing area width Print position 1-32
GS \ Set relative vertical print position in page mode Print position 1-36
GS ^ Execute macro Macro function 1-55
GS a Enable/disable Automatic Status Back (ASB) Status 1-41
GS b Turn smoothing mode on/off Character 1-23
Se lect paper sensor(s) to output paper-end signals
n
lines Print 1-7
Paper sensor 1-27
Page number
1-2 Command Descriptions Rev. A
TM–L60II/L60IIP Information Manual
Command Name Function type
GS c Print c ounter Miscellaneous function 1-63
GS f Set font for HRI characters Bar code 1-53
GS h Select bar code height Bar code 1-49
GS k Print bar code Bar code 1-51
GS r Transmit status Status 1-43
GS w Set bar code width Bar code 1-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:
ASCII ESC ! n Hex 1B 21 B0 Decimal 28 33 176
Bit Off/On Hex Decimal Function
Off 00 0 Character font-A selected.
1
On 01 1 Character font-B selected.
2 Undefined.
Off 00 0 Emphasized mode not selected.
3
On 08 8 Emphasized mode selected.
Off 00 0 Double-height mode not selected.
4
On 10 16 Double-height mode selected.
Off 00 0 Double-width mode not selected.
5
On 20 32 Double-width mode selected.
6 Undefined.
Off 00 0 Underline mode not selected.
7
On 80 128 Underline 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 Descriptions Rev. A
TM–L60II/L60IIP Information Manual
Print Commands
The TM-L60II/L60IIP printers support the following commands for printing characters and advancing paper:
Command Name
LF Print and line feed CR Print and carriage return ESC J Print and feed paper ESC d Print and feed n lines ESC FF Print 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 FF Print and eject label
LF
[Name] Print and line feed [Format] ASCII LF
Hex 0A Decimal 10
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.
Program Example Print Sample
PRINT #1, "AAAAA"; CHR$(&HA); AAAAA PRINT #1, "BBBBB"; CHR$(&HA); BBBBB
Rev. A Command Descriptions 1-5
CR
[Name] Print and carriage return [Format] ASCII CR
Hex 0D Decimal 13
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.
Program Example Print Sample
PRINT #1, "AAAAA"; CHR$(&HD); AAAAA Auto line feed enabled PRINT #1, " BBBBB"; CHR$(&HA); BBBBB
AAAAA BBBBB Auto line feed disabled
ESC J n
[Name] Print and feed paper [Format] ASCII ESC J n
Hex 1B 4A n Decimal 27 74 n
[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.
Program E xample P rint Sample
PRINT #1, CHR$(&H1D);"P";CHR$(180);CHR$(180); PRINT #1, "AAAAA"; CHR$(&HA); PRINT #1, "BBBBB"; CHR$(&H1B);"J";CHR$(100); PRINT #1, "CCCCC"; CHR$(&HA); PRINT #1, "DDDDD"; CHR$(&HA);
AAAAA BBBBB
CCCCC DDDDD
ESC J used to pr int one line and the n adv ance the paper b y 100 /180 inch
1-6 Command Descriptions Rev. A
TM–L60II/L60IIP Information Manual
ESC d n
[Name] Print and feed n lines [Format] ASCII ESC d n
Hex 1B 64 n Decimal 27 100 n
[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.
Program Ex ample Print Sample
PRINT #1, "AAAAA "; CHR$(&HA); PRINT #1, "BBBBB "; CHR$(&H1B);"d";CHR$(6); PRINT #1, "CCCCC "; CHR$(&HA);
AAAAA BBBBB
CCCCC
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] ASCII ESC FF
Hex 1B 0C Decimal 27 12
FF
[Name] Print and return to standard mode (in page mode) [Format] ASCII FF
Hex 0C Decimal 12
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.
Program Example Print Sample
PRINT #1, CHR$(&H1B);"L"; ← Select pa ge mode AAAAA PRINT #1, CHR$(&H1B);"W";CHR$(0);CHR$(0);CHR$(0); CHR$(0);CHR$(120);CHR$(0);CHR$(240);CHR$(0); PRINT #1, CHR$(&H1B);"T";CHR$(0); PRINT #1, "AAAAA"; CHR$(&HA); AAAAA PRINT #1, "BBBBB"; CHR$(&HA); BBBBB PRINT #1, CHR$(&H1B);CHR$(&HC); CCCCC PRINT #1, "CCCCC"; CHR$(&HC);
BBBBB
1-8 Command Descriptions Rev. A
TM–L60II/L60IIP Information Manual
FF
[Name] ➁ Print and feed label to print starting position (on label) [Format] ASCII FF
Hex 0C Decimal 12
GS FF
[Name] Print and eject label [Format] ASCII GS FF
Hex 1D 0C Decimal 29 12
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 Example Print 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).
Command Name
ESC 2 Select default line spacing ESC 3 Set line spacing
ESC 2
[Name] Select default line spacing [Format] ASCII ESC 2
Hex 1B 32 Decimal 27 50
ESC 3 n
[Name] Set line spacing [Format] ASCII ESC 3 n
Hex 1B 33 n Decimal 27 51 n
[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 ample Print 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 Descriptions Rev. A
TM–L60II/L60IIP Information Manual
Character Commands
The TM-L60II/L60IIP supports the following commands for setting character font and size.
Command Name
ESC SP Set right-side character spacing ESC % Select/cancel user-defined character set ESC & Define user-defined characters ESC ? Cancel user-defined characters ESC R Select an international character set ESC t Select character code table ESC ! Select print mode(s) ESC – Turn underline mode on/off ESC E Turn emphasized mode on/off ESC G Turn double-strike mode on/off ESC { Turn upside-down printing mode on/off ESC V Turn 90° clockwise rotation mode on/off GS ! Set character size GS B Turn white/black reverse printing mode on/off GS b Turn smoothing mode on/off CAN Cancel print data in page mode
Rev. A Command Descriptions 1-11
ESC SP n
[Name] Set right-side character spacing [Format] ASCII ESC SP n
Hex 1B 20 n Decimal 27 32 n
[Range] 0 n ≤ 255 ESC 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 Example Print 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 Descriptions Rev. A
TM–L60II/L60IIP Information Manual
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 (Only the least significant bit of n is enabled.)
ESC & y c1 c2 [x1 d1 ... d(y × x1)] ... [xk d1 ... d(y × xk)]
[Name] Define user-defined characters [Format] ASCII ESC & y c1 c2 [x1 d1 ... d(y × x1)] ... [xk d1 ... d(y × xk)]
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 = 3
32 c1 c2 126 0 x 12 (12 × 24 font) 0 x ≤ 9 (9 × 24 font) 0 d1...d (y × x) ≤ 255
k = c2 - c1 + 1
ESC ? n
[Name] Cancel user-defined characters [Format] ASCII ESC ? n
Hex 1B 3F n Decimal 27 63 n
[Range] 32 n 126
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
ABCDECharacters from internal cha racte r set
DECharac ters from user-def ined character set
A DECharacter s from user-defined chara cter set (1 character ca nceled)
1-14 Command Descriptions Rev. A
TM–L60II/L60IIP Information Manual
ESC R n
[Name] Select an international character set [Format] ASCII ESC R n
Hex 1B 52 n Decimal 27 82 n
[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
0 U.S.A. 1 France 2Germany 3U.K. 4 Denmark I 5 Sweden 6Italy 7 Spain 8 Japan 9Norway 10 Denmark II
P rog ram Example P rint Sa mpl e
FO R n=0 TO 10 # $ @ [ \ ] ^ ` { ¦ } PRINT #1, CHR$(&H1B);"R";CHR$(n); # $à°ç§^`éùè¨ PRINT #1, "# $ @ (\) ^ ` {¦} ~ ";CHR$ (& HA); # $§ÄÖÜ ^ `äöüß NEXT n £
# $ @ÆØÅ^` æø å~← # ¤ÉÄÖ ÅÜé äöåü # $@°\й^щатим Pt $@¡Ñ ¿^` ¨с}~← # $@[¥]^`{¦}~← # ¤ЙЖШЕЬйжшеь # $ÉÆØ ÅÜé æøåü
$@
[\]
^`
{ ¦ }
~
n
~
n
n
n
=0 (Defa ult settin g)
n
=1 =2
n
=3
=4
n
=5
n
=6 =7
n
=8
n
=9
n
=10
Rev. A Command Descriptions 1-15
ESC t n
[Name] Select character code table [Format] ASCII ESC t n
Hex 1B 74 n Decimal 27 116 n
[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.
n Character code table
0 Page 0 [PC437 (U.S.A., Standard Europe)] 1 Page 1 [Katakana] 2 Page 2 [PC850 (Multilingual)] 3 Page 3 [PC860 (Portuguese)] 4 Page 4 [PC863 (Canadian-French)] 5 Page 5 [PC865 (Nordic)] 255 Page 255 [Space page]
Program Example Print Sample
PRINT #1, CHR$(&H1B);"t";CHR$(0); Select p age 0 GOSUB printing PRINT #1, CHR$(&H1B);"t";CHR$(1); Select p age 1 GOSUB printing END
printing: FOR i=&H20 TO &H7F PRINT #1, CHR$(i); NEXT i PRINT #1, CHR$(&HA); FOR i=&H80 TO &HFF PRINT #1, CHR$(i); NEXT i PRINT #1, CHR$(&HA); RETURN
1-16 Command Descriptions Rev. A
TM–L60II/L60IIP Information Manual
ESC ! n
[Name] Select print mode(s) [Format] ASCII ESC ! n
Hex 1B 21 n Decimal 27 33 n
[Range] 0 n ≤ 255
ESC ! n selects print modes using n as follows. The default setting is n=0.
Bit Off/On Hex Decimal Function
Off 00 0 Character font 12 x 24 selected.
0
On 01 1 Character font 9 x 24 select ed.
1, 2 — Undefined.
Off 00 0 Emphasized mode not selected.
3
On 08 8 Emphasized mode selected.
Off 00 0 Double-height mode not selected.
4
On 10 16 Double-height mode selected.
Off 00 0 Double-width mode not selected.
5
On 20 32 Double-width mode selected.
6 Undefined.
Off 00 0 Underline mode not selected.
7
On 80 128 Underline mode selected.
Program E xample Print Samp le
PRINT #1, CHR$(&H1B);"!";CHR$(0); "AA"; PRINT #1, CHR$(&H1B);"!";CHR$(8); "BB"; PRINT #1, CHR$(&H1B);"!";CHR$(16); "CC"; PRINT #1, CHR$(&H1B);"!";CHR$(24); "DD"; PRINT #1, CHR$(&H1B);"!";CHR$(32); "EE"; PRINT #1, CHR$(&H1B);"!";CHR$(40); "FF"; PRINT #1, CHR$(&H1B);"!";CHR$(48); "GG"; PRINT #1, CHR$(&H1B);"!";CHR$(56); "HH";CHR$(&HA); PRINT #1, CHR$(&H1B);"!";CHR$(129); "AA"; PRINT #1, CHR$(&H1B);"!";CHR$(137); "BB"; PRINT #1, CHR$(&H1B);"!";CHR$(145); "CC"; PRINT #1, CHR$(&H1B);"!";CHR$(153); "DD"; PRINT #1, CHR$(&H1B);"!";CHR$(161); "EE"; PRINT #1, CHR$(&H1B);"!";CHR$(169); "FF"; PRINT #1, CHR$(&H1B);"!";CHR$(177); "GG"; PRINT #1, CHR$(&H1B);"!";CHR$(185); "HH";CHR$(&HA);
12 x 24 font
9 x 24 fo nt
with under line
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
Rev. A Command Descriptions 1-17
ESC – n
[Name] Turn underline mode on/off [Format] ASCII ESC n
Hex 1B 2D n
Decimal 27 45 n
[Range] 0 n ≤ 2, 48 n ≤ 50
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 xample P rint Sample
PRINT #1, CHR$(&H1B);"-";CHR$(1); Select AAAAA 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);
ESC E n
[Name] Turn emphasized mode on/off [Format] ASCII ESC E n
Hex 1B 45 n Decimal 27 69 n
[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.
Program E xample P rint Sample
PRINT #1, CHR$(&H1B);"E";CHR$(1); Select AAAAA Emphasized PRINT #1, "AAAAA"; CHR$(&HA); BBBBB Normal PRINT #1, CHR$(&H1B);"E";CHR$(0); Cancel PRINT #1, "BBBBB"; CHR$(&HA);
1-18 Command Descriptions Rev. A
TM–L60II/L60IIP Information Manual
ESC G n
[Name] Turn double-strike mode on/off [Format] ASCII ESC G n
Hex 1B 47 n Decimal 27 71 n
[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.
Program E xample P rint Sample
PRINT #1, CHR$(&H1B);"G";CHR$(1); ← Select AAAAA Dou ble-strike PRINT #1, "AAAAA"; CHR$(&HA); BBBBB ← Normal PRINT #1, CHR$(&H1B);"G";CHR$(0); ← Cancel PRINT #1, "BBBBB"; CHR$(&HA);
Rev. A Command Descriptions 1-19
ESC { n
[Name] Turn upside-down printing mode on/off [Format] ASCII ESC { n
Hex 1B 7B n Decimal 27 123 n
[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.
Program E xample P rint Sample
PRINT #1, CHR$(&H1B);"{";CHR$(0); Cancel GOSUB printing PRINT #1, CHR$(&H1B);"{";CHR$(1); Select GOSUB printing END printing: PRINT #1, "ABCDE"; CHR$(&HA); PRINT #1, "BCDEF"; CHR$(&HA); RETURN
Normal printing
ABCDE BCDEF
ABCDE BCDEF
Upside-do wn printing
1-20 Command Descriptions Rev. A
TM–L60II/L60IIP Information Manual
ESC V n
[Name] Turn 90° clockwise rotation mode on/off [Format] ASCII ESC V n
Hex 1B 56 n Decimal 27 86 n
[Range] 0 n 1, 48n 49
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 Example Pr 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
printing: PRINT #1, "AAAAA"; CHR$(&HA); PRINT #1, "BBBBB"; CHR$(&HA); PRINT #1, "CCCCC"; CHR$(&HA); RETURN
Right-s ide spacing
ABC
ABC
ABC
AAAAA
A
BBBBB
B C
CCCCC
Right-s ide spacing
ABC
ABC
ABC
Line spacing ESC V 1
Li ne spacing
ESC V 0
Rev. A Command Descriptions 1-21
GS ! n
[Name] Select character size [Format] ASCII GS ! n
Hex 1D 21 n Decimal 29 33 n
[Range] 0n 255 GS ! n selects the character height using bits 0 to 3, and selects the character width using bits 4 to 7.
Character width selection is as follows:
Hex Decimal Width
00 0 1 (normal)
10 16 2 (double-width)
20 32 3
30 48 4
40 64 5
50 80 6
60 96 7
70 112 8
Character height selection is as follows:
Hex Decimal Width
00 0 1 (normal)
01 1 2 (double-widt h)
02 2 3
03 3 4
04 4 5
05 5 6
06 6 7
07 7 8
Program E xample P rint Sample
PRINT #1, CHR$(&H1D);"!";CHR$(68); PRINT #1, "BBBBB"; CHR$(&HA); PRINT #1, CHR$(&H1D);"!";CHR$(0) PRINT #1, "AAAAA"; CHR$(&HA);
BBBBB
AAAAA
Normal
Select five-times
normal font height and fi ve-times normal font width
1-22 Command Descriptions Rev. A
TM–L60II/L60IIP Information Manual
GS B n
[Name] Turn white/black reverse printing mode on/off [Format] ASCII GS B n
Hex 1D 42 n Decimal 29 66 n
[Range] 0n ≤ 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.
Program Example Print Sample
AAAAA
PRINT #1, CHR$(&H1D);"B";CHR$(1); PRINT #1, "AAAAA"; CHR$(&HA); BBBBB N ormal PRINT #1, CHR$(&H1D);"B";CHR$(0); PRINT #1, "BBBBB";CHR$(&HA);
Reverse
GS b n
[Name] Turn smoothing mode on/off [Format] ASCII GS b n
Hex 1D 62 n Decimal 29 98 n
[Range] 0n ≤ 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.
Program Example Print Sample
PRINT #1, CHR$(&H1D);"!";CHR$(68); PRINT #1, CHR$(&H1D);"b";CHR$(1); PRINT #1, "AAAAA"; CHR$(&HA);
Select font size
Turn on
AAAAA
Rev. A Command Descriptions 1-23
Loading...
+ 68 hidden pages