Epson TM-U200, TM-U200P Information Manual

TM U200/U200P
Using this online technical guide
The words on the left side of this screen are
bookmarks
for all the
topics in this guide.
Use the
scroll bar
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
zoom
tools to magnify or reduce the page display.
Click the
Find
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-U200/U200P
SEIKO EPSON CORPORATION
®
400549800
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.
NOTICE: 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–U200/U200P 9602-00
SEIKO EPSON CORPORATION SYSTEM DEVICE DIVISION
2070 Kotobuki Koaka, Matsumoto-shi, Nagano-ken 399, Japan
SEIKO EPSON CORPORATION
SYSTEM DEVICE DIVISION
2070 Kotobuki Koaka, Matsumoto-shi, Nagano-ken 399, Japan
Rev. A i
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 receipt printing.
Chapter 3 contains a table of the commands listed by function type and a table showing which commands are supported by various EPSON printers.
ii Rev. A
Features
The TM-U200/U200P series of high-quality POS printers print on roll paper. The printers have the following features:
Compact and lightweight. High throughput using bidirectional, minimum distance printing. Semi-automatic paper loading capability. ASB (Automatic Status Back) function that automatically transmits changes in printer status. Wide selections for the user’s purposes by the different features of the TM-U200/U200P
printers, as follows:
Options and Accessories
Paper roll near-end sensor Direct connection display modules, DM-D102 and DM-D203. EPSON power supply unit, PS-150. EPSON ribbon cassette, ERC-38 (P) and ERC-38 (B).
Printer Features
TM-U200B/PB The auto-cutter unit is standard equipment.
TM-U200D/PD Does not include the auto-cutter or take-up units.
Rev. A iii
Specifications
Printing specifications
Printing method: 9-pin, serial impact dot matrix Printing speed: Approximately 3.5 LPS (when printing 40 columns using the
the 7 × 9 font with 3-half dot spacing)
Number of printable columns: 33/40 (when using 3-half dot spacing)
35/42 (when using 2-half dot spacing)
Character specifications
Character fonts: 9 × 9/7 × 9 Character pitch: 13.3/16 CPI (when using 3-half dot spacing)
14.5/17.8 CPI (when using 2-half dot spacing)
Character size: 1.2 (W) × 3.1 (H) mm
1.6 (W) x 3.1 (H) mm
Character sets:
ASCII: 95 characters International: 32 characters Extended graphics: 128 characters × 6 pages
Paper specifications
Paper size: Paper roll: 76 mm +/- 0.5 (W) mm × 83.0 mm diameter
Thickness: Normal Paper: 0.06 mm – 0.085 mm
Pressure-sensitive paper: 0.05 mm – 0.08 mm (Total Thickness: 0.2 mm or less)
Interface: RS-232 (TM-U200B/D serial interface)
or IEEE 1284 (TM-U200PB/PD parallel interface)
Data buffer: Maximum approximately 1k bytes
iv Rev. A
TM-U200D/U200PD
TM-U200B/U200PB
Rev. A Command Descriptions 1-1
TM–U200/U200P 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
Page number
HT Horizontal tab Print position 1-20
LF Print and line feed Print 1-4
CR Print and carriage return Print 1-4
DLE EOT Real-time status transmission Status 1-27
DLE ENQ Real-time request to printer Miscellaneous function 1-34
ESC SP Set right-side character spacing Character 1-8
ESC ! Select print mode(s) Character 1-14
ESC % Select/cancel user-defined character set Character 1-9
ESC & Define user-defined characters Character 1-9
ESC
Select bit-image mode Bit image 1-21
ESC – Turn underline mode on/off Character 1-15
ESC 2 Select default line spacing Line spacing 1-7
ESC 3 Set line spacing Line spacing 1-7
ESC < Return home Mechanism control 1-30
ESC = Select peripheral device Miscellaneous function 1-33
ESC ? Cancel user-defined characters Character 1-9
ESC @ Initialize printer Miscellaneous function 1-31
ESC D Set horizontal tab positions Print position 1-20
ESC E Turn emphasized mode on/off Character 1-15
ESC G Turn double-strike mode on/off Character 1-16
ESC J Print and feed paper Print 1-5
ESC K Print and reverse feed Print 1-5
ESC R Select an international character set Character 1-12
ESC U Turn unidirectional printing mode on/off Mechanism control 1-30
ESC a Select justification Print position 1-21
ESC c 3
Select paper sensor(s) to output paper-end signals
Paper sensor 1-18
ESC c 4 Select paper sensor(s) to stop printing Paper sensor 1-18
ESC c 5 Enable/disable panel buttons Panel button 1-17
ESC d Print and feed
n
lines Print 1-6
1-2 Command Descriptions Rev. A
The following commands are effective only when 40 bytes is selected as the receive buffer
size. The size of the receive buffer is selected by the DIP switches.
Refer to the GS z 0 command for changing roll paper. The functions of these commands are different, depending on the printer models. O
indicates supported commands and X indicates unsupported (ignored) commands.
ESC e Print and reverse feed
n
lines Print 1-6
ESC p Generate pulse Miscellaneous function 1-33
ESC t Select character code table Character 1-13
ESC { Turn upside-down printing mode on/off Character 1-16
GS I Transmit printer ID Miscellaneous function 1-32
GS V Select cut mode and cut paper Mechanism control 1-30
GS a Enable/disable Automatic Status Back (ASB) Status 1-22
GS r Transmit status Status 1-26
GS z 0 On-line recovery wait time Miscellaneous function 1-35
Command Name
HT Horizontal tab
ESC % Select/cancel user-defined character set
ESC & Define user-defined characters
ESC ? Cancel user-defined characters
ESC D Set horizontal tab positions
Command
Model
TM-U200B TM-U200PB TM-U200D TM-U200PD
ESC c 3 XOXO
GS V (1) OO X X
GS V (2) OO
Only paper feed is executed.
Only paper feed is executed.
Command Name Function type
Page number
Rev. A Command Descriptions 1-3
TM–U200/U200P Information Manual
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
Note that the program examples throughout this chapter use decimal numbers, but binary, decimal, and hexadecimal numbers all have the same printing results.
Bit Off/On Hex Decimal Function
1
Off 00 0 Character font 9 x 9 selected.
On 01 1 Character font 7 x 9 selected.
2 Undefined.
3
Off 00 0 Emphasized mode not selected.
On 08 8 Emphasized mode selected.
4
Off 00 0 Double-height mode not selected.
On 10 16 Double-height mode selected.
5
Off 00 0 Double-width mode not selected.
On 20 32 Double-width mode selected.
6 Undefined.
7
Off 00 0 Underline mode not selected.
On 80 128 Underline mode selected.
1-4 Command Descriptions Rev. A
Print Commands
The TM-U200/U200P 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 K Print and reverse feed ESC d Print and feed n lines ESC e Print and reverse feed n lines
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.
CR
[Name] Print and carriage return [Format] ASCII CR
Hex 0D Decimal 13
Program Example Print Sample
PRINT #1, "AAAAA"; CHR$(&HA); AAAAA PRINT #1, "BBBBB"; CHR$(&HA); BBBBB
Rev. A Command Descriptions 1-5
TM–U200/U200P Information Manual
When auto line feed is enabled, CR functions in the same way as LF. When auto line feed is disabled, CR prints the data in the print buffer and does not feed the paper. The DIP switch setting enables or disables auto line feed. When using the serial interface, CR executes printing only.
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 x (1/144)] inches. This means that the printer can feed the paper in half-dot units. This command is used to temporarily feed a specific length without changing the line spacing set by other commands.
ESC K n
[Name] Print and reverse feed [Format] ASCII ESC K n
Hex 1B 4B n Decimal 27 75 n
[Range] 0 n ≤ 48
Program Example Print Sample
PRINT #1, "AAAAA"; CHR$(&HD); AAAAA ←
Auto line feed enabled
PRINT #1, " BBBBB"; CHR$(&HA); BBBBB
AAAAABBBBB ←
Auto line feed disabled
Program Example Print Sample
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 print one line and then advance
the paper by 100/144 inch
1-6 Command Descriptions Rev. A
ESC K n prints the data in the print buffer and feeds the paper [n × (1/144)] inches in the reverse direction. This means that the printer can feed paper in half-dot units in the reverse direction. The command is used to temporarily feed a specific length without changing the line spacing set by other commands. Only the TM-U200D/PD supports this command.
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.
ESC e n
[Name] Print and reverse feed n lines [Format] ASCII ESC e n
Hex 1B 65 n Decimal 27 101 n
[Range] 0 n ≤ 255
Program Example Print Sample
PRINT #1, "AAAAA"; CHR$(&HA); PRINT #1, "BBBBB"; CHR$(&H1B);"K";CHR$(24); PRINT #1, " CCCCC"; CHR$(&HA);
AAAAACCCCC BBBBB
ESC K
used to print one line and then
reverse feed the paper by 24/144 inch
Program Example 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
used to print one line and then
advance the paper six lines
Rev. A Command Descriptions 1-7
TM–U200/U200P Information Manual
ESC e n prints the data in the print buffer and feeds n lines in the reverse direction. The amount of paper fed per line is based on the value set using the line spacing command. The maximum reverse paper feed amount is 48/144 inch. The default setting of the paper feed amount is 1/6 inch. Only the TM-U200D/PD supports this command.
Line Spacing Commands
The TM-U200/U200P 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, ESC d, and ESC e commands, or when the paper is advanced using the
PAPER FEED
button.
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 12 dots.
Program Example Print Sample
PRINT #1, "AAAAA"; CHR$(&HA); PRINT #1, "BBBBB"; CHR$(&H1B);"e";CHR$(1); PRINT #1, " CCCCC"; CHR$(&HA);
AAAAACCCCC BBBBB
Paper reverse fed one line after printing line of Bs
Loading...
+ 38 hidden pages