Epson RP-U420 User Manual

ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
EXIT
EXIT
EXIT
RP-U420
Application Programming Guide
CLICK HERE for
“About This Manual”
CLICK HERE for
EPSON
EPSON
CONFIDENTIAL
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
RP-U420 Application Programming Guide Version 1.0 Seiko Epson Corporation System Device Division
Notice: The contents of this manual are subject to change without notice
EPSON and ESC/POS are registered trademarks of Seiko Epson Corporation. Acrobat
®
Reader™copyright ©1997–1999 Adobe Systems Incorporated. All rights reserved. Adobe and Acrobat are trademarks of Adobe Systems Incorporated.
CONFIDENTIAL
EPSON
EPSON
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
BY USING THIS DOCUMENT, YOU AGREE TO ABIDE BY THE TERMS OF THIS AGREEMENT. PLEASE RETURN THIS DOCUMENT IMMEDIATELY IF YOU DO NOT AGREE TO THESE TERMS.
This document contains confidential, proprietary information of Seiko Epson Corporation or its affiliates. You must keep such information confidential. If the user is a business entity or organization, you must limit disclosure to those of your employees, agents and contractors who have a need to know and who are also bound by obligations of confidentiality.
On the earlier of (a) termination of your relationship with Seiko Epson, or (b) Seiko Epson's request, you must stop using the confidential information. You must then return or destroy the information, as directed by Seiko Epson.
If a court, arbitrator, government agency or the like orders you to disclose any confidential information, you must immediately notify Seiko Epson. You agree to give Seiko Epson reasonable cooperation and assistance in resisting disclosure.
You may use confidential information only for the purpose of facilitating authorized sales and service of, or developing software and similar products for authorized use with, EPSON products. Any other use requires the prior written consent of Seiko Epson.
THE INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY WARRANTY OF TITLE OR NON­INFRINGEMENT. Seiko Epson has no liability for loss or damage arising from or relating to your use of or reliance on the information in the document.
You may not reproduce, store or transmit the confidential information in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise) without the prior written permission of Seiko Epson.
Your obligations under this Agreement are in addition to any other legal obligations. Seiko Epson does not waive any right under this Agreement by failing to exercise it. The laws of Japan apply to this Agreement.
Confidentiality
Agreement
EPSON
EPSON
CONFID
CONFID
CONFIDENTIAL
CONFIDENTIAL

Usable application programs and tips

