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).