2.3. Standard Command Details .................................................................................. 19
2.3.1. Font style and Character Set ..................................................................................... 19
ESC RS F n ........................................................................................................................................... 19
ESC GS t n ............................................................................................................................................ 20
ESC R n ................................................................................................................................................ 24
ESC / n ................................................................................................................................................. 25
ESC SP n .............................................................................................................................................. 25
ESC & c1 c2 n d1…d48 .......................................................................................................................... 26
ESC & c1 c2 n ....................................................................................................................................... 27
ESC % n ............................................................................................................................................... 27
2.3.2. Kanji characters ....................................................................................................... 28
ESC p ................................................................................................................................................... 28
ESC $ n ................................................................................................................................................ 28
ESC s n1 n2 .......................................................................................................................................... 29
ESC t n1 n2 .......................................................................................................................................... 29
ESC r c1 c2 d1...dk ................................................................................................................................ 30
ESC i n1 n2 ........................................................................................................................................... 31
ESC W n ............................................................................................................................................... 32
ESC h n ................................................................................................................................................ 32
ESC E ................................................................................................................................................... 33
ESC F ................................................................................................................................................... 33
ESC – n ................................................................................................................................................ 34
ESC _ n ................................................................................................................................................ 34
SI ........................................................................................................................................................ 36
2.3.4. Horizontal Direction Printing Position .......................................................................... 37
ESC l n ................................................................................................................................................. 37
ESC Q n ................................................................................................................................................ 37
ESC D n1 n2…nk NUL ............................................................................................................................ 38
StarPRNT Command Specifications2
Rev. 2.25
ESC D NUL ............................................................................................................................................ 38
ESC GS A n1 n2 ..................................................................................................................................... 39
ESC GS R n1 n2 ..................................................................................................................................... 39
ESC GS a n ........................................................................................................................................... 39
2.3.5. Line Spacing ........................................................................................................... 40
ESC a n ................................................................................................................................................ 40
ESC z n ................................................................................................................................................ 40
ESC J n ................................................................................................................................................. 41
ESC I n ................................................................................................................................................. 41
2.3.6. Page Control Commands .......................................................................................... 42
ESC C n ................................................................................................................................................ 42
ESC C 0 n ............................................................................................................................................. 42
2.3.7. Top margin ............................................................................................................. 43
ESC RS T n ........................................................................................................................................... 43
2.3.8. Page Function ......................................................................................................... 44
ESC GS h 0 k m n .................................................................................................................................. 44
2.3.9. Cutter Control ......................................................................................................... 45
ESC d n ................................................................................................................................................ 45
2.3.10. Reduced Printing Function Command Details ............................................................... 46
ESC GS c h v ......................................................................................................................................... 46
ESC GS P 0 ........................................................................................................................................... 47
ESC GS P 1 ........................................................................................................................................... 48
ESC GS P 2 n ........................................................................................................................................ 48
2.3.14. Bar Code ................................................................................................................ 73
ESC b n1 n2 n3 n4 d1...dk RS ................................................................................................................. 73
2.3.15. Two-Dimensional Bar Code QR Code Command Details ................................................ 76
ESC GS y S 0 n ...................................................................................................................................... 78
ESC GS y S 1 n ...................................................................................................................................... 78
ESC GS y S 2 n ...................................................................................................................................... 78
ESC GS y D 1 m nL nH d1 d2 … dk .......................................................................................................... 79
ESC GS y D 2 a m1 n1L n1H d11 d12 … d1k m2 n2L n2H d21 d22 … d2k ml … dlk ............................................. 80
ESC GS y P ........................................................................................................................................... 81
2.3.16. Two-Dimensional Bar Code PDF417 Command Details ................................................. 82
ESC GS x S 0 n p1 p2 ............................................................................................................................. 84
ESC GS x S 1 n ...................................................................................................................................... 84
ESC GS x S 2 n ...................................................................................................................................... 84
ESC GS x S 3 n ...................................................................................................................................... 85
ESC GS x D nL nH d1 d2 … dk ................................................................................................................ 85
ESC GS x P ........................................................................................................................................... 85
2.3.17. GS1 2D Code, Compound symbol Command Details .................................................... 86
ESC ACK CAN ........................................................................................................................................ 94
ESC GS # m N n1 n2 n3 n4 LF NUL ......................................................................................................... 96
2.3.20. Status .................................................................................................................... 97
ESC RS a n ........................................................................................................................................... 97
ESC RS E n ........................................................................................................................................... 98
ESC GS ETX s n1 n2 ............................................................................................................................... 99
ESC RS A n ......................................................................................................................................... 109
ESC RS d n ......................................................................................................................................... 110
ESC RS r n .......................................................................................................................................... 112
2.3.22. Special Command .................................................................................................. 113
ESC RS R n ......................................................................................................................................... 113
2.3.24. Black Mark Related Command Details ....................................................................... 118
ESC d n .............................................................................................................................................. 118
ESC C n .............................................................................................................................................. 119
ESC C 0 n ........................................................................................................................................... 119
2.3.25. Color Printing Command Details .............................................................................. 120
ESC RS c n .......................................................................................................................................... 120
ESC RS C n ......................................................................................................................................... 121
SUB ................................................................................................................................................... 125
EM ..................................................................................................................................................... 126
ESC GS EM DC1 m n1 n2 ...................................................................................................................... 127
ESC GS EM DC2 m n1 n2 ...................................................................................................................... 128
ESC GS B 0 ......................................................................................................................................... 130
ESC GS B 1 ......................................................................................................................................... 130
ESC GS B 2 ......................................................................................................................................... 131
ESC GS B 3 ......................................................................................................................................... 131
2.3.29. Magnetic Card Reader Commands ........................................................................... 132
ESC M C ............................................................................................................................................. 132
ESC M D ............................................................................................................................................. 132
ESC M E ............................................................................................................................................. 132
ESC M F .............................................................................................................................................. 133
ESC M G ............................................................................................................................................. 133
ESC M J .............................................................................................................................................. 133
ESC GS B @ ........................................................................................................................................ 134
ESC RS B A ......................................................................................................................................... 134
ESC GS B B ......................................................................................................................................... 135
ESC GS B C ......................................................................................................................................... 135
4.7.2. Magnetic Card Data Transmission Format ................................................................. 195
4.8. Appendix 8 Specifications when a melody speaker is connected .............................. 196
4.9. Appendix 9 Print Area Setting ............................................................................. 197
5. SPECIAL APPENDIX .................................................................................... 198
5.1. COMMAND LIST FOR EACH MODEL ..................................................................... 198
StarPRNT Command Specifications8
Rev. 2.25
This specification is a command specification for StarPRNT of line thermal printer.
Information contained herein applies to the following models.
< Applicable Models:>
• mPOP
• SM-L Series
SM-L200
SM-L300
• SM-S Series
SM-S210i (For Japanese market only)
SM-S220i (Other than Japanese market)
SM-S230i (Other than Japanese market)
• SM-L Series
SM-T300i
SM-T400i
• mC-Print3
MCP30
MCP31
• mC-Print2
MCP20
MCP21
For the command support status of each model, refer to “5. COMMAND LIST FOR EACH MODEL”.
StarPRNT Command Specifications9
Rev. 2.25
Commands
Name
ESC RS F
Select font
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 &
Register/delete 12 x 24 dot font download characters
ESC %
Set/cancel download characters
Commands
Name
ESC p
Set to JIS Kanji character mode
ESC q
Cancel JIS Kanji character mode
ESC $
Set/cancel JIS Kanji character modes
ESC s
Set two bytes Kanji characters left/right spaces
ESC t
Set 1 byte Kanji characters left/right spaces
ESC r
Register Chinese download characters
Commands
Name
ESC i
Set/cancel the double wide/high printing
ESC W
Set/cancel the double wide printing
ESC h
Set/cancel the double high printing
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
1.COMMAND FUNCTION LIST
• Font style and character set
• Chinese characters
• Kanji character control commands are ignored on printers not installed with Kanji character fonts (those intended for
overseas).
• All Kanji character control commands are ignored if the specification for the location of use is specified as SBCS (single
byte countries) by the memory switch.
• Print modes
StarPRNT Command Specifications10
Rev. 2.25
Commands
Name
ESC l
Set left margin
ESC Q
Set right margin
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
Commands
Name
LF
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
Commands
Name
FF
Form feed
ESC C
Set page length to n lines
ESC C 0
Set page length in 24 mm units
Commands
Name
ESC RS T
Set top margin
Commands
Name
ESC GS h 0
Invert 180˚
Commands
Name
ESC d
Paper cutter instruction
Commands
Name
• Horizontal direction position
• Line spacing
• Page control commands
• Top margin
• Page Function
• Cutter control
• Reduced Printing Function Command
ESC GS c h v Set reduced printing
StarPRNT Command Specifications11
Rev. 2.25
Commands
Name
ESC GS P 0
Selects page mode
ESC GS P 1
Cancels page mode
ESC GS P 2
Select printing direction
ESC GS P 3
Set print region in page mode
ESC GS P 4
Specify character vertical direction absolute position
ESC GS P 5
Specify character vertical direction relative position
ESC GS P 6
Prints
ESC GS P 7
Cancel printing and page mode
ESC GS P 8
Cancel print data
Commands
Name
ESC K
Standard density bit image
ESC L
High density bit image
ESC k
Fine bit image
ESC X
Fine bit image
ESC GS S m
Graphics Raster data printing
ESC GS X m
Commands
Name
ESC GS ( L (fn=0, 48)
Register logo data
ESC GS ( L (fn=3, 51)
Send key code of the registered NV graphics
ESC GS ( L (fn=64)
Send all key code of the NV graphics
ESC GS ( L (fn=65)
Erase entire NV graphics data
ESC GS ( L (fn=66)
Erase the specified NV graphics data
ESC GS ( L (fn=67)
Set the specified NV graphics data
ESC GS ( L (fn=69)
Print the specified NV graphics data
Register logo data
Send all key code of the NV graphics
Erase entire NV graphics data
ESC GS 8 L (fn=66)
Erase the specified NV graphics data
Set the specified NV graphics data
ESC GS ) L (fn=48)
Send the registered individual logo CRC
ESC GS ) L (fn=49)
Send the registered individual NV graphics memory capacity
ESC GS ) L (fn=50)
all key code of the registered NV graphics
ESC GS ) L (fn=51)
Send the registered NV graphics data
Commands
Name
ESC b
Print bar code
• Page Mode Commands
• Bit image Graphics
• Logos
ESC GS 8 L (fn=0, 48)
ESC GS 8 L (fn=3, 51)
ESC GS 8 L (fn=64)
ESC GS 8 L (fn=65)
ESC GS 8 L (fn=67)
ESC GS 8 L (fn=69)
Graphics Raster data printing (Compress data)
Send key code of the registered NV graphics
Print the specified NV graphics data
• Bar code
StarPRNT Command Specifications12
Rev. 2.25
Commands
Name
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
Commands
Name
ESC GS x S0
Set PDF417 bar code size
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
Commands
Name
ESC GS ( k(cn=51,fn=67)
Set 2D module siz
ESC GS ( k(cn=51,fn=71)
Set The maximum width of the 2D GS1DataBar Expanded Stacked
ESC GS ( k(cn=51,fn=80)
Store data in 2D symbol saving region
ESC GS ( k(cn=51,fn=81)
Print 2D symbol data of symbol saving region
ESC GS ( k(cn=52,fn=67)
Compound symbol: Set module size
ESC GS ( k(cn=52,fn=71)
Compound symbol: Set The maximum width of the 2D GS1DataBar Expanded Stacked
ESC GS ( k(cn=52,fn=72)
Compound symbol: Set HRI Font
ESC GS ( k(cn=52,fn=80)
Compound symbol: Store data in symbol saving region
ESC GS ( k(cn=52,fn=81)
Compound symbol: Print symbol data of symbol saving region
Commands
Name
ESC @
Command initialization
ESC ?
Reset printer
Commands
Name
ESC GS #
Set memory switch
• QR Code commands
• PDF417 commands
• 2D GS1 code, Compound symbol Commands
• Initialization Command
ESC ACK CAN Real-time printer reset
• Memory Switch Command
StarPRNT Command Specifications13
Rev. 2.25
Commands
Name
ESC RS a
Set status transmission conditions
ESC ACK SOH
Real-time printer status (ASB Status)
ETB
Update ETB status
ESC RS E
Clear ETB counter, ETB status
ESC GS ETX
Send print end counter and initialize
Print data cancel function
Data time out setting
ESC # *
Printer version inquiry
ESC GS ) I (fn = 48)
Transmit multibyte font kind
ESC GS ) I (fn = 49)
Transmit Printer information
ESC GS ) I (fn = 50)
Transmit installed I/F kind
ESC GS ) I (fn = 52)
Commands
Name
ESC RS A
Printing area setting
ESC RS d
Set print density
ESC RS r
Set printing speed
Commands
Name
ESC RS R
Specify the special location of use
Commands
Name
ESC GS ) U (fn = 48)
Selects UTF code
ESC GS ) U (fn = 64)
Setting of the Unicode ambiguous character
Commands
Name
ESC d
Paper cut instruction
FF
Form feed
ESC C
Set page length to n lines
ESC C 0
Set page length in 24 mm units
Commands
Name
ESC RS c
Specify printing color in 2 color printing mode
ESC RS C
Select/cancel 2 color printing mode
ESC 4
Specify white/black inversion and printing color red
ESC 5
Cancel white/black inversion and specify printing color black
• Status
ESC GS ) I (fn = 51)
• Print settings
Transmit Remaining battery power
Transmit external device information
• Special Commands
• UTF Commands
ESC GS ) U (fn = 65)
Set the UTF-8 CJK Unified Ideograph font
• Black mark Commands
• 2 color printing related commands
StarPRNT Command Specifications14
Rev. 2.25
Commands
Name
ESC BEL
Set pulse width for external device 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 EM DC1
External buzzer drive pulse condition settings
ESC GS EM DC2
External buzzer drive execution
Commands
Name
ESC GS s R
Commands
Name
ESC GS B 0
ESC GS B 1
Status Request
ESC GS B 2
Barcode data request
ESC GS B 3
Commands
Name
ESC M J
Read JIS II track
Commands
Name
Status request
Customer display data request
• External device drive
• Melody Speaker Command
• Barcode Reader Command
Playback of received data
Send data to a barcode reader
Buffer clear
• Magnetic Card Reader Commands
ESC M C Read ISO track
ESC M D Read ISO track
ESC M E Read ISO 2 tracks
ESC M F Read ISO 3 tracks
ESC M G Read ISO track (Track 3)
EOT Cancel MSR mode
• Customer Display Command
ESC GS B @ Send data to a customer display
ESC RS B A
ESC GS B B
ESC GS B C Buffer clear
StarPRNT Command Specifications15
Rev. 2.25
Commands
Name
ESC GS ) N (fn = 48)
ESC GS ) N (fn = 49)
ESC GS ) N (fn = 50)
ESC GS ) N (fn = 51)
ESC GS ) N (fn = 52)
ESC GS ) N (fn = 53)
Set 9100 multi session
ESC GS ) N (fn = 54)
ESC GS ) N (fn = 55)
ESC GS ) N (fn = 57)
Set Steady LAN
ESC GS ) N (fn = 58)
ESC GS ) N (fn = 59)
ESC GS ) N (fn = 64)
Send acquisition method for IP address
ESC GS ) N (fn = 65)
ESC GS ) N (fn = 66)
ESC GS ) N (fn = 67)
ESC GS ) N (fn = 68)
ESC GS ) N (fn = 69)
ESC GS ) N (fn = 70)
ESC GS ) N (fn = 71)
ESC GS ) N (fn = 73)
ESC GS ) N (fn = 74)
ESC GS ) N (fn = 75)
ESC GS ) N (fn = 112)
ESC GS ) N (fn = 113)
ESC GS ) N (fn = 129)
Send Login Password Change Status
Set Star CloudPRNT Cloud Service
ESC GS ) N (fn = 134)
Set Star CloudPRNT Polling time
ESC GS ) N (fn = 135)
Send Star CloudPRNT Polling time
ESC GS ) N (fn = 137)
Send Star CloudPRNT User Name
• Network command
Set acquisition method for IP address
Set IP Address
Set subnet mask
Set default gateway
Set DHCP timeout
Set 9100 data timeout
Set disconnect message
Set DNS 1
Set DNS 2
Send IP Address
Send subnet mask
Send default gateway
Send DHCP timeout
Send 9100 multi session
Send 9100 data timeout
Set disconnect message
Send Steady LAN
Send DNS 1
Send DNS 2
Save network parameters
Initialize network parameters
ESC GS ) N (fn = 114) Execute Login
ESC GS ) N (fn = 115) Send Login Status
ESC GS ) N (fn = 116) Execute Logout
ESC GS ) N (fn = 128) Set Login Password
ESC GS ) N (fn = 130)
ESC GS ) N (fn = 131) Send Star CloudPRNT Cloud Service
ESC GS ) N (fn = 132) Set Star CloudPRNT Service URL
ESC GS ) N (fn = 133) Send Star CloudPRNT Service URL
ESC GS ) N (fn = 136) Set Star CloudPRNT User Name
ESC GS ) N (fn = 138) Set Star CloudPRNT Password
ESC GS ) N (fn = 139) Send Star CloudPRNT Password
ESC GS ) N (fn = 140) Set Star CloudPRNT HTTPS trust level
ESC GS ) N (fn = 141) Send Star CloudPRNT HTTPS trust level
ESC GS ) N (fn = 142) Set Star CloudPRNT NTP Server
ESC GS ) N (fn = 143) Send Star CloudPRNT NTP Server
ESC GS ) N (fn = 144) Set Star CloudPRNT Cipher Suites Encryption Level
ESC GS ) N (fn = 145) Send Star CloudPRNT Cipher Suites Encryption Level
StarPRNT Command Specifications16
Rev. 2.25
2. COMMAND DETAILS
2.1. Explanation of Terms
• 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)
• ANK character base line
* For SM-S and T series, the base line is the upper end of each data.
* For the expansion position of the print data in page mode, refer to “Appendix 5 Explanation of Page Mode”.
• ASB Function
Sends the automatic status to the host each time the printer’s status changed.
• NSB Function
When the printer uses a parallel I/F or USB I/F, sends the automatic status each time the reverse transfer mode is entered.
When the printer uses Ethernet I/F or wireless I/F, sends the automatic status when the printer is connected to the print port
(TCP#9100). The ASB and NSB status formats are the same.
StarPRNT Command Specifications17
Rev. 2.25
2.2. Exception Processing
1) Undefined codes
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 the data following the ESC code is a code that is not defined as a command, ESC 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.
When the data following ESC is FS, and the data following that is not defined as a command, ESC FS and the code which
follows (total 3 bytes) are discarded.
When the data following ESC is GS, and the data which follows it is a code that is not defined as a command, ESC GS
and the code which follows it (total 3 bytes) is read and discarded.
When the data following ESC is RS, and the data which follows it is a code that is not defined as a command, ESC RS
and the 2-byte code which follows it (total 4 bytes) is read and discarded.
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.
(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.
StarPRNT Command Specifications18
Rev. 2.25
[Name]
Select font
[Code]
ASCII
ESC
RS F n
Hex.
1B
1E
46 n
Decimal
27
30
70 n
2.3. Standard Command Details
2.3.1. Font style and Character Set
ESC RS F n
[Defined Region] Spec. 1 : 0≤n≤1
Spec. 2 : 0≤n≤2
[Initial Value] n = 0
[Function] Selects a font
n Font
0 Font-A (12 x 24 dots)
1 Font-B (9 x 24 dots)
2 Font-C ( 9 x 17 dots)
StarPRNT Command Specifications19
Rev. 2.25
[Name]
Select code page
[Code]
ASCII
ESC
GS t n
Hex.
1B
1D
74 n
Decimal
27
29
116 n
2
Katakana
7
Codepage 861 (Icelandic)
8
Codepage 863 (Canadian French)
ESC GS t n
[Defined Region] Spec. 1
For SBCS
0≤ n ≤ 21, 32 ≤ n ≤ 34, 64 ≤ n ≤ 79, 96 ≤ n ≤ 98, n=102, 255
Spec. 2
For SBCS
0≤ n ≤ 21, 32 ≤ n ≤ 34, 64 ≤ n ≤ 79, 96 ≤ n ≤ 98, n=102, n=255
0 ≤ da ≤ 255 (Font-A data)
0 ≤ db ≤ 255 (Font-B data
ak = 6144
bk = 6144
ck = 0 (Do not send Font-C data)
Spec. 2
n1 = 0
n2 = 48
1 ≤ (n1 + n2 x 256)
0 ≤da ≤ 255 (Font-A data)
0 ≤db ≤ 255 (Font-B data
0 ≤ dc ≤ 255 (Font-C data)
ak = 6144
bk = 6144
ck = 4352
[Initial Value] - - [Function] Writes data into a blank code page.
A blank code page indicates a character code table where character codes from 80h to FFh are all blank.
A blank code page can be selected using the ESC GS t n command n = 255.
The following is the data written to the blank code page. Font-A: 1 character = 48 bytes 6144 bytes = 48 bytes x 128 characters Font-B: 1 character = 48 bytes 6144 bytes = 48 bytes x 128 characters Font-C: 1 character = 34 bytes 4352 bytes = 34 bytes x 128 characters
Send Font-A, Font-B and Font-C data continuously.
For models that do not support Font-C, only send Font-A / Font-B data.
The printer is reset when writing with this command is completed.
StarPRNT Command Specifications22
Rev. 2.25
StarPRNT Command Specifications23
Rev. 2.25
[Name]
Specify international character set
[Code]
ASCII
ESC
R n
Hex.
1B
52 n
Decimal
27
82 n
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
64
Legal
ESC R n
[Defined Area] 0≤n≤14
n = 64
48≤n≤57 (”0”≤n≤”9”)
65≤n≤69 (”A”≤n≤”E”)
[Initial Value] Memory switch setting
When installed with Japanese language characters and MBCS setting: Fixed at n=8
When installed with Hangeul language characters and MBCS setting: Fixed at n=13
[Function] Specifies international characters
When installed with Japanese language characters and MBCS setting, this command is ignored.
When installed with Hangeul language characters and MBCS setting, this command is ignored.
StarPRNT Command Specifications24
Rev. 2.25
[Name]
Specify/cancel slash zero
[Code]
ASCII
ESC / n Hex.
1B
2F n
Decimal
27
47 n
ESC SP n
[Name]
Set ANK right space
[Code]
ASCII
ESC
SP n
Hex.
1B
20 n
Decimal
27
32 n
ESC / n
[Defined Area] n = 0, 1, 48, 49
[Initial Value] Memory switch setting
[Function] Specifies and cancels slash zeros.
n International Characters
0, 48 Cancels slash zero
1, 49 Specifies slash zero
[Defined Area] 0≤n≤15
48≤n≤57 (”0”≤n≤”9”)
65≤n≤70 (”A”≤n≤”F”)
[Initial Value] Memory switch setting
[Function] Specify the right space amount of ANK characters in n dots.
The ANK character width is "left space amount” + "ANK font dot count” + right space amount.”
(See the information on character specifications in the appropriate printer specifications manual for
details on the ANK font dot count.)
Standard mode and page mode can be set independently of each other.
StarPRNT Command Specifications25
Rev. 2.25
[Name]
Register ANK download characters
[Code]
ASCII
ESC
&
c1
c2 n d1
...
d48
Hex.
1B
26
c1
c2 n d1
...
d48
Decimal
27
38
c1
c2 n d1
...
d48
FONT-A data format 24 dots vertically x 12 dots horizontally
FONT-B data format 24 dots vertically x 9 dots horizontally
ESC & c1 c2 n d1…d48
[Defined Area] c1 = 1, 49
c2 = 1, 49
32≤n≤127
0≤d≤255
[Initial Value] - - [Function] Registers the download characters of the currently selected font (Font-A or Font-B) 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 normal
data.
StarPRNT Command Specifications26
Rev. 2.25
[Name]
Delete ANK download characters
[Code]
ASCII
ESC
&
c1
c2 n
Hex.
1B
26
c1
c2 n
Decimal
27
38
c1
c2 n
[Name]
Specifies/cancels ANK download characters
[Code]
ASCII
ESC % n Hex.
1B
25 n
Decimal
27
37 n
n
Download characters
0, 48
Cancels ANK download characters
1, 49
Specifies ANK download characters
ESC & c1 c2 n
[Defined Area] c1 = 1, 49
c2 = 0, 48
32≤n≤127
[Initial Value] - - [Function] Deletes the download characters of the currently selected font (Font-A or Font-B) that are registered in the
[Defined Area] - - [Initial Value] JIS Kanji character mode cancelled
[Function] Specifies JIS Kanji character mode
When in JIS Kanji character mode, character codes are all handled as 2 byte Kanji characters (First byte:
upper code; second byte: lower code).
This command is ignored for models not equipped with Japanese and Kanji characters and when the
specification for the location of use is specified as SBCS (single byte countries) by the memory switch.
This command is ignored when UTF-8 is specified (command: ESC GS t 128) for MBCS.
ESC q
[Defined Area] - - [Initial Value] JIS Kanji character mode cancelled
[Function] Cancel JIS Kanji character mode
This command is ignored when UTF-8 is specified (command: ESC GS t 128) for MBCS.
ESC $ n
[Defined Area] - - [Initial Value] Memory switch setting
[Function] Specifies and cancels the shift JIS Kanji character mode.
When in shift JIS Kanji character mode, character codes are all handled as 2 byte Kanji characters (First
byte: upper code; second byte: lower code).
This command is ignored for models not equipped with Japanese and Kanji characters and when the
specification for the location of use is specified as SBCS (single byte countries) by the memory switch.
This command is ignored when UTF-8 is specified (command: ESC GS t 128) for MBCS.
StarPRNT Command Specifications28
Rev. 2.25
[Name]
Set Full-Size Kanji character left/right spaces
[Code]
ASCII
ESC
s
n1
n2
Hex.
1B
73
n1
n2
Decimal
27
115
n1
n2
[Name]
Set Half-Size Kanji character left/right spaces
[Code]
ASCII
ESC
t
n1
n2
Hex.
1B
74
n1
n2
Decimal
27
116
n1
n2
ESC s n1 n2
[Defined Area] 0≤n1≤7 48≤n1≤55 (”0”≤n1≤”7”)
0≤n2≤15
48≤n2≤57 (”0”≤n2≤”9”)
65≤n2≤70 (”A”≤n2≤”F”)
[Initial Value] Memory switch setting
[Function] Adds n1 dots left space amount and n2 dots right space amount to Kanji characters.
The Kanji character width is "left space amount” + "Kanji font dot count” + "right space amount.”
(See the information on character specifications in the appropriate printer specifications manual for
details on the Kanji font dot count.)
This command is ignored for models not equipped with Kanji fonts (for overseas) and when the
specification for the location of use is specified as SBCS (single byte countries) by the memory switch.
Standard mode and page mode can be set independently of each other.
ESC t n1 n2
[Defined Area] 0≤n1≤7 48≤n1≤55 (”0”≤n1≤”7”)
0≤n2≤15
48≤n2≤57 (”0”≤n2≤”9”)
65≤n2≤70 (”A”≤n2≤”F”)
[Initial Value] Memory switch setting
[Function] Adds n1 dots left space amount and n2 dots right space amount to half-size Kanji characters.
The half-size Kanji character width is "left space amount” + " half-size Kanji font dot count” + "right
Space amount.”
(See the information on character specifications in the appropriate printer specifications manual for
details on the half-size Kanji font dot count.)
This command is ignored for models not equipped with Kanji fonts (for overseas) and when the
specification for the location of use is specified as SBCS (single byte countries) by the memory switch.
Standard mode and page mode can be set independently of each other.
StarPRNT Command Specifications29
Rev. 2.25
[Name]
Register Kanji download characters
[Code]
ASCII
ESC
r
c1
c2
d1
...
dk
Hex.
1B
72
c1
c2
d1
...
dk Decimal
27
114
c1
c2
d1
...
dk
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
80h≤c2≤9Eh
94 characters
Kanji characters
c1=FEh
A1h≤c2≤FEh
94 characters
Tai w an char./JIS type
c1=FEh
A1h≦c2≦FEh
94 characters
Hangeul char./JIS type
c1=FEh
A1h≦c2≦FEh
94 characters
d1 ● ● ● ● ● ● ● ●
d2 ● ● ● ● ● ● ● ●
d3 ● ● ● ● ● ● ● ●
d4 ● ● ● ● ● ● ● ●
d5 ● ● ● ● ● ● ● ●
d6 ● ● ● ● ● ● ● ●
d7 ● ● ● ● ● ● ● ●
d8 ● ● ● ● ● ● ● ●
d9 ● ● ● ● ● ● ● ●
d10 ● ● ● ● ● ● ● ●
d11 ● ● ● ● ● ● ● ●
d12 ● ● ● ● ● ● ● ●
d13 ● ● ● ● ● ● ● ●
d14 ● ● ● ● ● ● ● ●
d15 ● ● ● ● ● ● ● ●
d16 ● ● ● ● ● ● ● ●
d17 ● ● ● ● ● ● ● ●
d18 ● ● ● ● ● ● ● ●
d19 ● ● ● ● ● ● ● ●
d20 ● ● ● ● ● ● ● ●
d21 ● ● ● ● ● ● ● ●
d22 ● ● ● ● ● ● ● ●
d23 ● ● ● ● ● ● ● ●
d24 ● ● ● ● ● ● ● ●
d25 ● ● ● ● ● ● ● ●
d26 ● ● ● ● ● ● ● ●
d27 ● ● ● ● ● ● ● ●
d28 ● ● ● ● ● ● ● ●
d29 ● ● ● ● ● ● ● ●
d30 ● ● ● ● ● ● ● ●
d31 ● ● ● ● ● ● ● ●
d32 ● ● ● ● ● ● ● ●
d33 ● ● ● ● ● ● ● ●
d34 ● ● ● ● ● ● ● ●
d35 ● ● ● ● ● ● ● ●
d36 ● ● ● ● ● ● ● ●
d37 ● ● ● ● ● ● ● ●
d38 ● ● ● ● ● ● ● ●
d39 ● ● ● ● ● ● ● ●
d40 ● ● ● ● ● ● ● ●
d41 ● ● ● ● ● ● ● ●
d42 ● ● ● ● ● ● ● ●
d43 ● ● ● ● ● ● ● ●
d44 ● ● ● ● ● ● ● ●
d45 ● ● ● ● ● ● ● ●
d46 ● ● ● ● ● ● ● ●
d47 ● ● ● ● ● ● ● ●
d48 ● ● ● ● ● ● ● ●
d49 ● ● ● ● ● ● ● ●
d50 ● ● ● ● ● ● ● ●
d51 ● ● ● ● ● ● ● ●
d52 ● ● ● ● ● ● ● ●
d53 ● ● ● ● ● ● ● ●
d54 ● ● ● ● ● ● ● ●
d55 ● ● ● ● ● ● ● ●
d56 ● ● ● ● ● ● ● ●
d57 ● ● ● ● ● ● ● ●
d58 ● ● ● ● ● ● ● ●
d59 ● ● ● ● ● ● ● ●
d60 ● ● ● ● ● ● ● ●
d61 ● ● ● ● ● ● ● ●
d62 ● ● ● ● ● ● ● ●
d63 ● ● ● ● ● ● ● ●
d64 ● ● ● ● ● ● ● ●
d65 ● ● ● ● ● ● ● ●
d66 ● ● ● ● ● ● ● ●
d67 ● ● ● ● ● ● ● ●
d68 ● ● ● ● ● ● ● ●
d69 ● ● ● ● ● ● ● ●
d70 ● ● ● ● ● ● ● ●
d71 ● ● ● ● ● ● ● ●
d72 ● ● ● ● ● ● ● ●
bit7
bit6
bit5
Bit4
bit3
bit2
bit1
bit0 bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0 bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
Horizontal
Vertical
24 Dots
ESC r c1 c2 d1...dk
[Defined Area] 0≤d≤255
k=72
c1 and c2 differ according to specifications and code type (see table below).
[Initial Value] All spaces
[Function] Registers Kanji download characters to c1 and c2 addresses.
Those already registered to these addresses are overwritten. If c1 and c2 are outside of the defined are or
the printer is model not equipped with Kanji 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.
(*) The registration region is the same for Japanese characters in JIS or shift JIS.
24 Dots
●: Font data/○: Invalid data
StarPRNT Command Specifications30
Rev. 2.25
[Name]
Set/cancel the double wide/high
[Code]
ASCII
ESC
i
n1
n2
Hex.
1B
69
n1
n2
Decimal
27
105
n1
n2
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
n2
Expanded wide
0, 48
Cancels expanded wide
1, 49
Specifies 2x wide expansion
2, 50
Specifies 3x wide expansion
3, 51
Specifies 4x wide expansion
4, 52
Specifies 5x wide expansion
5, 53
Specifies 6x wide expansion
2.3.3. Print Mode
ESC i n1 n2
[Defined Area] 0≤n1≤5 48≤n1≤53 (”0”≤n1≤”5”)
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 Kanji characters.
This command is ignored if either n1 or n2 is outside of the defined area.
[Model limitation]
SM-L200 : 4x high expansion, 5x high expansion, and 6x high expansion are not supported in the expanded
0≦n1≦2, 48≦n1≦50 (”0”≦n1≦”2”)
high that is specified with n1.
StarPRNT Command Specifications31
Rev. 2.25
[Name]
Specify/cancel expanded wide
[Code]
ASCII
ESC W n
Hex.
1B
57 n
Decimal
27
87 n
n
Expanded wide
0, 48
Cancels expanded wide
1, 49
Specifies 2x wide expansion
2, 50
Specifies 3x wide expansion
3, 51
Specifies 4x wide expansion
4, 52
Specifies 5x wide expansion
5, 53
Specifies 6x wide expansion
[Name]
Specify/cancel expanded high
[Code]
ASCII
ESC h n
Hex.
1B
68 n
Decimal
27
104 n
n
Expanded high
0, 48
Cancels expanded high
1, 49
Specifies 2x expansion
2, 50
Specifies 3x expansion
3, 51
Specifies 4x expansion
4, 52
Specifies 5x expansion
5, 53
Specifies 6x expansion
ESC W n
[Defined Area] 0≤n≤5
48≤n≤53 (”0”≤n≤”5”)
[Initial Value] n = 0 (Double wide cancelled)
[Function] Specifies/cancels double wide for ANK characters and Kanji characters.
ESC h n
[Defined Area] 0≤n≤5
48≤n≤53 (”0”≤n≤”5”)
[Initial Value] n = 0 (Double high cancelled)
[Function] Specifies/cancels double high for ANK characters and Kanji characters.
[Model limitation]
SM-L200 : 4x high expansion, 5x high expansion, and 6x high expansion are not supported.
0≦n1≦2, 48≦n1≦50 (”0”≦n1≦”2”)
StarPRNT Command Specifications32
Rev. 2.25
[Name]
Select emphasized printing
[Code]
ASCII
ESC E Hex.
1B
45
Decimal
27
69
ESC F
[Name]
Cancel emphasized printing
[Code]
ASCII
ESC F
Hex.
1B
46
Decimal
27
70
ESC E
[Defined Area] - - [Initial Value] Emphasized printing selected
[Function] Specifies emphasized printing for ANK characters and Kanji characters.
IBM block ignores emphasized printing.
[Defined Area] - - [Initial Value] Emphasized printing cancelled.
[Function] Cancels emphasized printing for ANK and Kanji characters.
StarPRNT Command Specifications33
Rev. 2.25
[Name]
Select/cancels underling mode
[Code]
ASCII
ESC - n Hex.
1B
2D n
Decimal
27
45 n
n
Underline
0, 48
Cancels underline
1, 49
Specifies underline
[Name]
Specify/cancel upperline
[Code]
ASCII
ESC _ n
Hex.
1B
5F n
Decimal
27
95 n
n
Upperline
0, 48
Cancels upperline
1, 49
Specifies upperline
ESC – 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 Kanji characters.
IBM block ignores underlines.
ESC _ 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 used,
upperlines are composed of 4 dots.)
Upperlines are enabled for white/black inversion.
This command is enabled for ANK characters and Kanji characters.
IBM block ignores upperlines.
StarPRNT Command Specifications34
Rev. 2.25
[Name]
Select white/black inverted printing
[Code]
ASCII
ESC 4 Hex.
1B
34
Decimal
27
52
[Name]
Cancel white/black inversion
[Code]
ASCII
ESC 5
Hex.
1B
35
Decimal
27
53
ESC 4
[Defined Area] - - [Initial Value] White/black inversion cancelled
[Function] Specifies white/black inversion for ANK characters and Kanji characters.
IBM block ignores white/black inversion.
ESC 5
[Defined Area] - - [Initial Value] White/black inversion cancelled
[Function] Cancels white/black inversion for ANK characters and Kanji characters.
StarPRNT Command Specifications35
Rev. 2.25
[Name]
Select upside-down printing
[Code]
ASCII
SI Hex.
0F
Decimal
15
[Name]
Cancel upside-down printing
[Code]
ASCII
DC2
Hex.
12
Decimal
18
SI
[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.
• ANK characters
• Kanji characters
• Bit images
• Logos
• Bar codes
This command setting does not affect page mode. When page mode is selected, only the setting of
this command is enabled.
DC2
[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.
This command setting does not affect page mode. When page mode is selected, only the setting of
this command is enabled.
StarPRNT Command Specifications36
Rev. 2.25
[Name]
Set left margin
[Code]
ASCII
ESC l n
Hex.
1B
6C n
Decimal
27
108 n
[Name]
Set right margin
[Code]
ASCII
ESC Q n Hex.
1B
51 n
Decimal
27
81 n
2.3.4. Horizontal Direction Printing Position
ESC l n
[Defined Area] 0≤n≤255
[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.
Setting this command partway will take affect from the next line.
This command setting does not affect page mode. When page mode is selected, only the setting of
this command is enabled.
ESC Q n
[Defined Area] 0≤n≤255
[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.
Setting this command partway will take affect from the next line.
This command setting does not affect page mode. When page mode is selected, only the setting of
this command is enabled.
Printable Region
Left Margin Print Region
Right Margin
StarPRNT Command Specifications37
Rev. 2.25
[Name]
Move horizontal tab
[Code]
ASCII
HT Hex.
09
Decimal
9
[Name]
Set horizontal tab
[Code]
ASCII
ESC
D
n1
n2
...
nk
Hex.
1B
44
n1
n2
...
nk
00 Decimal
27
68
n1
n2
...
nk 0
ESC D NUL
[Name]
Clear horizontal tab
[Code]
ASCII
ESC D
Hex.
1B
44
00
Decimal
27
68 0
HT
[Defined Area] - - [Initial Value] No setting
[Function] Move print position to next horizontal tab position.
When a horizontal tab is not set, this command is ignored.
In standard mode, when the current position is the same as or to the right of the rightmost horizontal tab
position, this command is ignored.
In page mode, when the current position is the same as or to the right of the rightmost horizontal tab
position that is set in the print area, a line feed is performed.
ESC D n1 n2…nk NUL
[Defined Area] 1≤n≤255
0≤k≤16
[Initial Value] Standard mode : - - Page mode : 8, 16, 24 ... (16, one every 8 characters at the initially selected ANK character pitch)
[Function] Uses the left edge as a standard to set the horizontal tab to the position of (current ANK character pitch x n).
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
The tab position must satisfy the following conditions. If the condition is not satisfied, the 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.
• k≤16
• 1<n1 < n2... < nk
• nk ≤ Printable region (Only Sandard mode)
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.
Standard mode and page mode can be set independently of each other.
[Defined Area] - - [Initial Value] - - [Function] Clears the currently set horizontal tab.
StarPRNT Command Specifications38
Standard mode and page mode can be set independently of each other.
Rev. 2.25
[Name]
Move absolute position
[Code]
ASCII
ESC
GS A n1
n2 Hex.
1B
1D
41
n1
n2
Decimal
27
29
65
n1
n2
[Name]
Move relative position
[Code]
ASCII
ESC
GS R n1
n2
Hex.
1B
1D
52
n1
n2 Decimal
27
29
82
n1
n2
[Name]
Specify position alignment
[Code]
ASCII
ESC
GS
a n Hex.
1B
1D
61 n Decimal
27
29
97 n
n
Position alignment
0, 48
Left alignment
1, 49
Center alignment
2, 50
Right alignment
ESC GS A n1 n2
[Defined Area] 0≤n1≤255
0≤n2≤255
[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.
If print data is overlapped when moved to the left, the old print data is overwritten by new data.
ESC GS R n1 n2
[Defined Area] 0≤n1≤255
0≤n2≤255
[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) ≥ 32768, it moves {65536 – (n1 + n2 x 256)} dots in the left direction.
When (n1 + n2 x 256) < 32768, it moves (n1 + n2 x 256)} dots in the right direction.
If print data is overlapped when moved to the left, the old print data is overwritten by new data.
ESC GS a n
[Defined Area] 0≤n≤2
48≤n≤50 (”0”≤n≤”2”)
[Initial Value] n = 0
[Function] Specifies the alignment position in the printing region that has been set.
This command setting does not affect page mode. When page mode is selected, only the setting of
this command is enabled.
StarPRNT Command Specifications39
Rev. 2.25
[Name]
Line feed
[Code]
ASCII
LF
Hex.
0A
Decimal
10
[Name]
Feed paper n lines
[Code]
ASCII
ESC a n Hex.
1B
61 n
Decimal
27
97 n
[Name]
Select line feed amount
[Code]
ASCII
ESC z n Hex.
1B
7A n
Decimal
27
122 n
n
Line feed amount
0, 48
Specifies 3 mm line feed amount
1, 49
Specifies 4 mm line feed amount
2.3.5. Line Spacing
LF
[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 of th line feed is according to the memory switch settings.
ESC a n
[Defined Area] 1≤n≤127
[Initial Value] - - [Function] Executes a paper feed for (the currently specified line feed amount x n).
If print data exists in the line buffer, it prints that data.
The initial value of th line feed is according to the memory switch settings.
ESC z n
[Defined Area] n = 0, 48
n = 1, 49
[Initial Value] Memory switch setting
[Function] Specifies the line feed amount.
Standard mode and page mode can be set independently of each other.
StarPRNT Command Specifications40
Rev. 2.25
[Name]
Specify line spacing to 3 mm
[Code]
ASCII
ESC 0 Hex.
1B
30
Decimal
27
48
ESC J n
[Name]
n/4 mm line feed
[Code]
ASCII
ESC J n
Hex.
1B
4A n
Decimal
27
74 n
ESC I n
[Name]
n/8mm line feed
[Code]
ASCII
ESC I n Hex.
1B
49 n
Decimal
27
73 n
ESC 0
[Defined Area] - - [Initial Value] Memory switch setting
[Function] Specifies the line feed amount to 3 mm.
Standard mode and page mode can be set independently of each other.
[Defined Area] 1≤n≤255
[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
command not be used.
[Defined Area] 1≤n≤255
[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
StarPRNT Command Specifications41
command not be used.
Rev. 2.25
[Name]
Form feed
[Code]
ASCII
FF
Hex.
0C
Decimal
12
ESC C n
[Name]
Set page length to n lines
[Code]
ASCII
ESC C n
Hex.
1B
43 n
Decimal
27
67 n
[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
2.3.6. Page Control Commands
FF
[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.
Invalid in page mode.
[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).
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.
• Error cancel operations: Sets position when quitting error cancellation operations at top of page.
ESC C 0 n
[Defined Area] 1≤n≤22
[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 (n x 24 mm).
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.
• Error cancel operations: Sets position when quitting error cancellation operations at top of page.
StarPRNT Command Specifications42
Rev. 2.25
[Name]
Set top margin
[Code]
ASCII
ESC
RS T n
Hex.
1B
1E
54 n
Decimal
27
30
84 n
2.3.7. Top margin
ESC RS T n
[Defined Area] Spec. 1
2≤ n ≤11
Spec. 2
n=11
[Initial Value] Memory switch setting
[Function] Sets the top margin at n mm from the top edge of the paper.
When n=0, the standard top margin for that model is set.
[Model limitation]
mC-Print3 : When the top margin is set to 10 mm or less, the paper length (cut length) should not exceed 50mm.
(If the cut paper remains at the paper-exit, a paper jam may occur. There is no limitation when the cut
paper is removed.)
StarPRNT Command Specifications43
Rev. 2.25
[Name]
180˚ Inversion Function
[Code]
ASCII
ESC
GS h 0 k m n
Hex.
1B
1D
68
30 k m n
Decimal
27
29
104
48 k m n
2.3.8. Page Function
ESC GS h 0 k m n
[Defined Area] 0≤ k ≤1, m = 0, n = 0
[Initial Value] Memory switch setting
[Function] Enables/disables the 180° inversion function.
k 180˚ Inversion Function
0 Enable
1 Disable
<180˚ Inversion Function>
Enables/disables the 180° inversion function.
When the 180° inversion function is enabled, a 180° inversion is executed by the 180° inversion trigger.
However, this function is executed for the print data that fits in the image buffer length.
In case with print data longer than the image buffer length, the 180° inversion function is ignored.
Also, when printing is started by other than the 180° inversion trigger described below, when the print startup
control setting is set for each line, during the page mode, or while a macro is being executed, the 180° inversion
function is ignored.
This setting will not be cleared by <ESC> @ command.
180° inversion trigger
・ Cutter command: <ESC> d n
・ FF command: <FF> ・ BM detection command: <ESC> d n, <FF>
Example of usage
1) 180° inversion function enabled: <ESC> <GS> h 0 k m n (k=0x01, m=0x00, n=0x00)
2) Print data transmission: Print data (Print length must be within the image buffer length.)
3) Trigger command transmission: <ESC> d n (Cutter command is the 180° inversion trigger.)
StarPRNT Command Specifications44
Rev. 2.25
[Name]
Auto-cutter
[Code]
ASCII
ESC d n
Hex.
1B
64 n
Decimal
27
100 n
2.3.9. Cutter Control
ESC d n
[Defined Area] 0≤ n ≤3
48≤ n ≤51 (”0”≤ n ≤”3”)
[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
Full cut at the current position.
0, 48
1, 49
2, 50
3, 51
(*) The auto-cutter function operates in the following ways on models that only have a full cut or a partial cut.
• Models that perform only a full cut. : Executes a full cut when there are instructions calling for a partial cut.
• Models that perform only a partial cut. : Executes a partial cut when there are for instructions calling for a full cut.
(*) The printer which is not equipped with an auto-cutter works in the following ways.
• Command for full cut at the current position : Executes printing
• Command for feeding paper to cutting position : Executes printing and feeds paper to the tear bar position.
If there is print data remaining in the line buffer, printing of line buffer is executed prior to the
operation described above.
Partial cut at the current position.
If there is print data remaining in the line buffer, printing of line buffer is executed prior to the
operation described above.
Paper is fed to cutting position, then a full cut.
If there is print data remaining in the line buffer, printing of line buffer is executed prior to the
operation described above.
Paper is fed to cutting position, then a partial cut.
If there is print data remaining in the line buffer, printing of line buffer is executed prior to the
operation described above.
StarPRNT Command Specifications45
Rev. 2.25
[Name]
Set reduced printing
[Code]
ASCII
ESC
GS c h v
Hexadecimal
1B
1D
63 h v Decimal
27
29
99 h v
0
Invalid
1
(Reserved)
2.3.10. Reduced Printing Function Command Details
ESC GS c h v
[Defined Area] 0 ≤ h ≤ 255 0 ≤ v ≤ 255
[Initial Value] h = 0 (Horizontal direction reduced printing setting invalid)
v = 0 (Vertical direction reduced printing setting invalid)
[Function] Set reduced printing
h Set horizontal direction reduced printing
0 Invalid
1 Valid (67%)
2 to 255 Command ignored
v Set vertical direction reduced printing
2 to 255 Command ignored
• Reduced printing in the horizontal direction compresses the entire horizontal direction.
• Disabled in Page Mode.
StarPRNT Command Specifications46
Rev. 2.25
[Name]
Selects page mode
[Code]
ASCII
ESC
GS P 0
Hexadecimal
1B
1D
50
30
Decimal
27
29
80
48
2.3.11. Page Mode Command Details
ESC GS P 0
[Function] Switches from standard mode to page mode.
• Valid only when input at the top of the line.
• Invalid when input in page mode.
• Returns to standard mode after running this command.
• ESC GS P 1 (selects standard mode)
• ESC GS P 7 (prints in page mode and recovers)
• The character expansion position uses the starting point specified by ESC GS P2 (selection of character print
direction in page mode) in the print region specified by ESC GS P 3 (set print region in page mode).
• Switches the following command setting values that have independent values for both page and standard
modes to the setting values of page mode.
• Set space amount: ESC SP, ESC s, ESC t
• Set the line feed amount: ESC z, ESC 0
• Set horizontal tab: ESC D
• The following commands are valid in page mode.
• ESC GS a: Move absolute position
• SI: Select upside-down printing
• ESC I: Set left margin
• ESC Q: Set right margin
• The following commands are invalid in page mode.
• FF: Form feed
• ESC GS c: Reduced Printing
• ESC RS m: BM setting
• ESC RS A: Printing Region Setting
• ESC GS M: Maintenance counter control
• ESC GS r: Get CRC
• ESC RS C: Set printing mode
• ESC RS r: Set print speed
• ESC GS S: Print raster graphics data
• Recover to standard mode using ESC @ (initialize printer).
StarPRNT Command Specifications47
Rev. 2.25
[Name]
Cancel page mode
[Code]
ASCII
ESC
GS P 1
Hexadecimal
1B
1D
50
31
Decimal
27
29
80
49
[Name]
Select character print direction in page mode
[Code]
ASCII
ESC
GS P 2
Hexadecimal
1B
1D
50
32
Decimal
27
29
80
50
Printing
Direction
Upper Left
(Drawing at Right A)
Bottom Left
(Drawing at Right B)
Bottom Right
(Drawing at Right C)
Top Right
(Drawing at Right D)
ESC GS P 1
[Function] Cancels page mode.
• Valid only when input in page mode.
• Data expanded in page mode is erased.
• After execution, the top of the line is positioned at the next print starting position.
• Print region set by ESC GS P 3 (Set print region in page mode) is initialized.
• Switches the following command setting values that have independent values for both standard and
page modes to the setting values of standard mode.
• Set space amount: ESC SP, ESC s, ESC t
• Set the line feed amount: ESC z, ESC 0
• Set horizontal tab: ESC D
• The following commands are valid only when set in standard mode.
• ESC GS P 3: Set print region in page mode
• ESC GS P 2: Select character print direction in page mode
• The following commands are ignored in standard mode.
• ESC GS P 4: Specify character vertical direction absolute position in page mode
• ESC GS P 5: Specify character vertical direction relative position in page mode
• ESC GS P 6: Print data in page mode
• ESC GS P 7: Print in page mode and recover
• ESC GS P 8: Cancel print data in page mode
• When power is turned on and when a reset is implemented, standard mode is selected when executing
initialization (ESC @) of the printer.
ESC GS P 2 n
[Defined Area] 0 ≤ n ≤ 3, 48 ≤ n ≤ 51
[Initial Value] n = 0
[Function] Select character print direction and starting point in page mode.
N
0, 48 Left to Right
1, 49 Bottom to Top
2, 50 Right to Left
3, 51 Top to Bottom
• When standard mode is selected, only internal printer flag operations are executed when this command is entered.
In that case, printing in standard mode is unaffected.
• The starting point in the print region specified by ESC GS P 3 (Set print region in page mode) is used for the start
of character expansion.
However, this excludes dxL = dxH = 0 or dyL = dyH = 0.
[Initial Value] xL = xH = yL = yH = 0
For dxL, dxH, dyL, and dyH, refer to “Page Mode Print Maximum Region” listed in Appendix 5.
[Function] Set print region in page mode
Sets the position and size of the print region.
• Horizontal starting point = [(xL + xH x 256) x 1/8] mm
• Vertical starting point = [(yL + yH x 256) x 1/8] mm
• Horizontal direction length = [(dxL + dxH x 256) x 1/8] mm
• Vertical direction length = [(dyL + dyH x 256) x 1/8] mm
• When standard mode is selected, only internal printer flag operations are executed when this command
is entered. Has no affect on printing.
• If the horizontal or vertical starting point is outside of the print region, invalidate all settings.
• If the horizontal or vertical length direction is 0, invalidate all settings.
• The character expansion stating point is the one specified by the selection of the character printing
direction (ESC GS P 2) in page mode in the print region.
• If the (horizontal direction starting point + horizontal direction length) exceeds the horizontal direction
printable region, the (horizontal direction printable region – horizontal direction starting point) becomes
the horizontal direction length.
• If the (vertical direction starting point + vertical direction length) exceeds the vertical direction printable
region, the (vertical direction printable region – vertical direction starting point) becomes the vertical
direction length.
• If the calculated results is a fraction that is corrected to the minimum mechanical pitch and excess is
discarded.
See Appendix 5 for details on the maximum and minimum of the specified print region.
StarPRNT Command Specifications49
Rev. 2.25
[Name]
Specify character vertical direction absolute position in page mode
[Code]
ASCII
ESC
GS P 4
Hexadecimal
1B
1D
50
34
Decimal
27
29
80
52
[Name]
Specify character vertical direction relative position in page mode
[Code]
ASCII
ESC
GS P 5
Hexadecimal
1B
1D
50
35
Decimal
27
29
80
53
ESC GS P 4 nL nH
[Defined Area] 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255
[Initial Value] - - [Function] Specify the position for character vertical direction of the data expansion starting position in page
mode with the absolute position that uses the starting point as a reference.
The position of the character vertical direction of the starting position for subsequent data expansion uses
the position from the starting point [(nL + nH x 256) x 1/8] mm.
• This command is ignored when page mode is not selected.
• Absolute position specifications that exceed the specified print region are ignored.
• The position of the character horizontal direction of the data expansion starting position does not move.
• Specify the reference starting point using ESC GS P 2.
• The following operations will occur depending on the starting point of ESC GS P 2 (select character
print direction in page mode).
a. When the starting point is “upper left” or “bottom right,” specify the absolute position of the paper
feed direction.
b. When the starting point is “upper right” or “bottom left,” specify the absolute position of the
perpendicular direction to the paper feed.
• If the calculated results is a fraction that is corrected to the minimum mechanical pitch and excess is
discarded.
ESC GS P 5 nL nH
[Defined Area] 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255
[Initial Value] - - [Function] Specify the position for character vertical direction of the data expansion starting position in page
mode with the relative position that uses the current position as a reference.
The subsequent data expansion starting position uses the position moved [(nL + nH x 256) x 1/8]
mm from the current position.
• This command is ignored when page mode is not selected.
• When specifying the characters downward from the current position the value is positive (plus); when
specifying upward, the value is negative (minus).
• Negative numbers are represented by a complement of 65536. For example, use the following to move
upward N pitches.
nL + nH x 256 = 65536-N
• Relative position specifications that exceed the specified print region are ignored.
• The following operations will occur depending on the ESC GS P 2 (select character print direction in
page mode).
a. When the starting point is “upper left” or “bottom right,” specify the absolute position of the paper
feed direction.
b. When the starting point is “upper right” or “bottom left,” specify the relative position of the
perpendicular direction to the paper feed.
• If the calculated results is a fraction that is corrected to the minimum mechanical pitch and excess is
discarded.
StarPRNT Command Specifications50
Rev. 2.25
[Name]
Print data in page mode
[Code]
ASCII
ESC
GS P 6
Hexadecimal
1B
1D
50
36
Decimal
27
29
80
54
[Name]
Print in page mode and recover
[Code]
ASCII
ESC
GS P 7
Hexadecimal
1B
1D
50
37
Decimal
27
29
80
55
[Name]
Cancel print data in page mode
[Code]
ASCII
ESC
GS P 8
Hexadecimal
1B
1D
50
38
Decimal
27
29
80
56
ESC GS P 6
[Function] Lump-prints data expanded to the entire print region in page mode.
• Valid only when page mode is selected.
• After printing, the following information is maintained.
a. Expanded data
b. Selection of character print direction in page mode (ESC GS P 2)
c. Setting of print region in page mode (ESC GS P 3)
d. Character expansion position
[Model Limitations] SM-L, S and T Series : After printing, the information of “a. Expanded data” and “d. Character
expansion position is cleared.
ESC GS P 7
[Function] Lump-prints data expanded to the entire print region and recovers to standard mode.
• All expanded data is erased after printing.
• Print region set by ESC GS P 3 (Set print region in page mode) is initialized.
• No paper cut is executed.
• After execution, the top of the line is positioned at the next print starting position.
• Valid only when page mode is selected.
ESC GS P 8
[Function] Erases all data in presently set print region, in page mode.
• Valid only when page mode is selected.
• Portion included in the currently set print region is deleted even if data of the print region set previously.
StarPRNT Command Specifications51
Rev. 2.25
[Name]
Standard density bit image
[Code]
ASCII
ESC
K
n1
n2
d1
...
dk
Hex.
1B
4B
n1
n2
d1
...
dk
Decimal
27
75
n1
n2
d1
...
dk
2.3.12. Bit Image Graphics
ESC K n1 n2 d1...dk
[Defined Area] 1 ≤ {(n1 + n2 x 256) x 3} ≤ printable region
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 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.
• In standard mode, if the current position already exceeds the print region, this command discards all
data.
• In page mode, if the current position already exceeds the print region, printing is performed after a line
feed.
b7 b6 b5 b4
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
• • •
b3b2
b1b0
StarPRNT Command Specifications52
Rev. 2.25
[Name]
Standard density bit image
[Code]
ASCII
ESC
L
n1
n2
d1
...
dk Hex.
1B
4C
n1
n2
d1
...
dk
Decimal
27
76
n1
n2
d1
...
dk
b7
b6
b5
b4
b3
b0
•
•
•
•
•
•
•
•
ESC L n1 n2 d1...dk
[Defined Area] 1 ≤ (n1 + n2 x 256) ≤ printable region
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 that is currently set, only the data in the printing
region is printed.
At this time, all data for the print region is discarded.
• In standard mode, if the current position already exceeds the print region, this command discards all
data.
• In page mode, if the current position already exceeds the print region, printing is performed after a line
feed.
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
b2 b1
StarPRNT Command Specifications53
Rev. 2.25
[Name]
Fine density bit image
[Code]
ASCII
ESC
k
n1
n2
d1
...
dk Hex.
1B
6B
n1
n2
d1
...
dk
Decimal
27
107
n1
n2
d1
...
dk
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
: :
: : : :
dX x 23 + 1
dX x 23 + 2
dX x 24
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
X byte = (n1 + n2 x 256)
24dot
ESC k n1 n2 d1...dk
[Defined Area] n2 = 0
1 ≤ {(n1 + n2 x 256) x 8} ≤ printable region
k = {(n1 + n2 x 256) x 24}
0≤d≤255
[Initial Value] - - [Function] Prints bit images using 1 dot wide and 1 dot 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 that is currently set, only the data in the printing
region is printed.
At this time, all data for the print region is discarded.
• In standard mode, if the current position already exceeds the print region, this command discards all
data.
• In page mode, if the current position already exceeds the print region, printing is performed after a line
Fine density bit image (Compatible with 24 bit wire dots)
[Code]
ASCII
ESC
X
n1
n2
d1
...
dk Hex.
1B
58
n1
n2
d1
...
dk
Decimal
27
88
n1
n2
d1
...
dk
ESC X n1 n2 d1...dk
[Defined Area] 1 ≤ (n1 + n2 x 256) ≤ printable region
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 that is currently set, only the data in the printing
region is printed.
At this time, all data for the print region is discarded.
• In standard mode, if the current position already exceeds the print region, this command discards all
data.
• In page mode, if the current position already exceeds the print region, printing is performed after a line
1 ≤ (yL + yH x 256) ≤ 65535
0 ≤ d ≤ 255
k=(xL + xH x 256) x (yL + yH x 256)
[Initial Value] - - [Function] Print raster graphics data
“m” specifies the number of transfer blocks and the tone.
Disabled in Page Mode.
n: Print color
n Print color
0 Black
(xL + xH x 256) specifies the number of horizontal data bytes ((a number of dots x a number of bits per
dot*/8, +1 if not divisible).
(yL + yH x 256) specifies the number of dots in the vertical direction.
k indicates the number of data.
(d1 d2…..dk) specifies the image data to define.
• 2 tones: 0 /1 (OFF/ON)
When parameter is disabled:
•parameter m: Command processing end (ESC GS S m).
•parameter n: n=0
•parameter xL, xH, yL, yH: Command processing end (ESC GS S m xL xH yL yH)
[Model Limitation]
SM-L Series : The maximum value for the number of data dots in the vertical direction is 3200 dots.
(1≤ (yL + yH x 256) ≤3200)
StarPRNT Command Specifications56
Rev. 2.25
d1
d2
d3
d4
d5
d6
d7
d8
d9
d10
d11
d12
d13
d14
d15
d16 : : : : :
d73
d74
d75
d76
d77
d78
d79
d80
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
10 dots
<Example of Command Transmission>
Monochrome printing (2 tones), data (horizontal:64 dot, vertical:10 dot)
ESC GS S m xL xH yL yH n [d1 d2.....
dk] (m=1,n=0)
2 tones, black data
8 bytes (xL + xH x 256)
(yL + yH x 256)
StarPRNT Command Specifications57
Rev. 2.25
[Name]
Graphics Raster data printing (Compress data)
[Code]
ASCII
ESC
GS X m
xL
xH
yL
yH
p1
p2
p3
p4 n d1
d2
dk
Hexadecimal
1B
1D
58 m xL
xH
yL
yH
p1
p2
p3
p4 n d1
d2
dk
Decimal
27
29
88 m xL
xH
yL
yH
p1
p2
p3
p4 n d1
d2
dk
d1
d2
d3
d4
d5
d6
d7
d8
d9
d10
d11
d12
d13
d14
d15
d16
d17
d18
d19
d20 : : : : :
d91
d92
d93
d94
d95
d96
d97
d98
d99
d100
Header Byte (h)
Data following the header byte
0 ~ 127
(1+h) pieces of discontinuous byte data
-1 ~ -127
A byte data repeated (1-h) times in the data before compression
-128
None (Treat the next byte as a header byte)
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
vertical direction
ESC GS X m xL xH yL yH p1 p2 p3 p4 n [d1 d2...dk]
[Defined Region] m = 1, n = 0
0≦xL≦255, xH = 0, 0≦yL≦255, 0≦yH≦9
1≦(xL + xH x 256)≦128
1≦(yL + yH x 256)≦800
0≦d≦255
k = (p1 + p2 x 256 + p3 x 65536 + p4 x 16777216)
[Function] Graphics Raster data printing (Compress data)
“m” specifies the number of transfer blocks.
“n” specifies the Print color
(xL + xH x 256) specifies the number of horizontal data bytes before compression ((a number of dots x a number
of bits per dot*/8, +1 if not divisible).
(yL + yH x 256) specifies the number of dots in the vertical direction before compression.
K: Compressed data count
d1 d2 ... dk specifies the compressed data.
<Data>
Horizontal data byte count :8 (xL + xH x 256)
・・・
・・・
・・・
data dot count:
(yL + yH x 256)
<Algorithm of compression>
Data after compression is composed of a packet containing a byte header and subsequent data.
• If [parameter] in each function exceeds 65533 bytes, use GS 8 L.
[Function] Runs the process related to the graphics data specified by the function code (fn).
ESC GS ( L pL pH m fn
ESC GS ( L pL pH m fn a kc1 kc2 b xL xH yL yH
[c d1...dk]1 [c d1...dk]b
memory capacity
Define NV graphics data
StarPRNT Command Specifications59
Rev. 2.25
[Name]
Send NV graphics memory capacity
[Code]
ASCII
ESC
GS ( L
pL
pH m fn
Hexadecimal
1B
1D
28
4C
pL
pH m fn
Decimal
27
29
40
76
pL
pH m fn
[Code]
ASCII
ESC
GS 8 L
p1
p2
p3
p4 m fn
Hexadecimal
1B
1D
38
4C
p1
p2
p3
p4 m fn
Decimal
27
29
56
76
p1
p2
p3
p4 m fn
Transmission data
Hex
Decimal
Data length
Header
37H
55
1 Byte
Identifier
30H
48
1 Byte
Total capacity *1
30H to 39H
48 to 57
1 to 8 Byte
NUL
00H 0 1 Byte
<Function 48> ESC GS ( L pL pH m fn (fn=48)
<Function 48> ESC GS 8 L p1 p2 p3 p4 m fn (fn=48)
[Defined Region] • Parameter for GS ( L
(pL+pH×256)=2 (pL=2, pH=0)
• Parameter for GS 8 L
(p1+p2×256+p3x65536+p4x16777216)=2 (p1=2, p2=0, p3=0, p4=0)
• Parameter are shared by for ESC GS ( L and ESC GS 8 L.
m = 48,
fn = 0, 48
[Function] Sends the entire capacity of NV graphics area in bytes.
[Details] • The byte count is sent in the following format:
*1 The total capacity is the total number of bytes in this region.
The decimal value indicating the total capacity is converted to text data and sent in order from the MSB.
Ex.: When the total capacity is 1200 bytes:
“1200” (Hex:31H, 32H, 30H, 30H, Decimal:49, 50, 48, 48) is converted to 4-bytes of data.
• This command is used when sending total capacity, and the total byte capacity of the region is sent
regardless of the current setting for the NV graphics data. This total capacity includes the information region.
• When the value that indicates the entire capacity is “0” (Hex:30H, Decimal:48), it is not possible to use the
NV graphics function.
[Note] • Data transmission process: Function 48, 51, 64
Observe the following rules when using these functions.
• When the host PC sends this command, the printer sends response data or the status to the PC.
The PC does not send any more data until it receives response data or status from the printer.
• When the amount of data exceeds the capacity of the transmission buffer, data is erased.
• Transmission information of each function can be identified as other transmission data by specific data
(identifier) of the transmission data string.
When the header sent by the printer is [Hex = 37H/Decimal = 55], data up to NUL
[Hex = 00H/Decimal = 0] is handled as one group and identified by corresponding to the combination ofthe
header and identifier.
StarPRNT Command Specifications60
Rev. 2.25
[Name]
Send NV graphics memory capacity
[Code]
ASCII
ESC
GS ( L
pL
pH m fn Hexadecimal
1B
1D
28
4C
pL
pH m fn Decimal
27
29
40
76
pL
pH m fn [Code]
ASCII
ESC
GS 8 L
p1
p2
p3
p4 m fn Hexadecimal
1B
1D
38
4C
p1
p2
p3
p4 m fn Decimal
27
29
56
76
p1
p2
p3
p4 m fn
Transmission data
Hex
Decimal
Data length
Header
37H
55
1 Byte
Identifier
31H
49
1 Byte
Total capacity *1
30H to 39H
48 to 57
1 to 8 Byte
NUL
00H 0 1 Byte
<Function 51> ESC GS ( L pL pH m fn (fn=51)
<Function 51> ESC GS 8 L p1 p2 p3 p4 m fn (fn=51)
[Defined Region] • Parameter for ESC GS ( L
(pL+pH×256)=2 (pL=2, pH=0)
• Parameter for ESC GS 8 L
(p1+p2×256+p3x65536+p4x16777216)=2 (p1=2, p2=0, p3=0, p4=0)
• Parameter are shared by for ESC GS ( L and ESC GS 8 L.
m = 48,
fn = 3, 51
[Function] Sends the remaining capacity (or unused area) of NV graphics area in bytes.
[Details] • Sends the number of bytes in the following format.:
*1 The unused capacity is the total number of bytes of the unused region.
The decimal value indicating the unused capacity is converted to text data and sent in order from the MSB.
Ex.: When the unused capacity is 120 bytes:
“120” (Hex:31H, 32H, 30H, Decimal:49, 50, 48) is converted to 3-bytes of data.
• Information region is also included in the use capacity.
• See the Note for <Function 48> for a detailed explanation of the sending process.
[Reference] ESC GS ( L / ESC GS 8 L <Function 48>
StarPRNT Command Specifications61
Rev. 2.25
[Name]
Send a key code list of predefined NV graphics
[Code]
ASCII
ESC
GS ( L
pL
pH m fn
d1
d2 Hexadecimal
1B
1D
28
4C
pL
pH m fn
d1
d2 Decimal
27
29
40
76
pL
pH m fn
d1
d2 [Code]
ASCII
ESC
GS 8 L
p1
p2
p3
p4 m fn
d1
d2 Hexadecimal
1B
1D
38
4C
p1
p2
p3
p4 m fn
d1
d2 Decimal
27
29
56
76
p1
p2
p3
p4 m fn
d1
d2
Transmission data
Hex
Decimal
Data length
Header
37H
55
1 Byte
Identifier
72H
114
1 Byte
Identifier information*1, 2
40H/41H
64/65
1 Byte
Data
20H to 7EH
32 to 126
2 to 80 Byte
NUL
00H 0 1 Byte
Transmission data
Hex
Decimal
Data length
Header
37H
55
1 Byte
Identifier
72H
114
1 Byte
Identifier information
40H
64
1 Byte
NUL
00H 0 1 Byte
<Function 64> ESC GS ( L pL pH m fn d1 d2 (fn=64)
<Function 64> ESC GS 8 L p1 p2 p3 p4 m fn d1 d2 (fn=64)
[Defined Region] • Parameter for ESC GS ( L
(pL+pH×256)=4 (pL=4, pH=0)
• Parameter for ESC GS 8 L
(p1+p2×256+p3x65536+p4x16777216)=4 (p1=4, p2=0, p3=0, p4=0)
• Parameter are shared by for ESC GS ( L and ESC GS 8 L.
m = 48,
fn = 64
d1 = 75, d2 = 67
[Function] Sends the defined NV graphics key code list.
[Details] • Sends the key code in the following format:
*1 Send one block with identification information (3rd byte) as 40Hex, when the defined NV graphcis data
count is less than 40.
*2 Send one block with identification information (3rd byte) as 41Hex, when the defined NV graphcis data
count is over 40.
• If there is no defined NV graphics key code list, it sends the following format.
• See the Note for <Function 48> for a detailed explanation of the sending process.
[Reference] ESC GS ( L / ESC GS 8 L <Function 48>
StarPRNT Command Specifications62
Rev. 2.25
[Name]
Erase entire NV graphics data
[Code]
ASCII
ESC
GS ( L
pL
pH m fn
d1
d2
d3
Hexadecimal
1B
1D
28
4C
pL
pH m fn
d1
d2
d3
Decimal
27
29
40
76
pL
pH m fn
d1
d2
d3
[Code]
ASCII
ESC
GS 8 L
p1
p2
p3
p4 m fn
d1
d2
d3
Hexadecimal
1B
1D
38
4C
p1
p2
p3
p4 m fn
d1
d2
d3
Decimal
27
29
56
76
p1
p2
p3
p4 m fn
d1
d2
d3
<Function 65> ESC GS ( L pL pH m fn d1 d2 d3 (fn=65)
<Function 65> ESC GS 8 L p1 p2 p3 p4 m fn d1 d2 d3 (fn=65)
[Defined Region] • Parameter for ESC GS ( L
(pL+pH×256)=5 (pL=5, pH=0)
• Parameter for ESC GS 8 L
(p1+p2×256+p3x65536+p4x16777216)=5 (p1=5, p2=0, p3=0, p4=0)
• Parameter are shared by for ESC GS ( L and GS 8 L.
m = 48,
fn = 65
d1 = 67, d2 = 76, d3 = 82
[Function] Erases all NV graphics data defined by Function 67.
• The erased area is set to be an “unused area.”
• All key codes become undefined.
[Details] • Effective only at the top of the line in standard mode.
• Data for this parameter is discarded in page mode.
• Do not use this function for macro definition because this function is not compatible with the macros.
• If you use this function, all NV graphics data is erased.
Take special care if NV graphics data is used in multiple applications.
[Reference] ESC GS ( L / ESC GS 8 L <Function 67>
StarPRNT Command Specifications63
Rev. 2.25
[Name]
Erase the specified NV graphics data
[Code]
ASCII
ESC
GS ( L
pL
pH m fn
kc1
kc2 Hexadecimal
1B
1D
28
4C
pL
pH m fn
kc1
kc2 Decimal
27
29
40
76
pL
pH m fn
kc1
kc2 [Code]
ASCII
ESC
GS 8 L
p1
p2
p3
p4 m fn
kc1
kc2 Hexadecimal
1B
1D
38
4C
p1
p2
p3
p4 m fn
kc1
kc2 Decimal
27
29
56
76
p1
p2
p3
p4 m fn
kc1
kc2
<Function 66> GS ( L pL pH m fn kc1 kc2 (fn=66)
<Function 66> GS 8 L p1 p2 p3 p4 m fn kc1 kc2 (fn=66)
[Defined Region] • Parameter for ESC GS ( L
(pL+pH×256)=4 (pL=4, pH=0)
• Parameter for ESC GS 8 L
(p1+p2×256+p3x65536+p4x16777216)=4 (p1=4, p2=0, p3=0, p4=0)
• Parameter are shared by for ESC GS ( L and ESC GS 8 L.
m = 48,
fn = 66
32 ≤ kc1 ≤ 126
32 ≤ kc2 ≤ 126
[Function] Erases the NV graphics data defined by key codes kc1 and kc2.
• The erased area is set to be an “unused area.”
• The erased key code becomes undefined.
[Details] • Effective only at the top of the line in standard mode.
• Data for this counter is discarded in page mode.
• Do not use this function for macro definition because this function is not compatible with the macros
[Reference] ESC GS ( L / ESC GS 8 L <Function 67>
StarPRNT Command Specifications64
Rev. 2.25
[Name]
set the specified NV graphics data
[Code]
ASCII
ESC
GS ( L
pL
pH m fn a kc1
kc2 b
xL
xH
yL
yH
[c
d1 … dk]1 … [c
d1 … dk]b
Hexadecimal
1B
1D
28
4C
pL
pH m fn a kc1
kc2 b
xL
xH
yL
yH
[c
d1 … dk]1 … [c
d1 … dk]b
Decimal
27
29
40
76
pL
pH m fn a kc1
kc2 b
xL
xH
yL
yH
[c
d1 … dk]1 … [c
d1 … dk]b
[Code]
ASCII
ESC
GS 8 L
p1
p2
p3
p4 m fn a kc1
kc2
xL
xH
yL
yH
[c
d1 … dk]1 … [c
d1 … dk]b
Hexadecimal
1B
1D
38
4C
p1
p2
p3
p4 m fn a kc1
kc2
xL
xH
yL
yH
[c
d1 … dk]1 … [c
d1 … dk]b
Decimal
27
29
56
76
p1
p2
p3
p4 m fn a kc1
kc2
xL
xH
yL
yH
[c
d1 … dk]1 … [c
d1 … dk]b
<Function 67> ESC GS ( L pL pH m fn a kc1 kc2 b xL xH y L yH [c
d1 ... dk] 1 ... [c d1 ... dk] b (fn=67)
<Function 67> ESC GS 8 L p1 p2 p3 p4 m fn a kc1 kc2 b xL xH y L yH
• Parameter are shared by for ESC GS ( L and ESC GS 8 L.
m = 48, fn = 67, a = 48
32 ≤ kc1 ≤ 126
32 ≤ kc2 ≤ 126
b = 1, 2
1 ≤ (xL+xH×256) ≤ 8192, (0 ≤ xL ≤ 255, 0 ≤ xH ≤ 32)
1 ≤ (yL+yH×256) ≤ 2304, (0 ≤ yL ≤ 255, 0 ≤ yH ≤ 9)
c = 49 (Single-color), c = 49,50 (2-color)
0 ≤ d ≤ 255
k = int (((xL + xH×256) + 7)÷8)×(yL + yH×256)
• Registration capacity: 512 KByte
• Maximum registered quantity: 9025 pcs
[Function] Defines the NV graphics data (in raster format) as the record specified by key codes kc1 and kc2.
• “b” specifies a number of colors of the definition data.
• “xL” and “xH” specify the horizontal size of definition data to “xL + xH x 256” dots.
• “yL” and “yH” specify the vertical size of definition data to “yL + yH x 256” dots.
• “c” specifies the definition data color as follows.
c=49: Black
c=50: Red
• “d” specifies the definition data (in raster format).
• If the specified key code already exists in memory, it is overwritten by the specified one.
StarPRNT Command Specifications65
Rev. 2.25
int((xL+xH×256)+7)÷8 dot = 64 Byte
1 2 3
63
64
65
66
67 127
128
yH×256) dot
k-1 k
7 6 5 4 3 2 1
0
MSB
LSB
[Details] • NV graphics are image data defined in the non-volatile memory of the printer.
Data definitions for NV graphics data generated by using this command are valid until redefined by this command.
• This command is used to define NV graphics data.
• This function is defined by the raster format.
• Valid only at the top of the line in standard mode.
• When page mode is selected, counter data is received and discarded.
• Do not use this function when defining a macro because it is not compatible with macros.
• If there is not an adequate amount of space in nonvolatile memory to store the NV graphics data, this function
cannot be used.
Use Function 51 to check the available space that can be used.
• k byte data d1 … dk are processed as one item of the defined NV graphics data.
Bits that correspond to the dots to print are “1,” and the bits that correspond to the dots that are not printed are “0.”
• When single-color (b=1) is selected, this is defined as one data group [c d1 … dk].
• When 2-color (b=2) is selected, this is defined as two data groups [c d1 … dk].
When a color (c) is specified, it is important to specify a color different from the data group.
At that time, the vertical and horizontal sizes of the data are the same.
• NV graphics data is printed using Function 69.
• The relationship of NV graphics data (raster format) and printing results are shown below.
When xL+xH×256 = 512
・・・・・・・・
(yL+
[Notes] • When the specification of (xL + xH×256), and (yL + yH×256) exceed the remaining capacity of the NV graphics
region, this function does not operate.
• This function uses the NV graphics area of “Number of data sets (k) + Management data (14 bytes)”.
[Model Limitation]
Registration capacity / Maximum registered quantity
SM-L200 : 512 KByte / 64 pcs
SM-L300 : 512 KByte / 512 pcs
SM-S, T Series : 512 KByte / 512 pcs
[Reference] ESC GS ( L / ESC GS 8 L <Function 51>, <Function 69>
StarPRNT Command Specifications66
Rev. 2.25
[Name]
Print the specified NV graphics data
[Code]
ASCII
ESC
GS ( L
pL
pH m fn
kc1
kc2
x y
Hexadecimal
1B
1D
28
4C
pL
pH m fn
kc1
kc2
x y
Decimal
27
29
40
76
pL
pH m fn
kc1
kc2
x y
[Code]
ASCII
ESC
GS 8 L
p1
p2
p3
p4 m fn
kc1
kc2
x y
Hexadecimal
1B
1D
38
4C
p1
p2
p3
p4 m fn
kc1
kc2
x y
Decimal
27
29
56
76
p1
p2
p3
p4 m fn
kc1
kc2
x y
<Function 69> ESC GS ( L pL pH m fn kc1 kc2 x y (fn=69)
<Function 69> ESC GS 8 L p1 p2 p3 p4 m fn kc1 kc2 x y (fn=69)
[Defined Region] • Parameter for ESC GS ( L
(pL+pH×256)=6 (pL=6, pH=0)
• Parameter for ESC GS 8 L
(p1+p2×256+p3x65536+p4x16777216)=6 (p1=6, p2=0, p3=0, p4=0)
• Parameter are shared by for ESC GS ( L and ESC GS 8 L.
m = 48
fn = 69
32 ≤ kc1 ≤ 126
32 ≤ kc2 ≤ 126
x = 1, 2
y = 1, 2
[Function] Prints the NV graphics data defined by key codes kc1 and kc2.
• Selected data can be printed in the “horizontal x-times” by “vertical y-times” scale.
[Details] • This function is used to print the NV graphics data defined by Function 67.
• The printer prints data only when the NV graphics data that matches the specified key code is defined.
If data with the specified key code is not found, the data of this counter is discarded.
• This command is effective only when no data exists in the print buffer in standard mode.
If any data exists in the print buffer, the data for this counter is discarded.
• Data for this counter is discarded in page mode.
• If graphics that exceeds the print area size is specified, the data within the print area is printed out but
the excess data is not printed out.
• The horizontal and vertical size of NV graphics can be specified by “x” and “y”.
• Excluding upside-down printing, print modes (emphasized printing, overlap printing, underlines,
character sizes, black/white inverted printing, and 90 degree rotation) are unaffected.
• When normal mode or double-width mode is specified, the paper is fed for the number of dots (the
height of NV graphics) and when double-height mode or 4x mode is specified, the paper is fed for the
number of dots (NV graphics height multiplied by 2) regardless of the settings of default line spacing
(ESC 2) and line feed amount (ESC 3).
• After these graphics are printed, the next printing starts at the beginning of a line (the printer is at the
“beginning of the line” and has “no print data”), and subsequent data is processed as normal data.
• This command is affected by the following command settings:
- Move to absolute position (ESC GS A n1 n2)
- Move to relative position (ESC GS R n1 n2)
- Set print area (ESC RS A n)
- Horizontal tab (HT)
- Upside-down printing (SI)
[Model Limitation] SM-S and T Series: Prints up to 30 cm when the expanded high mode is specified.
[Reference] ESC GS ( L/ESC GS 8 L , ESC GS A , ESC GS R , ESC RS A , HT , SI
StarPRNT Command Specifications67
Rev. 2.25
[Name]
Set graphics data
[Code]
ASCII
ESC
GS ) L
pL
pH
fn
[parameter]
Hexadecimal
1B
1D
29
4C
pL
pH
fn
[parameter]
Decimal
27
29
41
76
pL
pH
fn
[parameter]
48
Function 48
Send the registered individual logo CRC
Transmit the registered NV graphics data
ESC GS ) L pL pH fn [parameter]
[Function] Executes graphics data processing.
• pL and pH specify the parameter count (pL + pH x 256) in bytes after fn.
• See the function specifications for details on [parameter].
Fn Function No Function Name
49 Function 49 Send the registered individual NV graphics memory capacity
50 Function 50 Send all key code of the registered NV graphics
51 Function 51
StarPRNT Command Specifications68
Rev. 2.25
[Name]
Send the registered individual logo CRC
[Code]
ASCII
ESC
GS ) L
pL
pH
fn
kc1
kc2 Hexadecimal
1B
1D
29
4C
pL
pH
fn
kc1
kc2 Decimal
27
29
41
76
pL
pH
fn
kc1
kc2
<Function 48> ESC GS ) L pL pH fn kc1 kc2
[Defined Region] pL = 3, pH = 0
fn = 48
32 ≤ kc1 ≤ 126, 32 ≤ kc2 ≤ 126
[Function] Sends a CRC of the logo already stored in the printer.
[Details] • The CRC operation is used only for the logo graphics data currently stored in the printer.
• The key codes, size and color information are excluded from the CRC operation.
• When the printer receives the command, it calculates the CRC and sends it.
• If a logo containing multiple colors is stored, the logo data of the “n+1” color is added after the logo data
of the “n-th” color and calculated.
* See the sample codes for concrete implementation examples.
• The CRC of only the stored logo can be sent by the “ESC GS ( L” or “ESC GS 8 L” command.
• When logo data is stored, the CRC of the received data is operated.
• If the logo data exceeds the horizontal print area, the CRC is operated based on the data that is received
when logo data is stored.
The CRC is sent in the following format:
ESC GS ) L pL pH fn kc1 kc2 [CRC-data] LF NUL
Note) The CRC data is converted into a character string and sent.
Ex.: When [CRC data] is fixed at 4 bytes and CRC is 01AB (HEX), this is “01AB” (Hex: 30H, 31H, 41H,
42H; Decimal: 48, 49, 65, 66) 4-byte data.
If a unregistered key code is specified, the following data is sent instead:
16+x15+x2+x0
ESC GS ) L pL pH fn kc1 kc2 LF NUL
StarPRNT Command Specifications69
Rev. 2.25
<CRC calculation procedure, sample codes, C language>
#define CRC16 0xA001
unsigned int CalcCrc16( int size, unsigned char data[] )
{
unsigned int result;
int i,j;
result = 0xFFFF;
for( i=0 ; i<size; i++)
{
result ^= data[i];
for(j = 0x0001; j < 0x0100; j = j << 1)
{
if( result & 0x0001 )
{
result >>= 1;
result ^= CRC16;
}
else
{
result >>= 1;
}
}
}
result = (~result) & 0xFFFF;
return result;
}
[Reference] ESC GS ( L, ESC GS 8 L
StarPRNT Command Specifications70
Rev. 2.25
[Name]
Transmit capacity used by registered individual NV graphics
[Code]
ASCII
ESC
GS ) L
pL
pH
fn
kc1
kc2 Hexadecimal
1B
1D
29
4C
pL
pH
fn
kc1
kc2 Decimal
27
29
41
76
pL
pH
fn
kc1
kc2
<Function 50> ESC GS ) L p L p H f n d 1 d 2
[Name]
Send all key code of the registered NV graphics
[Code]
ASCII
ESC
GS ) L
pL
pH
fn
d1
d2 Hexadecimal
1B
1D
29
4C
pL
pH
fn
d1
d2 Decimal
27
29
41
76
pL
pH
fn
d1
d1
<Function 49> ESC GS ) L pL pH fn kc1 kc2
[Defined range] pL = 3, pH = 0
fn = 49
32 ≤ kc1 ≤ 126, 32 ≤ kc2 ≤ 126
[Function] Transmits the capacity used by the individual NV graphics data registered in the printer.
[Detail] • The used capacity is the total number of bytes of the used area.
• The used capacity includes the management data (14 bytes).
• Only the capacity used by NV graphics data registered with the "ESC GS ( L" or "ESC GS 8 L" command
can be transmitted.
The used capacity is transmitted in the following format:
ESC GS ) L pL pH fn kc1 kc2 [used capacity] LF NUL
Example: When the used capacity is 1200 bytes, [used capacity] will be
"1200" converted into four-byte data (Hex 31h, 32h, 30h, 30h; Decimal: 49, 50, 48, 48).
If an unregistered key code is specified, the following data is transmitted instead:
ESC GS ) L pL pH fn kc1 kc2 LF NUL
[Reference] ESC GS ( L , ESC GS 8 L
[Defined Region] pL = 3, pH = 0
fn = 50
d1 = 0, d2 = 0
[Function] Send all key code of NV graphics already stored in the printer.
[Details] - If NV graphics are registered with "ESC GS ( L" or "ESC GS 8 L" command, all of their key codes can be
sent.
All key codes are sent in the following format.
ESC GS) L pL pH fn k1 k2 [key-code key-code ...] LF NUL
Up to 512 key codes can be sent, but logo key codes exceeding this limit are not sent.
k1 and k2 represent the number of transmission data bytes (k1+k2x256) after the key codes.
Example: If NV graphics of key codes 01 and 02 are registered, k1=6 and k2=0. [key-code key-code...] is
"0102" (30h, 31h, 30h, 32h in Hex; and 48, 49, 48, 50 in Decimal).
If NV graphics are not registered, the following data is sent.
ESC GS ) L pL pH fn k1 k2 LF NUL (where, k1=2 and k2=0)
If the USB interface is used, the NSB must be made invalid.
[Reference] ESC GS ( L , ESC GS 8 L
StarPRNT Command Specifications71
Rev. 2.25
[Name]
Transmit the registered individual NV graphics data
[Code]
ASCII
ESC
GS ) L
pL
pH
fn
kc1
kc2
Hexadecimal
1B
1D
29
4C
pL
pH
fn
kc1
kc2
Decimal
27
29
41
76
pL
pH
fn
kc1
kc2
<Function 51> ESC GS ) L pL pH fn kc1 kc2
[Defined Region] pL = 3, pH = 0
fn = 51
32≦kc1≦126, 32≦kc2≦126
[Function] Transmit the individual NV graphics data registered in the printer.
[Details] • NV graphics data registered by ESC GS ( L or ESC GS 8 L <Function 67> is transmitted.
• Specified key codes kc1 and kc2 are acquired by the following transmit command: all key code of the
registered NV graphics.
The registered data is transmitted in the format below.
ESC GS ) L pL pH fn kc1 kc2 b xL xH yL yH [c d1 ... dk]1 ... [c d1 ... dk]b LF NUL
Data below shall become as the parameter defined by the NV graphics data definition command
corresponding to the specified key codes kc1 and kc2.
• "b" specifies the number of colors in definition data. b = 1, 2
• "xL" and "xH" specifies the horizontal direction size (xL + xH × 256) dot counts in definition data.
• "yL" and "yH" specifies the vertical direction size (yL + yH × 256) dot counts in definition data.
• "c" specifies the color information in definition data. c = 49: Black; c = 50: Red
• “d" specifies the definition data (in raster format).
If a unregistered key code is specified, the following data is transmitted instead:
ESC GS ) L pL pH fn kc1 kc2 LF NUL
n2 (Under-bar character selection), d (bar code data), k (bar code data count) definitions differ
according to the type of bar code.
[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 discarded.
• n1 bar code type selection
• n2 Under-bar character selection and added line feed selection
97 ≤ d ≤ 122, d = 123
[However, d1 = 40, 48 ≤ d2 ≤ 57, 48 ≤ d3 ≤ 57, or
StarPRNT Command Specifications74
Rev. 2.25
• UPC – E: k = 11 (or 12)
th
The 12
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).
• GS1DataBar Omnidirectional, Truncated, Limited: k = 13
The 14th check digit is automatically applied
• GS1DataBar Expanded: k is freely set, and maximum value differs according to the mode and the print
character type.
• GS1-128: k is freely set, and maximum value differs according to the mode and the print character type.
StarPRNT Command Specifications75
Rev. 2.25
Cell
Alignment Pattern
2.3.15. Two-Dimensional Bar Code QR Code Command Details
Note) QR code is a registered trademark of DENSO WEB.
This command is for printing 2-dimensional bar code QR codes. There are four functions of the commands relating to the
2-dimensional bar code QR codes, shown below.
(1) Set bar code type (<ESC> <GS> “y” “S”)
(2) Set bar code data (<ESC> <GS> “y” “D”)
(3) Set page mode (Reserved)
(4) Print Bar code (<ESC> <GS> “y” “P”)
The details of each function are described below.
(1) Set bar code type
These commands set the bar code type. Because all initial values are set, use these only to make changes. (See the
details for each setting below.)
<ESC> <GS> “y” “S” “0” Sets the model
Currently supported models are model 1 and model 2. Model 2 has a configuration including an alignment bar to improve
its support of weight to handle skewing when codes are large.
<ESC> <GS> “y” “S” “1” Sets the error correction level
QR codes can be read even if a part of the data is corrupted, by using error correction. Raising this level increases the size
of the bar code because there is an increase in preparatory information.
<ESC> <GS> “y” “S” “2” Specifies the size of the cell (One four squared region configuring the QR code)
The QR code is formed into a square of an equivalent size in the vertical and horizontal directions, but the size of the bar
code image that is generated depends on the cell size setting. See Appendix 4 for details on the actual printed size of the
QR code.
These settings are individual settings. Therefore, even though there may not be any particular problem in each of them,
there is the potential for an error to be generated. (See the descriptions below.) In such cases, the bar code will not be
generated and the (4) Print command (<ESC> <GS> “y” “P”) is ignored.
• Error is generated when generating a bar code by the combination of each setting command.
• Print data exceeds the currently set print region
StarPRNT Command Specifications76
Rev. 2.25
(2) Set bar code data
This command sets the bar code print data. There are four types of data that can be set using QR codes. They are:
numbers; English characters; binary; and Kanji. Furthermore, there are two types of data setting methods. One is to
specify these along with the bar code data (data manual analysis), and the other is to specify only the bar code data
(data automatic analysis).
(3) Set page mode
This command is not used.
(4) Print Bar code
This command prints bar codes based on the settings of (1) to (3).
= Precautions on using these commands =
• The setting values for (1) to (3) are held unless any of the following operations are performed.
• Sending a new setting command
• Sending an initialize command (<ESC> @)
• Turning the power OFF
• When there is an error in sending a command with (2), the set data is cleared and the command itself is disabled.
• (4) is sent when necessary.
• Printing:
• When printing, position movement using specify absolute position, specify relative position, and align position are
enabled.
• Upside down printing and 2-color printing are possible.
• Printed bar codes should always be checked in an actual use.
The following is an example showing the sending of the commands.
1) Set bar code type
<ESC> <GS> “y” “S” “0” 1 : Sets to model 1.
<ESC> <GS> “y” “S” “1” 0 : Sets mistake correction level to L.
<ESC> <GS> “y” “S” “2” 3 : Sets cell size to 3 dots.
2) Set bar code data
• <ESC> <GS> “y” “D” “1” 0 19 0 “2005, January, 1 (SAT)”
Sets bar code data (Data automatic analysis)
Sets bar code data (Data manual analysis)
[Defined Area] 0 ≤ n ≤ 3
[Initial Value] n = 0
[Function] Sets the mistake correction level.
• Parameter details
ESC GS y S 2 n
[Defined Area] 1 ≤ n ≤ 8
[Initial Value] n = 3
[Function] Sets the cell size.
• Parameter details
• n: Cell size (Units: Dots)
• It is recommended that the specification using this command be 3 ≤ n.
If n = 1 or 2, check by actually using.
StarPRNT Command Specifications78
Rev. 2.25
[Name]
Set QR code cell size (Auto Setting)
[Code]
ASCII
ESC
GS y D 1 m
nL
nH
d1
d2 … dk
Hex.
1B
1D
79
44
31 m nL
nH
d1
d2 … dk
Decimal
27
29
121
68
49 m nL
nH
d1
d2 … dk
ESC GS y D 1 m nL nH d1 d2 … dk
[Defined Area] m = 0
0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255
1 ≤ nL + nH x 256 ≤ 7089 (k = nL + nH x 256)
0 ≤ d ≤ 255
[Initial Value] --[Function] Automatically expands the data type of the bar code and sets the data.
• Parameter details
• nL + nH x 256: Byte count of bar code data
• dk: Bar code data (Max. 7089 bytes)
• When using this command, the printer receives data for the number of bytes (k) specified by nL and nH.
The data automatically expands to be set as the bar code data.
• Indicates the number bytes of data specified by the nL and nH.
Bar code data is cleared at this time.
• The data storage region of this command is shared with the manual setting command so data is update
d each time either command is executed.
[Model Limitations] SM-L200 : Not supported with versions 10 to 40.
StarPRNT Command Specifications79
Rev. 2.25
dlk
[Name]
Set QR code cell size (Manual setting)
[Code]
ASCII
ESC
GS
y D 2 a m1
n1L
d11
d12 … d1K
Hex.
1B
1D
79
44
32 a m1
n1L
d11
d12 … d1K
Decimal
27
29
121
68
50 a m1
n1L
d11
d12 … d1K
ASCII
m2
n2L
d21
d22 … d2K
ml … dkl
Hex.
m2
n2L
d21
d22 … d2K
ml … dkl
Decimal
m2
n2L
d2 1
d22 … d2K
ml … dkl
m
Data Type
Data Definition Region (d)
1
Numbers
“0” to “9”
“0” to “9”, “A” to “Z”, “a” to “z”
3
Binary
0x00 to 0xFF
4
Kanji (Shift JIS)
0x8140 to 0x9FFC, 0xE040 to 0xEBBF
However, the lower 8 bits are 0x40 to 0x7E, and 0x80 to 0xFC
ESC GS y D 2 a m1 n1L n1H d11 d12 … d1k m2 n2L n2H d21 d22 … d2k ml …
[Defined Area] 1 ≤ a ≤ 255 1 ≤ m ≤ 4
0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255
1 ≤ nL + nH x 256 ≤ 7089 (k = nL + nH x 256)
0 ≤ d ≤ 255
1 ≤ I ≤ 255
[Initial Value] --[Function] Specifies the bar code data type and sets the data.
• The printer receives the data type specified by m, and the data of the number of bytes (k) specified
by nL and nH, based on the block count specified by a.
• 1 block specified by a indicates m1, n1L, n1H, d11 • • • d1k (data type + data count + bar code data),
and by continuously sending these a multiple of times, one bar code data can mix data types.
• It is possible to set a maximum of 255 blocks with one command transmission.
• nL and nH specify the number of bytes of the data, so when using Kanji, calculate that 1 character has
2 bytes.
• If this command is outside of the definition region, immediately stop the command analysis process.
When doing so, the bar code data is cleared.
• This command data storage region is shared with the automatic setting command, so data is updated
each time either command is executed.
• When data type is set to alphanumeric (m=2) and data of alphabet characters "a" to "z" is sent, they are
converted into uppercase alphabet characters "A" to "Z" and their barcode data is generated.
[Model Limitations] SM-L200 : Not supported with versions 10 to 40.
StarPRNT Command Specifications80
Rev. 2.25
[Name]
Print QR code
[Code]
ASCII
ESC
GS y P
Hex.
1B
1D
79
50
Decimal
27
29
121
80
ESC GS y P
[Defined Area] --[Initial Value] --[Function] Prints bar code data.
When receiving this command, if there is unprinted data in the image buffer, the printer will print the bar
code after printing the unprinted print data.
A margin of more than 4 cells is required around the QR code. The user should ensure that space.
Always check printed bar codes in actual use.
StarPRNT Command Specifications81
Rev. 2.25
4 1 1 1 1 1 3
5
p1
START
STOP
2.3.16. Two-Dimensional Bar Code PDF417 Command Details
This command prints two-dimensional bar code PDF417.
There are four types of commands, according to functions, for two-dimensional bar code PDF417.
(1) Bar code type setting (<ESC> <GS> “x” “S”)
(2) Bar code data setting (<ESC> <GS> “x” “D”)
(3) Bar code printing (<ESC> <GS> “x” “P”)
The following describes the functions in detail.
(1) Bar code type setting
These commands set the bar code type. Because these are all set with default values, they should be used only when it is
necessary to change. (Refer to section below for details on each setting.)
p2
PDF417 is configured by a fixed bar pattern for starting and stopping, and a bar pattern called a code word.
Code words are configured by 17 modules.
Code Word
<ESC> <GS> “x” “S” “0” specifies values of p1 and p2.
USE_LIMITS mode specify the ratio of p1 and p2. USE_FIXED mode specifies p1 (line count) and p2 (code word count per line).
<ESC> <GS> “x” “S” “1” specifies values of error correction levels.
PDF417 can read information even if a portion of the data is corrupted by using the error correction.
By increasing this level, the bar code size increases because there is more preparatory information.
<ESC> <GS> “x” “S” “2” and <ESC> <GS> “x” “S” “3” specify the size of the module that configures the code word.
The X direction size (in dot increments) is determined by <ESC> <GS> “x” “S” “2” for the module, and <ESC> <GS> “x”
“3” specifies the Y direction size from the aspect.
Module size setting is the basis for the bar code image that is generated, so the resulting print will vary according to that setting.
The settings above are set individually, so the errors described below may be generated even if there is no particular
problem in those settings. In such case, if the bar code is generated the (3) print command (<ESC> <GS> “x” “P”) is
ignored.
• Error is generated when generating a bar code, due to the combination of the bar code setting commands.
• The bar code data that is generated exceeds the printable size of PDF417.
• Print data exceeds the currently set print region.
“S”
StarPRNT Command Specifications82
Rev. 2.25
(2) Bar code data setting command
This command sets the print data of the bar code.
(3) Bar code print command
This command prints the bar code according to the settings of (1) and (2).
- Precautions for use of commands -
• Unless the following operations are performed, the setting values are maintained for (1) and (2).
• Sending of new setting commands
• Sending an initializing command (<ESC> @)
• The power is turned off
• Sending (3) when needed
• Printing
• When printing, position shifting according to the horizontal tab, absolute position specification, relative position
specification, and position alignment is valid.
• Upside-down printing and two-color printing are possible.
• When a bar code is printed, always verify it by actual use.
Send the command transmission example last.
1. Bar code type setting
<ESC> <GS> “x” “S” “0” 0 2 3 : Sets the bar code size to USE_LIMITS = 2:3
<ESC> <GS> “x” “S” “1” 3 : Sets ECC level to 3
<ESC> <GS> “x” “S” “2” 3 : Sets the module X direction size to 3 dots
<ESC> <GS> “x” “S” “3” 3 : Sets module aspect ratio to 3
2. Bar code data setting
<ESC> <GS> “x” “D” 10 0 “0123456789”: Sets the bar code data
3. Printing bar code
<ESC> <GS> “x” “P” : Print
StarPRNT Command Specifications83
Rev. 2.25
ESC GS x S 0 n p1 p2
[Name]
Set PDF417 bar code size
[Code]
ASCII
ESC
GS x S 0 n
p1
p2
Hex.
1B
1D
78
53
30 n p1
p2
Decimal
27
29
120
83
48 n p1
p2
Code Size)
0
USE_LIMITS
horizontally and vertically)
p1: p2: Proportions of Vertical (p1) and Horizontal (p2)
bar code.)
variable.
[Name]
Set PDF417 ECC (security level)
[Code]
ASCII
ESC
GS x S 1 n
Hex.
1B
1D
78
53
31 n
Decimal
27
29
120
83
49 n
[Name]
Set PDF417 module X direction size
[Code]
ASCII
ESC
GS x S 2 n
Hex.
1B
1D
78
53
32 n
Decimal
27
29
120
83
50 n
[Defined Area] n = 0, 1
When n = 0: 1 ≤ p1 ≤ 99, 1 ≤ p2 ≤ 99
When n = 1: p1 = 0 or 3 ≤ p1 ≤ 90, p2 = 0 or 1 ≤ p2 ≤ 30 (However, this excludes p1 = p2 = 0)
[Initial Value] n = 0, p1 = 1, p2 = 2
[Function] Parameter details
n
(Specify Method to Specify Bar
p1, p2
(Size Specification)
(Specify ratio of bar code
1 USE_FIXED
(Specifies number of lines
and number of columns of
Setting the bar code size using this command specifies the general size of the bar code.
The size will automatically be corrected according to the other settings.
However, p1: p2 = 1: 99 to 10 : 1 (p1/p2 = 0.01 to 10)
p1: Number of lines (0, 3 to 90), p2: Number of columns (0, 1 to 30)
However, p1 * p2 ≤ 928
When either p1 or p2 specifies 0, it indicates that that setting value is
ESC GS x S 1 n
[Defined Area] 0 ≤ n ≤ 8
[Initial Value] n = 1
[Function] Parameter details
• n: ECC level (0 to 8)
ESC GS x S 2 n
[Defined Area] 1 ≤ n ≤ 10
[Initial Value] n = 2
[Function] Parameter details
• n: Sets the module X direction size (x-dim). Units: Dots
It is recommended that 2 ≤ n when specifying using this command.
When using with n = 1, check by actual use.
StarPRNT Command Specifications84
Rev. 2.25
ESC GS x S 3 n
[Name]
Set PDF417 module aspect ratio
[Code]
ASCII
ESC
GS x S 3 n
Hex.
1B
1D
78
53
33 n Decimal
27
29
120
83
51 n
[Name]
Set PDF417 bar code data
[Code]
ASCII
ESC
GS x D
nL
nH
d1
d2 … dk
Hex.
1B
1D
78
44
nL
nH
d1
d2 … dk
Decimal
27
29
120
68
nL
nH
d1
d2 … dk
[Name]
Print PDF417 bar code
[Code]
ASCII
ESC
GS x P
Hex.
1B
1D
78
50
Decimal
27
29
120
80
[Defined Area] 1 ≤ n ≤ 10
[Initial Value] n = 3
[Function] Parameter details
• n: Sets the module aspect ratio (asp).
The module Y direction size (x-dim x asp) is set using this command.
It is recommended that 2 ≤ n when specifying using this command.
When using with n = 1, check by actual use.
ESC GS x D nL nH d1 d2 … dk
[Defined Area] 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255
1 ≤ (nL + nH x 256) ≤ 1024
0 ≤ d ≤ 255
1 ≤ k ≤ 1024
[Initial Value] --[Function] Parameter details
• nL + nH x 256 : Bar code data count
• d1…dk : Bar code data (Maximum 1024 data)
When [nL + nH x 256] is outside of the definition, data of [nL + nH x 256] bytes is discarded.
[Model Limitations] SM-L200: Maximum settable barcode data count 128 byte
1≤ (nL + nH x 256) ≤128, 1≤k≤128
ESC GS x P
[Defined Area] --[Initial Value] --[Function] Prints the bar code data.
If there is unprinted data in the line buffer, this command is executed after printing that data in the line
buffer. Therefore, it is not possible to print with other data in the same line (characters, bit images, bar
codes).
Also, this command is ignored if the following errors occur.
• When an error is generated when generating a bar code, due to the combination of the bar code setting
commands
• When the bar code data that is generated exceeds the printable size of PDF417
• When the print data exceeds the currently set print region
When a bar code is printed, always verify it by actual use.
2D GS1 DataBar: Set The maximum width of the 2D
GS1DataBar Expanded Stacked
80
Function 380
2D GS1 DataBar: Store data in symbol saving region
81
Function 381
2D GS1 DataBar: Print symbol data of symbol saving region
52
67
Function 467
Compound symbol: Set module size
Compound symbol: Set The maximum width of the 2D
GS1DataBar Expanded Stacked
72
Function 472
Compound symbol: Set HRI Font
80
Function 480
Compound symbol: Store data in symbol saving region
81
Function 481
Compound symbol: Print symbol data of symbol saving region
2.3.17. GS1 2D Code, Compound symbol Command Details
ESC GS ( k pL pH cn fn [parameter]
[Function] Runs processes related to symbol.
• pL and pH specify the parameter count (pL + pH x 256) in bytes after cn.
• Specifies the type of symbol with cn.
• Specifies the function with fn.
• See the function specifications for details on [parameter].
51
71
71
Function 371
Function 471
StarPRNT Command Specifications86
Rev. 2.25
[Name]
2D GS1 DataBar: Set module siz
[Code]
ASCII
ESC
GS ( k
pL
pH
cn
fn n
Hex.
1B
1D
28
6B
pL
pH
cn
fn n
Decimal
27
29
40
107
pL
pH
cn
fn n
[Name]
2D GS1 DataBar: Set The maximum width of the 2D GS1DataBar Expanded Stacked
[Code]
ASCII
ESC
GS ( k
pL
pH
cn
fn
nL
nH
Hex.
1B
1D
28
6B
pL
pH
cn
fn
nL
nH
Decimal
27
29
40
107
pL
pH
cn
fn
nL
nH
<Function 367> ESC GS ( k pL pH cn fn n (cn=51, fn=67)
[Defined Area] pL = 3, pH = 0
cn = 51
fn = 67
2 ≤ n ≤ 8
[Initial Value] n = 2
[Function] Sets 2D GS1 DataBar module width to n dots.
[Details] The setting of this function affects processes of Functions 081 and 082.
This setting is valid until ESC @ is executed, the printer is reset or the power is turned off.
Set in units of 1 dot.
The width is set in 0.125 mm (1/203 inches) units.
[Reference] ESC GS ( k Function 381, ESC @
[Defined Area] pL = 4, pH = 0
cn = 51
fn = 71
106 ≤ n ≤ 3952
[Initial Value] (nL + nH x 256) = 141 (nL = 141, nH = 0)
[Function] The maximum width of the 2D GS1DataBar Expanded Stacked is set to n dots.
[Details] The setting for this function affects the processing of function 381.
This setting is enabled until ESC@ is executed, the printer is reset, or the power is turned off.
The set unit is 1 dot.
The width is set as 0.125 mm (1/203 inches).
[Reference] ESC GS ( k Function 381 , ESC @
StarPRNT Command Specifications87
Rev. 2.25
S ( k pL pH cn fn m n d1...dk (cn=51, fn=80)
[Name]
2D GS1 DataBar: Store data in symbol saving region
[Code]
ASCII
ESC
GS ( k
pL
pH
cn
fn m n
d1
...
dk
Hex.
1B
1D
28
6B
pL
pH
cn
fn m n
d1
...
dk
Decimal
27
29
40
107
pL
pH
cn
fn m n
d1
...
dk
n
Type of Symbol
Data (k)
ASCII
Data (d)
73 GS1 Databar Stacked
Omnidirectional
k = 13
“0” to”9”
48 ≤ d ≤ 57
76
GS1 Databar Expanded
2 ≤ k ≤ 255
0~9, A~Z, a~z
<Function 380> ESC G
[Defined Area] 4≤ (pL+pH×256) ≤259 (0≤pL≤255, pH = 0, 1)
cn = 51
fn = 80
m = 48
n = 72, 73, 76
0 ≤ d ≤ 255
k = (pL + pH x 256) - 4
[Function] Symbol data (d1...dk) for the 2D GS1 DataBar is stored in the symbol saving region.
72 GS1 Databar Stacked k = 13 “0” to ”9” 48 ≤ d ≤ 57
Stacked
[Details] Data stored in the symbol saving region by this function is processed using function 381.
After processing functions 381 and 382, data in the saving region is maintained.
k bytes for d1...dk are processed as symbol data.
This setting is valid until this function is reset, ESC@ is executed, the printer is reset, or the power is off.
[Function] The width of one module for compound symbols is set to n dots.
[Details] The setting for this function affects the processing of function 481.
This setting is enabled until ESC@ is executed, the printer is reset, or the power is turned off.
The set unit is 1 dot.
The width is set as 0.125 mm (1/203 inches).
[Defined Area] pL = 4, pH = 0
cn = 52
fn = 71
106 ≤ n ≤ 3952
[Initial Value] (nL + nH x 256) = 141 (nL = 141, nH = 0)
[Function] The maximum width of the GS1DataBar Expanded Stacked in compound symbols is set to n dots.
[Details] The setting for this function affects the processing of function 481.
This setting is enabled until ESC@ is executed, the printer is reset, or the power is turned off.
The set unit is 1 dot.
The width is set as 0.125 mm (1/203 inches).
[Reference] ESC GS ( k Function 481, ESC @
StarPRNT Command Specifications90
Rev. 2.25
[Name]
Compound symbol: Set the HRI font
[Code]
ASCII
ESC
GS ( k
pL
pH
cn
fn
n
Hex.
1B
1D
28
6B
pL
pH
cn
fn
n
Decimal
27
29
40
107
pL
pH
cn
fn
n
n
HRI font
0, 48
not printed
1, 49
printed (Select font A(12x24))
2, 50
printed (Select font B(9x24))
<Function 472> ESC GS ( k pL pH cn fn n (cn=52, fn=72)
[Defined Area] pL = 3, pH = 0
cn = 52
fn = 72
0 ≤ n ≤ 2, 48 ≤ n ≤ 50
[Initial Value] n = 0
[Function] Select the font for HRI characters when printing combined symbols.
[Details] Data stored in the symbol saving region by this function is processed using function 481.
When “Print” HRI is selected, HRI is printed under 1D bar codes.
When the combined symbol uses a 2D code (GS1 DataBar Stacked, GS1 DataBar Stacked
Omnidirectional,GS1 DataBar Expanded Stacked), this setting is not affected and HRI is not printed.
This setting is valid until this function is reset, ESC@ is executed, the printer is reset, or the power is off.
[Reference] ESC GS ( k Function 481, ESC @
StarPRNT Command Specifications91
Rev. 2.25
GS ( k pL pH cn fn m a b d1...dk (cn=52, fn=80)
[Name]
Compound symbol: Store data in symbol saving region
[Code]
ASCII
ESC
GS ( k
pL
pH
cn
fn m a b d1
...
dk
Hex.
1B
1D
28
6B
pL
pH
cn
fn m a b d1
...
dk
Decimal
27
29
40
107
pL
pH
cn
fn m a b d1
...
dk
b
Bar Code Type
Data (k)
ASCII
Data (d)
65
EAN8
k = 7,8
“0”to”9”
48 ≤ d ≤ 57
66
EAN13
k = 12,13
“0”to”9”
48 ≤ d ≤ 57
67
UPC-A
k = 11,12
“0”to”9”
48 ≤ d ≤ 57
69 UPC-E (11-digit version
(0 included))
k = 11,12
“0”to”9”
48 ≤ d ≤ 57
70 GS1 DataBar
Omnidirectional
k = 13
“0”to”9”
48 ≤ d ≤ 57
71
GS1 DataBar Truncated
k = 13
“0”to”9”
48 ≤ d ≤ 57
72
GS1 DataBar Stacked
k = 13
“0”to”9”
48 ≤ d ≤ 57
GS1 DataBar Stacked
Omnidirectional
“0”to”9”
74
GS1 DataBar Limited
k = 13
“0”to”9”
48 ≤ d ≤ 57 [However d1 = 48,49]
75
GS1 DataBar Expanded
2 ≤ k ≤ 255
0~9, A~Z, a~z
_, {
48 ≤ d ≤ 57, 65 ≤ d ≤ 90, 97 ≤ d ≤ 122,
48 ≤ d3 ≤ 57 , 48 ≤ d1 ≤ 57, 48 ≤ d2 ≤ 57]
76
GS1 DataBar Expanded
2 ≤ k ≤ 255
0~9, A~Z, a~z
_, {
48 ≤ d ≤ 57, 65 ≤d ≤90, 97 ≤d ≤122,
48 ≤d1 ≤57, 48 ≤d2 ≤57]
77
GS1-128
2 ≤ k ≤ 255
0 ≤d ≤127
b
Type of Symbol
Data (k)
Data (d)
65
3 ≤ k ≤ 2361
32 ≤d ≤127
66
fixing to CC-C
3 ≤ k ≤ 2361
32 ≤ d ≤ 127
<Function 480> ESC
[Defined Area] 7 ≤ (pL+ pH × 256) ≤ 2366 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 9)
cn = 52
fn = 80
m = 48
a = 48,49
65 ≤ b ≤ 77(a=48)
b = 65,66 (a=49)
0 ≤ d ≤ 255
k = (pL+ pH × 256) - 5
[Function] Symbol data (d1...dk) for the Compound symbol:is stored in the symbol saving region.
a = 48
73
Stacked
a = 49
CC-A, CC-B, CC-C
Automatic distinction
by a digit number.
[Details] Data stored in the symbol saving region by this function is processed using function 481.
After processing functions 481, data in the saving region is maintained.
k bytes for d1...dk are processed as symbol data.
This setting is valid until this function is reset, ESC@ is executed, the printer is reset, or the power is off.
[Function] Executes encoding and printing of the symbol data stored in the symbol saving region by GS ( k
function 480.
[Note] The user must secure the quiet zone.
[Reference] GS ( k Function 480
[Details] This command prints bar code data or deploys it to the image buffer.
This command is ignored when one of the following errors occurs:
- Error that occurs when the bar code is generated due to the combination of each barcode setting
command.
- When the generated bar code data exceeds the printable size for the GS1 DataBar.
- When the print data exceeds the current set print area.
Make sure you check the printed bar code before actual use.
For standby mode:
- If unprinted data still exists in the line buffer, the buffered data is printed out, the command is executed,
and then the bar code is printed. Therefore, you cannot print mixed data (characters, bit images, bar
codes) on the same line.
For page mode:
StarPRNT Command Specifications93
Rev. 2.25
[Name]
Command initialization
[Code]
ASCII
ESC @
Hex.
1B
40
Decimal
27
64
[Name]
Execute real-time printer reset
[Code]
ASCII
ESC
ACK
CAN
Hexadecimal
1B
06
18
Decimal
27 6 24
2.3.18. Initialization Command
ESC @
[Defined Area] - - [Initial Value] - - [Function] In standard mode, the commands are initialized after the data in the line buffer was printed.
However, printers with memory switch settings are initialized to the memory switch settings.
In case of the model with DIPSW, DIPSW re-reading is not performed.
In page mode, the entire print region is cleared and the mode changes back to standard mode.
• ANK characters, Kanji character adornment, expansion
• Kanji character mode
• ANK right space
• Kanji 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
• Line feed amount
• Set upside-down, position alignment
• Left/right margins
• Top margin
The following shows the specifications that are not initialized by this command.
mPOP, mC-Print2, mC-Print3:
Execution of this command during printing may be delayed.
Reconnection is required, because the connection between printer and host is disconnected by the execution of
this command.
StarPRNT Command Specifications94
Rev. 2.25
[Name]
Reset printer (execute self print)
[Code]
ASCII
ESC
?
LF
NUL
Hex.
1B
3F
0A
00
Decimal
27
63
10 0
ESC ? LF NUL
[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
m = 87, 84, 44, 43, 45, 64, 42 (m = “W”, “T”, “,”, “+”, “-”, “@”, “*”) 48 ≤ N ≤ 57 (”0” ≤ N ≤ “9”), 65 ≤ N ≤ (*)70 (”A” ≤ N ≤ (*)“F”), 97 ≤ N ≤ (*) 102, (“a” ≤ N ≤ (*) (*) “f”)
N = 85 (N = “U”) User defined area
(*) The memory switch defined area differs according to the model.
[Initial Value] - - [Function] Sends command to write after defining memory switch using the definition command specified by the
following classes.
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.
You can register any 16 bit data by specifying N = 85 (”U”).
You can load the default settings by specifying m = 42 (*).
Consider the life of the non-volatile memory and avoid excessive use of this command.
Functions Class m N n1 n2 n3 n4
Definition data write and reset Write “W” Fixed at “0” Fixed at “0000”
Definition data write and reset and self print Write “T” Fixed at “0” Fixed at “0000”
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 bit initialized) Definition “@” Fixed at “0” Fixed at “0000”
Definition data (load default settings) 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
[Model Limitations]
SM-L200, SM-S/T Series: The m=42 (m=”*”) data definition (load default settings) function is not supported.
StarPRNT Command Specifications96
Rev. 2.25
[Name]
Set status transmission conditions
[Code]
ASCII
ESC
RS a n
Hex.
1B
1E
61 n
Decimal
27
30
97 n
Command function selection by memory switches
Status transmission conditions
Status transmission
0, 48
ASB Invalid • NSB Invalid
1, 49
ASB Valid • NSB Invalid
2, 50
ASB Invalid • NSB Valid
3, 51
ASB Valid • NSB Valid
16
Returns the ASB and NSB settings to the initial state
set by the memory switches.
[Name]
Real-time printer status (ASB status)
[Code]
ASCII
ESC
ACK
SOH
Hex.
1B
06
01 Decimal
27 6 1
2.3.20. Status
ESC RS a n
[Defined Area] 0≤n≤3, 48≤n≤51(”0”≤n≤”3”)
n=16,n=255
[Initial Value] Set by 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.
See each printer's product specifications manual for details on the memory switch settings.
The command functions can be selected using the memory switch.
Therefore, the command specifications vary depending on the memory switch setting as follows.
n
255 Sends the ASB status information.
ESC ACK SOH
[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.
Status transmission
StarPRNT Command Specifications97
Rev. 2.25
[Name]
Update ASB ETB status
[Code]
ASCII
ETB Hex.
17
Decimal
23
[Name]
Initialize ASB ETB counter and ETB status
[Code]
ASCII
ESC
RS E n
Hex.
1B
1E
45 n Decimal
27
30
69 n
ETB
[Defined Area] - - [Initial Value] - - [Function] 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 of ABS Status.
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).
• Precautions when using Ethernet
When multi-session is valid the ASB (ETB counter) sent by <ETB> is sent to all hosts that are connected.
For that reason, sending ETB from multiple sessions, can cause mis-recognition of the ETB counter.
Therefore, we recommend the <ESC><GS><ETX> commands to confirm the print end counter.
See the Command List by Model.
ESC RS E 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.
StarPRNT Command Specifications98
Rev. 2.25
[Name]
Send print-end counter, initialize
[Code]
ASCII
ESC
GS
ETX s n1
n2
Hex.
1B
1D
03 s n1
n2
Decimal
27
29 3 s
n1
n2
s
Name
Function
(Does not wait for print end. Does not count up.)
(4) Sends print end counter to host.
(Does not wait for print end. Does not send the print end counter to the host.
n1, n2 = 0
(2) Initialize
(3) Cancels data intake mode
n1=0: Initializes to the content of memory switch. (n2=0)
n1=2: Sends the current timeout setting to the host. (n2=0)
[Code]
ASCII
ESC
GS
ETX s n1
n2
[Print end counter]
NUL
Hexadecimal
1B
1D
03 s n1
n2
[Print end counter]
00
Decimal
27
30 3 s
n1
n2
[Print end counter]
0
Item
ESC GS ETX s n1 n2
ETB
Affect on ASB (ETB Status)
None
Yes
ASB occurrence
None
Yes
Affect of ASB valid/invalid setting
None
Yes
Affect of the ESC RS E n command
None
Yes
Status transmission destination in Ethernet
(When multi-sessions is valid)
Send only when in the print
session (host) that is connected
Send ASB to all sessions
(hosts) that are connected
[Function] This command is run when reading from the reception buffer. Processes the print end counter
according to the s parameter.
0 Print end counter reference
1 Print end counter update
2 Print end counter clear
Start document
3
End document
4
n1, n2 = 0
5 Data timeout setting
The data formats sent to the host when s = 0 or s =1 are shown below.
<Returned Data Formats>
Sends the current print end counter to the host.
Runs the following operations.
(1) Prints data in line buffer, if data exists.
(2) Waits until printing ends (motor stops).
(3) Updates the print end counter (increments by 1).
Returns the print end counter to its default value (zero clear).
(1) Sets data intake mode
(1) Prints data in line buffer, if data exists.
(2) Waits until printing ends (motor stops).
n1=1: Data timeout setting
n2=0: Timeout disabled
Others: n2 = Data timeout time (units: seconds 1 to 255 seconds)
* Echoes back the specified contents from the host as is until ESC GS ETX s n1 n2, and then sends the print end
counter value and NUL.
When [Print end counter] is 1 byte in length, the initial value is 0x00.
When s = 1, increments by 1 each time the command is processed. After 0xFF, returns to 0x00.
There is one [Print end counter] in the printer that is unrelated to the n1, n2 values.
(There is no counter for the n1, n2 values.)
(Reference Information) Differences between the ETB command and this command
* This print end counter and the ETB counter sent by the ETB command are separate.
They have no affect on each other.
StarPRNT Command Specifications99
Rev. 2.25
Host Transmission Data
Printer return data
ESC GS ETX 0x00 0x00 0x00 0x00 0x00
ESC GS ETX 0x01 0x00 0x00 0x01 0x00
ESC GS ETX 0x01 0x00 0x00 0x02 0x00
Host Transmission Data
Printer return data
←
ESC GS ETX 0x00 0x02 0x00 0x00 0x00
ESC GS ETX 0x01 0x02 0x11 0x01 0x00
ESC GS ETX 0x01 0x02 0x12 0x02 0x00
ESC GS ETX 0x01 0x02 0x13 0x03 0x00
ESC GS ETX 0x01 0x02 0x14 0x04 0x00
The following shows a communication example of this command.