Page 2 - C O N F I D E N T I A L; EPSON
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 CorporationSystem Device Division Notice: The contents of this manual are subject to change without notice EPSON and ESC/POS are registered trademarks of Sei...
Page 3 - THE INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS,” WITHOUT; Confidentiality; Agreement; C O N F I D
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 THISAGREEMENT. PLEASE RETURN THIS DOCUMENT IMMEDIATELY IF YOU DO NOTAGREE TO THESE TERMS. This document contains confidential, proprietary information of Seiko E...
Page 4 - more; System Processing; ESC o; -1 Journal and Receipt Combination Printing; USABLE APPLICATION PROGRAMS AND TIPS
C O N F I D E N T I A L RP-U420 Usable application programs and tips Ver. 1.0 p. 4 ■ ■ ■ 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 ...
Page 5 - Print Sample; Receipt; Stamp
C O N F I D E N T I A L RP-U420 Usable application programs and tips Ver. 1.0 p. 5 ■ ■ ■ more ■ ■ ■ more Print Sample Receipt Journal Stamp July 6, 2000, 10:30 ← Date and Time Item A Item B ← Cutting position July 6, 2000, 10:30 #12345 RP-U420 420 PS-170 170 TOTAL 590 RP-U420 420 PS-170 170 TOTAL 59...
Page 6 - System Processing Procedures; Procedure
C O N F I D E N T I A L RP-U420 Usable application programs and tips Ver. 1.0 p. 6 ■ ■ ■ more ■ ■ ■ more System Processing Procedures Step 4 is necessary for effective use of paper. Refer to the tips section for details. Procedure Commands used Description 1. Initialization ESC @ Executes initializa...
Page 7 - Programming Example
C O N F I D E N T I A L RP-U420 Usable application programs and tips Ver. 1.0 p. 7 ■ ■ ■ more ■ ■ ■ more Programming Example PRINT #1, CHR$(&H1B);"@"; ← Initializes the printer PRINT #1, CHR$(&H1B);"c0";CHR$(3); ← Selects a print sheet PRINT #1, CHR$(&H1B);"z";CHR...
Page 8 - -2 Issuing Taiwan Receipt; Predefined logo; Advertisement
C O N F I D E N T I A L RP-U420 Usable application programs and tips Ver. 1.0 p. 8 ■ ■ ■ 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) ...
Page 11 - Tips; on the position of each mechanism.
C O N F I D E N T I A L RP-U420 Usable application programs and tips Ver. 1.0 p. 11 ■ ■ ■ 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. If you want to print characters ...
Page 12 - Feed paper to the cutting position and execute a paper cut (; GS V; Note: 5 lines used in the procedures are a reference value.; FF; and execute a paper cut.; Paper position after FF is executed
C O N F I D E N T I A L RP-U420 Usable application programs and tips Ver. 1.0 p. 12 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...
Page 13 - DLE; or; DLE ENQ; beginning of the next line.; DEFINITIONS
C O N F I D E N T I A L RP-U420 Definitions Ver. 1.0 p. 13 ■ ■ ■ more ■ ■ ■ more Definitions (1) Normal commandsNormal 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 commandsReal...
Page 15 - SP in a table represents space. See; Using the character code tables; for information on how to read these tables.; CHARACTER CODE TABLES
C O N F I D E N T I A L RP-U420 Character code tables Ver. 1.0 p. 15 ■ ■ ■ more ■ ■ ■ more 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....
Page 25 - Binary; USING THE CHARACTER CODE TABLES
C O N F I D E N T I A L RP-U420 Using the character code tables Ver. 1.0 p. 25 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 ...
Page 26 - Command; RP-U420 SUPPORTED COMMANDS
C O N F I D E N T I A L RP-U420 RP-U420 supported commands Ver. 1.0 p. 26 ■ ■ ■ more ■ ■ ■ more RP-U420 supported commands Command Classification Name Function type Page LF E XECUTING COMMAND Print and line feed P RINT COMMANDS 28 FF E XECUTING COMMAND Print and feed paper to print starting position...
Page 28 - LF; Program Example
C O N F I D E N T I A L RP-U420 Print commands LF Ver. 1.0 p. 28 LF E XECUTING COMMAND [Name] Print and line feed [Format] ASCII LF Hex 0A Decimal 10 [Range] None [Default] None [Description] Prints the data in the print buffer and feeds one line, using 4.2 mm {1/6"}. [Notes] This command sets t...
Page 29 - Program Example for all printers
C O N F I D E N T I A L RP-U420 Print commands FF Ver. 1.0 p. 29 FF E XECUTING COMMAND [Name] Print and feed paper to print starting position [Format] ASCII FF Hex 0C Decimal 12 [Range] None [Default] None [Description] When DIP switch 1-7 is OFF (autocutter installed): When receipt is selected as t...
Page 30 - CR
C O N F I D E N T I A L RP-U420 Print commands CR Ver. 1.0 p. 30 CR E XECUTING COMMAND [Name] Print and carriage return [Format] ASCII CR Hex 0D Decimal 13 [Range] None [Default] None [Description] Prints the data in the print buffer and does not feed the paper. [Notes] Sets the print starting posit...
Page 31 - RS
C O N F I D E N T I A L RP-U420 Print position commands RS Ver. 1.0 p. 31 RS E XECUTING COMMAND [Name] Journal tab [Format] ASCII RS Hex 1E Decimal 30 [Range] None [Default] None [Description] Moves the print starting position to the beginning of the print area for the journal. [Notes] This command ...
Page 32 - Bit
C O N F I D E N T I A L RP-U420 Character commands ESC ! Ver. 1.0 p. 32 ■ ■ ■ more ■ ■ ■ more ESC ! S ETTING COMMAND [Name] Select print mode(s) [Format] ASCII ESC ! n Hex 1B 21 n Decimal 27 33 n [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] Selects print mode(s) using n as follows: [Notes] If t...
Page 34 - ASCII
C O N F I D E N T I A L RP-U420 Character commands ESC % Ver. 1.0 p. 34 ■ ■ ■ more ■ ■ ■ more ESC % S ETTING COMMAND [Name] Select/cancel user-defined character set [Format] ASCII ESC % n Hex 1B 25 n Decimal 27 37 n [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] Selects or cancels the user-define...
Page 36 - xk
C O N F I D E N T I A L RP-U420 Character commands ESC & Ver. 1.0 p. 36 ■ ■ ■ more ■ ■ ■ more ESC & S ETTING COMMAND [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 )] ... ...
Page 37 - ESC R
C O N F I D E N T I A L RP-U420 Character commands ESC & Ver. 1.0 p. 37 ■ 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...
Page 38 - Bit-image commands; ESC; m n
C O N F I D E N T I A L RP-U420 Bit-image commands ESC ✻ Ver. 1.0 p. 38 ■ ■ ■ more ■ ■ ■ more ESC ✻ ✻ ✻ ✻ E XECUTING COMMAND [Name] Select bit-image mode [Format] ASCII ESC ✻ m n L n H d1 ... dk Hex 1B 2A m n L n H d1 ... dk Decimal 27 42 m n L n H d1 ... dk [Range] m = 16, 17 0 ≤ n L ≤ 255 0 ≤ n H ...
Page 39 - adjacent dot is not printed.
C O N F I D E N T I A L RP-U420 Bit-image commands ESC ✻ Ver. 1.0 p. 39 ■ ■ ■ more ■ ■ ■ more ■ If an adjacent dot is specified for the bit image in double-density mode ( m = 17), the right side of the adjacent dot is not printed. ■ This command is not affected by print modes (double width or underl...
Page 42 - Function
C O N F I D E N T I A L RP-U420 Miscellaneous commands ESC = Ver. 1.0 p. 42 ESC = S ETTING COMMAND [Name] Select device [Format] ASCII ESC = n Hex 1B 3D n Decimal 27 61 n [Range] 1 ≤ n ≤ 3 [Default] n = 1 [Description] Selects the device to which the host computer sends data, using n as follows: [No...
Page 43 - See program and print example for
C O N F I D E N T I A L RP-U420 Character commands ESC ? Ver. 1.0 p. 43 ESC ? S ETTING COMMAND [Name] Cancel user-defined characters [Format] ASCII ESC ? n Hex 1B 3F n Decimal 27 63 n [Range] 32 ≤ n ≤ 126 [Default] None [Description] Deletes the user-defined character pattern that corresponds to the...
Page 45 - Country
C O N F I D E N T I A L RP-U420 Character commands ESC R Ver. 1.0 p. 45 ■ ■ ■ more ■ ■ ■ more ESC R S ETTING COMMAND [Name] Select an international character set [Format] ASCII ESC R n Hex 1B 52 n Decimal 27 82 n [Range] 0 ≤ n ≤ 13 [Default] n = 0 [Description] Selects an international character set...
Page 46 - If; is executed, the user-defined characters that are defined with
C O N F I D E N T I A L RP-U420 Character commands ESC R Ver. 1.0 p. 46 [Notes] ■ If ESC R n is executed, the user-defined characters that are defined with ESC & are canceled. Program Example Print Sample FOR n=0 TO 10 PRINT #1, CHR$(&H1B);"R";CHR$(n); PRINT #1, "# $ @ [ \ ] ^ ` ...
Page 47 - ESC c 0; ESC f
C O N F I D E N T I A L RP-U420 Printing paper commands ESC c 0 Ver. 1.0 p. 47 ■ ■ ■ more ■ ■ ■ more ESC c 0 E XECUTING COMMAND S ETTING COMMAND [Name] Select paper type(s) for printing [Format] ASCII ESC c 0 n Hex 1B 63 30 n Decimal 27 99 48 n [Range] 1 ≤ n ≤ 3, n = 8 [Default] n = 3 [Description] ...
Page 49 - ESC c 3
C O N F I D E N T I A L RP-U420 Paper sensor commands ESC c 3 Ver. 1.0 p. 49 ESC c 3 S ETTING COMMAND [Name] Select paper sensor(s) to output paper-end signals [Format] ASCII ESC c 3 n Hex 1B 63 33 n Decimal 27 99 51 n [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] Selects the paper sensor(s) to ...
Page 50 - ESC c 4
C O N F I D E N T I A L RP-U420 Paper sensor commands ESC c 4 Ver. 1.0 p. 50 ESC c 4 S ETTING COMMAND [Name] Select paper sensor(s) to stop printing [Format] ASCII ESC c 4 n Hex 1B 63 34 n Decimal 27 99 52 n [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] Selects the paper sensor(s) to use to stop...
Page 51 - ESC c 5
C O N F I D E N T I A L RP-U420 Panel button command ESC c 5 Ver. 1.0 p. 51 ESC c 5 S ETTING COMMAND [Name] Enable/disable panel buttons [Format] ASCII ESC c 5 n Hex 1B 63 35 n Decimal 27 99 53 n [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] Enables or disables the receipt/journal feed buttons. ...
Page 52 - ESC d
C O N F I D E N T I A L RP-U420 Print commands ESC d Ver. 1.0 p. 52 ESC d E XECUTING COMMAND [Name] Print and feed n lines [Format] ASCII ESC d n Hex 1B 64 n Decimal 27 100 n [Range] 0 ≤ n ≤ 255 [Default] None [Description] Prints the data in the print buffer and feeds n × 4.23 mm {1/6"}. [Notes...
Page 55 - ESC p
C O N F I D E N T I A L RP-U420 Miscellaneous commands ESC p Ver. 1.0 p. 55 ESC p E XECUTING COMMAND [Name] Generate pulse [Format] ASCII ESC p m t1 t2 Hex 1B 70 m t1 t2 Decimal 27 112 m t1 t2 [Range] m = 0, 1, 48, 49 0 ≤ t1 ≤ 255 0 ≤ t2 ≤ 255 [Default] None [Description] Outputs the pulse specified...
Page 56 - ESC t; See character code tables.
C O N F I D E N T I A L RP-U420 Character commands ESC t Ver. 1.0 p. 56 ■ ■ ■ more ■ ■ ■ more ESC t S ETTING COMMAND [Name] Select character code table [Format] ASCII ESC t n Hex 1B 74 n Decimal 27 116 n [Range] 0 ≤ n n n n ≤≤≤≤ 5, 16 ≤ n n n n ≤≤≤≤ 19, 254 ≤ n n n n ≤≤≤≤ 255 [Default] n = 0 [Descri...
Page 58 - ESC z
C O N F I D E N T I A L RP-U420 Character commands ESC z Ver. 1.0 p. 58 ■ ■ ■ more ■ ■ ■ more ESC z S ETTING COMMAND [Name] Turn parallel printing mode on/off for receipt and journal [Format] ASCII ESC z n Hex 1B 7A n Decimal 27 122 n [Range] 0 ≤ n ≤ 255 [Default] n = 1 (when DIP switch 1-8 is ON: T...
Page 62 - GS I; Printer ID
C O N F I D E N T I A L RP-U420 Miscellaneous commands GS I Ver. 1.0 p. 62 ■ ■ ■ more ■ ■ ■ more GS I E XECUTING COMMAND [Name] Transmit printer ID [Format] ASCII GS I n Hex 1D 49 n Decimal 29 73 n [Range] 1 ≤ n ≤ 3, 49 ≤ n ≤ 51, 65 ≤ n ≤ 67, n = 69 [Default] None [Description] Transmits the printer...
Page 63 - Hex Decimal Function
C O N F I D E N T I A L RP-U420 Miscellaneous commands GS I Ver. 1.0 p. 63 n = 2: Type ID [Notes] ■ The printer transmits the status after confirming the host is ready to receive data. If the host computer is not ready to receive data, the printer waits until the host becomes ready. ■ When the param...
Page 64 - Printer Operation Mode
C O N F I D E N T I A L RP-U420 Mechanism control commands GS V Ver. 1.0 p. 64 ■ ■ ■ more ■ ■ ■ more GS V E XECUTING COMMAND [Name] Feed paper to the cutting position and cut it [Format] ➀ ASCII GS V m Hex 1D 56 m Decimal 29 86 m ➁ ASCII GS V m n Hex 1D 56 m n Decimal 29 86 m n [Range] ➀ 0 ≤ m ≤ 2, ...
Page 67 - GS r
C O N F I D E N T I A L RP-U420 Status commands GS r Ver. 1.0 p. 67 ■ ■ ■ more ■ ■ ■ more GS r E XECUTING COMMAND [Name] Transmit status [Format] ASCII GS r n Hex 1D 72 n Decimal 29 114 n [Range] n = 1, 2, 49, 50 [Default] None [Description] Transmits the status specified by n, as follows: [Notes] ■...
Page 69 - DLE EOT
C O N F I D E N T I A L RP-U420 Status commands DLE EOT Ver. 1.0 p. 69 ■ ■ ■ more ■ ■ ■ more DLE EOT E XECUTING COMMAND [Name] Real-time status transmission [Format] ASCII DLE EOT n Hex 10 04 n Decimal 16 4 n [Range] 1 ≤ n ≤ 4, 6 [Default] None [Description] Transmits the selected printer status spe...
Page 70 - Bit Off/On Hex Decimal Function
C O N F I D E N T I A L RP-U420 Status commands DLE EOT Ver. 1.0 p. 70 ■ ■ ■ more ■ ■ ■ more • n = 2: Offline status • n = 3: Error status Bit Off/On Hex Decimal Function 0 Off 00 0 Not used. Fixed to Off. 1 On 02 2 Not used. Fixed to On. 2 Off 00 0 Cover is closed. On 04 4 Cover is open. 3 Off 00 0...
Page 72 - DLE EOT 3
C O N F I D E N T I A L RP-U420 Status commands DLE EOT Ver. 1.0 p. 72 ■ ■ ■ more ■ ■ ■ more • n = 6: Validation status [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>...
Page 74 - m n
C O N F I D E N T I A L RP-U420 Miscellaneous commands DLE ENQ Ver. 1.0 p. 74 ■ ■ ■ more ■ ■ ■ more DLE ENQ E XECUTING COMMAND [Name] Real-time request to printer [Format] ASCII DLE ENQ n Hex 10 05 n Decimal 16 5 n [Range] 1 ≤ n ≤ 3 [Default] None [Description] Responds to a request from the host sp...
Page 76 - DLE DC4
C O N F I D E N T I A L RP-U420 Miscellaneous commands DLE DC4 Ver. 1.0 p. 76 ■ ■ ■ more ■ ■ ■ more DLE DC4 E XECUTING COMMAND [Name] Generate pulse at real-time [Format] ASCII DLE DC4 n m t Hex 10 14 n m t Decimal 16 20 n m t [Range] n = 1 0 ≤ m ≤ 1 1 ≤ t ≤ 8 [Default] None [Description] Outputs th...