■ ■ ■
■ ■ ■
more
more
USABLE APPLICATION PROGRAMS AND TIPS
System Processing
This example illustrates ESC/POS command functions and printing results. Item 2-1 shows a combination of receipt and journal printing. Item 2-2 shows processing to issue a Taiwan receipt. Tips include features of stamp printing and usage of the ESC o command. Note: Print samples are images of the printing results of the program samples. They do not represent the actual printing.
2-1 Journal and Receipt Combination Printing
The example shows procedures and a program sample for printing part of data on a receipt and journal at the same time. At first you need to set DIP Switch 1-8 (Printer mode selection) to Off (Standard mode); then turn on the power.
RP-U420 Usable application programs and tips
Ver. 1.0
p. 4
CONFIDENTIAL
Print Sample
Receipt Journal
Stamp
■ ■ ■
■ ■ ■
more
more
July 6, 2000, 10:30
RP-U420 420 PS-170 170 TOTAL 590
PAID 600 CHANGE 10
#12345
Date and Time
Item A
Item B
Cutting position
July 6, 2000, 10:30 #12345
RP-U420 420 PS-170 170 TOTAL 590
Item A
RP-U420 Usable application programs and tips
Ver. 1.0
p. 5
CONFIDENTIAL
System Processing Procedures
Procedure Commands used Description
1. Initialization ESC @ Executes initialization.
■ ■ ■
■ ■ ■
more
more
2. Print date and time ESC c 0, ESC z
RS, LF
3. Print Item A ESC z, LF Prints Item A.
4. Execute a stamp for the next receipt
5. Print Item B LF Prints Item B.
6. Issue a receipt ESC p 0, GS V
Step 4 is necessary for effective use of paper. Refer to the tips section for details.
ESC c 0, ESC o Executes a stamp for the next receipt.
ESC c 0, LF
Prints different data on receipt and journal. Jumps to the print position on journal (journal tab).
ESC z a parallel printing for the same data on both receipt and journal.
Prints a slip number, operates a drawer, cuts a receipt, feeds journal paper.
RP-U420 Usable application programs and tips
Ver. 1.0
p. 6
CONFIDENTIAL
Programming Example
PRINT #1, CHR$(&H1B);"@"; ← Initializes the printer
■ ■ ■
■ ■ ■
more
more
PRINT #1, CHR$(&H1B);"c0";CHR$(3); PRINT #1, CHR$(&H1B);"z";CHR$(0); PRINT #1, “July 6, 2000 10:30”;CHR$(&H1E); PRINT #1, “July 6, 2000 10:30 #12345”;CHR$(&HA);CHR$(&HA); PRINT #1, CHR$(&H1B);"z";CHR$(1);
PRINT #1, "RP-U420 420";CHR$(&HA); PRINT #1, "PS-170 170";CHR$(&HA); PRINT #1, "TOTAL 590";CHR$(&HA); PRINT #1, "----------------------------";CHR$(&HA);
PRINT #1, CHR$(&H1B);”c0”;CHR$(2); PRINT #1, CHR$(&H1B);”o”;
PRINT #1, "PAID 600";CHR$(&HA); PRINT #1, "CHANGE 10";CHR$(&HA);CHR$(&HA);
PRINT #1, CHR$(&H1B);"p";CHR$(0);CHR$(2);CHR$(20); PRINT #1, “ #12345”;CHR$(&HA);CHR$(&HA); PRINT #1, CHR$(&H1D);"V";CHR$(66);CHR$(0); PRINT #1, CHR$(&H1B);”c0”;CHR$(1); PRINT #1, CHR$(&HA); END
Executes stamp for the next sheet
Feeds journal
Selects a print sheet
Cancels parallel printing on receipt and journal
Selects parallel printing on receipt and journal
Selects receipt
drawer kick-out
Feeds paper to the cutting position
Selects journal
Prints date and time
Item A
Stamp
Item B
Issues receipt
RP-U420 Usable application programs and tips
Ver. 1.0
p. 7
CONFIDENTIAL
■ ■ ■
■ ■ ■
more
more
2-2 Issuing Taiwan Receipt
The example shows procedures and a program sample for issuing a Taiwan receipt, which has black marks. At first you need to set DIP Switch 1-8 (Printer mode selection) to On (Taiwan mode); then turn on the power.
Print Sample
Receipt
Predefined logo
Stamp
01-01-01 #12345 RP-U420 420 PS-170 170 TOTAL 590
PAID 600 CHANGE 10
Advertisement
Date and Time
Item A
Item B
: The relationship between the
Note
paper cut position and the mark sensor position may not be exact because the paper feed pitch for this printer is 4.23 mm.
RP-U420 Usable application programs and tips
Cutting positon
Ver. 1.0
p. 8
CONFIDENTIAL
System Processing Procedures
Procedure Commands used Description
1. Initialization ESC @ Executes initialization.
■ ■ ■
■ ■ ■
more
more
2. Print details ESC c 0, ESC z
ESC d, LF
3. Execute a stamp for the next receipt
4. Issue a receipt FF Feeds a receipt to the next black mark position and cuts the receipt.
Step 3 is necessary to execute a stamp at the correct position. Refer to the tips section for details.
ESC d, ESC o Executes a stamp for the next receipt.
Prints date, slip number, and details on both receipt and journal. ESC z executes parallel printing of the same data on both receipt and
journal.
RP-U420 Usable application programs and tips
Ver. 1.0
p. 9
CONFIDENTIAL
Programming Example
PRINT #1, CHR$(&H1B);"@"; ← Initializes the printer
■ ■ ■
■ ■ ■
more
more
PRINT #1, CHR$(&H1B);"c0";CHR$(3); PRINT #1, CHR$(&H1B);"z";CHR$(1);
PRINT #1, CHR$(&H1B);”d”;CHR$(6); PRINT #1, “01-01-01 #12345”;CHR$(&HA); PRINT #1, "RP-U420 420";CHR$(&HA); PRINT #1, "PS-170 170";CHR$(&HA); PRINT #1, "TOTAL 590";CHR$(&HA); PRINT #1, "----------------------------";CHR$(&HA); PRINT #1, "PAID 600";CHR$(&HA); PRINT #1, "CHANGE 10";CHR$(&HA);
PRINT #1, CHR$(&H1B);”d”;CHR$(23); PRINT #1, CHR$(&H1B);”o”; PRINT #1, CHR$(&HC); END
Executes stamp for the next sheet
Issues a receipt
Selects a print sheet
Selects parallel printing on receipt and journal
Feeds 6-line
Feeds 23-line
Prints details
Stamp
RP-U420 Usable application programs and tips
Ver. 1.0
p. 10
CONFIDENTIAL
■ ■ ■
■ ■ ■
more
more
Tips
RP-U420 has a stamp function. ESC o executes a stamp once. When printing a stamp, you need to set line spacing, depending on the position of each mechanism.
Positions for print head, stamp, and cutter
autocutter
manual cutter
8-line
print head
11-line
stamp
(
(
When DIP switch 1-7 is Off)
If you want to print characters just below the stamp after executing it, you need to feed 12 lines in advance.
1. Execute a stamp (ESC o).
2. Feed 12 lines (ESC d 12).
3. Print data (pint data + LF).
When DIP switch 1-7 is On)
stamp
8-line
11-line
print head
RP-U420 Usable application programs and tips
Ver. 1.0
p. 11
CONFIDENTIAL
However, if you do the procedures above at the beginning of a receipt issue transaction, there will be space of about 14 lines above the stamp. As the program examples in this section show, if printing of a stamp for the second receipt is executed during the receipt printing for the first receipt, you can print a receipt without unnecessary spaces. If you use the autocutter, follow the steps below.
1. Print data up to the line so that the rest of the lines to be printed are 5 lines from the edge of the receipt.
2. Execute a stamp (ESC o).
3. Print data for the last 5 lines (print data + LF).
4. Feed paper to the cutting position and execute a paper cut (GS V). Note: 5 lines used in the procedures are a reference value.
When deciding the stamp position in the Taiwan mode, you need to take the current position of the black mark into consideration. In Taiwan mode, feed paper to the black by FF and execute a paper cut.
Paper position after FF is executed
autocutter or manual cutter position
1 to 6 mm (*)
(*) The relationship between the paper cut position and the mark sensor position may not be exact because the paper feed pitch for this printer is
4.23 mm.
When issuing a black mark receipt, follow the same procedures as when you print a stamp for the second receipt during receipt printing for the first receipt. Refer to 2-2, Issuing Taiwan Receipt, for details.
RP-U420 Usable application programs and tips
Ver. 1.0
p. 12
CONFIDENTIAL

