The text of a manual · part 9 of 14
TM-T85/T85P Thermal Line Printer Operator's Manual: Chapter 5 Commands, pages 59 to 68
Pages 59 to 68 of 115, from TM-T85/T85P Thermal Line Printer Operator's Manual
The original document is the PDF (2.6 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Epson TM-T85
Page 59
Chapter 5
Commands Command Notation [Name] [Format]
The name of the command. The code sequence. ASCII indicates the ASCII equivalents. Hex indicates the hexadecimal equivalents. Decimal indicates the decimal equivalents. [ ]k indicates the contents of the [ ] should be repeated k times. [Range] Gives the allowable ranges for the arguments. [Description] Describes the function of the command. [Notes] Provides important information on setting and using the printer command, if necessary. [Default] Gives the default values, if any, for the command parameters. [Reference] Lists related commands. [Example] Provides examples using the command. The numbers denoted by < >H are hexadecimal. The numbers denoted by < >B are binary. The numbers denoted by < > are decimal. NOTE:
The phrase "beginning of a line" in command descriptions assumes that the following conditions have been met: 1. Print data, including spaces and HT command tabs, is not in the current print buffer. 2. The print position is not specified by the ESC $ or ESC \ command.
Commands 5-1
Page 60
Control Commands HT [Name] [Format]
Horizontal tab ASCII HT Hex 09 Decimal 9 [Description] Moves the print position to the next horizontal tab position. [Notes] • This command is ignored unless the next horizontal tab position has been set. • If the next horizontal tab position exceeds the printing area, the printer sets the printing position to [Printing area width + 1]. • Horizontal tab positions are set with ESC D. • If this command is received when the printing position is at [printing area width + 1], the printer executes print buffer-full printing of the current line and horizontal tab processing from the beginning of the next line. [Reference] ESC D
LF [Name] [Format]
Print and line feed ASCII LF Hex 0A Decimal 10 [Description] Prints the data in the print buffer and feeds one line based on the current line spacing. [Note] This command sets the print position to the beginning of the line. [Reference] ESC 2, ESC 3
FF [Name] [Format]
Print and return to standard mode (in page mode) ASCII FF Hex 0C Decimal 12 [Description] Prints the data in the print buffer collectively and returns to standard mode. [Notes] • The buffer data is deleted after being printed. • The printing area set by ESC W is reset to the default setting. • The printer does not execute paper cutting. • This command sets the print position to the beginning of the line. • This command is enabled only in page mode. ESC FF, ESC L, ESC S [Reference]
5-2 Commands
Page 61
CR [Name] [Format]
Print and carriage return ASCII CR Hex 0D Decimal 13 [Description] When auto-line feed is enabled, this command functions in the same way as LF. When auto-line feed is disabled, this command is ignored. [Notes] • This command sets the print position to the beginning of the line. • This command is available only with a parallel interface and is ignored with a serial interface.
DLE EOT n [Name] [Format]
Real-time status transmission ASCII DLE EOT n Hex 10 04 n Decimal 16 4 n [Range] 1≤ n ≤ 4 [Description] Transmits the selected printer status specified by n in real time, according to the following parameters: n = 1: Transmit printer status n = 2: Transmit off-line status n = 3: Transmit error status n = 4: Transmit paper roll sensor status [Notes] • 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. • This command is executed even when the printer is in the off-line, receive buffer is full, or error staus. • The printer executes this command upon receiving it. • The status is transmitted whenever the data sequence of 10H(16)04H(4)n (1 ≤ n ≤ 4) is received. Example: In ESC ✻ m nL nH [d]K, d1=10H(16), d2=04H(04), d3=01H(1) • 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 3 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 10H(16) for DLE EOT 3 is processed as the code for ESC 3 10H(16).
Commands 5-3
Page 62
• When Auto Status Back (ASB) is enabled using the GS a command, the status transmitted by the DLE EOT command and the ASB status must be differentiated. • If the value of n is out of the specified range, the printer ignores this command. n = 1: Printer 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.
Off
00
0
Drawer open/close signal is LOW (connector pin 3).
On
04
4
Drawer open/close signal is HIGH (connector pin 3).
Off
00
0
On-line.
On
08
8
Off-line.
4
On
10
16
Not used. Fixed to On.
5,6
-
-
-
Undefined.
7
Off
00
0
Not used. Fixed to Off.
2
3 n = 2: Off-line 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.
Off
00
0
Cover is closed.
On
04
4
Cover is open.
Off
00
0
Paper is not being fed by using the PAPER FEED button.
On
08
8
Paper is being fed by the PAPER FEED button.
On
10
16
Not used. Fixed to On.
Off
00
0
No paper-end stop.
On
20
32
Printing stops due to paper end.
2
3
4 5
5-4 Commands
Page 63
Bit
Off/On
Hex
Decimal
Function
Off
00
0
No error.
On
40
64
Error occurs.
Off
00
0
Not used. Fixed to Off.
6 7
Bit 5:
Becomes on when printing stops due to paper-end detected by the paper roll end sensor or due to a paper near-end enabled by using the ESC c 4. 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
-
-
-
Undefined.
Off
00
0
No auto-cutter error.
On
08
8
Auto-cutter error occurs.
On
10
16
Not used. Fixed to On.
Off
00
0
No unrecoverable error.
On
20
32
Unrecoverable error occurs.
Off
00
0
No auto-recoverable error.
On
40
64
Auto recoverable error occurs.
Off
00
0
Not used. Fixed to Off.
3 4 5
6 7
Bit 3:
If these errors occur due to paper jams or the like, it is possible to recover by correcting the cause of the error and executing DLE ENQ n (1 ≤ n ≤ 2). If an error due to a circuit failure (e.g. wire break) occurs, it is impossible to recover. Bit 6: When printing is stopped due to high print head temperature, bit 6 is On until the print head temperature drops sufficiently. n = 4: Continuous paper sensor 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
Paper roll near-end sensor. Paper adequate.
Commands 5-5
Page 64
Bit
Off/On
Hex
Decimal
Function
3
On
0C
12
Paper near-end is detected by the paper roll nearend sensor.
4
On
10
16
Not used. Fixed to On.
5
Off
00
0
Paper roll end sensor. Paper present.
6
On
60
96
Paper end is detected by the paper roll end sensor.
7
Off
00
0
Not used. Fixed to Off.
[Reference]
DLE ENQ, ESC u, ESC v, GS a, GS r
DLE ENQ n [Name] [Format]
Real-time request to printer ASCII DLE ENQ n Hex 10 05 n Decimal 16 5 n [Range] 1≤n≤2 [Description] The printer responds to a request from the host specified by n. The operations performed depend on the value of n, as follows: n = 1: Restarts printing from the beginning of the line where an error occurred, after recovering from the error. n = 2: Recovers from an error after clearing the receive and print buffers. [Notes] • The command is effective only when an auto-cutter error occurs. • The printer executes this command upon receiving it. • This command is also executed when the receive buffer is full. • The status is transmitted whenever the data sequence of 10H(16) 05H(5)n (1 ≤ n ≤ 2) is received. Example: In ESC ✻m nL nH [d] K, d1=10H(16) , d2=05H(5) , d3=01H(1) • 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 3 n to the printer, but DTR (DSR for the host computer) goes to MARK before n is transmitted, and DLE ENQ 2 interrupts before n is received, the code 10H(16) for DLE ENQ 2 is processed as the code for ESC 3 10H(16).
5-6 Commands
Page 65
[Reference]
• Even if DLE ENQ 2 is executed, the printer retains the settings (by ESC !, ESC 3, etc.) that were in effect when the error occurred. The printer can be initialized completely by using DLE ENQ and ESC @. DLE EOT
CAN [Name] [Format]
Cancel print data in page mode ASCII CAN Hex 18 Decimal 24 [Description] In page mode, deletes all the print data in the current printable area. [Notes] • This command is enabled only in page mode. • If data that existed in the previously specified printing area also exists in the currently specified printing area, it is deleted. [Reference] ESC L ESC W
ESC FF [Name] [Format]
Print data in page mode ASCII ESC FF Hex 1B 0C Decimal 27 12 [Description] In page mode, prints all buffered data in the printing area collectively. [Notes] • This command is enabled only in page mode. • After printing, the printer does not clear the buffered data, setting values for ESC T and ESC W, and the position for buffering character data. [Reference] FF, ESC L, ESC S
ESC SP n [Name] [Format]
Set right-side character spacing ASCII ESC SP n Hex 1B 20 n Decimal 27 32 n [Range] 0 ≤ n ≤ 255 [Description] Sets the character spacing for the right side of the character to [nx horizontal or vertical motion units]. [Notes] • The right-side character spacing for double-width mode is twice the normal value. When characters are enlarged, the right-side character spacing is n times normal value. • This command sets values independently in each mode (standard and page modes).
Commands 5-7
Page 66
[Default] [Reference]
• The horizontal and vertical motion unit are specified by GS P. Changing the horizontal or vertical motion unit does not affect the current right-side spacing. • The horizontal and vertical motion unit are specified by GS P. Changing the horizontal or vertical motion unit does not affect the current right-side spacing. • The GS P command can chahge the horizotal (and vertical) motion unit. However, the value cannot be less than the minimum horizontal movement amount, and it must be in even units of the minimum horizontal movement amount. • In standard mode, the horizontal motion unit is used. • In page mode, the horizontal or vertical motion unit differs in page mode, depending on starting position of the printable area as follows: 1 When the starting position is set to the upper left or lower right of the printable area using ESC T, the horizontal motion unit (x) is used. 2 When the starting position is set to the upper right or lower left of the printable area using ESC T, the vertical motion unit (y) is used. • The maximum right-side spacing is 255/180 inches. Any setting exceeding the maximum is converted to the maximum automatically. n=0 GS P
ESC ! n [Name] [Format]
Select print mode(s) ASCII ESC ! n Hex 1B 21 n Decimal 27 33 n [Range] 0 ≤ n ≤ 255 [Description] Selects print mode(s) using n as follows: Bit
Off/On
Hex
Decimal
Function
Off
00
0
Character font A( 12 ✕ 24) selected.
On
01
1
Character font B (9 ✕ 24) selected.
1
-
-
-
Undefined.
2
-
-
-
Undefined
Off
00
0
Emphasized mode not selected.
On
08
8
Emphasized mode selected.
0
3
5-8 Commands
Page 67
Bit
Off/On
Hex
Decimal
Function
Off
00
0
Double-height mode not selected.
On
10
16
Double-height mode selected.
Off
00
0
Double-width mode not selected.
On
20
32
Double-width mode selected.
-
-
-
Undefined.
Off
00
0
Underline mode not selected.
On
80
128
Underline mode selected.
4
5 6 7
[Notes]
[Default] [Reference]
• Determine the values of n by adding the values of all the characteristics you want to select. • When both double-height and double-width modes are selected, quadruple size characters are printed. • The printer can underline all characters, but can not underline the space set by HT, ESC $, or ESC \ or 90° clockwise rotated characters. • The thickness of the underline is that selected by ESC -, regadless of the character size. • When some characters in a line are double or more height, all the characters on the line are aligned at the baseline. • ESC E can also tutn on or off emphasized mode. However, the setting of the last received command is effective. • ESC - can also turn on or off underline mode. However , the setting of the last received command is effective. • GS ! can also select character size. However, the setting of the last received command is effective. n=0 ESC –, ESC E, GS !
ESC $ nL nH [Name] [Format]
Set absolute print position ASCII ESC $ nL nH Hex 1B 24 nL nH Decimal 27 36 nL nH [Range] 0 ≤ nL ≤ 255 0 ≤ nH ≤ 255 [Description] Sets the distance from the beginning of the line to the position at which subsequent characters are to be printed.
Commands 5-9
Page 68
[Notes]
[Reference]
5-10 Commands
• The distance from the beginning of the line to the print position is [(nL + nH ✕ 256) ✕ (vertical or horizontal motion unit)] inches. • Settings outside the specified printable area are ignored. • The horizontal and vertical motion unit are specified by GS P. • The GS P command can change the horizontal (and vertical) motion unit. However, the value cannot be less than the minimum horizontal movement amount, and it must be in even units of the minimum horizontal movement amount. • In standard mode, the horizontal motion unit (x) is used. • In page mode, horizontal or vertical motion unit differs depending on the starting position of the printable area as follows: 1 When the starting position is set to the upper left or lower right of the printable area using ESC T, the horizontal motion unit (x) is used. 2 When the starting position is set to the upper right or lower left of the printable area using ESC T, the vertical motion unit (y) is used. ESC \, GS $, GS \, GS P