Epson TM-L60II, TM-T88II, TM-U300A/B, TM-U200B/D Technical Information

ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
Paper roll printers
EPSON
EPSON
TM-U200B/D
TM-T88II
TM-L60II
Features & Technical Information
Commands listed by function
Commands listed in alphanumeric order
Character code tables
Usable application programs and tips
Definitions
TM-U300A/B
CONFID
CONFID
CONFIDENTIAL
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS

TM-T88II

Features Specifications Self test Hex dump Supported commands
EPSON
EPSON
CONFID
CONFID
CONFIDENTIAL
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS

TM-L60II

Features Specifications Self test Hex dump Supported commands
EPSON
EPSON
CONFID
CONFID
CONFIDENTIAL
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS

TM-U200B/D

Features Specifications Self test Hex dump Supported commands
EPSON
EPSON
CONFID
CONFID
CONFIDENTIAL
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS
ESC/POS

TM-U300A/B

Features Specifications Self test Supported commands
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. It shows a receipt issue processing and its procedure using the TM-U200B.
Print Sample
E P S O N
Thank you
January 14, 1998 15:00
TM-U200B TM-U200D
PS-170
$20.00 $21.00 $17.00
Stamp
Item A
Date and Time
TOTAL
PAID CHANGE
$58.00
$60.00
$2.00
Paper roll Usable application programs and tips
Item B
Cutting Position
Ver. 4.0
p. 943
CONFIDENTIAL
more
System Processing Procedure
Procedure Commands used Description
1. Stamp printing
2. Print date and time
3. Print Item A
4. Print Item B
5. Cut paper
ESC 3, ESC a, ESC !, ESC U, ESC 2, LF, CR
ESC a, ESC d
ESC t, ESC !, LF
ESC !, ESC U, LF
GS V
Specifies a print position to the center by using the command. Prints a stamp data in the center of the paper roll in the unidirection. Adjusts line spacing for a line data being continuous.
Specifies a print position to the left by using the command after printing the date and time in the center of the paper roll.
Selects the 7 x 9 font by using the the Item A.
Specifies double-height by using the prints “TOTAL” in the unidirection. Cancels the double-height and prints in the bidirectional mode for other lines.
Feeds the paper to the cutting position and executes cutting.
ESC !
ESC !
■ ■ ■
■ ■ ■
ESC a
command and prints
command, and
more
ESC a
Paper roll Usable application programs and tips
Ver. 4.0
p. 944
CONFIDENTIAL
more
Programming Example
PRINT #1, CHR$(&H1B);"@"; ← Initializes the printer
GOSUB stamp
PRINT #1, CHR$(&H1B);"a";CHR$(1); PRINT #1, CHR$(&H1B);"!";CHR$(0); PRINT #1, CHR$(&H1B);"J";CHR$(4); PRINT #1, “January 14, 1998 15:00”; PRINT #1, CHR$(&H1B);"d";CHR$(3); PRINT #1, CHR$(&H1B);"a";CHR$(0);
PRINT #1, CHR$(&H1B);"!";CHR$(1); PRINT #1, "TM-U200B $20.00";CHR$(&HA); PRINT #1, "TM-U200D $21.00";CHR$(&HA); PRINT #1, "PS-170 $17.00";CHR$(&HA); PRINT #1, CHR$(&HA);
PRINT #1, CHR$(&H1B);”!”;CHR$(17); PRINT #1, CHR$(&H1B);”U”;CHR$(1); PRINT #1, "TOTAL $58.00";CHR$(&HA); PRINT #1, CHR$(&H1B);"U";CHR$(0); PRINT #1, CHR$(&H1B);”!”;CHR$(0); PRINT #1, "------------------------------";CHR$(&HA);
Prints stamp
Specifies a centered printing position
Specifies 9 x 9 font
Adjusts line spacing
Selects the left print position
Selects 7 x 9 font
Selects double-height mode
Selects uni-directional printing
Cancels uni-directional printing
Cancels double-height mode
Prints date and time
Item A
Item B
■ ■ ■
■ ■ ■
more
PRINT #1, "PAID $60.00";CHR$(&HA); PRINT #1, "CHANGE $ 2.00";CHR$(&HA);
PRINT #1, CHR$(&H1D);"V";CHR$(66);CHR$(0);
END
Feeds paper to the cutting position
and cuts paper
Paper roll Usable application programs and tips
Ver. 4.0
p. 945
CONFIDENTIAL
more
Programming Example (continued)
Stamp: PRINT #1, CHR$(&H1B);"3";CHR$(18); PRINT #1, CHR$(&H1B);"U";CHR$(1); PRINT #1, CHR$(&H1B);"a";CHR$(1);
PRINT #1, CHR$(&H1B);"!";CHR$(48); For I = 1 T0 14*2
READ d$: PRINT #1, CHR$(VAL (“&H”+d$));
NEXT I
PRINT #1, CHR$(&H1B);”!”;CHR$(0); PRINT #1, ”Thank you”;CHR$(&HD);
Sets line spacing
Selects uni-directional printing
Selects center print position
Selects double-height and double-width modes
Cancels double-height and double-width modes
Printing with CR
Prints stamp
■ ■ ■
■ ■ ■
more
Paper roll Usable application programs and tips
Ver. 4.0
p. 946
CONFIDENTIAL
more
Programming Example (continued)
PRINT #1, CHR$ (&H1B);”!”;CHR$(32); ← Selects double-height mode FOR I =1 TO 14
READ d$: PRINT #1, CHR$(VAL(“&H”+d$));
NEXT I
PRINT #1, CHR$ (&H1B);”!”;CHR$(48); FOR I =1 TO 14
READ d$: PRINT #1, CHR$(VAL(“&H”+d$));
NEXT I
PRINT #1,CHR$(&H1B);”U”;CHR$(0); PRINT #1,CHR$(&HB);”2”; RETURN
DATA C9, CD, CD, CD, CD, CD, CD, CD, CD, CD, CD, CD, BB, 0A DATA BA, 20, 20, 20, 45, 50, 53, 4F, 4E, 20, 20, 20, BA, 0A DATA BA, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, BA, 0A DATA C8, CD, CD, CD, CD, CD, CD, CD, CD, CD, CD, CD, BC, 0A
Cancels uni-directional printing
Selects double-height and double-width modes
Prints stamp
Stamp data
■ ■ ■
■ ■ ■
more
Paper roll Usable application programs and tips
Ver. 4.0
p. 947
CONFIDENTIAL
more
Tips (Print commands)
■ ■ ■
■ ■ ■
more
These are the print commands. All the commands have the same printing result but an operation after printing differs depending on the command. Using the appropriate command enables you to easily make an effective program for issuing a receipt.
<LF: Print and line feed>
The command is used to print and feed one line.
<CR: Print and carriage return>
With a serial interface or a parallel interface with auto line feed disabled, if the printer has a serial dot head, printing on the same line is enabled. The program example shows a procedure for overwriting the previous line.
The program example illustrates printing with CR shown in lines 100, 120, and 140 and if you do not have any corrections, then you feed paper with LF shown in lines 110, and 150. When you have a correction, transmitting [character data + LF] to perform printing on the same line shown in line 130. Sending bit image data instead of character data enables execution of mesh printing.
Program Example Print Sample
100 PRINT #1, “TM-U200B $20.00”;CHR$(&HD); ← Print using CR 110 PRINT #1, CHR$(&HA); 120 PRINT #1, “TM-U200D $24.00”;CHR$(&HD); 130 PRINT #1, “ 140 PRINT #1, “TM-U200D $21.00”;CHR$(&HD); 150 PRINT #1, CHR$(&HA);
Line feed using LF
Line feed using LF
Print using CR
”;CHR$(&HA); ← Print and line feed using LF
Print using CR
TM-U200B $20.00 TM-U200D $24.00 TM-U200D $21.00
Ver. 4.0
Paper roll Usable application programs and tips
p. 948
CONFIDENTIAL
more
ESC d
<
The command is used to feed paper continuously. The printing result is the same as when transmitting LF n times continuously. Using feed time, since LF is used for repeating one line paper feed n times. However, for n lines.
ESC J
<
: Print and feed n lines>
: Print and feed paper>
ESC d
enables you to feed paper smoothly and to shorten paper
ESC d
■ ■ ■
■ ■ ■
is used to feed paper
more
This command is used to adjust line spacing. after setting line spacing with the next line. If you use without resetting the line spacing.
<Other print commands>
Special print commands are shown below: Some printers support the commands.
ESC K FF
or
FF
or
ESC e
or
ESC FF GS FF
is used to feed paper in the reverse direction.
is used to print page mode data.
is used to print a label.
ESC J
ESC 3
, the current line spacing is not changed and it is possible to print the next line
. If you use [
ESC J
ESC 3
n has the same printing result as when transmitting LF
+ LF], you need to reset line spacing when printing
Paper roll Usable application programs and tips
Ver. 4.0
p. 949
CONFIDENTIAL
more
System Processing
■ ■ ■
■ ■ ■
more
This example illustrates ESC/POS command functions and printing results. It shows a receipt issue processing with a bar code and its procedure using the TM-T88II.
Set DIP switch 2-1 of the TM-T88 to On (customer display connected), insert the plug of the DM-D102 firmly into the customer display connector (DM-D) which is on the bottom of the printer, and then turn on the printer power.
Refer to
GS k
for a bar code printing in detail.
Print Sample
YOUR RECEIPT
Thank you
December 10, 1997 15:00
Stamp
TM-T88 PS-170 $17.00
TOTAL
PAID CHANGE
<< Bonus points : 21 >>
0 0 0 2 1
$88.00
$105.00
$110.00
$5.00
Paper roll Usable application programs and tips
Item
Bar code
Paper cutting
Ver. 4.0
p. 950
CONFIDENTIAL
more
System Processing Procedure
Procedure Commands used Description
1. Set a default
2. Define stamp data
3. Stamp
4. Print an item
5. Print a bar code
6. Paper cut
ESC @, ESC D, GS P
GS
ESC a, GS /, ESC J, LF, ESC d
ESC a, HT, LF, GS !, ESC d
ESC a, ESC J, GS h, GS H, GS f, GS k
GS V
Set a horizontal tab position and horizontal and vertical motion units.
Define a downloaded bit image for a stamp. After selecting the center justification for the printing position
with time.
After selecting the left justification for the printing position with
Print a message “Bonus point” and a bar code. The example uses CODE39 bar code.
Execute cutting.
ESC a
ESC a
■ ■ ■
■ ■ ■
, print the stamp (downloaded bit image), date, and
, print an item. Align the character columns with HT.
more
Paper roll Usable application programs and tips
Ver. 4.0
p. 951
CONFIDENTIAL
more
Set a default
Print an item
Stamp
Define a downloaded bit image
Print a bar code
Programming Example
PRINT #1, CHR$(&H1B);"@"; ← Initialize the printer PRINT #1, CHR$(&H1B);"D";CHR$(34);CHR$(0) PRINT #1, CHR$(&H1B);"P";CHR$(180);CHR$(180)
PRINT #1, CHR$(&H1D);"*";CHR$(30);CHR$(5); FOR i=1 TO 1200
READ a$ PRINT #1, CHR$(VAL(“&H”+a$));
NEXT i
PRINT #1, CHR$(&H1B);"a";CHR$(1); PRINT #1, CHR$(&H1D);"/";CHR$(2); PRINT #1, CHR$(&H1B);"J";CHR$(8); PRINT #1, “Thank you”; CHR$(&HA); PRINT #1, “December 10, 1997 15:00”; PRINT #1, CHR$(&H1B);"d";CHR$(3);
PRINT #1, CHR$(&H1B);"a";CHR$(0); PRINT #1, “TM-T88”;CHR$(&H9);" $88.00";CHR$(&HA); PRINT #1, “PS-170”;CHR$(&H9);" $17.00";CHR$(&HA);CHR$(&HA); PRINT #1, CHR$(&H1D);"!";CHR$(1); PRINT #1, “TOTAL”;CHR$(&H9);"$105.00";CHR$(&HA); PRINT #1, CHR$(&H1D);"!";CHR$(0); PRINT #1, “-------------------------------------";CHR$(&HA); PRINT #1, “PAID”;CHR$(&H9);"$110.00";CHR$(&HA); PRINT #1, “CHANGE”;CHR$(&H9);" $5.00"; PRINT #1, CHR$(&H1B);"d";CHR$(3);
Set horizontal tab position
Set horizontal and vertical motion units
Justification (center)
Print the downloaded bit image
Paper feed
Print and 3-line paper feed
Justification (left)
Select font size (double-height)
Select font size (standard)
Print and 3-line paper feed
■ ■ ■
■ ■ ■
more
PRINT #1, CHR$(&H1B);"a";CHR$(1); PRINT #1, “<<Bonus points : 21>>"; PRINT #1, CHR$(&H1B);”J”;CHR$(35); PRINT #1, CHR$(&H1D);"h";CHR$(50); PRINT #1, CHR$(&H1D);"H";CHR$(2); PRINT #1, CHR$(&H1D);"f";CHR$(1); PRINT #1, CHR$(&H1D);"k";CHR$(4);
PRINT #1, CHR$(&H1D);"V";CHR$(66);CHR$(30); END
Justification (center)
Print and paper feed
Set bar code height
Select printing position of HRI characters
Select font for HRI characters
Print bar code
Paper cut
Paper roll Usable application programs and tips
Ver. 4.0
p. 952
CONFIDENTIAL
more
Programming Example (continued)
DATA 15,55,55,55,50,2A,AA,AA,AA,A8,55,55,55,55,54,A0,00,00,00,0A,40,00,00,00,04 DATA 80,00,00,00,02,40,00,00,00,04,80,00,00,00,02,48,00,00,00,04,85,00,00,00,02 DATA 4A,A0,00,00,04,85,54,00,00,02,4A,AA,80,00,04,85,55,50,00,02,40,AA,A8,00,04 DATA 80,15,54,00,02,40,02,AA,AA,A4,80,00,55,55,42,40,00,0A,AA,A4,80,00,55,55,42 DATA 40,02,AA,AA,A4,80,15,54,00,02,40,AA,A8,00,04,85,55,50,00,02,4A,AA,80,00,04 DATA 85,54,00,00,02,4A,A0,00,00,04,85,00,00,00,02,48,00,00,00,04,80,00,00,00,02 DATA 40,2A,AA,A8,04,80,55,55,54,02,40,AA,AA,AA,04,81,55,55,55,02,42,Aa,AA,AA,84 DATA 85,40,00,05,42,4A,80,00,02,A4,85,00,00,01,42,4A,80,00,02,A4,85,00,00,01,42 DATA 4A,80,00,02,A4,85,00,00,01,42,4A,80,00,02,A4,85,00,00,01,42,4A,80,00,02,A4 DATA 85,40,00,05,42,42,AA,AA,AA,84,81,55,55,55,02,40,AA,AA,AA,04,80,55,55,54,02 DATA 40,2A,AA,A8,04,80,00,00,00,02,40,00,00,00,04,80,00,00,00,02,4A,AA,AA,A8,04 DATA 85,55,55,54,02,4A,AA,AA,AA,04,85,55,55,55,02,4A,AA,AA,AA,84,80,00,00,05,42 DATA 40,00,00,02,A4,80,00,00,01,42,40,00,00,02,A4,80,00,00,01,42,40,00,00,02,A4 DATA 80,00,00,01,42,40,00,00,02,A4,80,00,00,01,42,40,00,00,02,A4,80,00,00,05,42 DATA 4A,AA,AA,AA,84,85,55,55,55,02,4A,AA,AA,AA,04,85,55,55,54,02,4A,AA,AA,A8,04 DATA 80,00,00,00,02,40,00,00,00,04,80,00,00,00,02,4A,AA,AA,AA,A4,85,55,55,55,42 DATA 4A,AA,AA,AA,A4,85,55,55,55,42,4A,AA,AA,AA,A4,85,00,14,00,02,4A,80,2A,00,04 DATA 85,00,14,00,02,4A,80,2A,00,04,85,00,15,00,02,4A,80,2A,80,04,85,00,15,40,02 DATA 4A,80,2A,AA,A4,85,55,55,55,42,42,AA,A8,AA,A4,81,55,50,55,42,40,AA,A0,2A,A4 DATA 80,55,40,00,02,40,00,00,00,04,80,00,00,00,02,40,00,00,00,04,80,00,00,00,02 DATA 40,00,00,00,04,80,00,00,00,02,40,00,00,00,04,80,00,00,00,02,4A,AA,AA,AA,A4 DATA 85,55,55,55,42,4A,AA,AA,AA,A4,85,55,55,55,42,4A,AA,AA,AA,A4,85,00,14,00,02 DATA 4A,80,2A,00,04,85,00,14,00,02,4A,80,2A,00,04,85,00,15,00,02,4A,80,2A,80,04 DATA 85,00,15,40,02,4A,80,2A,AA,A4,85,55,55,55,42,42,AA,A8,Aa,A4,81,55,50,55,42 DATA 40,AA,A0,2A,A4,80,55,40,00,02,40,00,00,00,04,80,00,00,00,02,40,00,00,00,04 DATA 8A,AA,AA,AA,A2,45,55,55,55,44,8A,AA,AA,AA,A2,45,55,55,55,44,8A,AA,AA,AA,A2 DATA 45,00,50,01,44,8A,80,A8,02,A2,45,00,50,01,44,8A,80,A8,02,A2,45,00,50,01,44 DATA 8A,80,A8,02,A2,45,00,50,01,44,8A,80,A8,02,A2,45,00,00,01,44,8A,80,00,02,A2 DATA 40,00,00,00,04,80,00,00,00,02,40,00,00,00,04,80,15,55,50,02,40,2A,AA,A8,04 DATA 80,55,55,54,02,40,AA,AA,AA,04,81,55,55,55,02,42,A0,00,0A,84,85,40,00,05,42 DATA 4A,80,00,02,A4,85,00,00,01,42,4A,80,00,02,A4,85,00,00,01,42,4A,80,00,02,A4 DATA 85,00,00,01,42,4A,80,00,02,A4,85,00,00,01,42,4A,80,00,02,A4,80,00,00,00,02 DATA 40,00,00,00,04,80,00,00,00,02,4A,AA,AA,AA,A4,85,55,55,55,42,4A,AA,AA,AA,A4 DATA 85,55,55,55,42,4A, AA, AA, AA, A4,85,00,50,01,42,4A, 80, A8,02, A4,85,00,50,01,42 DATA 4A, 80, A8,02, A4,85,00, 50,01,42,4A, 80, A8,02, A4,85,00,50,01,42,4A, 80, A8,02, A4 DATA 85,00,00,01,42,4A, 80, 00,02, A4,80,00,00,00,02,40,00,00,00,04,80,00,00,00,02
Stamp data (downloaded bit image)
■ ■ ■
■ ■ ■
more
Paper roll Usable application programs and tips
Ver. 4.0
p. 953
CONFIDENTIAL
more
Programming Example (continued)
DATA 85,55,55,55,42,4A,AA,AA,AA,A4,85,00,50,01,42,4A,80,A8,02,A4,85,00,50,01,42 DATA 4A,80,A8,02,A4,85,00,50,01,42,4A,80,A8,02,A4,85,00,50,01,42,4A,80,A8,02,A4 DATA 85,00,00,01,42,4A,80,00,02,A4,80,00,00,00,02,40,00,00,00,04,80,00,00,00,02 DATA 40,00,00,00,04,8A,AA,AA,AA,A2,45,55,55,55,44,8A,AA,AA,AA,A2,45,55,55,55,44 DATA 8A,AA,AA,AA,A2,40,00,00,00,04,80,00,00,00,02,40,00,00,00,04,80,00,00,00,02 DATA 4A,AA,AA,AA,A4,85,55,55,55,42,4A,AA,AA,AA,A4,85,55,55,55,42,4A,AA,AA,AA,A4 DATA 85,00,14,00,02,4A,80,2A,00,04,85,00,14,00,02,4A,80,2A,00,04,85,00,14,00,02 DATA 4A,80,2A,00,04,85,00,14,00,02,4A,80,2A,00,04,85,55,54,00,02,42,AA,A8,00,04 DATA 81,55,50,00,02,40,AA,A0,00,04,80,55,40,00,02,40,00,00,00,04,80,00,00,00,02 DATA 4A,80,00,00,04,85,00,00,00,02,4A,80,00,00,04,85,00,00,00,02,4A,80,00,00,04 DATA 85,00,00,00,02,4A,80,00,00,04,85,00,00,00,02,4A,AA,AA,AA,A4,85,55,55,55,42 DATA 4A,AA,AA,AA,A4,85,55,55,55,42,4A,AA,AA,AA,A4,85,00,00,00,02,4A,80,00,00,04 DATA 85,00,00,00,02,4A,80,00,00,04,85,00,00,00,02,4A,80,00,00,04,85,00,00,00,02 DATA 4A,80,00,00,04,80,00,00,00,02,40,00,00,00,04,80,00,00,00,02,40,00,00,00,04 DATA A0,00,00,00,0A,55,55,55,55,54,2A,AA,AA,AA,A8,15,55,55,55,50,00,00,00,00,00
Stamp data (downloaded bit image)
■ ■ ■
■ ■ ■
more
Paper roll Usable application programs and tips
Ver. 4.0
p. 954
CONFIDENTIAL
more
Tips (bar code printing)
Some printers such as the TM-T88II and TM-L60II support bar code printing. ESC/POS supports UPC-A, UPC-E, JAN13(EAN13), JAN8(EAN8), CODE39, ITF (interleaved 2 of 5), CODABAR(NW7), CODE93, and CODE128.
When the standard mode is selected, a bar code and a character cannot be printed on the same printing line and a ladder bar code cannot be printed. Page mode, which has a flexible layout for printing a character, a bit image, and a bar code, should be selected when printing a bar code and a character on the same line or printing a ladder code. When page mode is selected, a character and a bar code can be overlapped but the bar code cannot be read. Be sure to check data layout so that a bar code can be read.
Basic processing for bar code printing (example):
Procedures:
1. Select a bar code height with
2. Select a bar code width with
3. Select the printing position for HRI characters with
GS h
GS w
. The height of a HRI character cannot be selected by
.
GS H
.
■ ■ ■
■ ■ ■
GS h
more
.
4. Select a font for HRI characters with
5. Print a bar code with
Procedures 1 to 4 can be omitted. If there is no specified value, a default value is used. The settings from 1 to 4 are effective until the printer is initialized ( both functions “storing a bar code data in the print buffer” and “printing.” Therefore, no print command is needed.
Paper roll Usable application programs and tips
GS k
.
GS f
. The setting affects only the HRI characters.
ESC @
), reset, or is turned off.
Ver. 4.0
p. 955
GS k
in procedure 5 supports
CONFIDENTIAL
more
Causes for not printing a bar code:
1. The bar code width set by printing area.
2. There are so many bar code data set by
3. There is character data which cannot be printed with a bar code set by
4. The number of bar code data is few when selecting UPC-A, UPC-E, JAN13(EAN13), or JAN8(EAN8) with
GS k
5. When selecting ITF bar code with
6. When selecting CODE128 with be character data which is not included in the specified code set.
7. When processing
8. When processing
.
GS k GS k
GS w
in standard mode, there is already print data in the print buffer.
in page mode, the printing position is already outside of the printing area.
is so large that not all data will fit in the current
GS k
GS k
GS k
, bar code data is odd number.
, the first data is none of CODE A, CODE B, and CODE C. There might
that not all data will fit in the current printing area.
GS k
.
■ ■ ■
■ ■ ■
more
Paper roll Usable application programs and tips
Ver. 4.0
p. 956
CONFIDENTIAL
more
Page Mode Printing
This example illustrates ESC/POS command functions and printing results. The example shows a coupon issue processing and its procedure using page mode function with the TM-T88II. You can use the page mode to rotate data so that you can print characters, bar codes, and bit images that would not fit in the printable area in the standard mode.
■ ■ ■
■ ■ ■
more
Print Sample
Paper roll Usable application programs and tips
Paper feed direction
Ver. 4.0
p. 957
CONFIDENTIAL
more
System Processing Procedure
Procedure Commands used Description
1. Select page mode
2. Transmit edge data
3. Transmit a message
4. Transmit data for symbols A and B
5. Transmit bar code data
ESC L, GS P
ESC W, ESC T, ESC
ESC W, ESC T, GS !, LF, ESC J
ESC W, ESC T, ESC 3, ESC
ESC W, ESC T, GS H GS f, GS h, GS w, GS $, GS k
Select page mode. Change horizontal and vertical motion units to set normal dot units.
Select the printing area for edge data with printing direction with Transmit the edge data as bit image.
Select the printing area for message data with printing direction with Select a character size with
Select the printing area for symbol data with printing direction with Transmit data for symbols A and B as bit image.
Select the printing area for a bar code with printing direction with After setting bit images with for CODE 39 bar code to the printing position set by
ESC T
ESC T
GS !
ESC T
ESC T
■ ■ ■
■ ■ ■
ESC W
.
.
and transmit message data.
ESC W
.
ESC W
.
GS H
and
GS f
, etc., transmit data
and the
ESC W
and the
and the
GS $
more
and the
.
6. Printing all data
7. Return to standard mode
When printing multiple coupons, transmits
Paper roll Usable application programs and tips
ESC FF, GS V
ESC S
Print all data collectively in page mode and cut paper.
Return to standard mode. All data in page mode are cleared.
ESC FF
and
GS V
times you want to print in procedure 6.
Ver. 4.0
p. 958
CONFIDENTIAL
more
Program Example
PRINT #1, CHR$(&H1B);"@"; PRINT #1, CHR$(&H1B);"L";
PRINT #1, CHR$(&H1D);"P";CHR$(180);CHR&(180);
PRINT #1, CHR$(&H1B);"W";CHR$(6);CHR $(0);CHR$(0);CHR$(0);CHR$(244);CHR$(1);CHR$(238);CHR$(2); PRINT #1, CHR$($H1B);"T";CHR$(0); n=10: GOSUB Edge PRINT #1, CHR$(&H1B);"T";CHR$(1); n=15: GOSUB Edge PRINT #1, CHR$(&H1B);"T";CHR$(2); n=10: GOSUB Edge PRINT #1, CHR$(&H1B);"T";CHR$(3); n=15: GOSUB Edge
PRINT #1, CHR$(&H1B);"W";CHR$(140);CHR$(0);CHR$(118);CHR$(0);CHR$(104);CHR$(1);CHR$(16);CHR$(2); PRINT #1, CHR$(&H1B);"T";CHR$(1); PRINT #1, CHR$(&H1D);"!";CHR$(17); PRINT #1, CHR$(&HA);" Merry Christmas !!";CHR$(&HA);CHR$(&HA); PRINT #1, CHR$(&H1D);"!";CHR$(16); PRINT #1, " 10% OFF COUPON";CHR$(&H1B);"J":CHR$(200); PRINT #1, "EPSON DEPARTMENT STORE";
Select page mode
Initialize the printer
Set horizontal and vertical motion units
Select printing direction (left to right)
Select printing direction (bottom to up)
Select printing direction (right to left)
Select printing direction (up to bottom)
Select printing direction (bottom to up)
Transmit edge data
Transmit a message
■ ■ ■
■ ■ ■
more
PRINT #1, CHR$(&H1B);"W";CHR$(50);CHR $(0);CHR$(76);CHR$(2);CHR$(72);CHR$(0);CHR$(68);CHR$(0); PRINT #1, CHR$(&H1B);"T";CHR$(1); PRINT #1, CHR$(&H1B);"3";CHR$(24); PRINT #1, CHR$(&H1B);"*";CHR$(0);CHR$(34);CHR$(0)
FOR c=1 to 34 READ a$: PRINT #1, CHR$(VAL("&H"+a$));:NEXT c
PRINT #1, CHR$(&H1B);"*";CHR$(0);CHR$(34);CHR$(0)
FOR c=1 to 34 READ a$: PRINT #1, CHR$(VAL("&H"+a$));:NEXT c
PRINT #1, CHR$(&H1B);"*";CHR$(0);CHR$(34);CHR$(0)
FOR c=1 to 34 READ a$: PRINT #1, CHR$(VAL("&H"+a$));:NEXT c
(Continued on next page)
Select printing direction (bottom to up)
Paper roll Usable application programs and tips
Transmit data for symbol A
Ver. 4.0
p. 959
CONFIDENTIAL
more
Program Example (continued)
PRINT #1, CHR$(&H1B);"W";CHR$(58);CHR $(1);CHR$(102);CHR$(0);CHR$(72);CHR$(0);CHR$(96);CHR$(0); PRINT #1, CHR$(&H1B);"T";CHR$(1); PRINT #1, CHR$(&H1B);"*";CHR$(0);CHR$(48);CHR$(0)
FOR c=1 to 48 READ a$: PRINT #1, CHR$(VAL("&H"+a$));:NEXT c
PRINT #1, CHR$(&H1B);"*";CHR$(0);CHR$(48);CHR$(0)
FOR c=1 to 48 READ a$: PRINT #1, CHR$(VAL("&H"+a$));:NEXT c
PRINT #1, CHR$(&H1B);"*";CHR$(0);CHR$(48);CHR$(0)
FOR c=1 to 48 READ a$: PRINT #1, CHR$(VAL("&H"+a$));:NEXT c
PRINT #1, CHR$(&H1B);"W";CHR$(20);CHR $(1);CHR$(226);CHR$(0);CHR$(70);CHR$(0);CHR$(56);CHR$(1); PRINT #1, CHR$(&H1B);"T";CHR$(1);
PRINT #1, CHR$(&H1D);"H";CHR$(2); PRINT #1, CHR$(&H1D);"f";CHR$(1); PRINT #1, CHR$(&H1D);"h";CHR$(40); PRINT #1, CHR$(&H1D);"w";CHR$(2); PRINT #1, CHR$(&H1D);"$";CHR$(40);CHR$(0);
PRINT #1, CHR$(&H1D);"k";CHR$(4);"*10% OFF*";CHR$(0);
PRINT #1, CHR$(&H1B);CHR$(&HC); PRINT #1, CHR$(&H1D);"V";CHR$(66);CHR$(80); PRINT #1, CHR$(&H1B);"S";
END
Select printing direction (bottom to up)
Select printing direction (bottom to up) Select printing position of HRI characters (bottom) Select font for HRI characters (font B)
Set bar code height
Set bar code width
Print data collectively
Return to standard mode
Set absolute vertical print position
Cut paper
Transmit data for symbol B
Transmit bar code
■ ■ ■
■ ■ ■
more
Edge FOR i=1 To n PRINT #1, CHR$(&H1B);"*";CHR$(0);CHR$(25);CHR$(0);
PRINT #1, CHR$(128);CHR$(128);CHR$(128);CHR$(96);CHR$(128); PRINT #1, CHR$(128);CHR$(128);CHR$(166);CHR$(165);CHR$(81); PRINT #1, CHR$(78);CHR$(32);CHR$(26);CHR$(32);CHR$(78);
PRINT #1, CHR$(81);CHR$(165);CHR$(166);CHR$(128);CHR$(128); NEXT i RETURN
(Continued on next page)
Paper roll Usable application programs and tips
Subroutine for transmitting the edge data
Ver. 4.0
p. 960
CONFIDENTIAL
more
Program Example (continued)
DATA 00,00,00,00,00,00,01,01,03,03,05,05,28,28,38,38 DATA F0,F0,38,38,28,28,05,05,03,03,01,01,00,00,00,00,00,00 DATA 00,00,08,08,19,19,2A,2A,4C,4C,82,82,47,47,E2,E2 DATA 40,40,11,11,3B,3B,91,91,4C,4C,2A,2A,19,19,08,08,00,00 DATA 40,40,C0,C0,40,40,5C,5C,57,57,55,55,55,55,75,75 DATA 55,55,75,75,D5,D5,55,55,57,57,5C,5C,40,40,C0,C0,40,40
DATA 00,00,00,00,00,00,00,00,07,07,09,09,7D,7D,10,10,16,16,78,F8,FC,7C,3E,3E DATA 3E,3E,7C,FC,F8,78,16,16,10,10,7D,7D,09,09,07,07,00,00,00,00,00,00,00,00 DATA 1F,1F,24,24,41,41,42,42,F1,F1,29,29,49,49,AC,AC,94,94,AC,AC,C4,C4,AC,AC DATA 94,94,AC,AC,C4,C4,AC,AC,94,94,69,69,49,49,F1,F1,42,42,41,41,24,24,1F,1F DATA F0,F0,48,48,24,24,64,64,12,12,52,52,52,52,89,89,A9,A9,89,89,99,99,C9,C9 DATA 89,89,99,99,C9,C9,A9,A9,89,89,12,12,52,52,12,12,24,24,A4,A4,C8,C8,F0,F0
Data for symbol A
Data for symbol B
■ ■ ■
■ ■ ■
more
Paper roll Usable application programs and tips
Ver. 4.0
p. 961
CONFIDENTIAL
more
Tips (standard mode/page mode)
Some of the TM printers, such as the TM-T88II and the TM-L60II, support two different print modes: standard mode and page mode.
The standard mode is supported by all printers and in this mode, the printers print data in the print buffer by executing the print commands (such as LF, CR, and
The standard mode is the print mode which prints data one line at a time.
The page mode executes batch printing with FF or page mode is selected with
ESC J
or to standard mode. The page mode is the print mode which prints data one page at a time.
, only move the printing position and do not execute actual printing. Executing
ESC L
. In this mode, the print commands other than FF or
Standard mode
ESC S, FF
ESC J
ESC FF
ESC L
) or when the buffer is full.
for all data in the print buffer stored after the
ESC FF
Page mode
■ ■ ■
■ ■ ■
, such as LF, CR,
ESC S
or FF returns
more
Basic processing procedure for the page mode:
9. Select the page mode with
10.Set the position and size for the printing area with
11.Select the starting position and the direction for data development with
12.Store print data (such as characters or bit images) in the print buffer.
13.Print all data in the print buffer collectively with
14.Return to standard mode with (You can skip procedure 6 if you use FF instead of
Paper roll Usable application programs and tips
ESC L
ESC S
(standard mode is changed to page mode).
ESC W
ESC FF
.
ESC FF
.
.
in procedure 5.)
ESC T
Ver. 4.0
p. 962
.
CONFIDENTIAL
more
Characteristics of the page mode
The flexible layout enables you to execute printing which you cannot accomplish in the standard mode.
Downloaded bit images or bar codes can be printed on the same line with characters at the same time.
Ladder bar code printing is possible.
Characters and bit images can be rotated (90° clockwise, 180° clockwise (upside down), or 90°
counterclockwise).
Data can be processed only in normal dot units.
Data cannot be processed in half dot units in the page mode.
Copy printing is possible.
Because printing with
results in the same printing. It is also possible to print repeated data with changes in some parts.
ESC FF
enables storing of data in the print buffer, executing
■ ■ ■
■ ■ ■
ESC FF
more
repeatedly
Paper roll Usable application programs and tips
Ver. 4.0
p. 963
CONFIDENTIAL
more
System Processing
■ ■ ■
■ ■ ■
more
This example illustrates ESC/POS command functions and printing results. The example shows how to issue a label containing bar codes.
Print Sample
EPSON Rental Video
*00001*
NAME
Jan. 10, 1998
EPSON Rental Video
*00002*
NAME
Jan. 10, 1998
Paper roll Usable application programs and tips
Ver. 4.0
p. 964
CONFIDENTIAL
more
Bar Codes Label Issuing
Procedure Commands used Description
1. Print label title
ESC a, ESC !, LF, GS !, ESC E
GS H, GS f, GS h, GS
2. Print bar code
k, ESC J
3. Print NAME ESC -, ESC J Prints “NAME” using
4. Print date ESC a, ESC ! , GS FF
Sets the print position to the center with label title with LF.
Prints bar code after selecting the height of the bar code with
GS h
the font with
Sets the print position to the right using (9 x 24) with *The paper LED blinks when the label is fed forward to the position where the label can be peeled off. Press the PAPER FEED button and peel off the label. The next label feeds to the starting position.
, the printing position of the HRI characters with
GS f
ESC !
.
, and prints the date with
ESC J
■ ■ ■
■ ■ ■
ESC a
. Adds an underline to “NAME.”
ESC a
and prints a
, selects font B
GS FF
.
more
GS H
and
Paper roll Usable application programs and tips
Ver. 4.0
p. 965
CONFIDENTIAL
more
Programming Example
PRINT #1, CHR$(&H1B);"@"; ← Initializes the printer
NO$="00001" : GOSUB start NO$="00002" : GOSUB start END
start: PRINT #1, CHR$(&H1B);"a";CHR$(1); PRINT #1, CHR$(&H1B);"!";CHR$(40);
PRINT #1, "EPSON"; PRINT #1, CHR$(&H1B);"!";CHR$(8); PRINT #1, "Rental Video"; CHR$(&HA); PRINT #1, CHR$(&H1B);"!";CHR$(0);
PRINT #1, CHR$(&H1D);"H";CHR$(2); PRINT #1, CHR$(&H1D);"f";CHR$(1); PRINT #1, CHR$(&H1D);"h";CHR$(35); PRINT #1, CHR$(&H1D);"k";CHR$(4);"*";NO$;"*";CHR$(0); PRINT #1, CHR$(&H1B);"J";CHR$(5);
Selects center print position
Selects character print mode
(emphasized + double-height + double-width)
Cancels double-width
Cancels emphasized
Selects printing position for HRI characters
Selects HRI characters
Sets bar code height
■ ■ ■
■ ■ ■
Prints a label title
Prints bar code
more
PRINT #1, CHR$(&H1B);"-";CHR$(2); PRINT #1, "NAME "; PRINT #1, CHR$(&H1B);"J";CHR$(70); PRINT #1, CHR$(&H1B);"-";CHR$(0);
PRINT #1, CHR$(&H1B);"a";CHR$(2); PRINT #1, CHR$(&H1B);"!";CHR$(1); PRINT #1, "Jan. 10, 1998"; PRINT #1, CHR$(&H1D);CHR$(HC);
W$=INPUT$(1) RETURN
Ready to input (waiting to input)
Sets underline width to 2 dots
Cancels previous character print mode
Selects right print position
Selects font B (9 x 24)
Prints and feeds the label to the print starting
position
Paper roll Usable application programs and tips
Prints “NAME”
Prints the date and feeds the label to the print starting position
Ver. 4.0
p. 966
CONFIDENTIAL
more
Tips (label printer)
Some TM printers, such as the TM-L60II, can print on labels. ESC/POS has label commands for the mechanism control function type, such as ejecting a label or feeding paper to the print starting position and has commands such as a serial number counter that apply to the label printers.
Printing on one label
If you want to repeat the flow of the operation of printing on a label, peeling it off, and pasting it, use
GS FF
1. Executes printing the last line on the label.
2. Ejects the label to the position where it can be peeled off.
3. Blinks the paper LED.
4. Waits for the paper feed button to be pressed.
5. After the paper feed button is pressed, it feeds the label to the print starting position using reverse paper
Be sure to press the paper feed button after peeling the label off as shown in procedure 4. If you use
for the last print command line in your program. The printer executes the following:
feed.
■ ■ ■
■ ■ ■
more
GS FF
,
you will not waste labels.
Continuous printing on labels
When printing on labels continuously, FF is used for the last print command line for one label, which enables the printer to feed the next label to the print starting position. When printing on the last label,
GS FF
Paper roll Usable application programs and tips
is used for not wasting a label.
Ver. 4.0
p. 967
Loading...
+ 380 hidden pages