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 NONINFRINGEMENT. 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
Page 4
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-U420Usable application programs and tips
Ver. 1.0
p. 4
Page 5
CONFIDENTIAL
Print Sample
ReceiptJournal
Stamp
■ ■ ■
■ ■ ■
more
more
July 6, 2000, 10:30
RP-U420 420
PS-170170
TOTAL590
PAID600
CHANGE 10
#12345
←
Date and Time
Item A
Item B
←
Cutting position
July 6, 2000, 10:30#12345
RP-U420 420
PS-170170
TOTAL590
Item A
RP-U420Usable application programs and tips
Ver. 1.0
p. 5
Page 6
CONFIDENTIAL
System Processing Procedures
ProcedureCommands usedDescription
1. InitializationESC @Executes initialization.
■ ■ ■
■ ■ ■
more
more
2. Print date and timeESC c 0, ESC z
RS, LF
3. Print Item AESC z, LFPrints Item A.
4. Execute a stamp for
the next receipt
5. Print Item BLFPrints Item B.
6. Issue a receiptESC p 0, GS V
Step 4 is necessary for effective use of paper. Refer to the tips section for details.
ESC c 0, ESC oExecutes 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-U420Usable application programs and tips
Ver. 1.0
p. 6
Page 7
CONFIDENTIAL
Programming Example
PRINT #1, CHR$(&H1B);"@"; ← Initializes the printer
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-170170
TOTAL590
PAID600
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-U420Usable application programs and tips
Cutting positon
←
Ver. 1.0
p. 8
Page 9
CONFIDENTIAL
System Processing Procedures
ProcedureCommands usedDescription
1. InitializationESC @Executes initialization.
■ ■ ■
■ ■ ■
more
more
2. Print detailsESC c 0, ESC z
ESC d, LF
3. Execute a stamp for
the next receipt
4. Issue a receiptFFFeeds 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 oExecutes 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-U420Usable application programs and tips
Ver. 1.0
p. 9
Page 10
CONFIDENTIAL
Programming Example
PRINT #1, CHR$(&H1B);"@"; ← Initializes the printer
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-U420Usable application programs and tips
Ver. 1.0
p. 10
Page 11
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-U420Usable application programs and tips
Ver. 1.0
p. 11
Page 12
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-U420Usable application programs and tips
Ver. 1.0
p. 12
Page 13
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 realtime 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-U420Definitions
Ver. 1.0
p. 13
Page 14
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-U420Definitions
Ver. 1.0
p. 14
Page 15
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-U420Character code tables
Ver. 1.0
p. 15
Page 16
CONFIDENTIAL
Page 1 (Katakana)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 16
Page 17
CONFIDENTIAL
Page 2 (PC850: Multilingual)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 17
Page 18
CONFIDENTIAL
Page 3 (PC860: Portuguese)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 18
Page 19
CONFIDENTIAL
Page 4 (PC863: Canadian-French)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 19
Page 20
CONFIDENTIAL
Page 5 (PC865: Nordic)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 20
Page 21
CONFIDENTIAL
Page 16 (WPC1252)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 21
Page 22
CONFIDENTIAL
Page 17 (PC866: Cyrillic #2)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 22
Page 23
CONFIDENTIAL
Page 18 (PC862: Latin2)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 23
Page 24
CONFIDENTIAL
Page 19 (PC858: Euro)
■ ■ ■
■ ■ ■
more
more
RP-U420Character code tables
Ver. 1.0
p. 24
Page 25
CONFIDENTIAL
Using the character code tables
USING THE CHARACTER CODE TABLES
The example below uses Page 0 (PC437) to illustrate the use of the character code tables.
You can find the character "A" in Page 0 as follows:
The decimal value for the character "A" is 65.
Follow its column straight up to find the digits.
Hexadecimal4
Binary0100
These numbers are the most significant bits of the ASCII code.
Follow its row to the left to find the digits.
Hexadecimal1
Binary0001
These numbers are the least significant bits of the ASCII code.
The combination of the numbers above is the ASCII code for character "A".
Decimal65
Hexadecimal41
Binary01000001
RP-U420Using the character code tables
Ver. 1.0
p. 25
Page 26
CONFIDENTIAL
RP-U420 supported commands
■ ■ ■
■ ■ ■
more
more
RP-U420 SUPPORTED COMMANDS
CommandClassificationNameFunction typePage
LF
FF
CR
RS
ESC !
ESC %
ESC &
ESC ✻
ESC <
ESC =
ESC ?
ESC @
E
XECUTING COMMAND
E
XECUTING COMMAND
E
XECUTING COMMAND
E
XECUTING COMMAND
S
ETTING COMMAND
S
ETTING COMMAND
S
ETTING COMMAND
E
XECUTING COMMAND
E
XECUTING COMMAND
S
ETTING COMMAND
S
ETTING COMMAND
E
XECUTING COMMAND
S
ETTING COMMAND
Print and line feed
Print and feed paper to print starting position
Print and carriage return
Journal tab
Select print mode(s)
Select/cancel user-defined character set
Define user-defined characters
Select bit-image mode
Return home
Select device
Cancel user-defined characters
Initialize printer
P
RINT COMMANDS
P
RINT COMMANDS
P
RINT COMMANDS
P
RINT POSITION COMMANDS
C
HARACTER COMMANDS
C
HARACTER COMMANDS
C
HARACTER COMMANDS
BIT-
IMAGE COMMANDS
M
ECHANISM CONTROL COMMANDS
M
ISCELLANEOUS COMMANDS
C
HARACTER COMMANDS
M
ISCELLANEOUS COMMANDS
28
29
30
31
32
34
36
38
41
42
43
44
ESC R
ESC c 0
ESC c 3
S
ETTING COMMAND
E
XECUTING COMMAND
S
ETTING COMMAND
S
ETTING COMMAND
Select an international character set
Select paper type(s) for printing
Select paper sensor(s) to output paper-end signals
RP-U420RP-U420 supported commands
C
HARACTER COMMANDS
P
RINTING PAPER COMMANDS
P
APER SENSOR COMMANDS
Ver. 1.0
p. 26
45
47
49
Page 27
CONFIDENTIAL
CommandClassificationNameFunction typePage
ESC c 4
ESC c 5
ESC d
ESC f
ESC o
ESC p
ESC t
ESC z
FS &
FS .
GS I
GS V
S
ETTING COMMAND
S
ETTING COMMAND
E
XECUTING COMMAND
S
ETTING COMMAND
E
XECUTING COMMAND
E
XECUTING COMMAND
S
ETTING COMMAND
S
ETTING COMMAND
S
ETTING COMMAND
S
ETTING COMMAND
E
XECUTING COMMAND
E
XECUTING COMMAND
Select paper sensor(s) to stop printing
Enable/disable panel buttons
Print and feed n lines
Set validation paper waiting time
Stamp
Generate pulse
Select character code table
Turn parallel printing mode on/off for receipt and
journal
Select Kanji character mode
Cancel Kanji character mode
Transmit printer ID
Feed paper to the cutting position and cut it
P
APER SENSOR COMMANDS
P
ANEL BUTTON COMMAND
P
RINT COMMANDS
P
RINTING PAPER COMMANDS
M
ECHANISM CONTROL COMMANDS
M
ISCELLANEOUS COMMANDS
C
HARACTER COMMANDS
C
HARACTER COMMANDS
K
ANJI COMMANDS
K
ANJI COMMANDS
M
ISCELLANEOUS COMMANDS
M
ECHANISM CONTROL COMMANDS
50
51
52
53
54
55
56
58
60
61
62
64
GS r
DLE EOT
DLE ENQ
DLE DC4
E
XECUTING COMMAND
E
XECUTING COMMAND
E
XECUTING COMMAND
E
XECUTING COMMAND
Transmit status
Real-time status transmission
Real-time request to printer
Generate pulse at real-time
RP-U420RP-U420 supported commands
S
TATUS COMMANDS
S
TATUS COMMANDS
M
ISCELLANEOUS COMMANDS
M
ISCELLANEOUS COMMANDS
Ver. 1.0
p. 27
67
69
74
76
Page 28
CONFIDENTIAL
Print commands
LF
[Name]
[Format]
[Range]
[Default]
[Description]
[Notes]This command sets the print position to the beginning of the line.
None
None
Prints the data in the print buffer and feeds one line, using 4.2 mm {1/6"}.
Program ExamplePrint Sample
E
XECUTING COMMAND
RP-U420Print commands LF
Ver. 1.0
p. 28
Page 29
CONFIDENTIAL
Print commands
FF
E
XECUTING COMMAND
[Name]
[Format]
[Range]
[Default]
[Description]
[Notes]■ This command is effective only in the Taiwan mode (when DIP switch 1-8 is ON). This mode can be set to
Print and feed paper to print starting position
ASCIIFF
Hex0C
Decimal12
None
None
When DIP switch 1-7 is OFF (autocutter installed):
When receipt is selected as the print sheet, prints the data in the print buffer and feeds to the next print
starting position and cut (one point left uncut).
When journal is selected as the print sheet, prints the data in the print buffer and feeds to the next print
starting position.
When DIP switch 1-7 is ON (manual cutter installed):
When receipt or journal is selected as the print sheet, prints the data in the print buffer and feeds to the
next print starting position.
the printer which is equipped with the Taiwan black mark sensor.
■ This command is effective only when receipt or journal is selected as the print sheet.
■ After the operation, the printer sets the print starting position to the beginning of a line.
■ The paper is not fed when the paper is present at the print starting position or when the mark sensor
detects the marked portion. The paper is fed when the paper is not present at the print starting position or
when the mark sensor does not detect the marked portion.
0Off 000Reserved
1Off000Reserved
2Off000Reserved
3Off000Reserved
4Off000Reserved
5Off000Double-width mode not selected
n
n
n
S
ETTING COMMAND
On2032Double-width mode selected
6Off000Reserved
7Off000Underline mode not selected
On80128Underline mode selected
[Notes]
If the underline is added to the characters to be printed, the lowest bit of the characters overlaps the
underline; therefore, this may cause difficulty in reading. Keep this in mind when the underline is added.
Select/cancel user-defined character set
ASCIIESC%
Hex1B25
Decimal2737
0 ≤ n ≤ 255
n
= 0
Selects or cancels the user-defined character set.
When the Least Significant Bit (LSB) is 0, the user-defined character set is canceled and the internal character
set is enabled.
When the LSB is 1, the user-defined character set is selected.
■ When the user-defined character set has been released, the internal character set is specified
automatically.
n
n
n
S
ETTING COMMAND
RP-U420Character commands ESC %
Ver. 1.0
p. 34
Page 35
CONFIDENTIAL
Program ExampleProgram Example (continued)
PRINT #1, CHR$(&H1B);"&";CHR$(2);"AC";
PRINT #1, CHR$(9);
FOR i=1 TO 2*9
READ d: PRINT #1, CHR$(d);
NEXT i
PRINT #1, CHR$(9);
FOR i=1 TO 2*9
READ d: PRINT #1, CHR$(d);
NEXT i
PRINT #1, CHR$(10);
FOR i=1 TO 2*10
READ d: PRINT #1, CHR$(d);
NEXT i
PRINT #1, CHR$(&H1B);"%";CHR$(0); ← Select resident character
PRINT #1, "A B C D E"; CHR$(&HA);
PRINT #1, CHR$(&H1B);"%";CHR$(1); ← Select user-defined character
PRINT #1, "A B C D E"; CHR$(&HA):
PRINT #1, CHR$(&H1B);"?";"A"; ← Cancel the user-defined character
PRINT #1, "A B C D E"; CHR$(&HA);
DATA &H18,&H00,&H00,&H00,&H3C,&H00,&H00,&H00
DATA &H7E,&H00,&H00,&H00,&H3C,&H00,&H00,&H00
DATA &H18,&H00
DATA &H18,&H00,&H00,&H00,&H24,&H00,&H00,&H00
DATA &H42,&H00,&H00,&H00,&H24,&H00,&H00,&H00
DATA &H18,&H00
DATA &H00,&H00,&H10,&H00,&H20,&H00,&H5F,&H00
DATA &H00,&H00,&H81,&H00,&H00,&H00,&H5F,&H00
DATA &H20,&H00,&H10,&H00
Print Sample
ABCDE ← Characters from resident character set
DE ← Characters from user-defined character set
♦◊×
◊×
DE ← Characters from user-defined character set (cancel one character)
A
RP-U420Character commands ESC %
Ver. 1.0
p. 35
Page 36
CONFIDENTIAL
Character commands
■ ■ ■
■ ■ ■
more
more
ESC &
[Name]
[Format]
[Range]
[Default]
[Description]
[Notes]■ Consecutive character codes for multiple characters can be defined in one definition.
Define user-defined characters
ASCIIESC &
Hex1B26
Decimal2738
y
= 2
32 ≤ c1 ≤ c2 ≤ 126
0 ≤ x ≤ 9
0 ≤ d ≤ 255
k
=
c2 – c1
None
Defines user-defined characters.
•y specifies the number of bytes in the vertical direction
•
c1
specifies the beginning character code for the definition, and c2 specifies the final code
•x specifies the number of dots in the horizontal direction
•
d
specifies the defined character data pattern
+ 1
y c1 c2
y c1 c2
y c1 c2 [x1 d1
[
x1 d1
[
x1 d1
... d(
... d(
... d(
y
×
x1
y
×
x1
y
×
x1
)] ... [
)] ... [
)] ... [
xk d1
xk d1
xk d1
... d(
... d(
... d(
y
×
xk
)]
y
×
xk
)]
y
×
xk
)]
S
ETTING COMMAND
■ "d" is definition data that indicates the pattern for "x" dots in the horizontal direction, starting from the
left edge. If "x" does not satisfy dots in the character configuration pattern (9 dots), the remaining dots
on the right are spaces.
■ In the definition data, a "1" represents a dot that is to be printed, and a "0" represents a dot that is not to
be printed.
■ Only the most significant bit of the second data byte in the vertical direction can be printed.
■ Independent user-defined character definitions are possible for the fonts if the character pattern is
different in the international character sets.
RP-U420Character commands ESC &
Ver. 1.0
p. 36
Page 37
CONFIDENTIAL
■ The defined downloaded characters are cleared in the following circumstances:
•When deleted by ESC ?
•When ESC @ is executed
•When a hardware reset is executed or the power is turned off
■ No user-defined characters are defined in the initial state.
■ If any user-defined characters are not defined, the internal character set (built-in) is selected.
■ If ESC Rn is executed, the user-defined characters that have been already defined are canceled.
[Example]7 × 9 font with 2-dot character space
MS B
LSB
MS B
When the dot pattern for code 20H is defined as shown above:
ESC &
yc1c2
X p1p2p3p4p5p6p7p8p9p10p11p12p13p14
Code1B 26 02 20 20 07 1F80 20 00 44 00 80 00 44 00 20 00 1F80
The corresponding bit is 1 when printing and 0 when not printing.
See program and print example for ESC %
ESC %.
ESC %ESC %
RP-U420Character commands ESC &
LSB
Ver. 1.0
p. 37
Page 38
CONFIDENTIAL
Bit-image commands
■ ■ ■
■ ■ ■
more
more
ESC
[Name]
[Format]
[Range]
[Default]
[Description]
✻✻✻✻
Select bit-image mode
ASCIIESC✻
Hex1B2A
Decimal2742
m
= 16, 17
0 ≤
n
L
≤ 255
0 ≤
n
H
≤ 3
0 ≤ d ≤ 255
k
= (
n
L
+
n
H
× 256) × 2
None
Selects a bit-image mode using m for the number of dots specified by
0 ≤ n ≤ 255
None
Prints the data in the print buffer and feeds n × 4.23 mm {1/6"}.
Program Example Print Sample
AAAAA
BBBBB
E
XECUTING COMMAND
RP-U420Print commands ESC d
CCCCC
ESC d used to print one line and advance the
paper by six lines
Ver. 1.0
p. 52
Page 53
CONFIDENTIAL
Printing paper commands
ESC f
[Name]
[Format]
[Range]
[Default]
[Description]
•
•When t1 is set to 0, the printer waits until validation paper is inserted.
[Notes]■ The setting values for this command are used for validation paper insertion.
Set validation paper waiting time
ASCIIESCf
Hex1B66
Decimal27102
t1 t2
t1 t2
t1 t2
0 ≤ t1 ≤ 15
0 ≤ t2 ≤ 64
t1
= 0, t2 = 10
Sets the time that the printer waits for validation paper to be inserted and the time from insertion of the
validation paper to the start of printing.
t1
specifies the wait time for validation paper to be inserted as [t1 × 1] minutes.
•
t2
specifies time from insertion of the validation paper to the start of printing as [t2 × 0.1] seconds.
■ When the waiting time t1 set by this command has passed, even though the validation paper is not
detected, the printer ends the validation paper waiting state. Then the printer selects both paper
sources—journal and receipt—for printing. If data is in the print buffer, the print data is printed on both
journal and receipt paper.
S
ETTING COMMAND
■ Waits for a validation paper to be inserted when the printer recovers from an error.
Program Example
PRINT #1, CHR$(&H1B);"f";CHR$(15);CHR$(20);
Select paper type
PRINT #1, CHR$(&H1B);"c0";CHR$(4);
←
RP-U420Printing paper commands ESC f
Ver. 1.0
p. 53
Page 54
CONFIDENTIAL
Mechanism control commands
ESC o
[Name]
[Format]
[Range]
[Default]
[Description]
[Notes]■ This command is enabled only when processed at the beginning of a line.
PRINT #1,CHR$(&H1B);"c0";CHR$(2); ← Select paper type
PRINT #1,CHR$(&H1B);"o";
PRINT #1,CHR$(&H1B);"d";CHR$(13);
PRINT #1," AAAAA";CHR$(&HA);
Stamp
ASCIIESCo
Hex1B6F
Decimal27111
None
None
Executes a stamp operation on the receipt.
■ If a receipt is not selected as the paper source, this command is ignored.
Program ExamplePrint Sample
← Stamp
YOUR RECEIPT
Thank you
Call again
E
XECUTING COMMAND
RP-U420Mechanism control commands ESC o
AAAAA
Ver. 1.0
p. 54
Page 55
CONFIDENTIAL
Miscellaneous commands
ESC p
[Name]
[Format]
[Range]
[Default]
[Description]
[Notes]■ The pulse ON time is [t1 × 2] ms, and the OFF time is [t2 × 2] ms.
Generate pulse
ASCIIESCp
Hex1B70
Decimal27112
m
= 0, 1, 48, 49
0 ≤ t1 ≤ 255
0 ≤ t2 ≤ 255
None
Outputs the pulse specified by t1 and t2 to connector pin m as follows:
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
Page 0
Page 1
RP-U420Character commands ESC t
Ver. 1.0
p. 57
Page 58
CONFIDENTIAL
Character commands
■ ■ ■
■ ■ ■
more
more
ESC z
[Name]
[Format]
[Range]
[Default]
[Description]
[Notes]■ Only the lowest bit of n is enabled.
Turn parallel printing mode on/off for receipt and journal
ASCIIESCz
Hex1B7A
Decimal27122
0 ≤ n ≤ 255
n
= 1 (when DIP switch 1-8 is ON: Taiwan mode)
n
= 0 (when DIP switch 1-8 is OFF: standard mode)
Turns parallel printing mode for receipt and journal on or off. When parallel printing mode is turned on, the
printer prints the same data on both receipt and journal paper.
•When the Least Significant Bit (LSB) of n is 0, turns off parallel printing mode
•When the LSB of n is 1, turns on parallel printing mode
■ This command is enabled only when input at the beginning of a line.
■ This command affects printing only when both print sources—journal and receipt—are selected for
printing.
■ When the parallel printing mode is turned off, the printing area can be developed for receipt and journal.
The first column in the print buffer is printed on the receipt. The print starting position moves to the first
column of the journal in the following case.
n
n
n
S
ETTING COMMAND
•When RS is executed
•When buffer full is processed at the end of the printing area on the receipt
(The data that causes the buffer full is printed on the first column of the journal)
RP-U420Character commands ESC z
Ver. 1.0
p. 58
Page 59
CONFIDENTIAL
PRINT #1, CHR$(&H1B);"c0";CHR$(3); ←Select paper types (receipt and journal)
PRINT #1, "AAAAAAAAAAAAAAAAAAAA";
PRINT #1, "BBBBBBBBBBBBBBBBBBBB";CHR$(&HA);
PRINT #1, CHR$(&H1B);"z";CHR$(1); ←Turn on parallel printing mode
PRINT #1, "CCCCCCCCCCCCCCCCCCCC";
PRINT #1, "DDDDDDDDDDDDDDDDDDDD";CHR$(&HA);
On 088Autocutter error occurs.
4On 1016Not used. Fixed to On.
5Off 000No unrecoverable error.
On2032Unrecoverable error occurs.
6Off000No print head temperature error.
On4064Print head temperature error occurs.
7Off000No mark sensor error.
On80128Mark sensor error occurs.
■ ■ ■
■ ■ ■
more
more
RP-U420Status commands DLE EOT
Ver. 1.0
p. 70
Page 71
CONFIDENTIAL
Bit 2: This bit becomes “On” when home position detecting error or main motor lock-up error is occurs.
Bit 7: When serial interface model and 7 bit data word length selected, this bit can not be transferred to
the host. Bit 7 is different from the ESC/POS Specification.
•
n
= 4: Paper roll sensor status
Bit Off/On Hex Decimal Function
0Off000Not used. Fixed to Off.
1On022Not used. Fixed to On.
2Off000Journal paper roll is not near end.
On044Journal paper roll near end is detected.
3Off000Receipt paper roll is not near end.
On088Receipt paper roll near end is detected.
4On1016Not used. Fixed to On.
5Off000Journal mark sensor does not detect black mark.
On2032Journal mark sensor is detecting black mark.
6Off000Receipt mark sensor does not detect black mark.
On4064Receipt mark sensor is detecting black mark.
7Off000Not used. Fixed to Off.
■ ■ ■
■ ■ ■
more
more
Bits 5 and 6 are different from the ESC/POS Specification.
RP-U420Status commands DLE EOT
Ver. 1.0
p. 71
Page 72
CONFIDENTIAL
•
n
= 6: Validation status
Bit Off/On Hex Decimal Function
0Off000Not used. Fixed to Off.
1On022Not used. Fixed to On.
2Off000Validation is not selected.
On044Validation is selected.
3Off000Not validation insertion waiting state.
On088Within validation insertion waiting state.
4On1016Not used. Fixed to On.
5Off000Validation sensor does not detect paper.
On2032Validation sensor is detecting paper.
6Off000Reserved. Fixed to Off.
7Off000Not used. Fixed to Off.
[Notes]■ The status is transmitted whenever the data sequence of <10>H <04>H <n>
(1 ≤ n ≤ 4 or 6) is received.
Example:
In ESC *
m nL nH d1...dk, d1
=<10>H, d2=<04>H, d3=<01>H
■ ■ ■
■ ■ ■
more
more
■ This command should not be used within the data sequence of another command that consists of 2 or
more bytes.
Example:
If you attempt to transmit ESC ! n to the printer, but DTR (DSR for the host computer) goes to MARK
before n is transmitted and then DLE EOT 3 interrupts before n is received, the code <10>H for
DLE EOT 3 is processed as the code for ESC ! <10>H.
■ Even though the printer is not selected using ESC = (select peripheral device), this command is effective.
■ The printer transmits the current status. Each status is represented by one-byte data.
■ The printer transmits the status without confirming whether the host computer can receive data.
■ The printer executes this command upon receiving it.
RP-U420Status commands DLE EOT
Ver. 1.0
p. 72
Page 73
CONFIDENTIAL
■ With a serial interface model, this command is executed even when the printer is offline, the receive buffer
is full, or there is an error status.
■ With a parallel interface model, the printer cannot receive data when it is busy; therefore this command
cannot be used under the following conditions.
PRINT #1, CHR$(&H10);CHR$(&H4);CHR$(2); ← Transmits offline status
Program Example
RP-U420Status commands DLE EOT
Ver. 1.0
p. 73
Page 74
CONFIDENTIAL
Miscellaneous commands
■ ■ ■
■ ■ ■
more
more
DLE ENQ
[Name]
[Format]
[Range]
[Default]
[Description]
[Notes]■ The printer executes this command upon receiving this command.
Real-time request to printer
ASCIIDLEENQ
Hex1005
Decimal165
1 ≤ n ≤ 3
None
Responds to a request from the host specified by n. The operations performed depend on the value of n, as
follows:
n
= 1: Recover from an error and restart printing from the line where the error occurred.
n
= 2:Clear the receive and print buffers and recover from an error.
n
= 3:Cancel waiting for validation.
■ With a serial interface model, this command is executed even in the offline, receive buffer-full, or error
states.
■ With a parallel interface model, the printer cannot receive data when it is busy; therefore this command
cannot be used under the following conditions.
n
n
n
E
XECUTING COMMAND
•When DIP Switch 1-6 is On: receive buffer-full.
•When DIP Switch 1-6 is Off: receive buffer-full, offline, error states.
■ This command is executed any time the data sequence <10>H<05>H<n> (1 ≤ n ≤ 3) is received, even if it
appears as part of another command.
<Example>
In ESC *
■ This command should not be used within the data sequence of another command that consists of two or
more bytes.
<Example>
If you attempt to transmit ESC ! n to the printer, but DLE ENQ 3 interrupts before n is received, the
code <10>H for DLE ENQ 3 is processed as the code for ESC ! <10>H.
m nL nH d1 ... dk, d1
=<10>H, d2=<05>H, d3=<1>
RP-U420Miscellaneous commands DLE ENQ
Ver. 1.0
p. 74
Page 75
CONFIDENTIAL
■ DLE ENQ 1 restarts printing from the line where the error occurred.
This command is available only for recoverable errors other than a print head temperature error.
■ DLE ENQ 2 enables the printer to recover from an error after clearing the data in the receive and print
buffers. The printer retains the settings (from ESC!, ESC R, for example) that were in effect when the
error occurred. Using DLE ENQ 2 and ESC @, the printer can be completely initialized. DLE ENQ 2 is
available only for recoverable errors other than a print head temperature error.
■ The printer selects both receipt and journal as the print sheet after recovering from an error by using DLE
ENQ 2.
■ DLE ENQ 3 is available only when the printer is waiting for the insertion of validation paper and is
ignored in other states. After the printer is released from the cut sheet waiting state, both receipt and
journal are selected as the print sheet.
■ When the cut sheet waiting state is canceled by DEL ENQ 3, the data in the receive and print buffers is
cleared.
■ DLE ENQ 1 and DLE ENQ 2 are enabled, even if the printer is canceled by ESC =.
.
Program Example
PRINT #1, CHR$(&H10);CHR$(&H5);CHR$(2);
RP-U420Miscellaneous commands DLE ENQ
Ver. 1.0
p. 75
Page 76
CONFIDENTIAL
Miscellaneous commands
■ ■ ■
■ ■ ■
more
more
DLE DC4
[Name]
[Format]
[Range]
[Default]
[Description]
[Notes]■ The printer executes this command upon receiving this command.
Generate pulse at real-time
ASCIIDLEDC4
Hex1014
Decimal1620
n
= 1
0 ≤ m ≤ 1
1 ≤ t ≤ 8
None
Outputs the pulse specified by t to connector pin m as follows:
•The pulse ON time is [t × 100] ms, and the OFF time is [t × 100] ms.
nmt
nmt
nmt
E
XECUTING COMMAND
■ This comand cannot be executed when the unrecoverable error occurs.
■ With a serial interface model, this command is executed even when the printer is offline, the receive buffer
is full, or there is an error status.
■ With a parallel interface model, the printer cannot receive data when it is busy; therefore this command
cannot be used under the following conditions.
■ This command is executed any time the data sequence <10>H<14>H<n><m> <0> is received, even if it
appears as part of another command.
<Example>
In ESC *
m nL nH d1 ... dk, d1
=<10>H, d2=<14>H, d3=<1>,d4=<0>, d5=<5>
RP-U420Miscellaneous commands DLE DC4
Ver. 1.0
p. 76
Page 77
CONFIDENTIAL
■ This command should not be used within the data sequence of another command that consists of two or
more bytes.
<Example>
If you attempt to transmit ESC ! n to the printer, but DLE DC4 105 interrupts before n is received, the
code <10>H for DLE DC4 is processed as the code for ESC ! <10>H.
■ This command is enabled even when the printer is not selected by ESC =.
■ If the printer receives this command during outputting pulse required by ESC p or DLE DC4 to the same
connector pin, this command will be ignored.
■ If the printer receives this command during outputting pulse required by ESC p or DLE DC4 to another
connector pin, this command will be queued and executed afterward.