Definitions

DEFINITIONS
(1) Normal commands
Normal commands are all the commands except real-time commands. The normal commands are stored in the receive buffer temporarily and then processed sequentially.
(2) Real-time commands
Real-time commands are the commands that consist of a DLE extension (such as DLE EOT or DLE ENQ). The real­time commands execute processing when received. After executing, they are stored in the receive buffer and then discarded as undefined codes when the normal commands are processed.
(3) Receive buffer
The receive buffer is used to store data from the host computer. All received data is stored in this buffer and processed in the order received. Buffer capacity depends on the printer model used.
(4) Print buffer
The print buffer is used to store image data for printing.
(5) Print buffer-full
This is the state which occurs when the print buffer becomes full.
■ ■ ■
■ ■ ■
more
more
(6) Print buffer-full printing
If new print data (such as characters or bit images) or horizontal tabs are processed in standard mode when the print buffer is full, the image data already stored in the print buffer is printed and a line feed is executed. This is the same operation as LF. The data (print data or horizontal tab) that causes the print buffer full is processed from the beginning of the next line.
(7) Beginning of the line
The beginning of the line means that no data exists in the print buffer, and the beginning of the line is the left margin.
(8) Printable area
This is the maximum printable area specified for each printer model.
(10) Ignoring a command
This is the printer state in which the printer does nothing after receiving all codes, including parameters.
RP-U420 Definitions
Ver. 1.0
p. 13
CONFIDENTIAL
(11) Horizontal/vertical direction
Horizontal direction is the direction which is perpendicular to the paper feed direction. Vertical direction is the paper feed direction.
(12) Baseline
The baseline for character sets that are 9 dots high (for example, 7 × 9 and 9 × 9) is the invisible line marking the bottom of the character matrix (the bottom of the lowest dot possible), but for other character sets, the baseline is the bottom of all characters, except that descenders, such as the bottom parts of “g” and “y,” are below the baseline.
(13) Setting commands
The commands that change printer status by processing a command and affect printer operation and print results thereafter. The commands that can specify enhanced characters, set paper feed amount, and select a character are setting commands and some of the normal commands are setting commands.
(14) Executing commands
The commands that affect printer operation and change the printer status temporarily but do not affect the following printer operation. Functions of printing, paper cutting, and status transmission are executing commands and the real-time commands and some of the normal commands are executing commands.
(15) MSB
Most Significant Bit
(16) LSB
Least Significant Bit
(18) “Reserved“ bit
“Reserved” bits are as follows:
Bit which will be used for an extended function in the future.
Bit which has a function in the ESC/POS specification; however, the printer does not support the function. Use a bit with a value indicated in a table.
(19) “Fixed” bit
Use a bit only with a value indicated in a table.
RP-U420 Definitions
Ver. 1.0
p. 14
CONFIDENTIAL

Character code tables

CHARACTER CODE TABLES
SP in a table represents space. See Using the character code tables for information on how to read these tables.
Page 0 (PC437: U.S.A., Standard Europe) (International character set: U.S.A.)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 15
CONFIDENTIAL
Page 1 (Katakana)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 16
CONFIDENTIAL
Page 2 (PC850: Multilingual)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 17
CONFIDENTIAL
Page 3 (PC860: Portuguese)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 18
CONFIDENTIAL
Page 4 (PC863: Canadian-French)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 19
CONFIDENTIAL
Page 5 (PC865: Nordic)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 20
CONFIDENTIAL
Page 16 (WPC1252)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 21
CONFIDENTIAL
Page 17 (PC866: Cyrillic #2)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 22
CONFIDENTIAL
Page 18 (PC862: Latin2)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 23
CONFIDENTIAL
Page 19 (PC858: Euro)
■ ■ ■
■ ■ ■
more
more
RP-U420 Character code tables
Ver. 1.0
p. 24
Loading...
+ 53 hidden pages