1.1. RS-232 Serial Interface ..............................................................................................................................1-1
1.1.1. Specifications (Conforming to RS-232) ......................................................................................................1-1
1.1.2. Signal array and explanations according to interface connector pin ......................................................1-1
1.1.3. Communication Protocol ............................................................................................................................1-2
1.2.1. Specifications (Conforming to IEEE1284) ..............................................................................................1-4
1.2.2. Signal array and explanations according to interface connector pin ..........................................................1-4
1.2.3. Signal Output Timing..................................................................................................................................1-5
1.2.4. Status Specification ....................................................................................................................................1-5
1.3. USB Interface.............................................................................................................................................1-6
1.5. Wireless LAN Interface...............................................................................................................................1-6
2. COMMAND FUNCTION LIST.............................................................................................................................2-1
3.1. Explanation of Terms..................................................................................................................................3-1
3.3. Standard Command Details .......................................................................................................................3-3
3.3.1. Font style and Character Set......................................................................................................................3-3
3.3.2. Character Expansion Settings..................................................................................................................3-11
3.3.4. Line Spacing.............................................................................................................................................3-19
3.3.5. Page Control Commands .........................................................................................................................3-22
3.3.6. Horizontal Direction Printing Position .......................................................................................................3-26
3.3.8. Bit Image Graphics...................................................................................................................................3-33
3.3.9. Logo .........................................................................................................................................................3-37
3.3.10. Bar Code..............................................................................................................................................3-41
3.3.15. Chinese Characters .............................................................................................................................3-55
3.5. Black Mark Related Command Details.....................................................................................................3-79
3.6. USB Related Command Details ...............................................................................................................3-83
3.7. 2 Color Printing Command Details ...........................................................................................................3-84
3.8. Presenter Related Command Details .......................................................................................................3-93
3.9. Mark Command Details............................................................................................................................3-96
3.10. AUTO LOGO Function Command Details..............................................................................................3-101
3.11. Two-dimensional Bar Code PDF417 Command Details.........................................................................3-110
3.12. Details of the Print Starting Trigger Control Command...........................................................................3-115
3.13. Two-Dimensional Bar Code QR Code Command Details ......................................................................3-116
3.14. Page Function Command Details...........................................................................................................3-123
4. CHARACTER CODE TABLES............................................................................................................................4-1
5.2.2. EOT Command Status ...............................................................................................................................5-6
5.2.3. Automatic Status ........................................................................................................................................5-7
5.2.4 Printer status transmission specification when using Ethernet I/F and Wireless LAN I/F.........................5-14
This specifications document describes the command specifications for the STAR LINE MODE on line thermal printers.
Information contained herein applies to models with the following conditions.
Rating: RS-232C
Synch method: Start-Stop synchronization method
Handshake: DTR mode
Baud rates: 4800, 9600, 19200, 38400 bps (Set by DIP switches)
Bit length: 7, 8 bits (Set by DIP switches)
Parity: Yes/No (Set by DIP switches)
Parity bit: Odd/even (Set by DIP switches)
Stop bit: 1 bit (Fixed)
Signal polarity: Mark = logic 1 (-3 to -15 V)
Space = logic 0 (+3 to +15 V)
1.1.2. Signal array and explanations according to interface connector pin
<Signal Array and Functions>
Pin
No.
8-19 N.C - Not used
21-24 N.C Signal ground
Signal Name Signal
Direction
1 FG - Frame ground
2 TXD OUT Transmission data
3 RXD IN Reception data
4 RTS OUT Same as DTR
5 N.C - Not used
6 DSR IN Not used
7 SG - Signal ground
20 DTR OUT Data terminal ready signal (SPACE: printer is ready to receive.)
1) When in DTR mode:
When printer is ready to receive data: SPACE
2) When in XON/XOFF mode:
Always SPACE except in the following conditions.
1) General description of operations in the DTR mode
This mode abides by the DIP switch settings. (Ex-factory settings)
This mode performs communication while handshaking with the DTR signals. In the operations to receive printer data,
this mode controls the DTR signals by confirming the BUSY signal. A SPACE indicates that the printer is ready to
receive data; conversely, a “mark” indicates that the printer cannot receive data.
<When ON-LINE>
RXD DATA DATA DATA
DTR
Printing
<When out of paper>
RXD OFF-LINE ON-LINE
DTR ON-LINE Recovery
Printing Out of paper
No paper signal
Power ON
Power ON Buffer full Buffer empty
If there is no printer error after turning ON the power, the DTR signal line is set to a SPACE. When the host computer
confirms that the DTR signal line is a SPACE, it sends the data text to the RXD signal line. The printer sets the DTR
signal line to a “Mark” after the empty area of the data buffer reaches a maximum of 256 bytes. When the host
computer confirms that the DTR signal line is a Mark, it stops the transmission of data text to the printer buffer, but at this
point as well, the printer is still capable of receiving data, up to the amount of empty space in the data buffer. If the host
computer ignores the DTR signal and transmits data, all data exceeding the amount of space in the data buffer is simply
discarded. The printer sets the DTR signal line to SPACE again when the amount of empty space in the data buffer
increased because of the printing and the data in the buffer is a maximum of 256 bytes.
3) General description of operations in the XON/XOFF mode
This mode is set when DIPSW #1 to #3 are turned OFF. This mode notifies the host of the XON (DC1) data when the
printer can receive data and the XOFF (DC3) data when the printer cannot receive data, using the TXD signals.
This functions so that XON outputs only 1 byte when the printer shifts from OFFLINE (printer busy) to ONLINE (printer
ready) and; XOFF outputs 1 byte when the printer shifts from ONLINE (printer ready) to OFFLINE (printer busy) .
XON XOFF XON XOFF XON
TXD
RXD DATA DATA DATA
Printing
Out of
paper
signal
Power ON No
er ON-LINE Recover
If there is no error after turning the power ON, XON (control code name: DC1; Hexadecimal name: 11H) is output by the
TXD signal line. After the host computer receives the XON, it sends the data text to the RXD signal line. XOFF (DC 3;
13H) is output when the empty space in the data buffer is a maximum of 256 bytes. The host computer stops sending
data text when it receives the XOFF, however, the printer is capable of receiving data at that time for the amount of
empty space in the data buffer. Data exceeding the amount of empty space is discarded. As the empty space in the
data buffer increases through printing, XON is output when the data in the buffer is a maximum of 256 bytes.
4) Buffer full/Buffer full cancel in the XON/XOFF mode
Font style ESC RS F Select font
And character set ESC GS t Specify code page
ESC GS = Write blank code page data
ESC R Specify international character set
ESC / Specify/cancel slash zero
ESC SP Set ANK right space
ESC M Specify ANK 12 dot pitch
ESC P Specify ANK 15 dot pitch
ESC : Specify ANK 16 dot pitch
ESC g Specify ANK 14 dot pitch
Character ESC i Set/cancel the double wide/high printing
expansion settings ESC W Set/cancel the double wide printing
ESC h Set/cancel the double high printing
SO Set double wide printing
DC4 Cancel double wide printing
ESC SO Set printing magnified double character height
ESC DC4 Cancel printing magnified character height
Print modes ESC E Select emphasized printing
ESC F Cancel emphasized printing
ESC - Select/cancels underling mode
ESC _ Select/cancels upperline mode
ESC 4 Select white/black inverted printing
ESC 5 Cancel white/black inverted printing
SI Select upside-down printing
DC2 Cancel upside-down printing
Line spacing LF Line feed
CR Carriage return (same as line feed)
ESC a Feed paper n lines
ESC z Select line feed amount
ESC 0 Specify line spacing to 3 mm
ESC J n/4 mm line feed
ESC I n/8 mm line feed
Page control FF Form feed
commands ESC C Set page length to n lines
ESC C 0 Set page length in 24 mm units
VT Feed paper to vertical tab position
ESC B Set vertical tab position
ESC N Set bottom margin to n lines
ESC O Cancel bottom margin
Horizontal ESC l Set left margin
direction ESC Q Set right margin
position HT Move print position to horizontal tab position
ESC D Set/cancel horizontal tab position
ESC GS A Move absolute position
ESC GS R Move relative position
ESC GS a Specify position alignment
Download ESC & Register/delete 12 x 24 dot font download characters
ESC % Set/cancel download characters
Bit image ESC K Standard density bit image
graphics ESC L High density bit image
ESC k Fine bit image
ESC X Fine bit image
Logos ESC FS q Register logo data
ESC FS p Print logo data
ESC RS L Print registered logo in batch/ Batch control of registered logos
Bar code ESC b Print bar code
Cutter control ESC d Paper cutter instruction
External device ESC BEL Set pulse width for external device drive
Drive BEL External device 1 drive instruction
FS External device 1 drive instruction
SUB External device 2 drive instruction
EM External device 2 drive instruction
ESC GS BEL Ring buzzer
ESC GS EM DC1 External buzzer drive pulse condition settings
ESC GS EM DC2 External buzzer drive execution
Print settings ESC RS d Set print density
ESC RS r Set printing speed
Status ESC RS a Set status transmission conditions
ESC ACK SOH Real-time printer status (ASB Status)
ENQ Real-time printer status (1)
EOT Real-time printer status (2)
ETB Update ETB status
ESC RS E Clear ETB counter, ETB status
Others CAN Cancel print data and initialize commands
ESC @ Command initialization
ESC GS # Set memory switch
ESC ? Reset printer
ESC GS r Get CRC code
Macro
(*) Chinese character commands
• Chinese character control commands are ignored on printers not installed with Chinese character fonts (those
intended for overseas).
• All Chinese character control commands are ignored if the specification for the location of use is specified as
SBCS (single byte countries) by the memory switch.
• Raster related commands
Class
Raster commands ESC * r R Initialize raster mode
ESC * r A Enter raster mode
ESC * r B Quit raster mode
ESC * r C Clear raster data
ESC * r D Drive drawer
ESC * r E Set EOT mode
ESC * r F Set FF mode
ESC * r P Set page length
ESC * r Q Set print quality
ESC * r m l Set left margin
ESC * r m r Set right margin
ESC * r T Set top margin
ESC * r K Set print color
b n1 n2 d1...dk Transfer raster data (auto line feed)
k n1 n2 d1...dk Transfer raster data
ESC FF NUL Execute form feed mode
ESC FF EOT Execute EOT mode
ESC * r N
ESC * r V
Commands
ESC p Set to JIS Chinese character mode
ESC q Cancel JIS Chinese character mode
ESC $ Set/cancel JIS Chinese character mode
ESC s Set two byte Chinese characters left/right spaces
ESC t Set 1 byte Chinese characters left/right spaces
ESC r Register Chinese download characters
ESC GS
Commands
ESC * r Y
+
Name
Register macro
Name
Position movement in vertical direction (Line break at specified dot)
Discard data for specified byte count
Execute external buzzer drive
Black mark ESC d Paper cut instruction
Related FF Form feed
Commands ESC C Set page length to n lines
ESC C 0 Set page length in 24 mm units
VT Feed paper to vertical tab position
ESC B Set vertical tab position
ESC N Set n line bottom margin
ESC O Cancel bottom margin
• 2 color printing related commands
Class
Commands
Name
2 color printing ESC RS c Specify printing color in 2 color printing mode
Related ESC RS C Select/cancel 2 color printing mode
Commands ESC 4 Specify white/black inversion and printing color red
ESC 5 Cancel white/black inversion and specify printing color black
ESC RS d Set print density
ESC RS r Set printing speed
ESC FS q Register logo
ESC FS p Print logo
•Presenter related commands
Class
Commands
Name
Presenter ESC SYN 0 Execute presenter paper recovery
related ESC SYN 1 Set presenter automatic recovery function and recovery time
commands ESC SYN 3 Acquire presenter paper counter
ESC SYN 4 Initialize presenter paper counter
•Mark commands
Class
Commands
Name
Mark ESC GS * 0 Print mark
commands ESC GS * 1 Specify mark height and line feed amount
ESC GS * 2 Specify mark color and horizontal width in each mark number
ESC GS * W Register mark format in non-volatile memory
ESC GS * C Initialize mark format in non-volatile memory
Auto Logo ESC GS / W Register Auto Logo setting in non-volatile memory
commands ESC GS / C Initialize Auto Logo setting in non-volatile memory
ESC GS / 1 ON/OFF setting of Auto Logo function
ESC GS / 2 Command character setting
ESC GS / 3 User macro 1 setting
ESC GS / 4 User macro 2 setting
ESC GS / 5 Command character rewriting method setting
ESC GS / 6 Setting of partial cut just prior to Auto Logo printing
•PDF417 commands
Class
Commands
Name
PDF417 ESC GS x S0 Set PDF417 bar code size
commands ESC GS x S1 Set PDF417 ECC (security level)
ESC GS x S2 Set PDF417 module X direction size
ESC GS x S3 Set PDF417 module aspect ratio
ESC GS x D Set PDF417 bar code data
ESC GS x P Print PDF417 bar code
ESC GS x I Get PDF 417 bar code expansion information
QR code ESC GS y S0 Set QR code model
ESC GS y S1 Set QR code mistake correction level
ESC GS y S2 Set QR code cell size
ESC GS y D1 Set QR code data
ESC GS y D2 Set QR code data (Manual)
ESC GS y P Print QR code
ESC GS y I Get QR code expansion information
•Print Function commands
Class
Commands
Name
Page function ESC GS h 0 180 degree turnover
ESC GS h 1 Water mark
• Reception buffer
The buffer for storing data (reception data) received from the host, as it is called the reception buffer.
Reception data is temporarily stored in the reception buffer, then processed sequentially.
• Line buffer
The buffer for storing image data for printing is called the line buffer.
• Line buffer full
The state in which the buffer has no more space available is called line buffer full. When the buffer is full in standard
mode, data in the line buffer is printed and a line feed is performed when new print data is processed. This is the
same as a Line Feed. When the line buffer is full in the page mode, the printer move the print position to the head of
the next line then starts with the new print data.
• Top of line
The top of line is a state that satisfies the following conditions.
- There is currently no print data in the line buffer.
- The position is not specified with the horizontal direction position command.
• Printable region
This is the maximum printable area with the printer’s specifications.
• Print region
This is the printing area specified by a command. (Print region ≤ printable region)
Codes from <00>H to <1F>H are targeted. When codes not defined as commands in this region are received, they
are discarded.
(Ex.) If processing the data string of <30>H<31>H<03>H<32>H<0A>H<33>H, the printer will discard <03>H as an
undefined code.
2) Undefined commands
When data continuing the codes of ESC, FS, GS, DLE are codes not defined as commands, ESC, FS,GS and
subsequent codes are discarded.
(Ex.) If processing the data string of <30>H<1B>H<22>H<31>H<32>H, the printer will read and discard
<1B>H<22>H as an undefined command.
3) Settings outside of the defined area
Processing values outside of the defined area in commands accompanying arguments, those commands are
ignored and the preset values are unchanged. The processing of commands is terminated at the point values
outside of the defined region are processed in arguments having a plurality of commands. Data after that is
processed as normal data.
(Ex.) If processing the data string of <1B>H<52>H<15>H, the printer will discard the data string of
<1B>H<52>H<15>H because although <1B>H<52>H is defined as a commands (ESC R), the argument
<15>H is outside of the definition. Therefore, the international character set that is already set experiences
no change.
[Name] Write blank code page data
[Code] ASCII ESC GS = n1n2 da1 da2... dak db1 db2… dbk Hex. 1B 1D 3D n1n2 da1 da2... dak db1 db2… dbk Decimal 27 29 61 n1n2 da1 da2... dak db1 db2… dbk
[Defined Area] n1= 0
n2 = 48
1≤
0≤db = 0 (STAR mode is not installed with Font-B.)
k = (n1 + n2 x 256)
[Initial Value] - - [Function] A blank code page indicates a character code table where character codes from 80h to FFh
A blank code page can be selected using the ESC GS t n command n = 255.
The printer is reset when writing with this command is completed.
Font-A Data Format Vertical 24 dots x Horizontal 12 dots]
[Name] Specify international character set
[Code] ASCII
Hex. 1B 52 n
Decimal 27 82 n
[Defined Area] 0≤n = 64
48≤n≤57 (”0”≤n≤”9”)
65≤
[Initial Value] Memory switch setting
When installed with Japanese language characters and DBCS setting: Fixed at n=8
[Function] Specifies international characters
n International Characters
0, 48 USA
1, 49 France
2, 50 Germany
3, 51 UK
4, 52 Denmark
5, 53 Sweden
6, 54 Italy
7, 55 Spain
8, 56 Japan
9, 57 Norway
10, 65 Denmark II
11, 66 Spain II
12, 67 Latin America
13, 68 Korea
14, 69 Ireland
[Name] Set ANK right space
[Code] ASCII ESC SP n
Hex. 1B 20 n
Decimal 27 32 n
[Defined Area] 0≤
48≤
65≤
[Initial Value] Memory switch setting
[Function] Specifies the right space for ANK 12 x 24 dot fonts in n dots.
Character spacing can be specified also with the following commands.
[Defined Area] - - [Initial Value] Memory switch setting
[Function] Specifies rights space for the ANK 12 x 24 dot fonts to 2 dots.
Specification A
This command is enabled only when the memory switch setting is set for DBCS (2 byte countries).
It is ignored when the memory switch setting is set for SBCS (1 byte countries).
Specification B
This command is enabled for both when the memory switch setting is set for either DBCS (2 byte
0≤n2≤5
48≤n2≤53 (”0”≤n2≤”5”)
[Initial Value] n1 = 0 (Double high cancelled)
n2 = 0 (Double wide cancelled)
[Function] Specifies/cancels double high/wide for ANK characters and Chinese characters.
This command is ignored if either n1 or n2 is outside of the defined area.
n1 Expanded high
0, 48 Cancels expanded high
1, 49 Specifies 2x high expansion
2, 50 Specifies 3x high expansion
3, 51 Specifies 4x high expansion
4, 52 Specifies 5x high expansion
5, 53 Specifies 6x high expansion
[Defined Area] 0≤n≤5
48≤
[Initial Value] n = 0 (Double high cancelled)
[Function] Specifies/cancels double high for ANK characters and Chinese characters.
[Name] Set double wide
[Code] ASCII SO
Hex. 0E
Decimal 14
[Defined Area] - - [Initial Value] Cancels 2x wide expansion
[Function] Specifies double wide for ANK characters and Chinese characters.
This command is equivalent to ESC W n (n = 1).
[Name] Set double high
[Code] ASCII ESC SO
Hex. 1B 0E Decimal 27 14
[Defined Area] - - [Initial Value] Double high expansion cancelled.
[Function] Specifies double high for ANK characters and Chinese characters.
This command is equivalent to ESC h n (n = 1).
[Name] Select/cancels underling mode
[Code] ASCII ESC - n
Hex. 1B 2D n
Decimal 27 45 n
[Defined Area] n = 0, 1, 48, 49
[Initial Value] n = 0 (Underline cancelled)
[Function] Specifies underlining (2 dots).
Underlines are composed of 2 dot lines.
Underlines are not applied to horizontal tabs and to specified horizontal direction positions.
Underlines are expanded if the character expansion is specified. (When double high expansion is
used, underlines are composed of 4 dots.)
Underlines are enabled for white/black inversion.
This command is enabled for ANK characters and Chinese characters.
IBM block ignores underlines.
n Underline
0, 48 Cancels underline
1, 49 Specifies underline
ESC _ n
[Name]
[Code] ASCII ESC _ n
Hex. 1B 5F n
Decimal 27 95 n
[Defined Area] n = 0, 1, 48, 49
[Initial Value] n = 0 (Upperline cancelled)
[Function] Specifies upperlining (2 dots).
Upperlines are composed of 2 dot lines.
Upperlines are not applied to horizontal tabs and to specified horizontal direction positions.
Upperlines are expanded if the character expansion is specified. (When double high expansion is
Upperlines are enabled for white/black inversion.
This command is enabled for ANK characters and Chinese characters.
IBM block ignores upperlines.
[Defined Area] - - [Initial Value] Upside-down cancelled
[Function] Specifies upside-down printing
This command is enabled only when at the top of the line.
Upside down and right-side up characters cannot both exist in the same line.
This command is enabled for following.
[Defined Area] - - [Initial Value] Upside-down printing cancelled
[Function] Cancels upside-down printing
This command is enabled only when at the top of the line.
[Name] Line feed
[Code] ASCII LF
Hex. 0A
Decimal 10
[Defined Area] - - [Initial Value] - - [Function] Feeds the currently specified amount of paper.
If print data exists in the line buffer, it prints that data.
The initial value for the amount of paper is set according to the memory switch settings.
[Defined Area] - - [Initial Value] - - [Function] When the CR code is enabled, the CR code functions in the same way as the LF code.
If the CR code is disabled, it ignores 1 byte.
Enabling and disabling the CR code is done using the memory switch settings.
ESC a n
[Name] Feed paper n lines
[Code] ASCII ESC a n
Hex. 1B 61 n
Decimal 27 97 n
[Defined Area] 1≤
[Initial Value] - - [Function] Executes a paper feed for (the currently specified line feed amount x n). If print data exists in the
The initial value for the amount of paper is set according to the memory switch settings.
[Name] n/4 mm line feed
[Code] ASCII ESC J n
Hex. 1B 4A n
Decimal 27 74 n
[Defined Area] 1≤
[Initial Value] - - [Function] Executes a n/4mm paper feed.
If print data exists in the line buffer, it prints that data.
Using this command will intermittently feed paper, therefore, it is normally recommended that this
n≤255
command not be used.
ESC I n
[Name] n/8mm line feed
[Code] ASCII ESC I n
Hex. 1B 49 n
Decimal 27 73 n
[Defined Area] 1≤
[Initial Value] - - [Function] Executes a n/8mm paper feed.
If print data exists in the line buffer, it prints that data.
Using this command will intermittently feed paper, therefore, it is normally recommended that this
[Name] Form feed
[Code] ASCII FF
Hex. 0C
Decimal 12
[Defined Area] - - [Initial Value] - - [Function] Executes a form feed.
If the current position is at the top of the page, it form feeds to the top of the next page.
If there is data existing in the line buffer when executing a form feed, it prints that data, then
executes the form feed.
However, by printing data remaining in the buffer, and moving to the top of the next page, a form
feed is considered to have been executed, so form feed is not performed.
ESC C n
[Name] Set page length to n lines
[Code] ASCII ESC C n
Hex. 1B 43 n
Decimal 27 67 n
[Defined Area] 1≤n≤127
[Initial Value] (Form feed amount initial value x 42)
[Function] The position whereat this command is processed is considered the top of the page and sets the
page length to (current form feed amount x n).
This command cancels the bottom margin setting when setting page length.
The page length set using this command is unaffected by changing the form feed amount later.
Moving to the top of the page is performed using the following commands.
• Form feed command (FF): Executes a form feed.
• Cutter command (ESC d n): Sets cutter position at top of page.
• Raster command (ESC * r B): Sets top of page when quitting raster mode.
• Error cancel operations: Sets position when quitting error cancellation operations
[Name] Set page length to n x 24 mm units
[Code] ASCII ESC C 0 n
Hex. 1B 43 00 n
Decimal 27 67 0 n
[Defined Area] 1≤
[Initial Value] (Form feed amount initial value x 42)
[Function] The position whereat this command is processed is considered the top of the page and sets the
This command cancels the bottom margin setting when setting page length.
The page length set using this command is unaffected by changing the form feed amount later.
Moving to the top of the page is performed using the following commands.
• Form feed command (FF): Executes a form feed.
• Cutter command (ESC d n): Sets cutter position at top of page.
• Raster command (ESC * r B): Sets top of page when quitting raster mode.
• Error cancel operations: Sets position when quitting error cancellation operations
[Name] Feed paper to vertical tab position
[Code] ASCII VT
Hex. 0B
Decimal 11
[Defined Area] - - [Initial Value] - - [Function] Feeds paper to the next vertical tab position.
This command is ignored if there are no tabs set.
If a vertical tab is set, and the current position is the same as the vertical tab position, or if it is
below that position, it feeds paper to the top of the next page.
If data exists in the line buffer when feeing paper to the vertical tab position, it executes the paper
feed to the vertical tab position after printing that data. However, if moved to the vertical tab
position by printing data remaining in the buffer, the move to the vertical tab position is considered
to have been executed, so a move to the next vertical tab position is not performed.
There is no initial value for the vertical tab.
[Name] Set vertical tab position
[Code] ASCII ESC B n1 n2... nk NULHex. 1B 42 n1 n2... nk 00Decimal 27 66 n1 n2... nk 0
[Defined Area] 1≤
0≤
[Initial Value] - - [Function] Sets the vertical tab to the (current form feed amount x n) position.
All other vertical tabs set before setting the vertical tab using this command are cancelled
A maximum of 16 vertical tabs can be set. However, the tab position must satisfy the condition of
The vertical tab set using this command is unaffected by changing the form feed amount later.
Vertical tabs set using the ESC B NUL command are cleared.
There is no initial value for the vertical tab.
n≤255
k≤16
n1≤n2...≤nk. When receiving such illegal codes, tabs up to the illegal code are set, but those
1≤
after the illegal code are discarded up to the NUL code so illegal code tab are not set.
ESC B NUL
[Name] Clear vertical tab position
[Code] ASCII ESC B NUL Hex. 1B 42 00 Decimal 27 66 0
[Defined Area] - - [Initial Value] - - [Function] Clears the currently set vertical tab.
[Name] Set left margin
[Code] ASCII ESC l n
Hex. 1B 6C n
Decimal 27 108 n
[Defined Area] 0≤
[Initial Value] n = 0
[Function] Uses the left edge as a standard to set the left margin as (current ANK character pitch x n).
Character pitch includes the space between characters and expansion settings are enabled.
The left margin set using this command is unaffected by changing the character pitch.
This command is ignored if settings are for a printing region less than 36 mm.
Specification A
Setting this command partway will take affect from the next line.
Specification B
This command is enabled only when at the top of the line.
[Name] Set right margin
[Code] ASCII ESC Q n
Hex. 1B 51 n
Decimal 27 81 n
[Defined Area] 0≤
[Initial Value] - - [Function] Uses the left edge as a standard to set the print region as (current ANK character pitch x n).
Character pitch includes the space between characters and expansion settings are enabled.
The right margin set using this command is unaffected by changing the character pitch.
This command is ignored if settings are for a printing region less than 36 mm.
Specification A
Setting this command partway will take affect from the next line.
Specification B
This command is enabled only when at the top of the line.
[Defined Area] - - [Initial Value] - - [Function] Move print position to next horizontal tab position.
This command is ignored with under the following conditions.
• When there is no horizontal tab set.
• When the current position is the same as the furthest right horizontal tab position or to the right of
it.
There is no initial value for the horizontal tab.
[Name] Set horizontal tab
[Code] ASCII ESC D n1 n2... nk NULHex. 1B 44 n1 n2... nk 00Decimal 27 68 n1 n2... nk 0
[Defined Area] 1≤
0≤
[Initial Value] - - [Function] Uses the left edge as a standard to set the horizontal tab to the position of (current ANK character
The horizontal tab reference point is the right edge of the paper, regardless of the left margin.
ANK character pitch includes the right space and expansion settings are enabled.
All other horizontal tabs set before setting the horizontal tab using this command are cancelled
A maximum of 16 horizontal tabs can be set.
However, the tab position must satisfy the following conditions.
If the following conditions are not met, data up to the NUL code is discarded.
Normal tabs that meet the conditions below are set and tabs after errors occur are not set.
• 1<n1 < n2... < nk
• nk ≤The horizontal tab set using this command is unaffected by changing the character pitch.
Horizontal tabs set using the ESC D NUL command are cleared.
There is no initial value for the horizontal tab.
[Name] Move absolute position
[Code] ASCII ESC GS A n1n2Hex. 1B 1D 41 n1n2
Decimal 27 29 65 n1n2
[Defined Area] 0≤
0≤
[Initial Value] - - [Function] Moves the printing position from the left margin to the (n1 + n2 x 256) position.
This command is ignored if the print region is exceeded.
n1≤255
n2≤255
ESC GS R n1 n2
[Name] Move relative position
[Code] ASCII ESC GS R n1n2
Hex. 1B 1D 52 n1n2
Decimal 27 29 82 n1n2
[Defined Area] 0≤
0≤
[Initial Value] - - [Function] Moves the printing position from the current position to the (n1 + n2 x 256) position.
This command is ignored if the print region is exceeded.
When (n1 + n2 x 256) ≥When (n1 + n2 x 256) < 32768, it moves (n1 + n2 x 256)} dots in the right direction.
n1≤255
n2≤255
32768, it moves {65536 – (n1 + n2 x 256)} dots in the left direction.
[Defined Area] c1 = 1, 49
c2 = 1, 49
32≤
0≤d≤255
[Initial Value] - - [Function] Registers 12 x 24 dot font download characters to the nth address.
Download characters can be registered to <20>H to <7F>H.
If one has been already registered to an address, it is overwritten.
When parameters c1 and c2 and n are outside of the defined area, subsequent data is handled as
[Name] Standard density bit image
[Code] ASCII ESC K n1 n2d1... dk Hex. 1B 4B n1 n2d1... dk Decimal 27 75 n1 n2d1... dk
[Defined Area] 1 ≤ {(n1 + n2 x 256) x 3} ≤k = (n1 + n2 x 256)
0≤d≤255
[Initial Value] - - [Function] Prints bit images using 3 dots wide and 3 dots high per 1 dot of input data.
The following shows the data processing in this command.
• When {(n1 + n2 x 256) x 3} exceeds the printable region, data after d1 is handled as normal data.
• When {(n1 + n2 x 256) x 3} exceeds the printable region that is currently set, only the data in the
printing region is printed.
At this time, all data for the print region is discarded.
• If the current position already exceeds the print region, this command discards all data.
[Name] Standard density bit image
[Code] ASCII ESC L n1 n2d1... dk Hex. 1B 4C n1 n2d1... dk Decimal 27 76 n1 n2d1... dk
[Defined Area] 1 ≤k = (n1 + n2 x 256)
0≤d≤255
[Initial Value] - - [Function] Prints bit images using 1 dot wide and 3 dots high per 1 dot of input data.
The following shows the data processing in this command.
• When (n1 + n2 x 256) exceeds the printable region, data after d1 is handled as normal data.
• When (n1 + n2 x 256) exceeds the printable region that is currently set, only the data in the
At this time, all data for the print region is discarded.
• If the current position already exceeds the print region, this command discards all data.
[Name] Fine density bit image
[Code] ASCII ESC k n1 n2d1... dk Hex. 1B 6B n1 n2d1... dk Decimal 27 107 n1 n2d1... dk
[Defined Area] n2 = 0
1 ≤k = {(n1 + n2 x 256) x 24}
0≤
[Initial Value] - - [Function] Prints bit images using 1 dot wide and 1 dots high per 1 dot of input data.
The following shows the data processing in this command.
• When {(n1 + n2 x 256) x 8} exceeds the printable region, data after d1 is handled as normal data.
• When {(n1 + n2 x 256) x 8} exceeds the printable region that is currently set, only the data in the
At this time, all data for the print region is discarded.
• If the current position already exceeds the print region, this command discards all data.
24 Dots
{(n1 + n2 x 256) x 8} ≤ printable region
d≤255
printing region is printed.
X Bytes = (n1 + n2 x 256)
d1 d2 • • • • • • • dX
dX x 1 + 1 dX x 1 + 2 • • • • • • • dX x 2
dX x 2 + 1 dX x 2 + 2 • • • • • • • dX x 3
[Name] Fine density bit image (Compatible with 24 bit wire dots)
[Code] ASCII ESC X n1 n2d1... dk
Hex. 1B 58 n1 n2d1... dk
Decimal 27 88 n1 n2d1... dk
[Defined Area] 1 ≤k = {(n1 + n2 x 256) x 3}
0≤d≤255
[Initial Value] - - [Function] Prints input bit images with 8 dots/mm resolution for both horizontal and vertical.
The following shows the data processing in this command.
• When {(n1 + n2 x 256) x 3} exceeds the printable region, data after d1 is handled as normal data.
• When {(n1 + n2 x 256) x 3} exceeds the printable region that is currently set, only the data in the
At this time, all data for the print region is discarded.
• If the current position already exceeds the print region, this command discards all data.
[Defined Area] 1≤
0≤xn1≤255, 0≤xn2≤3
1≤(xn1 + xn2 x 256)≤1023
0≤yn1≤255, 0≤yn2≤1
1≤
0≤d≤255 k = {(xn1 + xn2 x 256) x (yn1 + yn2 x 256) x 8}
[Initial Value] - - [Function] Parameter details
• n: Specifies registered logo count
• xn1, xn2: Horizontal size of registered logo {(xn1 + xn2 x 256) x 8} dots
• yn1, yn2: Vertical size of registered logo {(yn1 + yn2 x 256) x 8} dots
• d: Registered logo data
• k: Logo data count
This command should be specified at the top of the line.
When the first parameter is determined to be free of error, the printer starts processing this
When logo register processing starts, all previously defined data is deleted.
(It is not possible to reregister a portion of a plurality of defined logo data.)
Logo registration numbers are defined in rising order from 1.
The printer should be initialized if logo registration is completed or register processing is aborted.
If an error occurs while performing register processing (the time from when the first parameter is
The relationships between input data and the actual print are shown on the next page.
n≤255
yn1 + yn2 x 256)≤288
command.
If the defined area specified by the parameter is not empty, or if there is an error in the parameter
specification, register processing is aborted. (The pre-registered and complete data is effective.)
OK until the printer initialization is completed after registering a logo), error processing, mechanical
operation and status processing cannot be performed.
[Name] Print logo
[Code] ASCII ESC FS p nm
Hex. 1B 1C 70 nm
Decimal 27 28 112 nm
[Defined Area] 1≤
0≤
48≤
[Initial Value] - - [Function] Prints the logo of registration number n registered using the logo registration command (ESC FS q)
m Logo print mode
0, 48 Normal mode
1, 49 Double wide mode
2, 50 Double high mode
3, 51 Double high/wide mode
If there is unprinted data in the line buffer, this command is executed after printing that data.
Form feed obeys the vertical print size of the logo.
If the logo horizontal print size exceeds the horizontal print region, the portion exceeding the area
Logos are printed according to the following command settings.
• Left margin (ESC I n)
• Right margin (ESC Q n)
• Position alignment (ESC GS a n)
• Absolute position movement (ESC GS A n1 n2)
• Relative position movement (ESC GS R n1 n2)
• Upside-down printing (SI)
n≤255
m≤3
m≤51 (”0”≤m≤”3”)
according to the print mode m.
Therefore, it is not possible to print with other data in the same line (characters, bit images, bar
codes).
is not printed.
ESC RS L m
[Name] Spec. A Print logo in batch
Spec. B Batch control of registered logos
[Code] ASCII ESC RS L m
Hex. 1B 1E 4C m
Decimal 27 30 76 m
[Defined Area] Spec. A 0 ≤
Spec. B 0 ≤
[Initial Value] - - [Function] Spec. A Prints all registered logos according to a print mode specified by m. Executes a printer
reset after printing.
Spec. B Controls logos as specified by the parameter m.
After execution, this resets the printer.
Spec. A
m Logo print mode
0, 48 Normal mode
1, 49 Double wide mode
2, 50 Double high mode
3, 51 Double high/wide mode
m ≤ 3 48 ≤ m ≤ 51 (“0” ≤ m ≤ “3”)
m ≤ 3 48 ≤ m ≤ 51 (“0” ≤ m ≤ “3”),m=255
[Defined Area] 0≤
1≤n2≤4, 49≤n2≤52 (”1”≤n2≤”4”)
1≤n4≤255 n3 (bar code mode), d (bar code data), k (bar code data count) definitions differ according to the
[Initial Value] - - [Function] Bar code printing is executed according to the following parameters.
If n1, n2, n3 and n4 are acquired and detected to be out of the defined area, data up to RS is
• n2 Under-bar character selection and added line feed selection
n2 Under-bar character selection and added line feed selection
1, 49 No added under-bar characters Executes line feed after printing a bar code
2, 50 Adds under-bar characters Executes line feed after printing a bar code
3, 51 No added under-bar characters Does not execute line feed after printing a bar code
4, 52 Adds under-bar characters Does not execute line feed after printing a bar code
• UPC – E: k = 11 (or 12)
The 12th check digit is automatically applied, so it is specified and ignored.
The command is ignored for data that cannot be shortened.
Automatically converts data to shortened form.
• UPC – A: k = 11 (or 12)
The 12th check digit is automatically applied, so it is specified and ignored.
• JAN/EAN – 8: k = 7 (or 8)
The 8th check digit is automatically applied, so it is specified and ignored.
• JAN/EAN -13: k = 12 (or 13)
The 13th check digit cannot be automatically applied, so it is specified and ignored.
• CODE 39: k is freely set, and maximum value differs according to the mode.
Start/stop code (“*”) is automatically applied.
• ITF: k is freely set, and maximum value differs according to the mode.
If data is oddly numbered, a 0 is applied to the top.
• CODE 128: k is freely set, and maximum value differs according to the mode and the print
character type.
The check character is automatically applied.
• CODE 93: k is freely set, and maximum value differs according to the mode and the print
character type.
The check character (“□”) is automatically applied.
• NW7: k is freely set, and maximum value differs according to the mode and the print character
type.
Start/stop codes included in the data (not automatically applied).
[Function] Drives external device 2.
The energizing time and delay time for the external device 2 are fixed at 200 ms each.
As with other commands, it temporarily stores data in the data buffer, then executes in the order
received.
External device 1 and external device 2 cannot be executed simultaneously.
[Defined Area] - - [Initial Value] - - [Function] Drives external device 2.
The energizing time and delay time for the external device 2 are fixed at 200 ms each.
As with other commands, it temporarily stores data in the data buffer, then executes in the order
received.
External device 1 and external device 2 cannot be executed simultaneously.
t1 specifies energizing time; t2 specifies the delay time.
• Energizing time = 20 msec x t1
• Delay time = 20 msec x t2
The buzzer will not ring while printing.
Use of this command other than for ringing the buzzer is prohibited.
(There is the possibility of damage if using this command for driving the drawer on models that
n1 specifies the energizing time; n2 specifies the delay time.
• Energizing time: =20msec x n1
• Delay time: =20msec x n2
m ≤ 2 49 ≤ m ≤ 50
n1 ≤ 255
n2 ≤ 255
Drives for external buzzers set using this command is performed by <ESC> <GS> <EM> <DC2> m n1 n2.
The setting value is not initialized by <ESC> “@” and <CAN>.
[Defined Area] 1 ≤
1 ≤
n2=0
[Initial Value] --[Function] Repeatedly drives the buzzer according to the ON/OFF conditions set by the external buzzer drive
pulse conditions command <ESC> <GS> <EM> <DC1> m t1 t2.
m specifies the buzzer drive terminal to drive.
Specifies the number of repetitions of the buzzer drive with (n2 x 256 + n1).
The buzzer will not ring while printing.
This command is prohibited for uses other than to ring the buzzer.
(If this command is used to drive the cash drawer on models that have an external device terminal, the system will be
damaged. Absolutely never use it for other purposes.)
The buzzer can be stopped by pressing the paper feed switch or opening the cover when it is ringing.
[Name] Set status transmission conditions
[Code] ASCII ESC RS a n
Hex. 1B 1E 61 n
Decimal 27 30 97 n
[Defined Area] 0≤
48≤n≤51(”0”≤n≤”51”)
[Initial Value] Set by DIP switches and memory switches.
[Function] Sets the status transmission conditions.
See Appendix 2 for details regarding ASB status.
Settings of this command are unaffected by the ESC @ command.
[Defined Area] - - [Initial Value] - - [Function] Sends ASB status information to the host.
This command is not used when ASB is valid.
See Appendix 2, Automatic Status for details regarding ASB status.
[Defined Area] - - [Initial Value] - - [Function] Sends 1 byte of the following the printer status
This command is not used when ASB is valid.
See Appendix 2, ENQ Command Status for details regarding status.
[Defined Area] - - [Initial Value] - - [Function] Sends 1 byte of the following the printer status
This command is not used when ASB is valid.
See Appendix 2, EOT Command Status for details regarding status.
[Defined Area] - - [Initial Value] - - [Function] (1) Specifications
Sets the ASB ETB status when reading this command from the reception buffer, then sends ASB.
See Appendix 2, ASB Status for details.
(2) Specifications
Sets the ASB ETB status when reading this command from the reception buffer. Then, after
updating the ASB ETB counter, sends the ASB status.
See Appendix 2, ASB Status for details.
The following outlines the details of processes in this command.
(1) Reads ETB command from reception buffer.
(2) Waits for printing of the print data before the ETB command to end.
(3) Increments the ASB ETB counter by 1 after checking that printing has ended, then sets the ASB
ETB status.
(4) Sends ASB (only when ASB is enabled).
ESC RS E n
[Name] Initialize ASB ETB counter and ETB status
[Code] ASCII ESC RS E n
Hex. 1B 1E 45 n
Decimal 27 30 69 n
[Defined Area] n = 0
n = 48 (“0”)
[Initial Value] ASB ETB counter = 0
[Function] Clears the ASB ETB counter to zero, then clears the ETB status.
However, ASB status is not send when clearing the ETB counter to zero using this command. The
ETB counter and ETB status are initialized by the following command, not this command.
[Name] Specify JIS Chinese character mode
[Code] ASCII ESC p
Hex. 1B 70 Decimal 27 112
[Defined Area] - - [Initial Value] JIS Chinese character mode cancelled
[Function] Specifies JIS Chinese character mode
When in JIS Chinese character mode, character codes are all handled as 2 byte Chinese
characters (First byte: upper code; second byte: lower code).
This command is ignored for models not equipped with Japanese and Chinese characters and
when the specification for the location of use is specified as SBCS (single byte countries) by the
memory switch.
ESC q
[Name] Cancel JIS Chinese character mode
[Code] ASCII ESC q
Hex. 1B 71 Decimal 27 113
[Defined Area] - - [Initial Value] JIS Chinese character mode cancelled
[Function] Cancel JIS Chinese character mode
[Name] Specify/cancel Shift JIS Chinese character mode
[Code] ASCII ESC $ n
Hex. 1B 24 n
Decimal 27 36 n
[Defined Area] - - [Initial Value] Memory switch setting
[Function] Specifies and cancels the shift JIS Chinese character mode.
When in shift JIS Chinese character mode, character codes are all handled as 2 byte Chinese
characters (First byte: upper code; second byte: lower code).
This command is ignored for models not equipped with Japanese and Chinese characters and
when the specification for the location of use is specified as SBCS (single byte countries) by the
memory switch.
n Shift JIS Chinese character mode
0, 48 Cancels shift JIS Chinese character mode
1, 49 Specifies shift JIS Chinese character mode
[Name] Set 2 byte Chinese character left/right spaces
[Code] ASCII ESC s n1 n2
Hex. 1B 73 n1 n2
Decimal 27 115 n1 n2
[Defined Area] 0≤
48≤
0≤
48≤
65≤n2≤70 (”A”≤n2≤”F”)
[Initial Value] Memory switch setting
[Function] Adds n1 dot left space and n2 dot right space to Chinese characters.
This command is ignored for models not equipped with Chinese fonts (for overseas) and when the
n1≤7
n1≤55 (”0”≤n1≤”7”)
n2≤15
n2≤57 (”0”≤n2≤”9”)
specification for the location of use is specified as SBCS (single byte countries) by the memory
switch.
ESC t n1 n2
[Name] Set 1 byte Chinese character left/right spaces
[Code] ASCII ESC t n1 n2
Hex. 1B 74 n1 n2
Decimal 27 116 n1 n2
[Defined Area] 0≤
48≤n1≤55 (”0”≤n1≤”7”)
0≤
48≤n2≤57 (”0”≤n2≤”9”)
65≤n2≤70 (”A”≤n2≤”F”)
[Initial Value] Memory switch setting
[Function] Adds n1 dot left space and n2 dot right space to 1 byte characters.
This command is ignored for models not equipped with Chinese fonts (for overseas) and when the
n1≤7
n2≤15
specification for the location of use is specified as SBCS (single byte countries) by the memory
[Defined Area] 0≤
k=72
c1 and c2 differ according to specifications and code type (see table below).
[Initial Value] All spaces
[Function] Registers Chinese download characters to c1 and c2 addresses.
Those already registered to these addresses are overwritten. If c1 and c2 are outside of the
This command exists in models that have the specifications of A and B below. (See the “Special
Specification A
Specification c1 c2 Registration count
Japanese char./JIS type c1=77h 30h≤c2≤4Fh 32 characters
Specification B
Specification c1 c2 Registration count
Japanese char./JIS type c1=77h 21h≤c2≤7Eh 94 characters
Japanese char./Shift JIS type c1=ECh 40h≤c2≤7Eh
Chinese characters c1=FEh A1h≤c2≤FEh 94 characters
(*) The registration region is the same for Japanese characters in JIS or shift JIS.
defined are or the printer is model not equipped with Chinese fonts (for overseas) and when the
specification for the location of use is specified as SBCS (single byte countries) by the memory
switch, the printer discards up to d1 and dk.
[Name] Cancel print data and initialize commands
[Code] ASCII CAN
Hex. 18 Decimal 24
[Defined Area] - - [Initial Value] - - [Function] When the reception buffer and line buffer are cleared, the set commands are initialized.
Immediately executed not when taking out from the reception buffer, but when received from the
host.
DIPSW re-reading is not performed.
The following shows the specifications that are not initialized by this command.
[Defined Area] - - [Initial Value] - - [Function] Initializes each command after printing data in the line buffer.
However, printers with memory switch settings are initialized to the memory switch settings.
DIPSW re-reading is not performed.
• ANK characters, Chinese character adornment, expansion
• Chinese character mode
• ANK right space
• Chinese character left/right spaces
• Character pitch
• International characters
• Code page
• Set slash zero
• Set specify/cancel external character (external register character data is retained)
• Page length
• Current position (move to top of page, top of line)
• Horizontal tab/Vertical tab
• Line feed amount
• Set upside-down, position alignment
• Left/right margins
The following shows the specifications that are not initialized by this command.
Specification A
48≤
Specification B
48≤N = 85 (“U”) User defined area
[Initial Value] - - [Function] Sends command to write after defining memory switch using the definition command specified by
Memory switch information defined by the command to write is written to the volatile memory.
When writing to the volatile memory by the command to write, the printer executes a reset.
This command exists in models that have the specifications of A and B indicated in the above
Models having specifications B can register any 16 bit data by specifying N = 85 (”U”). (See the
Definition data write and reset Write “W” Fixed at “0”Fixed at “0000”
Definition data write and reset and
self print
Data definition (data specification) Definition“, ” N n1 n2 n3 n4
Data definition (specify bit and set) Definition“+” N n1 n2 n3 n4
Data definition (specify bit and clear) Definition“-” N n1 n2 n3 n4
Definition data (all data initialized) Definition“@” Fixed at “0”Fixed at “0000”
• m: Mode selection
• N: Memory switch number to specify
• n1 n2 n3 n4: Specify data m = (“,”) Specify data
m = (“+”) Bit number to set
m = (“-“) Bit number to clear
[Defined Area] - - [Initial Value] - - [Function] Hardware resets the printer and executes on self print.
After sending this command, the next data is not sent until the printer is online (in a state wherein it
can receive data).
When resetting the printer, the following processes are performed.
I/F Mode Process
Parallel - - - BUSY output
RS-232C DTR mode DTR mark output
Xon/Xoff mode Xoff output
[Initial Value] - - [Function] This command registers macro data in the following macro registration regions.
Registration
Region
Registration
Information
Macro 2 Registration data count
4 Registration data address
8 (Reserved)
Macro 1 2 Registration data type 0 x 0001 to 0x 0008
2 Registration data count
4 Registration data address
8 (Reserved)
8 2 Registration data type 0 x 0001 to 0 x
2 Registration data count
4 Registration data address
8 (Reserved)
Registration
Data
• m specifies the registration black count.
• t specifies the registration data type.
t Registration Data Type
0 Initialization Macro
1 to 8 Macro (t is the macro number.)
• (nL + nH x 256) specifies the data count to be registered.
When (nL + nH x 256) = 0, the macro data specified by t is deleted.
• d is the macro data to be registered.
• After the macro data is written to the non-volatile memory, the printer is reset.
• If the volume of all macros exceeds the capacity for registration, it is written to the non-volatile memory up to the data
block that exceed the capacity and the command analysis is ended after that.
• If there is unprinted data in the line buffer, this command is executed after the print data in the line buffer is printed.
• When registering, all of the current macro regions are cleared, so if previous macro data is necessary, rewrite it.
• When performing a Hex Dump, initialization macro region data is added in the same way as the current specifications.
m ≤ 9, 0 ≤ t ≤ 8
k ≤ 7936
Registration
Data Type
Registration
Block No.
Size (Bytes) Details
Initialization 0 2 Registration data type 0 x 0000 =
Raster graphics are command types and incidental specifications that enable high speed and high quality printing of
graphics.
The following shows the characteristics and specifications for raster graphics.
• Defines the raster mode command as the STAR line mode extension set.
Basically no restrictions set in use of conventional STAR line mode.
STAR Page Mode cannot be used.
• Handles high speed data transmission
When using IEEE 1284, data transmission rate of 80 to 100 KB /sec ensured.
• Handles IEEE 1284, USB and Ethernet I/F (RS-232C not applicable)
• Handles both fixed length/variable length mode
• Print speed selectable
• Post printing cut operation selectable
• All settings possible by Raster commands.
Most settings are possible without DIPSW/memory switch settings.
• Supports printer driver handling raster mode
The following shows the raster command details.
Note that if not specifically noted, the following commands are effective only in raster mode and the commands are
ignored (4 bytes ignored) when other than the raster mode. The raster image buffer in the command details described
below indicate the raster dedicated image buffer, the length thereof (vertical direction dot count) differing between
models.
[Defined Area] - - [Initial Value] - - [Function] Initializes raster mode.
This command is also effective when not in the raster mode.
However, initialization of the raster mode with this command is executed when entering the raster
mode.
The following settings are initialized using this command.
• Raster page length setting (ESC * r P n NUL)
• Raster print quality setting (ESC * Q n NUL)
• Raster print color setting (ESC * r K n NUL)
• Raster left margin setting (ESC * r m l n NUL)
• Raster right margin setting (ESC * r m r n NUL)
• Raster EOT mode setting (ESC FF EOT)
• Raster FF mode setting (ESC FF NUL)
• Raster image buffer clear
Note that when entering the raster mode, it executes the same process as initialization of the raster
mode using this command.
However, because initialization is not performed when entering the raster mode only for the
following settings, when initializing the following it sends this initialization command.
• Raster data print color setting (ESC * r K n NUL)
[Name] Enter raster mode
[Code] ASCII ESC * r AHex. 1B 2A 72 41
Decimal 27 42 114 65
[Defined Area] - - [Initial Value] - - [Function] Enters raster mode.
This command is ignored when in the raster mode.
The following shows the details regard processing of this command.
(1) Reception of this command.
(2) When using parallel I/F, IEEE 1284 reverse mode is prohibited.
(3) All data remaining in the reception buffer and image buffer is printed equivalent to the FF
command.
(4) Initialize raster mode
(5) Enter raster mode
When in the raster mode, the raster mode is initialized.
The following shows the contents of the initialization.
• Raster page length setting (ESC * r P n NUL)
• Raster print quality setting (ESC * Q n NUL)
• Raster left margin setting (ESC * r m l n NUL)
• Raster right margin setting (ESC * r m r n NUL)
• Raster EOT mode setting (ESC FF EOT)
• Raster FF mode setting (ESC FF NUT)
• Raster image buffer clear
(*) Only raster data print color setting is not initialized when entering the raster mode.
[Name] Quit raster mode
[Code] ASCII ESC * r B
Hex. 1B 2A 72 42
Decimal 27 42 114 66
[Defined Area] - - [Initial Value] - - [Function] Quits raster mode.
When quitting the raster mode, if there is raster data remaining in the image buffer of the raster
mode, it quits the raster mode after executing the raster EOT mode.
Note that with this command, IEEE 1284 reverse mode is allowed in parallel I/F and it sets the top
of page with the line mode.
ESC * r C
[Name] Clear raster data
[Code] ASCII ESC * r C
Hex. 1B 2A 72 43
Decimal 27 42 114 67
[Defined Area] - - [Initial Value] - - [Function] Clears image buffer data in the raster mode.
[Defined Area] 0≤
[Initial Value] n = 0
[Function] Drives the drawer in the raster mode.
Drawer drive conditions conform to setting command (<ESC> <BEL> n1 n2) of the line mode.
n is a decimal description (max. 255 digits) using ASCII characters.
[Name] Set raster EOT mode
[Code] ASCII ESC * r En NULHex. 1B 2A 72 45n 00Decimal 27 42 114 69n 0
[Defined Area] n = 0, 1, 2, 3, 8, 9, 12, 13, 36, 37
[Initial Value] Models handling full cut: n = 9
Models connected with a presenter: n = 37
[Function] Sets the raster EOT mode.
The EOT mode operates to execute using the raster document quit command (ESC FF EOT).
n is a decimal description (max. 255 digits) using ASCII characters.
Specification A <EOT mode setting format>
n FormFeed Cut Feed Cutter Presenter
0 Set To Default Set To Default Set To Default Set To Default
[Defined Area] n = 0, 1, 2, 3, 8, 9, 12, 13, 36, 37
[Initial Value] Models handling full cut: n = 9
Models connected with a presenter: n = 37
[Function] Sets raster FF mode.
The FF mode operates to execute using the raster document quit command (ESC FF NUL).
n is a decimal description (max. 255 digits) using ASCII characters.
Specification A <FF mode setting format>
n FormFeed Cut Feed Cutter Presenter
0 Set To Default Set To Default Set To Default Set To Default
1 ○ -- -- --
2 ○ ○ -- --
3 ○ TearBar -- --
8 ○ -- Full Cut --
9 ○ ○ Full Cut -12 ○ -- Partial Cut -13 ○ ○ Partial Cut -36 ○ -- Full Cut Eject
37 ○ ○ Full Cut Eject
Specification B <FF mode setting format>
n FormFeed Cut Feed Cutter Presenter
0 Set To Default Set To Default Set To Default Set To Default
[Name] Set raster left margin
[Code] ASCII ESC * r ml n NULHex. 1B 2A 72 6D6Cn 00Decimal 27 42 114 109 108n 0
[Defined Area] - - [Initial Value] n = 0
[Function] Sets raster left margin.
This command sets the left margin to (n x 8).
When the left margin exceeds the printable area, or if the left margin specification eliminates the
print area (printable region to right margin) to the left margin specified value, this command is
ignored.
n is a decimal description (max. 255 digits) using ASCII characters.
ESC * r m r n NUL
[Name] Set raster right margin
[Code] ASCII ESC * r mr n NULHex. 1B 2A 72 6D72n 00Decimal 27 42 114 109 114n 0
[Defined Area] - - [Initial Value] n = 0
[Function] Sets raster right margin.
This command sets the right margin to (n x 8).
When the right margin exceeds the printable area, or if the right margin specification eliminates the
print area (printable region to left margin) to the right margin specified value, this command is
ignored.
n is a decimal description (max. 255 digits) using ASCII characters.
[Name] Set raster top margin
[Code] ASCII ESC * r T n NULHex. 1B 2A 72 54n 00Decimal 27 42 114 84n 0
[Defined Area] 0≤
[Initial Value] --[Function] Sets the raster top margin.
n is a decimal description (max. 255 digits) using ASCII characters.
n Top margin
0 Set To Default
1 Set top margin using reverse paper feed.
2 Set standard top margin.
(*) This differs according to the model handling this command.
The line mode top margin setting continues after entering the raster mode.
Also, the top margin setting of the raster mode continues after ending the raster mode, and returning to the
line mode.
n≤2
ESC * r K n NUL
[Name] Set raster print color
[Code] ASCII ESC * r Kn NUL Hex. 1B 2A 72 4Bn 00 Decimal 27 42 114 75n 0
[Defined Area] 0≤
[Initial Value] n = 0
[Function] Sets raster print color.
This command is effective only when specifying the 2 color mode using the line mode.
This command is ignored when not in the 2 color print mode.
n is a decimal description (max. 255 digits) using ASCII characters.
n Print color
0 Black
1 Cyan
2 Magenta
3 Yellow
(*) This command is effective only when using a model handling 2 color printing. This command is
[Name] Send raster data (auto line feed)
[Code] ASCII b n1 n2 d1 d2... dk Hex. 62 n1 n2 d1 d2... dk Decimal 98 n1 n2 d1 d2... dk
[Defined Area] 0≤
0≤
0≤k= n1+n2 x 256
1≤
[Initial Value] - - [Function] Sends raster data (auto line feed).
Raster data is sent in (n1 + n2 x 256) byte counts as binary data.
Raster data exceeding the print area currently set is discarded.
The image buffer expanded position is automatically line fed one dot row and moved to the left
Also, data expansion is duplicated on the data in the current image buffer (OR process).
The following shows expanded image buffer for the set raster print color.
n is a decimal description (max. 255 digits) using ASCII characters.
Print color Expanded image buffer
Black Image buffer for black
Cyan Image buffer for color
Magenta Image buffer for color
Yellow Image buffer for color
n1≤255
n2≤255
d≤255
k
margin on the next line after expanded the image buffer data 1 dot row using this command.
[Name] Transfer raster data
[Code] ASCII k n1 n2 d1 d2... dk Hex. 6B n1 n2 d1 d2... dk Decimal 107 n1 n2 d1 d2... dk
[Defined Area] 0≤
0≤
0≤
k≤
1≤k
[Initial Value] - - [Function] Sends raster data.
Raster data is sent in (n1 + n2 x 256) byte counts as binary data.
Raster data exceeding the print area currently set is discarded.
The image buffer expanded position returns to the head of the current dot row without an automatic
Also, data expansion is duplicated on the data in the current image buffer (OR process).
The following shows expanded image buffer for the set raster print color.
n is a decimal description (max. 255 digits) using ASCII characters.
Print color Expanded image buffer
Black Image buffer for black
Cyan Image buffer for black
Magenta Image buffer for black
Yellow Image buffer for black
n1≤255
n2≤255
d≤255
n1+n2 x 256
line fed after expanding the image buffer data 1 dot row using this command.
[Name] Move vertical direction position (Line feed for specified dots)
[Code] ASCII ESC * r Yn NULHex. 1B 2A 72 59n 00Decimal 27 42 114 89n 0
[Defined Area] - - [Initial Value] - - [Function] Moves vertical direction position.
Moves position n dots with this command.
When the current page length setting is in continuous print mode, and the n dots exceed the
remaining dot count of the raster image buffer length, this moves up to the remaining dot count and
ignores the overflow.
If the page length is set, it moves to the current page length and ignores the overflow.
Note that when there is overflow, this expands the next raster data after printing the raster image
buffer data with the next raster data transfer and move vertical direction position command.
n is a decimal description (max. 255 digits) using ASCII characters.
[Defined Area] - - [Initial Value] - - [Function] Executes EOT mode.
Executes operation specified by the EOT mode setting command (ESC * r E n NUL).
ESC * r N n NUL
[Name] Discard data for specified byte count
[Code] ASCII ESC * r Nn NUL
Hex. 1B 2A 72
Decimal 27 42 114 78n 0
[Defined Area] 1≤
[Initial Value] - - [Function] Discards data for the specified byte count.
Discards data received after a byte count specified by n.
n is expressed in decimal (maximum 4 digits) using ASCII characters.
This command is effective only in raster mode.
[Defined Area] m=49,50
1≤
[Initial Value] - - [Function] Repeatedly drives the buzzer according to the ON/OFF conditions set by the external buzzer drive
pulse conditions command <ESC> <GS> <EM> <DC1> m n1 n2.
m specifies the buzzer drive terminal to drive.
Specifies the number of repetitions of the buzzer drive with n.
The buzzer will not ring while printing.
This command is prohibited for uses other than to ring the buzzer.
(If this command is used to drive the cash drawer on models that have an external device terminal, the system will be
damaged. Absolutely never use it for other purposes.)
The buzzer can be stopped by pressing the paper feed switch or opening the cover when it is ringing.
Conditions must not be set in advance with the external buzzer drive pulse condition command <ESC> <GS> <EM>
<DC1> m n1 n2 prior to entering the raster mode.
n is expressed in decimal (maximum 255 digits) using ASCII characters.
The following commands control top of form functions using black mark paper.
The following commands are effective only when black mark is set to be effective.
ESC d n
[Name] Auto cutter
[Code] ASCII ESC d n
Hex. 1B 64 n
Decimal 27 100 n
[Defined Area] 0≤
48≤
[Initial Value] - - [Function] Executes the auto-cutter.
After auto-cutter is executed, the printer considers that to be the top of the page.
n Auto cutter
0, 48 Full cut at the current position.
1, 49 Partial cut at the current position.
2, 50 After executing top of form, paper is fed to cutting position, then a full cut.
3, 51 After executing top of form, paper is fed to cutting position, then a partial cut.
(*) The auto-cutter function operates in the following ways on models that only have a full cut or a
• Models that perform only a full cut: Executes a full cut when for instructions calling
• Models that perform only a partial cut: Executes a partial cut when there are for
(*) When connected with a presenter, executes a full cut when instructed for a partial cut.
d≤3
d≤51 (”0”≤d≤”3”)
Print data in line buffer is printed before a full cut.
This command is ignored if the printer is not equipped with an auto-cutter.
Print data in line buffer is printed before a partial cut.
This command is ignored if the printer is not equipped with an auto-cutter.
Print data in line buffer is printed before the operation described above.
This command is ignored if the printer is not equipped with an auto-cutter.
Print data in line buffer is printed before the operation described above.
This command is ignored if the printer is not equipped with an auto-cutter.
The following commands control 2 color printing functions.
The following commands are effective only when using a model handling 2 color printing.
ESC RS c n
[Name] Set print color in 2 color print mode
[Code] ASCII ESC RS c n
Hex. 1B 1E 63 n
Decimal 27 30 99 n
[Defined Area] 0≤
48≤n≤49 (”0”≤n≤”1”)
[Initial Value] n = 0, 48 (When in 2 color print mode)
[Function] Specifies print color in 2 color print mode.
This command is ignored when not in the 2 color print mode.
Specifies black for the print color when in 2 color print mode.
This command is cleared only when the printer is reset.
The specification of this command is not cleared by ESC @ CAN.
However, print color is initialized to black by the ESC @ and CAN only when in the compatible 2