Wincor Nixdorf P1200 Programmer's Guide

Add to my manuals
227 Pages

advertisement

Wincor Nixdorf P1200 Programmer's Guide | Manualzz
P1200 Standard POS Printer
Programming Manual
01750353820B
PROGRAMMING GUIDE
Contents
General...................................................................................................................................... 1
1.
Printer basic functions ..................................................................................................... 1
1.1
General.............................................................................................................................. 1
1.2
Internal Buffers ................................................................................................................... 2
1.2.1
RAM (Total Size: IRAM 1.5MB, DRAM 8MB) .................................................................... 2
1.2.2
Flash Memory (Total Size: 8MB) ..................................................................................... 2
2.
Summary of Option Interface .......................................................................................... 3
2.1
RS232C Interface................................................................................................................ 3
2.2
Ethernet Interface................................................................................................................ 3
2.2.1
TCP Socket ................................................................................................................. 3
2.2.2
UDP Socket ................................................................................................................. 3
2.2.3
SNMP ......................................................................................................................... 3
2.2.4
DHCP ......................................................................................................................... 4
2.2.5
HTTP .......................................................................................................................... 4
Emulation ................................................................................................................................. 5
3.
Command Descriptions ................................................................................................. 13
3.1
Printer Function Command ..................................................................................................13
3.1.1
Clear Printer ...............................................................................................................13
3.1.2
Perform Full Knife Cut ..................................................................................................13
3.1.3
Perform Partial Knife Cut ..............................................................................................13
3.1.4
Generate Tone............................................................................................................13
3.1.5
Initialize Printer............................................................................................................13
3.1.6
Select Sensors to Stop Printing......................................................................................13
3.1.7
Enable or Disable Feed Button ......................................................................................14
3.1.8
Generate Pulse to Open Cash Drawer ............................................................................14
3.1.9
Select Cut Mode and Cut Paper.....................................................................................14
3.1.10 Print Configuration Form ...............................................................................................15
3.1.11 Receipt shooting flush ..................................................................................................15
3.1.12 Play melody ................................................................................................................15
3.1.13 Switch the printer into Sleep-Mode .................................................................................17
3.2
Vertical Positioning and Print Commands ...............................................................................18
3.2.1
Print and Feed Paper One Line......................................................................................18
3.2.2
Print and Carriage Return .............................................................................................18
3.2.3
Feed n Print Lines........................................................................................................18
ii
PROGRAMMING GUIDE
3.2.4
Feed n Dot Rows.........................................................................................................18
3.2.5
Add n Extra Dot Rows ..................................................................................................18
3.2.6
Print ..........................................................................................................................19
3.2.7
Set Line Spacing to 1/6 Inch..........................................................................................19
3.2.8
Set Line Spacing .........................................................................................................19
3.2.9
Print and Feed Paper ...................................................................................................19
3.2.10 Print and Feed n Lines .................................................................................................19
3.2.11 Set Horizontal and Vertical Minimum Motion Units ............................................................20
3.3
Horizontal Positioning Commands.........................................................................................21
3.3.1
Horizontal Tab.............................................................................................................21
3.3.2
Set Column.................................................................................................................21
3.3.3
Set Absolute Starting Position........................................................................................21
3.3.4
Set Horizontal Tabs .....................................................................................................21
3.3.5
Set Relative Print Position.............................................................................................21
3.3.6
Select Justification.......................................................................................................22
3.3.7
Set Left Margin............................................................................................................22
3.3.8
Set Print Area Width.....................................................................................................22
3.4
Print Characteristic Commands ............................................................................................24
3.4.1
Select Double-Wide Characters .....................................................................................24
3.4.2
Select Single-Wide Characters ......................................................................................24
3.4.3
Select 90 Degrees Counter-Clockwise Rotated Print .........................................................24
3.4.4
Select Pitch (Column Width)..........................................................................................24
3.4.5
Set Character Right-Side Spacing..................................................................................24
3.4.6
Select Print Modes 1......................................................................................................25
3.4.7
Select or Cancel Font Smoothing ...................................................................................25
3.4.8
Select or Cancel User-defined Character Set ...................................................................25
3.4.9
Define User-defined Characters .....................................................................................26
3.4.10 Select or Cancel Underline Mode ...................................................................................27
3.4.11 Copy Character Set from ROM to RAM ...........................................................................27
3.4.12 Cancel User-defined Characters ....................................................................................27
3.4.13 Select or Cancel Emphasized Mode ...............................................................................27
3.4.14 Select Double Strike.....................................................................................................27
3.4.15 Select or Cancel Italic Print ...........................................................................................28
3.4.16 Select International Character Set (DN Emulation)............................................................28
3.4.17 Select International Character Set.(ESCPOS emulation)....................................................29
3.4.18 Select character code table(ESCPOS emulation) .............................................................30
3.4.19 Select or Cancel Unicode(UTF-16) Mode ........................................................................31
3.4.20 Select or Cancel 90 Degrees Clockwise Rotated Print .......................................................31
3.4.21 Select Print Color.........................................................................................................31
3.4.22 Select or Cancel Upside & Down Printing Mode ...............................................................32
iii
PROGRAMMING GUIDE
3.4.23 Select Character Size...................................................................................................32
3.4.24 Select or Cancel White/Black Reverse Printing Mode........................................................33
3.4.25 Selects Superscript or Subscript Modes ..........................................................................33
3.5
Graphics Commands ..........................................................................................................34
3.5.1
Print Raster Graphics ...................................................................................................34
3.5.2
Print Raster Color Graphics...........................................................................................34
3.5.3
Define Bitmap File as Logo ...........................................................................................34
3.5.4
Select Bit Image Mode .................................................................................................35
3.5.5
Select bit-image mode - Line Graphics............................................................................36
3.5.6
Turn on/off TIFF compression........................................................................................37
3.5.7
Print Advanced Raster Graphics ....................................................................................37
3.5.8
Select Single Density Graphics ......................................................................................38
3.5.9
Select Double-Density Graphics.....................................................................................38
3.5.10 Print raster bit image ....................................................................................................38
3.5.11 Select the Current Logo................................................................................................38
3.5.12 Define Bit Image as Logo..............................................................................................40
3.5.13 Print Current Logo .......................................................................................................41
3.5.14 Print Logo...................................................................................................................41
3.5.15 Define Logo in Flash Memory ........................................................................................41
3.5.16 Convert 6 Dots/mm Bitmap to 8 Dots/mm........................................................................42
3.5.17 Transmit entire capacity of User-defined logo in Flash Memory...........................................42
3.5.18 Transmit Remaining Size for User-defined Logo Area in Flash Memory ...............................42
3.5.19 Transmit Remaining Size for User-defined Logo Area in RAM ............................................43
3.5.20 Transmit the key code for User-defined Logo in Flash Memory ...........................................43
3.5.21 Delete all Logo in Flash Memory ....................................................................................44
3.5.22 Delete User-defined Logo in Flash Memory .....................................................................44
3.5.23 Define Logo in Flash Memory by the key code .................................................................44
3.5.24 Print User-defined Logo in Flash Memory ........................................................................46
3.5.25 Transmit the key code for User-defined Logo in RAM ........................................................46
3.5.26 Delete all User-defined Logo in RAM ..............................................................................47
3.5.27 Delete User-defined Logo in RAM ..................................................................................48
3.5.28 Define Logo in RAM by the key code ..............................................................................48
3.5.29 Print User-defined Logo in RAM .....................................................................................49
3.5.30 Enable Watermark printing............................................................................................49
3.5.31 Transmits set values for Watermark................................................................................51
3.5.32 Transmit Remaining Size for User-defined Logo Area .......................................................51
3.5.33 Store the graphics data in the print buffer ........................................................................52
3.5.34 Print the graphics data in the print buffer .........................................................................52
3.5.35 Download logo image...................................................................................................53
3.5.36 Cancel set values for top/bottom logo printing ..................................................................54
iv
PROGRAMMING GUIDE
3.5.37 Transmits set values for top/bottom logo printing ..............................................................54
3.5.38 Set top logo printing .....................................................................................................56
3.5.39 Set bottom logo printing................................................................................................56
3.5.40 Make extended settings for top/bottom logo printing..........................................................57
3.5.41 Enable/disable top/bottom logo printing...........................................................................57
3.5.42 Define Windows BMP graphics data in Flash Memory .......................................................58
3.5.43 Define Windows BMP graphics data in RAM ....................................................................58
3.6
Status Commands ..............................................................................................................60
3.6.1
Transmit Peripheral Device Status .................................................................................61
3.6.2
Transmit Printer Status .................................................................................................61
3.6.3
Transmit Printer ID.......................................................................................................61
3.6.4
Transmit Printer ID, Remote Diagnostics Extension ..........................................................64
3.6.5
Enable/disable Automatic Status Back (ASB)...................................................................65
3.6.6
Initialize maintenance counter........................................................................................67
3.6.7
Transmit maintenance counter.......................................................................................69
3.6.8
Transmit Status ...........................................................................................................70
3.6.9
Send Printer Firmware Version ......................................................................................71
3.6.10 Real time commands disabled .......................................................................................71
3.6.11 Execute Head Failure Detection.....................................................................................72
3.6.12 Get Detail of Head Failure Detection...............................................................................72
3.6.13 Set control point ..........................................................................................................72
3.7
Real Time Commands.........................................................................................................74
3.7.1
Real Time Status Transmission .....................................................................................74
3.7.2
Real Time Request to Printer.........................................................................................76
3.7.3
Enable/disable real-time command.................................................................................76
3.7.4
Generate pulse in real-time ...........................................................................................77
3.7.5
Execute power-off sequence .........................................................................................77
3.7.6
Control Buzzer (Internal buzzer).....................................................................................78
3.7.7
Select peripheral device................................................................................................78
3.7.8
Clear buffer(s) .............................................................................................................78
3.7.9
Extended Real-Time Status Transmission .......................................................................79
3.7.10 Real Time Printer Status Transmission ...........................................................................82
3.7.11 LED Control Request ...................................................................................................82
3.7.12 Real-Time Printer Maintenance......................................................................................83
3.8
Bar Code Commands..........................................................................................................85
3.8.1
Select Printing Position of HRI Characters .......................................................................85
3.8.2
Select Pitch for HRI Characters .....................................................................................85
3.8.3
Select Bar Code Height ................................................................................................85
3.8.4
Print Bar Code ............................................................................................................85
3.8.5
PDF417: Set the row height ..........................................................................................91
v
PROGRAMMING GUIDE
3.8.6
PDF417: Set the error correction level ............................................................................91
3.8.7
PDF417: Select the options ...........................................................................................92
3.8.8
PDF417: Store the data in the symbol storage area ..........................................................92
3.8.9
PDF417: Print the symbol data in the symbol storage area.................................................92
3.8.10 PDF417: Transmit the size information of the symbol data in the symbol storage area ...........93
3.8.11 QR Code: Select the model ...........................................................................................93
3.8.12 QR Code: Set the size of module ...................................................................................93
3.8.13 QR Code: Select the error correction level .......................................................................94
3.8.14 QR Code: Select encode modes. ...................................................................................94
3.8.15 QR Code: Store the data in the symbol storage area.........................................................95
3.8.16 QR Code: Print the symbol data in the symbol storage area ...............................................95
3.8.17 QR Code: Transmit the size information of the symbol data in the symbol storage area ..........95
3.8.18 2-dimensional GS1 DataBar: Set the module width ...........................................................96
3.8.19 2-dimensional GS1 DataBar: Set the maximum width of GS1 DataBar Expanded Stacked......96
3.8.20 2-dimensional GS1 DataBar: Store data in the symbol storage area ....................................97
3.8.21 2-dimensional GS1 DataBar: Print data in the symbol storage area .....................................97
3.8.22 2-dimensional GS1 DataBar: Transmit size information of the symbol data in the symbol storage
area
98
3.8.23 Select PDF 417 parameters ..........................................................................................98
3.8.24 DataMatrix: Set the symbol type, number of columns, number of rows ............................... 100
3.8.25 DataMatrix: Set the size of the module.......................................................................... 102
3.8.26 DataMatrix: Store the data in the symbol storage area..................................................... 102
3.8.27 DataMatrix: Print the symbol data in the symbol storage area........................................... 103
3.8.28 DataMatrix: Transmit the size information of the symbol data in the symbol storage area ...... 104
3.9
Page Mode Commands ..................................................................................................... 105
3.9.1
Print and Return to Standard Mode .............................................................................. 105
3.9.2
Print and feed marked paper to print starting position ...................................................... 105
3.9.3
Cancel Print Data in Page Mode .................................................................................. 105
3.9.4
Print Data in Page Mode............................................................................................. 106
3.9.5
Select Page Mode ..................................................................................................... 106
3.9.6
Select Standard Mode................................................................................................ 106
3.9.7
Select Print Direction in Page Mode.............................................................................. 106
3.9.8
Set Printing Area in Page Mode ................................................................................... 107
3.9.9
Set Absolute Vertical Print Position in Page Mode .......................................................... 107
3.9.10 Set Relative Vertical Print Position in Page Mode ........................................................... 108
3.10 Macro Commands ............................................................................................................ 109
3.10.1 Start and Terminate Macro Definition............................................................................ 109
3.10.2 Execute Macro .......................................................................................................... 109
3.11 User Data Storage Commands ........................................................................................... 110
3.11.1 Write User Defined Data ............................................................................................. 110
vi
PROGRAMMING GUIDE
3.11.2 Read User Defined Data............................................................................................. 110
3.11.3 Select Memory Type for User Defined Data ................................................................... 110
3.11.4 Flash Memory Allocation for User-defined Storage Area .................................................. 111
3.11.5 Erase User-defined storage area in Flash Memory.......................................................... 111
3.11.6 Printer Setting Change ............................................................................................... 113
3.11.7 Read Printer Setting................................................................................................... 120
3.11.8 LED Configuration ..................................................................................................... 120
3.11.9 Read LED Configuration ............................................................................................. 121
3.11.10 Change into the user setting mode ............................................................................... 121
3.11.11 End the user setting mode session............................................................................... 122
3.11.12 Changes the memory switch........................................................................................ 122
3.11.13 Transmits the host the value for the memory switch ........................................................ 124
3.11.14 Set the customized setting values ................................................................................ 124
3.11.15 Transmit the customized setting values ......................................................................... 131
3.11.16 Set the configuration item for the serial interface............................................................. 133
3.11.17 Transmit the configuration item for the serial interface ..................................................... 134
3.11.18 Set Conditions for USB communication......................................................................... 134
3.11.19 Transmit conditions for USB communication .................................................................. 134
3.11.20 Set Serial number...................................................................................................... 136
3.11.21 Set Production date ................................................................................................... 136
3.11.22 Sets communication condition of Ethernet interface. ....................................................... 136
3.11.23 Transmit communication condition of Ethernet interface................................................... 137
3.11.24 Set adjustment value(s). ............................................................................................. 138
3.11.25 Set Paper type .......................................................................................................... 139
3.11.26 Text strike-through mode ............................................................................................ 139
3.11.27 Download paper type description ................................................................................. 140
3.11.28 Return paper type description...................................................................................... 140
3.11.29 Set temporary max target speed .................................................................................. 142
3.12 Asian character command ................................................................................................. 143
3.12.1 Select print modes for Asian characters ........................................................................ 143
3.12.2 Select Asian character mode....................................................................................... 143
3.12.3 Turn underline mode ON/OFF in Asian mode................................................................. 143
3.12.4 Cancel Asian character mode...................................................................................... 143
3.12.5 Define user-defined Asian characters ........................................................................... 144
3.12.6 Select Asian character code system ............................................................................. 144
3.12.7 Set Asian character spacing........................................................................................ 145
3.12.8 Set quadruple mode ON/OFF in Asian mode ................................................................. 145
3.13 IPL(Initial Program Loader) Command................................................................................. 146
3.13.1 Switch to Flash Download Mode .................................................................................. 146
3.13.2 Select Flash Memory Sector to Download ..................................................................... 146
vii
PROGRAMMING GUIDE
3.13.3 Get Firmware Sector CRC .......................................................................................... 146
3.13.4 Return IPL Firmware CRC .......................................................................................... 146
3.13.5 Erase all Flash Memory .............................................................................................. 147
3.13.6 Return Main Firmware CRC ........................................................................................ 147
3.13.7 Erase Selected Flash Sector ....................................................................................... 147
3.13.8 Download to Active Flash Sector.................................................................................. 147
3.13.9 Reboot the Printer...................................................................................................... 147
3.14 Flash Download Commands in Main Firmware...................................................................... 149
3.14.1 Flash Firmware ......................................................................................................... 149
3.14.2 Activate Firmware in the alternative area ....................................................................... 149
3.15 Diagnostic Commands ...................................................................................................... 151
3.15.1 Execute test print....................................................................................................... 151
3.15.2 Dot check pattern test ................................................................................................ 151
3.15.3 Sensor Calibration ..................................................................................................... 152
3.15.4 Retrieve Detail Log .................................................................................................... 153
4.
Appendix 1 Character sets .......................................................................................... 154
4.1
Character code table page 0 (PC437 : USA,Standard Europe) ................................................ 154
4.2
Character code table Page 1 (PC850: Multilingual Latin I):...................................................... 154
4.3
Character code table Page 2 (PC852: Latin II): ..................................................................... 155
4.4
Character code table Page 3 (PC860: Portuguese):............................................................... 155
4.5
Character code table Page 4 (PC863: Canadian French): ....................................................... 156
4.6
Character code table Page 5 (PC865: Nordic):...................................................................... 156
4.7
Character code table Page 6 (PC858: Multilingual I + Euro): ................................................... 157
4.8
Character code table Page 7 (PC866: Russian): ................................................................... 157
4.9
Character code table Page 8 (WPC1252: Latin I):.................................................................. 158
4.10 Character code table Page 9 (PC862: Hebrew): .................................................................... 158
4.11 Character code table Page 10 (PC737: Greek): .................................................................... 159
4.12 Character code table Page 11 (PC874: Thai): ....................................................................... 159
4.13 Character code table Page 12 (PC857: Turkish): ................................................................... 160
4.14 Character code table Page 13 (WPC1251: Cyrillic): ............................................................... 160
4.15 Character code table Page 14 (WPC1255: Hebrew):.............................................................. 161
4.16 Character code table Page 15 ((KZ_1048: Kazakh): .............................................................. 161
4.17 Character code table Page 16 (WPC1254: Turkish): .............................................................. 162
4.18 Character code table Page 17 (WPC1250: Central Europe): ................................................... 162
4.19 Character code table Page 18 (WPC28591: Latin 1): ............................................................. 163
viii
PROGRAMMING GUIDE
4.20 Character code table Page 19 (WPC28592: Latin 2): ............................................................. 163
4.21 Character code table Page 20 (WPC28599: Turkish): ............................................................ 164
4.22 Character code table Page 21 (WPC28605: Latin 9): ............................................................. 164
4.23 Character code table Page 22 (PC864: Arabic): .................................................................... 165
4.24 Character code table Page 23 (PC720: Arabic): .................................................................... 165
4.25 Character code table Page 24 (WPC1256: Arabic): ............................................................... 166
4.26 Character code table Page 25 (WPC28596: Arabic):.............................................................. 166
4.27 Character code table Page 26 (KATAKANA: Asia): ................................................................ 167
4.28 Character code table Page 27 (PC775: Baltic): ..................................................................... 167
4.29 Character code table Page 28 (WPC1257: Baltic):................................................................. 168
4.30 Character code table Page 29 (WPC28594: Baltic): ............................................................... 168
4.31 Character code table Page 30 (WPC1253: Greek): ................................................................ 169
5.
Appendix 2 Printable area ........................................................................................... 170
6.
Appendix 3 Eco function.............................................................................................. 171
6.1
General........................................................................................................................... 171
6.2
Paper reduction................................................................................................................ 171
6.2.1
Remove Upper Space ................................................................................................ 171
6.2.2
Remove Lower Space ................................................................................................ 172
6.2.3
Line Space Reduction ................................................................................................ 172
6.2.4
Line Feed Reduction .................................................................................................. 173
6.2.5
Barcode Height Reduction .......................................................................................... 173
6.2.6
Registered Logo Removal........................................................................................... 174
6.2.7
Force Single High Font ............................................................................................... 174
6.2.8
Remove lines containing only spaces ........................................................................... 174
6.3
Power reduction ............................................................................................................... 175
6.3.1
Bold Font Removal .................................................................................................... 175
6.3.2
Force Single Wide Font .............................................................................................. 175
6.3.3
No White/Black Reverse Printing.................................................................................. 176
6.3.4
Stand-by Mode.......................................................................................................... 176
6.3.5
Power Off Mode ........................................................................................................ 176
6.3.6
Speed Reduction....................................................................................................... 176
6.3.7
Density Reduction...................................................................................................... 176
6.4
7.
7.1
Affected commands .......................................................................................................... 177
Appendix 4 Thai font support ...................................................................................... 178
Outline............................................................................................................................ 178
ix
PROGRAMMING GUIDE
7.2
Thai character configuration............................................................................................... 178
7.3
Thai character data procedure............................................................................................ 179
7.4
The notes for this function.................................................................................................. 179
8.
Appendix 5 Paper low detection ................................................................................. 181
9.
Appendix 6 Barcode Information................................................................................. 182
9.1
GS k Print Barcode........................................................................................................... 182
9.2
GS ( k Print 2-dimensional Barcode..................................................................................... 192
Diagnostics .......................................................................................................................... 194
10.
Offline Diagnostic ......................................................................................................... 194
10.1 Offline Printer Configuration ............................................................................................... 194
10.2 P1200 Diagnostic Functions............................................................................................... 207
10.2.1 Selftest Printout ......................................................................................................... 207
10.2.2 Sensor Test .............................................................................................................. 210
10.2.3 Black Mark test.......................................................................................................... 210
Printer Errors ....................................................................................................................... 211
11.
Error Detection ............................................................................................................. 211
12.
LED Indication.............................................................................................................. 213
11.1 LED Pattern in Auto Mode ................................................................................................. 213
11.2 LED Pattern in User Mode ................................................................................................. 214
Ethernet ................................................................................................................................ 215
13.
Web setting page ......................................................................................................... 215
x
PROGRAMMING GUIDE
General
1. Printer basic functions
1.1
General
Resolution
Interface (communicate with a
system)
Emulation Mode
Character set
Receipt Printing Speed
Character attribute
Character Cell Size
- SBCS Font A
- SBCS Font B
- DBCS
Column Width
- SBCS Font A
- SBCS Font B
- DBCS
Printable Width
- SBCS Font A
- SBCS Font B
- DBCS
- Graphics
Print line height
1
203.2 dpi x 203.2 dpi (8 dots/mm)
USB Type-B 2.0 High Speed / Full Speed
Printer class
DN POS receipt
ESC/POS
SBCS
CP437 (DOS
USA),CP720(Arabic),CP737(Greek),CP775(Baltic), CP850
(DOS Latin 1), CP852 (DOS Latin 2), CP857(Turkish), CP858
(DOS Latin 1 + Euro),
CP860 (DOS Portuguese), CP862 (DOS Israel),
CP863 (DOS Fench Canadian), CP864 (DOS Arabic),
CP865 (DOS Nordic), CP866 (DOS Russian),
CP874 (ISO Thai),CP1250(Windows Central Europe) ,
CP1251(Windows Cyrillic),CP1252 (Windows Latin 1),
CP1253(Windows Greek),CP1254(Windows
Turkish),CP1255(Windows Hebrew), CP1256 (Windows
Arabic),CP1257(Windows Latin),CP28591(ISO Latin1)
CP28592(ISO Latin 2),CP28594(ISO Baltic),CP28596(ISO
Arabic),CP28599(ISO Turkish),CP28605(ISO Latin9),
Katakana, KZ1048(Kazakh)
DBCS
932 (Japanese), 936 (Simplified Chinese), 949 (Korean),
950 (Traditional Chinese), GB180301 (Chinese),
Unicode support (UTF-16)
Maximum 14 IPS (Inch Per Second) / Minimum 1.5 IPS
Printing speed is defined according to print density.
Double width , Double high ,rotate , under line, scalable, bold,
superscript, italic, subscript, inverse image characters
13(H) X 24(V) dots
10(H) X 24(V) dots
24(H) X 24(V) dots
80mm Paper width
58mm Paper width
44 columns
31 columns
57 columns
40 columns
24 columns
17 columns
80mm Paper width
58mm Paper width
572 dots (71.57 mm)
403 dots (50.37 mm)
570 dots (71.25 mm)
400 dots (50.00 mm)
576 dots (72.07 mm)
408 dots (51.00 mm)
576 dots (72.07 mm)
408 dots (51.00 mm)
Minimum 24 dots (8.46 LPI / Standard font mode)
CP GB18030 (Chinese font):
Double Byte :
80<First Byte<FF, 40<Second Byte <FF.
Four Byte:
If First Byte = 81, Second byte =39, EE<= Third Byte <= FE, 30 <=Fourth Byte <= 39.
If First Byte = 82, 30 <= Second byte <=35, 81<= Third Byte <= FE, 30 <= Fourth Byte <= 39.
1
PROGRAMMING GUIDE
1.2
Internal Buffers
1.2.1
RAM (Total Size: IRAM 1.5MB, DRAM 8MB)
Interface Receive Data Buffer
64 KB
Interface Send Data Buffer
1 KB
User-defined Logo Buffer
256 KB
Macro Buffer
2 KB
1.2.2
Flash Memory (Total Size: 8MB)
User-defined Logo area
256 KB
User-defined Character area
64 KB
User-defined Data area
64 KB
Macro area
2 KB
2
PROGRAMMING GUIDE
2. Summary of Option Interface
The printer initially has USB type-B interface as the primary interface.
It additionally allows an operator to install either RS232C interface card or Ethernet interface card as an option.
In order to make the option interface card available, the USB interface cable has to be disconnected.
It is because the option interface card is not activated if USB connection is established with a system. If USB
interface is disconnected in this condition, the printer is automatically reset and the option interface card
becomes available. In addition to this, if USB type-B is connected while the option interface is communicating
with a system, the printer is reset and its control is changed to USB.
2.1
RS232C Interface
Protocol
Data Length
Stop Bit
Parity
Baud Rate
2.2
DTR / DSR, XON / XOFF
8, 7 bits
1, 2 bits
Non, Even, Odd
9600, 19200, 38400, 57600, 115200 bps
Ethernet Interface
Application Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
TCP Socket, UDP Socket, SNMP, DHCP, HTTP
TCP, UDP
IP, ICMP, ARP
CSMA/CD
10BASE-t, 100BASE-TX (IEEE802.3 Conforming)
Auto negotiation 10/100Mbps Full/Half Duplex
2.2.1
TCP Socket
It transfers printing commands and data, several status commands and those responses by direct
socket communications.
Port number
9100 (Default)
Maximum simultaneous sessions
1
Maximum simultaneous connections
6
Time out
120 seconds (Default)
2.2.2
UDP Socket
It transfers real time commands and those responses.
Port number
3000 (Default)
2.2.3
SNMP
SNMP is used by SNMP manager to acquire the printer information and status from SNMP agent
(Printer).
SNMP version
SNMP v1 (RFC1157) compliant
Transport protocol
UDP/IP
MIB support
Part of MIB-II (RFC1213)
Part of HOST Resource MIB
Part of Printer MIB
PDU support
Get Request
Get Next Request
Get Response
Trap
Port number of Server
161
Port number for Trap transmit
162
3
PROGRAMMING GUIDE
2.2.4
DHCP
DHCP is used by DHCP client (Printer) to acquire IP address, Subnet mask and Gateway address from
DHCP server.
Transport protocol
UDP/IP
2.2.5
HTTP
HTTP is used to configure the network setting by WEB Provision.
HTTP version
V1.1
Transport protocol
TCP/IP
Items to be able to configure
IP address
Subnet mask
Default Gateway
DHCP
DHCP address
TCP max. connection
Ethernet Physical LAN Speed
LAN Real Time Command Protocol
Link Down Timeout
TCP idle Timeout
TCP Port number
UDP Port number
SNMP Trap 1
SNMP Trap 2
SNMP Community (R/W)
SNMP Trap 1 Community
SNMP Trap 2 Community
SNMP Trap 1 IP Address
SNMP Trap 2 IP Address
4
PROGRAMMING GUIDE
Emulation
The printer supports the following commands.
Command sequence
Function
DN
ESC/
POS
Printer Function Commands
DLE
10H
Clear Printer
Y
Y
EM or ESC i
19H or 1BH 69H
Perform Full Knife Cut
Y
Y
SUB or ESC m
1AH or 1BH 6DH
Perform Partial Knife Cut
Y
Y
ESC BEL
1BH 07H
Generate Tone
Y
Y
ESC @
1BH 40H
Initialize Printer
Y
Y
ESC c 4
1BH 63H 34H
Select Sensors to Stop Printing
Y
Y
ESC c 5
1BH 63H 35H
Enable or Disable Feed Button
Y
Y
ESC p
1BH 70H
Generate Pulse to Open Cash Draw er
Y
Y
GS V
1DH 56H
Select Cut Mode and Cut Paper
Y
Y
US t
1FH 74H
Print Configuration Form
Y
Y
ESC w n 7
1BH 77H 6BH 37H
Receipt shooting flush
Y
Y
ESC w n 8
1BH 77H 6BH 38H
Play melody
Y
Y
ESC w n c
1BH 77H 6BH 63H
Sw itch the printer into Sleep-Mode.
Y
Y
Vertical Positioning and Print Commands
LF
0AH
Print and Feed Paper One Line
Y
Y
CR
0DH
Print and Carriage Return
Y
Y
DC4
14H
Feed n Print Lines
Y
Y
NAK
15H
Feed n Dot Row s
Y
Y
SYN
16H
Add n Extra Dot Row s
Y
Y
ETB
17H
Print
Y
Y
ESC 2
1BH 32H
Set Line Spacing to 1/6 Inch
Y
Y
ESC 3
1BH 33H
Set Line Spacing
Y
Y
ESC J
1BH 4AH
Print and Feed Paper
Y
Y
ESC d
1BH 64H
Print and Feed n Lines
Y
Y
GS P
1DH 50H
Set Horizontal and Vertical Minimum Motion Units
Y
Y
Horizontal Positioning Commands
HT
09H
Horizontal Tab
Y
Y
ESC DC4
1BH 14H
Set Column
Y
N
ESC $
1BH 24H
Set Absolute Starting Position
Y
Y
ESC D
1BH 44H
Set Horizontal Tabs
Y
Y
ESC \
1BH 5CH
Set Relative Print Position
Y
Y
ESC a
1BH 61H
Select Justification
Y
Y
GS L
1DH 4CH
Set Left Margin
Y
Y
GS W
1DH 57H
Set Print Area Width
Y
Y
5
PROGRAMMING GUIDE
Command sequence
DN
Function
ESC/
POS
Print Characteristic Commands
DC2
12H
Select Double-Wide Characters
Y
Y
DC3
13H
Select Single-Wide Characters
Y
Y
ESC DC2
1BH 12H
Select 90 Degrees Counter-Clockw ise Rotated Print
Y
N
ESC SYN
1BH 16H
Select Pitch (Column Width)
Y
N
ESC SP
1BH 20H
Set Character Right-Side Spacing
Y
Y
ESC !
1BH 21H
Select Print Modes
Y
Y
ESC %
1BH 25H
Select or Cancel User-defined Character Set
Y
Y
ESC &
1BH 26H
Define User-defined Characters
Y
Y
ESC -
1BH 2DH
Select or Cancel Underline Mode
Y
Y
ESC :
1BH 3AH
Copy Character Set from ROM to RAM
Y
N
ESC ?
1BH 3FH
Cancel User-defined Characters
Y
Y
ESC E
1BH 45H
Select or Cancel Emphasized Mode
Y
Y
ESC G
1BH 47H
Select Double Strike
Y
Y
ESC I
1BH 49H
Select or Cancel Italic Print
Y
Y
ESC R or ESC t
1BH 52H or 1BH 74H
Select International Character Set
Y
Y
ESC V
1BH 56H
Select or Cancel 90 Degrees Clockw ise Rotated Pr int
Y
Y
ESC r
1BH 72H
Select Print Color
Y
N
ESC {
1BH 7BH
Select or Cancel Upside & Dow n Printing Mode
Y
Y
GS !
1DH 21H
Select Character Size
Y
Y
GS B
1DH 42H
Select or Cancel White/Black Reverse Pr inting Mode
Y
Y
GS b
1DH 62H
Select or Cancel Font Smoothing
Y
Y
US ENQ
1FH 05H
Selects Superscript or Subscript Modes
Y
N
ESC +
1BH 2BH
Select or Cancel Unicode(UTF-16) Mode
Y
Y
Asian Character Command
FS !
1CH 21H
Select print modes for Asian characters
Y
Y
FS &
1CH 26H
Select Asian character mode
Y
Y
FS -
1CH 2DH
Turn underline mode ON/OFF in Asian mode
Y
Y
FS .
1CH 2EH
Cancel Asian character mode
Y
Y
FS 2
1CH 32H
Define user-defined Asian characters
Y
Y
FS C
1CH 43H
Select Asian character code system
Y
Y
FS S
1CH 53H
Set Asian character spacing
Y
Y
FS W
1CH 57H
Set quadruple mode ON/OFF in Asian mode
Y
Y
6
PROGRAMMING GUIDE
Command sequence
DN
Function
ESC/
POS
Graphics Commands
DC1 or GS 0x82
11H or 1DH 82H
Print Raster Graphics
Y
N
GS 0x83
1DH 83H
Print Color Raster Graphics
Y
N
ESC “BMP file”
1BH “BMP file”
Define Bitmap File as Logo
Y
N
ESC *
1BH 2AH
Select Bit Image Mode
Y
Y
ESC * 1
1BH 2AH 31H
Select bit-image mode - Line Graphics
Y
N
ESC * b
1BH 2AH 62H
Turn on/off TIFF compression
Y
N
ESC .
1BH 2EH
Print Advanced Raster Graphics
Y
N
ESC K
1BH 4BH
Select Single Density Graphics
Y
N
ESC Y
1BH 59H
Select Double-Density Graphics
Y
N
GS #
1DH 23H
Select the Current Logo
Y
Y
GS *
1DH 2AH
Define Bit Image as Logo
Y
Y
GS /
1DH 2FH
Print Current Logo
Y
Y
FS p
1CH 70H
Print Logo
N
Y
FS q
1CH 71H
Define Logo in Flash Memory
N
Y
US EOT
1FH 04H
Convert 6 Dots/mm Bitmap to 8 Dots/mm
Y
N
GS (L
1DH 28H 4CH
Trans mit entire capacity of User-defined logo in Flash
Memory
Y
Y
GS (L
1DH 28H 4CH
Trans mit Remaining Size for User-defined Logo Area
in Flash Memory
Y
Y
GS (L
1DH 28H 4CH
Trans mit the key code for User-defined Logo in Flash
Memory
Y
Y
GS (L
1DH 28H 4CH
Delete all Logo in Flash Memory
Y
Y
GS (L
1DH 28H 4CH
Delete User-defined Logo in Flash Memory
Y
Y
GS 8L
1DH 38H 4CH
Define Logo in Flash Memory by the key code
Y
Y
GS (L
1DH 28H 4CH
Print User-defined Logo in Flash Memory
Y
Y
GS (L
1DH 28H 4CH
Delete User-defined Logo in RAM
Y
Y
GS 8L
1DH 38H 4CH
Define Logo in RAM by the key code
Y
Y
GS (L
1DH 28H 4CH
Print User-defined Logo in RAM
Y
Y
GS (L
1DH 28H 4CH
Enable Watermark printing
Y
Y
Y
GS (L
1DH 28H 4CH
Transmit Remaining Size for User-defined Logo
Area
Y
GS (L
1DH 38H 4CH
Store the graphics data in the print buffer
Y
Y
GS (L
1DH 28H 4CH
Print the graphics data in the print buffer
Y
Y
GS 0x84
1DH 84H
Dow nload logo image
Y
N
FS ( E
1CH 28H 45H
Cancel set values for top/bottom logo printing
Y
Y
FS ( E
1CH 28H 45H
Transmits set values for top/bottom logo printing
Y
Y
FS ( E
1CH 28H 45H
Set top logo printing
Y
Y
FS ( E
1CH 28H 45H
Set bottom logo printing
Y
Y
FS ( E
1CH 28H 45H
Make extended settings for top/bottom logo printing
Y
Y
FS ( E
1CH 28H 45H
Enable/disable top/bottom logo printing
Y
Y
GS D
1DH 44H
Define Window s BMP graphics data in Flash Memory
Y
Y
7
PROGRAMMING GUIDE
GS D
1DH 44H
Define Window s BMP graphics data in RAM
Y
Y
Status Commands (Batch Mode)
ESC u NULL
1BH 75H 00H
Transmit Peripheral Device Status
Y
Y
ESC v
1BH 76H
Transmit Printer Status
Y
Y
GS l
1DH 49H
Transmit Printer ID
Y
Y
GS I @
1DH 49H 40H
Error! Reference source not found.
Y
Y
GS g 0
1DH 67H 30H
Initialize maintenance counter
Y
Y
GS g 2
1DH 67H 32H
Transmit maintenance counter
Y
Y
GS r
1DH 72H
Transmit Status
Y
Y
US V
1FH 56H
Send Printer Firmw are Version
Y
N
US z
1FH 7AH
Real time commands disabled
Y
N
US SUB 02
1FH 1AH 02H
Execute Head Failure Detection
Y
Y
US SUB 01
1FH 1AH 01H
Get Detail of Head Failure Detection
Y
Y
ESC [ ! t
1BH 5BH 21H 74H
Set control point
Y
N
Y
Y
Y
Y
N
Y
Y
Y
Status Commands (Real Time)
GS EOT or
DLE EOT
1DH 04H or
10H 04H
Real Time Status Transmission
GS ETX or
DLE ENQ
1DH 03H or
10H 05H
Real Time Request to Printer
DLE DC4
10H 14H
Generate pulse in real-time
DLE DC4 or
DLE SO
10H 14H or 10H 0EH
Execute pow er-off sequence
DLE DC4
10H 14H
Control Buzzer (Internal buzzer)
N
Y
ESC =
1BH 3DH
Select peripheral device
Y
Y
DLE DC4
10H 14H
Clear buffer(s)
N
Y
DLE EM
10H 19H
Extended Real-Time Status Transmission
Y
Y
GS ENQ
1DH 05H
Real Time Printer Status Transmission
Y
Y
GS z
1DH 7AH
LED Control Request
Y
Y
GS SUB
1DH 1AH
Real-Time Printer Maintenance
Y
Y
8
PROGRAMMING GUIDE
Command sequence
DN
Function
ESC/
POS
ASB
GS a
1DH 61H
Enable/disable Automatic Status Back (ASB)
Y
Y
GS H
1DH 48H
Select Printing Position of HRI Characters
Y
Y
GS f
1DH 66H
Select Pitch for HRI Characters
Y
Y
GS h
1DH 68H
Select Bar Code Height
Y
Y
GS k
1DH 6BH
Print Bar Code
Y
Y
GS k
1DH 6BH
Print Bar Code (2D)
Y
N
GS w
1DH 77H
Error! Reference source not found.
Y
Y
GS ( k pL pH 30H
41H
1DH 28H 6BH pL pH
30H 41H
PDF417: Set the number of columns in the data
region
Y
Y
GS ( k pL pH 30H
42H
1DH 28H 6BH pL pH
30H 42H
PDF417: Set the number of row s
Y
Y
GS ( k pL pH 30H
43H
1DH 28H 6BH pL pH
30H 43H
PDF417: Set the w idth of the module
Y
Y
GS ( k pL pH 30H
44H
1DH 28H 6BH pL pH
30H 44H
PDF417: Set the row height
Y
Y
GS ( k pL pH 30H
45H
1DH 28H 6BH pL pH
30H 45H
PDF417: Set the error correction level
Y
Y
GS ( k pL pH 30H
46H
1DH 28H 6BH pL pH
30H 46H
PDF417: Select the options
Y
Y
GS ( k pL pH 30H
50H
1DH 28H 6BH pL pH
30H 50H
PDF417: Print the sy mbol data in the sy mbol storage
area
Y
Y
GS ( k pL pH 30H
51H
1DH 28H 6BH pL pH
30H 51H
PDF417: Transmit the size information of the symbol
data in the symbol storage area
Y
Y
GS ( k pL pH 31H
41H
1DH 28H 6BH pL pH
31H 41H
QR Code: Select the model
Y
Y
GS ( k pL pH 31H
43H
1DH 28H 6BH pL pH
31H 43H
QR Code: Set the size of module
Y
Y
GS ( k pL pH 31H
45H
1DH 28H 6BH pL pH
31H 45H
QR Code: Select the error correction level
Y
Y
GS ( k pL pH 31H
46H
1DH 28H 6BH pL pH
31H 46H
QR Code : Select encode mode.
Y
Y
GS ( k pL pH 31H
50H
1DH 28H 6BH pL pH
31H 50H
QR Code: Store the data in the symbol storage area
Y
Y
GS ( k pL pH 31H
51H
1DH 28H 6BH pL pH
31H 51H
QR Code: Print the symbol data in the symbol
storage area
Y
Y
GS ( k pL pH 31H
52H
1DH 28H 6BH pL pH
31H 52H
QR Code: Transmit the size information of the
symbol data in the symbol storage area
Y
Y
GS ( k pL pH 33H
43H
1DH 28H 6BH pL pH
33H 43H
2-dimensional GS1 DataBar: Set the w idth of the
module
Y
Y
GS ( k pL pH 33H
47H
1DH 28H 6BH pL pH
33H 47H
2-dimensional GS1 DataBar: GS1 DataBar
Expanded Stacked maximum w idth setting
Y
Y
GS ( k pL pH 33H
50H
1DH 28H 6BH pL pH
33H 50H
2-dimensional GS1 DataBar: Store data in the
symbol storage area
Y
Y
GS ( k pL pH 33H
51H
1DH 28H 6BH pL pH
33H 51H
2-dimensional GS1 DataBar: Print the sy mbol data in
the symbol storage area
Y
Y
Barcode Commands
9
PROGRAMMING GUIDE
GS ( k pL pH 33H
52H
1DH 28H 6BH pL pH
33H 52H
2-dimensional GS1 DataBar: Transmit the size
information of the symbol data in the symbol storage
area
Y
Y
GS ( k pL pH 36H
42H
1DH 28H 6BH pL pH
36H 42H
DataMatrix: Set the symbol type, number of columns,
number of row s
Y
Y
GS ( k pL pH 36H
43H
1DH 28H 6BH pL pH
36H 43H
DataMatrix: Set the size of the module
Y
Y
GS ( k pL pH 36H
50H
1DH 28H 6BH pL pH
36H 50H
DataMatrix: Store the data in the symbol storage area
Y
Y
GS ( k pL pH 36H
51H
1DH 28H 6BH pL pH
36H 51H
DataMatrix: Print the symbol data in the symbol
storage area
Y
Y
GS ( k pL pH 36H
52H
1DH 28H 6BH pL pH
36H 52H
DataMatrix: Transmit the size information of the
symbol data in the symbol storage area
Y
Y
GS p
1DH 70H
Select PDF 417 parameters
Y
N
Page Mode Commands
FF
0CH
Print and Return to Standard Mode
Y
Y
FF
0CH
Print and feed marked paper to print starting position
Y
Y
CAN
18H
Cancel Print Data in Page Mode
Y
Y
ESC FF
1BH 0CH
Print Data in Page Mode
Y
Y
ESC L
1BH 4CH
Select Page Mode
Y
Y
ESC S
1BH 53H
Select Standard Mode
Y
Y
ESC T
1BH 54H
Select Print Direction in Page Mode
Y
Y
ESC W
1BH 57H
Set Printing Area in Page Mode
Y
Y
GS $
1DH 24H
Set Absolute Vertical Print Position in Page Mode
Y
Y
GS \
1DH 5CH
Set Relative Vertical Print Position in Page Mode
Y
Y
GS :
1DH 3AH
Start and Terminate Macro Definition
Y
Y
GS ^
1DH 5EH
Execute Macro
Y
Y
Macro Commands
10
PROGRAMMING GUIDE
Command sequence
DN
Function
ESC/
POS
User Data Storage Commands
ESC ‘
1BH 27H
Write User Defined Data
Y
N
ESC 4
1BH 34H
Read User Defined Data
Y
N
GS “
1DH 22H
Select Memory Type for User Defined Data
Y
Y
GS “ U
1DH 22H 55H
Flash Memory Allocation for User-defined Storage
Area
Y
Y
GS @
1DH 40H
Erase User-defined storage area in Flash Memory
Y
Y
US 6
1FH 36H
Printer Setting Change
Y
Y
US DC2
1FH 12H
Read Printer Setting
Y
Y
US DC3
1FH 13H
LED Configuration
Y
Y
US DC4
1FH 14H
Read LED Configuration
Y
Y
GS ( E
1DH 28H 45H
Change into the user setting mode
Y
Y
GS ( E
1DH 28H 45H
End the user setting mode session
Y
Y
GS ( E
1DH 28H 45H
Y
Y
GS ( E
1DH 28H 45H
Changes the memory switch.
Transmits the host the value for the memory
switch.
Y
Y
GS ( E
1DH 28H 45H
Changes the customized setting values.
Y
Y
GS ( E
1DH 28H 45H
Transmits the customized setting values.
Y
Y
GS ( E
1DH 28H 45H
Sets communication condition of serial interface.
Y
Y
GS ( E
1DH 28H 45H
Transmits communication condition of serial
interface.
Y
Y
GS ( E
1DH 28H 45H
Set Conditions for USB communication
Y
Y
GS ( E
1DH 28H 45H
Transmit conditions for USB communication
Y
Y
GS ( E
1DH 28H 45H
Set serial number
Y
Y
GS ( E
1DH 28H 45H
Set production date
Y
Y
GS ( E
1DH 28H 45H
Sets communication condition of Ethernet interface.
Y
Y
GS ( E
1DH 28H 45H
Transmits communication condition of Ethernet
interface.
Y
Y
GS ( F
1DH 28H 46H
Set adjustment value(s)
Y
Y
GS 0x81
1DH 81H
Set paper type
Y
N
GS 0x8D
1DH 8DH
Text strike-through mode
Y
N
GS 0x9E
1DH 9EH
Dow nload paper type description
Y
N
GS 0x9F
1DH 9FH
Return paper type description
Y
N
GS 0xA0
1DH A0H
Set temporary max target speed
Y
N
Flash Dow nload Commands in IPL
ESC [ }
1BH 5BH 7DH
Sw itch to Flash Dow nload Mode
Y
Y
GS STX
1DH 02H
Select Flash Memory Sector to Dow nload
Y
Y
GS ACK
1DH 06H
Get Firmw are Sector CRC
Y
Y
GS BEL
1DH 07H
Return IPL Firmw are CRC
Y
Y
GS SI
1DH 0FH
Return Main Firmw are CRC
Y
Y
GS DLE
1DH 10H
Erase Selected Flash Sector
Y
Y
GS DC1
1DH 11H
Dow nload to Active Flash Sector
Y
Y
11
PROGRAMMING GUIDE
GS SP
1DH FFH
Reboot the Printer
Y
Y
Flash Dow nload Commands in Main Firmw are
ESC [ |
1BH 5BH 7CH
Flash Firmw are
Y
Y
ESC [ {
1BH 5BH 7BH
Activate Firmw are in the alternative area
Y
Y
Diagnostics Commands
GS d
1DH 64H 01H
Error! Reference source not found.
Y
Y
GS d
1DH 64H 05H
Dot Check pattern test
Y
Y
GS d
1DH 64H 15H
Sensor Calibration
Y
Y
GS d
1DH 64H 20H
Retrieve Detail Log
Y
Y
12
PROGRAMMING GUIDE
3. Command Descriptions
3.1
Printer Function Command
3.1.1
Clear Printer
ASCII:
DLE
Hexadecimal: 10
Decimal:
16
This command is ignored.
3.1.2
Perform Full Knife Cut
ASCII:
EM or ESC i
Hexadecimal: 19 or 1B 69
Decimal:
25 or 27 105
It fully cuts receipt paper.
3.1.3
Perform Partial Knife Cut
ASCII:
SUB or ESC m
Hexadecimal: 1A or 1B 6D
Decimal:
26 or 27 109
It partially cuts receipt paper.
3.1.4
Generate Tone
ASCII:
ESC BEL
Hexadecimal: 1B 07
Decimal:
27 7
It generates an audible tone.
3.1.5
Initialize Printer
ASCII:
ESC @
Hexadecimal: 1B 40
Decimal:
27 64
Default:
It clears the print buffer and resets the printer settings to the condition when the printer is turned on.
The user-defined logos, characters and data in RAM are cleared by this command. However the defined
data in the flash memory is not cleared. The macro is also not cleared.
Real-time command enabled by “GS ( D” is disabled
Automatic Status Back (ASB) is switched off.
3.1.6
Select Sensors to Stop Printing
ASCII:
ESC c 4 n
Hexadecimal: 1B 63 34 n
Decimal:
27 99 52 n
Value of n:
Bit
0
1
2-7
Default:
Function
To determine if it suspends printing when it detects paper low.
To determine if it suspends printing when it detects paper low.
(Reserved)
0
13
Off
Ignore
Ignore
N/A
On
Suspend
Suspend
N/A
PROGRAMMING GUIDE
It enables or disables to suspend printing data if the paper low is detected while printing data. Once
printing is suspended by this function, it does not resume printing until the certain paper is supplied.
The settings of this command are effective until ESC @ is executed, the printer is reset, or the power is
turned off.
3.1.7
Enable or Disable Feed Button
ASCII:
ESC c 5 n
Hexadecimal: 1B 63 35 n
Decimal:
27 99 53 n
Value of n:
0 = Enable
1 = Disable
Default:
0 (Enable)
It enables or disables the paper feed button. If it is disabled, updating status in terms of the feed button
pressed information (Real time status, Batch status) is also disabled.
3.1.8
Generate Pulse to Open Cash Drawer
ASCII:
ESC p n p1 p2
Hexadecimal: 1B 70 n p1 p2
Decimal:
27 112 n p1 p2
Value of n:
0, 48 = Drawer1
1, 49 = Drawer 2
Value of p1:
It defines the pulse on time. The unit is 2 milliseconds.
Value of p2:
It defines the pulse off (delay) time before processing the next operation.
The unit is 2 milliseconds.
Range of p1,p2: 0 - 255
It generates the pulse to open the cash drawer, and defines the pulse off time (delay) after the pulse.
During the pulse off time, the printer does not process the next operation.
Formulas:
Pulse ON time = p1 x 2 milliseconds
Pulse OFF (Delay) time = p2 x 2 milliseconds
3.1.9
Select Cut Mode and Cut Paper
ASCII:
GS V m or GS V m n
Hexadecimal: 1D 56 m or 1D 56 m n
Decimal:
29 86 m or 29 86 m n
Value of m:
It defines the cut mode as follows.
Value of n:
It defines the extra feed amount fed before cutting when n is 65 or 66.
Printer perform reverse feed after cut when n is 67.
The vertical motion unit (1/203 inch, 0.125 mm) is used to define the extra feed.
m
Feed and Cut Mode
0,48
Full cut (no extra feed).
If the knife supports the partial cut only, it performs the partial cut.
1,49
Partial cut (no extra feed).
If the knife supports the full cut only, it performs the full cut.
65
Full cut with extra feed.
If the knife supports the partial cut only, it performs the partial cut.
66
Partial cut with extra feed.
If the knife supports the full cut only, it performs the full cut.
67
Feeds the Paper forward to the cutting position, executes a full cut and feeds the
paper backward to (cutting position – [n * vertical motion unit]).
Range of m:
0, 48; 1, 49;
65, 66,67 (used with n)
14
PROGRAMMING GUIDE
Range of n:
0 – 255
Exceptions:
If m is out of the specified range, the command is ignored.
3.1.10
Print Configuration Form
ASCII:
US t
Hexadecimal: 1F 74
Decimal:
31 116
It prints the current printer configuration on the receipt.
If there are data in the print buffer, it firstly prints those data by force and then starts printing the
configuration form. After printing the configuration form, it resets the printer attributes to the same
condition as power-on.
Whenever the printer prints this form, it executes the thermal head failure detection, and this result is
included in this form.
3.1.11
Receipt shooting flush
ASCII:
ESC w n 7 n
Hexadecimal: 1B 77 6E 37 n
Decimal:
27 119 110 55 n
Range:
n = 0,1,48,49.
Description :
The Receipt shooting spooler is flushed with or without printer synchronization
and the printer sends 1 byte back to the host after execution.
n specifies the function.
n
Function
0,48
Receipt shooting flush without printer synchronize
1,49
Receipt shooting flush with printer synchronize
Notes:
• The answer byte is fixed to 0x19.
• If the value of n is out of the specified range, this command is ignored.
• Receipt shooting flushing is executed only if Receipt shooting was enabled by memory switch
(command GS ( E).
• Printing of barcode PDF417 will stopped the printout for a short time (see GS k) Diebold Nixdorf
specific function
3.1.12
Play melody
ASCII:
ESC w n 8 n m
Hexadecimal: 1B 77 6E 38 n m
Decimal:
27 119 110 56 n m
Range:
1 <= n <= 6
0 <= m <= 1
Description :
The Printer play the melody from specified with parameter n. Parameter m is the
synchronism flag. In case m = 1, printer wait for previous melody finish.
n
1
2
3
Melody
LOW_MID
Pattern
1150 Hz / 100 ms
2300 Hz / 100 ms
LOW_MID_HIGH
1150 Hz / 100 ms
2300 Hz / 100 ms
3450 Hz / 100 ms
LOW_MID_LOW_MID 1150 Hz / 50 ms
2300 Hz / 50 ms
15
PROGRAMMING GUIDE
4
5
6
1150 Hz / 50 ms
2300 Hz / 50 ms
2300 Hz / 40 ms
2300 Hz / 150 ms
1150 Hz / 100 ms
2300 Hz / 100 ms
1150 Hz / 100 ms
2300 Hz / 100 ms
1150 Hz / 100 ms
2300 Hz / 100 ms
SHORT_BEEP
LONG_BEEP
ST_MELODY
Notes: Diebold Nixdorf specific function
16
PROGRAMMING GUIDE
3.1.13
Switch the printer into Sleep-Mode
ASCII:
ESC w n c
Hexadecimal: 1B 77 6E 63
Decimal:
27 119 110 99
Description : This function immediately starts the Sleep-Mode of the printer when the memory switch is
enabled.
Notes: Diebold Nixdorf specific function.
17
PROGRAMMING GUIDE
3.2
Vertical Positioning and Print Commands
3.2.1
Print and Feed Paper One Line
ASCII:
LF
Hexadecimal: 0A
Decimal:
10
It prints data in the print buffer and performs one line feed. LF command will be ignored after CR(if
automatic linefeed enabled)
3.2.2
Print and Carriage Return
ASCII:
CR
Hexadecimal: 0D
Decimal:
13
Perform one line feed as LF when “Automatic line feed” is Enable by “GS ( E”.
Ignore this command when “Automatic line feed” is Disable.
3.2.3
Feed n Print Lines
ASCII:
DC4 n
Hexadecimal: 14 n
Decimal:
20 n
Value of n:
The number of lines to feed at current line height setting.
Range of n:
0 – 255
It feeds paper n lines based on the current line pitch. This command is ignored when the current line
buffer is not empty.
3.2.4
Feed n Dot Rows
ASCII:
NAK n
Hexadecimal: 15 n
Decimal:
21 n
Value of n:
n/203 inch
Range of n:
0 – 255
It feeds paper n dot rows. This command is ignored when the current line buffer is not empty.
3.2.5
Add n Extra Dot Rows
ASCII:
SYN n
Hexadecimal: 16 n
Decimal:
22 n
Value of n:
n/203 inch
Range of n:
0 – 16
It adds n extra dot rows based on the character height to change the line space.
The following table indicates lines per inch according to the extra dot rows added by this command.
Extra Row s
0
1
2
3
4
5
6
7
Lines Per
Inch
8.47
8.13
7.81
7.52
7.25
7.00
6.77
6.55
Dot Row s
24
25
26
27
28
29
30
31
18
PROGRAMMING GUIDE
8
9
10
11
12
13
14
15
16
3.2.6
Print
ASCII:
Hexadecimal:
Decimal:
6.35
6.16
5.98
5.81
5.64
5.5
5.3
5.2
5.1
32
33
34
35
36
37
38
39
40
ETB
17
23
It prints data in the print buffer and performs one line feed. The printer behavior is same as LF (0x0A)
command.
3.2.7
Set Line Spacing to 1/6 Inch
ASCII:
ESC 2
Hexadecimal: 1B 32
Decimal:
27 50
It defines the default line spacing to 4.25 mm (6 lines per inch).
3.2.8
Set Line Spacing
ASCII:
ESC 3 n
Hexadecimal: 1B 33 n
Decimal:
27 51 n
Value of n:
n / 406 inches
Range of n:
0 - 255
It defines the default line spacing to n/406 inches.
The minimum line pitch depends on the font selected.
If the parameter n is less than 48, it is ignored.
If the vertical minimum motion unit is changed by Set Horizontal and Vertical Minimum Motion Units
command (1D 50), the parameters of this command is interpreted accordingly.
3.2.9
Print and Feed Paper
ASCII:
ESC J n
Hexadecimal: 1B 4A n
Decimal:
27 74 n
Value of n:
n / 203 inches receipt
Range of n:
0 - 255
It prints data in the print buffer and feeds paper n dot rows. The minimum feed amount is 0.118 inches,
so the valid minimum parameter n is 24. It feeds the minimum feed amount (n=24) by force if parameter
n is less than 24 except “0”. If parameter n is set to “0”, it just prints data in the print buffer without
feeding.
If the vertical minimum motion unit is changed by Set Horizontal and Vertical Minimum Motion Units
command (1D 50), the parameters of this command is interpreted accordingly.
3.2.10
Print and Feed n Lines
ASCII:
ESC d n
Hexadecimal: 1B 64 n
Decimal:
27 100 n
19
PROGRAMMING GUIDE
Value of n:
Range of n:
Number of lines to be printed and feed.
1 – 255
It prints data in the buffer and feeds paper n lines according to the current line spacing.
3.2.11
Set Horizontal and Vertical Minimum Motion Units
ASCII:
GS P x y
Hexadecimal: 1D 50 x y
Decimal:
29 80 x y
Value of x:
Horizontal
Value of y:
Vertical
Range of x:
0 – 255
Range of y:
0 – 255
Default: of x:
203
Default: of y:
203
It sets the horizontal and vertical motion units to 1/x inch and 1/y inch respectively.
When x or y is set to 0, the default setting for that motion unit is used.
The default horizontal motion is x, y = 203.
20
PROGRAMMING GUIDE
3.3
Horizontal Positioning Commands
3.3.1
Horizontal Tab
ASCII:
HT
Hexadecimal: 09
Decimal:
9
It moves the print position to the next horizontal tab position set by the Set Horizontal Tab Positions (1B
44 n1 n2 ... 00) command.
3.3.2
Set Column
ASCII:
ESC DC4 n
Hexadecimal: 1B 14 n
Decimal:
27 20 n
Value of n:
1 - 44 (Standard, 80mm)
1 - 56 (Compressed, 80mm)
1 - 32 (Standard, 58mm)
1 - 42 (Compressed, 58mm)
It defines number of characters to be printed in the current line. In order to make it valid, it must be
defined before the first character in the current line is processed. The definition is valid in the current line
only.
3.3.3
Set Absolute Starting Position
ASCII:
ESC $ n1 n2
Hexadecimal: 1B 24 n1 n2
Decimal:
27 36 n1 n2
Value of n:
Number of dots to be moved from the beginning of the line.
Value of n1:
Remainder after dividing n by 256.
Value of n2:
Integer after dividing n by 256.
It moves the print position to the point defined (n1 + n2*256 dots) from the left edge of the print area.
The definition is valid in the current line only.
Related Information:
This command is also available for the graphics data.
If the horizontal minimum motion unit is changed by Set Horizontal and Vertical Minimum Motion Units
command (1D 50), the parameters of this command is interpreted accordingly.
3.3.4
Set Horizontal Tabs
ASCII:
ESC D n1 n2 ...nk NUL
Hexadecimal: 1B 44 n1 n2 ...nk 00
Decimal:
27 68 n1 n2 ...nk 0
Value of n:
The number of columns from the left edge of the print area
Range of n:
1 ≤ n1 ≤ n2 ≤ ….≤ nk < 255
Value of k:
The number the horizontal tab position set by this command
Range of k:
0 ≤ k ≤ 32
Default:
n = 8, 16, 24, 32, 40, ….. , 232, 240, 248
It sets the horizontal tab positions. This command does not move the current print position.
If n is not specified (1B 44 00), it clears all tabs.
3.3.5
Set Relative Print Position
ASCII:
ESC \ n1 n2
Hexadecimal: 1B 5C n1 n2
21
PROGRAMMING GUIDE
Decimal:
Range of n:
27 92 n1 n2
-32768 ≤ n1 + n2 x 256 ≤ 32767
It moves the print position to the relative position specified by ((n1 + n2 x 256) x (horizontal motion unit))
from the current print position.
The horizontal motion unit follows Set Horizontal and Vertical Minimum Motion Units (1D 50) command.
The positive number moves the print position to the right, the negative number moves to the left.
3.3.6
Select Justification
ASCII:
ESC a n
Hexadecimal: 1B 61 n
Decimal:
27 97 n
Value of n:
0, 48 = Left Aligned
1, 49 = Center Aligned
2, 50 = Right Aligned
Range of n:
0 – 2, 48-50
Default:
0 (Left aligned)
It specifies the alignment of the characters, graphics, logos, and bar codes on the receipt station.
The justification has no effect in page mode. If this command is processed in page mode, an internal
flag is activated, and this flag is enabled when the printer returns to standard mode.
Exceptions:
The command is valid only when it is specified at the beginning of a line.
3.3.7
Set Left Margin
ASCII:
GS L nL nH
Hexadecimal: 1D 4C nL nH
Decimal:
29 76 nL nH
Range of nL: 0 - 255
Range of nH: 0 - 255
Default:
80 mm paper width: 576 dots (the maximum printable area)
58 mm paper width: 408 dots (the maximum printable area)
It sets the left margin of the printing area to ((nL + nH x 256) x (horizontal motion unit)). The horizontal
motion unit follows Set Horizontal and Vertical Minimum Motion Units (1D 50) command.
The maximum printable area is 576 dots. See the following diagram. If the left margin specified by this
command exceeds the current printable area, it is ignored.
Printable Area: 576 dots for 80 mm width, 408 dots for 58 mm width
GS L
Left margin
GS W
Print Area Width
Exceptions:
The command is valid only when it is specified at the beginning of a line.
This command is available for the receipt station only.
3.3.8
Set Print Area Width
ASCII:
GS W nL nH
Hexadecimal: 1D 57 nL nH
Decimal:
29 87 nL nH
Range of nL: 0 - 255
Range of nH: 0 - 255
Default:
80 mm paper width: 576 dots (the maximum printable area)
22
PROGRAMMING GUIDE
58 mm paper width: 408 dots (the maximum printable area)
It sets the print area to ((nL + nH x 256) x (horizontal motion unit)). The horizontal motion unit follows Set
Horizontal and Vertical Minimum Motion Units (1D 50) command.
The maximum printable area is 576 dots. See the following diagram. If the left margin specified by this
command exceeds the current printable area, the width of the maximum printable area is used.
Printable Area: 576 dots for 80 mm width, 408 dots for 58 mm width
GS L
Left margin
GS W
Print Area Width
Exceptions:
The command is valid only when it is specified at the beginning of a line.
This command is available for the receipt station only.
23
PROGRAMMING GUIDE
3.4
Print Characteristic Commands
3.4.1
Select Double-Wide Characters
ASCII:
DC2
Hexadecimal: 12
Decimal:
18
It prints characters in double width. It automatically comes back to single-wide mode after one line data
has been printed or Initialize Printer (1B 40) / Clear Printer (10) command is received.
3.4.2
Select Single-Wide Characters
ASCII:
DC3
Hexadecimal: 13
Decimal:
19
It prints characters in single (normal) width.
3.4.3
Select 90 Degrees Counter-Clockwise Rotated Print
ASCII:
ESC DC2
Hexadecimal: 1B 12
Decimal:
27 18
It rotates characters 90 degrees counter-clockwise. The setting specified by this command is reset by
the following commands.
- Initialize Printer (1B 40)
- Select or Cancel 90 Degrees Clockwise Rotated Print (1B 56)
3.4.4
Select Pitch (Column Width)
ASCII:
ESC SYN n
Hexadecimal: 1B 16 n
Decimal:
27 22 n
Value of n:
0 = Standard Pitch
1 = Compressed Pitch
Default:
0 (Standard pitch)
It selects the character pitch.
Formulas:
The following table provides the maximum number of characters printed in one line in each CPI.
Pitch colum ns
Standard
Compressed
Receipt Colum ns
44 for 80 mm paper
31 for 58 mm paper
57 for 80 mm paper
40 for 58 mm paper
CPI
15.6
20.3
3.4.5
Set Character Right-Side Spacing
ASCII:
ESC SP n
Hexadecimal: 1B 20 n
Decimal:
27 32 n
Value of n:
0 - 32
Default:
0
It sets the right side character spacing to [n x (horizontal or vertical motion units)]. Values for this
command are set independently in Standard and Page Mode.
The horizontal and vertical motion unit follows Set Horizontal and Vertical Minimum Motion Units (1D
24
PROGRAMMING GUIDE
50) command.
In Standard Mode, the horizontal motion unit is used to specify the character right side spacing.
In Page Mode, either horizontal or vertical motion is used to specify the character right side spacing
according to the print direction.
3.4.6
Select Print Modes1
ASCII:
ESC ! n
Hexadecimal: 1B 21 n
Decimal:
27 33 n
Value of n:
Print mode
Bit
Bit0
Function
Pitch
Bit1,2
Bit3
Bit4
Bit5
Bit6
Bit7
(Reserved)
Emphasized mode
Double height
Double Width
(Reserved)
Underline mode
Default:
0
Standard pitch: 15.6 CPI
44 Col/Line (80 mm)
32 Col/Line (58 mm)
Fixed to zero
Canceled
Canceled
Canceled
Fixed to zero
Canceled
1
Compressed pitch: 20.3 CPI
56 Col/Line (80 mm)
42 Col/Line (58 mm)
NA
Set
Set
Set
NA
Set
0
It defines the print modes to specify the several character attributes.
3.4.7
Select or Cancel Font Smoothing
ASCII:
GS b n
Hexadecimal: 1D 62 n
Decimal:
29 98 n
Value of n:
0= Disable Font Smoothing
1= Enable Font Smoothing
Default:
0 (Disable Font Smoothing)
It disables or enables the font smoothing for characters enlarged by the following commands .
Select Double-Wide Characters (DC2)
Select Print Modes (ESC ! n)
Select Character Size (GS ! n)
Select print modes for Asian characters (FS ! n)
Set quadruple mode ON/OFF in Asian (FS W n)
1
This command is supported for single-byte characters when Asian mode setting is “GB18030 ON”
3.4.8
Select or Cancel User-defined Character Set
ASCII:
ESC % n
Hexadecimal: 1B 25 n
Decimal:
27 37 n
Value of n:
0= Code Page 437 / Code Page GB180301
1= User-defined
Range of n:
0– 1
Default:
0 (Code Page 437/ Code Page GB18030)
It selects or cancels the user-defined character set. If undefined character code is specified when it is in
the user-defined character mode (n=1), the same character code of the previous code page will be
25
PROGRAMMING GUIDE
selected.
3.4.9
Define User-defined Characters
ASCII:
ESC & 3 c1 c2 [x1 d1 d2 ... d(x1 x 3)]…..[xk d1 d2 … d(xk x 3)]
Hexadecimal: 1B 26 3 c1 c2 [x1 d1 d2 ... d(x1 x 3)]…..[xk d1 d2 … d(xk x 3)]
Decimal:
27 38 3 c1 c2 [x1 d1 d2 ... d(x1 x 3)]…..[xk d1 d2 … d(xk x 3)]
c:
c1, c2:
x:
d:
k:
ASCII character code of the first (c1) and the last (c2) character to define
32 ≤ c1 ≤ c2 ≤ 255
The number of dots in the horizontal direction of each user-defined character
1 ≤ x ≤ 16 (Font A), 1 ≤ x ≤ 10 (Font B)
The defined data of each user-defined character in the following format.
0 ≤ d ≤ 255
The total number of bytes of defined data for each character cell is (3 x x) bytes.
The number of user-defined characters defined by this command at the same time
k = c2 – c1 + 1
It defines the user-defined characters into RAM.
Characters defined are no longer available once the printer is turned off or Initialize printer command
(1B 40) is processed.
Defining User-defined Characters
x
24 dots
(8 x 3)
d1
d4
d7
d2
d5
d8
d3
d6
d9
MSB
d
n
LSB
Code Page 437 will be selected when Standard DBCS (CP 932, 936, 949, 950) is loaded. Code Page GB18030 will be selected when
GB18030 DBCS is loaded
1
26
PROGRAMMING GUIDE
3.4.10
Select or Cancel Underline Mode
ASCII:
ESC - n
Hexadecimal: 1B 2D n
Decimal:
27 45 n
Value of n:
0, 48 = Cancel underline mode
1, 49 = Select underline mode (1 dot height)
2, 50 = Select underline mode (2 dots height)
Default of n:
0 (Cancels underline mode)
It turns the underline mode on or off. Underline is not printed for spaces set by Horizontal Tab, Set
Absolute Starting Position and Set Relative Print Position command.
The printer behavior of this command and Select Print Modes (Bit 7) is completely same.
3.4.11
Copy Character Set from ROM to RAM
ASCII:
ESC : 0 0 0
Hexadecimal: 1B 3A 30 30 30
Decimal:
27 58 48 48 48
This command is ignored.
3.4.12
Cancel User-defined Characters
ASCII:
ESC ? n
Hexadecimal: 1B 3F n
Decimal:
27 63 n
Value of n:
Specified character code
Range of n:
32 - 255
It cancels a user-defined character specified by n.
3.4.13
Select or Cancel Emphasized Mode
ASCII:
ESC E n
Hexadecimal: 1B 45 n
Decimal:
27 69 n
Value of n:
0 (Bit0): Off
1 (Bit0): On
Range of n:
0 – 255
Default:
0 (Bit0): Off
It turns the emphasize mode on or off. Only the lowest bit of n is effective.
The printer behavior of this command and Select Print Modes (Bit 3) is completely same.
Exceptions:
This command is not available for image printing.
3.4.14
Select Double Strike
ASCII:
ESC G n
Hexadecimal: 1B 47 n
Decimal:
27 71 n
Value of n:
0 (Bit0): Off
1 (Bit0): On
Range of n:
0 – 255
Default:
0 (Bit0): Off
27
PROGRAMMING GUIDE
It turns double strike mode on or off. Only the lowest bit of n is effective.
The printer behavior of this command is completely same as Select or Cancel Emphasized Mode
command.
Exceptions:
This command is not valid for image printing.
3.4.15
Select or Cancel Italic Print
ASCII:
ESC I n
Hexadecimal: 1B 49 n
Decimal:
27 73 n
Value of n:
0 (Bit0): Off
1 (Bit0): On
Range of n:
0 – 255
Default:
0 (Bit0): Off
It turns the Italic print mode on or off. Only the lowest bit of n is effective.
Italic print mode is available for both resident fonts and user-defined characters.
3.4.16
Select International Character Set (DN Emulation)
ASCII:
ESC R n or ESC t n
Hexadecimal: 1B 52 n or 1B 74 n
Decimal:
27 82 n or 27 116 n
Value of n:
0 = Code Page 437
1 = Code Page 850
2 = Code Page 852
3 = Code Page 860
4 = Code Page 863
5 = Code Page 865
6 = Code Page 858
7 = Code Page 866
8 = Code Page 1252
9 = Code Page 862
10 = Code page 737
11 = Code page 874
12 = Code page 857
13 = Code page 1251
14 = Code page 1255
15 = KZ 1048
16 = Code page 1254
17 = Code page 1250
18 = Code page 28591
19 = Code page 28592
20 = Code page 28599
21 = Code Page 28605
22 = Code page 864
23 = Code page 720
24 = Code page 1256
25 = Code page 28596
26 = KATAKANA
27 = Code page 775
28 = Code page 1257
29 = Code page 28594
30 = Code page 1253
Default:
0 (Code Page 437)
It selects the international character set. See Appendix 1 Character sets for the detail of each character
28
PROGRAMMING GUIDE
set.
There are two command codes to select the international character set and the functionality of both
commands are completely same.
3.4.17
Select International Character Set.(ESCPOS emulation)
ASCII:
ESC R n
Hexadecimal: 1B 52 n
Decimal:
27 82 n
Range:
0 ≤ n ≤ 17
Default:
n=0
It selects an international character set.
This command affect only specific ASCII code data (23, 24, 25, 26, 40, 5B, 5C, 5D, 5E, 60, 7B, 7C, 7D,
7E).
However, when the default of the international character set is changed with the customized value,
<fn=05> GS ( E <a = 9>, the default value becomes the one specified by the customized.
n
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Character Set
USA
France
Germany
UK
Denmark Ⅰ
Sweden
Italy
Spain
Japan
Norway
Denmark Ⅱ
Spain Ⅱ
Latin America
Republic of Korea
Slovenia/ Croatia
China
Reserved
Arabia
ASCII code (Hex)
23
24
25
2A
40
5B
5C
5D
5E
60
7B
7C
7D
7E
USA
#
$
%
*
@
[
\
]
^
`
{
|
}
France
#
$
%
*
à
°
ç
§
^
`
é
ù
è
~
¨
Germany
#
$
%
*
§
Ä
Ö
Ü
^
`
ä
ö
ü
β
U.K.
£
$
%
*
@
[
\
]
^
`
{
|
}
~
Denmark I
#
$
%
*
@
Æ
Ø
Å
^
`
#
¤
%
*
É
Ä
Ö
Å
Ü
é
ø
ö
å
Sweden
æ
ä
å
~
ü
Italy
#
$
%
*
@
°
\
é
^
ù
ä
ò
è
ì
Spain I
Pt
$
%
*
@
¡
Ñ
¿
^
`
¨
ñ
}
~
Japan
#
$
%
*
@
[
¥
]
^
`
{
|
}
~
Country
29
PROGRAMMING GUIDE
Norway
#
¤
%
*
É
Æ
Ø
Å
Ü
é
æ
ø
å
ü
Denmark II
#
$
%
*
É
Æ
Ø
Å
Ü
é
æ
ø
å
ü
Spain II
#
$
%
*
á
¡
Ñ
¿
é
`
Í
ñ
ó
ú
Latin America
#
$
%
*
á
Ñ
ü
í
ñ
ó
ú
#
$
%
*
@
\
¿
]
é
Korea
¡
[
{
|
}
~
Slovenia/ Croatia
#
$
%
*
Ž
Š
Đ
Ć
Č
š
đ
ć
č
China
#
$
%
*
@
[
\
]
^
{
|
}
~
Arabia
#
$
%
*
@
[
\
]
^
{
|
}
~
3.4.18
Select character code table(ESCPOS emulation)
ASCII:
ESC t
n
Hexadecimal: 1B 74
n
Decimal:
27
116
n
Value of n:
0 ≤ n ≤ 255
Default:
0 (Code Page 437)
It selects the international character set.
This command change character code data from 0x80 to0xFF.
n
0
1
2
3
4
5
11
12
13
14
15
16
17
18
19
20
21
26
30
31
32
33
34
35
36
37
38
39
40
41
42
Character code table
[PC437 (USA: Standard Europe)]
[Katakana]
[PC850 (Multilingual)]
[PC860 (Portuguese)]
[PC863 (Canadian-French)]
[PC865 (Nordic)]
Reserved
Reserved
[PC857(Turkish)]
[PC737(Greek)]
Reserved
[WPC1252]
[PC866 (Cyrillic #2)]
[PC852 (Latin 2)]
[PC858 (Euro)]
Reserved
Reserved
Reserved
Reserved
Reserved
[PC720 (Arabic)]
[PC775 (Baltic Rim)]
Reserved
Reserved
[PC862 (Hebrew)]
[PC864 (Arabic)]
Reserved
Reserved
Reserved
Reserved
Reserved
30
^
ž
`
PROGRAMMING GUIDE
43
44
45
46
47
48
49
50
51
52
53
128
129
130
131
255
Reserved
Reserved
[WPC1250 (Central Europe)]
[WPC1251 (Cyrillic)]
[WPC1253 (Greek)]
[WPC1254 (Turkish)]
[WPC1255 (Hebrew)]
[WPC1256(Arabic)]
[WPC1257(Baltic)]
Reserved
[KZ-1048: Kazakhstan]
Code Page 932(Japanese)
Code Page 936(Simplified Chinese)
Code Page 949(Korean)
Code Page 950(Traditional Chinese)
Page 255 [User-defined page]
3.4.19
Select or Cancel Unicode(UTF-16) Mode
ASCII:
ESC + n
Hexadecimal: 1B 2B n
Decimal:
27 43 n
Value of n:
0: International character set
1: Uni-code UTF-16)
Default:
0 (International character set)
It turns Unicode mode on or off.
Note: In Unicode mode, a character is specified in two bytes as follows.
<nL> <nH> (0 ≤ nL + nH x 256 ≤ 65535)
Exceptions:
All characters defined by Unicode are not fully supported.
Unicode supported for sigle byte character.
3.4.20
Select or Cancel 90 Degrees Clockwise Rotated Print
ASCII:
ESC V n
Hexadecimal: 1B 56 n
Decimal:
27 86 n
Value of n:
0, 48 : Off
1, 2, 49, 50 : On
Range of n:
0 – 255
Default:
0 (Bit0): Off
It rotates characters 90 degrees clockwise. Only the lowest bit of n is effective.
The setting specified by this command is valid until the printer is reset or the following command is
received.
- Initialize Printer (1B 40)
- Select or Cancel Upside & Down Printing Mode (1B 7B)
3.4.21
Select Print Color
ASCII:
ESC r n
Hexadecimal: 1B 72 n
Decimal:
27 114 n
Value of n:
0: Monochrome
31
PROGRAMMING GUIDE
Default:
1: Color
0: Monochrome
It turns the color mode on or off. Color printing is available when the printer is configured to the two color
paper mode, and setting the two color thermal paper is required to actualize the color printing.
Limitation:
This command is not available to print multi-tone data.
3.4.22
Select or Cancel Upside & Down Printing Mode
ASCII:
ESC { n
Hexadecimal: 1B 7B n
Decimal:
27 123 n
Value of n:
0 (Bit0): Off
1 (Bit0): On
Range of n:
0 – 255
Default:
0 (Bit0): Off
It turns upside-down print mode on or off. Only the lowest bit of n is effective.
The upside-down print mode is also cancelled by Select 90 Degrees Counter-Clockwise Rotated Print
(1B 12) command.
Exceptions:
The command is valid only when it is specified at the beginning of a line.
Summary of Rotated Printing
The following table shows the final output based on the combinations of Select or Cancel Upside &
Down Printing Mode (1B 7B), Select or Cancel 90 Degrees Clockwise Rotated Print (1B 56) and Select
90 Degrees Counter-Clockwise Rotated Print (1B 12).
Upside Down (1B 7B)
Rotate Clockwise (1B 56)
Off
Off
On
On
X
Off
On
Off
On
X
Rotate Counter-Clockwise
(1B 12)
Off
X
X
X
Output
On
3.4.23
Select Character Size
ASCII:
GS ! n
Hexadecimal: 1D 21 n
Decimal:
29 33 n
Value of n:
Bit 0 to 3 = Height magnification (0 – 7)
Bit 4 to 7 = Width magnification (0 – 7)
Range of n:
0 ≤ n ≤ 7, 16 ≤ n ≤ 23, 32 ≤ n ≤ 39, 48 ≤ n ≤ 55, 64 ≤ n ≤ 71, 80 ≤ n ≤ 87, 96 ≤ n ≤ 103,
112 ≤ n ≤ 119
Default:
0
It selects the character height by bits 0 to 3 and the character width by bits 4 to 7 as follows;
Character Width Selection
HEX
00
10
20
30
40
50
Decim al
0
16
32
48
64
80
Width
1 time (normal)
2 times
3 times
4 times
5 times
6 times
32
PROGRAMMING GUIDE
60
70
96
112
7 times
8 times
Character Height Selection
HEX
00
01
02
03
04
05
06
07
Decim al
0
1
2
3
4
5
6
7
Height
1 time (normal)
2 times
3 times
4 times
5 times
6 times
7 times
8 times
Exceptions:
This command is not effective for bar code HRI characters.
3.4.24
Select or Cancel White/Black Reverse Printing Mode
ASCII:
GS B n
Hexadecimal: 1D 42 n
Decimal:
29 66 n
Value of n:
0 (Bit0): Off
1 (Bit0): On
Range of n:
0 – 255
Default:
0 (Bit0): Off
It turns White/Black reverse print mode on or off. Only the lowest bit of n is effective.
In this mode, print dots and non-print dots are reversed. It is also applied to character specified by Set
Character Right-Side Spacing command (1B 20).
However, it is not applied to all vertical spacing such as line feed and horizontal spacing created by
Horizontal Tab(09), Set Absolute Starting Position command (1B 24) and Set Relative Print Position
command (1B 5C). It is also not effective for image data including logo and bar code with HRI
characters. While the printer is printing data in white/black reverse print mode, the underline mode is
temporarily disabled.
3.4.25
Selects Superscript or Subscript Modes
ASCII:
US ENQ n
Hexadecimal: 1F 05 n
Decimal:
31 05 n
Value of n:
0 = Normal size
1 = Select subscript size
2 = Select superscript size
Default:
0 (normal size)
It turns superscript or subscript modes on or off.
33
PROGRAMMING GUIDE
3.5
Graphics Commands
3.5.1
Print Raster Graphics
ASCII:
DC1 n1 … nk or GS 0x82 n1 … nk
Hexadecimal: 11 n1 … nk or 1D 82 n1 … nk
Decimal:
17 n1 … nk or 29 130 n1 … nk
Value of n:
n specifies the defined data (Raster image format)
Range of n:
0 – 255
Value of k:
k = 72 : 80mm, k = 53 : 58mm
It prints one raster image data.
3.5.2
Print Raster Color Graphics
ASCII:
GS 0x83 n1 … nk
Hexadecimal: 1D 83 n1 … nk
Decimal:
29 131 n1 … nk
Value of n:
n specifies the defined data (Raster image format)
Range of n:
0 – 255
Value of k: k = 144 : 80mm, k = 106 : 58mm
Description : For each printed dot row starting at the top left, two-part bit strings are used to define (in the
first half), all dots that are of either color (i.e. not white). The second half string defines only the dots
where the color is black. Thus all dots which are on in the first half string but not on in the second half
string, select the secondary color. The parameter of this command is thus a string of bytes for one dot
row with the same structure as defined for the thermal color format file given in the download color logo
command. This command is used for printing a single raster of color graphics in real-time. Offsets, page
and any other modes or overlays, including watermark, and current color do not apply to this command.
A complete rendering of the intended final image has to be done by the application before sending the
dot rows.
3.5.3
Define Bitmap File as Logo
ASCII:
ESC (+*.BMP file)
Hexadecimal: 1B (+*.BMP file)
Decimal:
27 (+*.BMP file)
Value:
Maximum width = 576
Maximum height = 512
It defines the monochrome BMP file as the user-defined logo into the target memory. As for the detail of
logo definition sequence, please refer to “Select the Current Logo” command.
Exceptions:
BMP file images must be monochrome image format, otherwise it is ignored. If the logo size of this
command is larger than the free space of the user-defined logo area of the flash memory, a logo is
tentatively stored into RAM and this status is reflected to bit 3 in Flash memory user sector status
(parameter n=4, 52) of Transmit Status(1D 72) command.
When this command is executed, all images stored in the user defined logo area of the flash memory /
RAM defined by Define Logo in Flash Memory by the key code command or Define Logo in RAM by the
key code command are erased.
34
PROGRAMMING GUIDE
3.5.4
Select Bit Image Mode
ASCII:
ESC * m n1 n2 d1 ... dn
Hexadecimal: 1B 2A m n1 n2 d1 ... dn
Decimal:
27 42 m n1 n2 d1 ... dn
It prints the bit image data defined by “d” according to the mode specified by m as follows.
Values:
m
0
Mode
8 Dot Single Density
Vertical direction
8 (68DPI)
1
8 Dot Double Density
8 (68DPI)
32
24 Dot Single Density
24 (203DPI)
33
24 Dot Double Density
24 (203DPI)
n (8 Dot Single Density Mode)
n1 + (256 x n2)
Horizontal direction
No. of Dots/Line
0-288 (101DPI, 80mm)
0-212 (101DPI, 58mm)
0-576 (203DPI, 80mm)
0-424 (203DPI, 58mm)
0-288 (101DPI, 80mm)
0-212 (101DPI, 58mm)
0-576 (203DPI, 80mm)
0-424 (203DPI, 58mm)
8x288 (80 mm)
8x212 (58 mm)
8x576 (80 mm)
8x424 (58 mm)
24x288 (80 mm)
24x212 (58 mm)
24x576 (80 mm)
24x424 (58 mm)
n (24 dot Single Density Mode)
3 x [ n1 + (256 x n2)]
Formulas:
8 Dot Single Density n1 + (256 x n2)
24 Dot Single Density 3 x [n1 + (256 x n2)]
35
d
Number of Bytes of Data
PROGRAMMING GUIDE
8 Dot Single Density Mode
MSB
d
1
d
2
d
3
LSB
24 Dots Single Density Mode – Receipt Only
MSB
d
1
d
4
d
7
LSB
d
2
d
5
d
8
d
3
d
6
d
9
3.5.5
Select bit-image mode - Line Graphics
ASCII:
ESC * 1 n1 n2 d1 ... dn
Hexadecimal: 1B 2A 31 n1 n2 d1 ... dn
Decimal:
27 42 49 n1 n2 d1 ... dn
Description:
Selects a bit-image mode for a single line graphics
Notes:
• The command is enabled only when input at the beginning of the line.
• [d] contains nL + 256 * nH data byte and contains the pixel information beginning
with the actual position.
• The MSB of the first byte corresponds to the first pixel (on the left side) and the LSB
of the last byte corresponds to the last pixel (on the right side).
• If a data bit is set the corresponding pixel is switched on.
• If the number of columns determined in this way is smaller than the printing area, the
remaining pixels are filled with zeros.
• If the number of columns determined in this way is larger than the printing area, the
extra data bytes have no effect and are ignored.
• After the graphics has been printed, the printer returns to the normal data
processing mode.
• After the graphics has been printed, the cursor is at the print starting position.
• The typical data length is 72 bytes (= 576 dots). If the data length is greater than 72
bytes, only 72 bytes are printed but the remaining bytes are read and deleted.
• The driver has to send 148 nullbytes to the printer before the printer is opened by the
36
PROGRAMMING GUIDE
application. Thus it is guaranteed that the printer has left the graphics function even if
the graphics data stream was interrupted.
• If two-color paper is selected, two lines will be merged to one line. The first line
defines the secondary color (i.e. red) and second line defines the primary color
(black). is the For each printed dot row starting at the top left, two-part bit strings are
used to define (in the first half), all dots that are of either color (i.e. not white). The
second half string defines only the dots where the color is black. Caution: If two-color
paper is selected, two lines for one line are exepted. Der internal Buffer collects 256
lines. If one line missed, the whole buffer will be restrained until the lost line or another
command follows.
• If the compression bit is set by ESC * b m.
• If decompression activated, data bit will be decompressed with TIFF 4.0 Packbits
Decompression.
• TIFF 4.0 Compression pseudo code:
for (all packed bytes)
{
n = next byte;
if (0 ≤ n ≤ 127)
Take on the next n+1 byte directly;
else
// -128 ≤ n ≤ -1
Copy the next byte (-n+1)-times;
}
3.5.6
Turn on/off TIFF compression
ASCII:
ESC * b m n
Hexadecimal: 1B 2A 62 m n
Decimal:
27 42 98 m n
Range:
n = 0,2,48,50
Default:
n=0
Description:
Turns the TIFF compression on (n = 2, 50) or off. (n = 0, 48).
Note:
Decompression is used by ESC * 1
Decompression used TIFF 4.0 Packbits Decompression
3.5.7
Print Advanced Raster Graphics
ASCII:
ESC . m n rl rh d1…dn
Hexadecimal: 1B 2E m n rl rh d1…dn
Decimal:
27 46 m n rl rh d1…dn
Value of m:
Horizontal offset from left margin = 8 x m dots
Value of n:
Number of data bytes that compose the raster
Value of r:
Number of raster lines (256 x rh + rl)
Value of d:
d1 … dn
Range:
0  m, n  72 (80mm), 0  m, n  53 (58mm)
0  r  65536
0  d1 … dn  255
It prints the raster graphic data specified by “d” with the offset value specified by “m”.
37
PROGRAMMING GUIDE
Exceptions:
Advanced Raster graphics is not available in Page Mode.
3.5.8
Select Single Density Graphics
ASCII:
ESC K n1 n2 d1 … dn
Hexadecimal: 1B 4B n1 n2 d1 ... dn
Decimal:
27 75 n1 n2 d1 ... dn
Values:
n
[ n1 + (256 x n2)]
d
Number of Bytes of Data
It prints the bit image data defined by “d” in 8 dots single density mode. The usage of this command is
completely same as 8 Dot Single Density Mode (m=0) of Select Bit Image Mode (1B 2A m n1 n2 d1 ...
dn) command.
3.5.9
Select Double-Density Graphics
ASCII:
ESC Y n1 n2 d1 … dn
Hexadecimal: 1B 59 n1 n2 d1 ... dn
Decimal:
27 89 n1 n2 d1 ... dn
Values:
n
[ n1 + (256 x n2)]
d
Number of Bytes of Data
It prints the bit image data defined by “d” in 8 dots double density mode. The usage of this command is
completely same as 8 Dot Double Density Mode (m=1) of Select Bit Image Mode (1B 2A m n1 n2 d1 ...
dn) command.
3.5.10
Print raster bit image
ASCII:
GS v 0 m xL xH yL yH d1…dk
Hexadecimal: 1D 76 30 m xL xH yL yH d1…dk
Decimal:
29 118 48 m xL xH yL yH d1…dk
Value of xL, xH: xL, xH specify the number of bytes in the horizontal direction as (xL + xH x 256)
Value of yL, yH: yL, yH specify the number of dots in the vertical direction as (yL + yH x 256)
Value of d:
d specifies the defined data (raster format)
Range:
0 ≤ m ≤ 3, 48 ≤ m ≤ 51
1 ≤ (xL + xH x 256) ≤ 65535
(0 ≤ xL ≤ 255, 0 ≤ xH ≤ 255)
1 ≤ (yL + yH x 256) ≤ 2303
(0 ≤ yL ≤ 255, 0 ≤ yH ≤ 8)
0 ≤ d ≤ 255
k = (xL + xH x 256) x (yL + yH x 256)
Value and Range of m:
m
0, 48
Normal
1, 49
Double Width
2, 50
Double Height
3, 51
Quadruple
Function
It prints a raster bit image using the mode specified by m.
3.5.11
Select the Current Logo
ASCII:
GS # n
Hexadecimal: 1D 23 n
Decimal:
29 35 n
Value of n:
Logo ID
38
PROGRAMMING GUIDE
Range of n:
0 – 255
It selects the current user-defined logo according to ID specified by “n” when a user defines a logo or
prints a logo.
1. Logo definition
Whenever a user defines a logo, first of all, the logo ID has to be specified by this command so that the
logo is defined with this ID. The sequence is as follows.
1) Select the current logo with ID by this command
2) Specify the target memory (RAM or Flash memory) to define the current logo by Select Memory
Type for User Defined Data(1D 22 n) command
3) Define the current logo by either Define Bitmap File as Logo(1B + BMP file) command or Define Bit
Image as Logo (1D 2A n1 n2 d1 ... dn) command
If there is the existing logo with same ID already, the new logo replaces it, and the old logo is
deactivated. The deactivated logo data is not erased from the user-defined logo area.
2. Logo print
When a user prints a logo, the logo ID that user wants to print has to be specified by this command. The
sequence is as follows.
1) Select the current logo with ID by this command
2) Print the logo by Print Current Logo (1D 2F m) command
The current logo selected is not changed either until the different ID is specified by this command or the
printer is turned off. The default ID after power on is zero.
Related Information:
Select Memory Type for User Defined Data (1D 22 n)
Print Current Logo (1D 2F m)
Define Bitmap File as Logo (1B + BMP file) command
Define Bit Image as Logo (1D 2A n1 n2 d1 ... dn) command
Erase User-defined storage area in Flash Memory (1D 40 n)
39
PROGRAMMING GUIDE
3.5.12
Define Bit Image as Logo
ASCII:
GS * n1 n2 d1 ... dn
Hexadecimal: 1D 2A n1 n2 d1 ... dn
Decimal:
29 42 n1 n2 d1 ... dn
Value of n1:
See the following table.
Value of n2:
See the following table.
Value of d:
See the following table.
Value of n1
Value of n2
1 – 80
(8 x n1: Number of Horizontal dots)
1 – 64
(Number of Vertical Bytes) *
Value of d
Bytes of Data
(Printed dow n, then across)
The number of bytes sent is calculated by the following formula:
n = 8 x n1 x n2 (1 ≤ n1 x n2 ≤ 5120).
It defines the user-defined logo into the target memory in the same manner as Define Bitmap File as
Logo (1B+BMP file) command. As for the detail of logo definition sequence, please refer to “Select the
Current Logo” command.
Format of the downloaded bit image:
x  8 dots : x (max. 72)
MSB
d
1
LSB
d
2
y  8 dots
y(max)=64
d
y
Exceptions:
If the logo size of this command is larger than the free space of the user-defined logo area of the flash
memory, a logo is tentatively stored into RAM and this status is reflected to bit 3 in Flash memory user
sector status (parameter n=4, 52) of Transmit Status(1D 72) command.
When this command is executed, all images stored in the user defined logo area of the flash memory /
RAM defined by Define Logo in Flash Memory by the key code command or Define Logo in RAM by the
key code command are erased.
In RS232C interface, DSR signal is activated (ON) while writing logo data into the flash memory.
40
PROGRAMMING GUIDE
3.5.13
Print Current Logo
ASCII:
GS / m
Hexadecimal: 1D 2F m
Decimal:
29 47 m
Value and Range of m:
Value of m
Print Mode
0,48
1,49
2,50
3,51
Normal
Double Width
Double Height
Quadruple
Vertical DPI
203
203
101
101
Horizontal DPI
203
101
203
101
It prints the current logo. As for the detail of logo definition sequence, please refer to “Select the Current
Logo” command.
3.5.14
Print Logo
ASCII:
FS p n m
Hexadecimal: 1C 70 n m
Decimal:
28 112 n m
Value of n:
Logo ID
Range of n:
0 - 255
Value and Range of m:
Value of m
Print Mode
0,
1,
2,
3,
Normal
Double Width
Double Height
Quadruple
48
49
50
51
Vertical DPI1
203
203
101
101
Horizontal DPI1
203
101
203
101
It prints the logo specified by n in the density specified by m.
As for the detail of logo definition sequence, please refer to “Select the Current Logo” command.
3.5.15
Define Logo in Flash Memory
ASCII:
FS q n [xL xH yL yH d1…dk] 1…[xL xH yL yH d1… dk]n
Hexadecimal: 1C 71 n [xL xH yL yH d1…dk] 1…[xL xH yL yH d1… dk]n
Decimal:
28 113 n [xL xH yL yH d1…dk] 1…[xL xH yL yH d1… dk]n
Value of xL, xH: xL, xH specify the number of bytes in the horizontal direction as (xL + xH x 256)
Value of yL, yH: yL, yH specify the number of dots in the vertical direction as (yL + yH x 256)
Value of d:
d specifies the defined data (raster format)
Range:
1 ≤ n ≤ 255
1 ≤ (xL + xH x 256) ≤ 1023
(0 ≤ xL ≤ 255, 0 ≤ xH ≤ 3)
1 ≤ (yL + yH x 256) ≤ 288 (0 ≤ yL ≤ 255, yH = 0, 1)
0 ≤ d ≤ 255
k = (xL + xH x 256) x (yL + yH x 256) x 8
Value of n:
Logo number
e.g. n=3, three logo images are defined and each logo number is 1, 2 and 3.
It defines logos images specified by n in the flash memory. Logos defined by this command are printed
by Print Logo command (1C 70) according to logo number “n”.
1
Dot density measured in dots per inch
41
PROGRAMMING GUIDE
3.5.16
Convert 6 Dots/mm Bitmap to 8 Dots/mm
ASCII:
US EOT n
Hexadecimal: 1F 04 n
Decimal:
31 04 n
Value of n:
0 = off
1 = on
Default:
0 (Off)
It converts 6 dots/mm image data to 8 Dots/mm. Once it is enabled, all image data such as logos and
graphics are expanded horizontally and vertically to emulate its size on a 6 dot/mm printer. It also
emulates the horizontal specified by the horizontal positioning commands.
3.5.17
Transmit entire capacity of User-defined logo in Flash Memory
ASCII:
GS ( L pL pH m fn
Hexadecimal: 1D 28 4C pL pH m fn
Decimal:
29 40 76 pL pH m fn
Range of pL,pH:(pL + pH x 256) = 2
(pL = 2, pH = 0)
ASCII:
Hexadecimal:
Decimal:
Range of pn:
GS 8 L p1 p2 p3 p4 m fn
1D 38 4C p1 p2 p3 p4 m fn
29 56 76 p1 p2 p3 p4 m fn
(p1 + p2 x 256 +p3 x 65536 + p4 x 16777216) = 2 (p1 =2 , p2 = 0, p3 = 0, p4 = 0)
Value of m:
Value of fn:
m = 48
fn = 0, 48
It transmits the entire capacity of the Flash Memory area (number of bytes)
Response format:
The decimal value is converted to text data and sent starting from the high order end.
(Example: 123456 byte -> 0x37 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x00)
Response
Hex
Decimal
Data
Header
37 H
55
1 byte
Identifier
30 H
48
1 byte
Data
30 H to 39H
48 to 57
1 to 8 byte
NUL
00 H
0
1 byte
3.5.18
Transmit Remaining Size for User-defined Logo Area in Flash Memory
ASCII:
GS ( L pL pH m fn
Hexadecimal: 1D 28 4C pL pH m fn
Decimal:
29 40 76 pL pH m fn
Range of pL,pH:(pL + pH x 256) = 2
(pL = 2, pH = 0)
ASCII:
Hexadecimal:
Decimal:
Range of pn:
GS 8 L p1 p2 p3 p4 m fn
1D 38 4C p1 p2 p3 p4 m fn
29 56 76 p1 p2 p3 p4 m fn
(p1 + p2 x 256 +p3 x 65536 + p4 x 16777216) = 2 (p1 =2 , p2 = 0, p3 = 0, p4 = 0)
Value of m:
Value of fn:
m = 48
fn = 3,51
It transmits the number of bytes of remaining memory (unused area) in the Flash memory area.
Response format:
The decimal value is converted to text data and sent starting from the high order end.
(Example: 123456 byte -> 0x37 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x00)
42
PROGRAMMING GUIDE
Response
Header
Identifier
Data
NUL
3.5.19
Hex
37 H
31 H
30 H to 39H
00 H
Decimal
55
49
48 to 57
0
Data
1 byte
1 byte
1 to 8 byte
1 byte
Transmit Remaining Size for User-defined Logo Area in RAM
ASCII:
GS ( L pL pH m fn
Hexadecimal: 1D 28 4C pL pH m fn
Decimal:
29 40 76 pL pH m fn
Range of pL, pH:(pL + pH x 256) = 2 (pL = 2, pH = 0)
ASCII:
Hexadecimal:
Decimal:
Range of pn:
GS 8 L p1 p2 p3 p4 m fn
1D 38 4C p1 p2 p3 p4 m fn
29 56 76 p1 p2 p3 p4 m fn
(p1 + p2 x 256 +p3 x 65536 + p4 x 16777216) = 2 (p1 =2 , p2 = 0, p3 = 0, p4 = 0)
Value of m:
Value of fn:
m = 48
fn = 4, 52
It transmits the number of bytes of remaining memory (unused area) in the RAM.
Response format:
The decimal value is converted to text data and sent starting from the high order end.
(Example: 123456 byte -> 0x37 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x00)
Response
Hex
Decimal
Data
Header
37 H
55
1 byte
Identifier
32 H
50
1 byte
Data
30 H to 39H
48 to 57
1 to 8 byte
NUL
00 H
0
1 byte
3.5.20
Transmit the key code for User-defined Logo in Flash Memory
ASCII:
GS ( L pL pH m fn d1 d2
Hexadecimal: 1D 28 4C pL pH m fn d1 d2
Decimal:
29 40 76 pL pH m fn d1 d2
Range of pL, pH:(pL + pH x 256) = 4 (pL = 4, pH = 0)
ASCII:
Hexadecimal:
Decimal:
Range of pn:
GS 8 L p1 p2 p3 p4 m fn d1 d2
1D 38 4C p1 p2 p3 p4 m fn d1 d2
29 56 76 p1 p2 p3 p4 m fn d1 d2
(p1 + p2 x 256 +p3 x 65536 + p4 x 16777216) = 4 (p1 =4 , p2 = 0, p3 = 0, p4 = 0)
Value of m:
Value of fn:
Value of d1:
Value of d2:
m = 48
fn = 64
d1 = 75
d2 = 67
It transmits the key code list for defined in Flash Memory.
Transmission data is as follows.
Response
Hex
Decimal
(1) Header
37 H
55
(2) Identifier
72 H
114
(3) Type
40 H
64
(4) Data
30 H to 39H
48 to 57
(5) NUL
00 H
0
43
Data
1 byte
1 byte
1 byte
0 byte ~
1 byte
PROGRAMMING GUIDE
Example: When two logo are defined with key code” kc1=0x20, kc2=0x21” and ” kc1=0x22, kc2=0x23”,
command response is “0x37 0x72 0x40 0x20 0x21 0x22 0x23 0x00”. If no logo with key code are
defined, response is “0x37 0x72 0x40 0x00”.
3.5.21
Delete all Logo in Flash Memory
ASCII:
GS ( L pL pH m fn d1 d2 d3
Hexadecimal: 1D 28 4C pL pH m fn d1 d2 d3
Range:
29 40 76 pL pH m fn d1 d2 d3
Range of pL, pH: (pL + pH x 256) = 5 (pL = 5, pH = 0)
ASCII:
GS 8 L p1 p2 p3 p4 m fn d1 d2 d3
Hexadecimal: 1D 38 4C p1 p2 p3 p4 m fn d1 d2 d3
Decimal:
29 56 76 p1 p2 p3 p4 m fn d1 d2 d3
Range of pn: (p1 + p2 x 256 +p3 x 65536 + p4 x 16777216) = 5 (p1 =5 , p2 = 0, p3 = 0, p4 = 0)
Value of m: m = 48
Value of fn: fn = 65
Value of d1: d1 = 67
Value of d2: d2 = 76
Value of d3: d3 = 82
It deletes all defined logo in Flash Memory.
3.5.22
Delete User-defined Logo in Flash Memory
ASCII:
GS ( L pL pH m fn kc1 kc2
Hexadecimal:
1D 28 4C pL p m fn kc1 kc2
Decimal:
29 40 76 pL pH m fn kc1 kc2
Range of pL, pH: 0 ≤ (pL + pH × 256) ≤ 65535
It indicates the total number of bytes of subsequent data after pH.
Value of pL, pH:
4 (pL = 4, pH = 0)
Value of m:
48
Value of fn:
66
Range of kc1:
32 ≤ kc1 ≤ 126
Range of kc2:
32 ≤ kc2 ≤ 126
It deletes the logo in the user-defined logo area of the flash memory defined by the key codes (kc1 and
kc2) of Define Logo in Flash Memory by the key code command.
Exceptions:
This command is not available for logos defined by Define Bitmap File as Logo (1B + BMP file)
command and Define Bit Image as Logo (1D 2A n1 n2 d1 ... dn) command.
3.5.23
Define Logo in Flash Memory by the key code
ASCII:
GS 8L p1, p2, p3, p4 m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b
Hexadecimal:
1D 38 4C p1, p2, p3, p4 m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b
Decimal:
29 40 76 pL pH m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b
Range of pn:
12 ≤ (p1 + p2 × 256 + p3 × 65536 + p4 × 16777216) ≤ 663566
(0 ≤ p1 ≤ 255, 0 ≤ p2 ≤ 255, 0 ≤ p3 ≤ 255, 0 ≤ p4 ≤ 255)
It indicates the total number of bytes of subsequent data after p4.
Value of m:
m = 48
Value of fn:
fn = 67
Value of a:
a = 48, 52
Range of kc1:
32 ≤ kc1 ≤ 126
Range of kc2:
32 ≤ kc2 ≤ 126
Range of b:
b = 1 (when a = 48)
44
PROGRAMMING GUIDE
Range of xL, xH:
Range of yL, yH:
Range of c:
Range of d:
Value of k:
1 ≤ b ≤ 4 (when a = 52)
1 ≤ (xL + xH × 256) ≤ 576 (0 ≤ xL ≤ 255, 0 ≤ xH ≤ 2)
1 ≤ (yL + yH × 256) ≤ 2304 (0 ≤ yL ≤ 255, 0 ≤ yH ≤ 9)
c = 49 (when a = 48)
49 ≤ c ≤ 52 (when a = 52)
0 ≤ d ≤ 255
k = (int ((xL + xH × 256) + 7) / 8) × (yL + yH × 256)
It defines the graphics data (raster format) as the logo specified by the key codes (kc1, kc2) in the userdefined logo area of the flash memory.
a: specifies the data format of the defined data.
48: Monochrome (digital)
52: Multi-tone
b: specifies the number of the color of the defined data.
The number of the selectable color (b) is 1 when a = 48 (monochrome).
The number of the selectable color (b) is 1 ~ 4 when a = 52 (multi-tone).
xL, xH: specify the number of dots in the horizontal direction as (xL + xH × 256).
yL, yH: specify the number of dots in the vertical direction as (yL + yH × 256).
c: specifies the color of the defined data.
49: Color 1
50: Color 2
51: Color 3
52: Color 4
The color of the selectable defined data (c) is Color 1 when a = 48 (monochrome).
The colors of the selectable defined data (c) are Color 1 ~ Color 4 when a = 52 (multi-tone).
d: specifies the defined data (raster format).
Exceptions:
The maximum width of each logo is 576/203 inches, and the maximum height of each logo is 2304/203
inches. If a logo size is more than this, it is not printed.
If the graphic size defined by this command is larger than the free space of the user defined logo area of
the flash memory, it firstly erases all logo data in the user-defined area and defines this new logo data.
When this command is executed, all images stored in the user defined logo area of the flash memory
defined by Define Bitmap File as Logo (1B + BMP file) command and Define Bit Image as Logo (1D 2A
n1 n2 d1 ... dn) command are erased.
45
PROGRAMMING GUIDE
Graphic data format and Formula
d1
d2
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
level 12
level 6
level 16
level 2
level 1
level 15
level 3
level 16
Color 1
1
0
1
0
0
1
0
1
Color 2
0
1
1
0
0
1
0
1
Color 3
1
0
1
0
0
1
1
1
Color 4
1
1
1
1
0
0
0
1
Gray level
Color 1
Color 2
Color 3
Color 4
Level1
0
0
0
0
Level2
0
0
0
1
Level3
0
0
1
0
Level4
0
0
1
1
Level5
0
1
0
0
Level6
0
1
0
1
Level7
0
1
1
0
Level8
0
1
1
1
Level9
1
0
0
0
Level10
1
0
0
1
Level11
1
0
1
0
Level12
1
0
1
1
Level13
1
1
0
0
Level14
1
1
0
1
Level15
1
1
1
0
Level16
1
1
1
1
7
6
5
4
dk
3
2
1
0 ・・・ 7
6
5
4
3
2
1
0
= 0xA5
= 0x65
= 0xA7
= 0xF1
1D 38 4C…. [c d1...dk]1...[c d1...dk]4
c = 49 (Color 1)
d1 = 0xA5
c = 52 (Color 4)
d1 = 0xF1
Each bit of raster data (d1, d2 ….dk) consists of
4 colors (color 1, color 2, color 3 and color 4)
according gray level specified in this chart.
3.5.24
Print User-defined Logo in Flash Memory
ASCII:
GS ( L pL pH m fn kc1 kc2 x y
Hex:
1D 28 4C pL pH m fn kc1 kc2 x y
Decimal:
29 40 76 pL pH m fn kc1 kc2 x y
Range of pL, pH: 0 ≤ (pL + pH × 256) ≤ 65535
It indicates the total number of bytes of subsequent data after pH.
Value of pL, pH:
6 (pL = 6, pH = 0)
Value of m:
48
Value of fn:
fn = 69
Range of Kc1:
32 ≤ kc1 ≤ 126
Range of Kc2:
32 ≤ kc2 ≤ 126
Value of x:
1, 2
Value of y:
1, 2
It prints the user-defined logo defined by the key codes (kc1 and kc2) of Define Logo in Flash Memory
by the key code command. The logo image is enlarged by x and y in the horizontal and vertical
directions.
Exceptions:
This command is not available for logos defined by Define Bitmap File as Logo (1B + BMP file)
command and Define Bit Image as Logo (1D 2A n1 n2 d1 ... dn) command.
3.5.25
Transmit the key code for User-defined Logo in RAM
ASCII:
GS ( L pL pH m fn d1 d2
Hexadecimal: 1D 28 4C pL pH m fn d1 d2
Decimal:
29 40 76 pL pH m fn d1 d2
Range of pL, pH:
(pL + pH x 256) = 4
46
(pL = 4, pH = 0)
PROGRAMMING GUIDE
ASCII:
GS 8 L p1 p2 p3 p4 m fn d1 d2
Hexadecimal: 1D 38 4C p1 p2 p3 p4 m fn d1 d2
Decimal:
29 56 76 p1 p2 p3 p4 m fn d1 d2
Range of pn: (p1 + p2 x 256 +p3 x 65536 + p4 x 16777216) = 4 (p1 =4 , p2 = 0, p3 = 0, p4 = 0)
Value of m: m = 48
Value of fn: fn = 80
Value of d1: d1 = 75
Value of d2: d2 = 67
It transmits the key code list for defined in RAM.
Transmission data is as follows.
Response
Hex
Decimal
Data
(1) Header
37 H
55
1 byte
(2) Identifier
73 H
115
1 byte
(3) Type
40 H
64
1 byte
(4) Data
30 H to 39H
48 to 57
0 byte ~
(5) NUL
00 H
0
1 byte
Example: When two logo are defined with key code” kc1=0x20, kc2=0x21” and ” kc1=0x22, kc2=0x23”,
command response is “0x37 0x73 0x40 0x20 0x21 0x22 0x23 0x00”. If no logo with key code are
defined, response is “0x37 0x73 0x40 0x00”.
3.5.26
Delete all User-defined Logo in RAM
ASCII:
GS ( L pL pH m fn d1 d2 d3
Hexadecimal:1D 28 4C pL pH m fn d1 d2 d3
Decimal:
29 40 76 pL pH m fn d1 d2 d3
Range of pL,pH:
(pL + pH x 256) = 5 (pL = 5, pH = 0)
ASCII:
GS 8 L p1 p2 p3 p4 m fn d1 d2 d3
Hexadecimal:1D 38 4C p1 p2 p3 p4 m fn d1 d2 d3
Decimal:
29 56 76 p1 p2 p3 p4 m fn d1 d2 d3
Range of pn: (p1 + p2 x 256 +p3 x 65536 + p4 x 16777216) = 5 (p1 =5 , p2 = 0, p3 = 0, p4 = 0)
Value of m: m = 48
Value of fn: fn = 81
Value of d1: d1 = 67
Value of d2: d2 = 76
Value of d3: d2 = 82
It deletes all defined download logo in RAM.
47
PROGRAMMING GUIDE
3.5.27
Delete User-defined Logo in RAM
ASCII:
GS ( L pL pH m fn kc1 kc2
Hexadecimal:
1D 28 4C pL pH m fn kc1 kc2
Decimal:
29 40 76 pL pH m fn kc1 kc2
Range of pL, pH: 0 ≤ (pL + pH × 256) ≤ 65535
It indicates the total number of bytes of subsequent data after pH.
Value of pL, pH:
4 (pL = 4, pH = 0)
Value of m:
48
Value of fn:
82
Range of kc1:
32 ≤ kc1 ≤ 126
Range of kc2:
32 ≤ kc2 ≤ 126
It deletes the logo in the user-defined logo area of RAM defined by the key codes (kc1 and kc2) of
Define Logo in RAM by the key code command.
Exceptions:
This command is not available for logos defined by Define Bitmap File as Logo (1B + BMP file)
command and Define Bit Image as Logo (1D 2A n1 n2 d1 ... dn) command.
3.5.28
Define Logo in RAM by the key code
ASCII:
GS 8L p1, p2, p3, p4 m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b
Hexadecimal:
1D 38 4C p1, p2, p3, p4 m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b
Decimal:
29 40 76 pL pH m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b
Value of pn:
12 ≤ (p1 + p2 × 256 + p3 × 65536 + p4 × 16777216) ≤ 663566
(0 ≤ p1 ≤ 255, 0 ≤ p2 ≤ 255, 0 ≤ p3 ≤ 255, 0 ≤ p4 ≤ 255)
It indicates the total number of bytes of subsequent data after p4.
Value of m:
m = 48
Value of fn:
fn = 83
Value of a:
a = 48, 52
Range of kc1:
32 ≤ kc1 ≤ 126
Range of kc2:
32 ≤ kc2 ≤ 126
Range of b:
b = 1 (when a = 48)
1 ≤ b ≤ 4 (when a = 52)
Range of xL, xH: 1 ≤ (xL + xH × 256) ≤ 576 (0 ≤ xL ≤ 255, 0 ≤ xH ≤ 2)
Range of yL, yH: 1 ≤ (yL + yH × 256) ≤ 2304 (0 ≤ yL ≤ 255, 0 ≤ yH ≤ 9)
Range of c:
c = 49 (when a = 48)
49 ≤ c ≤ 52 (when a = 52)
Range of d:
0 ≤ d ≤ 255
Value of k:
k = (int ((xL + xH × 256) + 7) / 8) × (yL + yH × 256)
It defines the graphics data (raster format) as the logo specified by the key codes (kc1, kc2) in the userdefined logo area of RAM. Graphic data format is completely same as Define Logo in Flash Memory by
the key code command (1D 38 4C).
a: specifies the data format of the defined data.
48: Monochrome (digital)
52: Multi-tone
b: specifies the number of the color of the defined data.
The number of the selectable color (b) is 1 when a = 48 (monochrome).
The number of the selectable color (b) is 1 ~ 4 when a = 52 (multi-tone).
xL, xH: specify the number of dots in the horizontal direction as (xL + xH × 256).
yL, yH: specify the number of dots in the vertical direction as (yL + yH × 256).
c: specifies the color of the defined data.
49: Color 1
50: Color 2
51: Color 3
52: Color 4
48
PROGRAMMING GUIDE
The color of the selectable defined data (c) is Color 1 when a = 48 (monochrome).
The colors of the selectable defined data (c) are Color 1 ~ Color 4 when a = 52 (multi-tone).
d: specifies the defined data (raster format).
Exceptions:
The maximum width of each logo is 576/203 inches, and the maximum height of each logo is 2304/203
inches. If a logo size is more than this, it is not printed.
If the graphic size defined by this command is larger than the free space of the user defined logo area of
the flash memory, it firstly erases all logo data in the user-defined area and defines this new logo data.
When this command is executed, all images stored in the user defined logo area of RAM defined by
Define Bitmap File as Logo (1B + BMP file) command and Define Bit Image as Logo (1D 2A n1 n2 d1 ...
dn) command are erased.
3.5.29
Print User-defined Logo in RAM
ASCII:
GS ( L pL pH m fn kc1 kc2 x y
Hex:
1D 28 4C pL pH m fn kc1 kc2 x y
Decimal:
29 40 76 pL pH m fn kc1 kc2 x y
Range of pL, pH: 0 ≤ (pL + pH × 256) ≤ 65535
It indicates the total number of bytes of subsequent data after pH.
Value of pL, pH:
6 (pL = 6, pH = 0)
Value of m:
48
Value of fn:
85
Range of Kc1:
32 ≤ kc1 ≤ 126
Range of Kc2:
32 ≤ kc2 ≤ 126
Value of x:
1, 2
Value of y:
1, 2
It prints the user-defined logo defined by the key codes (kc1 and kc2) of Define Logo in RAM by the key
code command. The logo image is enlarged by x and y in the horizontal and vertical directions.
Exceptions:
This command is not available for logos defined by Define Bitmap File as Logo (1B + BMP file)
command and Define Bit Image as Logo (1D 2A n1 n2 d1 ... dn) command.
3.5.30
Enable Watermark printing
ASCII:
GS ( L pL pH m fn kc1 kc2 x y b yL, yH
Hex:
1D 28 4C pL pH m fn kc1 kc2 x y b yL, yH
Decimal:
29 40 76 pL pH m fn kc1 kc2 x y b yL, yH
Range of pL, pH: 0 ≤ (pL + pH × 256) ≤ 65535
It indicates the total number of bytes of subsequent data after pH.
Value of pL, pH:
9 (pL =9, pH = 0)
Value of m:
48
Value of fn:
99
Range of Kc1:
32 ≤ kc1 ≤ 126
Range of Kc2:
32 ≤ kc2 ≤ 126
Value of x:
1, 2
Value of y:
1, 2
Range of b:
0≤ b≤ 5
Range of yL, yH: 1 ≤ (yL + yH × 256) ≤ 2304 (0 ≤ yL ≤ 255, 0 ≤ yH ≤ 9)
x, y: It specifies the horizontal / vertical magnification. The watermark is enlarged by x and y in the
horizontal and vertical directions.
b: It specifies the alignment of the watermark
0: Left alignment
1: Center alignment
2: Right alignment
3: Roll 1 (Left -> Center -> Right -> Left -> ...)
49
PROGRAMMING GUIDE
4: Roll 2 (Right -> Center -> Left -> Right -> ...)
5: Twist (Left -> Center -> Right -> Center -> Left -> ...)
yL, yH: It specifies the offset from the bottom of one watermark to the top of the next watermark by the
number of dots in the vertical direction as (yL + yH × 256).
It enables to use the logo defined by either Define Logo in Flash Memory by the key code (kc1 and kc2)
command or Define Logo in RAM by the key code (kc1 and kc2) as watermark.
If the key code (kc1 and kc2) is out of the range or there is no logo registered in the specified key code,
it disables the watermark.
If there are data in the print buffer when the watermark is enabled by this command, the printer enables
the watermark after it forcefully all prints data in the print buffer with one line feed at the end.
It similarly prints all the data in the print buffer when the watermark is disabled by this command.
Watermark will be disable when power off printer.
Exceptions:
This command is not available for logos defined by Define Bitmap File as Logo (1B + BMP file)
command and Define Bit Image as Logo (1D 2A n1 n2 d1 ... dn) command.
Due to the memory restriction, one cycle of the watermark which includes offset as follows has to be
within 2500 raster (=12.3 inches), and the height of a logo printed in Watermark mode has to be within
2250 raster (=11 inches)..
Left / Center / Right Alignment
WaterMark
Roll 1 / Roll 2 Alignment
Twist Alignment
WaterMark
WaterMark
One Cycle
WaterMark
Max.2500
raster
WaterMark
WaterMark
One Cycle
WaterMark
WaterMark
WaterMark
WaterMark
WaterMark
LOGO
WaterMark
Max.2500
raster
One Cycle
WaterMark
WaterMark
WaterMark
Max.2250
raster
WaterMark
50
WaterMark
WaterMark
Max.2500
raster
PROGRAMMING GUIDE
3.5.31
Transmits set values for Watermark
ASCII:
Hexadecimal:
Decimal:
Range:
GS ( L pL pH m fn
1D 28 4C pL pH m fn
29 40 76 pL pH m fn
(pL + pH x 256) = 2 (pL = 2, pH = 0)
m = 48
fn = 100
Data to be transmitted is as follows:
Data to be transmitted
Hex
Header
38 H
Extension
48 H
Watermark Disable/Enable
30H,31H
Flash graphics key codes
20H to 7EH
Justification setting
30H to 35 H
Magnification X
31H or 32H
Magnification Y
31H or 32H
Extension
48 H
Watermark offset position.
30H to 39H
NUL
00 H
Decimal
56
72
48,49
32 to 126
48 to 53
49,50
49,50
72
48 to 57
0
Data amount
1 byte
1 byte
1 byte
0 to 2 bytes
0 to1 byte
0 to 1 bytes
0 to 1 bytes
0 to 1 byte
0 to 4 bytes
1 byte
3.5.32
Transmit Remaining Size for User-defined Logo Area
ASCII:
GS
(
L
pL
pH
m
fn
Hexadecimal:
1D
28
4C
pL
pH
m
fn
Decimal:
29
40
76
pL
pH
m
fn
Range:
(pL + pH x 256) = 2 (pL = 2, pH = 0)
Value of m:
48
Value of fn:
3, 51: Flash memory
4, 52: RAM
It transmits the remaining memory size for user-defined Logo area in either flash memory or RAM.
Note:
Response format is as below.
The decimal value is converted to text data and sent starting from the high order end.
(Example: 123456 byte for RAM size -> 0x37 0x32 0x31 0x32 0x33 0x34 0x35 0x36 0x00)
Response
(1) Header
(2) Identifier
(3) Data
(4) NUL
Hex
37 H
31 H (Flash memory)
or
32 H (RAM)
30 H to 39H
00 H
51
Decimal
55
49 (Flash memory)
or
50 (RAM)
48 to 57
0
Data
1 byte
1 byte
1 to 8 byte
1 byte
PROGRAMMING GUIDE
3.5.33
Store the graphics data in the print buffer
ASCII:
GS 8L p1, p2, p3, p4 m fn a bx by c xL xH yL yH d1 … dk
Hexadecimal:
1D 38 4C p1, p2, p3, p4 m fn a bx by c xL xH yL yH d1 … dk
Decimal:
29 40 76 p1, p2, p3, p4 m fn a bx by c xL xH yL yH d1 … dk
Range of pn:
12 ≤ (p1 + p2 × 256 + p3 × 65536 + p4 × 16777216) ≤ 165900
(0 ≤ p1 ≤ 255, 0 ≤ p2 ≤ 255, 0 ≤ p3 ≤ 255, 0 ≤ p4 ≤ 255)
It indicates the total number of bytes of subsequent data after p4.
Value of m:
m = 48
Value of fn:
fn = 112
Value of a:
a = 48, 52
Value of bx:
bx = 1, 2
Value of by:
by = 1, 2
Range of xL, xH: 1 ≤ (xL + xH × 256) ≤ 576 (0 ≤ xL ≤ 255, 0 ≤ xH ≤ 2)
Range of yL, yH: 1 ≤ (yL + yH × 256) ≤ 2304 (0 ≤ yL ≤ 255, 0 ≤ yH ≤ 9)
Range of c:
c = 49 (when a = 48)
49 ≤ c ≤ 52 (when a = 52)
Range of d:
0 ≤ d ≤ 255
Value of k:
k = (int ((xL + xH × 256) + 7) / 8) × (yL + yH × 256)
It store the graphics data (raster format) in the print buffer
a: specifies the data format of the defined data.
48: Monochrome (digital)
52: Multi-tone
bx,by: The graphic image is enlarged by bx and by in the horizontal and vertical directions
xL, xH: specify the number of dots in the horizontal direction as (xL + xH × 256).
yL, yH: specify the number of dots in the vertical direction as (yL + yH × 256).
c: specifies the color of the defined data.
49: Color 1
50: Color 2
51: Color 3
52: Color 4
The color of the selectable defined data (c) is Color 1 when a = 48 (monochrome).
The colors of the selectable defined data (c) are Color 1 ~ Color 4 when a = 52 (multi-tone).
d: specifies the defined data (raster format).
Note: To print long grayscale image larger than over maximum range of height size (y=2304) with this
command, it is recommended to divide image to small image block per height size (y=50) to print
smoothly.
3.5.34
Print the graphics data in the print buffer
ASCII:
GS
(
L
pL
pH
m
Hexadecimal:
1D
28
4C
pL
pH
m
Decimal:
29
40
76
pL
pH
m
Range of pL, pH: (pL + pH x 256) = 2 (pL = 2, pH = 0)
Value of m:
m = 48
Value of fn:
fn = 2, 50
fn
fn
fn
It prints the buffered graphics data stored by “Store the graphics data in the print buffer” command
52
PROGRAMMING GUIDE
3.5.35
Download logo image
ASCII:
GS 0x84 m n1 n2 d1 ... dn
Hexadecimal: 1D 84 m n1 n2 d1 ... dn
Decimal:
29 132 m n1 n2 d1 ... dn
Value of m :
1 = Monochrome
2 = two-color
Value of n1:
See the following table.
Value of n2:
See the following table.
Value of d:
See the following table.
Value of n1
Value of n2
1 – 72
(8 x n1: Number of Horizontal dots)
1 – 64
(Number of Vertical Bytes) *
Value of d
Bytes of Data
(Printed dow n, then across)
The number of bytes sent is calculated by the following formula:
n = 8 x n1 x n2 (1 ≤ n1 x n2 ≤ 4608).
Description: The latest value from the set current logo command will be the logo index to be used to
store the download graphics.
m identifies whether the image is monochrome (which requires one parameter bit row description) or
two-color, which requires a pairing of bit descriptions for each row.
n1 * n2 define the rectangular image n1 byte wide and n2 bytes long, n1 * 8 specifies the number of dot
columns, and n2 * 8 the number of dot rows. That is, each row is defined by an integral number of bytes
and the number of rows is also is also an integral number of bytes. Note that n2 can be any length,
subject of memory space availability.
If 58 mm paper is used, the value of n1 could be bigger than 408/8 bytes but of course, the logo is
truncated on the right side while printed.
For each color dot row starting at the top left, a two part parameter byte string is used to define first, all
dots that are not white, and the second half defines all dots where the color is black. Thus all dots that
are on (=1) in the first half but not on in the second half select the paper color. A sequence of these
raster row strings is used to specify the complete logo.
In the monochrome case, only one bit is needed per row. This is the same structure as used for the
definitions of print raster monochrome graphics and print raster color graphics. This command is used
for storing a logo of n1 by n2 size indexed by the current logo value. After downloading a logo to the
printer, wait 100 ms to allow the printer time to write the logo to flash.
53
PROGRAMMING GUIDE
3.5.36
Cancel set values for top/bottom logo printing
ASCII:
Hexadecimal:
Decimal:
Range:
FS ( E pL pH fn m c d1 d2 d3
1C 28 45 pL pH fn m c d1 d2 d3
28 40 69 pL pH fn m c d1 d2 d3
(pL + pH x 256) = 6 (pL = 6, pH = 0)
fn = 60
m=2
c = 48, 49
d1 = 67 (Character “C”)
d2 = 76 (Character “L”)
d3 = 82 (Character “R”)
It cancels set values for top /bottom logo printing by specifying c.
c
Function
48
Cancels setting set values for top logo printing
49
Cancels setting set values for bottom logo printing
3.5.37
Transmits set values for top/bottom logo printing
ASCII:
Hexadecimal:
Decimal:
Range:
FS ( E pL pH fn m c
1C 28 45 pL pH fn m c
28 40 69 pL pH fn m c
(pL + pH x 256) = 3 (pL = 3, pH = 0)
fn = 61
m=2
c = 48, 49, 50
It transmits set values for top/bottom logo printing by specifying c.
c
Function
48
Transmits set values for top logo printing
49
Transmits set values for bottom logo printing
50
Transmits extended set values for top/bottom logo printing
Data to be transmitted is as follows:
Data to be transmitted
Hex
Header
37 H
Extension
48 H
Set Values for top/bottom logo See the next page
NUL
00 H
Decimal
55
72
See the next page
0
Data amount
1 byte
1 byte
0 to 11 bytes
1 byte
When c = 48 is specified.
Set values for top logo
Fixed value (m)
Recognition of top logo /
bottom logo
Fixed value
Flash graphics key codes
Justification setting
Number of lines to be deleted
Hex
32H
30H
Decimal
50
48
Data amount
1 byte
1 byte
32H
20H to 7EH
30H to 32 H
30H to 39H
50
32 to 126
48 to 50
48 to 57
0 or 1 byte
0 or 2 bytes
0 or 1 byte
0 to 3 bytes
When c = 49 is specified.
Set values for bottom logo
Fixed value (m)
Recognition of top
Hex
32 H
31 H
Decimal
50
49
Data amount
1 byte
1 byte
54
PROGRAMMING GUIDE
logo/bottom logo
Fixed value
Flash graphics key codes
Justification setting
When c = 50 is specified.
Set values for bottom logo
Fixed value (m)
Recognition of top logo/
bottom logo
Fixed value
Prints the top logo while paper
feeding to the cutting position
Prints the top logo at power-on
Prints the top logo when the
roll paper cover is closed
Prints the top logo while
clearing the buffer to recover
from a recoverable error
Prints the top logo after paper
feeding with the paper Feed
button has finished
32 H
20 H to 7E H
30 H to 32 H
50
32 to 126
48 to 50
0 or 1 byte
0 or 2 bytes
0 or 1 byte
Hex
32 H
32 H
Decimal
50
50
Data amount
1 byte
1 byte
32 H
30 H, 31 H
50
48, 49
1 byte
1 byte
30 H, 31 H
30 H, 31 H
48,49
48, 49
1 byte
1 byte
30 H, 31 H
48, 49
1 byte
30H, 31 H
48, 49
1 byte
55
PROGRAMMING GUIDE
3.5.38
Set top logo printing
ASCII:
Hexadecimal:
Decimal:
Range:
FS ( E pL pH fn m kc1 kc2 a n
1C 28 45 pL pH fn m kc1 kc2 a n
28 40 69 pL pH fn m kc1 kc2 a n
(pL + pH x 256) = 6 (pL = 6, pH = 0)
fn = 62
m=2
32 ≤ kc1 ≤ 126
32 ≤ kc2 ≤ 126
48 ≤ a ≤ 50
0 ≤ n ≤ 255
It sets top logo key code, justification, and number of lines to be removed after top logo print ing.
It associates key codes (kc1, kc2) of Flash Memory graphics to be printed as a top logo.
a specifies justification for top logo printing.
n specifies the number of lines to be removed after top logo printing
a
48
49
50
Function
Specifies left justification
Specifies centering
Specifies right justification
Settings set by this command are maintained even after power off.
3.5.39
Set bottom logo printing
ASCII:
Hexadecimal:
Decimal:
Range:
S ( E pL pH fn m kc1 kc2 a
1C 28 45 pL pH fn m kc1 kc2 a
28 40 69 pL pH fn m kc1 kc2 a
(pL + pH x 256) = 5 (pL = 5, pH = 0)
fn = 63
m=2
32 ≤ kc1 ≤ 126
32 ≤ kc2 ≤ 126
48 ≤ a ≤ 50
It sets bottom logo key code, and justification.
When cut command is received, bottom logo is printed.
It associates key codes (kc1, kc2) of Flash Memory Logo to be printed as a bottom logo.
a specifies justification for bottom logo printing.
a
48
49
50
Function
Specifies left justification
Specifies centering
Specifies right justification
Settings set by this command are maintained even after power off.
56
PROGRAMMING GUIDE
3.5.40
ASCII:
Hexadecimal:
Decimal:
Range:
Default:
Make extended settings for top/bottom logo printing
FS ( E pL pH fn m a1 n1 … [ak nk]
1C 28 45 pL pH fn m a1 n1 … [ak nk]
28 40 69 pL pH fn m a1 n1 … [ak nk]
4 ≤ (pL +pH x 256) ≤ 12
(However, (pL + pH x 256) = 2 x k + 2: 4 ≤ pL ≤ 12, pH = 0)
fn = 64
m=2
a = 48, 64 to 67
n = 48, 49
1≤ k≤5
n = 49 [when a = 48]
n = 48 [when a = 64]
n = 49 [when a = 65]
n = 49 [when a = 66]
n = 48 [when a = 67]
It makes extended settings for top/bottom logo printing.
a
Function
48
Prints the top logo while paper feeding to the cutting position.
64
Prints the top logo at power-on.
65
Prints the top logo when the roll paper cover is closed.
66
Prints the top logo while clearing the buffer to recover from a recoverable
error.
67
Prints the top logo after paper feeding with the paper Feed button has
finished.
Extended settings when a = 1 to 3
n
48
Disabled
49
Enabled
Function
Settings set by this command are maintained even after power off.
3.5.41
ASCII:
Hexadecimal:
Decimal:
Range:
Default:
Enable/disable top/bottom logo printing
FS ( E pL pH fn m a n
1C 28 45 pL pH fn m a n
28 40 69 pL pH fn m a n
(pL + pH x 256) = 4
(pL = 4, pH = 0)
fn = 65
m=2
a = 48, 49
n = 48, 49
n = 48 [when a = 48]
n = 48 [when a = 49]
It specifies top/bottom logo printing by a and enables or disables top/bottom logo printing by n.
Top/bottom logo printing specified by a is as follows:
a
Function
48
Specifies top logo printing.
49
Specifies bottom logo printing.
Enabling/disabling setting specified by n is as follows:
n
Function
48
Enables
57
PROGRAMMING GUIDE
49
Disables
Settings set by this command are maintained even after power off.
3.5.42
ASCII:
Hexadecimal:
Decimal:
Range:
Value of k:
Default:
Define Windows BMP graphics data in Flash Memory
GS D m fn a kc1 kc2 b c d1…dk
1D 44 m fn a kc1 kc2 b c d1…dk
29 68 m fn a kc1 kc2 b c d1…dk
m = 48
fn = 67
a = 48
32 ≤ kc1 ≤ 126
(20H ≤ kc1 ≤ 7Eh)
32 ≤ kc2 ≤126
(20h ≤ kc2 ≤ 7Eh)
b = 48, 52
c = 49
0 ≤ d ≤ 255
The value of k depends on the BMP file size.
None
It converts Windows BMP data to the specified tone and defines Flash Memory graphics data (raster
format) that corresponds to the key codes (kc1, kc2).
b specifies the tone of data to define.
b
48
52
Tone of data to define
Monochrome (digital)
Multi-tone
c specifies the color of data to define.
c
49
Color of data to define
Color 1
d specifies the defined data (Windows BMP format).
Monochrome BMP (1bpp) and color BMP (24bpp, 8bpp, 4bpp) are supported.
3.5.43
ASCII:
Hexadecimal:
Decimal:
Range:
Value of k:
Default:
Define Windows BMP graphics data in RAM
GS D m fn a k c1 kc2 b c d1…dk
1D 44 m fn a k c1 kc2 b c d1…dk
29 68 m fn a k c1 kc2 b c d1…dk
m = 48
fn = 83
a = 48
32 ≤ k c1 ≤ 126
(20h ≤ k c1 ≤ 7Eh)
32 ≤ kc2 ≤ 126
(20h ≤ kc2 ≤ 7Eh)
b = 48, 52
c = 49
0 ≤ d ≤ 255
The value of k depends on the BMP file size.
None
It converts Windows BMP data to the specified tone and defines download graphics data (raster format)
that corresponds to the key codes (kc1, kc2).
b specifies the tone of data to define.
58
PROGRAMMING GUIDE
b
49
52
Tone of data to define
Monochrome (digital)
Multi-tone
c specifies the color of data to define.
c
49
Color of data to define
Color 1
d specifies the data to define (Windows BMP format).
Monochrome BMP (1bpp) and color BMP (24bpp, 8bpp, 4bpp) are supported.
59
PROGRAMMING GUIDE
3.6
Status Commands
Status Command Introduction
There are three methods to provide an application the printer status, Batch Status Commands, Real
Time Status Commands and Auto Status Back Commands as follows.
Batch Status Commands – The batch status command is sent based on the same manner as other
commands/data. Therefore it is stored in the printer receiving buffer in order along with other
commands/data received and is processed one by one according to order which have been received.
Hence, the printer response time for this command is not immediate. It depends on commands / data
sent before this command.
Real-Time Status Commands – The printer immediately processes this command and takes a
necessary action as the top priority as soon as it is received regardless of the printer condition and
data/commands which has received before this command. The way to send the real time status
command depends on the interface. In USB and RS232C interface mode, it is sent based on the same
manner as other commands/data.
In LAN interface, the data transfer method of this command depends on the printer setting.
Identification of the status
Some status for the batch status command and the real time status command has the identifier as
follows so that a system can identify a status.
Batch Status Command
1B 75 0
1B 76
1D 49 n
1D 72 n
Status
0 0 0 0 0 0 x x (Binary)
0 x x 0 x x x x (Binary)
0 x x 0 x x x x (Binary)
0 x x 0 x x x x (Binary)
Batch Status Command
1D (or 10) 04 n
1D 05
Status
0 x x 1 x x 1 0 (Binary)
1 x x x x x x x (Binary)
60
PROGRAMMING GUIDE
3.6.1
Transmit Peripheral Device Status
ASCII:
ESC u 0
Hexadecimal: 1B 75 0
Decimal:
27 117 0
Return Value: Bit 0
Bit 1
1 = Drawer1 closed 1 = Drawer 2 closed
0 = Drawer 1 open
0 = Drawer 2 open
(Bits 2-7 are not used, those are fixed to zero)
It transmits the current status of the cash drawers. If a drawer is not connected, this status indicates that
the drawer is closed.
3.6.2
Transmit Printer Status
ASCII:
ESC v
Hexadecimal: 1B 76
Decimal:
27 118
It transmits the printer status.
Status Byte
Bit Function
0
1
2
3
4
5
6
7
0 Signifies
Ok
Closed
Ok
OK
Fixed to Zero
In valid range
In valid range
Fixed to Zero
Receipt Paper
Receipt Cover or Front Cover
Receipt Paper or Receipt Paper Jam
Knife Position
Not used
Temperature
Voltage
Not used
1 Signifies
Low
Open
Out or Jam
Jam
Fixed to Zero
Too hot or Too cold
Too high or Too low
Fixed to Zero
Related Information:
Receipt paper low status (Bit 0) is not exactly matched to the paper low sensor status. The set t iming of
status bit is depending on “Paper Low Detection” setting in the printer configuration.
For example, when “Paper Low Detection” is configured to “Enable”, this status bit is set as soon as the
printer confirms that the paper low sensor keeps indicating “LOW”.
if it is configured to “Disable”, this status bit is never set.
3.6.3
Transmit Printer ID
ASCII:
GS I n
Hexadecimal: 1D 49 n
Decimal:
29 73 n
Value of n:
It transmits the printer ID specified by n as follows:
n
Printer ID
Definition
1, 49
Printer model ID
2, 50
Type ID
Installed options
3, 51
ROM Version ID
ROM version
4, 52
65
66
67
68
69
70
Logo Definition
Firmware version
Manufacturer
Printer model
Serial number
ASIA-Character generator
name
Firmware date
Logo Definition
ID(hex)
Printer model = 0x24
Refer to the following table
1 Byte – FW version in binary
format in bit 0…bit 3.
Refer to the following table
String with 6 characters “_xx.xx”
“_DIEBOLD-NIXDORF”
“P1200”
Serial number of the printer string
String with max 17 characters
String format “_DDMMYY”
61
PROGRAMMING GUIDE
112
128
129
130
131
132
133
134
135
136
ignored
Manufactured Board Number 1
Serial number date (Production
date – set by GS ( E pL pH fn
d1…dn (fn=130))
Character sets
143
144
145
146
148
149
157
Character generator name
Character generator version
Horizontal resolution
Vertical resolution
Print line resolution
Character generator checksum
result
Booter version
Loader version
Poweruptest version
Poweruptest checksum result
EEPROM status
Loader verified status
Print Line Type
158
Interface Board Description
159
Interface Board Type
160
Number of Colors
161
254
ASIA-Character generator
name
ASIA-Character generator
version
ASIA-Character generator
checksum result
Sensor Plug Info
255
Measured Mark Distance
162
163
Ignored
“_A”(Fixed)
Production date string
“_DDMMYY”
All built in character sets of the
printer (see example below)
String with max 17 characters
String with 6 characters (_xx.xx)
“_203 dpi”
“_203 dpi”
“_203 dpi”
String “_OK” or “_Err”
Print head type
String with 6 characters “_xx.xx”
String with 6 characters “_xx.xx”
String with 6 characters “_xx.xx”
“_OK” or “_Err”
“_OK” or “_Err”
“_Verified” or “_Unverified”
“_A” (Kyocera thermal print line)
or “_B” (other manufacturer)
String with the name of the
interface board. (see example
below)
String with the type of the
interface board. For example
“_02” or “_10”
String with the number of colors
For example “_1” or “_2”
String with max 17 characters
String with 6 characters (_xx.xx)
String “_OK” or “_Err”
String “_xxxxxxxx” (See table
below)
String with max. 12 characters
“_xxxxx steps”
Notes: n = 1, 2, 3: In this case the printer sends 1 byte of data.
n ≥ 65: When send printer information (character string) is specified, the printer sends the
“Header to NUL” character string. Notes for the printer information:
• Each printer information is composed of [header + printer information + NUL] (when n ≥ 65).
Send data
Hex
Decimal
Data
Header
0x5F
95
1 byte
Printer
Depends on the
Depends on the
1 to 80 bytes
information
information
information
NUL
0x00
0
1 byte
• If the printer information is not prepared, [Header + NUL] (2 bytes) are sent.
• Be sure to use this function when the host can receive data.
• When using GS I, GS ( E or GS g 2 together with Automatic Status Back (ASB status, the status
transmitted must be differentiated according to table Transmit Status Identification (see page
71).
1
P1200 sends the Bare PCB Number (“_A”..”_Z”)
62
PROGRAMMING GUIDE
• When n is out of the specified range, this command is ignored.
• The Firmware version may be changed.
• The firmware version can be confirmed by self test printing. Self test is executed by panel switch
operation when power is turned on.
• Printer information is distinguished from other send data by the header of the block data. When
the data sent from printer after printing GS I is [Hex = 0x5F / Decimal = 95], process the data to
NUL [Hex = 0x00 / Decimal = 0].
• When communicating with printer by XON/XOFF control, XOFF code might be transmitted into
“Header to NUL.”
Type ID (n=2)
bit Off/On
0
Off
On
1
Off
On
2
Off
On
3
4
Off
5
6
7
Off
Hex
00
01
00
02
00
04
00
00
Decimal
0
1
0
2
0
4
0
0
Function
No DBCS font is installed
DBCD font is installed
Cutter is not installed
Cutter is installed (Fixed to “On”)
Black mark sensor Disable
Black mark sensor Enable
Undefined
Not used. Fixed to off.
Undefined
Undefined
Not used. Fixed to off.
Type ID (n=4)
Bit Off/On
0
Off
On
1
2
3
4
Off
5
6
7
Off
Hex
00
01
00
00
Decimal
0
1
0
0
Function
No logo definition
Logo is registered
Undefined
Undefined
Undefined
Not used. Fixed to off.
Undefined
Undefined
Not used. Fixed to off.
remark
Type ID (n=130)
Character sets: Example:
“_0:PC437,1:PC850,2:PC852,3:PC860,4:PC863,5:PC865,6:PC858,7:PC866,8:PC1252,9:PC8
62,10:PC737,11:PC874” NUL
Type ID (n=158)
Interface Board Description: Example: “_USB(High-Speed),RS232,Cash Drawer” NUL
Type ID (n=159)
Interface Board type
Value
“_01”
“_02”
“_03”
Type
Standard. (USB , Cash Drawer)
RS232 card connected. (USB ,RS232, Cash
Drawer)
Ethernet card connected. (USB ,Ethernet, Cash
Drawer)
63
PROGRAMMING GUIDE
“_04”
“_10”
Powered USB connected. (USB , Cash Drawer)
MF interface – USB connected.
Type ID (n=254)
Sensor Plug Info:
Byte# (from left)
0
1
2
3
4
5


Sensor
Mark sensor
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Value (ASCII)
‘0’
‘1’
‘2’
Meaning
Not plugged
Plugged
No information available

3.6.4
Transmit Printer ID, Remote Diagnostics Extension
ASCII:
GS I @ n
Hexadecimal: 1D 49 40 n
Decimal:
29 73 64 n
Values of n:
Refer to table
Range of n:
32 – 255 (not all defined but reserved)
Performs the remote diagnostic function specified by n as described in the following table.
The printer returns all ASCII data. It is conducted by the parameter n to identify the diagnostic item and
is followed by a Carriage Return (0D) to signify the end of the data.
n (hex)
20
21
)Serial number
23
24
25
27
60
61
62
63
64
65
66
67
68
69
1
Remote diagnostic item
Serial number
(10 digits ASCII)
Model number
(16 digits ASCII)
DHCP address 1,
(15 digits ASCII numeric
e.g. “abc.def.knm.xyz”)
TCP Port number1,
(5 digits ASCII numeric
“00000”~”65535”)
UDP Port number1,
(5 digits ASCII numeric
Function
Write to non-volatile memory
(Reserved)
Return serial number, Total 12 bytes
Write to non-volatile memory
(Reserved)
Return model number, Total 18 bytes
(Reserved for production purpose)
Not used
Not used
Return DHCP address, Total 17 bytes
Write to non-volatile memory
Not used
Not used
Return TCP Port number, Total 7 bytes
Write to non-volatile memory
Not used
It is valid when option Network I/F card is installed.
64
PROGRAMMING GUIDE
“00000”~”65535”)
6A
6B
6C
6D
6E
6F
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F
F0
F1
F2
F3
3.6.5
SNMP Community (R/W) 1,
(16 digits ASCII numeric + Null
terminator)
SNMP Trap 1 Community 1,
(16 digits ASCII numeric + Null
terminator)
SNMP Trap 2 Community 1,
(16 digits ASCII numeric + Null
terminator)
SNMP Trap 1 IP Address 1,
(15 digits ASCII numeric
e.g. “abc.def.knm.xyz”)
SNMP Trap 2 IP Address 1,
(15 digits ASCII numeric
e.g. “abc.def.knm.xyz”)
MAC address 1,
(17 digits ASCII numeric
e.g. “ab.cd.ef.gh.vw.xy”)
Not used
Return UDP Port number, Total 7 bytes
Write to non-volatile memory
Not used
Not used
Return SNMP Community (R/W), Total 19 bytes
Write to non-volatile memory
Not used
Not used
Return SNMP Trap 1 Community, Total 19 bytes
Write to non-volatile memory
Not used
Not used
Return SNMP Trap 2 Community, Total 19 bytes
Write to non-volatile memory
Not used
Not used
Return SNMP Trap 1 IP Address, Total 17 bytes
Write to non-volatile memory
Not used
Not used
Return SNMP Trap 2 IP Address, Total 17 bytes
(Reserved for production purpose)
Not used
Not used
Return MAC address, Total 19 bytes
Enable/disable Automatic Status Back (ASB)
ASCII:
Hexadecimal:
Decimal:
Range:
Default:
GS a n
1D 61 n
29 97 n
0 ≤ n ≤ 255
n=0
It enables or disables basic ASB (Automatic Status Back). This setting is not stored into the non-volatile
memory.
(n) Bit
0
1
2
3
4-7
Off/On
Off
On
Off
On
Off
On
Off
On
Off
Hex
00
01
00
02
00
04
00
08
00
Decimal
0
1
0
2
0
4
0
8
0
Function
Drawer kick-out connector status disabled
Drawer kick-out connector status enabled
Online/offline status disabled.
Online/offline status enabled.
Error status disabled.
Error status enabled.
Roll paper sensor status disabled.
Roll paper sensor status enabled.
Reserved.
While basic ASB status is active, the selected enabled basic ASB status is transmitted whenever the status
changes.
The basic ASB status to be transmitted is the four bytes that follow:

1
First byte (printer information)
It is valid when option Network I/F card is installed.
65
PROGRAMMING GUIDE
Bit
0, 1
2
3
4
5
6
7
Off/On
Off
Off
On
Off
On
On
Off
On
Off
On
Off
Hex
00
00
04
00
08
10
00
20
00
40
00
Decimal
0
0
4
0
8
16
0
32
0
64
0
Status
Fixed.
One or both cash drawers open
Both cash drawers closed
Online.
Offline.
Fixed.
Cover is closed.
Cover is open.
Paper is not being fed with the paper feed button.
Paper is being fed with the paper Feed button.
Fixed.

Second byte (printer information)
Bit
Off/On
Hex
Decimal
0–2
3
Off
00
0
On
08
8
4
Off
00
0
5
Off
00
0
On
20
32
6
Off
00
0
On
40
64
7
Off
00
0
Status
Reserved.
No autocutter error.
Autocutter error occurred.
Fixed.
No unrecoverable error.
Unrecoverable error occurred.
No automatically recoverable error.
Automatically recoverable error occurred.
Fixed.
66
PROGRAMMING GUIDE

Bit
0, 1
2, 3
Third byte (paper sensor information)
Off/On
Hex
Decimal
Off
00
0
On
03
3
Off
00
0
4
5, 6
7
On
0C
12
Off
Off
00
00
0
0
Status
Roll paper near-end sensor: paper adequate.
Roll paper near-end sensor: paper near end.
Roll paper end sensor (Paper sensor): paper present.
And Roll paper jam sensor: no paper jam
Roll paper end sensor (Paper sensor): paper not present
Or Roll paper jam sensor: paper jam
Fixed.
Reserved.
Fixed.
Bit 2 and 3: While the cover is open, this shows the state when the cover was still closed.

Bit
0
Fourth byte (paper sensor information)
Off/On
Hex
Decimal
Off
00
0
On
01
1
1–3
4
Off
00
0
5, 6
7
Off
00
0
3.6.6
Status
Normal-Mode
Sleep Mode
Reserved.
Fixed.
Reserved.
Fixed.
Initialize maintenance counter
ASCII:
GS g 0 m nL nH
Hexadecimal: 1D 67 30 m nL nH
Decimal:
29 103 48 m nL nH
Range:
m=0
(nL + nH x 256) = 20, 21, 22, 50, 70 (nL = 20, 21, 22, 50, 70, nH = 0)
It sets the resettable maintenance counter specified by (nL + nH x 256) to 0.
(nL + nH x 256)
Maintenance counter [Units]
Hex
Decimal
14, 16
20, 22
Number of lines fed. [Lines]
15
21
Number of head energizations [Times]
32
50
Number of autocutter operations [Times]
34
52
Cutter Errors
35
53
Black Mark Errors
36
54
Thermistor Errors
37
55
Low Voltage Errors
38
56
High Voltage Errors
39
57
Cover Open Counter
3B
59
Maximum Head Temperature
46
70
Duration of printer operation. [Hours]
Note:
“Number of lines fed. [Lines]”, “Number of head energizations [Times]” are calculated with “Receipt length tally”
value [meter]. If either “Number of lines fed. [Lines]” or “Number of head energizations [Times]” are initialized by
the command, all “Number of lines fed. [Lines]”, “Number of head energizations [Times]”and “Receipt length
tally” are initialized to 0.
“Number of autocutter operations [Times]” is same value as “Knife cut tally”. If either “Number of autocutter
operations [Times]” or “Knife cut tally” are initialized by the command, both “Number of autocutter operations
[Times]” and “Knife cut tally” are initialized to 0.
“Duration of printer operation [Hours]” is same value as “Hours on tally”. If either “Duration of printer operation
[Hours]” or “Hours on tally” are initialized by the command, both “Duration of printer operation [Hours]” and
“Hours on tally” are initialized to 0.
nL + nH x 256 = 59 (Maximum Head Temperature): This resettable counter isn’t set to 0 but is set to the actual
67
PROGRAMMING GUIDE
temperature of the thermal print head.The maintenance counter value can be used for establishing the time for
replacing consumed parts or cleaning.
68
PROGRAMMING GUIDE
3.6.7
Transmit maintenance counter
ASCII:
GS g 2 m nL nH
Hexadecimal: 1D 67 32 m nL nH
Decimal:
29 103 50 m nL nH
Range:
m=0
(nL + nH x 256) = 20, 21, 22, 50,52,53,54,55,56,57,59, 70, 148, 149, 150, 178,198
,200,238,239,240
It transmits the value of the maintenance counter specified by (nL + nH x 256)
(nL + nH x 256)
Hex
Decimal
14, 16
20, 22
15
21
32
50
34
52
35
53
36
54
37
55
38
56
39
57
3B
59
46
70
94, 96
148, 150
95
149
B2
178
C6
198
C7
199
C8
200
EE
238
EF
239
F0
240
Maintenance Counter[Units]
Number of lines fed. [Lines]
Number of head energizations. [Times]
Number of autocutter operations [Times].
Cutter Errors[Times]
Black Mark Errors[Times]
Thermistor Errors[Times]
Low Voltage Errors[Times]
High Voltage Errors[Times]
Cover Open Counter[Times]
Maximum Head Temperature[degree]
Duration of printer operation [Hours].
Number of lines fed [Lines]
Number of head energizations. [Times]
Number of autocutter opeartions. [Times].
Duration of printer operation. [Hours].
Power on cycles
EEROM update
Paper feeding mechanism changes
Print head changes
Cutter Changes
Type of counter
Resettable (can be
reset)
Cumulative
Transmission data is as follows.
Data group of
Hex
Decimal
Data
maintenance counter
(1) Header
5FH
95
1 byte
(2) Data
30H ~39H
48 ~ 57
1 byte ~
(3) NULL
00H
0
1 byte
Example: When autocut operations is 123 times, “0x1D 0x67 0x32 0x00 0x32 0x00” command
response is “0x5F 0x31 0x32 0x33 0x00”
69
PROGRAMMING GUIDE
3.6.8
Transmit Status
ASCII:
GS r n
Hexadecimal: 1D 72 n
Decimal:
29 114 n
Values of n:
1, 49 = printer status
2, 50 = cash drawer status
4, 52 = Flash Memory status
Transmits the status specified by n. This is a batch mode command which transmits the response after
all prior data in the receive buffer has been processed. There may be a time lag between the printer
receiving this command and transmitting the response, depending on the receive buffer status.
Printer status (n=1, 49)
Bit Off/On Hex
0
Off
00
On
01
1
Off
00
On
02
2
Off
00
On
04
3
4
Off
00
5
6
7
Off
00
Decimal
0
1
0
2
0
1
0
0
Cash drawer status (n=2, 50)
Bit Off/On Hex Decimal
0
Off
00
0
On
01
1
1
Off
00
0
On
02
2
2
3
4
Off
00
0
5
6
7
Off
00
0
Function
Receipt paper adequate
Receipt paper low
Cover is closed
Cover is opened
Receipt paper present
Receipt paper is exhausted or jammed
Undefined
Not used. Fixed to off.
Undefined
Undefined
Not used. Fixed to off.
Function
One or both cash drawers open
Both cash drawers closed
One or both cash drawers open
Both cash drawers closed
Undefined
Undefined
Not used. Fixed to off.
Undefined
Undefined
Not used. Fixed to off.
Flash memory user sector status (n=4, 52)
Bit Off/On Hex Decimal
Function
0
Undefined
1
Undefined
2
Off
00
0
User data storage write successful
On
04
4
Failed to write to User data storage area.
User defined area not erased properly.
3
Off
00
0
Flash Logo area is adequate.
On
08
8
Flash logo area was not adequate for the latest logo
registration. 1
4
Off
00
0
Not used. Fixed to off.
5
Off
00
0
No user defined characters in flash memory
On
20
32
User defined characters in flash memory
6
Undefined
1
This status bit is available only for legacy logo commands (1D 2A, 1B+BMP file).
70
PROGRAMMING GUIDE
7
Range of n:
Off
00
0
Not used. Fixed to off.
1– 4
49 –52
Exceptions:
When n is out of the specified range, the command is ignored.
3.6.9
Send Printer Firmware Version
ASCII:
US V
Hexadecimal: 1F 56
Decimal:
31 86
The printer returns 16 bytes containing the boot and Flash Firmware version. The first 8 bytes returned
are an ASCII string for the boot version. The second 8 bytes are an ASCII string for the main firmware
version.
The current firmware determines printer firmware version from the first 5 byte of the 8 byte ASCII data
returned from printer. (The last 3 byte data is always “.00”.)
Example: When response is 31.31.2E.33.34.2E.30.30.35.36.2E.37.38.2E.30.30 (16 bytes), the boot
version is 12.34.00 and the main firmware version is 56.78.00.
3.6.10
Real time commands disabled
ASCII:
US z n
Hexadecimal: 1F 7A n
Decimal:
31 122 n
Range of n:
n = 0 Real time commands enabled
n = 1 Real time commands disabled
Default :
n = 0 (Real time commands enabled)
This command is used to disable real time commands. They are disabled prior to sending graphics or
other data to the printer that may contain embedded real time commands. The disable command (n = 1)
is acted on in real time.
The re-enable command (n = 0) is treated as a batch command and processed in the order received.
Transmit Status Identification Table
The following table shows the Transmit Status
Identification: Command & Function
ESC w n 7
DLE EOT
GS ENQ
GS I with 1 ≤ n ≤ 3; 49 ≤ n ≤ 51
GS I with n >= 65 (1st byte)
GS g 2 (1st byte)
GS ( E with fn = 4 or 6 (1st byte)
XON
XOFF
ASB (1st byte)
ASB (2nd to 4th byte)
Power-on notification
71
Status Reply
<00011001>B
<0**1**10>B
<1*0*****>B
<0**0****>B
<01011111>B
<01011111>B
<00110111>B
<00010001>B
<00010011>B
<0**1**00>B
<0**0****>B
<00111011>B
PROGRAMMING GUIDE
3.6.11
Execute Head Failure Detection
ASCII:
US SUB 02 00
Hexadecimal: 1F 1A 02 00
Decimal:
31 26 02 00
Response:
Result of the Head Failure Detection (3bytes)
Response format table (3bytes)
Description
No Error
Head Failure
Byte #11
0x06
0x15
Byte #2 and #3
0x00, 0x00
Counter for number of dots damaged
1st Byte : Lower byte of the counter
2nd Byte : Higher byte of the counter
The printer executes the Head Failure Detection and returns the result (3bytes). The first byte indicates
the result (OK/NG) and 2nd and 3rd bytes indicates the number of dots damaged in NG case. In OK
case, 2nd byte and 3rd byte are null.
3.6.12
Get Detail of Head Failure Detection
ASCII:
US SUB 01 n
Hexadecimal: 1F 1A 01 n
Decimal:
31 26 01 n
Values of n:
00: Front Head
02: (Reserved)
Response:
Details of the Head Failure Detection (1+640x2 bytes)
Response format table (3bytes)
Description
No Error
Head Failure
Byte #12
0x06
0x15
Byte #2 to #1281
Resistance value of each dot. Each dot
is indicated by 2 bytes.
The printer returns the details of each dot (1281bytes) of the latest execution of the dot failure detection.
The first byte shows the result (OK/NG) and subsequent bytes shows the resistance value of each dot.
This command does not execute the dot failure detection. Therefore, the dot failure detection by
“Execute Head Failure Detection” command has to be performed before this command, otherwise this
command is ignored.
3.6.13
Set control point
ASCII:
ESC [ ! t nl nh
Hexadecimal: 1B 5B 21 74 nl nh
Decimal:
27 91 33 116 nl nh
Range:
0 ≤ (nL + nH * 256) ≤ 0xFFFF
Description:
The printer sends the answer to a control point as soon as all mechanical
activities are finished
Notes:
The answer which is sent to the host consists of the complete escape command
(ESC [ ! t nL nH).
(nL + nH * 256) is a value which is defined by the application program.
Hint: Normally the application or the software driver sends the “set control point”
1
Bit7 (MSB) of Byte #1 is used to indicate the source of the thermal head vendor as follows.
Head source: K
Head source: R
No Error
0x06
0x86
Byte #1
Head Failure
0x15
0x95
K: First source (existing head) / R: Second source
2
Same as above
72
PROGRAMMING GUIDE
command after linefeed commands. However, if the “set control point” command is
sent before the linefeed command, the printer also sends the control point answer
before the line is printed completely.
Two examples with (nL + nH * 256) = 0x1234: Correct control point – answer to host is
sent after all mechanical activities:
A B C D E 0x0A 0x1B 0x5B 0x21 0x74 0x34 0x12 Wrong control point – answer to
host is sent before mechanical activities are finished: A B C D E 0x1B 0x5B 0x21
0x74 0x34 0x12 0x0A.
In Error conditions by opening the cover or switching of the Power can be correct
control points send back bad the lines are not printed.
73
PROGRAMMING GUIDE
3.7
Real Time Commands
Real Time Commands are immediately processed regardless of the condition of the receiving buffer
and the printer status as soon as it's received.
For example, even if the printer is in an error condition, it properly responds to a real time status
command sent.
In addition to this, if a real time command is received when there are some data in the receive buffer, it
is processed prior than the data in the receiving buffer.
In USB and RS232C interface mode, it is sent based on the same manner as other commands/data.
Therefore, there is a risk that the printer might not be able to respond immediately if the printer receiving
buffer is full.
The real time commands used in the network interface depends on the “RTC Protocol” setting. When it
is configured to TCP, command/status is transferred via TCP port (port number 9100). When it is
configured to UDP, command/status is transferred via UDP port (port number 3000).
In UDP protocol, 4 bytes of the sequence number have to be added before real time commands.
Otherwise, the printer does not properly process command.
e.g. xxh xxh xxh xxh 1Dh 04h 01h (xxh xxh xxh xxh) is sequence number.
3.7.1
Real Time Status Transmission
GS Sequence
DLE Sequence
ASCII:
GS EOT n
DLE EOT n
Hexadecimal: 1D 04 n
10 04 n
Decimal:
29 4 n
16 4 n
Values of n:
1 – 16
1 = Transmit printer status
2 = Transmit busy status
3 = Transmit error status
4 = Transmit receipt paper status
5 = (Reserved)
6 = Transmit error other status
16= All 6 bytes status are returned at the same time
The printer immediately transmits its status in accordance with the parameter n once it receives this
command.
This command includes two sequences, GS and DLE. In DLE sequence, an application must send
subsequent data (EOT, 0x04) within 100 milliseconds after DLE (0x10). Otherwise the printer will
misinterpret the DLE as Clear Printer command. In order to avoid this, using GS sequence (1D 04 n) is
recommended.
Exceptions:
The command is ignored if n is out of range.
Transmit printer status (n =1)
Bit Off/On Hex Decimal
0
Off
00
0
1
On
02
2
2
Off
00
0
On
04
4
3
Off
00
0
On
08
8
4
On
10
16
5
-
Function
Undefined. Fixed to off.
Undefined. Fixed to on
One or both cash drawers open
Both cash drawers closed
On line state
Off line state
Not used. Fixed to on.
Undefined
74
PROGRAMMING GUIDE
6
7
Off
00
0
Undefined
Not used. Fixed to off.
Transmit 0ffline status (n=2)
Bit Off/On Hex
0
Off
00
1
On
02
2
Off
00
On
04
3
Off
00
On
08
4
On
10
5
Off
00
On
20
6
Off
00
On
40
7
Off
00
Decimal
0
2
0
4
0
8
16
0
32
0
64
0
Function
Undefined. Fixed to off.
Undefined. Fixed to on
Cover is closed
Cover is opened
Paper Feed Button is not pressed
Paper Feed Button is pressed
Not used. Fixed to on.
No stop printing due to paper low.
Printer stopped printing due to paper low1
No error condition
Error condition exists in the printer
Not used. Fixed to off.
Transmit error status (n=3)
Bit Off/On Hex
0
Off
00
1
On
02
2
Off
00
3
Off
00
On
08
4
On
10
5
Off
00
6
Off
00
On
40
7
Off
00
Decimal
0
2
0
0
8
16
0
0
64
0
Function
Undefined. Fixed to off.
Undefined. Fixed to on
Undefined. Fixed to off.
No Cutter error or No Paper Jam Error
Cutter Error or Paper Jam Error
Not used. Fixed to on.
Undefined. Fixed to off.
No unrecoverable error
Unrecoverable error occurred
Not used. Fixed to off.
Transmit paper roll sensor status (n=4)
Bit Off/On Hex Decimal
0
Off
00
0
1
On
02
2
2
Off
00
0
On
04
4
3
Off
00
0
On
08
8
4
On
10
16
5
Off
00
0
On
20
32
6
Off
00
0
On
40
64
7
Off
00
0
Function
Undefined. Fixed to off.
Undefined. Fixed to on
No paper low condition
Paper low
No paper low condition
Paper low
Not used. Fixed to on.
Paper present and no paper jam
Paper exhausted or paper jam
Paper present and no paper jam
Paper exhausted or paper jam
Not used. Fixed to off.
Transmit error other status (n=6)
Bit Off/On Hex Decimal
0
Off
00
0
1
On
02
2
2
Off
00
0
On
01
1
Function
Undefined. Fixed to off.
Undefined. Fixed to on
No Thermal Head failure dots exist
Thermal Head failure dots exist
This bit is available only when “Stop Receipt on Receipt Low” is enabled by Select Sensors to Stop Printing
command.
1
75
PROGRAMMING GUIDE
3
4
5
6
7
Off
On
On
Off
Off
Off
00
08
10
00
00
00
0
8
16
0
0
0
Black mark sensor : detect white
Black mark sensor : detect black
Not used. Fixed to on.
Not used. Fixed to off.
Not used. Fixed to off.
Not used. Fixed to off.
Thermal Head failure dots status (Bit 2) becomes valid once Execute Head Failure Detection command
(1F 1A 02 00) is processed or
/ Error! Reference source not found. is printed.
3.7.2
Real Time Request to Printer
GS Sequence
ASCII:
GS ETX n
Hexadecimal: 1D 03 n
Decimal:
29 3 n
Values of n:
1 = Recover and restart
2 = Recover and clear buffers
DLE Sequence
DLE ENQ n
10 05 n
16 5 n
The printer immediately takes the recovery action from an error condition in accordance with the
parameter n once it receives this command. This command is valid when the printer is in an error
condition.
This command includes two sequences, GS and DLE. In DLE sequence, an application must send
subsequent data (EOT, 0x04) within 100 milliseconds after DLE (0x10). Otherwise the printer will
misinterpret the DLE as Clear Printer command. In order to avoid this, using GS sequence (1D 04 n) is
recommended.
n = 1:
It clears errors and restarts printing. This command does not affect any attributes and settings specified
by previous commands, and it does not clear any data in the printer as well. Even if the error is cleared
by this command, it will detect same error again after recovery unless an inducement of the error is
eliminated.
n = 2:
It clears errors and buffers. This command does not affect any attributes and settings specified by
previous commands. Even if the error is cleared by this command, it will detect same error again after
recovery unless an inducement of the error is eliminated.
Exceptions:
The command is ignored if n is out of range.
3.7.3
Enable/disable real-time command
GS ( D pL pH m [a1 b1]… [ak bk]
1D 28 44 pL pH m [a1 b1]… [ak bk]
29 40 68 pL pH m [a1 b1]… [ak bk]
3 ≤ (pL + pH x 256) ≤ 65535 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 255)
m = 20
a = 1, 2
b = 0, 1, 48, 49
It enables or disables the real-time command specified by a.
ASCII:
Hexadecimal:
Decimal:
Range:
76
PROGRAMMING GUIDE
pL,pH specify (pL + pH x 256) as the number of bytes after pH (m and [a1 b1] … [ak bk]).
a
b
Function
0, 48
DLE DC4 fn m t (fn = 1): Not processed (disabled).
1
1 (Default), 49 DLE DC4 fn m t (fn = 1): Processed (enabled).
0 (Default), 48 DLE DC4 fn a b (fn = 2): Not Processed (disabled).
2
1, 49
DLE DC4 fn a b (fn = 2): Processed (enabled).
3.7.4
Generate pulse in real-time
ASCII:
DLE DC4 fn m t
Hexadecimal: 10 14 fn m t
Decimal:
16 20 fn m t
Value :
fn=1,
m=0(Drawer1), 1(Drawer2)
1≤ t≤8
t specifies the pulse on time or off time as [ t x 100 ms]
It outputs the signal specified by t in real-time to the output pulse specified by m.
When the setting of “Enabling/disabling buzzer” is enabled with the customized value, < fn= 05> GS ( E
<a = 119>, the internal buzzer sounds with pulse signal for cash drawer.
Note: For the sound pattern and the buzzer frequency for the internal buzzer, follow the customized
value setting, <fn= 05> GS ( E <a =123 to 126>.
Note: When DLE DC4 (fn=1) command is set to “Not processed” by GS ( D "Enable/disable real-time
command" command, this command is ignored.(Default is “Processed”)
3.7.5
Execute power-off sequence
ASCII:
Hexadecimal:
Decimal:
DLE DC4 fn a b
10 14 fn a b
16 20 fn a b
ASCII:
Hexadecimal:
Decimal:
DLE SO fn a b
10 0E fn a b
16 14 fn a b
Value:
fn = 2
a =1
b =8
It executes the printer power-off sequence and transmits the power-off notice.
It stores the values of the maintenance counter.
It sets the interface to BUSY.
It sets the printer to power off mode.
This command does not shut the power off. The operator must turn the power off after receiving the
power-off notice.
If this command is executed, the printer will not continue to process anything. To recover the printer to
print again, it is necessary to turn the power on again or execute a hardware reset by pressing power
button.
Note: When DLE DC4 (fn=2) command is set to “Not processed” by GS ( D "Enable/disable real-time
command" command, this command is ignored.(Default is “Not processed”)
77
PROGRAMMING GUIDE
3.7.6
Control Buzzer (Internal buzzer)
ASCII:
DLE DC4 fn a n r t1 t2
Hexadecimal: 10 14 03 a n r t1 t2
Decimal:
16 20 3 a n r t1 t2
Value:
fn = 3
a=0
n=0
r=0
t1 = 1
t2 = 0
It stops sounding the internal buzzer
When the buzzer has stopped sounding by this function, the printer transmits the buzzer sound end
response as shown below to the host PC.
Data group of buzzer
sound end response
(1) Header
(2) Identifier
(3) Data
(4) NUL
3.7.7
Hex
Decimal
Data
37H
54H
40H
00H
55
84
64
0
1 byte
1 byte
1 byte
1 byte
Select peripheral device
ASCII:
Hexadecimal:
Decimal:
Value of n:
ESC = n
1B 3D n
27 61 n
1 (Default), 3 = Enable Printer
2 = Disable Printer
It selects the device to which the host PC transmits data. When the printer is disabled (n = 2), all data
except this command and the real-time commands are ignored.
n
1,3
2
3.7.8
Function
Enables Printer
Disables Printer
Clear buffer(s)
ASCII:
DLE DC4 fn d1 …d7
Hexadecimal: 10 14 fn d1…d7
Decimal:
16 20 fn d1…d7
Value:
fn = 8
d1 = 1, d2 = 3, d3 = 20, d4 = 1, d5 = 6, d6 = 2, d7 = 8
It clears all data stored in the receive buffer and the print buffer and transmits Clear response.
If a recoverable error occurs, recovers from the error.
Transmission data is as follows.
Data group of Clear
Hex
Decimal
Data
buffer response
(1) Header
37H
55
1 byte
(2) Data
25H
37
1 byte
(3) NULL
00H
0
1 byte
78
PROGRAMMING GUIDE
3.7.9
Extended Real-Time Status Transmission
ASCII:
DLE EM n
Hexadecimal: 10 19 n
Decimal:
16 25 n
Values of n:
0x01 = (Reserved)
0x02 = Error status
0x10 = Detail Cutter Error status
0x11 = Detail Printer Jam Error status
0x12 = Detail Thermal Head 1 Error status
0x14 = Detail Memory Error status
0x15 = (Reserved)
0x16 = Warning status
0x17 = Other Printer status
0x23-0xF3 = Diagnostic information
Error status (n=0x02)
bit
Function
Value
0 Undefined
0
1 Undefined
0
2 Fixed
0
3 Fixed
0
4 Fixed
0
5 Undefined
0
6 No Thermal Head Error.
0
Thermal Head is disconnected or Abnormal
1
Head is connected.
7 Fixed
1
Remarks
Fixed to off
Fixed to off
Fixed to off
Fixed to on
Detail Cutter Error status (n=0x10)
bit
Function
Value
Remarks
0 Cutter position is at home
0
It is not an error.
Sensor status
Cutter position is not at home
1
1 Undefined
0
2 Fixed
0
Fixed to off
3 Undefined
0
4 Fixed
0
Fixed to off
5 No Cutter error (It left home position correctly)
0
Cutter HP error
Cutter error (It did not leave home position)
1
6 No Cutter error (It came back to home )
0
Cutter HP error
Cutter error (It didn’t come back to home
1
position)
7 Fixed
1
Fixed to on
Bit 5 and Bit 6 of this status are detail error status of Cutter Error which is assigned at Bit3 in
Transmit error status (n=3) of Real Time Status Transmission.
Detail Printer Jam Error status (n=0x11)
bit
Function
0 No Paper Jam
Paper Jam
1 Undefined
2 Fixed
3 Jam sensor is OFF. (No paper on jam sensor)
Jam sensor is ON. (Paper on jam sensor)
4 Fixed
5 Undefined
79
Value
0
1
0
0
0
1
0
0
Remarks
Fixed to off
It is not an error.
Sensor status.
Fixed to off
PROGRAMMING GUIDE
6 Undefined
0
7 Fixed
1
Fixed to on
These status bits are detail error status of Jam Error which is assigned at Bit2 in Error status
(n=0x02) of Extended Real-Time Status Transmission.
Detail Thermal Head 1 Error status (n=0x12)
bit
Function
Value
Remarks
0 No failure dots in thermal head
0
This is not an
error. Warning.
Some failure dots in thermal head
1
1 No Thermal head overheat
0
This is not an
error. Warning.
Thermal head overheat (55 - 65 degree C)
1
2 Fixed
0
Fixed to off
3 No illegal head is installed.
0
Illegal head is installed. (All are failure dots)
1
4 Fixed
0
Fixed to off
5 Thermal head connecter is installed properly.
0
Thermal head connecter is disconnected.
1
6 Thermal head temperature is normal condition.
0
More than 90
degree C
Thermal head temperature is too high.
1
7 Fixed
1
Fixed to on
Bit0 is to report the result of thermal head failure detection. Therefore, the thermal head failure
detection must be performed before getting the latest status of the failure dots.
Bit3, Bit5 and Bit6 of this status are detail of Thermal Head Error assigned as follows.
1) Bit6 in Transmit error status (n=3) of Real Time Status Transmission
2) Bit6 in Error status (n=2) of Extended Real-Time Status Transmission
Detail Memory Error status (n=0x14)
bit
Function
Value
Remarks
0 (Reserved)
0
1 (Reserved)
0
2 Fixed
0
Fixed to off
3 No flash memory error in Diagnostics mode
0
Flash memory check error in Diagnostics mode
1
4 Fixed
0
Fixed to off
5 No RAM check error during boot-up
0
RAM check error during boot-up
1
6 No RAM check error in Diagnostics mode
0
RAM check error in Diagnostics mode
1
7 Fixed
1
Fixed to on
Bit3, Bit5 and Bit6 of this status are detail of Unrecoverable Error which is assigned at Bit5 in
Transmit error status (n=3) of Real Time Status Transmission.
Warning status (n=0x16)
bit
Function
Value
0 Paper Low Sensor is OFF
0
Paper Low Sensor is ON
1
1 No abnormal voltage
0
Abnormal voltage (24V)
1
2 Fixed
0
3 (Reserved)
0
4 Fixed
0
5 Sensor calibration has been successfully done.
0
Sensor calibration failed or hasn’t been
1
conducted yet.
6
(Reserved)
0
80
Remarks
Not warning.
Sensor status.
Fixed to off
Fixed to off
PROGRAMMING GUIDE
7 Fixed
1
Fixed to on
Bit 0 indicates actual paper low sensor status. Based on this sensor status, the printer firmware
detects the paper low according to “Paper Low Detection” setting in the printer configuration.
Other Printer status (n=0x17)
bit
Function
Value
Remarks
0 Printer has no data to be printed.
0
Printer has data to be printed.
1
1 Cover open sensor OFF (Cover is closed)
0
Cover open sensor ON (Cover is opened)
1
2 Fixed
0
Fixed to off
3 PE sensor OFF (Paper exists)
0
PE sensor ON (Paper runs out)
1
4 Fixed
0
Fixed to off
5 Printer is not in the printing stage.
0
Printer is in the printing stage.
1
6 Printer has no data to be processed.
0
Printer has data to be processed.
1
7 Fixed
1
Fixed to on
Bit0, Bit 5 and Bit 6 of this status are to indicate a transaction status that the printer firmware is
currently processing. If all bits are zero, the printer is in entirely idle condition.
1) Bit 0 is set when the printer has data to be printed. This bit includes the status which
invokes printer mechanical movement such as cash drawer open, paper feed, printer
exercise and so on. As soon as all data kept in the printer have been printed, this bit is
cleared.
2) Bit 5 is set when the printer is mechanically moving. e.g. feeding paper, cutting paper and
controlling the thermal head (Not only printing but also the thermal head failure detection
can be considered as controlling the thermal head.)
3) Bit 6 is set when there are some data in the receiving buffer (both real time data and batch
data) or in the transmitting buffer. As the first byte of the data is received, this bit is set and
it is cleared once the printer completes processing all data in the receiving buffer (No data
to process).
Diagnostic information (n=0x23-0xDF)
The printer returns all ASCII data for the information requested. It is preceded by the parameter
n to identify the diagnostic item and is followed by a Carriage Return (0D) to signify the end of
the data.
n (hex) Remote diagnostic item
23
Serial number
27
Class/model number
2F
Boot firmware CRC
4 digit ASCII
37
Flash firmware CRC
4 digit ASCII
4B
SBCS Version number
53
DBCS Version number
63
DHCP address 1
67
TCP Port number1
6B
UDP Port number1
6F
SNMP Community (R/W) 1
73
SNMP Trap 1 Community 1
77
SNMP Trap 2 Community 1
7B
SNMP Trap 1 IP Address 1
7F
SNMP Trap 2 IP Address 1
1
It is valid when option Network I/F card is installed.
81
Function
It returns serial number, Total 12 bytes
It returns Class/model number, Total 17 bytes
It returns boot firmware CRC, Total 6 bytes.
It returns flash firmware CRC, Total 6 bytes.
It returns SBCS version number, Total 6 bytes
It returns DBCS version number, Total 6 bytes
It returns DHCP address, Total 17 bytes
It returns TCP Port number, Total 7 bytes
It returns UDP Port number, Total 7 bytes
It returns SNMP Community (R/W), Total 19 bytes
It returns SNMP Trap 1 Community, Total 19 bytes
It returns SNMP Trap 2 Community, Total 19 bytes
It returns SNMP Trap 1 IP Address, Total 17 bytes
It returns SNMP Trap 2 IP Address, Total 17 bytes
PROGRAMMING GUIDE
83
87
93
97
9B
A3
A7
AB
AF
B3
Receipt length tally (Front)
Knife cut tally
Hours on tally
Boot firmware version
Control Table version
Flash firmware version
Flash cycles tally
Knife jams tally
Cover openings tally
Thermal head over heat tally
CB
D3
E3
F3
F7
FB
FF
Printer jam tally
Dot Failure info.
Maintenance tally
MAC address 1
IP address 1
Subnet mask 1
Default Gateway 1
It returns receipt length tally, Total 10 bytes
It returns Knife cut tally, Total 10 bytes
It returns Hours on tally, Total 10 bytes
It returns boot firmware version, Total 6 bytes
It returns Control table version, Total 6 bytes
It returns flash firmware version, Total 6 bytes
It returns Flash cycles tally, Total 10 bytes
It returns Knife jams tally, Total 10 bytes
It returns Cover opening tally, Total 10 bytes
It returns Thermal head over heat tally, Total 10
bytes
It returns Printer jam tally, Total 10 bytes
It returns number of failure dots, Total 5 bytes
It returns Maintenance tally, Total 10 bytes
It returns MAC address, Total 19 bytes
It returns IP address, Total 17 bytes
It returns Subnet mask, Total 17 bytes
It returns Default Gateway, Total 17 bytes
3.7.10
Real Time Printer Status Transmission
ASCII:
GS ENQ
Hexadecimal: 1D 05
Decimal:
29 5
The printer immediately transmits its status once it receives this command.
Value of Byte:
Bit Off/On
0
Off
On
1
Off
On
2
Off
On
3
Off
On
4
Off
On
5
Off
6
Off
On
7
On
Hex
00
01
00
02
00
04
00
08
00
10
00
00
40
80
Decimal
0
1
0
2
0
4
0
8
0
16
0
0
64
128
Function
Receipt paper adequate
Receipt paper low
Receipt paper adequate
Receipt paper low
Cover closed
Cover open
Interface not busy
Interface busy
One or both cash drawers open
Both cash drawers closed
Undefined. Fixed to off.
No error condition
Error condition exists in the printer
Not used. Fixed to On.
3.7.11
LED Control Request
ASCII:
GS z n
Hexadecimal: 1d 7A n
Decimal:
29 122 n
Values of n:
1 to 32 (LED Pattern ID)
The printer controls the LED according to a request from the host specified by n when the printer is
configured to User mode of LED.
When this command is received, the printer resets (turns off) the current state of all color of LED, and
82
PROGRAMMING GUIDE
then it changes the LED state according to the new parameter specified by this command.
Exceptions:
If the printer is in Auto mode of LED, this command is ignored.
The command is ignored if n is out of range.
3.7.12
Real-Time Printer Maintenance
ASCII:
GS SUB n
Hexadecimal: 1d 1A n
Decimal:
29 26 n
Values of n:
0x01 = Store firmware detail log into non-volatile memory
0x02 = (Reserved)
0x10 = Return Cutter cycle time
0x11 = Return Cutter cycle time
0x12 = (Reserved)
0x13 = (Reserved)
0x20 = Paper Low sensor ON value (Stored by Sensor Calibration)
0x21 = Paper Low sensor OFF value (Stored by Sensor Calibration)
0x22 = Paper Low sensor Threshold value (Stored by Sensor Calibration)
0x23 = Black Mark sensor ON value (Stored by Sensor Calibration)
0x24 = Black Mark sensor OFF value (Stored by Sensor Calibration)
0x25 = Black Mark sensor Threshold value (Stored by Sensor Calibration)
0x26 to 0x2E : (Reserved)
0x2F = Jam sensor ON value (Stored by Sensor Calibration)
0x30 = Jam sensor OFF value (Stored by Sensor Calibration)
0x31 = Jam sensor Threshold value (Stored by Sensor Calibration)
0x32 to 0x3F : (Reserved)
0x40 = Paper Low sensor ON value (Recent)
0x41 = Paper Low sensor OFF value (Recent)
0x42 – 0x4B : (Reserved)
0x4A = Jam sensor ON value (Recent)
0x4B = Jam sensor OFF value (Recent)
0x4C – 0x4D : (Reserved)
It transmits one byte maintenance related information of the printer.
Store firmware detail log into non-volatile memory (0x01)
It stores the detail firmware log recorded on RAM into the non-volatile memory and transmits the one
byte status as soon as it completes storing the log.
Value of Status Byte:
0x06 (Ack): Log was successfully stored into non-volatile memory.
0x15 (Nack): Log was not successfully stored into non-volatile memory.
Return Default Full Cut cycle time (0x10)
It transmits one cycle time of the full cut at the very beginning of the printer.
Value of Status Byte:
One cycle full cut time. Unit is 10 msec.
Return Latest Cut cycle time (0x11)
It transmits the latest one cycle time of the knife cut.
Value of Status Byte:
One cycle full cut time. Unit is 10 msec.
Return Default Sensor value (0x20 – 0x34)
It transmits the default sensor value calibrated.
Value of Status Byte:
Sensor ON/OFF/Threshold value stored when each sensor is calibrated.
If the sensor is not calibrated, zero is returned.
Return Recent Sensor value (0x40 – 0x4D)
It transmits the recent sensor value. The printer keeps monitoring sensor value and returns the highest
(OFF) and lowest (ON) value of this power on cycle.
83
PROGRAMMING GUIDE
Value of Status Byte:
Sensor ON/OFF value which is lowest/highest during this power-on cycle.
84
PROGRAMMING GUIDE
3.8
Bar Code Commands
3.8.1
Select Printing Position of HRI Characters
ASCII:
GS H n
Hexadecimal: 1D 48 n
Decimal:
29 72 n
Value of n:
Printing Position of HRI Characters
0, 48 = Not printed
1, 49 = Above the bar code
2, 50 = Below the bar code
3, 51 = Both above and below the bar code
Default:
0 (Not printed)
It specifies the printing position of HRI (Human Readable Interface) characters.
3.8.2
Select Pitch for HRI Characters
ASCII:
GS f n
Hexadecimal: 1D 66 n
Decimal:
29 102 n
Value of n:
Pitch
0, 48 = Standard Pitch at 15.2 CPI on receipt
1, 49 = Compressed Pitch at 19 CPI on receipt
Default:
(Standard Pitch at 15.2 CPI)
It specifies the character pitch of HRI characters.
3.8.3
Select Bar Code Height
ASCII:
GS h n
Hexadecimal: 1D 68 n
Decimal:
29 104 n
Value of n:
Number of dots
Range of n:
1 – 255
Default:
162
It specifies the bar code height in dots. n dots are equal to n/8 mm (n/203 inches).
Exceptions:
This command is not available for GS1 data bar and QR code.
3.8.4
Print Bar Code
First Variation
ASCII:
GS k m d1…dk NUL
Hexadecimal: 1D 6B m d1…dk 0
Decimal:
29 107 m d1…dk 0
Values:
Second Variation
GS k m n d1…dn
1D 6B m n d1…dn
29 107 m n d1…dn
It selects the bar code type and prints a bar code for the ASCII characters specified. If the bar code width
is more than the printable area, it is not printed.
Bar code horizontal position can be aligned by Select Justification(1B 61) command.
There are two formulas to specify the bar code type by this command. The first formula uses a NULL as
a terminator of the string. The second formula has the length parameter of the string instead of a
terminator so that it is able to include NULL in the string. Therefore, a bar code which defines NULL as
data, e.g. Code 128, can be specified by the second formula.
Check Digit of UPC and JAN (EAN) codes is automatically calculated and processed by the printer if it is
85
PROGRAMMING GUIDE
not sent from a system.
Start/Stop characters of Code 39 are automatically added and processed by the printer if they are not
sent from a system.
First Formula: String terminated by NULL
m = 0 – 6, 10
d = 32 - 126 (see the table)
n = 1 - 255 (see the table)
First Formula
m
Barcode type
0
UPC-A
1
UPC-E
2
3
4
JAN-13(EAN13)
JAN-8(EAN8)
CODE39
5
Interleaved 2 of 5
(ITF)
CODABAR
(NW-7)
6
10
PDF417
11
12
GS1-128
GS1 DataBar
Truncated
GS1 DataBar Stacked
GS1 DataBar Stacked
Omnidirectional
GS1 DataBar Limited
13
14
15
16
GS1 DataBar
Expanded
Data
48 – 57 (ASCII numerals)
d1 : 48 ( start code)
d2~dn : 48 – 57
48 – 57
48 – 57
48 – 57,
65 – 90 (ASCII alphabet),
32, 36, 37, 43, 45, 46, 47
(ASCII special characters)
d1=dk=42 (start/stop code is supplied
by printer if necessary)
48 – 57
n; Length
Fixed Length: 11, 12
Fixed Length: 11, 12
Fixed Length: 12, 13
Fixed Length: 7, 8
Variable length
Variable length
(Even number)
Variable length
Start / stop code : 65 – 68
Data code : 48 – 57,36, 43, 45, 46, 47,
58
1 – 255
Variable length
48 - 57
48 - 57
Variable length
Variable length
48 - 57
48 - 57
Variable length
Variable length
48 - 57
[However d1= 48, 49]
32 - 34, 37 - 47, 48 - 57,
58 - 63, 65 - 90, 95,
97 - 122, 123
[However d1 = 40, 48 <= d2 <= 57,
48 <= d3 <= 57 when
48 <= d1 <= 57, 48 <= d2 <= 57]
Variable length
Variable length
(2 - 70)
Second Variation: Length of Byte Specified at Beginning of String
m = 65 - 73, 75-82 (see the table)
d = 0 - 127 (see the table)
n = 1 - 255 (see the table)
Second Formula
m
Barcode type
65 UPC-A
66 UPC-E
67
68
JAN-13(EAN13)
JAN-8(EAN8)
Data
48 – 57 (ASCII numerals)
d1 : 48 ( start code)
d2~dn : 48 – 57
48 – 57
48 – 57
86
n; Length
Fixed Length: 11, 12
Fixed Length: 11, 12
Fixed Length: 12, 13
Fixed Length: 7, 8
PROGRAMMING GUIDE
69
CODE39
70
72
Interleaved 2 of 5
(ITF)
CODABAR
(NW-7)
Code 93
73
Code 128
75
PDF417
76
GS1 DataBar
Omnidirectional
GS1 DataBar
Truncated
GS1 DataBar Stacked
GS1 DataBar Stacked
Omnidirectional
GS1 DataBar Limited
71
77
78
79
80
81
GS1 DataBar
Expanded
82
UCC EAN128
48 – 57,
65 – 90 (ASCII alphabet),
32, 36, 37, 43, 45, 46, 47
(ASCII special characters)
d1=dk=42 (start/stop code is supplied by
printer if necessary)
48 – 57
Start / stop code : 65 – 68
Data code : 48 – 57,36, 43, 45, 46, 47, 58
0 – 127
Variable length
Variable length
(Even number)
Variable length
Variable length
0 – 105
d1=103 – 105 (must be a start code)
d2=0 – 102 (Data bytes)
(Stop code is provided by the printer
0 – 255
Variable length
48 - 57
Fixed Length: 13
48 - 57
Fixed Length: 13
48 - 57
48 - 57
Fixed Length: 13
Fixed Length: 13
48 - 57
[However d1= 48, 49]
32 - 34, 37 - 47, 48 - 57,
58 - 63, 65 - 90, 95,
97 - 122, 123
[However d1 = 40, 48 <= d2 <= 57,
48 <= d3 <= 57 when
48 <= d1 <= 57, 48 <= d2 <= 57]
0 -105
Fixed Length: 13
Variable length
Variable length
(2 - 70)
Variable length
Exceptions:
Illegal data cancels this command.
The command is valid only at the beginning of a line.
Additional information for GS1 DataBar:
In all GS1 DataBar except Expanded and Expanded Stacked, the printer automatically adds Application
Identifier (AI), Check Digit (C/D). Hence n (Length) is 13(Fixed Length)
Fig. about the addition of AI & C/D
Type of GS1 DataBar
example
GS1 DataBar Omnidirectional Input data:
2001234567890
GS1 DataBar Truncated
HRI print:
GS1 DataBar Stacked
(01)20012345678909
GS1 DataBar Stacked
Omnidirectional
GS1 DataBar Limited
GS1 DataBar Expanded
Input data:
GS1 DataBar Expanded
{(01{)15012345678907{(30{)23{1{(17{)950827
HRI print:
Stacked
(01)15012345678907(30)23(17)950827
AI & C/D
AI & C/D are
added
automatically.
The AI is ‘(01)’.
Neither AI nor
C/D is added
automatically.
In order to express AI in HRI, AI is surrounded by the bracket and printed. Because this parenthesis
needs to distinguish from the usual data, it is necessary to use special data.
In the case of Expanded and Expanded stacked, C/D is used for only HRI characters printing. Even if
87
PROGRAMMING GUIDE
the input data including wrong C/D is received, the printer prints the data without correction.
In the case of Expanded and Expanded stacked, when attaching the bracket to AI in HRI, it is necessary
to transmit data as follows.
Fig. about special data
Transmit data from HOST
SpecialData
ASCII
Hex
Decimal
(
{+(
7B + 28
123 + 40
)
{+)
7B + 29
123 + 41
FNC1
{+1
7B + 31
123 + 49
use
to express AI in HRI
to express AI in HRI
to recognize the end of variable length data
3.8.5
Print Bar Code (ESCPOS Emulation)
First Variation
ASCII:
Hexadecimal:
Decimal:
Values:
Second Variation
GS k m d1…dk NUL
1D 6B m d1…dk 0
29 107 m d1…dk 0
GS k m n d1…dn
1D 6B m n d1…dn
29 107 m n d1…dn
It selects the bar code type and prints a bar code for the ASCII characters specified. If the bar code width
is more than the printable area, it is not printed.
Bar code horizontal position can be aligned by Select Justification(1B 61) command.
There are two formulas to specify the bar code type by this command. The first formula uses a NULL as
a terminator of the string. The second formula has the length parameter of the string instead of a
terminator so that it is able to include NULL in the string. Therefore, a bar code which defines NULL as
data, e.g. Code 128, can be specified by the second formula.
Check Digit of UPC and JAN (EAN) codes is automatically calculated and processed by the printer if it is
not sent from a system.
Start/Stop characters of Code 39 are automatically added and processed by the printer if they are not
sent from a system.
First Formula: String terminated by NULL
m = 0 – 6, 10
d = 32 - 126 (see the table)
n = 1 - 255 (see the table)
First Formula
m
Barcode type
0
UPC-A
1
UPC-E
2
3
4
JAN-13(EAN13)
JAN-8(EAN8)
CODE39
5
Interleaved 2 of 5
(ITF)
CODABAR
(NW-7)
6
Data
48 – 57 (ASCII numerals)
d1 : 48 ( start code)
d2~dn : 48 – 57
48 – 57
48 – 57
48 – 57,
65 – 90 (ASCII alphabet),
32, 36, 37, 43, 45, 46, 47
(ASCII special characters)
d1=dk=42 (start/stop code is supplied
by printer if necessary)
48 – 57
Start / stop code : 65 – 68
Data code : 48 – 57,36, 43, 45, 46, 47,
58
88
n; Length
Fixed Length: 11, 12
Fixed Length: 11, 12
Fixed Length: 12, 13
Fixed Length: 7, 8
Variable length
Variable length
(Even number)
Variable length
PROGRAMMING GUIDE
Second Variation: Length of Byte Specified at Beginning of String
m = 65 - 73, 75-82 (see the table)
d = 0 - 127 (see the table)
n = 1 - 255 (see the table)
Second Formula
m
Barcode type
65 UPC-A
66 UPC-E
67
68
69
JAN-13(EAN13)
JAN-8(EAN8)
CODE39
70
72
Interleaved 2 of 5
(ITF)
CODABAR
(NW-7)
Code 93
73
Code 128
75
GS1 DataBar
Omnidirectional
GS1 DataBar
Truncated
GS1 DataBar Limited
71
76
77
78
GS1 DataBar
Expanded
Data
48 – 57 (ASCII numerals)
d1 : 48 ( start code)
d2~dn : 48 – 57
48 – 57
48 – 57
48 – 57,
65 – 90 (ASCII alphabet),
32, 36, 37, 43, 45, 46, 47
(ASCII special characters)
d1=dk=42 (start/stop code is supplied by
printer if necessary)
48 – 57
Start / stop code : 65 – 68
Data code : 48 – 57,36, 43, 45, 46, 47, 58
0 – 127
n; Length
Fixed Length: 11, 12
Fixed Length: 11, 12
Fixed Length: 12, 13
Fixed Length: 7, 8
Variable length
Variable length
(Even number)
Variable length
Variable length
0 – 105
d1=103 – 105 (must be a start code)
d2=0 – 102 (Data bytes)
(Stop code is provided by the printer
48 - 57
Variable length
48 - 57
Fixed Length: 13
48 - 57
[However d1= 48, 49]
32 - 34, 37 - 47, 48 - 57,
58 - 63, 65 - 90, 95,
97 - 122, 123
[However d1 = 40, 48 <= d2 <= 57,
48 <= d3 <= 57 when
48 <= d1 <= 57, 48 <= d2 <= 57]
Fixed Length: 13
Fixed Length: 13
Variable length
(2 - 70)
Exceptions:
Illegal data cancels this command.
The command is valid only at the beginning of a line.
Additional information for GS1 DataBar:
In all GS1 DataBar except Expanded and Expanded Stacked, the printer automatically adds Application
Identifier (AI), Check Digit (C/D). Hence n (Length) is 13(Fixed Length)
Fig. about the addition of AI & C/D
Type of GS1 DataBar
example
GS1 DataBar Omnidirectional Input data:
2001234567890
GS1 DataBar Truncated
HRI print:
GS1 DataBar Stacked
(01)20012345678909
GS1 DataBar Stacked
Omnidirectional
GS1 DataBar Limited
GS1 DataBar Expanded
Input data:
GS1 DataBar Expanded
{(01{)15012345678907{(30{)23{1{(17{)950827
89
AI & C/D
AI & C/D are
added
automatically.
The AI is ‘(01)’.
Neither AI nor
C/D is added
PROGRAMMING GUIDE
Stacked
HRI print:
(01)15012345678907(30)23(17)950827
automatically.
In order to express AI in HRI, AI is surrounded by the bracket and printed. Because this parenthesis
needs to distinguish from the usual data, it is necessary to use special data.
In the case of Expanded and Expanded stacked, C/D is used for only HRI characters printing. Even if
the input data including wrong C/D is received, the printer prints the data without correction.
In the case of Expanded and Expanded stacked, when attaching the bracket to AI in HRI, it is necessary
to transmit data as follows.
Fig. about special data
Transmit data from HOST
SpecialData
ASCII
Hex
Decimal
(
{+(
7B + 28
123 + 40
)
{+)
7B + 29
123 + 41
FNC1
{+1
7B + 31
123 + 49
90
use
to express AI in HRI
to express AI in HRI
to recognize the end of variable length data
PROGRAMMING GUIDE
3.8.5
PDF417: Set the row height
ASCII:
GS ( k pL pH cn fn n
Hexadecimal:1D 28 6B pL pH cn fn n
Decimal:
29 40 107 pL pH cn fn n
Range:
(pL + pH x 256) =3, (pL = 3, pH = 0)
cn = 48
fn = 68
2≤ n≤8
Default:
n=3
It sets the row height for PDF417 to [n x (the width of the module)].
3.8.6
PDF417: Set the error correction level
ASCII:
GS ( k pL pH cn fn m n
Hexadecimal: 1D 28 6B pL pH cn fn m n
Decimal:
29 40 107 pL pH cn fn m n
Range:
(pL + pH x 256) = 4 (pL =4, pH = 0)
cn = 48
fn = 69
m= 48, 49
48 ≤ n ≤ 53 [when m = 48]
1 ≤ n ≤ 40 [when m = 49]
Default:
m = 49, n = 1
It sets the error correction level for PDF417.
When m = 48, the error correction level is set by the “Level Setting” and the error correction level set by
“Ration Setting” is canceled. The numbers of error correction codewords are as follows:
n
48
49
50
51
52
53
Select
Select
Select
Select
Select
Select
Function
error correction level 0
error correction level 1
error correction level 2
error correction level 3
error correction level 4
error correction level 5
Number of error correction codewords
2
4
8
16
32
64
When m = 49, the error correction level is set by the “Ratio Setting” to the level indicated by the number for
encoded data, and the error correction level set by the “Level Setting” is canceled. The rate is set to [n x 10%].
The error correction levels in the following table are determined by the calculation [Data codeword x n x 0.1 =
(A)] (Fractions of 0.5 and over are rounded up, and others are truncated.)
Result (A)
0 to 3
4 to 10
11 to 20
21 to 45
46 to 100
User the error correction level
Error correction level 1
Error correction level 2
Error correction level 3
Error correction level 4
Error correction level 5
91
Number of error correction codeword
4
8
16
32
64
PROGRAMMING GUIDE
3.8.7
PDF417: Select the options
ASCII:
GS ( k pL pH cn fn m
Hexadecimal: 1D 28 6B pL pH cn fn m
Decimal:
29 40 107 pL pH cn fn m
Range:
(pL + pH x 256) = 3 (pL = 3, pH = 0)
cn = 48
fn = 70
m = 0, 1
Default:
m =0
It selects the options for PDF417.
m
0
1
3.8.8
Function
Selects the standard PDF417.
Selects the truncated PDF417.
PDF417: Store the data in the symbol storage area
ASCII:
GS ( k pL pH cn fn m d1 … dk
Hexadecimal: 1D 28 6B pL pH cn fn m d1 … dk
Decimal:
29 40 107 pL pH cn fn m d1 … dk
Range:
4 ≤ (pL + pH x 256) ≤ 65535 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 255)
cn = 48
fn = 80
m = 48
0 ≤ d ≤ 255
k = (pL + pH x 256) – 3
It stores the PDF417 symbol data (d1…dk) in the symbol storage area.
3.8.9
PDF417: Print the symbol data in the symbol storage area
ASCII:
GS ( k pL pH cn fn m
Hexadecimal: 1D 28 6B pL pH cn fn m
Decimal:
29 40 107 pL pH cn fn m
Range:
(pL + pH x 256) = 3 (pL = 3, pH = 0)
cn = 48
fn = 81
m = 48
It encodes and prints the PDF417 symbol data in the symbol storage area with GS ( k <fn= 080>.
User must secure the quiet zone (left, right, upward, and download space areas defined by the PDF417
symbol specifications) for PDF417 printing.
In standard mode, symbols higher than 831 dots cannot be printed with this printer.
92
PROGRAMMING GUIDE
3.8.10
PDF417: Transmit the size information of the symbol data in the symbol storage
area
ASCII:
GS ( k pL pH cn fn m
Hexadecimal: 1D 28 6B pL pH cn fn m
Decimal:
29 40 107 pL pH cn fn m
Range:
(pL + pH x 256) = 3 (pL = 3, pH = 0)
cn = 48
fn = 82
m = 48
It transmits the size information for the encoded PDF417 symbol data in the symbol storage area with
GS ( k <fn= 080>.
This function does not print.
The size information does not include the quiet zone (left, right, upward, and downward space areas
defined by the PDF417 symbol specifications).
Transmission data is as follows.
Description
Hex
Decimal
Data
Header
37
55
1 byte
Identifier
2F
47
1 byte
Horizontal size
30-39
48-57
1 - 5 bytes
Separator
1F
31
1 byte
Vertical Size
30-39
48-57
1 - 5 bytes
Separator
1F
31
1 byte
Fixed Value
31
49
1 byte
Separator
1F
31
1 byte
Other information
30 or 31
48 or 49
1 byte
NULL
00
0
1 byte
3.8.11
QR Code: Select the model
ASCII:
GS ( k pL pH cn fn n1 n2
Hexadecimal:
1D 28 6B pL pH cn fn n1 n2
Decimal:
29 40 107 pL pH cn fn n1 n2
Values of pL,pH: pL , pH specify (pL + pH × 256) as the number of bytes after pH (cn, fn, and
[parameters]). (pL + pH × 256) = 4 So (pL = 4, pH = 0)
Value of cn:
49
Value of fn:
65
Value of n1:
49= Selects model 1 Code conversion processing
50= Selects model 2 conversion processing.
200= Select Micro QR Code.
Value of n2:
0
Default:
n1 = 50, n2 = 0
It selects the model for QR Code.
3.8.12
QR Code: Set the size of module
ASCII:
GS ( k pL pH cn fn n
Hex:
1D 28 6B pL pH cn fn n
Decimal:
29 40 107 pL pH cn fn n
Value of pL, pH:
pL , pH specify (pL + pH × 256) as the number of bytes after pH (cn, fn, and
[parameters]). (pL + pH × 256) = 3 So (pL = 3, pH = 0)
Value of cn:
49
Value of fn:
67
93
PROGRAMMING GUIDE
Range of n:
Default n :
1-16
3
It sets the size of the module for QR Code as n dots. User must secure the quiet zone (left, right, upward,
and downward space areas defined by the QR Code symbol specifications) for QR Code printing. Quiet
zone is defined as 4 cells in standard and MicroQR code versions.
Notes:
The recommended module size is 4 dots and above. But, if n = 4 is used, this printer cannot print
maximum size of barcode data because the barcode width will be over the printable width. So, Default
value of n is defined to 3 in this version.
3.8.13
QR Code: Select the error correction level
ASCII:
GS ( k pL pH cn fn n
Hex:
1D 28 6B pL pH cn fn n
Decimal:
29 40 107 pL pH cn fn n
Value of pL, pH:
pL , pH specify (pL + pH × 256) as the number of bytes after pH (cn, fn, and
[parameters]). (pL + pH × 256) = 3 So (pL = 3, pH = 0)
Value of cn:
49
Value of fn:
69
Value of n:
Default n :
48 = Select error correction level L 7 %
49 = Select error correction level M 15 %
50 = Select error correction level Q 25 %
51 = Select error correction level H 30 %
When model1 or model2 selected
When microQR selected
48
n=48, 49, 50, 51
n=48, 49, 50
It selects the error correction level for QR Code.
Note:
In Micro QR, error correction level='H' is not printed at the time of the choice.
For 'Symbol versionM1' in micro QR, please choose error correction level='L'.
3.8.14
QR Code: Select encode modes.
ASCII:
GS ( k pL pH cn fn n
Hex:
1D 28 6B pL pH cn fn n
Decimal:
29 40 107 pL pH cn fn n
Value of pL, pH:
pL , pH specify (pL + pH × 256) as the number of bytes after pH (cn, fn, and
[parameters]). (pL + pH × 256) = 3 So (pL = 3, pH = 0)
Value of cn:
49
Value of fn:
70
Value of n:
0,48 = Encode lower-case alphabet characters in 8-bit mode
1,49 = Ignore case distinctions and use only upper case characters
2,50 = Encode lower-case alphabet characters in 8 bit mode.
Assume that the input contains kanji(Shift-Jis)
3,51 = Ignore case distinctions and use only upper case characters
Assume that the input contains kanji(Shift-jis)
4,52 = Encode entire data in 8-bit mode
Default n :
0,48
Note: ESC @ set the encoding mode to default
94
PROGRAMMING GUIDE
3.8.15
QR Code: Store the data in the symbol storage area
ASCII:
GS ( k pL pH cn fn m d1…dk
Hex:
1D 28 6B pL pH cn fn m d1…dk
Decimal:
29 40 107 pL pH cn fn m d1…dk
Range of pL:
4 - 255, Here 4 ≤ (pL + pH × 256) ≤ 7092
Range of pH:
0 - 27
Value of cn:
49
Value of fn:
80
Value of m:
48
Range of d
0 - 255
Value of k:
(pL + pH × 256) – 3
It stores the QR Code symbol data (d1...dk) into the symbol storage area (RAM).
3.8.16
QR Code: Print the symbol data in the symbol storage area
ASCII:
GS ( k pL pH cn fn m
Hex
1D 28 6B pL pH cn fn m
Decimal
29 40 107 pL pH cn fn m
Value of pL, pH
pL , pH specify (pL + pH × 256) as the number of bytes after pH (cn, fn, and
[parameters]). (pL + pH × 256) = 3 So (pL = 3, pH = 0)
Value of cn
49
Value of fn
81
Value of m
48
It encodes and prints the QR Code symbol data in the symbol storage area with GS ( k .
Note: User must secure the quiet zone (left, right, upward, and downward space areas defined by the QR
Code symbol specifications) for QR Code printing.
3.8.17
QR Code: Transmit the size information of the symbol data in the symbol storage area
ASCII
GS ( k pL pH cn fn m
Hex
1D 28 6B pL pH cn fn m
Decimal
29 40 107 pL pH cn fn m
Value of pL, pH
pL , pH specify (pL + pH × 256) as the number of bytes after pH (cn, fn, and
[parameters]). (pL + pH × 256) = 3 So (pL = 3, pH = 0)
Value of cn
49
Value of fn
82
Value of m
48
Printer transmits the size information for the encoded QR Code symbol data in the symbol storage area.
Description
Header
Identifier
Horizontal size
Separator
Vertical Size
Separator
Fixed Value
Separator
Other information
NULL
Hex
37
36
30-39
1F
30-39
1F
31
1F
30 or 31
00
Decimal
55
54
48-57
31
48-57
31
49
31
48 or 49
0
Note:
In the above, “Other information” represents the possibility of printing QR Code.
Other Information:
0x30 - Printing is possible
95
Data
1 byte
1 byte
1 - 5 bytes
1 byte
1 - 5 bytes
1 byte
1 byte
1 byte
1 byte
1 byte
PROGRAMMING GUIDE
0x31 - Printing is impossible
Horizontal and vertical sizes are specified as ASCII value of received byte. They can be obtained by
following equations.
Horizontal size = Number of cells in Horizontal Direction × Symbol size specified by the command 1D 28
6B 03 00 31 43 n
Vertical size = Number of cells in Vertical Direction × Symbol size specified by the command 1D 28 6B
03 00 31 43 n
Example: If Symbol size is specified as 10 by the command 1D 28 6B 03 00 31 43 n and number of pixels
in horizontal direction is 21 then horizontal size will be 10 * 21=210. So the printer’s output will be 37 36
32 31 30 1f 32 31 30 1f 31 1f 30 00.
3.8.18
2-dimensional GS1 DataBar: Set the module width
ASCII:
GS ( k pL pH cn fn n
Hexadecimal: 1D 28 6B pL pH cn fn n
Decimal:
29 40 107 pL pH cn fn n
Range of pL, pH: (pL + pH × 256) = 3 (pL = 3, pH = 0)
Value of cn:
51
Value of fn:
67
Value of n:
1≤ n≤ 6
It sets the width of one module of 2-dimensional GS1 DataBar to n dots.
3.8.19
2-dimensional GS1 DataBar: Set the maximum width of GS1 DataBar Expanded
Stacked
ASCII:
GS ( k pL pH cn fn nL nH
Hexadecimal: 1D 28 6B pL pH cn fn nL nH
Decimal:
29 40 107 pL pH cn fn nL nH
Range of pL, pH: (pL + pH × 256) = 4 (pL = 4, pH = 0)
Value of cn:
51
Value of fn:
72
Value of n:
(nL + nH x 256) = 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22
Default of n:
(nL + nH x 256) = 4 (nL =4, nH = 0)
It sets the maximum width (segment number) of GS1 DataBar Expanded Stacked (2-dimensional GS1
DataBar) .
96
PROGRAMMING GUIDE
3.8.20
2-dimensional GS1 DataBar: Store data in the symbol storage area
ASCII:
GS ( k pL pH cn fn m n d1,,,dk
Hexadecimal: 1D 28 6B pL pH cn fn m n d1,,,dk
Decimal:
29 40 107 pL pH cn fn m n d1,,,dk
Range of pL, pH: 6 ≤ (pL + pH × 256) ≤ 259 (0 ≤ pL ≤ 255, pH = 0, 1)
Value of cn:
51
Value of fn:
80
Value of m:
48
Value of n:
72 = GS1 DataBar Stacked
73 = GS1 DataBar Stacked Omnidirectional
76 = GS1 DataBar Expanded Stacked
Range of d:
0 ≤ d ≤ 255
Range of k:
k = (pL + pH × 256) - 4
It stores symbol data (d1…dk) in 2-dimensional GS1 DataBar in the symbol storage.
3.8.21
2-dimensional GS1 DataBar: Print data in the symbol storage area
ASCII:
GS ( k pL pH cn fn m
Hexadecimal: 1D 28 6B pL pH cn fn m
Decimal:
29 40 107 pL pH cn fn m
Range of pL, pH: (pL + pH × 256) = 3 (pL= 3, pH = 0)
Value of cn:
51
Value of fn:
81
Value of m:
48
It encodes and prints the symbol data stored by GS ( k <fn=80>) in the symbol.
Note:
The user must secure the quiet zones (the space at the top, bottom, right, and left of the symbols, which
is specified by the 2-dimensional GS1 DataBar standard.)
In standard mode, if the symbol size exceeds the print area, feeds the paper as much as the symbol’s
height, without printing the symbol.
97
PROGRAMMING GUIDE
3.8.22
2-dimensional GS1 DataBar: Transmit size information of the symbol data in the
symbol storage area
ASCII:
GS ( k pL pH cn fn m
Hexadecimal: 1D 28 6B pL pH cn fn m
Decimal:
29 40 107 pL pH cn fn m
Range of pL, pH: (pL + pH × 256) = 3 (pL= 3, pH = 0)
Value of cn:
51
Value of fn:
82
Value of m:
48
Transmits the size information when printing the symbol data stored by GS ( k < fn=80>) in the symbol
storage area.
Note:
Printing is excluded from the processing executed by this function.
The size information excludes the quiet zones (the space at the top, bottom, right, and left of the
symbols, which is specified by the 2-dimensional GS1 DataBar standard.)
Transmission data is as follows.
Description
Hex
Decimal
Data
Header
37
55
1 byte
Identifier
4F
79
1 byte
Horizontal size
30-39
48-57
1 - 5 bytes
Separator
1F
31
1 byte
Vertical Size
30-39
48-57
1 - 5 bytes
Separator
1F
31
1 byte
Fixed Value
31
49
1 byte
Separator
1F
31
1 byte
Other information
30 or 31
48 or 49
1 byte
NULL
00
0
1 byte
3.8.23
Select PDF 417 parameters
ASCII:
GS p a b c d e f
Hex
1D 70 a b c d e f
Decimal
29 112 a b c d e f
Default :
a=1
b=2
c = 58
d=7
e=3
f = 10
Description : Selects the two-dimensional PDF 417 parameters as follows
value
a,b
Range
c
A = height
B = width
Rows
1 ≤ a ≤ 10
1 ≤ b ≤ 100
3 ≤ c ≤ 90
d
Columns
7 ≤ d ≤ 30
98
description
The ration of bar
height to symbol
length.
Number of rows in
the matrix of code
words.
Number of
columns in the
matrix of code
words.
Support
Not supported
Not supported
Not supported
Not supported
Not supported
PROGRAMMING GUIDE
e
X dimension
1≤e ≤7
f
Y dimension
2 ≤ f ≤ 25
Width of a single
module in dots.
Height of the code
word in dots.
Supported
Not supported
PDF 417 is a multi-row, continuous, variable length symbolism which has high data capacity. Each
symbol has between 3 and 90 rows, with each row containing a start pattern, a left row indicator, 1 to 30
data characters, a right row indicator and a stop pattern. The number and length of the rows are
selectable, which allows the aspect ratio to be adjusted to particular labeling applications. There are no
separator bars between rows.
Each character has four bars and four spaces within 17 modules, and is assigned a value between 0 and
928. For this symbolism, it is common to refer to these character values as “code words”.
There are three mutually exclusive sets of symbol patterns, or clusters, each having 929 distinct
patterns. Because different clusters are used for adjacent rows, it is possible for the decoder to tell if the
scanning path is crossing row boundaries without the use of separator bars.
All parameter except e ignored, but it have to be transmitted. The height is the double of the width.
99
PROGRAMMING GUIDE
3.8.24
DataMatrix: Set the symbol type, number of columns, number of rows
ASCII:
GS ( k pL pH cn fn m d1 d2
Hexadecimal: 1D 28 6B pL pH cn fn m d1 d2
Decimal:
29 40 107 pL pH cn fn m
Range of pL, pH: (pL + pH × 256) = 5 (pL= 5, pH = 0)
Value of cn:
54
Value of fn:
66
Value of m:
0,1,48,49
Value of d1,d2 :
Value
Range
When m= 0, 48 (d1,d2) (0, 0), (10, 10), (12, 12), (14, 14), (16, 16),
(18, 18), (20,20), (22, 22), (24, 24), (26,
26), (32, 32), (36, 36), (40, 40), (44, 44),
(48, 48), (52, 52), (64, 64), (72, 72), (80,
80), (88, 88), (96, 96), (104, 104), (120,
120), (132, 132), (144, 144)
When m= 1, 49 (d1,d2) (8, 0), (8, 18), (8, 32), (12, 0), (12, 26), (12,
36), (16, 0), (16, 36), (16, 48)
Default : m = 0
d1,d2 = (0,0)
Description : This command sets the symbol type, number of rows(d1), and number of columns(d2)
d1
d2
m
0,48
d1,d2
(0,0)
Symbol type
Square(ECC200)
0,48
Other than (0, 0)
Square(ECC200)
1,49
(8, 0), (12, 0),
(16, 0)
Other than (8,
0), (12, 0), (16,
0)
Rectangle (ECC200)
1,49
Rectangle (ECC200)
Number of Columns, row
Sets automatic processing for the number of
columns and rows of the symbol.
Sets the number of columns of the symbol to d1,
the number of rows to d2 .
Sets the rows of the symbol to d1, the number of
columns to automatic processing.
Sets the number of rows of the symbol to d1, the
number of columns to d2.
Notes :
 This command is ignored if any of m, d1, or d2 is out of range.
 Setting of this command are in effect until 1B 40 is executed, the printer is reset, or the power is turned
off.
 Setting of this command affect the encode processing for DataMatrix. Changing the symbol type affects
the horizontal and vertical sizes of the symbol.
100
PROGRAMMING GUIDE
 DataMatrix is capable of encoding variable length data. For m with automatic processing, the resulting
symbol varies according to the amount of data encoded. For m which requires setting d1 and d2, the
following table provides a useful guide to estimating size of symbol depending on number of data to be
encoded:
Symbol
Type
Square
10,10
12,12
14,14
16,16
18,18
20,20
22,22
24,24
26,26
32,32
36,36
40,40
44,44
48,48
52,52
64,64
72,72
80,80
88,88
96,96
104,104
120,120
132,132
144,144
Rectangle
8,18
8,32
12,26
12,36
16,36
16,48
Maximum Data
Numeric
Alphanumeric
6
10
16
24
36
44
60
72
88
124
172
228
288
348
408
560
736
912
1152
1392
1632
2100
2608
3116
3
6
10
16
25
31
43
52
64
91
127
169
214
259
304
418
550
682
862
1042
1222
1573
1954
2335
10
20
32
44
64
98
6
13
22
31
46
72
101
PROGRAMMING GUIDE
3.8.25
DataMatrix: Set the size of the m odule
ASCII:
GS ( k pL pH cn fn n
Hexadecimal: 1D 28 6B pL pH cn fn n
Decimal:
29 40 107 pL pH cn fn n
Range of pL, pH: (pL + pH × 256) = 3 (pL= 3, pH = 0)
Value of cn:
54
Value of fn:
67
Value of n:
2-16
Default : n = 3
Description : This command sets the width of one module of DataMartix to n dots.
Notes :
 n = width of a module = height of a module (because the DataMatrix modules are square). If n is outside
its range, this command is ignored.
 Settings of this command are in effect until 1b 40 is executed, the printer is reset, or the power is turned
off.
 Settings of this command affect the encode processing for DataMatrix. Changing the symbol type affects
the horizontal and vertical sizes of the symbol.
3.8.26
DataMatrix: Store the data in the sym bol storage area
ASCII:
GS ( k pL pH cn fn m d1…dk
Hexadecimal: 1D 28 6B pL pH cn fn m d1…dk
Decimal:
29 40 107 pL pH cn fn m d1…dk
Range of pL, pH: 4 ≤ (pL + pH × 256) ≤ 3119 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 12)
Value of cn:
54
Value of fn:
80
Value of m:
48
Value of d:
0-255
Value of k:
(pL + pH x 256) - 3
Description : This command stores the DataMatrix symbol data (d1...dk) in the symbol storage area. k
bytes of d1...dk are processed as the symbol data.
Notes :
 The symbol data saved in the symbol storage area by this command is encoded by printing and
transmission of this command.
 After printing and transmission are executed, the symbol data in the symbol storage area is kept. FNC1
character must be specified as ESC (Hex = 1BH / Decimal = 27) + “1” (Hex = 31H / Decimal = 49). ESC
itself must be specified as ESC + ESC..
 The symbol data saved in the symbol storage area by this command is kept until the following processing
is performed:.
o This function is executed
o 1B 40 is executed
o The printer is reset or the power is turned off.
102
PROGRAMMING GUIDE
3.8.27
DataMatrix: Print the sym bol data in the sym bol storage area
ASCII:
GS ( k pL pH cn fn m
Hexadecimal: 1D 28 6B pL pH cn fn m
Decimal:
29 40 107 pL pH cn fn m
Range of pL, pH: (pL + pH × 256) = 3 (pL= 3, pH = 0)
Value of cn:
54
Value of fn:
81
Value of m:
48
Description : This command encodes and prints the DataMatrix symbol data stored in the symbol
storage area.
Notes :
 Use this command when the printer is at the beginning of a line, or there is no data in the print buffer
 If the symbol size exceeds the print area, the printer feeds the paper as much as the symbol’s height,
without printing the symbol.
 The quiet zone (the space at the top, bottom, right, and left of the symbols, which is specified by the
DataMatrix standard) is not included in the printing data. Be sure to include the quiet zone when using
this function.
 If there is any of the errors described below in the data of the symbol storage area, the barcode will not
be printed.





o No data
o When there is a problem with the amount of data saved in the symbol storage area.
o When the data saved in the symbol storage area includes data outside the domain.
Printing of symbol is not affected by print mode (emphasized, double-strike, underline, or font size),
except for upside-down print mode.
The following functions are not supported:
o Structured Append Symbols Macro Character
o Reader Programming Character
o ECI: Extended Channel Interpretation
Error correction version is ECC 200. Versions ECC 000 – 140 cannot be used.
o For ECC 200, the Reed-Solomon Error Detection and Correction algorithm is used for the error
correction codewords.
o In the Reed-Solomon Error Detection and Correction algorithm, the error correction level (%) is
automatically determined based on the symbol size.
This command executes paper feeding for the amount needed for printing the symbol, regardless of the
paper feed amount set by the paper feed setting command. After the symbol printing, the print position
is moved to left side of the printable area. Also, the printer is in the status “beginning of the line”.
In Page mode, the printer stores the symbol data in the print buffer without execut ing actual printing. The
printer moves print position to the next dot of the last data of the symbol.
103
PROGRAMMING GUIDE
3.8.28
DataMatrix: Transmit the size information of the symbol data in the symbol storage
area
ASCII:
GS ( k pL pH cn fn m
Hexadecimal: 1D 28 6B pL pH cn fn m
Decimal:
29 40 107 pL pH cn fn m
Range of pL, pH: (pL + pH × 256) = 3 (pL= 3, pH = 0)
Value of cn:
54
Value of fn:
82
Value of m:
48
Description : Transmits the size information for printing the DataMatrix symbol data stored.
Notes :


In Standard mode, use this function when the printer is "at the beginning of a line,"or "there is no
data in the print buffer."
The size information for each data is as follows;
Description
Header
Identifier
Horizontal size
Separator
Vertical Size
Separator
Fixed Value
Separator
Other information
Error information
NULL

Hex
37
59
30-39
1F
30-39
1F
31
1F
30 or 31
30-39
00
Decimal
55
89
48-57
31
48-57
31
49
31
48 or 49
48-57
0
Data
1 byte
1 byte
1 - 5 bytes
1 byte
1 - 5 bytes
1 byte
1 byte
1 byte
1 byte
4 bytes
1 byte
“Other information” for each data is as follows
Hex
Decimal
Condition
30
48
Printing is possible
31
49
Printing is impossible
“Error information” indicates mainly detailed information when “Other information” is “Unprintable”.
Error
Error content
Solution
information
“0000”
No error(Printing is possible)
“1001”
Encoded data cannot be within one
Check the number of encoded data
symbol
“1002”
Encode processing failed.
Check the encoded data.
“2001”
When the Standard mode is selected, Print or clear the data in the print
there is data in the print buffer.
buffer
“2002
The symbol size is bigger than the
Make the module size smaller.
current printing area.
Change the printing layout (printing
◾The symbol is bigger than the
area, printing position, etc.)
printing area.
◾The printing position is at the
buffer-full position.

104
PROGRAMMING GUIDE
3.9
Page Mode Commands
Standard Mode is the default mode which prints data as soon as one line data in the print buffer is ready
to print. One line data is printed once a print command such as LF (0x0A) is processed or one line buffer
is full.
Page Mode is the mode which prints all data in the page buffer at a time. In this mode, the printer does
not start printing even if the condition printing data in Standard Mode takes place, it queues data into the
page buffer until the print command in Page Mode such as ESC FF (0x1B 0x0C) is processed.
The basic flow of page mode printing is as follows.
1) Switch to Page Mode by “Select Page Mode” command (1B 4C).
2) Specify the origin and the size of the printing area by “Set Printing Area in Page Mode” command
(1B 57).
3) Specify the starting position and print direction by “Select Print Direction in Page Mode” command
(1B 54).
4) Store print data (text, image or barcode…) in the page buffer.
5) Print buffered data in the page buffer by “Print Data in Page Mode” command (1B 0C).
6) Switch to Standard Mode by “Select Standard Mode” command (1B 53).
3.9.1
Print and Return to Standard Mode
ASCII:
FF
Hexadecimal: 0C
Decimal:
12
It prints all buffered data in the page buffer on the page area defined and switches to Standard Mode
from Page Mode.
Exceptions:
This command is valid in Page Mode.
3.9.2
Print and feed marked paper to print starting position
ASCII:
FF
Hexadecimal: 0C
Decimal:
12
Prints the data in the print buffer and feeds marked paper to the print starting position.
Notes :
If the BM sensor is enabled by using memory switch 0x80 the printer feeds the
marked paper to the next mark position.
If the paper is at the print starting position and there is no data in the print buffer, this
command is ignored.
If the BM sensor is enabled by using memory switch 0x80 the minimum foot loss is >
5 mm.
After printing, the printing position moves to the beginning of the line. When a left
margin is set, the position of the left margin is the beginning of the line.
3.9.3
Cancel Print Data in Page Mode
ASCII:
CAN
Hexadecimal: 18
Decimal:
24
It deletes all buffered data in the page buffer.
Exceptions:
This command is valid in Page Mode.
105
PROGRAMMING GUIDE
3.9.4
Print Data in Page Mode
ASCII:
ESC FF
Hexadecimal: 1B 0C
Decimal:
27 12
It prints all buffered data in the page buffer on the page area defined.
Exceptions:
This command is valid in Page Mode.
3.9.5
Select Page Mode
ASCII:
ESC L
Hexadecimal: 1B 4C
Decimal:
27 76
It switches from Standard Mode to Page Mode.
Exceptions:
The command is valid at the beginning of a line in Standard Mode.
3.9.6
Select Standard Mode
ASCII:
ESC S
Hexadecimal: 1B 53
Decimal:
27 83
It switches from Page Mode to Standard Mode.
Switching to Standard Mode clears all buffered data in the page buffer and initializes the definition of the
page area.
Exceptions:
This command is valid in Page Mode.
3.9.7
Select Print Direction in Page Mode
ASCII:
ESC T n
Hexadecimal: 1B 54 n
Decimal:
27 84 n
Value of n:
0, 48 = Upper left corner proceeding across page to the right (A)
1, 49 = Lower left corner proceeding up the page (B)
2, 50 = Lower right corner proceeding across page to the left(upside down) (C)
3, 51 = Upper right corner proceeding down page (D)
It selects the printing direction and start position in Page Mode. The following illustration indicates the
direction and the start position of each parameter.
The command can be sent multiple times in one page.
n=0
n=3
n=1
n=2
106
PROGRAMMING GUIDE
Default:
0 (Upper left corner proceeding across page to the right)
Exceptions:
This command is valid in Page Mode.
This command is ignored if the value of n is out of the range.
3.9.8
Set Printing Area in Page Mode
ASCII:
ESC W n1, n2 ...n8
Hexadecimal: 1B 57 n1, n2 ...n8
Decimal:
27 87 n1,n2 ...n8
Range of n:
0 – 255
Default:
n1 – n4 = 0
n5 = 64
n6 = 2
n7 = 64
n8 = 2
It sets the logical origin and the size of the printing area in Page Mode.
Formulas:
x0, y0: The logical origin specified by the calculation of parameters n1, n2, n3 and n4 based on the
absolute origin which is located at the upper left side of the printing area.
dx, dy: The size of the printing area dx and dy is specified by the calculation of parameters n5, n6, n7
and n8.
The unit of xy direction of each formula are Horizontal Motion Unit and Vertical Motion Unit which
are specified by “Set Horizontal and Vertical Minimum Motion Units” command (1D 50).
x0 = n1 + n2 x 256
y0 = n3 + n4 x 256
dx = n5 + n6 x 256
dy = n7 + n8 x 256
The maximum printable area in the x direction is 576/203 inches.
The maximum printable area in the y direction is 2000/203 inches.
Exception:
This command is valid in Page Mode.
3.9.9
Set Absolute Vertical Print Position in Page Mode
ASCII:
GS $ nL nH
Hexadecimal: 1D 24 nL nH
Decimal:
29 36 nL nH
It moves the vertical print position to the position specified by this command from the starting position
specified by “Select Print Direction in Page Mode (1B 54)” command in Page Mode.
Formulas:
0 ≤ (nL + nH X 256) ≤ 65535
The unit of this formula is Vertical or Horizontal Motion Unit which is specified by “Set Horizontal and
Vertical Minimum Motion Units” command (1D 50).
When the starting position specified by “Select Print Direction in Page Mode” command (1B 54) is set to
the upper left or lower right of the printing area, Vertical Motion Unit is used for this formula.
When the starting position specified by “Select Print Direction in Page Mode” command (1B 54) is set to
the upper right or lower left of the printing area, Horizontal Motion Unit is used for this formula.
107
PROGRAMMING GUIDE
Exceptions:
This command is valid in Page Mode.
If the position specified exceeds the print area, this command is ignored.
3.9.10
Set Relative Vertical Print Position in Page Mode
ASCII:
GS \ nL nH
Hexadecimal: 1D 5C nL nH
Decimal:
29 92 nL nH
It moves the vertical print position to the position specified by this command from the current position in
Page Mode.
Formulas:
Downward movement: (nL + nH X 256)
Upward movement: (nL + nH X 256) - 65535
The positive number implies that it moves downward, and the negative number moves the position
upward.
The unit of this formula is Vertical or Horizontal Motion Unit which is specified by “Set Horizontal and
Vertical Minimum Motion Units” command (1D 50).
When the starting position specified by “Select Print Direction in Page Mode” command (1B 54) is set to
the upper left or lower right of the printing area, Vertical Motion Unit is used for this formula.
When the starting position specified by “Select Print Direction in Page Mode” command (1B 54) is set to
the upper right or lower left of the printing area, Horizontal Motion Unit is used for this formula.
Exceptions:
This command is valid in Page Mode.
If the position specified exceeds the print area, this command is ignored.
108
PROGRAMMING GUIDE
3.10
Macro Commands
3.10.1
Start and Terminate Macro Definition
ASCII:
GS :
Hexadecimal: 1D 3A
Decimal:
29 58
It starts and terminates a macro definition to the target memory specified by Select Memory Type for
User Defined Data(1D 22 n) command.
Only one macro can be stored in Macro area of each target memory (RAM and Flash memory).
Once this command is processed, the subsequent data is treated as macro data to define, and it
continues to define the macro until this command is processed once again.
While the macro is being defined, if “Execute Macro (1D 5E) command” is received, it cancels the macro
definition.
If Macro is defined on RAM, it is no longer available once the printer is reset. However, this macro is not
cleared by Initialize Printer (1B 40)” command.
Formulas:
A macro can be defined up to 2048 bytes. If the macro definition exceeds 2048 bytes, excess data is not
stored.
3.10.2
Execute Macro
ASCII:
GS ^ r t m
Hexadecimal: 1D 5E r t m
Decimal:
29 94 r t m
Value of r:
The number of times to execute the macro.
Value of t:
The interval time to execute the macro multiple times defined by “r”.
Interval time = t x 100 milliseconds
Value of m:
Macro execution mode
0 (Bit0): The macro is executed r times continuously with the interval specified by t.
1 (Bit0): The printer waits for the feed button to be pressed in order to start the macro.
Once the button is pressed, it executes the macro with the interval specified
by t one time. After that, the printer again waits for the feed button to be
pressed. The printer repeats this operation r times.
It executes a macro defined on the target memory specified by Select Memory Type for User Defined
Data(1D 22 n) command.
Pressing the feed button to execute the macro (Macro execution mode: m = 1) does not feed paper.
Exceptions:
While the macro is being defined, if this command is received, it cancels its macro definition.
If the macro is not defined on the target memory or if the parameter “r” is 0, this command is ignored.
109
PROGRAMMING GUIDE
3.11
User Data Storage Commands
3.11.1
Write User Defined Data
ASCII:
ESC ‘ m a0 a1 a2 d1 ... dm
Hexadecimal: 1B 27 m a0 a1 a2 d1 ... dm
Decimal:
27 39 m a0 a1 a2 d1 ... dm
Value of m:
1 – 255
It writes m bytes data into the user defined data area of the flash memory. a0, a1 and a2 are the offset
based on the top address of the user defined data area. If any of the memory address specified by this
command are currently used, the command is ignored.
3.11.2
Read User Defined Data
ASCII:
ESC 4 m a0 a1 a2
Hexadecimal: 1B 34 m a0 a1 a2
Value of m:
1 – 255
It reads m bytes data from the user defined data area of the flash memory. a0, a1 and a2 are the offset
based on the top address of the user defined data area.
3.11.3
Select Memory Type for User Defined Data
ASCII:
GS " n
Hexadecimal: 1D 22 n
Decimal:
29 34 n
Value of n:
48-53
n (ASCII)
0
1
2
3
4
5
Target Storage Memory
RAM
Flash Memory (default)
RAM
Flash Memory (default)
RAM
Flash Memory (default)
Data to be registered
User-defined Logo
User-defined Logo
User-defined Character
User-defined Character
Macro
Macro
It specifies the target memory type (RAM or Flash memory) for User defined logos, User defined
characters and Macro. The memory type selected by this command is valid until it is changed again by
this command or the printer is turned off.
n = 48 (ASCII n = 0)
It specifies RAM as the user defined logo area. The subsequent commands to define logos are stored
into RAM. This parameter is available only for the registration. It does not affect the functionality to print
logo. Logo is printed according to ID or Key Code irrespective of the storage area.
n = 49 (ASCII n = 1)
It specifies the flash memory as the user defined logo area. The subsequent commands to define logos
are stored into the flash memory. This parameter is available only for the registration. It does not affect
the functionality to print logo. Logo is printed according to ID or Key Code irrespective of the storage
area.
n = 50 (ASCII n = 2)
It specifies RAM as the user defined character area. The subsequent commands to define characters
are stored into RAM. This parameter is available only for the registration. It does not affect the
functionality to print user defined characters. User defined characters are printed according to the
character code irrespective of the storage area.
n = 51 (ASCII n = 3)
It specifies the flash memory as the user defined character area. The subsequent commands to define
characters are stored into the flash memory. This parameter is available only for the registration. It does
110
PROGRAMMING GUIDE
not affect the functionality to print user defined characters. User defined characters are printed
according to the character code irrespective of the storage area.
n = 52 (ASCII n = 4)
It specifies RAM as Macro definition area. The subsequent commands to define Macro are stored into
RAM. It also specifies RAM as the target memory to read Macro defined.
n = 53 (ASCII n = 5)
It specifies the flash memory as Macro definition area. The subsequent commands to define user data
such as Macro are stored into the flash memory. It also specifies the flash memory as the target memory
to read Macro defined.
3.11.4
Flash Memory Allocation for User-defined Storage Area
ASCII:
GS " U n1 n2
Hexadecimal: 1D 22 55 n1 n2
Decimal:
29 34 85 n1 n2
Default of n1: 4 (n1 is the number of flash memory sectors used for user defined logo.)
Default of n2: 1 (n2 is the number of flash memory sectors used for user defined data.)
Value of n:
n1 + n2 <= 8
This command defines the allocation of the flash memory sectors for the user defined logo area and the
user defined data area. (1 sector = 64 Kbytes)
Total flash memory sectors for entire user defined storage area are 8 sectors (512 Kbytes). The
allocation for the user defined character area is fixed to 1 sector (64 Kbytes).
Therefore, 5 remaining sectors can be freely allocated for the user defined logo (n1) and the user
defined data (n2) by this command.
This memory allocation specified by this command is valid even after the printer reboot.
User defined character
(Fixed to 64K bytes)
(Factory Default) 64 Kbytes
(Examples)
0
8
64 Kbytes
1
7
64 Kbytes
2
6
64 Kbytes
3
5
64 Kbytes
n1
n2
User defined logo
User defined data
256 Kbytes
64 Kbytes
0 Kbytes
64 Kbytes
128 Kbytes
192 Kbytes
512 Kbytes
448 Kbytes
384 Kbytes
320 Kbytes
Important:
All data of the user defined storage area in the flash memory are erased when the allocation is changed
by this command.
3.11.5
Erase User-defined storage area in Flash Memory
ASCII:
GS @ n
Hexadecimal: 1D 40 n
Decimal:
29 64 n
Value of n:
49-50
It erases all data of the user-defined area located in the flash memory and sends a carriage return when
the operation completes.
n = 49 (ASCII n = 1)
It erases all data of the user-defined character area and the user-defined logo area in the flash memory.
n = 50 (ASCII n = 2)
It erases all data of the user- defined data area in the flash memory.
n = 51 (ASCII n = 3)
it erases all data of the user-defined data area in the RAM.
111
PROGRAMMING GUIDE
112
PROGRAMMING GUIDE
3.11.6
Printer Setting Change
ASCII:
US 6 [m n], [m n] … [m n] 0FFH
Hexadecimal: 1F 36 [m n], [m n] … [m n] 0FFH
Decimal:
31 54 [m n], [m n] … [m n] 0FFH
Value of m, n:
It sets the printer configuration specified by m and n. If m or n is out of range, this command is ignored.
However, it continues processing until the terminator code FFh is detected in even such case.
m (Hex)
Function
0 - 10 Reserved
11
Baud rate
(RS232C Option)
12
13
14
15
16
17
18
19
1A – 1F
20
1
2
Number of data bit
(RS232C Option)
Number of stop bit
(RS232C Option)
Parity
(RS232C Option)
Flow control
(RS232C Option)
Data error option
(RS232C Option)
Reserved
DSR signal option
(RS232C Option)
Receive Buffer Capacity
Reserved
Emulation Mode
21
Default lines per inch
22
Auto line feed
23
Asian mode
(Select target DBCS font)
24
Black Mark Adjustment
25
Auto Recovery
26
Power on (Sleep mode) to Cash
drawer opening delay
n (Hex)
Option
Effect 1
00
01
02
03
04
00
01
00
01
00
01
02
00
01
00
01
115200 bps
57600 bps
38400 bps
19200 bps (Default)
9600 bps
8 data bits (Default)
7 data bits
1 stop bits (Default)
2 stop bits
No parity (Default)
Even parity
Odd parity
XON/XOFF
DTR/DSR (Default)
Ignore errors(Default)
Print “?”
Power off/on
00
01
00
01
Enable DSR signal (Default)
Disable DSR signal
64KB (default)
45 Bytes
Power off/on
TH230 (Default)
ESC/POS
8.13 lines per inch
7.52 lines per inch (Default)
6 lines per inch
Ignore CR
Use CR as Print cmd. (Default)
Asian mode 932
Asian mode Off (Default)
Asian mode 936
Asian mode 949
Asian mode 950
Asian mode GB18030 2
-127 ~ -1 : Reverse offset
0~127 : forward offset
(unit : 0.125 mm)
Off (default)
Recovery without buffer clear
Recovery with buffer clear
No delay
Delay value (100ms~5sec)
(default 1700ms)
Power off/on
00
03
00
01
02
00
01
00
01
02
03
04
05
80 –FF
0 -7F
0
1
2
0
1-50
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Immediate
Power off/on
Immediate
Immediate
Immediate
Power off/on: Setting is effective after rebooting the printer, Immediate: Setting is effective immediately
SBCS font will show “Not Installed” when configured GB18030.
113
PROGRAMMING GUIDE
m (Hex)
Function
27
Black mark sensor
28-29
2B
Reserved
Receipt Shooting
2C
Receipt Shooting time
2D
Compatible Top Margin1
2E
Compatible top margin time out
2F
30
Reserved
Print density
31
Paper Low detection
32
Paper width
33
36
Paper Core diameter – paper low
adjustment
Paper thickness – paper low
adjustment
Remaining length adjustment –
paper low adjustment
Power Supply option
37
Color Paper option
38
Color density
34
35
n (Hex)
0
1
Option
Disable (Default)
Enable
0
1
0
01-FF
00
01
00
01-FF
Disable(Defalut)
Enable
Endless(Defalut)
Time out value (250ms~63.75s)
Disable (Default)
Enable
Disable (Default)
Time out value (100ms~25.5s)
F6 – 06
-10 : 50%
- 9 : 55%
- 8 : 60%
- 7 : 65
- 6 : 70%
- 5 : 75%
- 4 : 80%
- 3 : 85%
- 2 : 90%
- 1 : 95%
0 : 100%
1 : 105%
2 : 110%
3 : 115%
4 : 120
5 : 125%
6 :130%
Disable
Enable(Default)
80 mm (Default)
58 mm
0 to 15 :(10mm ~ 25mm)
Default 13 (23mm)
0 to 5 :( 0.05mm ~ 0.1mm)
Default 1 (0.06mm)
-15 ~ 15 : (-7.5m ~ +7.5m)
Default 2(+ 1m)
Auto(Defult)
48W
55W
75W
90W
110W
One Color Paper (Default)
Two Color Paper
-10 : 50%
- 9 : 55%
- 8 : 60%
- 7 : 65
- 6 : 70%
- 5 : 75%
00
01
00
01
00-0F
00-05
F1 – 0F
00
01
02
03
04
05
00
01
F6 – 06
1
Effect
Power off/on
Immediate
Immediate
Power off/on
Power off/on
Immediate
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Immediate
Power off/on
The physical distance between the thermal head position and the cut position (12.12mm) becomes the t op
margin of each receipt when it is disabled. If it is enabled, the top margin of each receipt becomes same length
(16.8 mm) as the existing models. When this mode is enabled, the printer always holds 37 raster in the print
buffer. The raster images held in the print buffer are pushed out by the cut command.
114
PROGRAMMING GUIDE
- 4 : 80%
- 3 : 85%
- 2 : 90%
- 1 : 95%
0 : 100%
1 : 105%
2 : 110%
3 : 115%
4 : 120
5 : 125%
6 :130%
39 – 3D
3E
3F
1
Reserved
Special Font
00
01
Reserved
Refer Appendix 4 Thai font support
115
Disable : Original font (Default)
Mode 11 : Constructed 874
Immediate
PROGRAMMING GUIDE
m (Hex)
40
Function
Default code page
41 - 45
46
Reserved
Remove Upper Space
(ECO funtionality)
Remove Lower Space
(ECO funtionality)
Line Space Reduction
(ECO funtionality)
Line Feed Reduction
(ECO funtionality)
47
48
49
4A
Barcode Height Reduction
(ECO funtionality)
4B
Registered Logo Removal
(ECO funtionality)
Force Single High Font
(ECO funtionality)
Bold Font Removal
(ECO funtionality)
Force Single Wide Font
(ECO funtionality)
No White/Black Reverse
Printing
(ECO funtionality)
4C
4D
4E
4F
n (Hex)
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
00
01
00
01
00
01
00
01
02
03
04
00
01
02
03
00
01
00
01
00
01
00
01
00
01
116
Option
437 (Default)
850
852
860
863
865
858
866
1252
862
737
874
857
1251
1255
KZ 1048
1254
1250
28591
28592
28599
28605
864
720
1256
28596
KATAKANA.
755
1257
28594
1253
Disable (Default)
Enable
Disable (Default)
Enable
Disable (Default)
Enable
Disable (Default)
Reduce 100%
Reduce 25%
Reduce 50%
Reduce 75%
Disable (Default)
Reduce 25%
Reduce 50%
Reduce 75%
Disable (Default)
Enable
Disable (Default)
Enable
Disable (Default)
Enable
Disable (Default)
Enable
Disable (Default)
Enable
Effect
Immediate
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
PROGRAMMING GUIDE
50
m (Hex)
51 - 56
57
Reset all setting to Default
Function
Reserved
ECO function Disable/Enable1
58
59 – 68
69
Remove lines containing only
spaces (ECO funtionality)
Reserved
USB Speed
6A – 77
78
Reserved
Buzzer tone (frequency)
79
7A – 80
81
Reserved
DHCP Mode
82
Sleep mode
83
Power off mode
84
85
Reserved
Sleep mode Waiting time
86
TCP max. connection
87
Ethernet Physical LAN Speed
88
Link Down Timeout
89
TCP idle Timeout
8A
SNMP Trap 1
8B
SNMP Trap 2
8C
SNMP Enable
8D – 9F
1
LED Control Mode
00
Default
n (Hex) Option
Power off/on
Effect
00
01
00
01
Disable (Default)
Enable
Disable (Default)
Enable
Power off/on
00
01
Full Speed (Default)
High Speed
Power off/on
00
01
02
00
01
Low
Middle (Default)
High
Auto Mode (Default)
User Mode
Immediate
00
01
00
01
00
01
02
03
04
05
Disable
Enable (Default)
Disable (Default)
Enable
Disable (Default)
Enabled 60 mins
Enabled 120 mins
Enabled 180 mins
Enabled 240 mins
Enabled 300 mins
0
1-FF
00
01
02
03
04
05
00
01
02
03
04
00
01 to 78
00
01 to 78
00
01
00
01
00
01
Endless
Time in 10 Sec
(Defalut 10 sec)
1 clients
2 clients
3 clients
4 clients
5 clients
6 clients(Default)
Auto (Default)
100 Mbps Full
100 Mbps Half
10 Mbps Full
10 Mbps Half
No timeout
Timeout value (1 ~ 120 minutes)
Default: 0x78 = 120 minutes
No timeout
Timeout value (1 ~ 120 minutes)
Default: 0x02 = 2 minutes
Disable (Default)
Enable
Disable (Default)
Enable
Disable
Enable (Default)
Power off/on
Power off/on
Power off/on
Immediate
Immediate
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Power off/on
Reserved
If this setting is enabled, all Eco Function settings become available. If it is disabled, Eco Function settings
become unavailable except Standby Mode, Power off Mode, Receipt Print Mode and Print Density.
117
PROGRAMMING GUIDE
m (Hex)
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
Function
n (Hex)
International character set 00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
Top logo alignment
00
01
02
Bottom logo alignment
00
01
02
Top logo while paper
00
feeding to the cutting
01
position
Top logo at power on
00
01
Top logo when cover is
00
closed
01
Top logo while clear buffer 00
01
Top logo after paper Feed 00
button pressed
01
Top logo printing
00
01
Bottom logo printing
00
01
Max. Print Speed
00
01
02
03
04, 05
06, 07
08, 09
0A, 0B
0C,
0D, 0E
Auto cut after cover close 00
01
Buzzer sound
00
01
Power on notice
00
01
Paper Near end notice
00
01
118
Option
U.S.A (Default)
France
Germany
U.K.
Denmark I
Sweden
Italy
Spain I
Japan
Norway
Denmark II
Spain II
Latin America
Korea
Slovenia/ Croatia
China
Reserved
Arabia
Left justification (Default)
Centering
Right justification
Left justification (Default)
Centering
Right justification
Disable
Enable (Default)
Disable (Default)
Enable
Disable
Enable (Default)
Disable
Enable (Default)
Disable (Default)
Enable
Disable (Default)
Enable
Disable (Default)
Enable
Ignore
1.5 ips
2 ips
4 ips
6 ips
8 ips
10 ips
12 ips
14 ips (Defaultl)
Disable
Enable (Default)
Disable (Default)
Enable
Disable(Default)
Enable
Disable
Enable(Default)
Effect
Power off/on
Immediate
Immediate
Immediate
Immediate
Immediate
Immediate
Immediate
Immediate
Immediate
Immediate
Immediate
Immediate
Power off/on
Power off/on
PROGRAMMING GUIDE
AF
Listen to Real time
B0
Legacy Printer support
B1 – FF
Reserved
00
01
00
01
119
Always(Default)
Buffer not full
Disable(Default)
Enable
Power off/on
Power off/on
PROGRAMMING GUIDE
3.11.7
Read Printer Setting
ASCII:
US DC2 m
Hexadecimal: 1F 12 m
Decimal:
31 18 m
Value of m:
16 (0x10) to 191 (0xBF). Refer to 3.11.6 Printer Setting Change Command in detail.
This command is to read the setting specified by m.
3.11.8
LED Configuration
ASCII:
US DC3 k l m n p1 p2 p3 p4 q r s
Hexadecimal: 1F 13 k l m n p1 p2 p3 p4 q r s
Decimal:
31 19 k l m n p1 p2 p3 p4 q r s
Value of k:
0: Auto Mode
1: User Mode
2: Reset pattern to Default (Auto Mode and User Mode)
If k is set to 2, it doesn’t require other parameters (l, m, n, p1, p2, p3, p4, q, r, s).
Range of l:
1 to 32
Auto Mode: It specifies the state number of the printer as follows.
01: Boot
02: Idle
03: Printing
04 to 06: (Reserved)
07: Online Firmware Update
08: Standby mode
09: (Reserved)
10: Unrecoverable error in PCB block
11: Unrecoverable error in Thermal Head
12 to 19: (Reserved)
20: Recoverable error in Thermal Head (Over Heat)
21: Recoverable error in Printer Cover
22: Recoverable error of Paper related
23: Recoverable error in Print block
24: Recoverable error in Cutter block
25 to 29: (Reserved)
30: Warning for PCB
31: Warning for Paper related
32: (Reserved)
User Mode: It specifies ID to register the blink pattern of LED.
Value of m:
Range of n:
It specifies the color of LED
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
NA
NA
NA
NA
NA
Red
Amber
Green
1 to 32
It specifies number of valid bits of blink pattern defined by p1 to p4 below.
For example, if this parameter is set to “5”, the first 5 bits of 32 bits pattern are used
as blink pattern.
Range of p1 to p4: It specifies blink pattern of LED in 32 bits (0: OFF, 1: ON) as follows.
p1
(LSB)
Bit number
0
1
2
3
120
4
….
….
p4
28
29
(MSB)
30
31
PROGRAMMING GUIDE
Blink pattern
1
0
1
1
0
….
1
0
0
ON OFF ON
ON OFF ON
ON OFF OFF
Example: LED ON: These parameters are 0xFF 0xFF 0xFF 0xFF
LED OFF: These parameters are 0x00 0x00 0x00 0x00
1
ON
Range of q:
0 to 255
It specifies ON time of bit specified as ON (=1) in blink pattern.
Unit is 100 m sec, so Actual time = Parameter (q) x Unit time (100 ms)
Range of r:
0 to 255
It specifies OFF time of bit specified as OFF (=0) in blink pattern.
Unit is 100 m sec, so Actual time = Parameter (r) x Unit time (100 ms)
Range of s:
0 to 255
It specifies the pause time between 32 bits blink pattern. During this period of time,
LED is OFF. Unit is 100 m sec, so Actual time = Parameter (s) x Unit time (100 ms)
If this parameter is set to zero, the pause is not executed.
Both Auto mode and User mode of LED have the default blink pattern. If LED pattern is not configured
by this command, the default LED pattern is used.
Exceptions:
If at least one of those parameters is out of range, this command is ignored.
3.11.9
Read LED Configuration
ASCII:
US DC4 k
Hexadecimal: 1F 14 k
Decimal:
31 20 k
Value of k:
0: Auto Mode
1: User Mode
This command is to read the LED configuration. This is a batch mode command which retrieves all the
LED configurations (320 bytes) of the mode (Auto mode or User mode) specified by "k".
Data Format Returned (Total 320 bytes = 32(ID) x 10 bytes)
State or ID
(1 byte)
1
2
▪▪▪▪
32
LED Color
(1 byte)
m1
m2
▪▪▪▪
m32
Mask Bit
(1 byte)
k1
k2
▪▪▪▪
k32
Blink Pattern
(4 bytes)
p11,..,p14
p21,..,p24
▪▪▪▪
p321,..,p324
ON Time
(1 byte)
q1
q2
▪▪▪▪
q32
OFF Time
(1 byte)
r1
r2
▪▪▪▪
r32
Detail of each item is described in LED Configuration Command.
3.11.10
Change into the user setting mode
ASCII:
GS ( E pL pH fn d1 d2
Hexadecimal: 1D 28 45 pL pH fn d1 d2
Decimal:
29 40 69 pL pH fn d1 d2
Range:
(pL + pH x 256) = 3 (pL = 3, pH = 0)
fn = 1
d1 = 73
d2 = 78
It enters the user setting mode and transmits a mode change notice as below.
Data group of Change
Hex
Decimal
121
Data
Pause Time
(1 byte)
s1
s2
▪▪▪▪
s32
PROGRAMMING GUIDE
use setting mode notice
(4) Header
(5) Identifier
(6) NULL
3.11.11
37H
20H
00H
55
32
0
1 byte
1 byte
1 byte
End the user setting mode session
ASCII:
GS ( E pL pH fn d1 d2 d3
Hexadecimal: 1D 28 45 pL pH fn d1 d2 d3
Decimal:
29 40 69 pL pH fn d1 d2 d3
Range:
(pL + pH x 256) = 4 (pL = 4, pH = 0)
fn = 2
d1 = 79
d2 = 85
d3 = 84
It ends the user setting mode and performs a software reset.
It clears the receive and print buffers.
It resets all setting values in RAM (the print area, the character styles, and others) that were in effect at
power on. (The data in the Flash memory are not reset).
3.11.12
Changes the memory switch.
ASCII:
GS ( E pL pH fn [a1 b18...b11]...[ak nk8 nk1]
Hexadecimal: 1D 28 45 pL pH fn [a1 b18...b11]...[ak nk8 nk1]
Decimal:
29 40 69 pL pH fn [a1 b18...b11]...[ak nk8 nk1]
Range:
10 ≤ (pL + pH x 256) ≤65530
fn = 3
b = 48,49,50
a = 1,2,128
Default:
All Memory switches are OFF (b = 48) except for Sleep-Mode (128-3)(b = 49).
Description: Changes the memory switch specified by a to the value specified by b.
When a = 1, memory switch 1 is set as follows:
Msw
Setting
Function
value(b)
1-1
48
Does not transmit the power-on notification
49
Transmits the power-on notification
1-2
48
Sets receive buffer to large
49
Sets receive buffer to small
1-3
50
Reserved
1-4
48
Data processing when occurring receive error:
Ignore the data
49
Data processing when occurring receive error:
Replace with “?”
1-5
48
Automatic line feed enabled
49
Automatic line feed disabled
1-6 to 1-8
50
Reserved
When a = 2, memory switch 1 is set as follows:
Msw
Setting
Function
value(b)
2-1
48
Code128 Check Digit is enabled
49
Code128 Check Digit is disabled
2-2
48
CodeITF Leading 0 is enabled
49
CodeITF Leading 0 is disabled
2-3
48
Barcode String Term is enabled
49
Barcode String Term is disabled
122
PROGRAMMING GUIDE
2-4 to 2-7
2-8
50
48
49
Reserved
Listen to Real-Time-Commands – Always
Listen to Real-Time-Commands – Only if
Receive-Buffer is not full
When a = 2, memory switch 1 is set as follows:
Msw
Setting
Function
value(b)
128-1
48
Power button is enabled
49
Power button is disabled
128-2
48
In Sleep-Mode is Interface Power On
49
In Sleep-Mode is Interface Power Off
128-3
48
Sleep-Mode enabled
49
Sleep-Mode disabled (default)
128-4
48
Legacy printer support disabled*
49
Legacy printer support enabled*
128-5
48
Receipt shooting is disabled
49
Receipt shooting is enabled
128-6
48
Paper-Near-End Sensor Notification in ASB
and printer status will be send
49
Paper-Near-End Sensor Notification in ASB
and printer status will be suppressed
128-7
48
Black mark sensor is disabled
49
Black mark sensor is enabled
128-8
48
Original Controller: Yes
49
Original Controller: No
* The printer must be switched off and on to take effect of changed setting!
Notes:
This function works only in the user setting mode.
• The value of the memory switch is specified from bit 8 to bit 1 by b18...b11. When b = 50,
the status of the bit applied is not changed. Example: Transmission data that specifies
memory switch 128, “Power button is disabled” and does not change other settings. ASCII:
GS ( E pL pH fn a b8 b7 b6 b5 b4 b3 b2 b1 Hex: 0x1D 0x28 0x45 0x0A 0x00 0x03 0x80 0x32
0x32 0x32 0x32 0x32 0x32 0x32 0x31
• Explanation for memory switch 1 (a = 1):.
Power-on
Hex
Decimal
Data quantity
notification
Header
0x3B
59
1 byte
Identifer
0x31
49
1 byte
NULL
0x00
0
1 byte
The printer transmits the power-on notification for the following processes:
− Initializing by turning on the power by switch (except with Ethernet interface)
− Initializing by hardware reset (except with Ethernet interface)
− Initializing by software reset, such as by transmitting Function 2 (except with Ethernet
interface and Ethernet parameter changed)
− Initializing after the service menu functions2 (except with Ethernet interface and Ethernet
parameter changed)
• With a serial interface, the printer transmits a 3-byte notification without confirming that the
host can receive data.
• With Ethernet interface the power-on notification will be not transmitted after power-on or the
command GS 0xFF.
• When communication with the printer uses XON/XOFF control, the XON/XOFF code may
interrupt the “Header to NUL” data string.
• When using the power-on notification together with other status messages, the status
transmitted must be differentiated according to table Transmit Status Identification
• The printer must be switched off and on to take effect of changed setting for “Legacy printer
support” memory switch (Msw 128-4)!
123
PROGRAMMING GUIDE
• The value for receipt shooting flush time will be set in the customer value CV 13
The disable of power button is only related to the switch off function.
• Memory switch “Original Controller” (Memory switch 128-8) is used to differentiate between
original controller and repaired controller. If the printer is equipped with its first controller
(original controller) this Memory switch is 0. After a controller change this Memory switch is set
to 1.
• Memory switch “Power Button Delay” (Memory switch 2-7): The delay time is effective when
switching off the device. When switching on the power button reacts always with no delay.
• Memory switches 1-2: Small receive buffer is not recommended for normal printer operations!
It is not allowed when using a TH230+ fiscal controller interface.
3.11.13
Transmits the host the value for the memory switch
ASCII:
GS ( E pL pH fn a
Hexadecimal: 1D 28 45 pL pH fn a
Decimal:
29 40 69 pL pH fn a
Range:
(pL + pH x 256) = 2 (pL = 2, pH = 0)
fn = 4
a = 1,2,128
Description:
The printer transmits the value for the memory switch specified by parameter a to the host.
Notes:
• This function works both in user setting mode and during normal printer operation.
• The printer transmits the “Header to NUL” data shown below:
Transmit data
Hex
Decimal Data quantity
Header
0x37
55
1 byte
Identifer
0x21
33
1 byte
Setting value
0x30 to 0x31
48 or 49 8 bytes
NULL
0x00
0
1 byte
The value of the memory switch is transmitted from bit 8 to bit 1. 48 or 49 is transmitted for a bit
of Reserved.
• The host can differentiate the data for the memory switch from other transmitted data by the
specific information in the transmit data block. When the header transmitted from the printer is
0x37 or 55 decimal, the data up to NUL (0x00 or 0 decimal) is handled as one group and can be
identified by the following data:
Transmit data
Hex
Decimal
Header
0x37
55
Identifer
0x21
33
However, consider the following requirement for data processing:
• When communication with the printer uses XON/XOFF control, the XOFF code may interrupt
the “Header to NUL” data string.
3.11.14
Set the customized setting values
ASCII:
GS ( E pL pH fn [a1 n1L n1H]…[ak nkL nkH]
Hexadecimal: 1D 28 45 pL pH fn [a1 n1L n1H]…[ak nkL nkH]
Decimal:
29 40 69 pL pH fn [a1 n1L n1H]…[ak nkL nkH]
Range of pL,pH:
4 ≤(pL + pH x256) ≤65533 (0 ≤pL ≤255, 0 ≤pH ≤255)
Value of fn:
fn = 5
It sets the customized value specified by a to the values specified by (nL + nH x 256).
124
PROGRAMMING GUIDE
Flash memory is used as the storage area for setting values. (Setting values are maintained even after
power off)
This command is processed in user setting mode. (“Change into the user setting mode” command need
to be sent before this command, and “End the user setting mode session” need to be sent after this
command)
Note: Other configuration can be changed by US DC1 (1Fh 36h) command.
125
PROGRAMMING GUIDE
Value of a:
a
Type pf customized value
3
5
6
7
9
10
11
12
13
14
15
16
17
18
100
101
102
103
104
105
111
112
117
119
120
121
122
123
124
125
126
Roll paper width
Print density when printing in monochrome and multi-tone
BM adjustment value
Default international character
Maximum power
Print speed
Reserved
Color density
Receipt shooting flush time
Sleep mode waiting time
Power on to cash drawer opening delay
Default character code table
Auto Recovery
Reserved
Paper auto cutting after closing the roll paper cover
Enabling /disabling reduction of excessive top margin
Enabling/disabling reduction of excessive bottom margin
Reduction ratio of line spacing
Reduction ratio of line spacing where extra line feeds are included.
Reduction ration of bar code height
Automatic replacement of Font A to Font B
Automatic replacement of Font B to Font A
Print density when printing in monochrome and multi-tone
Buzzer function: Enabling /disabling buzzer
Buzzer function: Buzzer frequency for Errors
Buzzer function: Sound pattern for Auto cut
Buzzer function: Buzzer frequency for Auto cut
Buzzer function: Sound pattern for Cash drawer port 1(Pulse 1)
Buzzer function: Buzzer frequency (Pulse 1)
Buzzer function: Sound pattern (Pulse 2)
Buzzer function: Buzzer frequency (Pulse 2)
Parameters in Setting
Change Command (1F 36)
1F 36 32 n
1F 36 30 n
1F 36 A0 n
1F 36 36 n
1F 36 AA n
1F 36 40 n
N/A
1F 36 AB n
1F 36 46 n
1F 36 47 n
1F 36 48 n
1F 36 49 n
1F 36 4A n
N/A
N/A
1F 36 30 n
1F 36 AC n
N/A
N/A
N/A
N/A
N/A
N/A
N/A
*1 The functions are enabled for the internal buzzer.
Roll paper width (when a = 3)
(nL + nH x 256)
2
6
Roll paper width
58 mm
80mm (Default)
Print density setting when printing in monochrome and multi-tone (a = 5,117)
(nL +nH x 256)
Print density
Default
-10
50%
100%
-9
55%
-8
60%
-7
65%
-6
70%
-5
75%
-4
80%
-3
85%
-2
90%
-1
95%
0
100%
1
105%
2
110%
126
PROGRAMMING GUIDE
3
4
5
6
115%
120%
125%
130%
BM adjustment value offset (a = 6)
(nL +nH x 256)
BM offset
0….127
Offset value with forward direction in
0.125 mm
128…255
Offset value with backward direction
in 0.125 mm (two's complement)
Default
0
Default international character (When a = 7)
See (n) of the ESC R command to select international character.
Power supply output (a = 9)
(nL +nH x 256)
0
48…110
Print speed setting (a = 10)
(nL + nH x 256)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Power Supply Output
Auto(default)
48W…110W
Default
Auto
Print speed
Print speed level 1
Maximum 1.5 ips
Print speed level 2
Maximum 2 ips
Print speed level 3
Maximum 4 ips
Print speed level 4
Maximum 6 ips
Print speed level 5
Maximum 6 ips
Print speed level 6
Maximum 8 ips
Print speed level 7
Maximum 8 ips
Print speed level 8
Maximum 10 ips
Print speed level 9
Maximum 10 ips
Print speed level 10
Maximum 12 ips
Print speed level 11
Maximum 12 ips
Print speed level 12
Maximum 14 ips
Print speed level 13
Maximum 14 ips
Print speed level 14
Maximum 14 ips (Default)
Color density settings (a = 12)
(nL +nH x 256)
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
Print density
50%
55%
60%
65%
70%
75%
80%
85%
90%
95%
100%
127
Default
100%
PROGRAMMING GUIDE
1
2
3
4
5
6
105%
110%
115%
120%
125%
130%
Receipt shooting flush time (a = 13)
(nL +nH x 256)
Flush time
Default
0
Endless
0
1…255
Time in 0.25 Sec
This value sets the time how long the printer is waiting for print commands from the host before the
receipt is printed out. The value must be multiplied by 250 milliseconds (i.e. CV13 = 8 -> Receipt
shooting flush time = 2 sec).
The range is from 1 to 255 (250 ms to 63,75 seconds) or 0 for endless (default).
If the Memory Switch for receipt shooting (128-5 / see page 123) is disabled the printer ignores this
time.
If the host sends a cut or graphics command the receipt is printed out (Logo’s are buffered). The
buffered data can also be printed out by the sequence ESC w n 7 (see page 15). After this the host
have to wait for the answer of ESC w n 7.
NOTE:
If both Receipt shooting and Sleep-Mode are enabled and the Sleep-Mode time is equal or
smaller than the shooting time the buffered Receipt is not printed out in Sleep-Mode.
NOTE:
The Receipt shooting spooler is flushed if the command “Set control point” is used.
Sleep-Mode waiting time (a=14)
(nL +nH x 256)
Waiting time
Default
0
Endless
10 sec
10…2550
Time in Sec
This value sets the time how long the printer is waiting before Sleep-Mode starts. The value
corresponds to the waiting time in seconds (i.e. CV14 = 30 -> Sleep-Mode starts after 30 seconds).
The range is from 10 to 2550 with step of 10 (10 seconds to 42,5 minutes). The default value is 10
seconds. When the printer receives a value that is e.g. between 11 and 19 then the stored result is
10 (rounded down). If the Memory Switch for Sleep-Mode (128-3 / see page 123) is disabled the
printer ignores this time. The power consumption of the Sleep-Mode is lower than in normal
standby. The operator panel LED’s are switched off but the power LED is flashing with short
on-time and long off-time. The power pin of the customer display connector is also switched to off.
The Power consumption of a RS232-Interface is a little bit higher compared to an USB-Interface.
The printer leaves the Sleep-Mode by every transmitted data on the host interface, by pressing the
feed button or power button or when the cover sensor is changed.
NOTE:
• If both Receipt shooting and Sleep-Mode are enabled and the Sleep-Mode time is equal or
smaller than the shooting time the buffered receipt is not printed out in Sleep-Mode.
• If a macro running, Sleep mode is inactive
• If an error occurred, Sleep mode is inactive
• If no paper inserted, Sleep mode is inactive
Power on (Sleep mode) to Cash drawer opening delay (a=15)
(nL +nH x 256)
Delay time
Default
0… 5000
Time in msec
1700msec
This value sets the time how long the printer is waiting after Sleep-Mode ends before Cash Drawer
can be opened. The value corresponds to the delay time in msec (i.e. CV15 = 1700 -> Cash Drawer
opening after 1,7 seconds). The range is from 0 to 5000 with step of 100 (0 seconds to 5 seconds).
The default value is 1,7 seconds. When the printer receives a value that is e.g. between 1 and 99
then the stored result is 0 (rounded down). If the Memory Switch for Sleep-Mode (128-3 ) is
disabled the printer ignores this time.
128
PROGRAMMING GUIDE
Default character code table (When a = 16)
See (n) of the ESC t command to select character code table.
Auto Recovery (a=17)
(nL +nH x 256)
Auto Recovery Mode
Default
0
off
0(Off)
1,2
Equal to DLE ENQ n
This value sets the Auto Recovery Mode that is executed in error condition by closing the Cover.
The Mode is the same like DLE ENQ n and mines 0: No Recover 1: Recover without clearing 2:
Recover with clearing
Paper auto-cut after closing the roll paper cover (when a = 100)
(nL + nH x 256)
Paper auto-cut after closing the roll paper cover
0
Disabled
1
Enabled (Default)
Enabling/disabling reduction of excessive top margin (when a = 101)
(nL + nH x 256)
Reduction of excessive top margin
0
Disabled (Default)
1
Enabled
Enabling/disabling reduction of excessive bottom margin (when a = 102)
(nL + nH x 256)
Reduction of excessive bottom margin
0
Disabled (Default)
1
Enabled
Reduction ration of line spacing (when a = 103)
(nL + nH x 256)
0
1
2
3
Reduction ration of line spacing
None (Default)
100% reduction
100% reduction
100% reduction
Reduction ration of line spacing where extra line feeds are included (when a = 104)
(nL + nH x 256)
Reduction ration of line spacing where extra line
feeds are included
0
None (Default)
1
25 % reduction
2
50 % reduction
3
75% reduction
4
100% reduction
Reduction ratio of bar code height (when a = 105)
(nL + nH x 256)
0
1
2
3
Reduction ration of bar code height
None (Default)
25 % reduction
50 % reduction
75% reduction
Automatic replacement of Font A (when a = 111)
(nL + nH x 256)
0, 48
1, 49
Automatic replacement of Font A
Font A (Same as no replacement) (Default)
Font B
Automatic replacement oHIDf Font B (when a = 112)
(nL + nH x 256)
Automatic replacement of Font B
129
PROGRAMMING GUIDE
0, 48
1, 49
Font A
Font B (Same as no replacement) (Default)
Buzzer function: Enabling/disabling internal buzzer (when a = 119)
(nL + nH x 256)
Enabling/disabling internal buzzer
0
Disabled (Default)
1
Enabled
Buzzer function: Buzzer frequency for Errors (when a = 120)
(nL + nH x 256)
0
1
65535
Buzzer frequency
No sound
1 time
Continuous (Default)
Buzzer function: Sound Pattern (when a = 121,123, 125)
(nL + nH x 256)
1
2
3
4
5
Sound pattern
Pattern A (Default)
Pattern B
Pattern C
Pattern D
Pattern E
Buzzer function: Buzzer frequency (when a = 122, 124, 126)
(nL + nH x 256)
0
1
Buzzer frequency
No sound (Default)
1 time
130
PROGRAMMING GUIDE
3.11.15
Transmit the customized setting values
ASCII:
GS ( E pL pH fn a
Hexadecimal: 1D 28 45 pL pH fn a
Decimal:
29 40 69 pL pH fn a
Range:
(pL + pH x 256) = 2 (pL = 2, pH = 0)
fn = 6
a = 3, 5, 6, 8 ≤ a ≤ 10, 97 ≤ a ≤98, 100 ≤ a ≤105, 111 ≤ a ≤ 112, 117, 119 ≤ a ≤ 126
It transmits the customized value specified by a.
A
Type of customized value
3
Roll paper width
5
Print density when printing in monochrome and multi-tone
6
BM adjustment value
7
Sensor value(DN Emulation)
7
Default international character(ESCPOS Emulation)
9
Maximum power
10
Print speed
11
Reserved
12
Color density
13
Receipt shooting flush time
14
Sleep mode waiting time
15
Power on to cash drawer opening delay
16
Default character code table
17
Auto Recovery
18
Reserved
100
Paper auto cutting after closing the roll paper cover
101
Enabling /disabling reduction of excessive top margin
102
Enabling/disabling reduction of excessive bottom margin
103
Reduction ratio of line spacing
104
Reduction ratio of line spacing where extra line feeds are
included.
105
Reduction ration of bar code height
111
Automatic replacement of Font A to Font B
112
Automatic replacement of Font B to Font A
117
Print density when printing in monochrome and multi-tone
119
Buzzer function: Enabling /disabling buzzer
120
Buzzer function: Buzzer frequency for Errors
121
Buzzer function: Sound pattern for Auto cut
122
Buzzer function: Buzzer frequency for Auto cut
123
Buzzer function: Sound pattern for Cash drawer port 1(Pulse
1)
124
Buzzer function: Buzzer frequency (Pulse 1)
125
Buzzer function: Sound pattern (Pulse 2)
126
Buzzer function: Buzzer frequency (Pulse 2)
*1 The functions are enabled for the internal buzzer, and available in 180 dpi only.
Transmission data is as follows.
Data group of Transmit
Hex
Decimal
customized setting
value
(1) Header
37H
55
(2) Identifier
27H
39
(3) Config type
30H ~39H
48 ~ 57
(value of a)
(ASCII format)
(4) Identifier
1FH
31
(5) Current value
30H ~39H
48 ~ 57
131
Data
1 byte
1 byte
1byte ~3byte
1 byte
1byte ~10byte
PROGRAMMING GUIDE
(ASCII format)
(6) NULL
00H
0
1 byte
Example: When “Roll paper width” setting is 82.5mm, command “0x1D 0x28 0x45 0x02 0x00 0x06
0x03” response is “0x37 0x27 0x33 0x1F 0x36 0x00”.
Print density Settings (a = 5,a = 12)
Hexadecimal
Print
D1
D2
D3
D4
D5
Density
50%
0x36
0x35
0x35 0x32 0x36
55%
0x36
0x35
0x35 0x32 0x37
60%
0x36
0x35
0x35 0x32 0x38
65%
0x36
0x35
0x35 0x32 0x39
70%
0x36
0x35
0x35 0x33 0x30
75%
0x36
0x35
0x35 0x33 0x31
80%
0x36
0x35
0x35 0x33 0x32
85%
0x36
0x35
0x35 0x33 0x33
90%
0x36
0x35
0x35 0x33 0x34
95%
0x36
0x35
0x35 0x33 0x35
100%
0x30
105%
0x31
110%
0x32
115%
0x33
120%
0x34
125%
0x35
130%
0x36
Sensor value (a = 7 in DN Emulation)
Sensor
Value
BM sensor 0…255
Power value
String
setting
n
Meaning
0
Auto
Example :
“Auto 55” or
ID-Fail48”
48
48W
“48”
…
..
…
75
75W
“75”
…
…
…
110 110W
“110”
D1
Maximum power (a = 9)
D2
D3
D4
D5
0x41
0x75
0x74
0x6F
0x49
0x34
…
0x37
…
0x31
0x44
0x38
…
0x37
…
0x31
0x2D
0x30
0x46
-
132
D6
D8
D9
D10
0x20 0x35 0x35
-
-
-
0x61
-
0x20
-
0x34
-
0x38
-
0x69
-
D7
0x6C
-
PROGRAMMING GUIDE
3.11.16
Set the configuration item for the serial interface
ASCII:
GS ( E pL pH fn a d1 … dk
Hexadecimal: 1D 28 45 pL pH fn a d1 … dk
Decimal:
29 40 69 pL pH fn a d1 … dk
Range:
3 ≤(pL + pH x256) ≤65535 (0 ≤pL ≤255, 0 ≤pH ≤255)
fn = 11
a=1
48 ≤ d ≤ 57
[Default (upon shipment)]
d1 … dk = *19200* (ASCII format data)
It sets the configuration item for the serial interface specified by a to the values specified by d.
Flash memory is used as the storage area for setting values. (Setting values are maintained even after
power off)
This command is processed in user setting mode. (“Change into the user setting mode” command need
to be sent before this command, and “End the user setting mode session” need to be sent after this
command)
a
1
2
3
4
Configuration item
Baud rate
Parity
Flow control
Bit length
Baud rate settings (a = 1) (ASCII format data)
Example: To set 9600, d1=0x39, d2=0x36, d3=0x30, d4=0x30
d1 … dk
Baud rate
*9600*
9600 bps
*19200*
19200 bps (Default)
*38400*
38400 bps
*57600*
57600 bps
*115200* 115200 bps
Parity settings (a = 2) (ASCII format data)
d
48
49
50
Function
No parity
Odd parity
Even parity
Flow control settings (a = 3) (ASCII format data)
d
48
49
Function
DTR / DSR
XON/XOFF
Bit length settings (a = 4) (ASCII format data)
d
55
56
Function
7 bits length
8 bits length
The configuration item set by this function is enabled by executing GS ( E <fn= 2> or restarting the
printer. Note that the host PC must be set to enable the printer to communicate with the host PC.
133
PROGRAMMING GUIDE
3.11.17
Transmit the configuration item for the serial interface
ASCII:
GS ( E pL pH fn a
Hexadecimal: 1D 28 45 pL pH fn a
Decimal:
29 40 69 pL pH fn a
Range:
(pL + pH x 256) = 2 (pL = 2, pH = 0)
fn = 12
a=1
It transmits the configuration item for the serial interface specified by a.
a
1
2
3
4
Configuration item
Baud rate
Parity
Flow control
Bit length
Transmission data is as follows:
Data group of Transmit serial configuration
Hex
Decimal
Data
(1) Header
37H
55
1 byte
(2) Identifier
33H
51
1 byte
(3) Type of configuration
31H ~ 34H
49 ~ 52
1byte
(4) Separater
1FH
31
1 byte
(5) Current value (ASCII format)
30H ~39H
48 ~ 57
1byte ~6byte
(6) NULL
00H
0
1 byte
Example: When serial interface configuration setting is 19200, command response is “0x37 0x33 0x31
0x1F 0x31 0x39 0x32 0x30 0x30 0x00”
3.11.18
Set Conditions for USB communication
ASCII:
GS ( E pL pH fn a d1 … dk
Hexadecimal: 1D 28 45 pL pH fn a d1 … dk
Decimal:
29 40 69 pL pH fn a d1 … dk
Range:
(pL + pH x 256) = 3 (pL = 3, pH = 0)
fn = 15
a=1
48 ≤ d ≤ 50
It transmits the set value of USB communication specified by a.
Flash memory is used as the storage area for setting values. (Setting values are maintained even after
power off)
This command is processed in user setting mode. (“Change into the user setting mode” command need
to be sent before this command, and “End the user setting mode session” command need to be sent
after this command)
a
1
Configuration item
Class
d1
49
Class
Printer class
Class settings (a = 1)
The configuration item set by this function is enabled by executing <fn= 2> GS ( E or restarting the
printer. Note that the host PC must be set to enable the printer to communicate with the host PC.
3.11.19
Transmit conditions for USB communication
134
PROGRAMMING GUIDE
ASCII:
GS ( E pL pH fn a
Hexadecimal: 1D 28 45 pL pH fn a
Decimal:
29 40 69 pL pH fn a
Range:
(pL + pH x 256) = 2 (pL =2, pH = 0)
fn = 16
a=1
It transmits the set values for USB communication specified by a.
a
1
(1)
(2)
(3)
(4)
(5)
Transmission data is as follows:
Transmission data
Header
Identifier
Type of configuration item
Separator
Set value
NUL
Configuration item
Class
Hex
37 H
52 H
30 H ~ 39 H
1F H
30 H ~ 39 H
00 H
135
Decimal
55
82
48 ~ 57
31
48 ~ 57
0
Data
1 byte
1 byte
1 ~ 2 bytes
1 byte
1 byte
1 byte
PROGRAMMING GUIDE
3.11.20
Set Serial number
ASCII:
GS ( E pL pH fn d1 … dk
Hexadecimal: 1D 28 45 pL pH fn d1 … dk
Decimal:
29 40 69 pL pH fn d1 … dk
Range:
2 ≤(pL + pH x256) ≤11
fn = 129
32 ≤ d ≤ 255
1 ≤ n ≤ 10
Description:
Set the serial number in the Flash ROM. Parameter d1 … dn specifies the serial number in ASCII
character’s as a string without zero at the end. The max size of the string is 10 characters.
Notes:
• This command can be used only once!
• This function code (fn = 129) is enabled only in the user setting mode.
• If the value of (pL + pH * 256) is out of the specified range, this command is ignored.
3.11.21
Set Production date
ASCII:
GS ( E pL pH fn d1 … dk
Hexadecimal: 1D 28 45 pL pH fn d1 … dk
Decimal:
29 40 69 pL pH fn d1 … dk
Range:
(pL + pH x256) =7
fn = 130
48 ≤ d ≤ 57
n=6
01 ≤ DD ≤ 31
01 ≤ MM ≤ 12
00 ≤ YY ≤ 99
Description:
Set the production date in the Flash ROM. Parameter d1…dn specifies the production date in ASCII
character’s as a string without zero at the end. The format is DDMMYY.
Notes:
• This command can be used only once!
• This function code (fn = 130) is enabled only in the user setting mode.
• If the value of (pL + pH * 256) is out of the specified range, this command is ignored.
• If the value of Day (DD), Month (MM) or Year (YY) is out of the specified range, this command is
ignored.
3.11.22
Sets communication condition of Ethernet interface.
ASCII:
GS ( E pL pH fn a d1 … dk
Hexadecimal: 1D 28 45 pL pH fn a d1 … dk
Decimal:
29 40 69 pL pH fn a d1 … dk
Range:
3 ≤(pL + pH x256) ≤65535
fn = 131
2≤ a≤6
d = 48, 49 [a = 2,6]
d = 46,48…57 [a=3,4,5]
1 ≤ k ≤ 65535
Default :
d = 49 [a=2]
d1…dk = “192..0.0.192” [a = 3]
d1…dk = “0.0.0.0” [a = 4]
d1…dk = “0.0.0.0” [a = 5]
d1…dk = 48 [a = 6]
Description : Change the communication settings
a
2
Communcication conndition
DHCP
136
PROGRAMMING GUIDE
・
3
IP Address
4
Net Mask
5
Gateway
6
Reserved.
DHCP(a = 2) is specified by d as flollows:
d
Function
48 DHCP disabled
49 DHCP Enabled
Enabling DHCP will set the IP and gateway address to “0.0.0.0” and the net mask to
“255.255.255.0” automatically!
IP address, Net Mask and Gateway (a = 3,4,5) have a dotted-decimal notation format. Setting
the IP address, will disable the DHCP automatically! Examples: “192.0.0.5”, “138.17.000.13”
Notes:
• This function works only, if an Ethernet interface card is installed!
• If the communication control between host and printer does not correspond, the printer
cannot process data from the host normally, and the host cannot receive data from the printer
normally.
• This function works in user setting mode.
3.11.23
Transmit communication condition of Ethernet interface.
ASCII:
GS ( E pL pH fn a
Hexadecimal: 1D 28 45 pL pH fn a
Decimal:
29 40 69 pL pH fn a
Range:
(pL + pH x 256) = 2 (pL =2, pH = 0)
fn = 132
1≤ a≤6
Description : Transmit the setting value of the Ethernet interface communication condition defined by a.
a
Communication condition
1
MAC Address(fixed)
2
DHCP
3
IP Address
4
Net Mask
5
Gateway
6
Reserved
Notes : • This function works in user setting mode and during normal operation, but only, if an Ethernet
interface card is installed!
• This function transmits “Header to NUL” as follows:
Field
Header
Identifier
Communication
condition1
Separator
Setting value2
NULL
Value
0x37
0x33
0x31-0x35
Data quantity
1 byte
1 byte
1 byte
0x1F
ASCII
0x00
1 byte
1-15 bytes
1 byte
“Setting value” is set by Function 131. It might differ from the current communication condition
before executing Function 2.
• This function is used to confirm whether Function 131 ends normally before executing
1
2
Communication condition is specified by a
Setting value is set by Function 131.
137
PROGRAMMING GUIDE
Function 2.
• The host can differentiate the setting value of the customize value from other transmit data by
the specific data in the transmit data block. When the header transmitted from the printer is
[hex = 0x37, decimal = 55], the data up to NUL [hex = 00H, decimal = 0] is handled as one
group and can be identified by the following data:
Transmit data
Hex
Decimal
1st byte( header)
0x37
55
2nd byte(identifier)
0x33
51
3.11.24
Set adjustment value(s).
ASCII:
GS ( F pL pH a fn nl nh
Hexadecimal: 1D 28 46 pL pH a fn nl nh
Decimal:
29 40 70 pL pH a fn nl nh
Range:
(pL + pH x 256) = 4 (pL =4, pH = 0)
a=1
fn = 0,48 or 1,49
0 ≤ ( nL + nH × 256) ≤ 65535 (where 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255)
Default:All adjustment values are set to “0”. (At the factory setting, the print starting position and the
cutting position are set to the head position and the cutter position respectively when the BM sensor
detects the BM.)
Description:This command is effective only when the BM sensor is enabled with memory switch 0x80.
Sets adjustment values(s) for the printer operations specified by a.
• pL, pH specifies (pL + (pH ×256)) for the number of bytes after pH (a, fn, nL and nH).
• a specifies setting values for the positions to start printing.
a
Function
1
Setting value for the positions to start
the printing.
The parameter is a dummy for further extensions. That’s why, printer accept other values too, but don’t
use anyone of them.
• fn specifies the direction of the adjustment..
fn
Function
0,48 Specifies a forward paper feeding
direction
1,49 Specifies a backward paper feeding
direction.
• nL and nH specifies the setting value to [(nL + nH × 256) x 0.125 mm]. Please note that the maximum
setting value is 210 mm.
• The adjustment value for the print starting position (a = 1) is affected by the command FF
• (See command FF). The value “0” means cut below of the mark position.
• The print start position is relative to the lower edge of the detected mark.
• This command is stored in the receive buffer first from the host, and then executed in the execution
process of other normal commands. Therefore, there may occur time delay for the execution of this
command after the printer receives this command. The delay time depends on the status of the
receive buffer.
If the adjustment value greater than the paper mark distance, printer feed only the remainder between
adjustment value and mark distance + mark width (separator value modulo (mark distance + mark
width)). For example, if the separator value is 180 mm and the mark distance 70, the feed after the
mark will be 30 mm.
Notes : • Please note that the maximum paper feeding amount can not be greater than the distance
between two black marks
138
PROGRAMMING GUIDE
3.11.25
Set Paper type
ASCII:
GS 0x81 m n
Hexadecimal: 1D 81 m n
Decimal:
29 129 m n
Range:
0 ≤ m ≤ 255
0 ≤ n ≤ 255
Default :
m = 0 (monochrome paper)
Description : Sets the paper type specified by m, as follows
m
Mode
0
Monochrome (Black) paper
1
Two-color papers
This command will set the optimum parameter values in the thermal print engine control
hardware for defined monochrome or two-color paper chemistry. The m n parameters
select paper category and formulation version respectively.
(m n = 0 0) defines the default monochrome (black category, initial version) paper,
out-of-box printers will also have factory preset descriptions for customer selected color
types: (m n = 1 0) red/black paper.
When issuing this command a value of n = 0xFF can always be use: that is interpreted as
requested the setting of the highest version defined in the printer of that category. This is a
save way for an application to always select the latest of a manufacturer’s paper category,
thus choosing “latest standard red/black”.
An incorrect setting of m n for a two-color paper or non-standard monochrome paper, or
failure to set m n when a color paper is inserted will result in poor print quality.
The last set paper type choice is stored in non-volatile memory and is retained after a
power loss and across reset commands. The initial value at first boot after firmware load
(or reload) is m n = 0 0.
Notes: For better printing results of the two-color paper use emphasized printing mode.
3.11.26
Text strike-through mode
ASCII:
GS 0x8D n m
Hexadecimal: 1D 8D n m
Decimal:
29 129 n m
Range:
m = 0 = retain same color as the character itself
m = 1 = black
m = 2 = paper color
n = standard cell height
Default : n = 0(off)
Description:
This command prints a strike-through over characters. If the strike-through is as wide as the cell height,
this will produce a cell that will be printed as a solid current color.
When characters are greater than normal size, such as double-high, the number of character rows
claimed by n also increases proportionally, such as doubling for double-high cells. Location of the
strike-through on a cell is on a cell-by-cell basis, so mixing cell sizes on the same print row will give
uneven results.
139
PROGRAMMING GUIDE
3.11.27
Download paper type description
ASCII:
GS 0x9E nl nh d1…dn
Hexadecimal: 1D 9E nl nh d1…dn
Decimal:
29 158 nl nh d1…dn
Description: This command will store in flash memory a paper type description identified by the
structure in d1..dn, adding the uniquely (by type category and version) identified structure for
subsequent use by the set paper type command. nL+ nH *256 define the number of bytes x that follow.
Target paper area is defined by 1D 81 command. Paper mode 0~3 for pre-defined. Not avalialbe to
define by this command.
3.11.28
Return paper type description
ASCII:
GS 0x9F m
Hexadecimal: 1D 9F m
Decimal:
29 159 m
Description: This command will return from flash memory a paper type description indexed by m,
sending back the data sequence used in the download paper type description command, i.e. the return
is 0x1D 0x9F m nL nH (d1…dn) which was stored in slot m; or a value of n = 0 if slot m does not have a
description stored. m = 0xff asks for a return of the current paper type.
For all valid descriptions, the last two bytes will be a CRC value and the first 48 bytes will be as follows:
Item
offset
size
Paper category
Version in type category
0
1
1
1
Print head type
2
1
structure format type
Density
adjustment
Structure data
Paper low
Adjustment
3
1
4
1
Color density
5
1
6
8
14
8
18
19
1
1
20
1
21
1
22
1
23
1
Change print speed threshold to
improve print quality
0~50 : Reduce duty threshold for speed
24
1
Available for Pre-load parameter.
25
22
Speed density
Graphic
Speed density
Text
Paper thickness
Core diameter
Remaining
length
Print quality
text
Print quality
Graphic
Target
power
Reserved
・
・
Target print head type.
Valid for pre-load parameter.
Fixed 1
Density offset. Same as GS ( E
-10 ~ 6 : 50% ~ 130%
Density offset. Same as GS ( E
-10 ~ 6 : 50% ~ 130%
Monochrome
density
Max speed
Speed
adjustment
note
Density offset for speed.
-50 ~ 30 : 50% ~ 130%
Adjustment parameter for paper low
detection
Maximum speed limitation.
Same as GS ( E
Null
Monochrome density : this parameter will update monochrome strobe time offset when selected
paper. The parameter is same as GS ( E command.
Color density
: this parameter will update monochrome strobe time offset when selected
140
PROGRAMMING GUIDE
・
・
・
・
・
・
paper. The parameter is same as GS ( E command.
Speed density (Graphic) : this area defined strobe time offset for each speed, it will apply text line.
8 bytes area format is below.
BYTE Target speed
note
1
14 IPS
The parameters adjust
strobe time for each
2
12 IPS
speed. 50%~130%.
3
10 IPS
(ex : 10 = 110%, -20 =
4
8 IPS
80%)
5
6 IPS
6
4 IPS
7
2.2 IPS
8
1.5 IPS
Speed density (Text) : this area defined strobe time offset for each speed, it will apply Text line.
Paper thickness : This area defined paper thickness for paper low detection.
Value
note
00-0F
0 to 15 :(10mm ~ 25mm)
Paper core diameter : This area defined paper core diameter for paper low detection.
Value
note
00-05
0 to 5 :( 0.05mm ~ 0.1mm)
Remaining length adjustment : This area defined paper remaining length adjustment for paper low
detection.
Value
note
F1-0F
-15 ~ 15 : (-7.5m ~ +7.5m)
Max speed : set max speed adjustment this area is same as GS ( E fn=5,a = 10 or 1F 36 AA
・
Print quality adjustment(txt) : This area able to adjust print speed for txt print
Value
note
00-30
0 ~ 50 : reduce duty
threshold for print speed.
・
Print quality adjustment(Graphic) : This area able to adjust print speed for graphic print
Value
note
00-30
0 ~ 50 : reduce duty
threshold for print speed.
Target power : This area is available for Pre-defined paper parameter.
This area is ignored for user-defined parameter.
・
141
PROGRAMMING GUIDE
3.11.29
Set temporary max target speed
ASCII:
GS 0xA0 nl nh
Hexadecimal: 1D A0 nl nh
Decimal:
29 160 nl nh
Range:
0x15 ≤ (nL + nH * 256) ≤ 0x162 monochrome
0x15 ≤ (nL + nH * 256) ≤ 0x6E color
Default : (nL + nH * 256) = 0 = normal speed
Description:
This command sets a specific speed for an operation, allowing the user more control of the print
environment.
The speed is maintained as long as it is less than the speed automatically set by power management. A
parameter of zero (0) restores the normal max speed..
The value converted to speed as below table.
n (Hex)
0
0x15 ~ 0x32
0x33 ~ 0x65
0x66 ~ 0x98
0x99 ~ 0xCB
0xCC ~ 0xFE
0xFF ~ 0x130
0x131 ~ 0x162
n (Dec)
0
21 ~ 50
51 ~ 101
102 ~ 152
153 ~ 203
204 ~ 254
255 ~ 304
305 ~ 354
142
Speed
normal
2 IPS
4 IPS
6 IPS
8 IPS
10 IPS
12 IPS
14 IPS
PROGRAMMING GUIDE
3.12
Asian character command
3.12.1
Select print modes for Asian characters
ASCII:
FS ! n
Hexadecimal: 1C 21 n
Decimal:
28 33 n
Value of n:
The character attribute for Asian character
Bit
0
1
2
3
4
5
6
7
Default of n:
Off/On
Off
Off
Off
On
Off
On
Off
On
Hex
00
00
00
01
00
01
00
01
Decimal
0
0
0
1
0
1
0
1
Function
Undefined
Undefined
Double width mode is not selected
Double width mode is selected
Double height mode is not selected
Double height mode is selected
Undefined
Undefined
Undefined
Underline mode is not selected
Underline mode is selected
0
Selects character attribute for Asian character.
The underline mode can be turned on or off by using FS – or ESC – also.
The thickness of underline is defined by FS – or ESC -, it does not relate to character size.
3.12.2
Select Asian character mode
ASCII:
FS
Hexadecimal: 1C
Decimal:
28
&
26
38
It selects Kanji character mode.
3.12.3
Turn underline mode ON/OFF in Asian mode
ASCII:
FS - n
Hexadecimal: 1C 2D n
Decimal:
28 45 n
Value of n:
0, 48 = cancel
1, 49 = 1 dot height underline
2, 50 = 2 dots height underline
Default n:
0 (Cancel)
Turn underline mode on or off for Asian character.
All characters can be underlined, including character right side spacing.
Underline can be selected by FS ! and ESC – also, the last received command is effective.
3.12.4
Cancel Asian character mode
ASCII:
FS
Hexadecimal: 1C
Decimal:
28
.
2E
46
It cancels Kanji character mode.
143
PROGRAMMING GUIDE
3.12.5
Define user-defined Asian characters
ASCII:
FS 2 c1 c2 d1 … dn
Hexadecimal: 1C 32 c1 c2 d1 … dn
Decimal:
28 50 c1 c2 d1 … dn
Value of c1:
Specified the first Asian character code
Value of c2:
Specified the second Asian character code
Value of d:
Image data
Value of n:
Size of image data
n = 72 bytes
Range of c1, c2: Japanese (Shift-JIS)
c1 = EC and 40  c2  7E or 80  c2  9E
Japanese(JIS)
c1 = 77 and 21  c2  7E
Simplified Chinese (CP936) A1  c1  A7 and 40  c2  7E or 80  c2  A0,
AA  c1  AF and A1  c2  FE,
F8  c1  FE and A1  c2  FE
Korean (CP949)
c1 = C9 or c1 = FE and A1  c2  FE
Traditional Chinese (CP950) 81  c1  A0 or FA  c1  FE and 40  c2  7E
or 80  c2  FE,
C7  c1  C8 and A1  c2  FE
A1  c1  A7 and 40  c2  7E or 80  c2  A0,
AA  c1  AF and A1  c2  FE,
F8  c1  FE and A1  c2  FE
(Note: 4 bytes user-defined characters are not supported in GB18030)
Chinese (CP GB18030 )
Defines and enters downloaded characters into RAM. The user-defined character will be cleared by
ESC @ or power off of printer. For each type of character pitch, the maximum number of user-defined
character is 100.
Defining User-Defined Asian Characters
Receipt Characters
24 dots
(8 x 3)
d1
d4
d7
d2
d5
d8
d3
d6
d9
MSB
d
n
LSB
Related Information:
It is required to send 1B 63 30 1 or 1E command before defining Asian characters for Receipt Station.
It is also required to send 1C 21 0/1 command before defining Asian standard/compressed characters
for Receipt Station.
3.12.6
Select Asian character code system
144
PROGRAMMING GUIDE
ASCII:
FS C
n
Hexadecimal: 1C 43
n
Decimal:
28
67
n
Range:
n = 0, 1, 48, 49
Default:
n=0
It selects a Kanji character code system for the Japanese model.
n
0, 48
1, 49
Kanji character code system
JIS code
SHIFT JIS code
3.12.7
Set Asian character spacing
ASCII:
FS S n1 n2
Hexadecimal: 1C 53 n1 n2
Decimal:
28 83 n1 n2
Value of n1:
Ignored (0)
Value of n2:
Character right side spacing dots (1/203 inch)
Default of n2:
Receipt:
Standard 1byte
Standard 2byte
936, 949, 950, GB18030
80mm
58mm
1
1
2
2
932
80mm
1
2
58mm
0
0
Sets the character right side spacing for characters in Asian character.
The underline is valid on the space set by this command. ESC SP command is not valid for Asian
character code pages. Therefore, this command is used to set the character right side spacing for
characters in Asian code page.
3.12.8
Set quadruple mode ON/OFF in Asian mode
ASCII:
FS W n
Hexadecimal: 1C 57 n
Decimal:
28 87 n
Value of n:
The quadruple mode for Asian characters.
0 (Bit 0) = Quadruple mode off
1 (Bit 0) = Quadruple mode on
Default of n:
0 (Quadruple mode off)
It selects or cancels the quadruple mode for Asian characters.
FS ! and GS ! also have control over character size.
145
PROGRAMMING GUIDE
3.13
IPL(Initial Program Loader) Command
There are two ways to update the firmware in online.
1) Update the firmware in IPL mode
2) Update the firmware in Main firmware mode
Following commands are to update the firmware in IPL mode provided for the serious malfunction such
as the corruption of the main firmware. If those commands are wrongly used, the printer may be
seriously damaged. Hence, it is recommended not to use those commands.
3.13.1
Switch to Flash Download Mode
ASCII:
ESC [ }
Hexadecimal: 1B 5B 7D
Decimal:
27 91 125
Response:
ACK (0x06): The mode is successfully changed to IPL.
NACK (0x15): The mode is already in IPL.
It switches mode to IPL (Initial Program Loader).
When the printer receives this command in Main firmware mode, it returns Ack and resets the printer
automatically, and it goes to IPL mode.
If this command is received in IPL mode, it just returns Nack and nothing happens. In order to go back to
Main Firmware mode from IPL mode, the printer has to be manually reset or be reset by Printer Reboot
command (1D FF).
3.13.2
Select Flash Memory Sector to Download
ASCII:
GS STX n
Hexadecimal: 1D 02 n
Decimal:
29 2 n
Value of n:
the Flash sector to which the next download operation applies
Range of n:
1 – 93 (Sector number). This range depends of the flash memory specification.
Response:
ACK (0x06): Sector number specified is available.
NACK (0x15): Sector number specified is not available.
It specifies the sector number of flash memory which writes the firmware program data sent
subsequently. This command is available only in IPL mode.
3.13.3
Get Firmware Sector CRC
ASCII:
GS ACK
Hexadecimal: 1D 06
Decimal:
29 6
Response:
ACK (0x06) + 2 bytes CRC (<low byte> <high byte>)
NACK (0x15): It failed to calculate CRC.
It calculates and returns CRC of the flash memory sector specified by “Select Flash Memory Sector to
Download” command (1D 02 n). If CRC is successfully calculated, it returns ACK and 2bytes CRC
consecutively. If CRC calculation is not successful or it is abnormal CRC, it returns NACK.
This command is available only in IPL mode.
3.13.4
Return IPL Firmware CRC
ASCII:
GS BEL
Hexadecimal: 1D 07
Decimal:
29 7
146
PROGRAMMING GUIDE
Response:
ACK (0x06) + 2 bytes CRC (<low byte> <high byte>)
It calculates and returns CRC of IPL firmware. This command is available only in IPL mode.
3.13.5
Erase all Flash Memory
ASCII:
GS SO
Hexadecimal: 1D 0E
Decimal:
29 14
Response:
ACK (0x06)
This command is not used in the sequence of the firmware flashing in IPL. Therefore, it does not do
anything except returning the acknowledgement. This command is available only in IPL mode.
3.13.6
Return Main Firmware CRC
ASCII:
GS SI
Hexadecimal: 1D 0F
Decimal:
29 15
Response:
ACK (0x06) + 2 bytes CRC (<low byte> <high byte>)
It calculates and returns CRC of Main firmware. This command is available only in IPL mode.
3.13.7
Erase Selected Flash Sector
ASCII:
GS D LE n
Hexadecimal: 1D 10 n
Decimal:
29 16 n
Range of n:
1 – 93 (Sector number). This range depends of the flash memory specification.
Response:
ACK (0x06): The sector specified is successfully erased.
NACK (0x15): The sector specified is not successfully erased.
It erases the flash memory sector specified. If the sector specified is successfully erased, it returns ACK.
If it failed to erase, it returns NACK. This command is available only in IPL mode.
3.13.8
Download to Active Flash Sector
ASCII:
GS DC1 al ah cl ch d1…dn
Hexadecimal: 1D 11 al ah cl ch d1…dn
Decimal:
29 17 al ah cl ch d1…dn
Value of al, ah: 0 (Fixed)
Value of cl, ch: Total number of bytes of the subsequent data = ((ch * 256) + cl)
Range of cl, ch: 1 ≤ ((ch * 256) + cl) ≤ 64K
Range of n:
1 ≤ n ≤ 64K
Response:
ACK (0x06): The firmware data is successfully written in the sector specified.
NACK (0x15): It failed to write the firmware data.
It writes the firmware data into the flash memory sector specified by “Select Flash Memory Sector to
Download” command (1D 02 n). If the data is successfully written, it returns ACK. If it failed to write, it
returns NACK. This command is available only in IPL mode.
3.13.9
Reboot the Printer
ASCII:
GS (SPACE)
Hexadecimal: 1D FF
Decimal:
29 255
147
PROGRAMMING GUIDE
It resets the printer. If the printer is in IPL mode and receives this command, it goes to Main mode after
the reset. If it is in Main mode, it's still in Main mode even after the reset.
This command is available in both IPL and Main mode.
148
PROGRAMMING GUIDE
3.14
Flash Download Commands in Main Firmware
These commands are used to download the firmware in online. Since it does not switch to IPL mode, the
flashing firmware is performed without disconnecting the interface.
Those are not allowed to use in an application. Otherwise, it may cause the printer failure, or it may
become not operational in worst case.
3.14.1
Flash Firmware
ASCII:
ESC [ | m pL0 pL1 pH0 pH1 d1…dn
Hexadecimal: 1B 5B 7C m pL0 pL1 pH0 pH1 d1…dn
Decimal:
27 91 124 m pL0 pL1 pH0 pH1 d1…dn
Value of m:
00H: IPL
01H: Main F/W
02H: SBCS
03H: DBCS
04H: TABLE
05H: PRINTER CONFIGRATION TABLE
10H: Combined File1 (IPL+Main FW) Reserved for future enhancement
20H: Combined File 2 (All in one file) Reserved for future enhancement
Values of pL0, pL1,pH0, pH1:
(pL0 + pL1 × 256 + pH0 × 65536 + pH1 × 16777216) as the size of firmware file
d1….dn:
Firmware file data
Response:
ACK (0x06) + 2 bytes CRC (<low byte> <high byte>)
NACK (0x15) + 1byte Error Code
It flashes the entire firmware data file into the flash memory. If the data is successfully written, it returns
ACK with CRC of the target firmware specified by m.
If flashing firmware fails, it returns NACK with the error code as follows.
Error Code:
01H: Illegal Parameter (n and p)
02H: File size mismatch
03H: Wrong firmware file
04H: Fail writing into flash memory
05H: CRC mismatch
While the printer is updating the firmware, LED blinks in Green. While LED is blinking, either
disconnecting USB cable or turning off the printer is not allowed. Otherwise, the printer becomes
malfunction after that.
3.14.2
Activate Firmware in the alternative area
ASCII:
ESC [ { n
Hexadecimal: 1B 5B 7B n
Decimal:
27 91 123 n
Value of n:
00H: IPL
01H: Main F/W
02H: SBCS
03H: DBCS
04H: TABLE
05H: PRINTER CONFIGRATION TABLE
Response:
ACK (0x06) + 2 bytes CRC (<low byte> <high byte>)
NACK (0x15) + 1byte Error Code
This command is to activate the firmware flashed into the deactivated area and automatically resets the
printer. If the firmware is successfully activated, it returns ACK with CRC of the target firmware and
automatically resets the printer. The firmware which does not support the swap download functionality
just returns ACK with CRC and resets the printer.
If it fails, it returns NACK with the error code as follows.
149
PROGRAMMING GUIDE
Error Code:
00H: Unknown error
01H: Illegal Parameter (n and p)
05H: No firmware in alternative area
06H: Fail to activate
This command is not available in IPL mode.
150
PROGRAMMING GUIDE
3.15
Diagnostic Commands
All diagnostic commands are supported for the printer production. Those are not allowed to use in an
application. Otherwise, it may cause the printer failure, or it may become not operational in worst case.
3.15.1
Execute test print
ASCII:
GS ( A pL pH n m
Hexadecimal: 1D 28 41 pL pH n m
Decimal:
29 40 65 pL pH n m
Range:
(pL + pH x 256) = 2 (pL = 2, pH = 0)
0 ≤ n ≤ 2, 48, ≤ n ≤ 50
1 ≤ m ≤ 3, 49 ≤ m ≤ 51
It executes a specified test point.
pL, pH specify (pL + pH x 256) as the number of bytes after pH (n and m).
n specifies the paper used for the test point.
n
Paper source
0, 48
Roll paper
1, 49
2, 50
m specifies a test pattern.
m
1, 49
2, 50
3, 51
6
Test pattern
Reserved
Extended self test print
(DN Emulation)
Printer status print
(ESC/POS Emulation)
Rolling pattern print
“Printer status print” print the current configuration setting which are stored in Flash memory and
customized with <fn=05> GS ( E: “Set the customized setting values” and FS ( E “top/bottom logo
printing” commands.
“Rolling pattern print” print specific ASCII rolling pattern.
The printer executes a software reset after processing this command.
Clears the receive and print buffers.
Resets all setting values in RAM (the print area, the character styles, and others) that were in effect at
power on. (The data in the Flash memory is not reset.)
3.15.2
Dot check pattern test
ASCII:
GS d 05H
Hexadecimal: 1D 64 05
Decimal:
29 100 05
Warning Dots: 000
dots
The command is to print Dot check pattern to check if there are any damaged heads along with the
result of the latest thermal head failure check.
151
PROGRAMMING GUIDE
3.15.3
Sensor Calibration
ASCII:
GS d 15H n
Hexadecimal: 1D 64 15 n
Decimal:
29 100 21 n
Range of n:
n = 01H: execute sensor calibration
n = 02H: (Reserved)
Response:
ACK (0x06) + AA + EE + GG
Index Sensor
AA
Jam Sensor
EE
GG
Paper Low Sensor
Black mark sensor
Value
01
00
If the respective sensor
If the respective sensor
calibration is successful or
calibration is not done or if the
already if calibration is done
calibration is failed after power
after power up
up
This command is to calibrate the following sensors.
- Jam Sensor
- Paper Low Sensor
- Black mark Sensor
Steps to calibrate sensors:
1) Send Sensor Calibration command (1D 64 15 01)
2) Printer beeps to indicate the printer is in sensor calibration mode.
3) Place a piece of paper on the jam sensor to makes it ON.
4) Supply a small paper roll (less than 36mm of paper diameter) to paper low sensor covered (ON).
5) Press key and printer beeps to indicate it is starting to calibrate.
 The printer beeps twice as soon as it completes the calibration of sensor for both sensors.
6) Remove all the paper low sensor not covered (OFF).
7) Remove all the paper on the jam sensor to make if OFF.
8) Press key and printer beeps to indicate it is starting to calibrate.
 The printer beeps twice as soon as it completes the sensor calibration.
9) Close cover without paper
10) Press key and printer beeps to indicate it is starting to black mark sensor calibrate.
 The printer beeps twice as soon as it completed black mark sensor data capture.
11) Replace paper roll which have Black mark
12) Press key and printer beeps to indicate it is starting to calibrate and feed paper to get actual black
mark data.
 The printer beeps twice as soon as it completes the sensor calibration.
Paper Jam Senor
Black mark Senor
Paper Low Sensor
Note: In terms of the Jam sensor, there is the risk that it detects a paper jam wrongly due to paper dust
on the platen generated by long usage. Therefore, in order to prevent this risk , the printer keeps
152
PROGRAMMING GUIDE
monitoring OFF value of the Jam sensor and it disables the paper jam detection automatically when
OFF value is abnormal.
Exceptions:
While the printer is performing the calibration, it does not process any subsequence data.
3.15.4
Retrieve Detail Log
ASCII:
GS d 20H m
Hexadecimal: 1D 64 20 m
Decimal:
29 100 32 m
Value of m:
0: Reserved
1: Historical Error Log
2: Maintenance Information
Historical Error Log (m=01)
Printer returns 64K bytes of historical error log data. 64K bytes = 128 bytes (one error log) x 512 errors
Error log are stored when the firmware detects following errors/warning.
1) Unrecoverable Error
Memory Error
Thermal Head Disconnected
Thermal Head Abnormal Temperature
2) Recoverable Error (operator intervention is required)
Cutter Error
Recoverable Error (operator intervention is not required)
Thermal head over heat
Black mark error
3) Warning (This will not affect any printer behavior)
Maintenance Information (m=02)
It transmits 1556 bytes detail maintenance information.
The content of this information is exactly same information as two QR barcode.
153
PROGRAMMING GUIDE
4. Appendix 1 Character sets
4.1
Character code table page 0 (PC437 : USA,Standard Europe)
4.2
Character code table Page 1 (PC850: Multilingual Latin I):
154
PROGRAMMING GUIDE
4.3
Character code table Page 2 (PC852: Latin II):
4.4
Character code table Page 3 (PC860: Portuguese):
155
PROGRAMMING GUIDE
4.5
Character code table Page 4 (PC863: Canadian French):
4.6
Character code table Page 5 (PC865: Nordic):
156
PROGRAMMING GUIDE
4.7
Character code table Page 6 (PC858: Multilingual I + Euro ):
4.8
Character code table Page 7 (PC866: Russian):
157
PROGRAMMING GUIDE
4.9
Character code table Page 8 (WPC1252: Latin I):
4.10
Character code table Page 9 (PC862: Hebrew):
158
PROGRAMMING GUIDE
4.11
Character code table Page 10 (PC737: Greek):
4.12
Character code table Page 11 (PC874: Thai):
159
PROGRAMMING GUIDE
4.13
Character code table Page 12 (PC857: Turkish):
4.14
Character code table Page 13 (WPC1251: Cyrillic):
160
PROGRAMMING GUIDE
4.15
Character code table Page 14 (WPC1255: Hebrew):
4.16
Character code table Page 15 ((KZ_1048: Kazakh):
161
PROGRAMMING GUIDE
4.17
Character code table Page 16 (WPC1254: Turkish):
4.18
Character code table Page 17 (WPC1250: Central Europe):
162
PROGRAMMING GUIDE
4.19
Character code table Page 18 (WPC28591: Latin 1):
4.20
Character code table Page 19 (WPC28592: Latin 2):
163
PROGRAMMING GUIDE
4.21
Character code table Page 20 (WPC28599: Turkish):
4.22
Character code table Page 21 (WPC28605: Latin 9):
164
PROGRAMMING GUIDE
4.23
Character code table Page 22 (PC864: Arabic):
4.24
Character code table Page 23 (PC720: Arabic):
165
PROGRAMMING GUIDE
4.25
Character code table Page 24 (WPC1256: Arabic):
4.26
Character code table Page 25 (WPC28596: Arabic):
166
PROGRAMMING GUIDE
4.27
Character code table Page 26 (KATAKANA: Asia):
4.28
Character code table Page 27 (PC775: Baltic):
167
PROGRAMMING GUIDE
4.29
Character code table Page 28 (WPC1257: Baltic):
4.30
Character code table Page 29 (WPC28594: Baltic):
168
PROGRAMMING GUIDE
4.31
Character code table Page 30 (WPC1253: Greek):
169
PROGRAMMING GUIDE
5. Appendix 2 Printable area
Physical Right Margin
Physical Printable Area
GS L
Left margin
-
GS W
Logical Printing Area
The left margin can be set using GS L command.
While printing area width is set by GS W command.
These commands are ignored in page mode.
Physical Printable Area
GS L
Left margin
-
If the printing area width is less than the width of 1 character, the right margin is shifted towards
right to accommodate the width of 1 character. (This processing is only performed on the line of
question.)
If bitimage or download bitimage is developed, the right margin is shifted towards right t o
accommodate one line in vertical for that bitimage. (1 dot for double density bitimage and 2 dots
for single density bitimage)
Physical Printable Area
GS L
Left margin
-
If right margin reaches the physical limit, left margin is shifted towards left to accommodate the
width of 1 character. (This processing is only performed on the line of question.)
If both left and right margins have reach the physical limits, the character right side spacing is
reduced to accommodate the character on that line.
If bitimage or download bitimage is developed, the left margin is shifted towards left to
accommodate one line in vertical for that bitimage. (1 dot for double density bitimage and 2 dots
for single density bitimage)
170
PROGRAMMING GUIDE
6. Appendix 3 Eco function
Please refer the specification of Utility(T.B.D) for the detail of each Eco function.
6.1
-
General
Eco settings configured are stored into the non-volatile memory. Therefore, even if the printer is powered
off, the settings remain.
Eco functions are not available in page mode.
It essentially has two functionalities. One is the functionality to reduce the paper consumption. Another is
functionality to reduce the power consumption.
“ECO function disable/enable” is enables / disables all of Eco function. Unless this setting is enabled, each
function is not valid irrespective of its individual setting.
6.2
Paper reduction
6.2.1
Remove Upper Space
It eliminates the extra upper space created by an application.
Upper space implies the area from the top edge of the paper until the top edge of the first printable data.
Disabled
Enabled
Physical margin
(Head -> Cutter)
Physical margin
(Head -> Cutter)
Top margin created
by an application
LOGO
LOGO
AAAAAAAAAAA
AAAAAAAAAAA
BBBBBBBBBBBB
BBBBBBBBBBBB
CCCCCCCCCCCC
CCCCCCCCCCCC
This setting does not affect the physical margin created by the mechanical distance between the
thermal head position and the cutter position.
This setting is ignored when the compatible top margin mode is enabled.
171
PROGRAMMING GUIDE
6.2.2
Remove Lower Space
It eliminates the extra lower space and rectifies the cutting position at the end of print data regardless of
the original cutting position.
Lower space implies the area from the end edge of the last printable data until the cutting position.
Enabled
Disabled
Physical margin
(Head -> Cutter)
Physical margin
(Head -> Cutter)
LOGO
LOGO
AAAAAAAAAAA
AAAAAAAAAAA
BBBBBBBBBBBB
BBBBBBBBBBBB
CCCCCCCCCCCC
CCCCCCCCCCCC
Bottom
Space
This setting is ignored when the compatible top margin mode is enabled.
6.2.3
Line Space Reduction
It changes the line pitch of each text printing line to the minimum line pitch.
The text print line which consists of ANK characters is changed to 8.13 LPI.
The text print line which includes of DBCS characters is changed to 7.52 LPI.
Disabled
Enabled
Physical margin
(Head -> Cutter)
e.g. 3LPI
Physical margin
(Head -> Cutter)
LOGO
LOGO
AAAAAAAAAAA
AAAAAAAAAAA
BBBBBBBBBBBB
CCCCCCCCCCCC
BBBBBBBBBBBB
CCCCCCCCCCCC
172
8.13LPI
PROGRAMMING GUIDE
6.2.4
Line Feed Reduction
It reduces the height of space created by the vertical feed command without printable data according to
the ratio setting (Disable* / 25% / 50% / 75% / 100%).
e.g.
If it is configured to 50%, space height becomes half of the original height.
If it is 100%, the space is completely removed.
Disabled
75%
LOGO
LOGO
AAAAAAAAAAA
e.g. 15 mm
3.75 mm (-75%)
BBBBBBBBBBBB
CCCCCCCCCCCC
AAAAAAAAAAA
BBBBBBBBBBBB
CCCCCCCCCCCC
Line Feed spaces which exist in either the top space or the bottom space are not affected by this setting.
6.2.5
Barcode Height Reduction
It reduces the barcode height according to the ratio setting (Disable* / 25% / 50% / 75%).
e.g.
If it is configured to 50%, barcode height becomes half of the original height.
Disabled
75%
LOGO
LOGO
AAAAAAAAAAA
AAAAAAAAAAA
BBBBBBBBBBBB
BBBBBBBBBBBB
5 mm (-75%)
e.g 20 mm
173
PROGRAMMING GUIDE
6.2.6
Registered Logo Removal
It ignores the registered Logo print command.
Disabled
Enabled
AAAAAAAAAAA
LOGO
BBBBBBBBBBBB
CCCCCCCCCCCC
AAAAAAAAAAA
BBBBBBBBBBBB
CCCCCCCCCCCC
This setting is ignored when the compatible top margin mode is enabled.
6.2.7
Force Single High Font
It ignores the attribute commands which make character’s height higher.
Disabled
Enabled
Physical margin
(Head -> Cutter)
Physical margin
(Head -> Cutter)
LOGO
LOGO
AAAAAAAAAAA
AAAAAAAAAAA
BBBBBBBBBBBB
BBBBBBBBBBBB
CCCCCCCCCCCC
CCCCCCCCCCCC
6.2.8
Remove lines containing only spaces
If this setting is enabled, space (0x20) is not considered as printable data. Therefore a line which
consists of only spaces (0x20) is treated as target to reduce by Eco feature.
This setting affects to the following Eco functions.
1. Remove Upper Space
2. Remove Lower Space
3. Line Feed Reduction
If it is disabled, space (0x20) is considered as printable character.
This setting is to specify how other Eco functions treat the space character (0x20). This function itself
does not remove any spaces.
174
PROGRAMMING GUIDE
6.3
Power reduction
6.3.1
Bold Font Removal
It ignores the Bold Font attribute settings.
Disabled
Enabled
LOGO
LOGO
AAAAAAAAAAA
AAAAAAAAAAA
BBBBBBBBBBBB
BBBBBBBBBBBB
CCCCCCCCCCC
CCCCCCCCCCCC
C
6.3.2
Force Single Wide Font
It ignores the Double Width and wider Font attribute settings.
Disabled
Enabled
LOGO
LOGO
AAAAAAAAAAAA
AAAAAAAAAAAA
BBBBBB
BBBBBB
CCC
CCC
175
PROGRAMMING GUIDE
6.3.3
No White/Black Reverse Printing
It ignores the White/Black Reverse Printing attribute setting.
Disabled
Enabled
LOGO
LOGO
AAAAAAAAAAA
AAAAAAAAAAA
BBBBBBBBBBBB
BBBBBBBBBBBB
CCCCCCCCCCCC
CCCCCCCCCCCC
6.3.4
Stand-by Mode
It disables / enables the stand-by mode.
6.3.5
Power Off Mode
It disables / enables the power off mode. The power off mode is enabled by selecting the duration
(60min, 120min, 180min, 240min and 300min) of idle time which triggers going in to the power off mode.
6.3.6
Speed Reduction
It switches the print mode (High Speed Mode / High Quality Mode). Switching to “High Quality Mode”
reduces the maximum speed which is expected to reduce the power consumption.
6.3.7
Density Reduction
It changes the print darkness according to the setting
Option : 0 (default) / -1 / -2 / -3 / -4 / -5 / -6 / -7 / -8 / -9 / -10 / -11 / -12 / -13 / -14 / -15
Disabled
-10 (example)
LOGO
LOGO
AAAAAAAAAAA
AAAAAAAAAAA
BBBBBBBBBBBB
BBBBBBBBBBBB
CCCCCCCCCCCC
CCCCCCCCCCCC
176
PROGRAMMING GUIDE
6.4
Affected commands
Below commands are affected by each eco functions
Paper Reduction
Power Reduction
Line Line Feed Barcode Registere Force
Force No White
Eco
Remove Remove
Bold
Space
Height
d
Single
Single
/Black
functions Upper
Lower
Reductio
Font
Reductio Logo
High Removal Wide
Reverse
Space
Space Reductio
n
n
n
Removal Font
Font
Printing
Command
LF
0A
*
*
*
DC4
14
*
*
*
NAK
15
*
*
*
SYN
16
*
*
*
ESC !
1B 21
ESC 2
1B 32
*
*
*
*
ESC 3
1B 33
*
*
*
*
ESC E
1B 45
*
ESC G
1B 47
*
ESC J
1B 4A
*
*
*
ESC d
1B 64
*
*
*
FS !
1C 21
*
*
FS W
1C 57
*
*
GS !
1D 21
*
*
GS /
1D 2F
GS B
1D 42
GS V
1D 56
GS k
1D 6B
AX 6
1F 36
*
*
*
*
*
*
*
*
*
*
*
*
*
*
177
*
*
*
*
*
*
PROGRAMMING GUIDE
7. Appendix 4 Thai font support
7.1
Outline
The printer supports Thai font (Code Page 874). It prints each character one by one according to the code
number specified. However, Thai character basically consists of the combination of multiple characters.
The printer provides the functionality to automatically construct Thai character according to the order of
specified Thai character.
In order to enable this functionality, the printer has to be configured to the following condition.
- Code Page = 874
- Special Font = Mode 1 (Constructed 874)
Based on this setting, characters of code page 874 are constructed according to the character order sent.
7.2
Thai character configuration
Thai character consists of maximum 4 levels. (Top level, Above level, Base Line and Below level.)
Top level: Only top/above level characters are allowed to be placed on Top level which is the highest layer.
Above level: Only top/above level characters are allowed to be placed on Above level which exists
between Top level and Base line.
Base line: Only base line characters are allowed to be placed on Base line which exists between Above
level and Below level.
Below level: Only below level characters are allowed to be placed on Below level which is the lowest layer.
178
PROGRAMMING GUIDE
Each character type is explained below.
Baseline characters
1) Circled by Red, Purple and pink characters are baseline characters.
2) The characters circled by purple will not have below level characters, but they rarely use.
3) The characters circled by pink will not have top level and above level, but only ฬ rarely use.
4) Every character in red and purple must have a top and below level.
Top level/Above level characters
1) Circled by blue are Top level/Above level characters.
2) Red, purple circle and ฬ can be both top and above level
3) The characters circled by blue in 5th line can be top level when above level character exists.
So it means 4th line characters circled in blue can be above level only. Whereas 5th line
characters circled in blue can be both top and above level.
Below level characters
1) Circled by green are Below level characters.
2) Top, Above and Below characters cannot be in the same character.
7.3
Thai character data procedure
- Thai character data string format is;
Base character, <Below character >, <Above character>, <Top character>, Base character, …….
- Printer checks whether the received character is the Base character. If the Top, Above, Below
characters are sent before Base character, these characters are ignored.
- After receiving Base character, printer checks next character until receiving next Base character.
If next character is the Below character, the Above character or Top character, the printer checks
whether these Thai characters are valid for current Base character. If they are valid, it merges these
characters’ image on Base character’s image. If it is invalid character, it will be ignored.
7.4
The notes for this function
- This function support standard pitch font and compressed pitch font.
- Thai character’s height is 34 dots.
- The below command function which change is different from other code pages.
179
PROGRAMMING GUIDE
SYN
ESC 2
ESC 3
Add n Extra Dot Rows
Set Line Spacing to 1/6 Inch
Set Line Spacing
- The line pitch is changed by below commands because the code page is changed by below commands.
ESC R
Select international character set
ESC t
Select character code table (same as ESC R)
ESC %
Set/cancel user defined character set
ESC L
Select page mode
ESC S
Select standard mode
FF
Form Feed in page mode
180
PROGRAMMING GUIDE
8. Appendix 5 Paper low detection
Paper low sensor is located in receipt station to detect the paper roll when there is certain amount of
paper remaining. Depend on diagnostic setting FW will calculate remaining paper length.
There are three parameters to calculate paper remaining length.
CD1
PT 2
LA3
: Paper core diameter
: Paper thickness
: Length Adjustment.
PT
LA
CD
Paper low sensor status: This status is updated based on the paper low sensor detection
Paper low
sensor
Receipt paper low
Receipt paper Adequate
Paper low warning status: This status is updated based on the “Paper Low Detection” setting in the
Diagnostic form.
LA more than 1m
LA less than 1m
Printer calculates paper length to detect paper low warring when sensor detect no paper.
PT
Paper roll diameter = 36mm. when Paper low
sensor detect no paper.
CD
Print feed length to detect paper low warning.
1
Paper Core diameter able to adjust by 1F 36 command. Adjustment unit is 1mm.
Paper Thickness able to adjust by 1F 36 command. Adjustment unit is 0.01mm.
3
Paper Length Adjustment able to adjust by 1F 36 command. Adjustment unit is 0.5m.
2
181
PROGRAMMING GUIDE
9. Appendix 6 Barcode Information
9.1 GS k Print Barcode
• Modular check character is processed as following:
- Automatically added when processing data is 11 byte.
- The 12th byte data is processed as a modular check character when
processing data is 12 byte. In this case, modular check character is not
checked.
• Left guard bar/center bar/right guard bar are added automatically.
UPC-A
(m = 0, 65)
process:
Example:
Data
(01234567890)
Command
0x1D 0x6B 0x00 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x00 0x00
Output
• Barcode is combination of UPC-A and the composite codes CC-A and CC-B
• Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC)
• Barcode can be printed without composite part
• Barcode will not be printed if the separator is given without composite
code
UPC-A
Composite
(m = 65)
process:
UPC-E
(m = 1, 66)
process:
Example:
Data
(0123456789012|Composite)
Command
0x1D 0x6B 0x41 0x15 "12345678901|Composite"
Output
• The first data (d1) is processed as number system character (NSC) so 0 must be specified.
• Modular check character is processed as following:
- Automatically added when processing data is 11 byte.
- The 12th byte data is processed as a modular check character when
processing data is 12 byte. In this case, modular check character is not
checked.
• Simplified code with 6 digits is printed. Left guard bar/right guard bar are added
automatically.
Example:
Data
(0123456)
Command
0x1D 0x6B 0x01 "01234500006" 0x00
Output
182
PROGRAMMING GUIDE
Data
(0331230|Composite)
Command
0x1D 0x6B 0x42 0x0C "012345600007|Composite"
Output
• Modular check character is processed as follows:
- Automatically added when processing data is 13 byte.
- The 13th byte data is processed as a modular check character when processing data is 13
byte. In this case, modular check character is not checked.
• Left guard bar/center bar/right guard bar are added automatically.
Data
(4902011615029)
Command
0x1D 0x6B 0x02 "4902011615029" 0x00
Output
JAN13/EAN
13 (m = 2,
67) process:
Data
(123456789012|Composite1234567890)
Command
0x1D 0x6B 0x43 0x20 "123456789012|Composite1234567890"
Output
JAN8/EAN8
(m = 3, 68)
process:
• Modular check character is processed as follows:
- Automatically added when processing data is 7 byte.
- The 8th byte data is processed as a modular check character when processing data is 8
byte. In this case, modular check character is not checked.
• Left guard bar/center bar/right guard bar are added automatically.
Data
(9031101)
Command
0x1D 0x6B 0x03 "9031101" 0x00
Output
183
PROGRAMMING GUIDE
Data
(1234567|CompositeAbcdefghij)
Command
0x1D 0x6B 0x44 0x1B "1234567|CompositeAbcdefghij"
Output
CODE39
(m = 4, 69)
process:
ITF
(Interleaved
2 of 5)
(m = 5, 70)
process:
• The printer processes the start code (ASCII = */Hex = 2Ah/Decimal = 42) as follows:
- When the first bar code (d1) is “*”, the printer processes the data as a first character.
- If the first bar code (d1) is not “*”, the printer adds a start character (*) automatically.
• The printer processes the stop code (ASCII = */Hex = 2Ah/Decimal = 42) as follows:
- When the last bar code (dk or dn) is “*”, the printer processes the data as a last character.
- If the last bar code (dk or dn) is not “*”, the printer adds a last character (*) automatically.
- When “*” is processed during bar code data processing, the printer processes “*” as a stop
character.
- The printer prints data preceding “*” and finishes command processing. Therefore, data
following “*” are processed as normal data.
• Check digits are not calculated and added.
Example:
Data
(ABC-1234)
Command
0x1D 0x6B 0x04 "ABC-1234" 0x00
0x1D 0x6B 0x45 0x08 "ABC-1234"
Output
• Start code and stop code are added automatically.
• Check digits are not calculated and added.
• Note: ITF request an even count of digits. In case of odd digits, a leading 0 will be inserted
if the memory switch “CodeITF Leading 0” is enabled (see GS ( E). In this case, last digit will
be discarded.
• If n is out of the specified range or if n is an odd number when ITF bar code system (m = 70)
is selected, this command is canceled and the following data is processed as normal data.
Example:
Data
(1234567890)
Command
0x1D 0x6B 0x05 "1234567890" 0x00
0x1D 0x6B 0x46 0x0A "1234567890"
Output
184
PROGRAMMING GUIDE
• Start code and stop code are not added automatically. Transmit data including the codes.
• Check digits are not calculated and added.
CODABAR
(m = 6, 71)
process:
PDF417
(m = 10, 75)
process:
CODE93
(m = 72)
process:
CODE128
(m = 73)
process:
Example:
Data
(0123456789
Command
0x1D 0x6B 0x06 "A0123456789A" 0x00
0x1D 0x6B 0x47 0x0C "A0123456789A"
Output
• Parameter is set with command GS p
Example:
Data
(This is a PDF417)
Command
0x1D 0x6B 0x0A "This is a PDF417" 0x00
0x1D 0x6B 0x4B 0x10 "This is a PDF417"
Output
• Start code and stop code are added automatically.
• Check digits (2 character) are calculated and added automatically.
• Special character HRI is processed as follows:
• The printer prints an HRI character “ “ as start and stop character.
• The printer prints an HRI character “ + an alphabetic character” as a control character
(unprinted character).
Example:
Data
(ABC-1234-/+)
Command
0x1D 0x6B 0x48 0x0B "ABC-1234-/+"
Output
• Make sure to specify the start character. The start character must be a code set selection
character (any of CODE A, CODE B, or CODE C) which selects the first code set (see Table
9.1). If no start code is given, the CODE_C is default.
• Table 9.1 list the allowed values and code 128 – code table conversion.
Specific characters are in bold-italic.
• CODE C values are coded BCD like. Range goes from 00 – 99 and encode two
digits, e.g. 0 – ‘0’ and ‘0’, 21 – ‘2’ and ‘1’ … (See table 9.1).
185
PROGRAMMING GUIDE
• Stop character is added automatically.
• Check digit is calculated and added automatically.
• Special character HRI is processed as follows:
• The printer does not print HRI characters that correspond to the shift character or
code set selection character (CODE A, CODE B, or CODE C).
• HRI characters of the function characters (FNC1, FNC2, FNC3, or FNC4) and
control characters (0x00 to 0x1F and 0x7F) are printed as spaces.
• Not printable characters (< 32) are printed as ‘.’.
• The following example should be helpful generating code 128:
Values
105 66 0 20 0 1 0 4
55
104 34 99 40 3 79
61 13 8 100
16
103 65 98 65 65 99
20 0 1 0 4
55
Code128 Conversion
Command
0x1D 0x6B 0x49 0x08 0x69
START_C 66 00 20 00 01 00 04
0x42 0x00 0x01 0x00 0x04 0x37
55
0x00
START_B B CODE C 40 03 79 0x1D 0x6B 0x49 0x0B 0x68
61 08 CODE B
0x22 0x63 0x28 0x03 0x4F
0
0x3D 0x0D 0x08 0x64 0x10
START_A . SHIFT a . CODE C 0x1D 0x6B 0x49 0x0C 0x67
20 00 01 00 04
0x41 0x62 0x41 0x41 0x63 0x14
55
0x00 0x01 0x00 0x04 0x37
• Barcode is a combination of GS1 and the composite codes CC-A and CC-B
• Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC)
• Barcode can be print without composite part
• Barcode will not be printed if the separator is given without composite code
• If encoding of composite code failed, barcode will not be printed
GS1–
Composite
(m=11, 76)
process:
GS1Truncated–
Composite
(m=12, 77)
process:
Data
(2001234567890|Composite)
Command
0x1D 0x6B 0x4C 0x17 "2001234567890|Composite"
Output
• Barcode is a combination of GS1 Truncated and the composite codes CC
A and CC-B
• Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC)
• Barcode can be printed without the composite part
• Barcode will not be printed if the separator is given without composite
code
• If encoding of composite code failed, barcode will not be printed
Data
(2001234567890|Composite)
Command
0x1D 0x6B 0x4D 0x17 "2001234567890|Composite"
Output
186
PROGRAMMING GUIDE
• Barcode is combination of GS1 Stacked and the composite codes CC-A
and CC-B
• Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC)
• Barcode can be printed without the composite part
• Barcode will not be printed if the separator is given without composite
code
• If encoding of composite code failed, barcode will not be printed
GS1Stacked–
Composite
(m=13, 78)
process:
Data
(2001234567890|Composite)
Command
0x1D 0x6B 0x4E 0x17 "2001234567890|Composite"
Output
• Barcode is combination of GS1 Stacked Omni and the composite codes
CC-A and CC-B
• Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC)
• Barcode can be printed without the composite part
• Barcode will not be printed if the separator is given without composite
code
• If encoding of composite code failed, barcode will not be print
GS1Stacked
Omni–
Composite
(m=14, 79)
process:
GS1Limited
Composite
(m=15, 80)
process:
Data
(2001234567890|Composite)
Command
0x1D 0x6B 0x4F 0x17 "2001234567890|Composite"
Output
• Barcode is combination of GS1 Limited and the composite codes CC-A and CC-B
• Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC)
• Barcode can be printed without the composite part
• Barcode will not be printed if the separator is given without composite code
• Numeric limit is 1999999999999. All barcodes greater this value will not be printed. The
barcode information is not printed as normal text.
• If encoding of composite code failed, barcode will not be printed
Data
(2001234567890|Composite)
Command
0x1D 0x6B 0x50 0x17 "0040941991026|Composite"
Output
187
PROGRAMMING GUIDE
GS1Expand
Composite
(m=16, 81)
process:
UCC
EAN128
(m=82,m=8
3) process:
CC_A
CC_B
• Barcode can be print out over more than 1 row by setting the segments per row (see ESC w
n b Barcode is combination of GS1 Expand and the composite codes CC-A and CC-B
• Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC)
• Barcode can be printed without the composite part
• Barcode will not be printed if the separator is given without composite c ode
• If encoding of composite code failed, barcode will not be printed
• Example (2001234567890|Composite):
• Caution: Barcode has a determine structure. This encoding function
works for all combinations but it is not sure that the decoder
(scanner) interprets the barcode like the data which was encoded.
• ‘#’ is FNC1 control char. Please refer to ESC w n b.
Data
(2001234567890|Composite)
Command
0x1D 0x6B 0x51 0x17 "2001234567890|Composite"
Output
• Barcode is combination of code 128 and the composite codes CC-A, CC-B (m=82) and
CC-C (m=83)
• Barcode can be printed without the composite part
• Barcode will not be printed if the separator is given without composite code
• UCC EAN is an Code 128 with follow structure:
Start
Element String
Character Function Application Data
Stop
(START_A,
Code 1
Checksum
Identifier
Filed(s)
Character
START_B,
(FNC_1)
(AI)
START_C)
• START_C is default
• FNC_1 have to be set by user
• AI and Data Field(s) is set by user and not is not checked of validation according to
GS1-128 specification (http://www.gs1-128.info/)
• Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC)
• If encoding of composite code failed, barcode will not be printed
• Composite Code is only usable with a composite Barcode
• The maximum of encoded data depends from the parts of characters and digits.
Max
Max
Columns
Digits Chars
2
47
26
3
47
26
4
56
31
• Input-Buffer (255 chars) limits the maximum
• If the maximum reached CC_B is chosen
• Composite Code is only usable with an composite Barcode
• The maximum of encoded data depends from the parts of characters and digits.
Max
Max
Columns
Digits Chars
2
95
55
3
219
127
4
338
196
• Input-Buffer (255 chars) limits the maximum
188
PROGRAMMING GUIDE
CC_C
• Composite Code is only usable with an composite Barcode (UCC EAN 128 CC_C)
• The following example should be helpful generating UCC 128:
Values
105 66 0 20 0 1 0 4
55
104 34 99 40 3 79
61 13 8 100
16
103 65 98 65 65 99
20 0 1 0 4
55
Code128 Conversion
Command
0x1D 0x6B 0x53 0x1D 0x69
START_C 66 00 20 00 01 00 04 0x42 0x00 0x14 0x00 0x01 0x00
55
0x04 0x37
"|1234567890123456789”
0x1D 0x6B 0x52 0x15 0x68
START_B B CODE C 40 03 79 0x22 0x63 0x28 0x03 0x4F
61 08 CODE B
0x3D 0x0D 0x08 0x64 0x10
0
0x7C 0x31 0x32 0x33 0x34
0x35 0x36 0x37 0x38 0x39
0x1D 0x6B 0x52 0x16 0x67
START_A . SHIFT a . CODE C 0x41 0x62 0x41 0x41 0x63 0x14
20 00 01 00 04
0x00 0x01 0x00 0x04 0x37
55
0x7C 0x31 0x32 0x33 0x34
0x35 0x36 0x37 0x38 0x39
189
PROGRAMMING GUIDE
Table 9.1 Code 128 – Code table conversion
Value
(decimal)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Value
(hex)
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
Code A
Space
!
“
#
$
%
&
‘
(
)
*
+
,
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
Code B
Space
!
“
#
$
%
&
‘
(
)
*
+
,
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
190
Code C
“00“
“01“
“02“
“03“
“04“
“05“
“06“
“07“
“08“
“09“
“10“
“11“
“12“
“13“
“14“
“15“
“16“
“17“
“18“
“19“
“20“
“21“
“22“
“23“
“24“
“25“
“26“
“27“
“28“
“29“
“30“
“31“
“32“
“33“
“34“
“35“
“36“
“37“
“38“
“39“
“40
“41
“42“
“43“
“44“
“45“
“46“
“47“
“48“
“49“
“50“
“51“
“52“
“53“
“54“
PROGRAMMING GUIDE
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
37
38
39
3A
3B
3C
3D
3E
3F
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
60
61
62
63
64
65
66
67
68
69
W
X
Y
Z
[
\
]
^
_
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR
SO
SI
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
FNC 3
FNC 2
SHIFT
CODE C
CODE B
FNC 4
FNC 1
W
X
Y
Z
[
\
]
^
_
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
DEL
FNC 3
FNC 2
SHIFT
CODE C
FNC 4
CODE A
FNC 1
START_A
START_B
START_C
191
“55“
“56“
“57“
“58“
“59“
“60“
“61“
“62“
“63“
“64“
“65“
“66“
“67“
“68“
“69“
“70“
“71“
“72“
“73“
“74“
“75“
“76“
“77“
“78“
“79“
“80“
“81“
“82“
“83“
“84“
“85“
“86“
“87“
“88“
“89“
“90“
“91“
“92“
“93“
“94“
“95“
“96“
“97“
“98“
“99”
CODE B
CODE A
FNC 1
PROGRAMMING GUIDE
9.2
GS ( k Print 2-dimensional Barcode
• PDF417: Print the symbol data in the symbol storage area
PDF417
cn = 48
Data
(0123456789)
Command
0x1D 0x28 0x6B 0x0D 0x00 0x30 0x50 0x30 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
0x38 0x39
; Store the data in the symbol storage area
0x1D 0x28 0x6B 0x03 0x00 0x30 0x51 0x30
; Print the symbol data in the symbol storage area
Output
• QR Code: Print the symbol data in the symbol storage area
QR Code
cn = 49
Data
(QR code sample)
Command
0x1d 0x28 0x6b 0x04 0x00 0x31 0x41 0x32 0x00
; Select model 2 conversion processing
0x1d 0x28 0x6b 0x03 0x00 0x31 0x43 0x06
; Set the size of module to 6
0x1d 0x28 0x6b 0x03 0x00 0x31 0x45 0x32
; Select the error correction level Q = 50
0x1d 0x28 0x6b 0x11 0x00 0x31 0x50 0x30 0x51 0x52 0x20 0x63 0x6f 0x64 0x65 0x20 0x73
0x61 0x6d 0x70 0x6c 0x65
; Store the data in the symbol storage area
0x1d 0x28 0x6b 0x03 0x00 0x31 0x51 0x30
; Print the symbol data in the symbol storage area
Output
• 2-dimensional GS1 DataBar: Print the symbol data in the symbol storage area
GS1 DataBar
cn = 51
Data
(1234567890123)
Command
0x1d 0x28 0x6B 0x03 0x00 0x33 0x43 0x03
; Set the size of module to 3
0x1d 0x28 0x6b 0x11 0x00 0x33 0x50 0x30 0x48 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38
0x39 0x30 0x31 0x32 0x33
; Store data in the symbol storage area
0x1d 0x28 0x6b 0x03 0x00 0x33 0x51 0x30
; Print data in the symbol storage area
Output
192
PROGRAMMING GUIDE
• DataMatrix: Print the symbol data in the symbol storage area
DataMatrix
cn = 54
Data
(123456789012345678901234567890)
Command
0x1D 0x28 0x6B 0x05 0x00 0x36 0x42 0x00 0x16 0x16
; Set the symbol type, number of columns, number of rows
0x1D 0x28 0x6B 0x03 0x00 0x36 0x43 0x04
; Set the size of the module
0x1D 0x28 0x6B 0x21 0x00 0x36 0x50 0x30
; Store the data in the symbol storage area
"123456789012345678901234567890"
0x1D 0x28 0x6B 0x03 0x00 0x36 0x51 0x30
; Print the symbol data in the symbol storage area
0x1D 0x28 0x6B 0x03 0x00 0x36 0x52 0x30
; Transmit the size information of the symbol data in the symbol storage area
Output
193
PROGRAMMING GUIDE
Diagnostics
10. Offline Diagnostic
10.1
Offline Printer Configuration
It configures the printer by Feed Key operation in offline mode.
When the printer is turned on while Feed Key is pressed down, it enters Offline Printer Configuration
mode. In this mode, all the interfaces are not available.
Service Menu Structure – Main Menu
1
Main Menu
Exit/save
2
Print Self test
3
Diagnostic
4
Configuration
5
Information
Exit menu
Printout Selftest,
Return to Main Menu
1
2
3
4
5
6
1
2
3
4
5
6
Diagnostic
Exit
Rolling Pattern Test
Sensor Test
Black Mark Test
Cutter Test (Full Cut)
Cutter Test (Partial Cut)
Configuration
Exit/Save
Hardware
Software
Print Options
Configuration & Counters
RS232 Communication /
Ethernet Settings
Information
1
2
3
4
5
Exit
Print Installed Code page
Print Code Pages
Print Statistic Report
Print Extended Self Test
194
PROGRAMMING GUIDE
Main Menu / Diagnostic
1
2
Diagnostic
Exit
Rolling Pattern Test
3
Sensor Test
4
Black Mark Test
5
Cutter Test(Full Cut)
6
Cutter Test(Partial
Cut)
1
2
3
4
5
6
7
Rolling Pattern Test
Exit
Print Pattern Once
Print Pattern Unlimited
Print Pattern 10 Times
Print Pattern 50 Times
Print Pattern 100 Times
Print Pattern 500 Times
Start Sensor Test
Start Black Mark Test
195
1
2
3
4
5
6
7
Cutter Test Full Cut
Exit
Perform Single Cut
Perform Unlimited Cuts
Perform 10 Cuts
Perform 50 Cuts
Perform 100 Cuts
Perform 500 Cuts
1
2
3
4
5
6
7
Cutter Test Partial Cut
Exit
Perform Single Cut
Perform Unlimited Cuts
Perform 10 Cuts
Perform 50 Cuts
Perform 100 Cuts
Perform 500 Cuts
PROGRAMMING GUIDE
Main Menu / Configuration / Hardware
1
2
Hardware
Exit/Save
Power Button
3
Max. Power
4
Black Mark Sensor
5
Sleep Mode
1
2
3
Power Button
Exit
Enable Button
Disable Button
1
2
3
4
5
6
7
Max. Power
Exit
Set Max. Power to Auto
Set Max. Power to 48W
Set Max. Power to 55W
Set Max. Power to 75W
Set Max. Power to 90W
Set Max. Power to 110W
1
2
3
Black Mark Sensor
Exit
Enable Black Mark Sensor
Disable Black Mark Sensor
1
2
Sleep Mode
Exit/Save
Sleep Mode Enable/Disable
3
Sleep Mode Time
4
Sleep Mode Interface Power
On/Off
Sleep Mode Cash Drawer
Delay
5
**
**
**
Sleep Mode Enable /
Disable
1
2
3
1
2
3
4
5
6
7
Exit
Enable Sleep Mode
Disable Sleep Mode
Sleep Mode Time
Exit
Endless
10 sec
30 Sec
1 min
10 min
30 min
Sleep Mode Interface
Power On/Off
1 Exit
2 Set Sleep Mode
Interface Power On
3 Set Sleep Mode
Interface Power Off
Sleep Mode Cash
Drawer Delay
1 Exit
2 0 sec
3 0.5 sec
4 1 sec
5 1.7 sec
6 2.5 sec
7 5 sec
196
**
**
**
**
PROGRAMMING GUIDE
Main Menu / Configuration / Software
1
2
3
4
5
6
7
Diagnostic
Exit
Power-ON
Notice
Paper-NE
Notice
Automatic Line
Feed
Legacy Printer
Support
Listen To
RT-Cmds
Asian font
Power-ON notice
1
2
3
Exit
Transmit
Don’t Transmit
**
1
2
3
Paper-NE Notice
Exit
Enable Paper-NE Notice
Disable Paper-NE Notice
**
1
2
3
Automatic Line Feed
Exit
Enable Automatic Line Feed
Disable Automatic Line Feed
1
2
3
Legacy Printer Support
Exit
Enable Legacy Printer Support
Disable Legacy Printer Support
1
2
3
Listen To RT-Cmds
Exit
Listen To RT-Cmds-Always
Listen To RT-Cmds-BufNotFull
1
2
3
4
5
6
7
Asian font
Exit
Japanese
Disable
Chinese
Korean
Big5+HKSCS
GB18030
197
**
**
**
**
PROGRAMMING GUIDE
Main Menu / Configuration / Print Options
1
2
3
Hardware
Exit/Save
Print Speed
Paper Width
4
Paper Type
5
Print Density
6
Color Print Density
7
Auto Recovery
8
Receipt Shooting
1
2
3
PaperWidth
Exit
58mm
80mm
1
2
3
Paper Type
Exit
Single Color
Two Color
1
2
3
4
5
6
7
Print Density
Exit
50%
70%
85%
100%
115%
130%
1
2
3
4
5
6
7
Color Print Density
Exit
50%
70%
85%
100%
115%
130%
1
2
3
4
Auto Recovery
Exit
Off
Without Clearing
With Clearing
1
2
Receipt Shooting
Exit
Receipt Shooting
Enable/Disable
3
Receipt Shooting Time
**
**
1
2
3
4
5
6
7
8
9
Print Speed
Exit
1.5 IPS
2 IPS
4 IPS
6 IPS
8 IPS
10 IPS
12 IPS
14 IPS
**
**
**
Receipt Shooting
Enable/Disable
1 Exit
2 Enable Receipt
Shooting
3 Disable Receipt
Shooting
Receipt Shooting Time
1 Exit
2 Endless
3 2 Sec
4 5 Sec
5 10 Sec
6 30 Sec
7 60 sec
198
**
**
**
PROGRAMMING GUIDE
Main Menu / Configuration / Print Options
1
2
Configuration & Counters
Exit
Set Configuration to Default
Main Menu / Configuration / RS232
1
2
Diagnostic
Exit
Baud Rate
Baud Rate
Exit
9600 bps
19200 bps
38400 bps
57800 bps
115200 bps
**
**
3
Parity
4
Flow Control
5
Bit Length
1
2
3
4
5
6
6
Receive Buffer
Capacity
Receive Error
Handling
Print Settings
1
2
3
4
Parity
Exit
No Parity
Even Parity
Odd Parity
1
2
3
Flow Control
Exit
DTR/DSR
XON/XOFF
1
2
3
Bit Length
Eixt
7 Bits
8 Bits
7
8
**
**
Receive Buffer Capacity
1 Exit
2 Set Capacity to 64KB **
3 Set Capacity to 45
Byte
1
2
3
Data Reception Error
Exit
Replace Data with ‘?’ **
Ignore Data
Print out RS232 Settings
199
PROGRAMMING GUIDE
Main Menu / Configuration / Ethernet Settings
1
2
Diagnostic
Exit
DHCP
1
2
3
200
DHCP
Exit
Enable DHCP
Disable DHCP
**
PROGRAMMING GUIDE
Diagnostic - Menu
Every diagnostic function will be explained in the table below.
Menu
Description
NO.
3.1
Exit/Save
3.2
Rolling Pattern Test
The rolling pattern menu allows you to print out a
rolling pattern in numerous ways.
You can print it out once, endless, which will be
interrupted by a long click of the LF button, and a
predefined number of times
3.3
Sensor Test
This function shows the sensor changes
The Sensor Test can be stopped by pushing the
Linefeed button once for a long time (> 1 second).
Afterwards a SW reset is executed.
3.4
Black Mark Test
In this menu the black mark test can be choose
3.5
Cutter Test(Full Cut)
The cutter test performs some cutter operations for a
predefined number of times.
In endless mode, the test will be interrupted by a long
click of the LF button.
For every cut there will be a notice on the generated
ticket which gives information about the current
number of cuts and the total number of cuts.
3.6
Cutter Test(Partial Cut)
This test is the same like the cutter test (full cut), but
the printer performs a series of partial cuts.
Available Options
1, 10, 50, 100, 500,
endless
1, 10, 50, 100, 500,
endless
1, 10, 50, 100, 500,
endless
Configuration - Menu
In this menu section is it possible to change some printer parameter. It is very important to know what
effects the change of a value. The procedure to save settings should be read to leave this menu, choose
“Exit/Save”.
Hardware
Menu
Description
NO.
4.2.1
Exit/Save
4.2.2
Power Button
Select the function of the power
button. If the power button is
disabled, the printer can’t shut off by
the user.
4.2.3
Max. Power
Select the maximum of power what
the printer consume.
4.2.4
Black Mark Sensor
Select the usage of the black mark
sensor. Be sure that there is black
marked paper inside. Otherwise, a
black mark error will occur. In this
case is the only way to set all
Configuration Data to default.
4.2.5
Sleep Mode
4.2.5
Sleep Mode Enable/Disable
Enable or disable the Sleep Mode
Available Options
Enable Button, Disable Button
Auto, 48 W, 55 W, 75 W, 90 W, 110 W
Enable Black Mark Sensor,
Disable Black Mark Sensor
Enable Sleep Mode,
Disable Sleep Mode
201
PROGRAMMING GUIDE
4.2.5.2 Sleep Mode Time
The minimum time to switch
automatically in Sleep Mode
4.2.5.3 Sleep Mode Interface Power On/Off
The state on power for cash drawer
during Sleep Mode
4.2.5.4 Sleep Mode Cash Drawer Delay
The minimum time between leaving
Sleep Mode and opening cash
drawer
4.2.5.5
Endless, 10 sec, 30 sec,
1 min, 10 min, 30 min
Set Sleep Mode Interface Power On,
Set Sleep Mode Interface Power Off
0 sec, 0.5 sec, 1 sec,
1.7 sec, 2.5 sec, 5 sec
202
PROGRAMMING GUIDE
Software
Menu
Description
Nr.
4.3.1
Exit
Exit this menu level and give a save
request, if there are unsaved
changes.
4.3.2
Power-ON Notice
Select a power up notification on the
communication interface
4.3.3
Paper-NE Notice
Select the usage of the
Paper-Near-End Sensor. If Paper-NE
notification is disabled, the printer
doesn’t transmit the PNE state by
ASB or state request (ESC v)
4.3.4
Automatic Line Feed
Generate a line feed after receiving
<CR>.
4.3.5
Legacy Printer Support
Enable this to fully support Windows
printer support driver (e. g.
Usbprint.sys). Following changes in
the printer behavior will be made:
- printer doesn't accept data while
receive buffer is full (none data loss)
- in case of USB interface a fixed
(virtual) serial number is exposed to
the host to avoid multiple printer
installations
4.3.6
Listen To RT-Cmds
Behavior of the printer regarding
Real Time Commands. When set to
always to printer listen always to Real
Time Commands. When set to
BufNotFull the printer listen only to
Real Time Commands when the
receive buffer is not full.
4.3.7
Asian font
Select Asian font type for double
byte character code when select
Asian character mode <FS &>.
Available Options
Transmit,
Don’t Transmit
Enable Paper-NE Notice,
Disable Paper-NE Notice
Enable Automatic Line Feed,
Disable Automatic Line Feed
Enable Legacy Printer Support,
Disable Legacy Printer Support
Listen To RT-Cmds – Always,
Listen To RT-Cmds – BufNotFull
Japanese
Disable
Chinese
Korean
Big5+HKSCS
GB18030
203
PROGRAMMING GUIDE
Print Options
In this menu section is it possible to change some printer parameter. It is very important to know what
effects a change of a value. The procedure to save settings should be read.
To leave this menu, choose “Exit/Save”.
Menu
Nr.
4.4.1
Description
Available Options
Exit
Exit this menu level and give a save
request, if there are unsaved
changes.
4.4.2
Print Speed
2 IPS
Set the maximum of print speed for
4 IPS
power consumption and print quality. 6 IPS
8 IPS
10 IPS
12 IPS
14 IPS
4.4.3
Paper Width
58mm
Set the used paper width.
80mm
4.4.4
Paper Type
Single Color,
Set the used paper type. This value
Two Color
will be valid without a software reset.
4.4.5
Print Density
50%, 70%, 85%, 100%, 115%,
Set the print density for different
130%
paper types
4.4.6
Color Print Density
50%, 70%, 85%, 100%, 115%,
Set the color print density for the
130%
second color if used a two color
paper.
4.4.7
Auto Recovery
Off,
Selects if and how the printer
Without Clearing,
automatic recovers from an error.
With Clearing
4.4.8
Receipt Shooting
Select the usage of the P1200
Receipt Shooting.
4.4.8.1 Receipt Shooting Enable/Disable
Enable Receipt Shooting,
Enable or disable Receipt Shooting. Disable Receipt Shooting
4.4.8.2 Receipt Shooting Time
Endless, 2 sec, 5 sec, 10 sec, 30
Defines the flush time for the Receipt sec, 60 sec
Shooting memory.
Configuration & Counters
Menu
Nr.
4.5.1
4.5.2
Description
Available Options
Exit
Exit this menu level and give a save
request, if there are unsaved
changes.
Set Configuration to Default.
204
PROGRAMMING GUIDE
RS232 Configuration
In this configuration menu, you can configure the parameters for use with one RS232 communications
Interface. This interfaces boards are available with different options.
This menu is available with RS232 option card.
Menu
Nr.
4.6.1
4.6.2
4.6.3
4.6.4
4.6.5
4.6.6
4.6.7
4.6.8
Description
Available Options
Exit
Exit this menu level and gives a save
request, if there are unsaved
changes.
Baud Rate
Select the baud rate for serial
communication.
Parity
Select the data parity for serial
communication.
Flow Control
Select the flow control for serial
communication.
Bit Length
Select data bit length for serial
communication.
Receive Buffer Capacity
Select the receive buffer capacity
Receive Error Handling
Select how the printer will react to a
receive error.
Print Settings
Prints the actual (in Non-Volatile
memory stored) settings for the serial
communications interface (RS232)
[9600, 19200, 38400, 57600,
115200 ] bps
No Parity, Even Parity, Odd
Parity
DTR/DSR, XON/XOFF
7 Bits, 8 Bits
Set Capacity to 64 KB,
Set Capacity to 45 Byte
Replace Data with ‘?’, Ignore
Data
Ethernet Configuration
In this configuration menu, you can configure the parameters for use with a Ethernet communication
interface.
Menu
Nr.
4.6.1
4.6.2
Description
Available Options
Exit
Exit this menu level and gives a save
request, if there are unsaved
changes.
DHCP
Enable the “Dynamic Host
Configuration Protocol” to use a
automatically assign of IP address
and other configuration information.
Enable DHCP,
Disable DHCP
205
PROGRAMMING GUIDE
Information - Menu
Menu
Nr.
5.1
5.2
5.3
5.4
5.5
5.6
5.7
Description
Available Options
Exit
Exit this menu level.
Print Installed Code Pages
That prints a printout with printer data
and an overview of installed
codepages.
Print Code Pages
That prints a collection of printouts of
all chars of installed codepages.
Print Statistic Report
That prints a printout with printer data
and statistic data.
Print Extended Self Test
That prints the extended self test with
all printer data.
Print Example
That prints a small demo printout with
capabilities of the P1200.
Help
Prints a short instruction for use the
service menu.
206
PROGRAMMING GUIDE
10.2
P1200 Diagnostic Functions
Diagnostic
Function
Selftest
Sensor test
Configuration
to default
Black Mark
Test
10.2.1
Description
Selection
Printout printer info, settings and
statistic data.
Allow to test sensor functions.
• Entering diagnostic mode
• Diagnostic mode menu
• LED diagnostic menu
Set some settings in EEPROM to
• Diagnostic mode menu
default.
• LED diagnostic menu
Test the function of black mark control. Diagnostic mode menu
Selftest Printout
Availability
Hardware
Information’s
RS232 settings
Ethernet settings
Software Modules
Asia Font
Printer settings
Sensor Information’s
Measured values
Installed codepages
Statistic report
Pixel Test
Remarks :
Short self
test
Service
menu 2
X
Extended
self test
Service
menu 5.5
X
(X)*
(X)*
X
(X)
X
(X)**
X
(X)*
(X)*
X
(X)
X
(X)**
X
X
X
X
X
Statistic
report
Service
menu 5.4
X
Installed
codepages
Service
menu 5.2
X
X
X
(X)* - available only with selected interface board
(X)** - advanced information’s available only if black mark sensor enabled
207
PROGRAMMING GUIDE
Printer Configuration form indicates the printer individual information and configurations.
P1200
Extended
Self Test
Hardware Information :
Manuf acturer
: DIEBOLD-NIXDORF
Serial number
: 1234567890
Manuf actured Board : A
Production Data
: DD-MMM-Y Y YY
Print head ty pe
:1
Interf ace Board
: USB (High-speed)
RS232
Cash Drawer
It is shown if
RS232 card is
installed.
It is shown if
Ethernet card
is installed.
RS232 Settings :
Parameter
Handshake
Receiv e Buffer
Receiv e Error
: 19200 – 8N1
: DTR/DSR
: Large (64KB)
: Ignore
Interface (Ethernet)
MAC address
: xx.xx.xx.xx.xx.xx
IP address
: 192.168. 1. 1
Subnet Mask
: 255.255.255. 0
Def ault Gateway :
0. 0. 0. 0
TCP Port Number : 9100
UDP Port Number : 3000
RTC Protocol
: TCP
DHCP
: Enable
DHCP request address: 192. 168. 2. 1
TCP max. connection
:1
Phy sical LAN Speed
: Auto
Link Down Timeout: 120 min
TCP Idle Timeout : 2 min
SNMP Trap 1 : Disable
Trap 1 IP Address : 192. 168. 1.111
SNMP Trap 2 : Disable
Trap 1 IP Address : 192. 168. 1.222
Software Modules :
Firmware
: xx.xx
Booter
: xx.xx
Loader
: xx.xx
Status
Verified
Character Font
: StdCodePages
Font Version
: xx.xx
Asia f ont
: Japanese
Font Version
: xx.xx
Installed font
: Japanese
Chinese
Korean
Big5+HKSCS
GB18030
Table
: xx.xx
Printer Settings :
Emulation
Black Mark Sensor
Automatic LF
Power Button
Power-ON Notice
Paper-NE Notice
Receipt Shooting
Shoot Flush Time
Sleep mode
Max. Power
Max. Speed
Paper Width
Print Density
Paper Ty pe
Paper Mode
Code-128 ChkDigit
TIF Leading Zero
Brc String Term
Leg. Printer Supp.
Listen to RT-Cmds
Def ault Code Page
Autorecovery
Orig.-Controller
: TH230
: disabled
: enabled
: enabled
: don’t transmit
: enabled
: disabled
: enabled
: disabled
: 110W
: 14IPS
: 80mm
: 100%
: Single color
: Mode 0
: enabled
: enabled
: enabled
: disabled
: alway s
: PC437
: off
: y es
Sensor information :
Sensor Plug Detection
Black Mark Sensor : available
Paper NE setting :
Paper core diameter : 18mm
Paper thickness
: 0.06mm
Length adjustment : 0m
1
OFF TH LED
Paper Low : 3.3V, 0.0V, 1.7V, 0.5V
Paper Jam : 3.2V, 0.6V, 1.4V, 0.5V
Black Mark : 3.2V, 0.6V, 1.4V, 0.5V
Sensor Level ON
Measured Values :
Supply Voltage
: 24V
Printhead Temp : xx.x ‘C
Next page.
208
It shows when Black mark
sensor is “available”
PROGRAMMING GUIDE
Installed Code Pages :
0
: PC437
1
: PC850
2
: PC852
3
: PC860
4
: PC863
5
: PC865
6
: PC858
7
: PC866
8
: WPC1252
9
: PC862
10
: PC737
11
: PC874
12
: PC857
13
: WPC1251
14
: WPC1255
15
: KZ 1048
16
: WPC1254
17
: WPC1250
18
: WPC28591
19
: WPC28592
20
: WPC28599
21
: WPC28605
22
: PC864
23
: PC720
24
: WPC1256
25
: WPC28596
26
: KATAKANA
27
: PC775
28
: WPC1257
29
: WPC28594
30
: WPC1253
Statistic Report :
Dots Total
Dots Actual
Printhead Changes
Linef eeds Total
Linef eeds Actual
Mechanic Changes
Cuts Total
Cuts Actual
Cutter Changes
Cutter Errors
Max. Head Temp.
Black Mark Error
Thermistor Error
Low Volt. Error
High Volt. Error
Cover Open
FW Starts
Power On (Hours)
EEPROM Updates
EEPROM Status
:0
:0
:0
:0
:0
:0
:0
:0
:0
:0
: 35℃
:0
:0
:0
:0
:0
:1
:1
:5
: OK
Pixel Test :
There are three ways to print Printer Configuration Form in 8.13 LPI.
209
PROGRAMMING GUIDE
1) If the cover is closed while Feed Key is pressed down, it prints this form.
2) If “Print Printer Config.” is selected at Top Menu of the offline diagnostics, it prints this form.
3) If “Print Printer Configuration Form” command (0x1F 0x74) is received, it prints this form.
Before it prints Printer Configuration Form, it performs the dot failure detection in order to update the
latest dot status.
10.2.2
Sensor Test
This function shows the sensor changes. If at least one sensor status is changing, the green and red
LED toggles.
The sensor test can be stopped by pushing the linefeed button once for a long time (> 1 second).
Afterwards a software reset is executed.
10.2.3
Black Mark test
The printer moves the paper to the next black mark, prints three lines, moves the paper until the next
black mark is underneath the cutter (one Form Feed) and cuts the paper. After this operation, the paper
is moved backwards to the first print position (top of form).
This test is repeated continuously and can be stopped by pushing the Linefeed button once.
210
PROGRAMMING GUIDE
Printer Errors
11. Error Detection
The followings are errors and warnings detected in this printer.
1) Unrecoverable Error
Those are very critical errors that the printer may not be functional at all and may require the repair.
Once those errors are detected, it is not able to recover from an error condition unless the printer is
reset. Even if the printer is reset, it will probably detect the same error.
2) Recoverable Error
There are two types of the recoverable errors. One is to require the operator intervention to recover it.
Once an operator takes a proper action, it will be recovered go to online.
Another one is that it automatically recovers from the error condition. It does not require any operator
intervention.
This error is internally cleared by force regardless of the printer condition when the cover is opened and
closed or when Error Recovery command (Real Time Request to Printer) is received. However, it will
be detected once again if no proper action was taken.
3) Warning
It does not affect any printer functionality. Once some of those are detected, the printer just indicates
this by status and LED. It behaves as usual even if a warning is detected.
Error/Warning
Unrecoverable Error
Boot Up
Memory Error
Thermal Head Abnormal Temperature1
Recoverable Error (operator intervention is required)
Paper Jam
Cutter Error
Cover Open
Idle
Print
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Paper End
Black Mark
Ο
Recoverable Error (operator intervention is not required)
Thermal Head Disconnected
Thermal head over heat2
Warning (This w ill not affect any printer functionality.)
Paper low
24V anomaly
Online Diag.
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Ο
Sensor Calibration fail
Memory Error
RAM Error: If there is a failure in terms of iRAM / DRAM access during the power up or during the
memory test of the online diagnostics, it is detected as Memory Error.
ROM Error: If there is a failure in terms of the flash memory access during the power up or during the
memory test of the online diagnostics, it is detected this as Memory Error.
The printer is not able to recover from this error condition unless the printer is turned off. Even if it is
rebooted, there is a high possibility that same error is detected because this is the fatal error.
Thermal Head Abnormal Temperature Error
When the printer observes that the thermal head temperature is too high, it is detected as Thermal
Head Abnormal Temperature Error. If this error is detected while printing data, it immediately stops
1
If the thermal head temperature is more than 90 degree C, this error is detected.
If the thermal head temperature is more than 65 degree C, it suspends printing data to cool down the head, and
it resumes printing once it becomes less than 55 degree C.
2
211
PROGRAMMING GUIDE
printing.
The printer is not able to recover from this error condition unless the printer is turned off. Even if it is
rebooted, there is a high possibility that same error is detected because this is the fatal error.
Paper Jam Error
When the printer recognizes that the paper is rolled up into the platen, it is detected as Paper Jam
Error. If this error is detected while printing data, it immediately stops printing.
Once the paper rolled up into the platen is taken away and the cover is closed properly then, this error
is cleared.
Cutter Error
While performing the cut, if one of the following abnormal behaviors is observed, the printer
immediately executes the cutter exercise..
 Cutter did not leave the home position even if the certain period has passed.
 Cutter did not return to the home position within the certain period.
In addition, the cutter exercise is executed during the printer power up if the cutter is not at the home
position. It is also conducted if the cover is closed in the cutter error condition.
During the exercise, if s the following unexpected behavior is observed, it indicates the cutter error.
1) Cutter does not leave the home position: If it recognizes that the cutter is still at the home after
the certain period, it is detected as the cutter error.
2) Cutter does not return to the home position: If it recognizes that the cutter is not able to return
to the home position within the certain period, it is detected as the cutter error.
Once the cover is opened and closed during cutter error status, the cutter error will clear and then
perform cutter exercise. However, the same error may occur in the cutter exercise triggered by closing
the cover unless the inducement of the cutter error is eliminated.
Note:
Even if the cutter overshoots (cannot stop at) the home position while performing cut, it is not
considered as the abnormal condition as long as returning to the home position is recognized.
Cover Open Error
When the printer recognizes that the cover sensor implies the cover open, it is detected as Cover Open
Error. If this error is detected while printing data, it immediately stops printing.
Once the cover is closed properly, this error is cleared.
Paper End Error
When the printer recognizes that the paper end sensor implies the paper end, it is detected as Paper
End Error. If this error is detected while printing data, it immediately stops printing.
Once a paper roll is supplied and the cover is closed properly, this error is cleared.
Thermal Head Disconnected Error
When the printer observes that the thermal head temperature is too low, it is detected as Thermal Head
Disconnected Error. This error is checked whenever the printer starts printing data.
Once this error is detected, the printer does not start printing until the thermal head temperature
becomes the normal condition. Once it is recovered, this error is automatically cleared and it restarts
printing. This error is cleared by opening/closing the cover. However it may detect the same error
before printing data if the error condition is not recovered.
Thermal head over heat
When the printer observes that the thermal head temperature is higher than the certain temperature, it
is detected as Thermal head over heat. This error is checked whenever the printer starts printing data.
Once this error is detected, the printer does not start printing until the thermal head temperature
becomes lower than the certain temperature. Once it is cooled down and reaches the certain
temperature, this error is automatically cleared and it restarts printing. This error is cleared by
opening/closing the cover. However it may detect the same error before printing data if the error
condition is not recovered.
212
PROGRAMMING GUIDE
12. LED Indication
11.1
LED Pattern in Auto Mode
This is the default LED pattern in “Auto Mode” which printer itself controls LED according to the printer
status. This pattern can be changed by LED configuration command.
Stage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Printer Status
Boot Up
Idle
Printing1
(Reserved)
(Reserved)
(Reserved)
Online Firmw are Update
Standby mode
(Reserved)
Unrecoverable error in PCB block
Unrecoverable error in Thermal Head
(Reserved)
(Reserved)
(Reserved)
(Reserved)
(Reserved)
(Reserved)
(Reserved)
(Reserved)
Recoverable error in Thermal Head (Cool Dow n,
Disconnected)
Recoverable error in Printer Cover
Recoverable error of Paper related
Recoverable error in Print block
Recoverable error in Cutter block
(Reserved)
(Reserved)
(Reserved)
(Reserved)
(Reserved)
Warning for PCB
Warning for Paper related
Warning for not DN pow er supply
Cycle
NA
NA
NA
5 Hz
NA
2 Hz
2 Hz
2 Hz
Color
ALL
GREEN
GREEN
GREEN
GREEN
RED
RED
AMBER
Control
RED -> AMBER -> GREEN
ON
ON
BLINK
ON
1 Blink Pause 5 seconds
2 Blink Pause 5 seconds
2 Blink Pause 5 seconds
2 Hz
2 Hz
2 Hz
2 Hz
2 Hz
2 Hz
2 Hz
AMBER
AMBER
AMBER
AMBER
GREEN
GREEN
GREEN
3 Blink
4 Blink
5 Blink
6 Blink
1 Blink
4 Blink
5 Blink
Pause
Pause
Pause
Pause
5 seconds
5 seconds
5 seconds
5 seconds
Pause 5 seconds
Pause 5 seconds
Pause 5 seconds
Basic policy of the default blinking pattern for errors/warnings in Auto Mode is as follows.
1) Red color is used for an unrecoverable error
2) Amber color is used for a recoverable error
3) Green color is used for warning
4) Blink cycle for errors/warnings is 2Hz
5) Number of blink of one cycle depends on the block where an error occurs.
- PCB
1 Blink
- Thermal Head
2 Blink
- Cover
3 Blink
- Paper block
4 Blink
- Print block
5 blink
- Cutter block
6 Blink
While updating the firmware in IPL mode, LED indication is as follows regardless of the mode.
a) While writing data into the flash memory: Green fast blink
b) While verifying data written into the flash memory: Red fast blink
It repeats the above sequence in each sector.
1
This LED pattern is valid with no Warning , In case printer have Warnning LED indicastion follow Warning.
213
PROGRAMMING GUIDE
11.2
LED Pattern in User Mode
When the printer is configured to “User Mode”, a system controls LED by “LED Control Request” command
according to the printer status. The printer itself does not control the LED at all.
For example, if a system recognizes that the cover is opened, it may send LED Control Request command
(1D 7A 25) so that LED starts blinking RED in 3Hz.
Once it recognizes that the cover is closed, it may send LED Control Request command (1d 7A 07) to turn
off the red blinking and to turn on the green to indicate that the printer is in online.
LED blinking pattern of each ID can be changed by LED configuration command if there are no blinking
patterns in the default blinking pattern which a system expects.
ID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Color
Green
Green
Green
Green
Green
Green
Green
Green
Green
Green
NA
Amber
Amber
Amber
Amber
Amber
Amber
Amber
Amber
Amber
Amber
NA
Red
Red
Red
Red
Red
Red
Red
Red
Red
Red
Pattern
Blink
Blink
Blink
Blink
Blink
Blink
ON
Blink
Blink
Blink
OFF
ON
Blink
Blink
Blink
Blink
Blink
Blink
Blink
Blink
Blink
OFF
ON
Blink
Blink
Blink
Blink
Blink
Blink
Blink
Blink
Blink
Cycle (Hz)
3 Hz
3 Hz
3 Hz
3 Hz
3 Hz
3 Hz
NA
1 Hz
3 Hz
5 Hz
NA
NA
1 Hz
3 Hz
5 Hz
3 Hz
3 Hz
3 Hz
3 Hz
3 Hz
3 Hz
NA
NA
1 Hz
3 Hz
5 Hz
3 Hz
3 Hz
3 Hz
3 Hz
3 Hz
3 Hz
Control
1 Blink Pause 3 seconds
2 Blink Pause 3 seconds
3 Blink Pause 3 seconds
4 Blink Pause 3 seconds
5 Blink Pause 3 seconds
6 Blink Pause 3 seconds
Keep ON
Blink continuously
Blink continuously
Blink continuously
OFF
Keep ON
Blink continuously
Blink continuously
Blink continuously
1 Blink Pause 3 seconds
2 Blink Pause 3 seconds
3 Blink Pause 3 seconds
4 Blink Pause 3 seconds
5 Blink Pause 3 seconds
6 Blink Pause 3 seconds
OFF
Keep ON
Blink continuously
Blink continuously
Blink continuously
1 Blink Pause 3 seconds
2 Blink Pause 3 seconds
3 Blink Pause 3 seconds
4 Blink Pause 3 seconds
5 Blink Pause 3 seconds
6 Blink Pause 3 seconds
214
PROGRAMMING GUIDE
Ethernet
Ethernet interface is available when Ethernet option card is connected to printer.
13. Web setting page
Printer supports setting change via web page.
It requires “User name” and “Password” to login web setting page.
( default value is “admin” for both User name and password)
: IP address for DHCP “Disable”
: Subnet mask setting
: default gateway setting
: DHCP enable/disable option
: IP address request for DHCP
: Printer host name.






IP Address
Subnet mask
Default gateway
DHCP
DHCP request IP
Host name





Number of TCP connection
Time out. (link down)
Time out. (Idle)
TCP port
UDP port
: Maximum number of TCP connection
: Time out for TCP port close by Link down. (1-120 minutes)
: Time out for TCP port close by idle. (1-120 minutes)
: Port number for TCP communication.
: Port number for UDP communication.
 MAC address
 Physical layer
: MAC address.
: Auto / 100Mbps full / 100Mbps Half / 10Mbps full / 10Mbps Half
 User
 Password
: User name to login web setting page.
: Password to login web setting page.
215
PROGRAMMING GUIDE








SNMP
Read/Write
TRAP 1
IP address
Community name
TRAP 1
IP address
Community name
: “Enable”, “Disable” SNMP functionality.
: Community name for SNMP.
: “Enable” “Disable” for TRAP 1.
: IP address for Trap 1
: Community name for Trap1
: Enable” “Disable” for TRAP 2.
: IP address for Trap 2
: Community name for Trap2
216
DIEBOLD NIXDORF
5995 Mayfair Road | North Canton, OH 44720 | United States
© 2021 Diebold Nixdorf, Incorporated. All Rights Reserved.

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement