Star Micronics ESC/POS User Manual

Line Thermal Printer

ESC/POS® Mode

Command Specifications

Revision 2.52

Star Micronics Co., Ltd.

Special Products Division

Contents

 

Rev.2.52

 

 

1.

INTERFACE CONFIGURATION

9

 

1-1 RS-232 Serial Interface

9

 

1-1-1

Specifications (Conforming to RS-232)

9

 

1-1-2 Switching Between Online and Offline

9

 

1-1-3 Signal Array and Explanations According to Interface Connector Pin

10

 

1-1-4 Timing for Transmitting XON/XOFF

11

 

1-1-5 Serial Interface Connection Example

11

 

1-1-6 Precautions When Switching the BUSY Conditions

12

 

1-1-7 Notes on resetting the printer using the interface

13

 

1-2 Bi-directional Parallel Interface (IEEE1284)

14

 

1-2-1 Compatibility Mode (Host – Printer Communications: Conforms to Centronix)

14

 

1-2-2 Reverse Mode (Printer to Host Communications)

14

 

1-2-3 Interface Connector Pin Arrangement for Each Mode

15

 

1-2-4 Data Reception Timing (Compatibility Mode)

16

 

1-2-5

Precautions When Resetting the Printer Using the Interface

17

 

1-2-6 Receiving Status from the Printer Using a Bidirectional Parallel Interface

17

 

1-3 USB Interface

18

 

1-4 Ethernet Interface

18

 

1-5 Wireless LAN Interface

18

 

1-6 Powered USB

18

 

1-7 Bluetooth Interface

18

2 EXPLANATION OF THE PAGE MODE

19

 

2-1 General Description

19

 

2-2 Settings Using Commands in Standard Mode and Page Mode

19

 

2-3 Expanding Print Data to the Print Region

20

3.

COMMAND FUNCTION LIST

23

4.

COMMAND DETAILS

30

 

4-1 Explanation of Terms

30

 

4-2 Exception Processing

32

 

4-3 Command Details

33

 

4-3-1

Standard Commands

33

 

HT

 

33

 

LF

 

34

 

FF

 

35

 

CR

 

36

 

CAN

 

37

 

DLE EOT n

38

 

DLE ENQ n

39

 

DLE DC4 n m t

40

 

ESC FF

41

 

ESC SP n

42

 

ESC ! n

43

 

ESC $ nL nH

44

 

ESC % n

45

 

ESC& yc1c2 [x1d1...d (y x x1) ] ... [axd1...d (yxax)]

46

 

ESC * m nL nH d1…dk

49

 

ESC - n

51

 

ESC 2

52

 

ESC 3 n

53

 

ESC = n

54

 

ESC ? n

55

 

ESC @

56

 

ESC D n1 … nk NUL

57

 

ESC E n

58

ESC/POS Command Specifications

2

 

Rev.2.52

ESC G n

59

ESC J n

60

ESC L

61

ESC M n

62

ESC R n

63

ESC S

64

ESC T n

65

ESC V n

66

ESC W xL xH yL yH dxL dxH dyL dyH

67

ESC \ nL nH

69

ESC a n

70

ESC c 3 n

71

ESC c 4 n

72

ESC c 5 n

73

ESC d n

74

ESC p m t1 t2

75

ESC t n

76

ESC { n

77

FS g 1 m a1 a2 a3 a4 nL nH d1 ... dk

78

FS g 2 m a1 a2 a3 a4 nL nH

80

FS p n m

82

FS q n [xL xH yL yH d1...dk] 1... [xL xH yL yH d1...dk] n

83

GS ! n

86

GS $ nL nH

88

GS * xy d1 … d (xX yX 8)

89

<Function 49> GS ( K pL pH fn m (Fn=49)

92

<Function 50> GS ( K pL pH fn m (Fn=50)

94

GS ( L pL pH m fn [parameter]

95

GS 8 L p1 p2 p3 p4 m fn [parameter]

95

<Function 48> GS ( L pL pH m fn (fn=48)

96

<Function 48> GS 8 L p1 p2 p3 p4 m fn (fn=48)

96

<Function 51> GS ( L pL pH m fn (fn=51)

97

<Function 51> GS 8 L p1 p2 p3 p4 m fn (fn=51)

97

<Function 64> GS ( L pL pH m fn d1 d2 (fn=64)

98

<Function 64> GS 8 L p1 p2 p3 p4 m fn d1 d2 (fn=64)

98

<Function 65> GS ( L pL pH m fn d1 d2 d3 (fn=65)

99

<Function 65> GS 8 L p1 p2 p3 p4 m fn d1 d2 d3 (fn=65)

99

<Function 66> GS ( L pL pH m fn kc1 kc2 (fn=66)

100

<Function 66> GS 8 L p1 p2 p3 p4 m fn kc1 kc2 (fn=66)

100

<Function 67> 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) 101

<Function 67> GS 8 L p1 p2 p3 p4 m fn a kc1 kc2 b xL xH y L yH [c d1 ... dk] 1 ... [c d1 ... dk] b

(fn=67)

101

<Function 69> GS ( L pL pH m fn kc1 kc2 x y (fn=69)

103

<Function 69> GS 8 L p1 p2 p3 p4 m fn kc1 kc2 x y (fn=69)

103

<Function 112> GS ( L pL pH m fn a bx by c xL xH yL yH d1...dk (fn=112)

105

<Function 112> GS 8 L p1 p2 p3 p4 m fn a bx by c xL xH yL yH d1…dk (fn=112)

105

GS ( N pL pH n m

106

GS ( k pL pH cn fn [parameter]

107

<Function 065> GS ( k pL pH m cn n (cn=48, fn=65)

108

<Function 066> GS ( k pL pH m cn n (cn=48, fn=66)

109

<Function 067> GS ( k pL pH cn fn n (cn=48, fn=67)

110

<Function 068> GS ( k pL pH cn fn n (cn=48, fn=68)

110

<Function 069> GS ( k pL pH cn fn m n (cn=48, fn=69)

111

<Function 70> GS ( k pL pH cn fn m (cn=48, fn=70)

112

<Function 080> GS ( k pL pH cn fn m d1...dk (cn=48, fn=80)

112

<Function 081> GS ( k pL pH cn fn m (cn=48, fn=81)

113

<Function 082> GS ( k pL pH cn fn m (cn=48, fn=82)

114

<Function 165> GS ( k pL pH cn fn n1 n2 (cn=49, fn=65)

115

<Function 167> GS ( k pL pH cn fn n (cn=49, fn=67)

115

<Function 169> GS ( k pL pH cn fn m n (cn=49, fn=69)

116

ESC/POS Command Specifications

3

 

Rev.2.52

<Function 180> GS ( k pL pH cn fn m n (cn=49, fn=80)

116

<Function 181> GS ( k pL pH cn fn m (cn=49, fn=81)

117

<Function 182> GS ( k pL pH cn fn m (cn=49, fn=82)

117

<Function 367> GS ( k pL pH cn fn n (cn=51, fn=67)

118

<Function 371> GS ( k pL pH cn fn nL nH (cn=51, fn=71)

118

<Function 380> GS ( k pL pH cn fn m n d1...dk (cn=51, fn=80)

119

<Function 381> GS ( k pL pH cn fn m (cn=51, fn=81)

120

<Function 467> GS ( k pL pH cn fn n (cn=52, fn=67)

121

<Function 471> GS ( k pL pH cn fn nL nH (cn=52, fn=71)

121

<Function 472> GS ( k pL pH cn fn n (cn=52, fn=72)

122

<Function 480> GS ( k pL pH cn fn m a b d1...dk (cn=52, fn=80)

123

<Function 481> GS ( k pL pH cn fn m (cn=52, fn=81)

125

GS / m

126

GS:

127

GS B n

128

GS C 0 n m

129

GS C 1 aL aH bL bH n r

130

GS C 2 nL nH

131

GS C ; sa; sb; sn; sr; sc;

132

GS E n

133

GS H n

134

GS I n

135

GS L nL nH

137

GS P x y

138

GS T n

140

GS V m

141

GS V m n

142

GS W nL nH

143

GS \ nL nH

144

GS ^ r t m

145

GS b n

146

GS c

147

GS f n

148

GS h n

149

1. GS k m d1 … dk NUL,

150

2.3. GS k m n d1 … dk

150

GS r n

157

GS v 0 m xL xH yL yH d1 … dk

158

GS w n

160

4-3-2 Chinese Character Control Commands

161

FS ! n

161

FS &

162

FS – n

164

FS .

165

FS 2 c1 c2 d1 … dk

166

FS C n

168

FS S n1 n2

169

FS W n

170

4-3-3 ESC/POS Black Mark Commands

171

FF

172

DLE ENQ n

173

GS FF

174

GS ( F pL pH a m nL nH

175

GS ( M pL pH n m (Function Code: n = 1, 49)

176

GS ( M pL pH n m (Function Code: n = 2, 50)

177

GS ( M pL pH n m (Function Code: n = 3, 51)

178

GS <

179

GS V m n

180

4-3-4 STAR Original Commands

181

ESC GS = nL nH da1 … dak db1 …dbk

181

ESC/POS Command Specifications

4

 

Rev.2.52

ESC GS t n

182

ESC GS # m N n1 n2 n3 n4 LF NUL

184

ESC RS F n

186

ESC RS C n

187

ESC RS L m

188

ESC GS ETX s n1 n2

189

4-3-5 STAR Original Presenter Control Commands

193

ESC SYN 0 n

 

193

ESC SYN 1 n

 

194

ESC SYN 3 n

 

195

ESC SYN4

n

196

ESC GS SUB DC1 m t1 t2

197

ESC GS SUB DC2 m t1 t2

198

ESC GS SUB DC3 m t1 t2

199

4-3-6 STAR Original Mark Commands

200

ESC GS * 0 n m1 m2 m3 … mk

201

ESC GS * 1 h v

202

ESC GS * 2 m c w

203

ESC GS * W

204

ESC GS * C

204

4-3-7 STAR Original Auto Logo Commands

205

ESC GS / W

208

ESC GS / C

209

ESC GS / 1 n

210

ESC GS / 2 n

211

ESC GS / 3 nL nH d1 d2 … dk

212

ESC GS / 4 nL nH d1 d2 ... dk

213

ESC GS / 5 n

214

ESC GS / 6 n

215

4-3-8 STAR Original Buzzer Commands

216

ESC GS BEL m t1 t2

216

ESC GS EM DC1 m n1 n2

217

ESC GS EM DC2 m n1 n2

218

4-3-9 Two-dimensional Bar Code 2D Code PDF417 Command Details

219

ESC GS x S 0 n p1 p2

222

ESC GS x S 1 n

222

ESC GS x S 2 n

223

ESC GS x S 3 n

224

ESC GS x D nL nH d1 d2 … dk

224

ESC GS x P

225

ESC GS x I

226

4-3-10 STAR Original Print Starting Trigger Control Commands

227

ESC GS g 0 m n

227

ESC GS g 1 m n

227

4-3-11 STAR Original 2-Dimensional Bar Code QR Code Command Details

228

ESC GS y S 0 n

230

ESC GS y S 1 n

230

ESC GS y S 2 n

230

ESC GS y D 1 m nL nH d1 d2 … dk

231

ESC GS y D 2 a m1 n1L n1H d11 d12 • • • d1k m2 n2L n2H d21 d22 • • • d2k ml • • • dlk

232

ESC GS y P

234

ESC GS y I

234

4-3-12 STAR Original Page Function Commands

235

ESC GS h 0 k m n

235

ESC GS h 1 k m n

236

4-3-13 Star Original Reduced Printing Function Command

238

ESC GS c h v

238

4-3-14 STAR Original Text Search Commands

239

ESC GS ) B pL pH fn [parameter]

239

ESC/POS Command Specifications

5

 

Rev.2.52

<Function 48> ESC GS ) B pL pH fn m (fn = 48)

241

<Function 49> ESC GS ) B pL pH fn m (fn = 49)

242

<Function 50> ESC GS ) B pL pH fn m (fn = 50)

243

<Function 64> ESC GS ) B pL pH fn m k d1…dk (fn = 64)

244

<Function 65> ESC GS ) B pL pH fn m k1 k2 d1…dk (fn = 65)

245

<Function 66> ESC GS ) B pL pH fn n t (fn = 66)

246

<Function 80> ESC GS ) B pL pH fn m (fn = 80)

247

<Function 81> ESC GS ) B pL pH fn m (fn = 81)

248

<Function 96> ESC GS ) B pL pH fn m (fn = 96)

249

 

4-3-15

Star Original Printer Information Transmission Commands

250

 

ESC GS ) I pL pH fn [parameter]

250

 

<Function 48> ESC GS ) I pL pH fn d1 d2

251

 

4-3-16

Star Original Individual Logo Commands

252

 

ESC GS ) L pL pH fn [parameter]

252

 

<Function 48> ESC GS ) L pL pH fn kc1 kc2

253

 

<Function 49> ESC GS ) L pL pH fn kc1 kc2

255

 

<Function 50> E S C G S ) L p L p H f n d 1 d 2

256

 

ESC GS s O z a n c1 c2 d1 d2 t1 t2

257

 

ESC GS s P

258

 

ESC GS s R z n1 n2 n3 d1 … dn

258

 

ESC GS s U z n [k1 k2 k3 d1 … dk]1 … [k1 k2 k3 d1 … dk]n

261

 

ESC GS s T a t1 t2

263

 

ESC SYN DC3 n

264

 

ESC SYN DC4 n

265

 

ESC GS ) s pL pH fn m (fn = 48)

266

5.

CHARACTER CODE TABLE

263

6.

APPENDIX

264

 

6-1 Appendix 1 Cautions

264

 

6-2 Appendix 2 Status Specifications

265

 

6-2-1

Identifying Transmission Status

265

 

6-2-2

Error Details Per Model

265

 

6-2-3

DLE EOT Status

266

 

6-2-4

ASB Status Specifications

269

 

6-2-5

Printer Status Transmission Specification When Using Ethernet and Wireless I/F 272

 

6-3 Appendix-3 Blank Page Configuration

275

 

6-4 Appendix 4 Standard Mode

277

 

6-4-1

Printing Region

277

 

6-4-2

Left Margin

280

 

6-5 Appendix 5 Page Mode

283

 

6-5-1

Page Mode Print Region

283

 

6-5-2

Usage Example of Page Mode

290

 

6-6 Appendix 6 CODE 128 Bar Codes, GS-1 Bar Codes

292

 

6-6-1

General Description of CODE 128 Bar Codes

292

 

6-6-2

General Description of GS-1 Bar Codes

296

 

6-6-3

GS1 Databar Omnidirectional

299

 

6-6-4

GS1 Databar Truncated

299

 

6-6-5

GS1 Databar Limited

299

 

6-6-6

GS1 Databar Expanded

299

 

6-7 Appendix 7 Maximum Number of Input Characters for Each Version of QR Code

300

 

6-8 Appendix 8

304

 

Explanation of Print Startup Control Starting Printing When Set to Page Units

304

 

6-9 Appendix 9

305

 

Explanation of Printing NV bit image data defined by

305

 

“GS ( L <fn=67>” or “GS ( 8 <fn=67>”, by “FS p” commmand

305

 

6-10 Appendix 10 Special Specifications when the Bluetooth Interface (IFBD-HB03) is used

ESC/POS Command Specifications

6

 

 

Rev.2.52

 

 

306

7. APPENDIX COMMAND LIST BY MODEL

306

7-1 RS-232C Interface

306

7-2 Parallel Interface

315

7-3 USB I/F (Ver 1.0) • Ethernet I/F (Silex 1.0)

324

7-4 USB I/F (Ver 2.0)

331

7-5

Powered USB I/F

340

7-6

Ethernet I/F

347

7-7

Wireless LAN I/F

355

7-8

Bluetooth I/F

363

ESC/POS Command Specifications

7

Rev.2.52

This document is the ESC/POS® mode command specification manual .

Information contained herein applies to models with the following conditions.

• Line Thermal Printers

 

• Printer head:

203DPI

• Interface:

Parallel, RS-232C, USB, Ethernet, Wireless LAN, Powered USB

 

Bluetooth

• Printing Width:

3 inch and 4 inch

< Applicable Models>

 

• 3 inch printers:

TSP700 TSP600 TSP1000 TSP700II, TSP650, TUP500, FVP10,

 

BSC-10, TSP043, TSP650II, TSP650IISK

• 4 inch printers:

TSP800, TUP900, TSP800II

ESC/POS Command Specifications

8

Rev.2.52

1. INTERFACE CONFIGURATION

1-1 RS-232 Serial Interface

1-1-1 Specifications (Conforming to RS-232)

Data transmission method

Serial

Synch method

Start-Stop synchronization method

Handshake

DTR/DSR/XON/XOFF

Signal level

MARK = -3v to -15v Logic ’1’/OFF

 

SPACEK = +3v to +15v Logic ’0’/ON

Baud rates

2400, 4800, 9600, 19200, 38400, 57,600, 115,200 bps

Bit length

7, 8 bits

Parity

None, odd, even

Stop bit:

1 bit (Fixed)

Connector

D-SUB 25 (Male)/D-SUB 9 (Male)

Note: Handshake, bit length, baud rates and parity settings are set by the DIP switches or the memory switches.

1-1-2 Switching Between Online and Offline

This printer does not have a switch to go between online and offline. The following conditions are required to go offline.

The time after initializing the mechanism when turning on the power or causing a reset by the interface until communication is possible

When executing a self-test • When the cover is open

When printing has stopped because there is no paper

(When the roll paper end sensor detects that paper is out, or the roll paper near end sensor detects that paper is out using ESCc4, or paper is out when the print stop is enabled.)

When waiting to switch at macro execution

While there is a temporary error in the power voltage

When there is an error

ESC/POS Command Specifications

9

Rev.2.52

1-1-3 Signal Array and Explanations According to Interface Connector Pin

<Signal Array and Functions>

Pin

 

Signal

Signal

 

 

Function

 

 

 

No.

 

Name

Dir.

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

FG

 

-

 

 

Frame ground

 

 

 

2

 

TXD

 

Output

 

Transmission Data

 

 

 

3

 

RXD

 

Input

 

Reception Data

 

 

 

4

 

RTS

 

Output

 

Same as DTR signal

 

 

 

 

 

 

 

 

 

Signal indicating whether host can receive data.

 

 

 

 

 

 

 

 

 

The SPACE status indicates the host can receive data; the MARK status indicates that the host

6

 

DSR

 

Input

 

cannot receive data. When DTR/DSR control is selected, the status of this signal is checked to

 

 

 

transmit data. (Excludes data transmissions using DLEEOT .)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When XON/XOFF control is selected, the status of this signal is not checked. This signal can

 

 

 

 

 

 

be used to reset the printer according by switching the DIP switches or the memory switches.

 

 

 

 

 

 

 

 

 

 

 

 

7

 

SG

 

-

 

Signal ground

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20

 

DTR

 

Output

 

(1) When DTR/DSR control is selected:

 

 

 

 

 

 

 

 

 

Indicates whether the printer is BUSY.

 

 

 

 

 

 

 

 

 

The SPACE status indicates the printer is READY; the MARK status indicates that the printer

 

 

 

 

 

 

is BUSY.

 

 

 

 

 

 

 

 

 

The DIP switch or the memory switch settings change the conditions for the printer to be BUSY.

 

 

 

 

 

(*1)

 

 

 

 

 

 

 

 

 

 

 

The following conditions are required to enter a BUSY (MARK) state.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Printer Status

 

Busy condition (*1)

 

 

 

 

 

 

 

 

 

OFF

ON

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• During the period from when the power is turned

 

BUSY

BUSY

 

 

 

 

 

 

 

 

on (including resetting using the interface) to

 

 

 

 

 

 

 

 

 

 

 

when the printer is ready to receive data.

 

 

 

 

 

 

 

 

 

 

<![if ! IE]>

<![endif]>OFFLINE

• When executing a self-test

 

BUSY

BUSY

 

 

 

 

 

 

 

• When the cover is open

 

-

BUSY

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• When printing stopped because of paper out

 

-

BUSY

 

 

 

 

 

 

 

 

• When waiting to switch at macro execution

 

-

BUSY

 

 

 

 

 

 

 

 

• While there is a temporary error in the power

 

-

BUSY

 

 

 

 

 

 

 

 

• When there is an error

 

-

BUSY

 

 

 

 

 

 

 

 

• When reception buffer is full (*2) BUSY

 

BUSY

BUSY

 

 

 

 

 

 

 

(2) XON/XOFF control is selected:

 

 

 

 

 

 

 

 

 

Indicates whether the printer is connected normally and is ready to receive data from the host.

 

 

 

 

 

 

A SPACE status indicate that the printer is connected normally and that data can be received.

 

 

 

 

 

 

The SPACE status is always entered except for the following cases.

 

 

 

 

 

 

 

 

• The time after initializing the mechanism when turning on the power until communication is

 

 

 

 

 

 

possible.

 

 

 

 

 

 

 

 

 

• While executing a self-test

 

 

 

25

 

INIT

 

Input

 

This signal can be used to reset the printer according by switching the DIP switches or the

 

 

 

 

 

 

memory switches.

 

 

 

(*1) DIPSW Settings: Conditions for BUSY

 

 

 

 

ON

=

Reception buffer full or printer is offline (Default)

 

 

 

 

OFF

=

Reception buffer full

 

 

 

(*2) When the reception buffer empty region is 0 bytes, received data is ignored.

ESC/POS Command Specifications

10

Rev.2.52

1-1-4 Timing for Transmitting XON/XOFF

When XON/XOFF control is selected, XON and XOFF are transmitted with the following timings. The transmission timing varies according to the DIP switch settings or the memory switch settings.

XON code: <11> H XOFF code: <13> H

For (3) below, XON is not transmitted when the reception buffer is full. For (6) below, XOFF is not transmitted when the reception buffer is full.

<XON/XOFF Transmission Timing>

 

 

 

Printer Status

Busy condition (*1)

 

 

 

OFF

ON

 

 

 

 

 

 

 

 

(1) When online for the first time after turning the power

Transmission

Transmission

 

 

 

on or a reset using the interface

 

 

XON

 

 

(2)

When the buffer full status was cancelled for recep-

Transmission

Transmission

Transmission

 

tion buffer

 

 

 

(3)

When shifting from offline to online

-

Transmission

 

 

 

 

 

 

(4)

When recovered from a recoverable error using a

-

Transmission

 

 

 

command

 

 

XOFF

 

 

(5)

When the reception buffer entered buffer full status

Transmission

Transmission

Transmission

 

(6)

When shifting from online to offline

-

Transmission

 

 

 

 

 

 

 

(*1) DIPSW Settings: Conditions for BUSY

 

 

ON

=

Reception buffer full or printer is offline (Default)

 

 

OFF

=

Reception buffer full

 

 

1-1-5 Serial Interface Connection Example

If the other connected party is DCE, be careful so that there is no status without a handshake (where data is flows) (DTE: Data Terminal Equipment; DCE: Data Circuit Terminating Equipment)

When transmitting data to the printer, turn on the power to the printer and initialize first.

Host Printer

TXD RXD

DSR DTR

CTS RTS

RXD TXD

DTR DSR

F.G F.G

S.G S.G

ESC/POS Command Specifications

11

Rev.2.52

1-1-6 Precautions When Switching the BUSY Conditions

DIPSW Settings: Conditions for BUSY

ON = Reception buffer full or printer is offline (Default) OFF = Reception buffer full

To set the busy conditions to reception buffer full (OFF), operators should be aware of the following points.

Printing will stop but the printer will not enter a BUSY state when printing stops because of an error, the cover is open, paper is out when printing stops are enabled, or when paper feeds are executed using the paper feed switch.

When using DLE EOT, DLE ENQ and DLE DC4, the reception buffer does not enter a buffer full status.

Precautions on the host which cannot receive data transmissions when the printer is BUSY DLEEOT, DLEENQ and DLEDC4 cannot be used when an error occurs when the printer has entered a BUSY state because the reception buffer is full.

Precautions on the host which can receive data transmissions when the printer is BUSY DLEEOT, DLEENQ and DLEDC4 are handled as bit image data when using the DLEEOT, DLEENQ and DLEDC4 partway through the bit image data when the reception buffer is full when transmitting bit image data. Also, it is possible to lose data when received while the reception buffer is full.

ESC/POS Command Specifications

12

Rev.2.52

1-1-7 Notes on resetting the printer using the interface

The printer can be reset using interface pins 6 and 25 by changing the DIP switch or the memory switch setting. But when a signal that does not satisfy the requirements above is input, printer operation is not guaranteed.

Minimum reset pulse width: TRS 1 ms (minimum)

When using pin 6 (DSR)

TRS

SPACE

MARK

When using pin 25 (INIT)

SPACE (H)

TRS

MARK (L)

ESC/POS Command Specifications

13

Rev.2.52

1-2 Bi-directional Parallel Interface (IEEE1284)

1-2-1 Compatibility Mode (Host – Printer Communications: Conforms to Centronix)

1. General Description

The Compatibility Mode is a mode that uses the Centronix interface as standard, which is widely in use.

2. Specifications

 

Data transmission method:

8 Bit Parallel

Synch method:

According to externally supplied nStrobe signal

Handshake:

According nAck signals and Busy signals

Signal level:

All signals are TTL compatible

3. Switching Between Online and Offline

This printer does not have a switch to go between online and offline. The following conditions are required to go offline.

The time after initializing the mechanism when turning on the power or causing a reset by the interface until communication is possible

When executing a self-test

When the cover is open

When the paper is out and printing has stopped (paper out selected by ESCc4)

When waiting to switch at macro execution

When errors occur

1-2-2 Reverse Mode (Printer to Host Communications)

Status data transfer from the printer to the host is performed in either Nibble or Byte Mode.

General Description

Data transmissions from asynch printers controlled by the host are regulated. Nibble Mode data transmissions use an existing control line to transmit data 4 bits (Nibble) at a time. The Byte Mode uses bidirectional communications to transfer 8 bits of data lines. In either case, communications are in half-duplex because it is not possible to execute both simultaneously with the Compatibility Mode.

ESC/POS Command Specifications

14

Rev.2.52

1-2-3 Interface Connector Pin Arrangement for Each Mode

Pin

Source

 

Compatibility Mode

Nibble Mode

Byte Mode

1

Host

 

nStrobe

 

HostClk

HostClk

2

Host/Ptr

 

Data0 (LSB)

 

Data0 (LSB)

Data0 (LSB)

3

Host/Ptr

 

Data1

 

Data1

Data1

4

Host/Ptr

 

Data2

 

Data2

Data2

5

Host/Ptr

 

Data3

 

Data3

Data3

6

Host/Ptr

 

Data4

 

Data4

Data4

7

Host/Ptr

 

Data5

 

Data5

Data5

8

Host/Ptr

 

Data6

 

Data6

Data6

9

Host/Ptr

 

Data7 (MSB)

 

Data7 (MSB)

Data7 (MSB)

10

Printer

 

nAck

 

PtrClk

PtrClk

11

Printer

 

Busy

 

PtrBusy/Data3,7

PtrBusy

12

Printer

 

PError

 

AckDataReq/Data2,6

AckDataReq

 

 

 

 

 

 

 

13

Printer

 

Select

 

Xflag/Data1,5

Xflag

14

Host

 

NC

 

HostBusy

HostBusy

15

 

 

NC

 

ND

ND

16

 

 

Signal GND

 

Signal GND

Signal GND

17

 

 

Frame GND

 

Frame GND

Frame GND

18

Printer

 

+5 V

 

+5 V

+5 V

19 to 30

 

 

Twisted Pair Return

Twisted Pair Return

Twisted Pair Return

 

 

 

 

 

 

 

31

Host

 

nInit

 

nInit

nInit

32

Printer

 

nFault

 

nDataAvail/Data0,4

nDataAvail

 

 

 

 

 

 

 

33

 

 

EXTGND

 

ND

ND

34

Printer

 

NC

 

ND

ND

35

Printer

 

NC

 

ND

ND

36

Host

 

nSelectIn

 

1284-Active

1284-Active

NC:

Not Connected

ND:

Not Defined

 

<Note>

Initial ‘n’ of signal name indicates an ‘L’ active signal

Bidirectional communications are not possible on hosts with even oneof theabovesignal lines.

Always use twisted pair lines for each signal line when using the interface and connect the return side to the signal ground level.

All interface conditions use TTL levels as standard and must satisfy the following characteristics. Each signal rise and fall times must be a maximum of 0.5 μs.

Data transmissions for which nAck signals or Busy signals are ignored are prohibited. When ignored, data can be lost.

Use the shortest distance necessary for the interface cable.

ESC/POS Command Specifications

15

Rev.2.52

1-2-4 Data Reception Timing (Compatibility Mode)

Data

Data n

Data n+1

 

tHold-1

 

nStrobe

 

 

tSetup tSTB tHold-2

 

Busy

 

Peripheral Busy

 

 

tReady

tBusy

 

nACK

tReply tACK tnBUSY

tNext

 

 

Standards

 

 

 

Minimum [ns]

Maximum [ns]

Data Hold Time (host)

tHold-1

-

500

Data Hold Time (printer)

tHold-2

-

-

Data Setup Time

tSetup

-

500

STROBE Pulse Width

tSTB

-

500

READY Cycle Idle Time

tReady

-

-

BUSY Output Delay Time

tBUSY

0

500

Data Processing Time

tReply

0

ACKNLG Pulse Width

tACK

1usec/9usec (*1)

-

BUSY Cancel Time

tnBUSY

0

ACK Cycle Idle Time

tNext

-

0

(*1) Memory Switch Setting: ACK Pulse Width

ON = 9usec

OFF = 1usec (Default)

ESC/POS Command Specifications

16

Rev.2.52

1-2-5 Precautions When Resetting the Printer Using the Interface

When applying a printer reset using the interface (#31 pin nInit signal) in the Compatibility Mode, the following characteristics must be met. However, the printer reset is ignored when the signal nSelectln (pin #36, 1284-Active

HIGH) is active in reverse mode.

 

 

Reset Minimum Pulse Width

TRS

50μsec (min)

Rise Time

tf

500nsec (max)

Fall Time

tr

500nsec (max)

nSelectIn (1284-Active)

min. 0

 

 

 

 

 

 

 

 

 

max. 1

 

 

 

 

 

 

 

 

nInit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

tf

 

TRS

 

tf

1-2-6 Receiving Status from the Printer Using a Bidirectional Parallel Interface

It is possible to transmit the status from the printer using bidirectional communications functions according to the Nibble and Byte Mode which conform to IEEE1284 standards, when using a bidirectional parallel interface. When doing so, compared to RS-232 serial interface specifications, you must pay attention to the following points because the printer cannot insert real-time interrupts to the host.

The transmission buffer size in the printer is 128 bytes. (Excluding ASB status) Because statuses that exceed this are discarded, create a receive status (Reverse Mode) on the host side so that status are not lost.

When using ASB, it is preferred that the host side be in a receive waiting status (a reverse idle status). If that is not possible, put the host side into a Reverse Mode to constantly monitor the presence of data.

When using ASB, ASB status is transmitted with priority over other statuses in the Reverse Mode. Also, ASB status that are accumulated without being sent from the last sent ASB status to the latest ASB status ate bundled into one ASB status and transmitted, and the latest ASB status is then transmitted after that.

Example: The following shows an ASB status in a normal (idled) state.

First Status

Second Status

Third Status

Fourth Status

0000

1000

0000

0000

0000

0000

0000

0000

The following data is accumulated when a near end detection occurs, the cover is open and cover close is performed.

1

First Status

Second Status

Third Status

Fourth Status

 

Near End

0000

1000

0000

0000

0000

0011

0000

0000

 

Detection

 

 

2

 

 

 

 

 

 

 

 

 

Cover

0010

1000

0000

0000

0000

0011

0000

0000

 

Open

 

 

3

 

 

 

 

 

 

 

 

 

Cover

0000

1000

0000

0000

0000

0011

0000

0000

 

Closed

 

 

Then, when theASB status is received, the combination of actually transferredASB is a total of 8 bytes:ASB (1 + 2 + 3) + the latest ASB (3).

ASB (1 + 2 + 3)

First Status

Second Status

Third Status

Fourth Status

 

 

 

 

 

 

 

 

 

 

 

 

 

0010

1000

 

0000

0000

 

0000

0011

 

0000

0000

 

 

 

 

 

 

 

 

 

+

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Latest ASB (3)

 

First Status

Second Status

Third Status

Fourth Status

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0001

1000

 

0000

0000

 

0000

0011

 

0000

0000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ESC/POS Command Specifications

 

17

 

 

 

 

 

 

 

 

Rev.2.52

1-3 USB Interface

Specifications

Conforms to USB 2.0 Full Speed

 

Supports printer class and header class (Refer to each printer specifications manual to select.)

Connector

Type B

1-4 Ethernet Interface

Specifications Conforms to IEEE 802.3

Cable 10BASE-T/10BASE-TX

Connector RJ45

1-5 Wireless LAN Interface

Specifications Conforms to IEEE 802.11b

1-6 Powered USB

Specifications

See the Product Specifications Manual IFBD-BPU03

Cable

See the Product Specifications Manual IFBD-BPU03

Connector

See the Product Specifications Manual IFBD-BPU03

1-7 Bluetooth Interface

Specifications: See the section “Bluetooth Interface model” in the separate “Product Specifications TSP650II”.

ESC/POS Command Specifications

18

Rev.2.52

2EXPLANATION OF THE PAGE MODE

2-1 General Description

This printer has two print modes:

The Standard Mode and the Page Mode.

In the standard mode, the printer prints or performs a paper feed whenever it receives printing or paper feed instructions. With the Page mode, received printing or paper feed instructions are all performed on the print region in the specified memory, but the printer does not act. Then, when the ESCFF or FF command is executed, the data is expanded to that print region to print it in batch. Specifically, when printing or line feeding data of “ABCDEF” <LF>, the status mode prints “ABCDEF” and executes one line feed. However, with the page mode, “ABCDEF” is written to the specified print region on the memory and one line is moved in the memory position to write the next print data. The printer enters the page mode using ESCL. Subsequently received commands are all processed using the page mode. By executing ESCFF, data that is received is printed in batch. By executing FF, data that is received is printed in batch, then the printer recovers to the standard mode. It is possible to return to the standard mode without printing print data in the page mode using ESCS. However, that print data is cleared.

<Transition of Stand Mode Page Mode>

ESC FF

ESC L

Standard Mode

 

Page Mode

Print

ESC S

Print FF

2-2 Settings Using Commands in Standard Mode and Page Mode

The values set using each command are common settings for both the standard mode and the page mode, but the settings of the following commands are set independently for each. → ESCSP,ESC2,ESC3,FSS

In the standard mode, the maximum number of dots are set for the X direction, but in the page mode, the Y direction (the X direction when not rotated) when rotated in either the 90 degree direction or the 270 degree di rection becomes larger. For details see the print region setting command (ESCW) for the page mode.

ESC/POS Command Specifications

19

Rev.2.52

2-3 Expanding Print Data to the Print Region

The following are performed when expanding print data to the print region.

(1)The print region is set by ESCW, ESCW sets the left side as the print region origin (X0, y0) at the point all operations for previous printings and paper feeds are completed received by the printer. The square shape formed by the two sides of the dx pitch in the X direction (horizontal direction) including the origin and the dy pitch in the Y direction (vertical direction) from the origin (x0, y0) is the print region (When ESCW is not set, the initial value is the print region).

(2)If the print region is set by ESCW and print direction is set by ESCT, the point A in the figure 2.3.1 is the ini tial value and print data expands to the print region when the printer receives the print data. In the case of characters, this starting point is the base line. Download bit images and bar codes are expanded for the top of the base line using the lower left point of the image data as the base line (Fig. 2.3.2 Point B) However, the HRI characters that come below the bar codes are printed below the base line. When trying to expand char acters that are taller than standard characters (double-tall characters) or download bit images, the portion that is beyond the height of standard characters is not printed.

(3)If print data is outside of the print region (including the space right of the character) before receiving the com mands (LF, ESCJ, etc.) accompanying a line feed, a line feed is automatically performed in the print region and the expanding position of the print data is moved one line and the next expansion position becomes the head of the line. The line feed amount is the line feed amount set by ESC2 and ESC3.

(4)The initial value of the line feed amount when using basic calculated pitch correction of 180 DPI is 4.23 mm (1/6 inch). This is equivalent to 33 dots. Therefore, when using expanded characters that are beyond the double-tall size in the vertical direction in the next line of print data, download bit images that are larger than two lines or bar codes that are taller than characters, the line amount will be insufficient and the upper dots of the characters in the next print data will overlap, so the amount of line feed must be increased. The line feed amount of the first line in the example below must be more than 28 dots (Fig. 3.12.4).

<Ex.> When printing a download bit image for 6 bytes in the vertical direction:

(Vertical dot count (8 x 6) – Starting line feed amount (20)) x Basic calculated pitch conversion in the vertical direction (360/180) = 56

Therefore, the line feed must be 56 pitches (28 dots) in excess. ESCW, xL, xH, yL, yH, dxL, dxH, dyL, dyH

ESCTn

 

ESC354

← Additional line feed amount

LF

 

GS/1

 

ESC2

← Returns to a line feed amount of 4.23 mm (1/6 inch)

Note:

The basic calculated pitch is 1/180 horizontally and 1/360 vertically with default, so a differences is

 

generated with the position specification according to the print direction. By setting the basic calculated

 

pitch in the vertical direction to 1/180 using a command (GSP), a difference will not be generated by print

 

direction.

STAR

The page print region setting, print data expansion position, line feed, position movement amount in the page

 

mode are affected by the basic calculated pitch correction.

 

For details, see the command details for GSP (basic calculated pitch specification) and ESCW (print region

 

setting command).

ESC/POS Command Specifications

20

Star Micronics ESC/POS User Manual

Rev.2.52

Fig. 2.3.1 Character Data Expansion Position

(x0, y 0)

A

Expansion

20 dot

Base Line

 

4 dot

 

Point A

Printing

(dx, dy)

Fig. 2.3.2 Character Data Expansion Position

 

 

 

 

 

Bar Code

 

 

 

 

 

 

Height h dot

 

 

 

 

 

(y x8) dots

 

 

 

 

40dot

 

 

 

 

 

A

 

 

 

Bar code

 

 

Double

 

Download

(GS k m)

 

20 dot

24 dot

 

 

high

 

 

 

 

Bit image

 

 

 

Expanded

 

 

 

 

 

(GS * x y)

 

 

 

 

 

 

Base Line

 

 

Bit image

 

 

 

 

 

 

 

4dot

8dot

 

 

 

 

B Point

B Point

 

B Point

B Point

Characters

 

 

 

 

 

HRIA

 

 

 

 

 

 

24 DOTS

 

ESC/POS Command Specifications

21

Rev.2.52

Fig. 2.3.3 Download Bit Image Expansion Position

(x0, y0)

Expansion Direction

 

20 dot

A Base Line

 

 

4 dot

Download Bit Image

 

 

 

(GS * x y)

 

 

(GS * x y)

 

 

20 dot

 

 

 

4 dot AAA

Base Line

 

Print Re

(dx, dy)

Point B

Point B

Point B

Point B

ESC/POS Command Specifications

22

Rev.2.52

3.COMMAND FUNCTION LIST

○:

Valid

(L):

Effective only at the top of the line

(S):

Only setting effective

(D):

Effective only when there is no data in print buffer

Standard Commands

 

 

 

Command

 

Page

GS P

Commands

Name

 

Class

 

Std Mode

 

 

 

 

 

 

Mode

Effect

 

 

 

Exe.

Set

 

 

 

 

 

 

 

HT

Horizontal tab

 

 

 

LF

Line feed

 

 

 

FF

Print and recover to page mode

 

 

Ignored

 

CR

Print and carriage return

 

 

 

CAN

Cancel print data in page mode

 

 

Ignored

 

DLE EOT

Real-time status transmission

 

 

 

DLE ENQ

Real-time request to printer

 

 

 

DLE DC4

Real-time output of specified pulse

 

 

 

ESC FF

Print data in page mode

 

 

Ignored

 

ESC SP

Set character right space amount

 

 

ESC !

Batch specify print mode

 

 

 

ESC $

Specify absolute position

 

 

ESC %

Specify/cancel download character set

 

 

 

ESC &

Define download characters

 

 

 

ESC *

Specify bit image mode

 

 

 

ESC -

Specify/cancels underline mode

 

 

 

ESC 2

Set default line spacing

 

 

 

ESC 3

Set line feed amount

 

 

ESC =

Select peripheral device

 

 

 

ESC ?

Delete download characters

 

 

 

ESC @

Initialize printer

 

 

ESC D

Set horizontal tab position

 

 

 

ESC E

Specify/cancel emphasized printing

 

 

 

ESC G

Specify/cancel double printing

 

 

 

ESC J

Print and Paper Feed

 

 

ESC L

Select page mode

 

 

(L)

Ignored

 

ESC M

Select character font

 

 

 

 

ESC R

Select international characters

 

 

 

ESC S

Select standard mode

 

 

Ignored

 

ESC T

Select character print direction in page mode

 

(S)

 

 

 

 

 

 

 

 

ESC V

Specify/cancel char. 90 deg. clockwise rotation

 

(S)

 

 

 

 

 

 

 

 

 

ESC W

Set print region in page mode

 

 

(S)

 

 

 

 

 

 

 

 

ESC \

Specify relative position

 

 

ESC a

Position alignment

 

 

(L)

(S)

 

ESC c 3

Select paper out sensor to enable at paper out signal

 

 

output

 

 

 

 

 

 

 

 

 

 

ESC c 4

Select paper out sensor to enable at printing stop

 

 

 

 

 

 

 

 

 

 

ESC c 5

Enable/disable panel switches

 

 

 

 

 

 

 

 

 

 

 

ESC d

Print and feed paper n lines

 

 

 

ESC p

Specify pulse

 

 

 

ESC t

Select character code table

 

 

 

ESC {

Specify/cancel upside-down characters

 

 

(L)

(S)

 

FS g 1

Write data to user NV memory

 

 

Invalid

 

FS g 2

Read user NV memory data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ESC/POS Command Specifications

23

 

 

 

 

 

 

 

 

 

Command

 

Rev.2.52

 

 

 

 

 

 

 

 

 

Std

Page

GS P

 

 

 

 

Commands

Name

Class

Mode

Mode

Effect

 

 

 

 

Exe.

Set.

 

 

 

 

 

 

 

 

FS p

Print NV bit image

 

Invalid

 

 

FS q

Define NV bit image

 

(L)

Invalid

 

 

GS !

Select character size

 

 

 

GS $

Specify absolute position for character vertical

 

Ignored

direction in page mode

 

 

 

 

 

 

 

 

 

 

GS *

Define download bit images

 

 

 

GS ( A

Test print

 

Ignored

 

 

GS ( K (fn=48)

Set print density

 

 

 

 

 

 

 

 

 

 

 

GS ( K (fn=49)

Set print speed

 

 

 

 

 

 

 

 

 

 

 

GS ( L

Specify raster graphics data

 

Ignored

 

 

 

 

 

 

 

 

 

 

GS 8 L

Specify raster graphics daa

 

Ignored

 

 

 

 

 

 

 

 

 

 

GS ( N

Select 2 color printing

 

 

 

GS ( k (cn=48, fn=65)

PDF417: Set number of positions

 

 

 

GS ( k (cn=48, fn=66)

PDF417: Set number of levels

 

 

 

GS ( k (cn=48, fn=67)

PDF417: Set module width

 

 

 

GS ( k (cn=48, fn=68)

PDF417: Set level height

 

 

 

GS ( k (cn=48, fn=69)

PDF417: Set error correction level

 

 

 

GS ( k (cn=48, fn=70)

PDF417: Set options

 

 

 

GS ( k (cn=48, fn=80)

PDF417: Store data in symbol saving region

 

 

 

GS ( k (cn=48, fn=81)

PDF417: Print symbol data of symbol saving region

 

 

 

GS ( k (cn=48, fn=82)

PDF417: Send size information of symbol data in

 

 

 

symbol saving region

 

 

 

 

 

 

 

 

 

 

 

 

GS ( k (cn=49, fn=65)

QR Code: Set model

 

 

 

GS ( k (cn=49, fn=67)

QR Code: Set module size

 

 

 

GS ( k (cn=49, fn=69)

QR Code: Set error correction level

 

 

 

GS ( k (cn=49, fn=80)

QR Code: Store data in symbol saving region

 

 

 

GS ( k (cn=49, fn=81)

QR Code: Print symbol data of symbol saving region

 

 

 

GS ( k (cn=49, fn=82)

QR Code: Send size information of symbol data in

 

 

 

symbol saving region

 

 

 

 

 

 

 

 

 

 

 

 

GS /

Print download bit images

 

(D)

 

 

GS :

Start/end macro definition

 

 

GS B

Specify/cancel white/black inverted printing

 

 

 

GS C 0

Set counter print mode

 

 

 

 

 

 

 

 

 

 

 

GS C 1

Set Counter Mode (A)

 

 

 

GS C 2

Set counter value

 

 

 

GS C ;

Set Counter Mode (B)

 

 

 

GS E

Set print speed

 

 

 

GS H

Select HRI character print position

 

 

 

GS I

Send Printer ID

 

 

 

GS L

Set left margin

 

(L)

(S)

GS P

Set basic calculation pitch

 

 

 

GS T

Move to top of line

 

Ignored

 

 

GS V

Cut paper

 

(L)

GS W

Set print region width

 

(L)

(S)

GS \

Specify relative position for character vertical

 

Ignored

direction in page mode

 

 

 

 

 

 

 

 

 

 

GS ^

Execute macro

 

 

 

GS b

Specify/cancel smoothing

 

 

 

GS c

Print counter

 

 

 

GS f

Select HRI character font

 

 

 

GS h

Set bar code height

 

 

 

GS k

Print bar code

 

(D)

 

 

GS r

Transmission of status

 

 

 

GS v 0

Print raster bit images

 

(D)

Invalid

 

 

GS w

Set bar code horizontal size

 

 

 

 

 

 

 

 

 

 

 

 

 

ESC/POS Command Specifications

24

Rev.2.52

Kanji Control Commands (For Japanese, Chinese and Taiwanese language specifications only)

 

 

Command

Std

Page

GS P

Commands

Name

Class

Mode

Mode

Effect

 

 

Exe.

Set.

FS !

Batch specify Chinese character print mode

 

 

FS &

Specify Chinese character mode

 

 

FS -

Specify/cancel Chinese character underline

 

 

FS .

Cancel Chinese character mode

 

 

FS 2

Define external character

 

 

FS C

Select Chinese character code type

 

 

FS S

Set Chinese character space amount

 

FS W

Specify/cancel double-tall, double wide Chinese characters

 

 

 

 

 

 

 

 

 

ESC/POS Black Mark Related Commands

 

 

Command

Std

Page

GS P

Commands

Name

Class

Mode

Mode

Effect

 

 

Exe.

Set.

FF

Print and recover to page mode + TOF and Cut

 

 

 

 

 

 

 

 

 

DLE ENQ

Real-time request to printer

 

 

GS FF

Move to BM detection position

 

 

GS ( F

Adjust BM detection position

 

GS ( M n=1

Save black mark adjustment amount

 

 

GS ( M n=2

Load black mark adjustment amount

 

 

GS ( M n=3

Set auto-load of black mark adjustment amount

 

 

 

 

 

 

 

 

 

GS <

Mechanically initialize printer

 

 

GS V

Cut paper

 

(L)

ESC/POS Command Specifications

25

 

 

 

 

 

 

 

 

 

Rev.2.52

 

 

 

 

 

 

 

 

 

STAR Original Commands

 

 

 

 

 

 

 

 

 

 

Command

Std

Page

GS P

Commands

 

Name

Class

 

Mode

Mode

Effect

 

 

 

 

 

Exe.

Set.

ESC GS =

 

Write data to a blank code page

 

 

ESC GS t

 

Select character code table

 

 

ESC GS +

 

Macro registration

 

ESC GS #m

 

Memory switch settings

 

ESC RS F

 

Select font

 

 

ESC RS C

 

Print mode selection

 

ESC RS L

 

Batch control logos

 

 

 

 

 

 

 

Send print-end counter, initialize

 

 

ESC GS ETX

 

Cancel print data feature

 

 

 

 

 

 

 

Set data time out

 

 

 

STAR Original Presenter Control Commands

 

 

 

 

 

 

 

 

 

 

Command

Std

Page

GS P

Commands

 

Name

Class

 

Mode

Mode

Effect

 

 

 

 

 

Exe.

Set.

ESC SYN 0

 

Execute presenter paper recovery

 

 

ESC SYN 1

 

Set presenter paper recovery time

 

 

ESC SYN 3

 

Get presenter counter

 

 

ESC SYN 4

 

Initialize presenter counter

 

 

ESC GS SUB DC1

 

Specify snout opeation mode

 

 

ESC GS SUB DC2

 

Set snout LED ON/OFF time

 

 

ESC GS SUB DC3

 

Ouptut snout LED

 

 

STAR Original Mark Commands

 

 

 

 

 

 

 

 

 

 

Command

Std

Page

GS P

Commands

 

Name

Class

 

Mode

Mode

Effect

 

 

 

 

 

Exe.

Set.

ESC GS * 0

 

Print mark

 

(D)

Ignored

 

ESC GS *1

 

Set mark height and line feed

 

 

ESC GS *2

 

Set mark color and horizontal width

 

 

ESC GS *W

 

Register mark format to non-volatile memory

 

ESC GS *C

 

Initialize mark format in the non-volatile memory

 

 

 

 

 

 

 

 

 

 

 

ESC/POS Command Specifications

26

 

 

 

 

 

 

 

 

Rev.2.52

 

 

 

 

 

 

 

 

STAR Original Auto Logo Commands

 

 

 

 

 

 

 

 

 

Command

Std

Page

GS P

Commands

Name

Class

Mode

Mode

Effect

 

 

 

 

Exe.

Set.

ESC GS /W

Register Auto Logo setting to non-volatile memory

 

ESC GS /C

Initialize Auto Logo setting to non-volatile memory

 

ESC GS /1

Auto Logo function on/off setting

 

 

ESC GS /2

Set command character

 

 

ESC GS /3

Set user macro 1

 

 

ESC GS /4

Set user macro 2

 

 

ESC GS /5

Set command character switching method

 

 

ESC GS /6

Set partial cut before Auto Logo printing

 

 

STAR Original Buzzer Commands

 

 

 

 

 

 

 

 

 

Command

Std

Page

GS P

Commands

Name

Class

Mode

Mode

Effect

 

 

 

 

Exe.

Set.

ESCGSBEL

Ring buzzer

 

 

 

 

 

 

 

 

 

ESCGSEMDC1

External buzzer drive pulse condition settings

 

 

ESCGSEMDC2

External buzzer drive execution

 

 

STAR Original PDF417 Commands

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

Std

Page

GS P

Commands

Name

Class

Mode

Mode

Effect

 

 

 

 

Exe.

Set.

ESCGSxS0

Set PDF417 bar code size

 

 

ESCGSxS1

Set PDF417 ECC (security level)

 

 

ESCGSxS2

Set PDF417 module X direction size

 

 

ESCGSxS3

Set PDF417 module aspect ratio

 

 

ESCGSxD

Set PDF417 bar code data

 

 

ESCGSxP

Print PDF417 bar code

 

 

ESCGSxI

Get PDF417 bar code expansion information

 

 

ESC/POS Command Specifications

27

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Rev.2.52

 

 

 

 

 

 

 

 

 

 

 

 

 

 

STAR Original Print Starting Trigger Control Commands

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

Std

Page

 

GS P

Commands

Name

Class

 

Mode

Mode

 

Effect

 

 

 

 

 

 

 

Exe.

Set.

 

ESCGSg0

Print starting trigger

 

 

 

 

 

 

ESCGSg1

Set print starting timer

 

 

 

 

 

 

STAR Original QR Code Commands

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

Std

Page

 

GS P

Commands

 

Name

Class

 

 

Mode

Mode

 

Effect

 

 

 

 

 

 

 

Exe.

Set.

 

ESCGSyS0

 

Set QR code model

 

 

 

 

 

ESCGSyS1

 

Set QR code mistake correction level

 

 

 

 

 

ESCGSyS2

 

Set QR code cell size

 

 

 

 

 

ESCGSyD1

 

Set QR code data (auto)

 

 

 

 

 

ESCGSyD2

 

Set QR code data (manual)

 

 

 

 

 

ESCGSyP

 

Print QR code

 

 

 

 

 

ESCGSyI

 

Get QR code expansion information

 

 

 

 

 

STAR Original Page Function Commands

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

Std

 

Page

 

GS P

 

Commands

 

 

Name

 

Class

 

 

 

 

 

 

 

Mode

 

Mode

 

Effect

 

 

 

 

 

 

 

 

Exe.

 

Set.

 

 

 

 

ESCGSh0

 

Invert 180˚

 

 

 

 

 

 

 

 

 

ESCGSh1

 

Water Mark

 

 

 

 

 

 

 

 

Star Original Reduced Printing Function Command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

Std

 

Page

 

GS P

 

Commands

 

 

Name

 

Class

 

 

 

 

 

 

 

Mode

 

Mode

 

Effect

 

 

 

 

 

 

 

 

Exe.

 

Set.

 

 

 

 

ESCGSc

 

Reduced printing

 

 

 

 

 

 

 

 

 

ESC/POS Command Specifications

28

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Rev.2.52

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Star Original Text Search Commands

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

Std

 

Page

 

GS P

Commands

 

Name

 

 

Class

 

 

 

 

 

 

 

 

 

Mode

 

Mode

 

Effect

 

 

 

 

 

 

Exe.

 

 

Set.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 48)

 

Enable and disables text search

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 49)

 

Set the number of times to run the text search macro

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 50)

 

Set to print the string that matches in the text search

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 64)

 

Define the text search string

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 65)

 

Define the text search macro

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 66)

 

Define the timing of the text search macro execution

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 80)

 

Register text search settings and definitions in the non-volatile memory

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 81)

 

Initialize text search settings and definitions

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 96)

 

Print the text search settings and definitions

 

 

 

 

 

 

 

 

 

ESC GS ) B (fn = 97)

 

Run the text search macro

 

 

 

 

 

 

 

 

 

Star Original Printer information transmission Command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

Std

 

Page

 

GS P

Commands

 

Name

 

 

Class

 

 

 

 

 

 

 

Mode

 

Mode

 

Effect

 

 

 

 

 

 

Exe.

 

Set.

 

 

 

ESCGS ) I(fn=48)

 

Send the all kind of multibyte fonts

 

 

 

 

 

 

 

 

 

Star Original Individual Logo Command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

Std

 

Page

 

GS P

Commands

 

Name

 

 

Class

 

 

 

 

 

 

 

 

 

Mode

 

Mode

 

Effect

 

 

 

 

 

 

Exe.

 

 

Set.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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)

 

Send all key code of the registered NV graphics

 

 

 

 

 

 

 

 

 

Star Original Audio Commands

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

Std

 

Page

 

GS P

Commands

Name

 

 

Class

 

 

 

 

 

 

 

 

Mode

 

Mode

 

Effect

 

 

 

 

 

 

Exe.

 

 

 

Set.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ESC GS s O

Playback NVAudio

 

 

 

 

 

 

 

 

 

ESC GS s P

Stop NVAudio

 

 

 

 

 

 

 

 

 

ESC GS s R

Playback received audio

 

 

 

 

 

 

 

 

 

ESC GS s I

Register automatic audio setting information

 

 

 

 

 

 

 

 

 

ESC GS s U

Register user area NV audio data

 

 

 

 

 

 

 

 

 

ESC GS s T

Batch Playback NVAudio

 

 

 

 

 

 

 

 

 

Star Original Hold print control Command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

Std

 

Page

 

GS P

Commands

 

Name

 

 

Class

 

 

 

 

 

 

 

 

 

Mode

 

Mode

 

Effect

 

 

 

 

 

 

Exe.

 

 

Set.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ESC SYN DC3

 

Hold print control settings

 

 

 

 

 

 

 

 

 

ESC SYN DC4

 

Hold print status control settings

 

 

 

 

 

 

 

 

 

ESC GS ) s

 

Send paper hold sensor installation data.

 

 

 

 

 

 

 

 

 

ESC/POS Command Specifications

29

Rev.2.52

4. COMMAND DETAILS

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

• Print buffer

The buffer for storing image data for printing is called the print buffer.

• Print buffer full

The state in which the buffer has no more space available is called print buffer full. When the print buffer is full in standard mode, data in the print buffer is printed and a line feed is performed when new print data is processed. This is the same as a LF. When the print 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.

1.There is currently no print data in the print buffer.

2.There is no skipped portion using HT

3.A print position has not been specified using ESC$, and ESC \

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

1.Normal direction characters FONT-A/FONT-B (Standard Mode/Page Mode)

 

24 Dots

 

Ay

 

20 Dots

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2.Rotated characters FONT-A (Standard Mode)

<![if ! IE]>

<![endif]>y A

10 Dots (11 dots when using enhanced printing)

< Base Line

3.Rotated characters FONT-B (Standard Mod

<![if ! IE]>

<![endif]>A

<![if ! IE]>

<![endif]>y

7 Dots (8 dots when using enhanced printing)

<---- Base Line

ESC/POS Command Specifications

30

Loading...
+ 347 hidden pages