Th230 Programmers Guide English
Th230 Programmers Guide English
Th230 Programmers Guide English
POS Printer
_______________________________________________________________________
Your opinion:
POS Printer
Programmers Guide
July 2013
All brand and product names mentioned in this document are registered trademarks of the
respective owners.
The reproduction, transmission or use of this document or its contents is not permitted without
express authority. Offenders will be liable for damages. All rights, including rights created by
patent grant or registration of a utility model or design, are reserved.
Delivery subject to availability; technical modifications possible.
Overview
Purpose of this document
This Programmers Guide describes the properties of the controller for the high speed ESC-
POS thermal printer TH230/TH230+.
Introduction
The TH230 and the TH230+ are powerful and low cost thermal printers for all kind of POS
systems.
In this manual both printers will be referred to as TH230. Only in case of essential
differences there will be a distinction between TH230 and TH230+.
1
Programmers Guide TH230/TH230+
• High Print speed: up to 220 mm/s (110 mm/s with two color paper)
• Thermal print line: 80mm width, 640 Dots, 203 dpi (0.125 mm) resolution
• Paper feed with Stepper motor, vertical resolution: 203 dpi (0.125 mm)
• Fast Cutter with Stepper motor and Home Sensor (cutting time is 300 ms)
2
TH230/TH230+ Programmers Guide
Line feed
The line feeds of the TH230 printer are initiated by the control commands LF and ESC d.
The line spacing between 2 lines can be set by the control command ESC 3. The default
value after reset or power on is 3.37 mm, which equals 27 micro steps. One micro step
equals one dot distance of 1/203”.
3
Programmers Guide TH230/TH230+
Offline State
If the TH230 printer leaving the online state, nevertheless it responds to all real time
commands and real time status commands. Sending other data than real time commands
may lead to data loss (see memory switch 2-8 Listen to Real-Time-Commands).
Low / High
Automatic
Offline Voltage recoverable
Online Paper End Offline
Error error
User inserts
new paper
Character >= Space, User inserts
Linefeed or Cut received new paper
printer (DLE ENQ n)
Real time request to
Recoverable
Error
er
int
pr
the
ro r
Er ro
Er
/on
r)
ist ble
off
rm ra
tch
or
he ve
Cutter
i
Sw
(T eco
Error
r
Un
Offline Offline
Remark: If the printer enters Offline State the Busy bit is set (see commands DLE EOT, GS
ENQ and GS a).
4
TH230/TH230+ Programmers Guide
Operator Panel
The Operator Panel consists of one button and three LED’s. In addition there is one power
button to switch the printer on and off. In the following description, you can see which
function of the printer influence the LED’s and which functions are executed with the
buttons:
Linefeed Button
If you push this button once and release it, the printer executes a small paper feed. If you
push this button and hold it down, the printer feeds the paper as long as the button isn’t
released.
This button is also used in the self-test printing see chapter Print Service Menu on page
246.
This LED is also used in the Diagnostic mode (see page 246).
This LED is also used in the Diagnostic mode (see page 246).
This LED is also used in the Diagnostic mode. For an exact description of this LED see page
246 and page 287.
5
Programmers Guide TH230/TH230+
Sleep Mode
The Sleep Mode is used to save energy when the printer is switched on but has nothing to
print. This mode reduces the Total Cost of Ownership (TCO). Sleep Mode is switched on by
a Memory Switch. The Sleep Mode Waiting Time is set by a Customized Setting Value and
defines the time; the printer has to wait before it changes into Sleep Mode.
In the following state diagram the coherence between the different modes is described.
Print data
received or Printing or
Linefeed Linefeed
button stops
pressed
(X - 5)* seconds
Power button after Ready or
pressed for more Command ESC w n c
than 3 seconds (ASB IDLE ON)
Sleep Mode 1
5 seconds after
entering from
Status Ready Mode
command or last
received or command
Cover open finished
Sleep Mode 0
In previous models and firmware versions Sleep was called Idle and Ready was called
Standby. The terms are changed because of adaption on ENERGY STAR® nomenclature.
The current consumptions depend on different modes and the installed interface. Find
details in chapter “Technical Specifications”, page 282.
6
TH230/TH230+ Programmers Guide
24V = ON
and Power Button is enabled
24V = OFF and Printer was ON before
and Printer = OFF
24V = ON 24V = ON
and Power Button and Power Button is enabled
is disabled and Printer was OFF before
24V = ON
and Printer = OFF
24V = ON
24V = OFF and Power Button is enabled
and press Power Button
24V = ON
24V = ON and hit Power Button for 3 seconds
and Printer = ON and (Power Button is enabled
or unrecoverable error
or undefined firmware)
24V = ON
and DLE SO
and DLE SO is enabled
24V = ON
and Printer = OFF
24V = ON
and press Power Button 24V = ON
and Power Button is enabled and press Power Button
and Power Button is disabled
You will find additional information about “Power off control by host” on page 9.
7
Programmers Guide TH230/TH230+
Programming Hints
In this chapter programmers may find some hints and tricks to make the thermal printout
faster, look better or increase the lifetime of the thermal print head.
8
TH230/TH230+ Programmers Guide
1) Transmits the following continuous procedure before the system is turned off.
- Execute the last print command such as LF, ESC d, etc.
- Execute GS (D pL pH m a b (pL=3, m = pH =0, m =20, a =2, b =1)
- Execute GS r n (n =1)
2) Waits for the paper sensor status from the printer by the GS r n command.
ESC L
Standard Page mode
mode ESC S, FF
9
Programmers Guide TH230/TH230+
10
TH230/TH230+ Programmers Guide
Absolute origin
Graphics
TEXT
Caution:
A graphics will be print with a count of print buffer
Graphics buffer 3
Absolute origin
Graphics buffer 2
If no space to the upper edge for printing the graphics completely, the upper part
of the graphics will be cut.
If the print position in page on the upper edge (depend on print direction (ESC T)),
the print position will be set down with the height of the print buffer. Graphics
which are built with more than one buffer will be cut.
For printing graphics in page, take care for the space to the upper edge and to
upper print lines! If is the space to low, set with GS $ or GS \ the print position to a
better point.
The absolute origin for positioning the print buffer depends on the print direction
(set with ESC T).
11
Programmers Guide TH230/TH230+
Positioning with Left to Right printing Positioning with Top to Bottom printing
x
y
TEXT
Graphics
y
TEXT
x
Graphics
Positioning with Bottom to Top printing Positioning with Right to Left printing
Graphics
x
TEXT
TEXT
Graphics
y
y
x
Barcode
Barcode can be used in Pagemode with limitations. Barcodes can only be print at start of
line, that’s why horizontal position commands do not work with barcode. For positioning
barcodes, ESC W is useable.
12
TH230/TH230+ Programmers Guide
Control Sequences
Control Characters and Control Sequences
The valid control characters are located in the code area below 20H. These are the
characters LF, FF, GS, DLE and ESC. All other control characters are not valid, and are
ignored by the controller.
The valid control characters (with the exception of ESC, GS and DLE) are single character
control commands, and directly start control functions.
ESC, GS and DLE are always the start of a multi-character control command, which consists
of a different number of characters after ESC, GS and DLE. They only perform the
requested command if the complete character string is valid. The whole control string will
be ignored if a wrong (not valid) character is found in the string. The next character is than
interpreted as the start of a new command.
13
Programmers Guide TH230/TH230+
Command Overview
14
TH230/TH230+ Programmers Guide
ESC ? Cancel user-defined characters 53
ESC @ Initialize printer 54
ESC D Set horizontal tab positions 55
ESC E Turn emphasized mode on/off 56
ESC G Turn double-strike mode on/off 56
ESC I Turn italic print mode on/off 57
ESC J Print and feed paper 57
ESC K Select Single-Density Graphics 58
ESC L Select page mode 59
ESC R Select an international character set 59
ESC S Select standard mode 60
ESC T Select print direction in page mode 61
ESC V Turn 90° clockwise rotation mode on/off 62
ESC W Set printing area in page mode 63
ESC Y Select Double-Density Graphics 64
ESC [ ! t Set control point 65
ESC \ Set relative print position 66
ESC a Select justification 67
ESC c 3 Select paper sensor(s) to output paper-end signals 67
ESC c 4 Select paper sensor(s) to stop printing 68
ESC c 5 Enable/disable feed button 69
ESC d Print and feed n lines 70
ESC i Full cut 70
ESC j Read from Non-Volatile Memory 71
ESC l Start firmware upgrade mode 71
ESC m Partial cut 71
ESC p Generate pulse 72
ESC r Set current color 73
ESC s Write to Non-Volatile Memory (NVRAM) 73
ESC t Select character code table 74
ESC u Transmit Peripheral Device Status 75
ESC v Transmit paper sensor status 76
ESC w n 7 Receipt shooting flush 77
ESC w n 8 Play melody from flash 77
ESC w n b Special Wincor barcode parameter 78
ESC w n c Switch the printer into Sleep-Mode. 78
ESC { Turn upside-down printing mode on/off 79
FS ! (Asia version) Select print mode(s) for Kanji characters 81
FS & (Asia version) Select Kanji character mode 81
FS - (Asia version) Turn underline mode on/off for Kanji characters 82
FS . (Asia version) Cancel Kanji character mode 82
FS 2 (Asia version) Define user-defined Kanji characters 83
FS C (Asia version) Select Kanji character code system 84
FS S (Asia version) Set Kanji character spacing 84
15
Programmers Guide TH230/TH230+
FS W (Asia version) Turn quadruple-size mode on/off for Kanji characters 85
GS ETX Real time request to printer 85
GS EOT Real time status transmission 85
GS ENQ Real time printer status transmission 86
GS ! Select character size 87
GS “ Select memory type (SRAM/Flash) 88
GS “ U Flash Memory User Sectors Allocation 89
GS # Select the Current Logo 90
GS $ Set absolute vertical print position in page mode 91
GS ( A Executes test and diagnosis functions 92
GS ( D Enable/disable real-time command 93
GS ( E Customize NV memory 94
Function 1 Changes into the user setting mode. 96
Function 2 Ends user setting mode session. (Performs a software reset.) 97
Function 3 Changes the memory switch. 98
Function 4 Transmits the host the value for the memory switch. 101
Function 5 Changes the customized setting values. 102
Function 6 Transmits the customized setting values. 109
Function 11 Sets communication condition of serial interface. 114
Function 12 Transmits communication condition of serial interface. 116
Function 129 Set serial number 117
Function 130 Set production date 117
Function 131 Sets communication condition of Ethernet interface. 118
Function 132 Transmits communication condition of Ethernet interface. 119
GS ( FGS ( FGS ( Set adjustment value(s) 120
FGS ( FGS ( F
GS ( L Specify graphics data 122
Function 48 Sends the entire capacity of NV graphics domains. 126
Function 51 Sends the available capacity of NV graphics memory. 127
Function 64 Sends the key code list for defined NV graphics. 129
Function 65 Performs batch deletion of all NV graphics data. 130
Function 66 Deletes the specified NV graphics data. 131
Function 67 Defines (in raster format) NV graphics data. 132
Function 69 Prints the specified NV graphics. 134
GS * Define downloaded bit image 142
GS / Print downloaded bit image 143
GS : Start/end macro definition 145
GS @ Erase User Flash Sector 146
GS B Turn white/black reverse printing mode on/off 147
GS H Select printing position of HRI characters 148
GS I Transmit printer ID 149
GS L Set left margin 153
GS P Set horizontal and vertical motion units 154
GS V Select cut mode and cut paper 155
GS W Set printing area width 157
GS \ Set relative vertical print position in page mode 158
GS ^ Execute macro 159
16
TH230/TH230+ Programmers Guide
GS a Enable/disable Automatic Status Back (ASB) 160
GS b Turn smoothing mode on/off 163
GS f Select font for HRI characters 163
GS g 0 Initialize maintenance counter 164
GS g 2 Transmit maintenance counter 166
GS h Set bar code height 168
GS k Print bar code 169
GS p Select PDF 417 parameters 183
GS r Transmit status 185
GS w Set bar code width 187
GS 0x81 Set paper type 188
GS 0x82 Print raster monochrome graphics 189
GS 0x83 Print raster color graphics 189
GS 0x84 Download logo image 190
GS 0x8D Text strike-through mode 191
GS 0x8E Download paper type description 192
GS 0x8F Return paper type description 193
GS 0xA0 Set temporary max target speed 193
GS 0xFF Reset firmware 194
US EOT Convert 6-dots/mm bitmap to 8-dots/mm bitmap 194
US ENQ Select superscript or subscript modes 194
US t Print Test Form 195
US V Send printer software version 195
US z Real time commands disabled 195
Print commands
LF Print and line feed 23
FF (1) Print and return to standard mode (in page mode) 24
FF (2) Print and feed marked paper to print starting position 24
CR Print and carriage return 25
NAK Feed n Dot Rows 32
SYN Add n Extra Dot Rows 33
ESC FF Print data in page mode 36
ESC J Print and feed paper 57
ESC d Print and feed n lines 70
17
Programmers Guide TH230/TH230+
Character commands
DC2 Select Double-Wide Characters 31
DC3 Select Single-Wide Characters 32
CAN Cancel print data in page mode 34
ESC DC2 Select 90 Degree Counter-Clockwise Rotated Print 36
ESC SP Set right-side character spacing 38
ESC ! Select print mode(s) 39
ESC $ Set absolute print position 40
ESC - Turn underline mode on/off 48
ESC ? Cancel user-defined characters 53
ESC E Turn emphasized mode on/off 56
ESC I Turn italic print mode on/off 57
ESC G Turn double-strike mode on/off 56
ESC R Select an international character set 59
ESC V Turn 90° clockwise rotation mode on/off 62
ESC r Set current color 73
ESC t Select character code table 74
ESC { Turn upside-down printing mode on/off 79
GS ! Select character size 87
GS B Turn white/black reverse printing mode on/off 147
GS b Turn smoothing mode on/off 163
GS 0x8D Text strike-through mode 191
US ENQ Select superscript or subscript modes 194
18
TH230/TH230+ Programmers Guide
Status commands
DLE EOT Real time status transmission 26
ESC [ ! t Set control point 65
ESC u Transmit Peripheral Device Status 75
ESC v Transmit paper sensor status 76
GS I Transmit printer ID 149
19
Programmers Guide TH230/TH230+
Kanji commands
FS ! (Asia version) Select print mode(s) for Kanji characters 81
FS & (Asia version) Select Kanji character mode 81
FS - (Asia version) Turn underline mode on/off for Kanji characters 82
FS . (Asia version) Cancel Kanji character mode 82
FS 2 (Asia version) Define user-defined Kanji characters 83
FS C (Asia version) Select Kanji character code system 84
FS S (Asia version) Set Kanji character spacing 84
FS W (Asia Turn quadruple-size mode on/off for Kanji characters 85
version)
20
TH230/TH230+ Programmers Guide
Customize commands
ESC ‘ Write to User Data Storage 43
ESC 4 Read from User Data Storage 51
ESC : Copy Character Set from ROM to RAM 51
ESC j Read from Non-Volatile Memory 71
ESC s Write to Non-Volatile Memory (NVRAM) 73
GS ( E Customize NV memory 94
GS “ Select memory type (SRAM/Flash) 88
GS “ U Flash Memory User Sectors Allocation 89
Function 1 Changes into the user setting mode. 96
Function 2 Ends user setting mode session. (Performs a software reset.) 97
Function 3 Changes the memory switch. 98
Function 4 Transmits the host the value for the memory switch. 101
Function 5 Changes the customized setting values. 102
Function 6 Transmits the customized setting values. 109
Function 11 Sets communication condition of serial interface. 114
Function 12 Transmits communication condition of serial interface. 116
Function 129 Set serial number 117
Function 130 Set production date 117
Function 131 Sets communication condition of Ethernet interface. 118
Function 132 Transmits communication condition of Ethernet interface. 119
GS ( F Set adjustment value(s) 120
GS @ Erase User Flash Sector 146
GS 0x8E Download paper type description 192
GS 0x8F Return paper type description 193
Control commands
ESC = Select peripheral device 52
ESC @ Initialize printer 54
ESC l Start firmware upgrade mode 71
ESC w n 7 Receipt shooting flush 77
ESC w n c Switch the printer into Sleep-Mode. 78
GS 0xFF Reset firmware 194
Pagemode
CAN Cancel print data in page mode 34
ESC FF Print data in page mode 36
ESC L Select page mode 59
ESC S Select standard mode 60
ESC T Select print direction in page mode 61
ESC W Set printing area in page mode 63
GS $ Set absolute vertical print position in page mode 91
GS \ Set relative vertical print position in page mode 158
21
Programmers Guide TH230/TH230+
Resolution
GS P Set horizontal and vertical motion units 154
Real Time
DLE Clear printer 25
DLE EOT Real time status transmission 26
DLE ENQ Real time request to printer 29
DLE SO (fn = 2) Turn off the power 30
GS ETX Real time request to printer 85
GS EOT Real time status transmission 85
GS ENQ Real time printer status transmission 86
GS ( D Enable/disable real-time command 93
Statistics
GS g 0 Initialize maintenance counter 164
GS g 2 Transmit maintenance counter 166
Test
GS ( A Executes test and diagnosis functions 92
US t Print Test Form 195
US z Real time commands disabled 195
Ignored Commands
The following commands are ignored:
DLE; ESC c 0; ESC c 1; ESC c 3; ESC c 6; ESC j; ESC s
22
TH230/TH230+ Programmers Guide
LF
Function: Print and line feed
Code ASCII: LF
Code HEX: 0x0A
Description: Prints the data in the print buffer and feeds one line.
Notes: • If auto linefeed enabled, command is ignored after CR.
• The amount of paper fed per line is based on the value set using the line
spacing command ESC 2 (see page 49), or ESC 3 (see page 50).
• After printing, the printing position moves to the beginning of the line.
When a left margin is set in standard mode, the position of the left
margin is the beginning of the line.
• When this command is processed in page mode, only the printing
position moves, and the printer does not perform actual printing.
• When the origin of layout is selected to bottom of label or top of black
mark in standard mode and a paper feed amount that exceeds the
remaining printable area of the label is sent, the printer executes one of
the following:
- If the printer will print a line that is higher than the remaining printable
area of the label, the printer feeds the label to the next print starting
position and the printer executes this command.
23
Programmers Guide TH230/TH230+
• - If the printer will print in the remaining printable area of the label, but
the feed amount exceeds the remaining printable area of the label, the
FF
Function: (1) Print and return to standard mode (in page mode)
Code ASCII: FF
Code HEX: 0x0C
Description: In page mode, prints the data in the print buffer collectively and returns to
standard mode.
Notes: • This command is enabled only in page mode.
• The data is deleted in the printing area after being printed.
• This command returns the values set by ESC W to the default values.
• The value set by ESC T is maintained.
• 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.
FF
Function: (2) Print and feed marked paper to print starting position
Code ASCII: FF
Code HEX: 0x0C
Description: 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.
24
TH230/TH230+ Programmers Guide
CR
Function: Print and carriage return
Code ASCII: CR
Code HEX: 0x0D
Description:
When automatic line feed is When automatic line feed is
enabled disabled
Executes printing one line feed as LF This command is ignored
Notes: • After printing, the printing position moves to the beginning of the line.
When a left margin is set in standard mode, the position of the left
margin is the beginning of the line.
• When this command is processed in page mode, only the printing
position moves and the printer do not perform actual printing.
DLE
Function: Clear printer (This command is ignored)
Code ASCII: DLE
Code HEX: 0x10
Description: Clears the print line buffer without printing and sets the printer to the
following condition:
• Double-wide command (0x12) is canceled
• Line spacing, pitch and user-defined character sets are maintained at
current selections (RAM is not affected)
• Single-wide, single-high, non-rotated, and left-aligned characters are set
• Printer is restarted and error status is cleared in a fault condition
• Printing position is set to column one
• Knife is homed
Notes: • A DLE command followed by a 04 or 05 is interpreted as a “Real Time
Command”.
Reference: DLE ENQ, DLE EOT and DLE SO (fn = 2)
25
Programmers Guide TH230/TH230+
DLE EOT
Function: Real time status transmission
Code ASCII: DLE EOT n
Code HEX: 0x10 0x04 n
Range: 1≤n≤4
Description: Transmits 1 byte of status data specified in real time, using n as follows:
n Function
1 Transmit printer status
2 Transmit busy status
3 Transmit error status
4 Transmit paper roll sensor status
Notes: • This is a real-time command that the printer executes upon receiving it.
Take the following into consideration:
- If this command interrupts the code string of another command, this
command is processed as a parameter of the other command;
therefore, the print result will not be correct.
- If a command such as bit-image or defined data has a code string that
is the same as a code string in a parameter, the printer processes and
then continues with the bit-image or other command.
• This command is executed even when the printer is offline or an error
occurs.
• If the receive buffer is full the execution depends from Memory Switch
2-8 (Listen to Real-Time-Commands - see command GS ( E).
- If Memory Switch 2-8 is set to off (48): command is executed.
- If Memory Switch 2-8 is set to on (49): command is not executed.
• This command can be used when the printer is disabled by ESC =.
• When transmitting block data (Header ~ NUL), the status will be sent
after that.
• Each status equals 1 byte.
• This command can be disabled by US z (page 195).
• This command is identical to command GS EOT.
26
TH230/TH230+ Programmers Guide
n = 2 (busy status)
Value
Bit Function
0 1
0 Not used Fixed to 0
1 Not used Fixed to 1
2 Cover Closed Open
Paper feeding with paper Not during During paper
3
feed button paper feed feed
4 Not used Fixed to 1
Printing stop due to a No paper end
5 Printing stops
paper end stop
6 Recoverable Error No error Error occured
7 Not used Fixed to 0
Bit 5: Bit 5 becomes “1” as sensor of the roll paper detects the paper
not present made to the print stop.
Bit 6: Recoverable Error means Cover open, Paper out, Black mark
error, Cutter error.
n = 3 (error status)
Value
Bit Function
0 1
0 Not used Fixed to 0
1 Not used Fixed to 1
2 Undefined
Error
3 Cutter error No error
occurred
4 Not used Fixed to 1
5 Undefined
Error
6 Unrecoverable Error No error
occurred
7 Not used Fixed to 0
Bit 6: Thermistor error, High voltage error or Low voltage error.
Thermistor error is an unrecoverable error. High voltage error and
Low voltage error are automatic recoverable errors!
27
Programmers Guide TH230/TH230+
28
TH230/TH230+ Programmers Guide
DLE ENQ
Function: Real time request to printer
Code ASCII: DLE ENQ n
Code HEX: 0x10 0x05 n
Range: 1≤n≤2
Description: Responds to a request in real time from the host system. n specifies the
request as follows:
n Request
1 Restarts printing from the beginning of the line where an error
occurred, after recovering from the error.
2 Recover from an error after clearing the data in the receive
buffer and print buffers.
Notes: • This is a real-time command that the printer executes upon receiving it.
Note the following when using this command.
• If this command is embedded within the code string of another
command, it is processed as a parameter of the other command, and
the print result is not correct.
• If another command (such as bit image or defined data) has a code
string in a parameter that is the same as this command, the printer
starts processing this command.
• This command is executed even when the printer is offline
• If the receive buffer is full the execution depends from Memory Switch
2-8 (Listen to Real-Time-Commands - see command GS ( E).
- If Memory Switch 2-8 is set to off (48): command is executed.
- If Memory Switch 2-8 is set to on (49): command is not executed.
• When a recoverable error occurs, after removing the cause of the error,
the printer can recover from the error by transmitting DLE ENQ 1 or DLE
ENQ 2 without the printer being turned off.
• DLE ENQ 1 or DLE ENQ 2 is enabled only when a recoverable error
occurs, with the exception of an automatically recovered error, and is
ignored in other cases. Errors recoverable by DLE ENQ 1 or DLE ENQ 2
depend on the printer model.
• DLE ENQ 1 or DLE ENQ 2 is also executed to recover from a recoverable
error when the printer is disabled by ESC =.
• In page mode, if the printer recovers from a recoverable error by using
DLE ENQ 2, the printer returns to standard mode after clearing the data
in receive and print buffers and changing the values set by ESC W to the
default values.
• After processing DLE ENQ 2, the printing position is moved to the left
side of the printable area. Printer is in the status “beginning of the line,”
or “there is data in the print buffer.”
• If the value of n is out of the specified range, this command is ignored.
• A description of the different errors and the error blink patterns can be
found on page 285.
• This command can be disabled by US z.
29
Programmers Guide TH230/TH230+
Reference: Command GS ETX (see page 85); Table for the Transmit Status Identification
DLE SO (fn = 2)
Function: Turn off the power
Code ASCII: DLE SO fn a b
Code HEX: 0x10 0x0E 0x02 a b
Range: fn = 2
a=1
b=8
Description: Executes the following in a power-off sequence:
• Sends “Power off notice.”
• Wait for 250 ms.
• Turn off the printer
Notes: • You will find additional information about “Power off control by host”
on page 9).
• The behavior of the Power Button is described on page 7).
• This is a real-time command that the printer executes upon receiving it.
Note the following when using this command.
• If this command is embedded within the code string of another
command, it is processed as a parameter of the other command, and
the print result is not correct.
• If another command (such as bit image or defined data) has a code
string in a parameter that is the same as this command, the printer
starts processing this command.
• This command can be enabled or disabled by GS ( D (page 93) and US z
(page 195). The default value is disabled.
• The printer executes this command even when it is in offline or error
status.
• If the receive buffer is full the execution depends from Memory Switch
2-8 (Listen to Real-Time-Commands - see command GS ( E).
- If Memory Switch 2-8 is set to off (48): command is executed.
- If Memory Switch 2-8 is set to on (49): command is not executed.
• This command is effective when the printer is disabled by ESC = (select
peripheral device).
• All information and data stored in RAM will be deleted by processing this
command.
30
TH230/TH230+ Programmers Guide
• When the power is turned off, the printer transmits [header + status +
NUL] to the host.
Power off notice Hex Decimal Data
Header 0x3B 59 1 byte
Status 0x30 48 1 byte
NUL 0x00 0 1 byte
• The power-off notice can be differentiated from other transmission
data. When the data transmitted from the printer is
[Hex=0x3B/Decimal=59], the host should process 3 bytes of data up to
NUL as the notice from the printer. If the second byte is
[Hex=30H/Decimal=48], this is the power off notice. An exception is
described below:
• When the host is communicating with the printer by XON/XOFF
control, an XOFF code might interrupt [Header ~ NUL].
• In iPRINT this command leads to a virtual pressing of the power button.
Depending of the settings in the Operating System the behavior is
different (hibernation, power down, do nothing…). The TH230+ printer
part of the iPRINT system follows the achieved power state.
DC1
Function: Print raster monochrome graphics
Code ASCII: DC1 n1 … n72 (576 dots, 80 mm paper), or n51 (408 dots, 57.5 mm
paper)
Code HEX: 0x11 n1 … n72 (576 dots for 80 mm paper), or n51 (408 dots for 57.5 mm
paper)
Range: n1 to n72/n51 corresponds to one dot row data for a thermal receipt
printer
Description: This command is identical to command GS 0x82.
DC2
Function: Select Double-Wide Characters
Code ASCII: DC2
Code HEX: 0x12
Description: Prints double-wide characters. The printer is reset to single-wide mode
after a
line has been printed or the Clear Printer (0x10) command is received.
Double-wide characters may be used in the same line with single-wide
characters.
Reference: ESC ! (see page 39), GS !
31
Programmers Guide TH230/TH230+
DC3
Function: Select Single-Wide Characters
Code ASCII: DC3
Code HEX: 0x13
Description: Prints single-wide characters. Single-wide characters may be used in the
same line with double-wide characters.
Reference: ESC ! (see page 39), GS !
DC4
Function: Feed n Print Lines
Code ASCII: DC4 n
Code HEX: 0x14 n
Range: 0 ≤ n ≤ 255
Description: Feeds the paper n lines at the current line height without printing.
Notes: • This command is enabled only when processed at the beginning of the
line.
• New applications should use the command ESC d!
NAK
Function: Feed n Dot Rows
Code ASCII: NAK n
Code HEX: 0x15 n
Range: 0 ≤ n ≤ 255
Description: Feeds the paper n dot rows (n/8 mm, n/203 inch), without printing.
Notes: • Value of n: n/203 inch
• New applications should use the command ESC J.
32
TH230/TH230+ Programmers Guide
SYN
Function: Add n Extra Dot Rows
Code ASCII: SYN n
Code HEX: 0x16 n
Range: 0 ≤ n ≤ 16
Default: n = 3 extra dot rows
Description: Adds n extra dot rows (n/8 mm, n/203 inch) to the character height to
increase space between print lines or decrease the number of lines per inch.
The following table shows the relationship between the number of lines per
inch and each extra dot row added:
Extra Lines Per Dot Rows Extra Lines Per Dot Rows
Rows Inch Rows Inch
0 8.5 24 9 6.1 33
1 8.1 25 10 6.0 34
2 7.8 26 11 5.8 35
3 7.5 27 12 5.6 36
4 7.2 28 13 5.5 37
5 7.0 29 14 5.3 38
6 6.8 30 15 5.2 39
7 6.5 31 16 5.1 40
8 6.3 32
Notes: • New applications should use the command ESC 3 (see page 50)!
Reference: ESC 2 (see page 49), ESC 3 (see page 50)
ETB
Function: Print
Code ASCII: ETB
Code HEX: 0x17
Description: Prints one line from the buffer and feeds paper one line. Executes LF on
receipt.
Reference: LF (see page 23)
33
Programmers Guide TH230/TH230+
CAN
Function: Cancel print data in page mode
Code ASCII: CAN
Code HEX: 0x18
Description: In page mode, deletes all the print data for the current printing area.
Notes: • This command is enabled only in page mode
• If data set in the previously specified printing area is set in the currently
specified printing area, it is deleted.
EM
Function: Full cut
Code ASCII: EM
Code HEX: 0x19
Description: This command is the same like ESC i (see page 70).
Notes: • WINCOR NIXDORF suggests using the newer command GS V (see page
155) to cut the receipt.
• If not at beginning of line, a linefeed will be done
SUB
Function: Partial cut
Code ASCII: SUB
Code HEX: 0x1A
Description: This command is the same like ESC m (see page 71).
Notes: • WINCOR NIXDORF suggests using the newer command GS V (see page
155) to cut the receipt.
• If not at beginning of line, a linefeed will be done
34
TH230/TH230+ Programmers Guide
35
Programmers Guide TH230/TH230+
ESC BEL
Function: Generate tone
Code ASCII: ESC BEL
Code HEX: 0x1B 0x07
Description: Generates an audible tone. Performed by the printer to signal certain
conditions.
Notes: • If you use ESC BEL after a print instruction, the printer generates the
audible tone not until print completion. Thus, the tone is synchronized
with printing.
ESC FF
Function: Print data in page mode
Code ASCII: ESC FF
Code HEX: 0x1B 0x0C
Range: None
Description: In page mode, prints all buffered data in the printable area collectively.
Notes: • This command is enabled only in page mode.
• After printing, the printer does not clear the buffered data, the printing
position, or values set by other commands.
• The printer returns to standard mode with FF, ESC S, and ESC @. When it
returns to standard mode by ESC @, all settings are cancelled.
ESC DC2
Function: Select 90 Degree Counter-Clockwise Rotated Print
Code ASCII: ESC DC2
Code HEX: 0x1B 0x12
Description: Rotates characters 90 degrees counter-clockwise. The command remains in
effect until the printer is reset or until a Init printer (0x1B 0x40) or Cancel
Rotated Print (0x1B 0x56) command is received.
36
TH230/TH230+ Programmers Guide
ESC DC4
Function: Set Column
Code ASCII: ESC DC4 n
Code HEX: 0x1B 0x14 n
Range: 1 ≤ n ≤ 45 (Standard pitch)
1 ≤ n ≤ 56 (Compressed pitch)
Default: n=1
Description: Prints the first character of the next print line in column n. This command
must be sent for each line not printed at column one. The value of n is set
to one after each line.
Notes: • If the value of n is out of the specified range, the command is ignored
and the value of n is set to one.
• Double width: This command prints the first character of the print line
depending of the actual font. Therefore this command is not influenced
by the Double with command (ESC !) or the Select character size
command (GS !).
ESC SYN
Function: Select Pitch (Column Width)
Code ASCII: ESC SYN n
Code HEX: 0x1B 0x16 n
Range: 0≤n≤1
n = 0 (Standard pitch = Font A)
n = 1 (Compressed pitch = Font B)
Default: n = 0 (Standard pitch)
Description: The following table provides the print characteristics for both pitches on the
receipt station.
Pitch Dots Columns Columns CPI
80 mm Paper 57.5 mm
Paper
Standard (Font A) 13 x 44 31 15.6
24
Compressed (Font 10 x 57 40 20.3
B) 24
Notes: • This command and the command ESC ! affect pitch selection.
37
Programmers Guide TH230/TH230+
ESC SP
Function: Set right-side character spacing
Code ASCII: ESC SP n
Code HEX: 0x1B 0x20 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Sets the right-side character spacing to n × (horizontal or vertical motion
unit).
Notes: • The right-side character spacing set by this command is effective for all
characters (except for HRI characters).
• When characters are enlarged, the right-side character spacing is n
times normal value. The right-side character spacing for double-width
mode is twice the normal value.
• When standard mode is selected, the horizontal motion unit is used.
• When page mode is selected, the vertical or horizontal motion unit is
used for the print direction set by ESC T.
• When the starting position is set to the upper left or lower right of the
printing area using ESC T, the horizontal motion unit is used.
• When the starting position is set to the upper right or lower left of the
printing area using ESC T, the vertical motion unit is used.
• The right-side character spacing can be set independently in standard
mode and in page mode.
• This command is used to change the spacing between characters.
• GS P specifies the vertical or horizontal motion unit.
• The settings of this command are effective until ESC @ is executed, the
printer is reset, or the power is turned off.
• Changes in the horizontal or vertical units do not affect the current right
side character spacing.
38
TH230/TH230+ Programmers Guide
ESC !
Function: Select print mode(s)
Code ASCII: ESC ! n
Code HEX: 0x1B 0x21 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Selects or cancels print modes collectively (Emphasized, Double-height,
Double-width, Underline) using n as follows:
Value
Bit Function
0 1
0 Selected character font Font A Font B
1 Undefined - -
2 Undefined - -
3 Emphasized mode Disabled Enabled
4 Double-height mode Disabled Enabled
5 Double-width mode Disabled Enabled
6 Undefined - -
7 Underline mode Disabled Enabled
Notes: • Functions for each bit can also be executed by the following commands:
• Bit 0 (Character font): ESC SYN
• Bit 3 (Emphasized mode): ESC E
• Bit 4, 5 (Character size): GS !,
DC2,
DC3
• Bit 7 (Underline mode): ESC -
• The print modes set by this command are effective for all characters
(except for HRI characters).
• When some characters in a line are double-height, all characters on the
line are aligned at the baseline.
• When double-width mode is turned on, the characters are enlarged to
the right, based on the left side of the character.
• When both double-height and double-width modes are turned on,
quadruple size characters are printed.
• In standard mode, the character is enlarged in the paper feed direction
when double-height mode is selected, and it is enlarged perpendicular
to the paper feed direction when double-width mode is selected.
• However, when character orientation changes in 90° clockwise-
rotated mode, the relationship between double-height and double-
width is reversed.
• In page mode, double-height and double-width are on the character
orientation.
39
Programmers Guide TH230/TH230+
• The settings of this command are effective until ESC @ is executed, the
printer is reset, or the power is turned off.
• The emphasized mode is not effective if smooth mode on (GS b)
ESC $
Function: Set absolute print position
Code ASCII: ESC $ nL nH
Code HEX: 0x1B 0x24 nL nH
Range: 0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
Default: nL + nH × 256 = 0
Description: Sets the print starting position to ( nL + nH × 256) × (horizontal or vertical
motion unit) from the beginning of the line.
Notes: • The printer ignores any setting that exceeds the printing area.
• When standard mode is selected, the horizontal motion unit is used.
• When page mode is selected, the horizontal or vertical motion unit is
used for the print direction set by ESC T.
• When the starting position is set to the upper left or lower right of the
printing area using ESC T, the horizontal motion unit is used.
• When the starting position is set to the upper right or lower left of the
printing area using ESC T, the vertical motion unit is used.
• Even if the vertical or horizontal motion unit is changed after changing
the printing position, the setting of the printing position will not be
changed.
• Even if underline mode is turned on, the underline will not be printed
under the space skipped by this command.
• The vertical or horizontal motion unit is specified by GS P.
40
TH230/TH230+ Programmers Guide
ESC %
Function: Select/cancel user-defined character set
Code ASCII: ESC % n
Code HEX: 0x1B 0x25 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Selects or cancels the user-defined character set.
• When the LSB of n is 0, the user-defined character set is cancelled.
• When the LSB of n is 1, the user-defined character set is selected.
Notes: • When the user-defined character set is cancelled, the resident character
set is automatically selected.
• Settings of this command are effective until ESC @ is executed, the
printer is reset, or the power is turned off.
ESC &
Function: Define user-defined characters
Code ASCII: ESC & y c1 c2 [x1 d1…d(y * x1)] … [xk d1 ... d(y * xk)]
Code HEX: 0x1B 0x26 0x03 c1 c2 [x1 d1…d(y * x1)] … [xk d1 ... d(y * xk)]
Range: y=3
32 ≤ c1 ≤ c2 ≤ 255
0 ≤ x ≤ 16
0 ≤ d ≤ 255
k = c2 – c1 + 1
Description: Defines user-defined characters from character code check c1 to c2.
• y specifies the number of bytes in the vertical direction.
• x specifies the number of dots in the horizontal direction.
• d is the dot data for the user-defined characters.
Notes: • Character codes from the alphanumeric characters (20H (decimal 32) to
FFH (decimal 255)) can be defined.
• Data d specifies a bit printed to 1 and not printed to 0. The dot pattern is
in the horizontal direction from the left side. Any remaining dots on the
right side are blank.
• The data to define a user-defined character is (y * x) bytes.
• When the value of y, c1, c2, or x is out of the range, this command is
cancelled, and the following data is processed as normal data.
• This command can define user-defined characters for each font (Font
A or Font B) independently. To select a font, use ESC !.
41
Programmers Guide TH230/TH230+
• Once the user-defined characters have been defined, depend from the
selected memory (GS “) they are stored in SRAM or in Flash. If the
character stored in SRAM, it will be available until ESC ?, or ESC @ is
executed the power is turned off; or the printer is reset.
• SRAM is always preferred against the Flash. The Flash works like a
backup medium for the SRAM (see 0)
0 1 … n
MSB
dk-
d1 d4 …
2
LSB
MSB
dk-
d2 d5 …
1
LSB
MSB
d3 d6 … dk
LSB
42
TH230/TH230+ Programmers Guide
ESC ‘
Function:
Code ASCII: ESC ‘ m a0 a1 a2 d1 ... dm
Code HEX: 0x1B 0x27 m a0 a1 a2 d1 ... dm
Range: 0 ≤ m ≤ 255
Default: None
Description: Writes m bytes of data to the User Data Storage Flash Page at the address
specified in a0 (MSB) to a2 (LSB). The printer waits for m bytes of data
following the 3-byte address.
Notes: • m = 0 equals 256 byte of data.
• If any of the memory locations addressed by this command are not
currently erased, the command is not executed.
• Result of this write is returned in bit 2 of response to transmit status
command 0x1D 0x72, n = 4.
43
Programmers Guide TH230/TH230+
ESC *
Function: Select bit-image mode
Code ASCII: ESC * m nL nH d1 ... dk
Code HEX: 0x1B 0x2A m nL nH d1 ... dk
Range: m = 0, 1, 32, 33, 49, 98
0 ≤ nL ≤ 255
0 ≤ nH ≤ 3
0 ≤ d ≤ 255
k = nL + nH × 256 [in case of m = 0, 1]
k = (nL + nH × 256) × 3 [in case of m = 32, 33]
Description: Selects a bit-image mode using m=0,1,32,33 for the number of dots
specified by (nL + nH × 256) as follows:
m Mode Number of Dot density Amount of data (
bits for in horizontal k)
vertical
data
0 8-dot single- 8 Single- nL + nH × 256
density density
1 8-dot double- 8 Double- nL + nH × 256
density density
32 24-dot single- 24 Single- (nL + nH × 256) × 3
density density
33 24-dot double- 24 Double- (nL + nH × 256) × 3
density density
49 Command ESC * 1 (see page 46)
98 Command ESC * b m (see page 47)
d indicates the bit image data.
If m=49, d1..dk defines a line graphics (see GS 0x83).
If m=62,
Notes: • Data d specifies a bit printed to 1 and not printed to 0.
• If the bit image data exceeds the number of dots to be printed on a line,
the excess data is ignored.
• The bit-image is not affected by print mode (emphasized, double-strike,
underline, character size, white/black reverse printing, or 90° clockwise-
rotated), except for upside-down printing mode.
• After printing a bit image, the printer processes normal data.
• This command is used to print a picture or logo.
• The relationship between the bit image data and the print result is as
follows.
44
TH230/TH230+ Programmers Guide
d3 d6 … dk
LSB LSB
Horizontal
Maximum
number of dots
Paper Paper
width width
Vertical Set 80 mm 57.5
dot Dot adjacent mm
m Mode density density dots 576 dot 408 dot
0 8-dot single- 203/3 203/2dpi Permitted 288 204
density dpi
1 8-dot 203/3 203 dpi Permitted 576 408
double- dpi
density
32 24-dot 203 dpi 203/2dpi Permitted 288 204
single-
density
33 24-dot 203 dpi 203 dpi Permitted 576 408
double-
density
When the starting position specified by ESC T is upper right or lower left in
page mode.
45
Programmers Guide TH230/TH230+
Vertical
Set Maximum Horizontal
Dot adjacent number dot
m Mode density dots of dots density
0 8-dot single- 203/2 Permitted 288 203/3 dpi
density dpi
1 8-dot double- 203 dpi Permitted 576 203/3 dpi
density
32 24-dot single- 203/2 Permitted 288 203 dpi
density dpi
33 24-dot double- 203 dpi Permitted 576 203 dpi
density
90° or 270° rotated bit-image data will be printed.
dpi: dots per 25.4 mm (dots per inch)
46
TH230/TH230+ Programmers Guide
• The driver has to send 148 nullbytes to the printer before the printer is
opened by the 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:
ESC * b m n
Function: Turn on/off TIFF compression
Code ASCII: ESC * b m n
Code HEX: 0x1B 0x2A 0x62 0x6d n
Range: n = 0, 2, 48, 50
Default: n=0
Description: Turns the TIFF compression on (n = 2, 50) or off. (n = 0, 48).
Notes: • Decompression is used by ESC * 1
• Decompression used TIFF 4.0 Packbits Decompression
47
Programmers Guide TH230/TH230+
ESC -
Function: Turn underline mode on/off
Code ASCII: ESC - n
Code HEX: 0x1B 0x2D n
Range: 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
Default: n=0
Description: Turns underline mode on or off using n as follows:
n Function
0, 48 Turns off underline mode
1, 49 Turns on underline mode (1-dot
thick)
2, 50 Turns on underline mode (2-dots
thick)
Notes: • The underline mode is effective for all characters (except for HRI
characters).
• When underline mode is turned on, 90° clockwise rotated characters
and white/black reverse characters cannot be underlined.
• The printer cannot underline the space set by HT, ESC $, and ESC \.
• In Asia version (FS & (Asia version)), changing the character size does not
affect the current underline thickness. Otherwise, underline thickness
grows with vertical charcter size.
• When underline mode is turned off, the following data cannot be
underlined, but the thickness is maintained.
• This command and bit 7 of ESC ! turn on and off underline mode in the
same way.
• The settings of this command are effective until ESC ! is executed, ESC @
is executed, the printer is reset, or the power is turned off
48
TH230/TH230+ Programmers Guide
ESC .
Function: Print Advanced Raster Graphics
Code ASCII: ESC . m n rL rH d1 … dn
Code HEX: 0x1B 0x2E m n rL rH d1 … dn
Range: 0 <= m <= 72
0 <= n <= 72
0 <= r <= 65535
0 <= d1 … dn <= 255
Description: Prints a horizontal raster of graphics data one or multiple times. Horizontal
offset and number of data bytes are variable and specified by parameters.
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 times the raster has to be printed = 256 x rH + rL
Notes: • Advanced Raster graphics is not available in Page Mode.
ESC 2
Function: Set line spacing to 1/6 inch
Code ASCII: ESC 2
Code HEX: 0x1B 0x32
Description: Sets the line spacing to 1/6 inch.
Notes: • The line spacing can be set independently in standard mode and in page
mode.
• Selected line spacing is effective until ESC 3 is executed, ESC @ is
executed, the printer is reset, or the power is turned off. When
underline mode is turned off, the following data cannot be underlined,
but the thickness is maintained.
• 1/6 inch is equivalent to 4.23 mm, which is equivalent to 34 dots.
• In contrast to this command the default line spacing is about 3.37 mm
(7.52 LPI), which is equivalent to 27 dots.
• When the maximum character height exceeds 27 dots in one line,
printer feeds the paper amount of height of the character when
changing lines in the standard mode.
• The linespacing will be set indipentendly from vertical motion unit (see
GS P).
Reference: SYN
49
Programmers Guide TH230/TH230+
ESC 3
Function: Set line spacing
Code ASCII: ESC 3 n
Code HEX: 0x1B 0x33 n
Range: 0 ≤ n ≤ 255
Default: Default line spacing is 3,33 mm (n = 54)
Description: Sets the line spacing to n × (vertical motion unit * 1/2).
Notes: • The unit of n parameter is an half of a full step. It means, n will be
divided by 2. n=1 means 0 fullsteps and the linespacing is 0.
• The maximum line spacing is 1016 mm (40 inches). If the specified
amount exceeds 1016 mm (40 inches), the line spacing is automatically
set to 1016 mm (40 inches).
• When standard mode is selected, the vertical motion unit is used.
• When page mode is selected, the vertical or horizontal motion unit is
used for the print direction set by ESC T.
• When the starting position is set to the upper left or lower right of the
printing area using ESC T, the vertical motion unit is used.
• When the starting position is set to the upper right or lower left of the
printing area using ESC T, the horizontal motion unit is used.
• The line spacing can be set independently in standard mode and in page
mode.
• When the motion unit is changed after the line spacing is set, the line
spacing setting does not change.
• Selected line spacing is effective until ESC 2 is executed, ESC @ is
executed, the printer is reset, or the power is turned off.
• The vertical or horizontal motion unit is specified by GS P.
• In standard mode, if the character height is greater than the line spacing
specified by this command, the paper is fed the amount of the character
height. For example, if a line spacing of 34 dots is specified with this
command, but the characters used are double height (48 dots), the
paper is fed 48 dots.
• When an amount of paper feed exceeding the maximum value is
specified, the maximum paper feed is executed.
• The vertical motion unit (see GS P) will not calculate for line spacing.
Reference: SYN, GS P
50
TH230/TH230+ Programmers Guide
ESC 4
Function: Read from User Data Storage
Code ASCII: ESC 4 m a0 a1 a2
Code HEX: 0x1B 0x34 m a0 a1 a2
Range: 0 ≤ m ≤ 255
Description: Reads m bytes of data from the user data storage flash page at the address
specified. Returns m bytes to the application, followed by a carriage return
(0x0D).
The high order byte of the address (a0) ranges from 0 to n2–1, with n2
specified in the flash allocation command. If the flash allocation command
has been used, the a0 = 0 always.
Notes: • If the range of requested data exceeds the sector boundary, the printer
will only send the data up to the sector boundary.
ESC :
Function: Copy Character Set from ROM to RAM
Code ASCII: ESC : 0 0 0
Code HEX: 0x1B 0x3A 0x30 0x30 0x30
Default: Current active ROM Code Page
Description: Copies characters in the active ROM set to RAM. Use this command to
reinitialize the User-Defined Character Set. Code Page 437 is copied by
default at initialization.
Notes: • This command is ignored if current font is the user font.
• To modify characters in one of the character set variations, such as
Rotated Print, select one of the Rotated Print commands, copy to RAM,
and then use the Define User-Defined Character Set command (0x1B
0x26).
51
Programmers Guide TH230/TH230+
ESC =
Function: Select peripheral device
Code ASCII: ESC = n
Code HEX: 0x1B 0x3D n
Range: 1≤n≤3
Default: n=1
Description: Selects the device to which the host computer sends data, using n as
follows:
n Function
1 Enables the printer
2 Enables the customer display
3 Enables the printer and customer
display
Notes: • When the printer is disabled, it ignores all received data and commands
with the exception of ESC = and real-time commands.
• If ASB is enabled when the printer is disabled by this command, the
printer transmits the ASB status message whenever the status changes.
ASB is specified by GS a.
• Settings of this command are effective until the printer is reset, the
power is turned off or ESC @ is executed (only when printer was
enabled by ESC =; otherwise the command ESC @ is send only to the
display),
• After ESC @ the default value (n = 1 = printer) is selected (only when
printer was enabled by ESC =; otherwise the command ESC @ is send
only to the display),
• This command is igored if the interface card of the printer is not
equipped with a customer display connector,
52
TH230/TH230+ Programmers Guide
ESC ?
Function: Cancel user-defined characters
Code ASCII: ESC ? n
Code HEX: 0x1B 0x3F n
Range: 32 ≤ n ≤ 255
Default: None
Description: Cancels the user-defined characters defined for the character code n.
Notes: • After the user-defined character is cancelled, the corresponding pattern
from current active ROM Code Page is printed.
• This command is ignored if n is out of range or if the user-defined
character is not defined.
• This command can cancel user-defined characters for each font
independently. To select a font, use ESC !.
• This command can cancel user-defined characters for each memory
destination independently. To select the memory destination of font,
use GS “.
53
Programmers Guide TH230/TH230+
ESC @
Function: Initialize printer
Code ASCII: ESC @
Code HEX: 0x1B 0x40
Range: None
Default: None
Description: The data in the print buffer is cleared, and the printer mode(s) is reset to
the mode that was in effect when the power was turned on.
• Any macro definitions are not cleared.
• Contents of user NV memory are not cleared.
• NV bit image is not cleared.
• Maintenance counter is not cleared.
Notes: • The data in the receive buffer is not cleared.
• When this command is processed in page mode, the printer deletes the
data in the printing areas, initializes all settings, and selects standard
mode.
• This command can cancel all the settings, such as print mode and line
feed, at the same time.
• The printing position moves to the beginning of the line when this
command is executed. When a left margin is set in standard mode, the
position of the left margin is the beginning of the line or there is no data
in the print buffer.
• The customer display is disabled.
• Real-time command enabled by GS ( D (see page 93) is disabled.
• Real-time command setting by command US z (see page 195) is not
affected by ESC @.
• Automatic Status Back (ASB) is switched off.
• SRAM-User-Font-Memory will be cleard and will be default destination
for user defined characters.
54
TH230/TH230+ Programmers Guide
ESC D
Function: Set horizontal tab positions
Code ASCII: ESC D n1 ... nk NUL
Code HEX: 0x1B 0x44 n1 ... nk NUL
Range: 1 ≤ n ≤ 255
0 ≤ k ≤ 32
Default: n = 8, 16, 24, 32, ... (Every eight characters for the default font set by ESC !
or ESC M)
Description: Sets a horizontal tab to n columns from the beginning of the line.
• k indicates the number of horizontal tab positions to be set.
Notes: • The horizontal tab position is stored as a value of [character width × n]
measured from the beginning of the line. Double-width characters are
selected with twice the width of normal characters. The character width
should be set before using this command.
• A maximum of 32 horizontal tab positions can be set. Data exceeding 32
horizontal tab positions is processed as normal data.
• This command cancels any previous horizontal tab settings.
• Transmit [n] k in ascending order and place a NUL code at the end. ESC
D NUL cancels all horizontal tab positions.
• k is not transmission data to the printer.
• Even if the character width is changed after setting the horizontal tab
positions, the setting of the horizontal tab positions will not be changed.
• Horizontal tab position settings are effective until ESC @ is executed, the
printer is reset, or the power is turned off.
• Print position can be changed by HT.
• When the left margin setting is changed, the horizontal tab position is
also changed.
55
Programmers Guide TH230/TH230+
ESC E
Function: Turn emphasized mode on/off
Code ASCII: ESC E n
Code HEX: 0x1B 0x45 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Turns emphasized mode on or off.
• When the LSB of n is 0, emphasized mode is turned off.
• When the LSB of n is 1, emphasized mode is turned on.
Notes: • The emphasized mode is effective for all characters (except for HRI
characters).
• The settings of this command are effective until ESC ! is executed, ESC @
is executed, the printer is reset, or the power is turned off.
• The emphasized mode is not effective if smooth mode on (GS b)
ESC G
Function: Turn double-strike mode on/off
Code ASCII: ESC G n
Code HEX: 0x1B 0x47 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Turns double-strike mode on or off.
• When the LSB of n is 0, double-strike mode is turned off.
• When the LSB of n is 1, double-strike mode is turned on.
Notes: • The double-strike mode is effective for all characters (except for HRI
characters).
• The settings of this command are effective until ESC ! is executed, ESC @
is executed, the printer is reset, or the power is turned off.
56
TH230/TH230+ Programmers Guide
ESC I
Function: Turn italic print mode on/off
Code ASCII: ESC I n
Code HEX: 0x1B 0x49 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Turns italic print mode on or off.
• When the LSB of n is 0, italic print mode is turned off.
• When the LSB of n is 1, italic print mode is turned on.
Notes: • The italic print mode is effective for all characters (except for HRI
characters).
• The settings of this command are effective until ESC @ is executed, the
printer is reset, or the power is turned off.
• The italic mode is not effective if smooth mode on (GS b)
ESC J
Function: Print and feed paper
Code ASCII: ESC J n
Code HEX: 0x1B 0x4A n
Range: 0 ≤ n ≤ 255
Default: None
Description: Prints the data in the print buffer and feeds the paper n × (vertical or
horizontal motion unit).
Notes: • The maximum paper feed amount is 1016 mm (40 inches). If the
specified amount exceeds 1016 mm (40 inches), the paper feed amount
is automatically set to 1016 mm (40 inches).
• When standard mode is selected, the vertical motion unit is used.
• When page mode is selected, the vertical or horizontal motion unit is
used for the print direction set by ESC T.
• When the starting position is set to the upper left or lower right of the
printing area using ESC T, the vertical motion unit is used.
• When the starting position is set to the upper right or lower left of the
printing area using ESC T, the horizontal motion unit is used.
• After printing, the printing position moves to the beginning of the line.
When a left margin is set in standard mode, the position of the left
margin is the beginning of the line.
• When this command is processed in page mode, only the printing
position moves, and the printer does not perform actual printing.
• This command is used to temporarily feed a specific length without
changing the line spacing set by other commands.
57
Programmers Guide TH230/TH230+
ESC K
Function: Select Single-Density Graphics
Code ASCII: ESC K n1 n2 d1 ... dn
Code HEX: 0x1B 0x4B n1 n2 d1 ... dn
Range: Value of n
Value of n (8- Value of d
Dot Single
Density Mode)
n1 + (256 x n2) Number of Bytes of Data
Description: Enters one line of 8-dot single-density graphics into the print buffer. Any
print command is required to print the line, after which the printer returns
to normal processing mode. Single-density mode allows 0-288 dot columns.
The number of bytes sent is represented by the formulas in the table.
Notes: • Each bit corresponds to two horizontal dots. Compare to Set Bit Image
Mode (0x1B 0x2A, m=0) earlier in this document.
58
TH230/TH230+ Programmers Guide
ESC L
Function: Select page mode
Code ASCII: ESC L
Code HEX: 0x1B 0x4C
Range: None
Default: None
Description: Switches from standard mode to page mode.
Notes: • This command is only enabled when processed at the beginning of the
line in standard mode. In other cases, this command is ignored.
• The printing position is the starting position specified by ESC T within the
printing area defined by ESC W.
• The following commands switch the settings for page mode because
these commands can be set independently in standard mode and in
page mode:
• ESC SP, SYN n, ESC 2 and ESC 3.
• The following commands are disabled in page mode.
• ESC L, GS ( E and GS ( L (part of functions).
• The following commands are not effective in page mode. If these
commands are processed in page mode, an internal flag is activated, and
this flag is enabled when the printer returns to standard mode.
• ESC V, ESC a, ESC {, GS L, and GS W
• The printer returns to standard mode with ESC S, FF, and ESC @. When it
returns to standard mode by ESC @, all settings are cancelled.
• Standard mode is selected as the default.
• In page mode, the printer prints the data in the print buffer for the
printing area specified by ESC W collectively by FF or ESC FF. When
executing the print and paper feed commands, such as LF, CR, ESC J, and
ESC d, only the printing position moves, and the printer does not
perform actual printing.
ESC R
Function: Select an international character set
Code ASCII: ESC R n
Code HEX: 0x1B 0x52 n
Description: This command is the same like ESC t (see page 74).
59
Programmers Guide TH230/TH230+
ESC S
Function: Select standard mode
Code ASCII: ESC S
Code HEX: 0x1B 0x53
Range: None
Default: None
Description: Switches from page mode to standard mode.
Notes: • This command is enabled only in page mode. Page mode can be selected
by ESC L.
• When this command is executed, data in all the printing areas is cleared,
the printing area set by ESC W returns to the default value, but the value
set by ESC T is maintained.
• The following commands switch the settings for standard mode because
these commands can be set independently in standard mode and in
page mode:
• ESC SP, ESC 2 and ESC 3.
• In standard mode, CAN, ESC FF, GS $, and GS \ are ignored.
• The settings of ESC T and ESC W do not affect printing in standard mode.
• Standard mode is selected as the default.
60
TH230/TH230+ Programmers Guide
ESC T
Function: Select print direction in page mode
Code ASCII: ESC T n
Code HEX: 0x1B 0x54 n
Range: 0 ≤ n ≤ 3, 48 ≤ n ≤ 51
Default: n=0
Description: In page mode, selects the print direction and starting position using n as
follows:
n Print direction Starting position
0, 48 Left to right Upper left (A in the
figure)
1, 49 Bottom to top Lower left (B in the
figure)
2, 50 Right to left Lower right (C in the Print direction A (n =
figure) 0) is the same like
3, 51 Top to bottom Upper right (D in the printing in standard
figure) mode.
Paper
moving
direction
Notes: • The print direction set by this command is effective only in page mode.
• This command setting has no effect in standard mode. If this command
is processed in standard mode, an internal flag is activated, and this flag
is enabled when the printer selects page mode.
• The parameters for the horizontal or vertical motion unit differ,
depending on the starting position of the printing area as follows:
• If the starting position is the upper left or lower right of the printing
area:
These commands use horizontal motion units: ESC SP, ESC $, ESC \
These commands use vertical motion units: ESC 3, ESC J, GS $, GS \
• If the starting position is the upper right or lower left of the printing
area:
These commands use horizontal motion units: ESC 3, ESC J, GS $, GS \
These commands use vertical motion units: ESC SP, ESC $, ESC \
• The settings of this command are effective until ESC @ is executed, the
printer is reset, or the power is turned off.
61
Programmers Guide TH230/TH230+
ESC V
Function: Turn 90° clockwise rotation mode on/off
Code ASCII: ESC V n
Code HEX: 0x1B 0x56 n
Range: 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
Default: n=0
Description: In standard mode, turns 90° clockwise rotation mode on or off, using n as
follows:
n Function
0, 48 Turns off 90° clockwise rotation mode.
1, 49 Turns on 90° clockwise rotation mode (1-dot character
2, 50 spacing).
Notes: • The 90° clockwise rotation mode is effective for all characters (except for
HRI characters) in standard mode.
• When underline mode is turned on, the printer does not underline 90°
clockwise-rotated characters.
• When character orientation changes in 90° clockwise rotation mode, the
relationship between vertical and horizontal directions is reversed.
• The 90° clockwise rotation mode 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.
• The settings of this command are effective until ESC @ is executed, ESC
DC2 is executed, the printer is reset, or the power is turned off.
62
TH230/TH230+ Programmers Guide
ESC W
Function: Set printing area in page mode
Code ASCII: ESC W xL xH yL yH dxL dxH dyL dyH
Code HEX: 0x1B 0x57 xL xH yL yH dxL dxH dyL dyH
Range: 0 ≤ xL xH yL yH dxL dxH dyL dyH ≤ 255
Default: Horizontal logical origin and vertical logical origin= 0
xL = 0, xH = 0, yL = 0, yH = 0
Printing area width and printing area height = entire printable area
dxL = 64, dxH = 2, dyL = 64, dyH = 2 (576x576 - 80 mm paper)
dxL = 152, dxH = 1, dyL = 64, dyH = 2 (408x576 - 57.5 mm paper)
63
Programmers Guide TH230/TH230+
ESC Y
Function: Select Double-Density Graphics
Code ASCII: ESC Y n1 n2 d1 ... dn
Code HEX: 0x1B 0x59 n1 n2 d1 ... dn
Range: Value of n
Value of n (8- Value of d
Dot Single
Density Mode)
n1 + (256 x n2) Number of Bytes of Data
Description: Enters one line of 8-dot double-density graphics into the print buffer. Any
print command is required to print the line, after which the printer returns
to normal processing mode. Double-density mode allows 0-576 dot
columns. The number of bytes sent is represented by the formulas in the
table.
Notes: • Each bit corresponds to one horizontal dot. Compare to Set Bit Image
Mode (0x1B 0x2A, m=1) earlier in this document.
64
TH230/TH230+ Programmers Guide
ESC [ ! t
Function: Set control point
Code ASCII: ESC [ ! t nL nH
Code HEX: 0x1B 0x5B 0x21 0x74 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” 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.
65
Programmers Guide TH230/TH230+
ESC \
Function: Set relative print position
Code ASCII: ESC \ nL nH
Code HEX: 0x1B 0x5C nL nH
Range: -32768 ≤ (nL + nH * 256) ≤ 32767 (0 ≤ nL ≤ 255, –128 ≤ nH ≤ 127)
Default: None
Description: Moves the print starting position to (nL + nH * 256) × (horizontal or vertical
motion unit) from the current position.
Notes: • The printer ignores any setting that exceeds the printing area.
• A positive number specifies movement to the right, and a negative
number specifies movement to the left. N pitch movement to the right:
(nL + nH * 256) = N. Use the complement of N for setting N pitch
movement to the left: (nL + nH * 256) = 65536 – N.
• When standard mode is selected, the horizontal motion unit is used.
• When page mode is selected, the horizontal or vertical motion unit is
used for the print direction set by ESC T.
• When the starting position is set to the upper left or lower right of the
printing area using ESC T, the horizontal motion unit is used.
• When the starting position is set to the upper right or lower left of the
printing area using ESC T, the vertical motion unit is used.
• Even if the vertical or horizontal motion unit is changed after changing
the printing position, the setting of the printing position will not be
changed.
• When underline mode is turned on, the underline will not be printed
under the space skipped by this command.
• The vertical or horizontal motion unit is specified by GS P.
• After command, printer is not at start of line, independent from given
value (nL + nH × 256)
66
TH230/TH230+ Programmers Guide
ESC a
Function: Select justification
Code ASCII: ESC a n
Code HEX: 0x1B 0x61 n
Range: 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
Default: n=0
Description: In standard mode, aligns all the data in one line to a specified position,
using n as follows:
n Justification
0, 48 Left justification
1, 49 Centered
2, 50 Right
justification
ESC c 3
Function: Select paper sensor(s) to output paper-end signals
Code ASCII: ESC c 3 n
Code HEX: 0x1B 0x63 0x33 n
Range: 0 ≤ n ≤ 255
Description: This command is ignored.
67
Programmers Guide TH230/TH230+
ESC c 4
Function: Select paper sensor(s) to stop printing
Code ASCII: ESC c 4 n
Code HEX: 0x1B 0x63 0x34 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Selects whether to stop printing or not when the paper runs out using n as
follows:
Value
Bit Function
0 1
0 Paper roll near end Disabled Enabled
sensor
1 Paper roll near end Disabled Enabled
sensor
2 Undefined - -
3 Undefined - -
4 Undefined - -
5 Undefined - -
6 Undefined - -
7 Undefined - -
Notes: • It is possible to select multiple sensors to stop printing. When any sensor
detects a paper-end, printing stops.
• The paper roll near-end sensor is enabled when either bit 0 or bit 1 is on
or both are on.
• To avoid false reports the paper near end sensor is monitored by a 0.2
m paper feed hysteresis. That means the printer does not report paper
near end to the host until 0.2 m paper is feed and all the time the paper
near end sensor detects no paper! If the linefeed button is pressed
within the hysteresis, the printer reports paper near end immediately.
• When a paper near-end is detected, printing stops after printing the
current line and feeding the paper.
• The printer goes offline and Paper LED comes on after printing stops. To
resume printing, cancel the “paper roll near-end” status by replacing the
paper roll.
• If the paper roll near-end sensor is disabled and a paper near-end is
detected, printing does not stop and the printer does not go offline, but
the Paper LED does come on.
• The paper roll end sensor is always enabled, and when it detects a
paper-end, the printer stops printing.
• When a paper roll near-end or a paper roll end is detected, the PAPER
OUT LED comes on. When a paper roll end is detected, the printer
performs the same operations as when a paper roll near-end is
detected.
• The settings of this command are effective until ESC @ is executed, the
printer is reset, or the power is turned off.
68
TH230/TH230+ Programmers Guide
ESC c 5
Function: Enable/disable feed button
Code ASCII: ESC c 5 n
Code HEX: 0x1B 0x63 0x35 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Enables or disables the feed button.
• When the LSB of n is 0, feed button is enabled.
• When the LSB of n is 1, feed button is disabled.
Notes: • The function of the feed button will only be executed when the feed
button is turned on.
• Even if the feed button is disabled by this command, paper feed button
will be enabled temporarily while printer is waiting for the button to be
pressed in the following states. Whether the paper can be fed or not
depends on the state:
• When the printer is waiting for the button to be pressed while GS ^ is
executed (but paper cannot be fed)
To prevent problems caused by accidentally pressing the feed button,
use this command to disable the button.
• When the paper roll end sensor detects a paper end, the FEED is
enabled regardless of the setting of this command. Even if the switch is
pressed, paper cannot be fed.
• When the cover is open, the FEED button is disabled regardless of the
settings of this command.
• Disabling the feed button while the button is pressed will not stop the
current paper feed.
69
Programmers Guide TH230/TH230+
ESC d
Function: Print and feed n lines
Code ASCII: ESC d n
Code HEX: 0x1B 0x64 n
Range: 1 ≤ n ≤ 255 (0 is interpreted as 1)
Default: None
Description: Prints the data in the print buffer and feeds n lines.
Notes: • The amount of paper fed per line is based on the value set using the line
spacing command (ESC 2 or ESC 3).
• The maximum paper feed amount is 1016 mm (40 inches). If the
specified amount exceeds 1016 mm (40 inches), the paper feed amount
is automatically set to 1016 mm (40 inches).
• After printing, the printing position moves to the beginning of the line.
When a left margin is set in standard mode, the position of the left
margin is the beginning of the line.
• When this command is processed in page mode, only the printing
position moves and the printer does not perform actual printing.
• This command is used to temporarily feed a specific line without
changing the line spacing set by other commands.
• The vertical motion unit (see GS P) will not calculate for line spacing.
ESC i
Function: Full cut
Code ASCII: ESC i
Code HEX: 0x1B 0x69
Description: Cuts the receipt
Notes: • There are two codes (0x19 or 0x1B 0x69) for this command and both
perform the same function.
• If not at beginning of line, a linefeed will be done
• Wincor Nixdorf suggests using the newer command GS V (see page 157)
to cut the receipt.
70
TH230/TH230+ Programmers Guide
ESC j
Function: Read from Non-Volatile Memory
Code ASCII: ESC j k
Code HEX: 0x1B 0x6A k
Range: 20 ≤ k ≤ 63 (decimal)
Description: Reads a two-byte word from location k in the history EEROM. The printer
returns the word at the next available opportunity.
Notes: • This command is ignored.
ESC l
Function: Start firmware upgrade mode
Code ASCII: ESC l
Code HEX: 0x1B 0x6C
Description: This command starts the firmware upgrade mode if RS232 interface is used.
It is described in the following document: “WN Enhanced Serial
Protocol.doc“
ESC m
Function: Partial cut
Code ASCII: ESC m
Code HEX: 0x1B 0x6D
Description: Partial cuts the receipt
Notes: • There are two codes (0x1A or 0x1B 0x6D) for this command and both
perform the same function.
• If not at beginning of line, a linefeed will be done
• Wincor Nixdorf suggests using the newer command GS V (see page 155)
to cut the receipt.
71
Programmers Guide TH230/TH230+
ESC p
Function: Generate pulse
Code ASCII: ESC p m t1 t2
Code HEX: 0x1B 0x70 m t1 t2
Range: m = 0, 1, 48, 49
0 ≤ t1 ≤ 255
0 ≤ t2 ≤ 255
Default: None
Description: Outputs the pulse specified by t1 and t2 to the specified connector pin m as
follows:
m Connector pin
0, 48 Drawer kick-out connector
pin 2
1, 49 Drawer kick-out connector
pin 5
• The pulse for ON time is (t1 * 2 msec) and for OFF time is (t2 * 2 msec).
72
TH230/TH230+ Programmers Guide
ESC r
Function: Set current color
Code ASCII: ESC r m
Code HEX: 0x1B 0x72 m
Range: m = 0, 1, 2
Default: m = 0 (monochrome)
Description: This command will set the current color to the color m for all character data
that may follow this command and all graphics objects (bit images) that
have not been explicitly loaded as two-color.
m Connector pin
0 monochrome - as the initial value
1 two-color paper – primary color usually
black
2 second color available from two-color
paper
Notes: • The m values 0 and 1 will not have a distinguishable effect; 0 is the initial
value and provides parameter value consistency with other commands.
• When the monochrome paper type command (0 0) is set, this command
is recognized and retained, but has no effect. The monochrome paper
selection (usually black) controls the output.
• When two-color paper is loaded and the two-color paper type command
set, this command will designate which of the two colors will be used for
everything not specified as having an explicit color parameter(s), such al
color logos, side bars, surround graphics, background watermarks or
color raster graphics. The effect mimics shifting a two-color ribbon in a
printer or typewriter to type the color of the lower half ribbon.
• After a power loss or reset the default value m = 0 is set.
ESC s
Function: Write to Non-Volatile Memory (NVRAM)
Code ASCII: ESC s n1 n2 k
Code HEX: 0x1B 0x73 n1 n2 k
Range: n1 = 1st Byte
n2 = 2nd Byte
20 ≤ k ≤ 63 (decimal locations)
Description: Writes the two-byte word, n1 n2, to location k in history EEROM.
73
Programmers Guide TH230/TH230+
ESC t
Function: Select character code table
Code ASCII: ESC t n
Code HEX: 0x1B 0x74 n
Range: 0 ≤ n ≤ 29
Default: n=0
Description: Selects a page n from the character code table as follows:
n Character code table
0 PC437 (USA, Standard Europe)
1 PC850 (Multilingual Latin I)
2 PC852 (Latin II
3 PC860 (Portuguese)
4 PC863 (Canadian French)
5 PC865 (Nordic)
6 PC858 (Multilingual I + Euro)
7 PC866 (Russian)
8 PC1252 (Latin I)
9 PC862 (Hebrew)
10 PC737 (Greek)
11 PC874 (Thai)
12 PC857 (Turkish)
16 WPC1254 (Turkish)
17 WPC1250 (Central Europe)
18 WPC28591 (Latin 1)
19 WPC28592 (Latin 2)
20 WPC28599 (Turkish)
21 WPC28605 (Latin 9)
22 PC864 (Arabic)
23 PC720 (Arabic)
24 WPC1256 (Arabic)
25 WPC28596 (Arabic)
26 KATAKANA (Asia)
27 PC775 (Baltic)
28 WPC1257 (Baltic)
29 WPC28594 (Baltic)
Notes: • There are two codes for this command (See “Select international
character code, 0x1B 0x52 n). Both codes perform the same function.
• The alphanumeric characters (0x20 (decimal 32) to 0x7F (decimal 127))
are the same for each page. The extended characters (0x80 (decimal
128) to 0xFF (decimal 255)) are different for each page.
• The selected character code table is effective until ESC @ is executed,
the printer is reset, or the power is turned off.
74
TH230/TH230+ Programmers Guide
ESC u
Function: Transmit Peripheral Device Status
Code ASCII: ESC u 0
Code HEX: 0x1B 0x75 0x00
Description: Transmits 1 byte of peripheral device status data as follows:
Status Byte
Bit Function 0 1
0 Drawer kick-out connector Low High
pin 3
1 Drawer kick-out connector Low High
pin 3
2 Undefined
3 Undefined
4 Undefined
5 Undefined
6 Undefined
7 Undefined
Notes: • The printer sends one byte to the host computer when it is not
busy or in a fault condition. In DTS/DSR protocol, the printer waits
for DSR = SPACE.
• If no cash drawer is connected, the status will indicate »High«.
75
Programmers Guide TH230/TH230+
ESC v
Function: Transmit paper sensor status
Code ASCII: ESC v
Code HEX: 0x1B 0x76
Description: Transmits 1 byte of paper sensor status data as follows:
Status Byte
Bit Function 0 1
Paper near end
0 Paper present No paper
sensor
1 Cover Closed Open
2 Paper end sensor Paper present No paper
3 Cutter error No error Error occurred
4 Not Used Fixed to Zero Fixed to Zero
5 Temperature In valid range Too hot or too cold
6 Voltage In valid range Too high or too low
7 Not Used Fixed to Zero Fixed to Zero
Notes: • The printer sends one byte to the host computer when it is not busy or
in a fault condition. In DTS/DSR protocol, the printer waits for DSR =
SPACE.
• If the Memory Switch to suppress the Paper-Near-End Notification is
enabled (see GS ( E pL pH fn [a1 b18...b11]...[ak nk8 nk1] <Function 3>),
the state of Bit 0 is fixed to Zero
76
TH230/TH230+ Programmers Guide
ESC w n 7
Function: Receipt shooting flush
Code ASCII: ESC w n 7 n
Code HEX: 0x1B 0x77 0x6E 0x37 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
ESC w n 8
77
Programmers Guide TH230/TH230+
ESC w n b
Function: Special Wincor barcode parameter
Code ASCII: ESC w n b n d1 .. dk
Code HEX: 0x1B 0x77 0x6E 0x62 n
Range: n = 16, 79
Description:
• n specifies the function.
• k specifies the count of following bytes
ESC w n c
Function: Switch the printer into Sleep-Mode.
Code ASCII: ESC w n c
Code HEX: 0x1B 0x77 0x6E 0x63
Description: This function immediately starts the Sleep-Mode of the printer when the
memory switch 128-3 is enabled.
Notes: Wincor Nixdorf specific function
78
TH230/TH230+ Programmers Guide
ESC {
Function: Turn upside-down printing mode on/off
Code ASCII: ESC { n
Code HEX: 0x1B 0x7B n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: In standard mode, turns upside-down printing mode on or off.
• When the LSB of n is 0, upside-down printing mode is turned off.
• When the LSB of n is 1, upside-down printing mode is turned on.
Notes: • When standard mode is selected, this command is enabled only when
processed at the beginning of the line.
• The upside-down printing mode is effective for all data in standard
mode.
• The upside-down printing mode 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.
• The settings of this command are effective until ESC @ is executed, the
printer is reset, or the power is turned off.
• When upside-down printing mode is turned on, the printer prints 180°-
rotated characters from right to left. The line printing order is not
reversed; therefore, be careful of the order of the data transmitted.
ESC w n _ g e t _ l a s t _ e r r o r
FUNCTION: Returns the last occurred error.
Code ASCII: ESC w n _ g e t _ l a s t _ e r r o r NULL
Code HEXGS 0x1B 0x77 0x6E 0x5F 0x67 0x65 0x74 0x5F 0x6C 0x61 0x73 0x74 0x5F 0x65
(: 0x72 0x72 0x6F 0x72 0x00
Description: This function returns the last occurred error.
Notes: The printer transmits the “Header to NUL” data shown below:
79
Programmers Guide TH230/TH230+
ESC w n _ r e s e t _ sys _ e r r o r
FUNCTION: Reset last error.
Code ASCII: ESC w n _ r e s e t _ sys _ e r r o r NULL
Code HEX: 0x1B 0x77 0x6E 0x5F 0x72 0x65 0x72 0x65 0x74 0x5F 0x73 0x79 0x73 0x5F
0x65 0x72 0x72 0x6F 0x72 0x00
Description: This function resets the last error that has occurred.
Notes: Wincor Nixdorf specific function.
TH230 + only. Firmware 01.07 or newer
Get the last error with ESC w n _ g e t _ l a s t _ e r r o r .
After excution this command ESC w n _ g e t _ l a s t _ e r r o r will send
“No error”
80
TH230/TH230+ Programmers Guide
FS ! (Asia version)
Function: Select print mode(s) for Kanji characters
Code ASCII: FS ! n
Code HEX: 0x1C 0x21 n
Description: Selects the character styles (double-height, double-width, and Kanji-
underlined)
together for multi-byte code character as follows:
Value
Bit Function
0 1
0 Reserved
1 Reserved
2 Double-width mode Disabled Enabled
3 Double-height mode Disabled Enabled
4 Reserved
5 Reserved
6 Reserved
7 Kanji-underline mode Disabled Enabled
Notes: • If the ASIA character module is not loaded then this command is
ignored.
• The ASIA character set module can only be loaded in the Asia version of
TH230. The Controller of this version is equipped with at least 4 MByte
Flash Memory.
81
Programmers Guide TH230/TH230+
FS - (Asia version)
Function: Turn underline mode on/off for Kanji characters
Code ASCII: FS - n
Code HEX: 0x1C 0x2D n
Range: 1 ≤ n ≤ 2, 48 ≤ n ≤ 51
Default: n=0
Description: Turns on or off underline mode for multi-byte code character(Kanji-
underline) as follows:
n Function
FS . (Asia version)
Function: Cancel Kanji character mode
Code ASCII: FS .
Code HEX: 0x1C 0x2E
Description: This command disable the ASIA character set (multi-byte code).
Notes: • If the ASIA character module is not loaded then this command is
ignored.
• The ASIA character set module can only be loaded in the Asia version of
TH230. The Controller of this version is equipped with at least 4 MByte
Flash Memory.
82
TH230/TH230+ Programmers Guide
FS 2 (Asia version)
Function: Define user-defined Kanji characters
Code ASCII: FS 2 c1 c2 d1...dk
Code HEX: 0x1C 0x32 c1 c2 d1...dk
Range: The ranges of c1 and c2 differ, depending on the character code system
used.
Characterset Hexadecimal
c1 c2
Japanese (JIS code) c1 = 77 21 ≤ c2 ≤ 7E
Japanese (SHIFT JIS code) c1 = EC 40 ≤ c2 ≤ 7E
80 ≤ c2 ≤ 9E
Simplified Chinese (GB2312) c1 = FE A1 ≤ c2 ≤ FE
Korean
0 ≤ d ≤ 255
K = 72
Description: Defines the user-defined Kanji character pattern (d1...dk) specified by the
character codes (c1 and c2).
Notes: • If the ASIA character module is not loaded then this command is
ignored.
• The ASIA character set module can only be loaded in the Asia version of
TH230. The Controller of this version is equipped with at least 4 MByte
Flash Memory.
• User-defined Kanji characters are not activated in BIG5-character-set at
time
83
Programmers Guide TH230/TH230+
FS C (Asia version)
Function: Select Kanji character code system
Code ASCII: FS C n
Code HEX: 0x1C 0x43 n
Range: n = 0, 1, 48, 49
Default: n=0
Description: Selects a Kanji character code system for the Japanese model as follows:
0, 48 JIS code
1, 49 SHIFT JIS code
Notes: • If the ASIA character module is not loaded then this command is
ignored.
• The ASIA character set module can only be loaded in the Asia version of
TH230. The Controller of this version is equipped with at least 4 MByte
Flash Memory.
FS S (Asia version)
Function: Set Kanji character spacing
Code ASCII: FS S n1 n2
Code HEX: 0x1C 0x53 n1 n2
Range: 0 ≤ n1 ≤ 255
0 ≤ n2 ≤ 255
Default: n1 = 0, n2 = 0
Description: Sets the left-side character spacing of the multi-byte code character to [n1
(horizontal or vertical motion unit)]; sets the right-side character spacing of
the multi-byte code character to [n2 (horizontal or vertical motion unit)].
Notes: • The maximum of the left- and the right-side character spacing is 255
dots, depending on setted resolution (see GS P)
• If the ASIA character module is not loaded then this command is
ignored.
• The ASIA character set module can only be loaded in the Asia version of
TH230. The Controller of this version is equipped with at least 4 MByte
Flash Memory.
84
TH230/TH230+ Programmers Guide
FS W (Asia version)
Function: Turn quadruple-size mode on/off for Kanji characters
Code ASCII: FS W n
Code HEX: 0x1C 0x57 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Turns quadruple-size mode on or off for multi-byte code character.
• When the LSB of n is 0, quadruple-size mode is turned off.
• When the LSB of n is 1, quadruple-size mode is turned on.
Notes: • If the ASIA character module is not loaded then this command is
ignored.
• The ASIA character set module can only be loaded in the Asia version of
TH230. The Controller of this version is equipped with at least 4 MByte
Flash Memory.
GS ETX
Function: Real time request to printer
Code ASCII: GS ETX n
Code HEX: 0x1D 0x03 n
Range: 1≤n≤2
Description: This command is identical to command DLE ENQ (see page 29).
GS EOT
Function: Real time status transmission
Code ASCII: GS EOT n
Code HEX: 0x1D 0x04 n
Range: 1≤n≤4
Description: This command is identical to command DLE EOT (see page 26).
85
Programmers Guide TH230/TH230+
GS ENQ
Function: Real time printer status transmission
Code ASCII: GS ENQ
Code HEX: 0x1D 0x05
Description: Transmits one byte status of the printer in real time.
Status Byte
Bit Function 0 Signifies 1 Signifies
0 Paper Present Low (only if paper low
sensor is enabled)
1 Paper Present Low (only if paper low
sensor is enabled)
2 Cover Closed Open
3 Busy Not Busy Busy
4 Drawer kick-out Low High
connector pin 3
5 Not used Fixed to 0
6 Error No error Error occurred
7 Not used Fixed to 1
Bit 3: Busy is set when the printer enters the Offline State (see chapter
Online / Offline State Diagram) or if the receive buffer is nearly full.
Bit 6: Error means Cover open, Paper out, Black mark error, Cutter error,
Thermistor error, High voltage error or Low voltage error. Thermistor error
is an unrecoverable error. High voltage error and Low voltage error are
automatic recoverable errors!
Notes: • When transmitting block data (Header ~ NUL), the status will be sent
after that.
• This command can be disabled by US z (page 195).
• The printer executes this command even when it is in offline or error
status.
• If the receive buffer is full the execution depends from Memory Switch
2-8 (Listen to Real-Time-Commands - see command GS ( E).
- If Memory Switch 2-8 is set to off (48): command is executed.
- If Memory Switch 2-8 is set to on (49): command is not executed.
86
TH230/TH230+ Programmers Guide
GS !
Function: Select character size
Code ASCII: GS ! n
Code HEX: 0x1D 0x21 n
Range: 0 ≤ n ≤ 7, 16 ≤ n ≤ 23, 32 ≤ n ≤ 39, 48 ≤ n ≤ 55,
64 ≤ n ≤ 71, 80 ≤ n ≤ 87, 96 ≤ n ≤ ≤ 103, 112 ≤ n ≤ 119
(1 ≤ width ≤ 8, 1 ≤ height ≤ 8)
Default: n=0
Description: Selects the character height (vertical number of times normal font size)
using bits 0 to 2 and selects the character width (horizontal number of
times normal font size) using bits 4 to 6, as follows:
Character width selection
Bit Bit 5 Bit 4 Hex Decimal Width
6
Off Off Off 00 0 1 (normal)
Off Off On 10 16 2 (double
width)
Off On Off 20 32 3
Off On On 30 48 4
On Off Off 40 64 5
On Off On 50 80 6
On On Off 60 96 7
On On On 70 112 8
Character height selection
Bit Bit 1 Bit 0 Hex Decimal Height
2
Off Off Off 00 0 1 (normal)
Off Off On 01 1 2 (double
height)
Off On Off 02 2 3
Off On On 03 3 4
On Off Off 04 4 5
On Off On 05 5 6
On On Off 06 6 7
On On On 07 7 8
Notes: • The character size set by this command is effective for all characters
(except for HRI characters).
• When the characters are enlarged with different heights on one line, all
the characters on the line are aligned at the baseline.
• When the characters are enlarged width wise, the characters are
enlarged to the right, based on the left side of the character.
• ESC ! can also turn double-width and double-height modes on or off.
That means it overwrites the settings of GS !.
87
Programmers Guide TH230/TH230+
• DC2 (see page 31) and DC3 (see page 32) also turn double-width modes
On or Off. That means they overwrite the settings of GS !
• In standard mode, the character is enlarged in the paper feed direction
when double-height mode is selected, and it is enlarged perpendicular
to the paper feed direction when double-width mode is selected.
However, when character orientation changes in 90° clockwise-rotated
mode, the relationship between height and width is reversed.
• In page mode, double-height and double-width are on the character
orientation.
• The setting of character size is effective until ESC ! is executed, ESC @ is
executed, the printer is reset, or the power is turned off.
GS “
Function: Select memory type (SRAM/Flash)
Code ASCII: GS “ n
Code HEX: 0x1D 0x22 n
Range: 48 ≤ n ≤ 51
Description: Where to Save Logos or User-Defined Fonts
n = 48 (ASCII n = 0)
Loads active logo to RAM only. This is used to print a special logo but not
have it take up Flash Memory. A logo defined following this command is not
preserved over a power cycle.
n = 49 (ASCII n = 1)
Loads active logo to Flash Memory. This is the default condition for logo
Flash storage. A logo defined following this command is stored in Flash
Memory.
n = 50 (ASCII n = 2)
Loads user-defined characters to RAM only. This is the default condition for
user-defined character storage. Any user-defined characters defined
following this command are not preserved over a power cycle.
n = 51 (ASCII n = 3)
Loads user-defined characters to Flash Memory. An application must use
this command to store user-defined characters in Flash Memory. Any user-
defined characters defined following this command are stored in Flash
Memory. A user-defined character cannot be redefined in Flash Memory.
The Flash Memory page must be erased by an application before redefining
user-defined characters. For more information, see the Erase User Flash
Sector (GS @ n) command.
Notes: • Specifies whether to load the logos or user-defined characters to Flash
Memory or to RAM (volatile memory). The selection remains in effect
until it is changed via this command or until the power cycles.
• Additionally the selection n= 51 remains in effect until ESC @ is received.
ESC @ will reset this setting to n=50.
88
TH230/TH230+ Programmers Guide
GS “ U
Function: Flash Memory User Sectors Allocation
Code ASCII: GS “ U n1 n2
Code HEX: 0x1D 0x22 0x55 n1 n2
Range: 0 ≤ n1 ≤ 8
0 ≤ n2 ≤ 8
n1 + n2 <= 8 is equivalent to 512k user memory
Description: n1 is the number of 64k sectors used for logos and user-defined characters.
n2 is the number of 64k sectors used for user data storage.
This command sets the allocation of flash sectors among user data storage,
logos/user-defined characters, and electronic journal. This allocation is
saved in the EEPROM of the printer and is therefore saved across power
cycles.
The printer will respond to the flash allocation command being sending ACK
(0x06) or NAK (0x15).
n1 + n2 <= 8 is equivalent to 512k user memory
Notes: • Flash memory is made up of user and program code. Therefore, the
available flash memory space will vary with the amount of program code
utilized.
• If n1 + n2 is greater than the maximum number of sectors available, the
command is ignored and the printer responds with NAK (0x15).
• Issuing this command with parameters different from current
parameters will erase all sectors.
• The logo/user-defined character memory and the user datastorage
shared the 512K user memory with some header data. Follow sizes have
to subtract form the 512K:
• 1K Flash info
• 4 Byte partition header logo/user-defined character memory
• 4 Byte partition header user data storage
• If n1 or n2 = 0 the minimal size of partition header will be left
• If n1 and n2 = 0 the command will be ignored
89
Programmers Guide TH230/TH230+
GS #
Function: Select the Current Logo
Code ASCII: GS # n
Code HEX: 0x1D 0x23 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Selects a color or monochrome logo to be defined or printed.
The active logo n remains in use until this command is sent again
with a different logo n.
When this command precedes a logo definition, that definition is
stored in Flash Memory as logo n.
When this command precedes a logo print command and n is different from
the previously active logo selected, the printer retrieves the logo definition
for n from Flash Memory and prints it. If there is no definition for logo n,
then no logo is printed.
In the case of a previously existing application that expects only one
possible logo, the printer will not receive the Select Current Logo (0x1D
0x23 n) command. In this case, the printer assigns 0 as the active logo
identifier. It automatically stores any new logo definition in Flash Memory
as logo 0, inactivating any previous logo 0 definitions. If the Flash Memory
space available for logos fills up with inactive logo 0 definitions, the
firmware erases the old definitions at the next power cycle. This is the only
case in which the printer erases Flash Memory without an application
command.
In the case of a new application using multiple logos, the Select Current
Logo (0x1D 0x23 n) command is used. After that, the printer no longer
automatically erases the logo definition Flash Memory page when it fills
with multiple definitions. A new application using multiple logos, writing a
user-defined character set into Flash Memory, or both, is responsible for
erasing the logo and user-defined character set Flash Memory page when
the logo area is full or before a new character set is defined.
90
TH230/TH230+ Programmers Guide
GS $
Function: Set absolute vertical print position in page mode
Code ASCII: GS $ nL nH
Code HEX: 0x1D 0x24 nL nH
Range: 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255
Default: None
Description: In page mode, sets the vertical printing position to (nL + nH × 256) ×
(vertical or horizontal motion unit) from the starting position set by ESC T.
Notes: • This command is enabled only in page mode. If this command is
processed in standard mode, it is ignored.
• The printer ignores any setting that exceeds the printing area set by
ESC W.
• The horizontal or vertical motion unit is used for the print direction set
by ESC T.
• When the starting position is set to the upper left or lower right of the
printing area using ESC T, the vertical motion unit is used.
• When the starting position is set to the upper right or lower left of the
printing area using ESC T, the horizontal motion unit is used.
• Even if the vertical or horizontal motion unit is changed after changing
the printing position, the printing position will not be changed.
• The vertical or horizontal motion unit is specified by GS P.
91
Programmers Guide TH230/TH230+
GS ( A
Function: Executes test and diagnosis functions
Code ASCII: GS ( A pL pH n m
Code HEX: 0x1D 0x28 0x41 pL pH n m
Range: (pL + (pH × 256)) = 2 (where pL = 2, pH = 0)
0 ≤ n ≤ 255
m = 1, 2, 6, 49, 50, 54
Default:
Description: This command executes test and diagnosis functions. The function is
specified by m.
• pL, pH specifies (pL + (pH ×256)) for the number of bytes after pH (n and
m).
• n is just for command compatibility and will be ignored. The parameter
is a dummy for further extensions. That is why, printer accept all values,
but don’t use anyone of them.
• m specifies the test function.
m Function
1, 49 Enter the hexadecimal dump for the
communication interface
2, 50 Print the extended seftest form
6, 54 Print a sample print
92
TH230/TH230+ Programmers Guide
GS ( D
Function: Enable/disable real-time command
Code ASCII: GS ( D pL pH m [a1 b1]...[ak bk]
Code HEX: 0x1D 0x28 0x44 pL pH 0x14 [a1 b1]...[ak bk]
Range: (pL + pH × 256) = 3 (pL = 3, pH = 0)
m = 20
a=2
b = 0, 1, 48, 49
Default: a = 2 / b = 0 (DLE SO fn a b (n = 2): disable)
Description: Specifies enable or disable of a real-time command.
• pL, pH sets the number of parameters after pH (m and [a1 b1]...[ak bk])
to (pL + pH × 256) bytes.
• a specifies the type of real-time command.
• b specifies enable/disable of real-time command processing.
Notes: • You will find additional information about “Power off control by host”
on page 9.
• The behavior of the Power Button is described on page 7.
• The printer processes each real-time command that is enabled upon
receiving it.
• A real-time command specified as disabled is not processed.
• The setting of this command is effective until ESC @ is executed, the
printer is reset, or the power is turned off.
• If you transmit a command for a bit image or defined data that contains
the sequence DLE SO, be sure to disable real-time command processing
before transmitting the bit image or defined data command. Then the
printer will process the sequence DLE SO as image data.
93
Programmers Guide TH230/TH230+
GS ( E
Function: User setup commands
Code ASCII: GS ( E pL pH fn parameters
Code HEX: 0x1D 0x28 0x45 pL pH fn parameters
Description: Controls the user setting modes. The table below explains the functions
available in this command.
• The value of fn specifies the function.
fn Function Description
94
TH230/TH230+ Programmers Guide
• The value defined by the user setting mode is effective until redefined
by this mode again. It is not initialized by turning off the power or
executing ESC @.
User setting mode is a special mode to change settings for the printer’s
built-in non-volatile memory.
• To change a setting, you must change the printer into user setting mode,
using Function 1.
• The setting you specify is activated by transmitting a Function 2
command upon completion of making the setting.
• Note the rules below for the user setting mode:
• The printer does not process character data.
• The printer does not process commands other than this command and
the GS I command.
• The printer ignores real-time commands.
• The printer does not transmit ASB status.
• Functions 4, 6, 12, and 50, the functions used to transmit the current
settings to the host, can be used at any time, without changing into the
user setting mode.
• Data is written to the non-volatile memory by Functions 3, 5, 7, 11, 48,
and 49. Note the following when using those functions:
• The printer might be BUSY. In this case, be sure not to transmit a
command from the host because the printer will not receive the data.
• Excessive use of this function may destroy the non-volatile memory. As
a guideline, do not use any combination of the following commands
more than 10 times per day for writing data to the non-volatile memory:
FS q, GS ( E (part of functions), GS ( L (part of functions), GS g 0, and FS g
1.
• Notes for the processing to transmit data:
• Data is transmitted by Functions 1, 4, 6, 12, and 50.
• The printer goes BUSY immediately before transmitting the header,
and it returns to READY after transmitting NUL. (This excludes situations
when the printer is BUSY for other reasons.)
• You cannot use ASB status and real-time commands while “Header to
NUL” data is being transmitted.
• With a serial interface printer, be sure to use this function when the
host can receive data.
• With a parallel interface printer, data transmitted (excluding ASB
status) with this command (“Header to NUL”) is temporarily stored in
the printer transmit buffer, as with other data. When the host goes into
reverse mode, the printer then transmits the data sequentially from the
beginning of the transmit buffer. Transmit buffer capacity is 99 bytes.
Data exceeding this amount is lost. Therefore, when using this
command, promptly change into reverse mode to start the data receive
process.
95
Programmers Guide TH230/TH230+
GS ( E pL pH fn d1 d2 <Function 1>
Code ASCII: GS ( E pL pH fn d1 d2
Code HEX: 0x1D 0x28 0x45 0x03 0x00 0x01 0x49 0x4E
Range: (pL + pH × 256) = 3 (pL = 3, pH = 0)
fn = 1
d1 = 73 = ‘I’
d2 = 78 = ‘N’
Description: This command changes the printer into the user setting mode.
Notes: • If the printer is in standard mode, this command is valid only at the
beginning of the line.
• If the printer is in page mode, this command is ignored.
• Do not use this command while defining macros, because macros cannot
be included with this command.
• When the printer goes into the user setting mode, it transmits a “mode
change notice” back to the host.
96
TH230/TH230+ Programmers Guide
GS ( E pL pH fn d1 d2 d3 <Function 2>
Code ASCII: GS ( E pL pH fn d1 d2 d3
Code HEX: 0x1D 0x28 0x45 0x04 0x00 0x02 0x4F 0x55 0x54
Range: (pL + pH × 256) = 4 (pL = 4, pH = 0)
fn = 2
d1 = 79 = ‘O’
d2 = 85 = ‘U’
d3 = 84 = ‘T’
Description: Ends the user setting mode and the printer performs software reset.
Notes: • This function is performed only when the printer is in user setting mode.
• After the software reset, the printer goes into the power on state.
• Executing this function enables setting values set in user setting mode
(such as memory switch or customize value).
• Be sure to execute this function after changing all the setting values.
• Be sure to readout the transmit buffer of the printer before sending
this command. This ensures that the data of the “mode change notice”
(see command GS ( E <Function 1>) and possibly ASB messages are
transmitted before the printer executes the software reset.
97
Programmers Guide TH230/TH230+
* The printer must be switched off and on to take effect of changed setting!
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
99
Programmers Guide TH230/TH230+
100
TH230/TH230+ Programmers Guide
GS ( E pL pH fn a <Function 4>
Code ASCII: GS ( E pL pH fn a
Code HEX: 0x1D 0x28 0x45 0x02 0x00 0x04 a
Range: (pL + pH × 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:
101
Programmers Guide TH230/TH230+
102
TH230/TH230+ Programmers Guide
a Customized value
3 Paper width
5 Print density
6 BM adjustment value
9 Maximum power
10 Maximum speed
11 Number of Endurance test tickets
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 Power On Behavior
103
Programmers Guide TH230/TH230+
For example:
300 mm/s is reached with 65% density or less.
260 mm/s is reached with 85% density.
235 mm/s is reached with 100% density.
104
TH230/TH230+ Programmers Guide
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 98) 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 77). 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.
105
Programmers Guide TH230/TH230+
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 98) 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
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 / see page 98) is
disabled the printer ignores this time.
106
TH230/TH230+ Programmers Guide
This value sets the Code Page number that is used after switch on the
Printer or after use the sequence ESC @.
• This value should be set to a value which is listed at ESC t n (see page 74).
If it is not listed in ESC t n then a Value of 0 is taken.
• Sometimes it is not possible to change the application program and in
addition the application program needs a code page which is different to
PC437. This custom value is used to set a specific start code page without
changing the application program.
ASCII: GS ( E pL pH fn a nL nH
Hex: 0x1D 0x28 0x45 0x04 0x00 0x05 0x03 0x02 0x00
• The setting value of the print speed is effective when the printer
performs in proper condition. Print speed may slow temporarily,
depending on the operating environment or the print duty.
107
Programmers Guide TH230/TH230+
108
TH230/TH230+ Programmers Guide
GS ( E pL pH fn a <Function 6>
Code ASCII: GS ( E pL pH fn a
Code HEX : 0x1D 0x28 0x45 0x02 0x00 0x06 a
Range: (pL + pH × 256) = 2 (pL = 2, pH = 0):
fn = 6
a = 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
Description: The printer transmits the host the customized value for the NV memory
area specified by parameter a.
a Customized value
3 Paper width
5 Print density
6 BM adjustment value offset
7 Sensor values
9 Maximum power
10 Maximum speed
11 Number of Endurance test tickets
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 Mode
18 Power On Behavior
Paper
width hexadecimal decimal
57.5 mm 0x32 50
80 mm 0x36 54
109
Programmers Guide TH230/TH230+
Print density settings (a = 5):
hexadecimal decimal
Print
density d1 d2 d3 d4 d5 d1 d2 d3 d4 d5
50 % 0x36 0x35 0x35 0x32 0x36 54 53 53 50 54
55 % 0x36 0x35 0x35 0x32 0x37 54 53 53 50 55
60 % 0x36 0x35 0x35 0x32 0x38 54 53 53 50 56
65 % 0x36 0x35 0x35 0x32 0x39 54 53 53 50 57
70 % 0x36 0x35 0x35 0x33 0x30 54 53 53 51 48
75 % 0x36 0x35 0x35 0x33 0x31 54 53 53 51 49
80 % 0x36 0x35 0x35 0x33 0x32 54 53 53 51 50
85 % 0x36 0x35 0x35 0x33 0x33 54 53 53 51 51
90 % 0x36 0x35 0x35 0x33 0x34 54 53 53 51 52
95 % 0x36 0x35 0x35 0x33 0x35 54 53 53 51 53
100 % 0x30 - - - - 48 - - - -
105 % 0x31 - - - - 49 - - - -
110 % 0x32 - - - - 50 - - - -
115 % 0x33 - - - - 51 - - - -
120 % 0x34 - - - - 52 - - - -
125 % 0x35 - - - - 53 - - - -
130 % 0x36 - - - - 54 - - - -
BM adjustment value offset (a = 6):
Value (Bit 6 – Bit 0)
BM offset Direction (Bit 7) decimal hexadecimal
0…127 0 – Forwards 0…127 0x00…0x7F
128…255 1 – Backwards 0…127 0x00…0x7F
Two's complement values in backward direction.
Sensor values (a = 7):
Sensor Value Backup Value
BM Sensor/tab: 0…255 -( 0…255 )
110
TH230/TH230+ Programmers Guide
Maximum speed (a = 10):
Maximum speed String d1 d2 d3
setting
n Speed in
mm/sec
70 70 mm/sec “70” 0x37 0x30 -
71 71 mm/sec “71” 0x37 0x31 -
… … … … … …
219 219 mm/sec “219” 0x32 0x31 0x39
220 220 mm/sec “220” 0x32 0x32 0x30
Only TH230+ Draft
... … … … … …
300 300 mm/sec “300” 0x33 0x30 0x30
Number of Endurance test tickets (a = 11):
Number of tickets String d1 d2 d3 d4 d5
printed in the
Endurance test
1 “1” 0x31 - - - -
2 “2” 0x32 - - - -
… … … … … … …
65534 “65534” 0x36 0x35 0x35 0x33 0x34
65535 “65535” 0x36 0x35 0x35 0x33 0x35
Color density settings (a = 12):
hexadecimal decimal
Print
density d1 d2 d3 d4 d5 d1 d2 d3 d4 d5
50 % 0x36 0x35 0x35 0x32 0x36 54 53 53 50 54
55 % 0x36 0x35 0x35 0x32 0x37 54 53 53 50 55
60 % 0x36 0x35 0x35 0x32 0x38 54 53 53 50 56
65 % 0x36 0x35 0x35 0x32 0x39 54 53 53 50 57
70 % 0x36 0x35 0x35 0x33 0x30 54 53 53 51 48
75 % 0x36 0x35 0x35 0x33 0x31 54 53 53 51 49
80 % 0x36 0x35 0x35 0x33 0x32 54 53 53 51 50
85 % 0x36 0x35 0x35 0x33 0x33 54 53 53 51 51
90 % 0x36 0x35 0x35 0x33 0x34 54 53 53 51 52
95 % 0x36 0x35 0x35 0x33 0x35 54 53 53 51 53
100 % 0x30 - - - - 48 - - - -
105 % 0x31 - - - - 49 - - - -
110 % 0x32 - - - - 50 - - - -
115 % 0x33 - - - - 51 - - - -
120 % 0x34 - - - - 52 - - - -
125 % 0x35 - - - - 53 - - - -
130 % 0x36 - - - - 54 - - - -
111
Programmers Guide TH230/TH230+
Receipt shooting flush time (a = 13):
Value Flush time
1…255 250 msec … 63.75 sec
0 Endless
Sleep-Mode waiting time (a = 14):
Value Waiting time
10…2550 10 sec … 42,5 min
Power on (Sleep mode) to Cash drawer opening delay (a=15):
Value Delay time
0…5000 0 sec … 5 sec
Default character code table (a=16):
Value Code table
0…255 0…255
Auto Recovery Mode (a=17):
Value Auto Recovery Mode
0 Off
1 Recover without clearing
2 Recover with clearing
1 and 2 is equal to the function DLE ENQ n
Power On Behavior (a=18):
This custom value is only available in iPRINT.
Notes: • This function works both in user setting mode and during normal
printer operation.
• The printer transmits the data below (“Header to NUL”) with this
function::
112
TH230/TH230+ Programmers Guide
(*1) The value number in the table above is the same value as
parameter a.
(*2) The setting is determined by the value defined in Function 5.
113
Programmers Guide TH230/TH230+
114
TH230/TH230+ Programmers Guide
115
Programmers Guide TH230/TH230+
GS ( E pL pH fn a <Function 12>
Code ASCII: GS ( E pL pH fn a
Code HEX: 0x1D 0x28 0x45 pL pH 0x0C a
Range: (pL + pH × 256) = 2 (pL = 2, pH = 0)
fn = 12
1≤a≤4
Description: Transmit the setting value of the serial interface communication condition
specified by a.
a Communication
condition
1 Baud rate
2 Parity
3 Flow control
4 Bit length
Notes: • This function works in user setting mode and during normal operation.
• This function transmits “Header to NUL” as follows:
Transmit data Hex Decimal Data quantity
Header 0x37 55 1 byte
Identifier 0x33 51 1 byte
Communication 0x31–0x34 49–52 1 byte
condition (*1)
Separator 0x1F 31 1 byte
Setting value (*2) 0x30 − 0x39 48 − 57 1 − 5 bytes
NULL 0x00 0 1 byte
(*1) Communication condition is specified by a.
(*2) Setting value is set by Function 11.
• “Setting value” is set by Function 11. It might differ from the current
communication condition before executing Function 2.
• This function is used to confirm whether Function 11 ends normally
before executing 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:
116
TH230/TH230+ Programmers Guide
GS ( E pL pH fn d1…dn (fn=129)
Function: Set serial number
Code ASCII: GS ( E pL pH fn d1 … dn
Code HEX: 0x1D 0x28 0x45 pL pH 0x81 d1 … dn
Range: 2 ≤ (pL + pH × 256) ≤ 11
fn = 129
32 ≤ d ≤ 255
1 ≤ n ≤ 10
Description: Set the serial number in the EEPROM. 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.
GS ( E pL pH fn d1…dn (fn=130)
Function: Set production date
Code ASCII: GS ( E pL pH fn d1 … dn
Code HEX: 0x1D 0x28 0x45 pL pH 0x82 d1 … dn
Range: (pL + pH × 256) = 7
fn = 130
48 ≤ d ≤ 57
n=6
01 ≤ DD ≤ 31
01 ≤ MM ≤ 12
00 ≤ YY ≤ 99
Description: Set the production date in the EEPROM. 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.
117
Programmers Guide TH230/TH230+
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”
• Boot/P (a = 6) is specified by d as follows:
d Function
48 Boot/P disabled
49 Boot/P enabled
118
TH230/TH230+ Programmers Guide
GS ( E pL pH fn a <Function 132>
Code ASCII: GS ( E pL pH fn a
Code HEX: 0x1D 0x28 0x45 pL pH 0x84 a
Range: (pL + pH × 256) = 2 (pL = 2, 0 ≤ 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 Boot/P (Bootstrap Protocol)
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:
• “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 Function 2.
119
Programmers Guide TH230/TH230+
• 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:
GS ( F
Function: Set adjustment value(s)
Code ASCII: GS ( F pL pH a fn nL nH
Code HEX: 0x1D 0x28 0x46 pL pH a fn nL nH
Range: (pL + (pH × 256)) = 4 (where 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.
120
TH230/TH230+ Programmers Guide
121
Programmers Guide TH230/TH230+
GS ( L
Function: Specify graphics data
Description: Performs the various tasks related to graphics data listed in the table
below.
• Function code fn specifies the individual function.
fn Function Description
Recommen- • This command is recommended for use when printing image data.
ded • The image processing controlled using this command is referred to as
Functions: the “Graphics function.” The name is important as it distinguishes it
from conventional bit image functions.
• The graphics functions provided here maintain upward compatibility
with conventional bit image processing.
122
TH230/TH230+ Programmers Guide
Notes: • The functions of this command are determined by the fn setting. Actual
command operation varies according to function.
• The NV graphics and download graphics data is managed using key
codes.
• Expressed as kc1 and kc2, the key codes are used to identify data
groups.
• The key codes have a 2-byte configuration and can be specified using
the full range of character codes (0x32 to 0x7E).
• The data referred to here is image data specified using d1 through dk
of Function 67.
• The printer automatically adds control information when it stores the
data. The image data domain is used as the control information.
Control information formats and data values vary according to function.
• Note that it is not possible to create definitions for both NV graphics
data (this command) and NV bit image data (FS q). NV bit image data
definitions are deleted when this command is used.
• Note that it is not possible to create definitions for both download
graphics data (this command) and download bit image data (GS ✻).
Download bit image data definitions are deleted when this command is
used.
• Always execute Function 50 after executing graphics Function 112
when the standard mode is selected.
123
Programmers Guide TH230/TH230+
124
TH230/TH230+ Programmers Guide
• When codes other than the ACK, NAK, or CAN codes are received, the
CAN procedure is executed.
• The data lengths listed in the table below are used for storing control
information for each group of graphics data contained in a domain.
Graphics type Control information data
value
NV graphics 24 bytes
125
Programmers Guide TH230/TH230+
GS ( L pL pH m fn (fn=48)
Code ASCII: GS ( L pL pH m fn
Code HEX: 0x1D 0x28 0x4C 0x02 0x00 0x30 fn
Range: (pL + pH × 256) = 2 (pL = 2, pH = 0)
m = 48
fn = 0, 48
Description: Sends the entire capacity (specified in bytes) of the NV graphics data
domain.
• This function does not require ESC/POS Handshaking Protocol.
Notes: • This function is used to send the following data groups, beginning with
the Header and ending with NUL.
Send data Hexadecimal Decimal Data length
Header 0x37 55 1 byte
Identifier 0x30 48 1 byte
Entire capacity 0x30 to 0x39 48 to 57 1 to 8 bytes
(*1)
NUL 0x00 0 1 byte
(*1) The entire capacity is the total byte count for that domain.
• The decimal value for the entire capacity is converted to text data and
sent starting from the high order end.
Example:
If the entire capacity is 1200 bytes, the “1200” (expressed decimally as
49, 50, 48, and 48) is converted to 4-byte data.
• When this command is used to send the entire capacity, the entire byte
capacity of the domain is sent, regardless of definitions currently
entered for NV graphics data. The entire capacity referred to here
includes the area used for control information.
• Note that the NV graphics function cannot be used when the value for
the entire capacity is “0” (expressed hexadecimal as 0x30 and decimally
as 48).
• The data sent using this function is distinguished from other send data
by unique data inserted in each data block. When the header sent from
the printer has a hexadecimal value of 0x37 and decimal value of 55,
process the data up to NUL (hexadecimal value 0x00 and decimal value
0) as a single data group, using the data shown in the table below for
identification.
Send Data Hexadecimal Decimal
First byte (header) 0x37 55
Second byte 0x30 48
(identifier)
126
TH230/TH230+ Programmers Guide
• Note that the following procedure is required for processing the data.
• When communication with the printer uses XON/XOFF control, the
XOFF may interrupt the “Header to NUL” data string.
• The domain of the NV graphics data can be selected by using Function 5
of the GS ( E command.
(Unit: byte)
GS ( L pL pH m fn (fn=51)
Code ASCII: GS ( L pL pH m fn
Code HEX: 0x1D 0x28 0x4C 0x02 0x00 0x30 fn
Range: (pL + pH × 256) = 2 (pL = 2, pH = 0)
m = 48
fn = 3, 51
Description: Sends the unused capacity in the NV graphics domain.
• This function does not require ESC/POS Handshaking Protocol.
Notes: • This function is used to send the following data groups, beginning with
the Header and ending with NUL.
Send data Hexadecimal Decimal Data length
Header 0x37 55 1 byte
Identifier 0x31 49 1 byte
Unused capacity 0x30 to 0x39 48 to 57 1 to 8 bytes
(*1)
NUL 0x00 0 1 byte
(*1) The unused capacity is the total byte count for the unused area.
• The decimal value for the unused capacity is converted to text data and
sent starting from the high order end.
Example:
If the available capacity is 120 bytes, the “120” (expressed decimally as
49, 50, and 48) is converted to 3-byte data.
• The control information for NV graphics data is included in the capacity
in use.
127
Programmers Guide TH230/TH230+
128
TH230/TH230+ Programmers Guide
GS ( L pL pH m fn d1 d2 (fn=64)
Code ASCII: GS ( L pL pH m fn d1 d2
Code HEX: 0x1D 0x28 0x4C 0x04 0x00 0x30 0x40 0x4B 0x43
Range: (pL + pH × 256) = 4 (pL = 4, pH = 0)
m = 48
fn = 64
d1 = 75
d2 = 67
Description: Sends the key codes for NV graphics data that has been defined using
Function 67.
• This function does require ESC/POS Handshaking Protocol.
Notes: • When key codes are present, the data shown below (beginning with
Header and ending with NUL) is sent.
Send data Hexadecimal Decimal Data length
Header 0x37 55 1 byte
Identifier 0x72 114 1 byte
Identification status (*1) 0x40 or 0x41 64 or 65 1 byte
(*2)
Data (*3) 0x20 to 0x7E 32 to 2 to 80
126 bytes
NUL 0x00 0 1 byte
(*1) When the number of NV graphics data groups exceeds 40, the
groups are divided into blocks in compliance with the following
conventions:
• When unsent data is present, the Identification status byte (byte 3) is
set to hexadecimal value 0x41 and decimal value 65.
• When unsent data is not present, the Identification status byte (byte 3)
is set to hexadecimal value 0x40 and decimal value 64.
(*2) If the number of NV graphics data groups is 40 or less, they are sent
in a single batch, with the Identification status byte (byte 3) set to
hexadecimal value 0x40 and decimal value 64.
(*3) The data groups are arranged according to the key codes.
• When no key codes are present, the data shown below (beginning with
Header and ending with NUL) is sent.
Send data Hexadecimal Decimal Data length
Header 0x37 55 1 byte
Identifier 0x72 114 1 byte
Identification status 0x40 64 1 byte
NUL 0x00 0 1 byte
129
Programmers Guide TH230/TH230+
• The key codes list data in the NV graphics is distinguished from other
send data by unique data inserted in each data block. When the header
sent from the printer has a hexadecimal value of 0x37 and decimal value
of 55, process the data up to NUL (hexadecimal value 0x00 and decimal
value 0) as a single data group, using the data shown in the table below
for identification.
Send Data Hexadecimal Decimal
First byte (header) 0x37 55
Second byte 0x72 114
(identifier)
• Note that the following procedures are required for processing the data.
• When communication with the printer uses XON/XOFF control, the
XOFF may interrupt the “Header to NUL” data string.
• Do not use this function in conjunction with NV bit images (FS q).
GS ( L pL pH m fn d1 d2 d3 (fn=65)
Code ASCII: GS ( L pL pH m fn d1 d2 d3
Code HEX: 0x1D 0x28 0x4C 0x05 0x00 0x30 0x41 0x43 0x4C 0x52
Range: (pL + pH × 256) = 5 (pL = 5, pH = 0)
m = 48
fn = 65
d1 = 67
d2 = 76
d3 = 82
Description: Deletes NV graphics data that has been defined using Function 67.
• Deleted areas are designated “Unused areas.”
• All key codes are designated as undefined.
Notes: • Use this function at the beginning of the line when the standard mode is
selected.
• This function is incompatible with macros, so be sure to avoid including
it when defining macros.
• When NV graphics data is being shared by multiple applications,
executing this function will delete all data being used by all applications.
Caution is required when using this function.
130
TH230/TH230+ Programmers Guide
131
Programmers Guide TH230/TH230+
• Switch d is used to specify the defined data for NV graphics. This data
is processed in raster format.
• Switch k is used to indicate the defined data value. It is not necessary
to send parameter k because it is a descriptive parameter.
• In cases where the specified key code already exists in memory, it will
be necessary to overwrite the data.
Notes: • NV graphics indicate image data groups defined in the printer’s internal
non-volatile memory. Data definitions for NV graphics data created
using this command are valid until redefined by this command.
• This function is used to define NV graphics data.
132
TH230/TH230+ Programmers Guide
• Use this function at the beginning of the line when the standard mode is
selected.
• This function is incompatible with macros, so make sure to avoid
including it when defining macros.
• The [data value (k) + control information data value] area of the NV
graphics data domain is used when this function is executed.
• In cases where there is insufficient capacity available for storing NV
graphics data, this function cannot be used. Use Function 51 to confirm
the available capacity in the NV graphics data area.
• One option is to delete items of NV graphics data that were previously
defined to the same key code.
• The data for byte k of d1 ... dk is processed as a single item of defined
NV graphics data. The defined data (d) specifies “1” for bits
corresponding to dots that will be printed and “0” for bits corresponding
to dots that will not be printed.
• Specify single data groups [c d1 ... dk] when monochrome is selected (b
= 1) as the color.
• Specify b number of data groups [c d1 ... dk] when multiple colors are
selected ( b ≠ 1). It is also important to specify different colors in units of
data groups when specifying color I.
• NV graphics data is printed using Function 69.
• Note that it is not possible to create definitions for both NV graphics
data (this command) and NV bit image data (FS q). NV bit image data
definitions are deleted when this command is used.
• The relationship between NV graphics data (raster format) and print
results is shown in the table below.
d1 d2 … dx
dx+1 dx+2 … dx*2
: : … :
dk-2 dk-1 dk
MSB MSB MSB MSB
LSB LSB LSB LSB
X = ( xL + xH ✕ 256)
• For specifying paper (2-color/single-color), see Functions 5 and 6 of GS (
E. Domain of the NV graphics data can be selected as follows by using
Function 5 of GS ( E.
(Unit: bytes)
133
Programmers Guide TH230/TH230+
134
TH230/TH230+ Programmers Guide
GS ( k pL pH cn fn [parameters]
Code ASCII: GS ( k pL pH cn fn
Code HEX: 0x1D 0x28 0x6B pL pH cn fn
Range: 2 ≤ (pL + pH × 256) ≤ 65530 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 255)
cn = 48, 49, 51
fn = 65, 66, 67, 68,69,70, 80, 81, 82
Description:
cn fn Function name
0 0 All: Erase symbol storage area
48 65 PDF417: Set the number of columns in the data region
66 PDF417: Set the number of rows in the data region
67 PDF417: Set the width of the module
68 PDF417: Set the row heigth
76 PDF417: Set ratio of width to heigth
80 PDF417: Store the data into the symbol storage area
81 PDF417: Print the symbol data in the symbol storage area
49 65 QR Code: Select the model
67 QR Code: Set the size of module
69 QR Code: Select the error correction level
80 QR Code: Store the data into the symbol storage area
81 QR Code: Print the symbol data in the symbol storage area
51 72 GS 1 Databar: Set count of modules for GS 1 DataBar Expanded
135
Programmers Guide TH230/TH230+
GS ( k pL pH cn fn (cn = 0, fn = 0)
Code ASCII: GS ( k pL pH 0 0
Code HEX: 0x1D 0x28 0x6B pL pH 0x00 0x00
Range: (pL + pH × 256) = 2 (pL = 2, pH = 0)
cn = 0
fn = 0
Description: Erase symbol storage area.
Notes:
• TH230+ only, Firmware 01.07 or newer
• All data in symbol storage area will be erased
• Memory in RAM-area for fonts and images will be free
GS ( k pL pH cn fn n (cn = 0, fn = 1)
Code ASCII: GS ( k pL pH 0 1 n
Code HEX: 0x1D 0x28 0x6B pL pH 0x00 0x01 n
Range: (pL + pH × 256) = 3 (pL = 3, pH = 0)
cn = 0
fn = 1
48 ≤ n ≤ 50
Description: Transmit symbol storage area.
n signs the barcode type which should be read out. If the type not equal to
the stored barcode, nothing will be transmit.
n Barcode
48 PDF417
49 QR
136
TH230/TH230+ Programmers Guide
Description: Stores the PDF417 symbol data (d1…dk) in the symbol storage area.
The printer will respond to the command being sending ACK (0x06) or NAK
(0x15).
Notes:
• TH230+ only, Firmware 01.07 or newer
• Storgage area will be taken from RAM – Font memory. If there is no
memory free, command will be ignored.
• Storage can be freed with
• GS ( k pL pH cn fn (cn = 0, fn = 0)
• The using of full possible size depends from the content of PDF417. The
maximum of possible bytes are 5420, but the mximum of used PDF417
codewords are 926. The errorlevel is fixed by 1.
137
Programmers Guide TH230/TH230+
138
TH230/TH230+ Programmers Guide
139
Programmers Guide TH230/TH230+
Description: Stores the QR symbol data (d1…dk) in the symbol storage area.
140
TH230/TH230+ Programmers Guide
Description: Specifies the count of Data-Segments in one Line. Contains the barcode
more Segments, the barcode will be wrapped.
If the expand code used with composite code, 4 segments are the
minimum. Less than 4 segments, the barcode will not be printed.
If barcode with set segments to wide for print area, barcode will not be
printed.
141
Programmers Guide TH230/TH230+
GS *
Function: Define downloaded bit image
Code ASCII: GS * x y d1…dk
Code HEX: 0x1D 0x2A x y d1…dk
Range: 1 ≤ x ≤ 80
1 ≤ y ≤ 64 (1 ≤ x × y ≤ 5120)
0 ≤ d ≤ 255
k=x×y×8
Description: Defines a downloaded bit image.
• x specifies (x × 8) dots in the horizontal direction, and y specifies (y × 8)
dots in the vertical direction (see notes).
• d indicates the bit image data.
• k indicates the number of the definition data. k is a parameter for an
explanation; therefore, it is not necessary to be transmitted.
Recommended It is recommended that downloaded graphics function (GS (L / GS 8 L:
Functions: <Function 52 > and <Function 80 > ~ <Function 85>) be used because it
offers the following additional features:
• Multiple number of logo data and mark data can be specified.
• Data control by key code is possible.
• Redefining or deleting the same data is possible.
• Selecting a color for printing is possible.
• Defining data by raster format is possible.
• The remaining capacity of the definition area can be confirmed.
Notes: • Pixel data are arranged column by column. For each x, 8•x columns are
needed (if y = 1, 8 bytes are necessary). For each y, 8 vertically dots will
be defined.
• Data (d) specifies a bit printed to 1 and not printed to 0.
• The downloaded bit image is not defined at the default.
• Once a downloaded bit image has been defined, it is available until
another definition is made, ESC & or ESC @ is executed, the printer is
reset, or the power is turned off.
• A downloaded bit image and a user-defined character cannot be defined
simultaneously.
• When this command is executed, the user-defined character is cleared.
• When ESC & is executed, the user-defined character is cleared.
• The downloaded bit image is printed by GS /.
142
TH230/TH230+ Programmers Guide
• The relationship between bit image data and print result is as follows.T
LSB
d2 dy+2 … dy•7+2 … dk-2 MSB
LSB
. . … … dk-1 MSB
. .
LSB
dy dy•2 … dy•8= … dk=dx•8 MSB
df(x=1)= •y
dx•8•y LSB
GS /
Function: Print downloaded bit image
Code ASCII: GS / m
Code HEX: 0x1D 0x2F m
Range: 0 ≤ m ≤ 3, 48 ≤ m ≤ 51
Description: Prints a downloaded bit image using the mode specified by m, as follows:
m Mode
0, 48 Normal
1, 49 Double-width
2, 50 Double-
height
3, 51 Quadruple
Recommended It is recommended that NV graphics function (GS ( L/GS 8 L: <Function 52>
Functions: and <Function 80> ~ <Function 85>) be used because it offers the
following additional features:
• Multiple logo data and mark data can be specified. (except for some
models)
• Data can be controlled by key code.
• Redefining or deleting the same data is possible.
• Color can be specified for the definition data.
• Data can be defined by raster format.
• The remaining capacity of definition area can be confirmed.
143
Programmers Guide TH230/TH230+
Notes:
• This command is ignored if a downloaded bit image has not been defined.
• When standard mode is selected, this command is enabled only when
there is no data in the print buffer. If data exists in the print buffer, the
printer processes m as normal data.
• When page mode is selected, this command develops the downloaded bit
image data in the print buffer but the printer does not print the
downloaded bit image data.
• If a downloaded bit image exceeds one line, the excess data is not
printed.
• This command feeds as much paper as is required to print the
downloaded bit image, regardless of the line spacing specified by ESC 2 or
ESC 3.
• The downloaded bit image is not affected by print mode (emphasized,
double-strike, underline, character size, white/black reverse printing, or
90° clockwise-rotated upside-down printing mode).
• The downloaded bit image is defined by GS ✻.
• Downloaded bit image is printed in the default dot density (dot density of
vertical and horizontal direction in normal mode) defined by GS L
<Function 49>.
• After printing the downloaded bit image, the printing position is set to
the left of the printing area. The printer is in the beginning of a line and
data is not in the print buffer.
• Modes that can be specified and relation of the magnification of the print
result are as follows:
This printer does not support the GS ( L/GS 8 L graphics function. The
values of [Dot Density] and [Maximum Print Area (dot)] are the same as
for graphics function GS ( L/GS 8 L of Function 69.
Magnification
M Mode Width Height
0, 48 Normal 1 times 1 times
1, 49 Double-width double 1 times
2, 50 Double- 1 times double
height
3, 51 Quadruple double double
144
TH230/TH230+ Programmers Guide
GS :
Function: Start/end macro definition
Code ASCII: GS :
Code HEX: 0x1D 0x3A
Description: Starts or ends macro definition.
145
Programmers Guide TH230/TH230+
GS @
Function: Erase User Flash/RAM Sector
Code ASCII: GS @ n
Code HEX: 0x1D 0x40 n
Range: 49 ≤ n ≤ 50 (TH230)
49 ≤ n ≤ 51 (TH230+ )
Description: n = 49 (ASCII n = 1)
This command erases all 64K Flash Memory sectors allocated to user-defined
character and logos storage in Flash . Those sectors should be erased only in
one situation: when the logo definition area is full and an application is
attempting to define new logos. In both cases, all logos and character set
definitions are erased and must be redefined.
n = 50 (ASCII n = 2)
This command erases all sectors available for user data storage.
n = 51 (ASCII n = 3) (TH230+ only)
This command erases all sectors available for user-defined character and
logos storage in RAM.
Printer returns NAK(0x15) if erase failure or READY (0x0D) if erase is finished
Notes: • Erases a page of Flash Memory and sends a carriage return when the
operation is complete.
• Important: While erasing Flash Memory, the printer disables all
interrupts, including communications. To provide feedback to the
application, the printer responds to the application when the erase is
complete. After sending the Erase User Flash Sector (GS @ n) command,
an application should wait for the response from the printer before
sending data. Otherwise, data will be lost. If an application is unable to
receive data, it should wait a minimum of five seconds after sending the
Erase User Flash Sector (GS @ n) command before sending data.
Reference: See command “Flash Memory User Sectors Allocation” (GS “ U n1 n2).
146
TH230/TH230+ Programmers Guide
GS B
Function: Turn white/black reverse printing mode on/off
Code ASCII: GS B n
Code HEX: 0x1D 0x42 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Turns white/black reverse printing mode on or off.
• When the LSB of n is 0, white/black reverse printing mode is turned off.
• When the LSB of n is 1, white/black reverse printing mode is turned on.
Notes: • The white/black reverse printing mode is effective for all characters
(except for HRI characters).
• When white/black reverse printing mode is turned on, it also affects the
right-side character spacing set by ESC SP.
• When white/black reverse printing mode is turned on, it does not affect
the space between lines.
• When underline mode is turned on, the printer does not underline
white/black reverse characters.
• This command is effective until ESC @ is executed, the printer is reset, or
the power is turned off.
• In white/black reverse printing mode, characters are printed in white on a
black background.
147
Programmers Guide TH230/TH230+
GS H
Function: Select printing position of HRI characters
Code ASCII: GS H n
Code HEX: 0x1D 0x48 n
Range: 0≤n≤3
48 ≤ n ≤ 51
Default: n=0
Description: Selects whether the printer prints the HRI characters or not and printing
position of HRI character when printing a bar code, using n as follows:
n Printing position
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
148
TH230/TH230+ Programmers Guide
GS I
Function: Transmit printer ID
Code ASCII: GS I n
Code HEX: 0x1D 0x49 n
Range: 1 ≤ n ≤ 4, 49 ≤ n ≤ 52, 65 ≤ n ≤ 68, n = 70, n = 112, 128 ≤ n ≤ 146,
148 ≤ n ≤ 149, 157 ≤ n ≤ 160, 254 ≤ n ≤ 255
Description: Transmit the specified printer ID.
n specifies the ID of the printer as follows:
n Printer ID Specifications
1, Printer model ID Printer model = 0x24
49
2, Type ID See table below
50
3, Firmware version ID 1 Byte – FW version in binary
51 format in bit 0…bit 3
4, Logo Definition See table below
52
65 Firmware version String with 6 characters
“_xx.xx”
66 Manufacturer “_WINCOR-NIXDORF”
67 Printer model “_TH230“ or “_TH230+”
68 Serial number Serial number of the printer
– String
69 ASIA-Character generator name String with max 17
characters
70 Firmware date String format “_DDMMYY”
112 Ignored Ignored
128 Manufactured Board Number * “_A”..”_Z”, “_AA”..“_AZ”, …
129 Serial number date (Production Production date string
date – set by GS ( E pL pH fn “_DDMMYY”
d1…dn (fn=130))
130 Character sets All built in character sets of
the printer (see example
below)
131 Character generator name String with max 17
characters
132 Character generator version String with 6 characters
(_xx.xx)
133 Horizontal resolution “_203 dpi”
134 Vertical resolution “_203 dpi”
149
Programmers Guide TH230/TH230+
Notes: • The ID of the printer is transmitted when the data in the receive buffer is
developed. Therefore, there may be a time lag between receiving this
command and transmitting the status, depending on the receive buffer
status. This means that this command is no real time command. Therefore
this command doesn’t work while the printer is in the Offline State.
• n = 1, 2, 3: In this case the printer sends 1 byte of data.
150
TH230/TH230+ Programmers Guide
Value
Bit Function
0 1
0 Multi-byte code No Yes
characters
1 Cutter Not Mounted
mounted
2 Mark sensor Disabled Enabled
3 Undefined
4 Not used Fixed to 0
5 Undefined
6 Undefined
7 Not used Fixed to 0
151
Programmers Guide TH230/TH230+
• n = 4 or 52 Logo Definition:
Functio Value
Bit
n 0 1
0 Logo No logo downloaded Logo downloaded (SRAM
(SRAM or Flash) or Flash)
1 Not used Fixed to 0
2 Not used Fixed to 0
3 Not used Fixed to 0
4 Not used Fixed to 0
5 Not used Fixed to 0
6 Not used Fixed to 0
7 Not used Fixed to 0
• n = 130 Character sets:
Example:
“_0:PC437,1:PC850,2:PC852,3:PC860,4:PC863,5:PC865,6:PC858,7:PC866,
8:PC1252,9:PC862,10:PC737,11:PC874” NUL
Value Meaning
(ASCII)
‘0’ not plugged
‘1’ plugged
‘2’ no information
available
• n = 158 Interface Board Description:
Example:
“_RS232,Cash Drawer,Customer Display” NUL
Reference: Table for the Transmit Status Identification (see page 199).
152
TH230/TH230+ Programmers Guide
GS L
Function: Set left margin
Code ASCII: GS L nL nH
Code HEX: 0x1D 0x4C nL nH
Range: 0 ≤ (nL + nH × 256) ≤ 65535 (0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255)
Default: (nL + nH × 256) = 0 (nL = 0, nH = 0)
Description: In standard mode, sets the left margin to (nL + nH × 256) × (horizontal motion
unit) from the left edge of the printable area.
Notes: • When standard mode is selected, this command is enabled only when
processed at the beginning of the line.
• The left margin has no effect in page mode. If this command is processed
in page mode, the left margin is set and it is enabled when the printer
returns to standard mode.
• If the setting exceeds the printable area, the left margin is automatically
set to the maximum value of the printable area.
• If this command and GS W set the printing area width to less than the
width of one character, the printing area width is extended to
accommodate one character for the line.
• Horizontal motion unit is used.
• If horizontal motion unit is changed after changing left margin, left margin
setting is not changed.
• Left margin setting is effective until ESC @ is executed, the printer is
reset, or the power is turned off.
• Left margin position is left edge of the printable area. If left margin
setting is changed, left edge of the printable area will move.
• The horizontal motion unit is specified by GS P.
153
Programmers Guide TH230/TH230+
GS P
Function: Set horizontal and vertical motion units
Code ASCII: GS P x y
Code HEX: 0x1D 0x50 x y
Range: 0 ≤ x ≤ 255
0 ≤ y ≤ 255
Default: x = 203
y = 203
Description: Sets the horizontal and vertical motion units to 1/x and 1/y inches,
respectively.
• When x = 0, the default setting of the horizontal value is used.
• When y = 0, the default setting of the vertical value is used.
Notes: • The horizontal direction is perpendicular to the paper feed direction and
the vertical direction is the paper feed direction.
• The horizontal and vertical motion units indicate the minimum pitch used
for calculating the values of related commands (shown on the next
screen).
• In standard mode, the following commands use x or y.
• Commands using x: ESC SP, ESC $, ESC \, GS L, and GS W
• Commands using y: ESC 3, ESC J, ESC K and GS V
• In page mode, the following commands use x or y, when the starting
position is set to the upper left or lower right of the printing area using
ESC T.
• Commands using x: ESC SP, ESC $, ESC W, ESC \ and FS S.
• Commands using y: ESC 3, ESC J, ESC K, ESC W, GS $, GS V, and GS \.
• In page mode, the following commands use x or y, when the starting
position is set to the upper right or lower left of the printing area using
ESC T.
• Commands using x: ESC 3, ESC J, ESC K, ESC W, GS $, and GS \
• Commands using y: ESC SP, ESC $, ESC W, ESC \, FS S and GS V
• Setting of this command is effective until ESC @ is executed, the printer is
reset, or the power is turned off.
• The calculated result from combining this command with others is
truncated to the minimum value of the mechanical pitch.
• This command does not affect the current setting values.
• The default values equal the normal dot pitch horizontally and ½ dot pitch
vertically.
154
TH230/TH230+ Programmers Guide
GS V
Function: Select cut mode and cut paper
Code ASCII: GS V m
GS V m n
Code HEX: 0x1D 0x56 m
0x1D 0x56 m n
Range: m = 0, 1, 48, 49
m = 65, 66, 67;
0 ≤ n ≤ 255
Description: Selects a mode for cutting paper and executes paper cutting. The value of m
selects the mode as follows:
m Print mode
0, 48 Executes a full cut (cuts the paper completely).
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]).
Notes: • When standard mode is selected, these commands are enabled only when
processed at the beginning of the line.
• When using these commands, there is a gap between the cutting position
and the printing position.
• Function 0, 1, 48, 49: If no autocutter is installed, this command feeds the
paper to the tear-off edge.
• Function 0, 1, 48, 49: Cut is executed without feeding the print position to
the cut position.
• Function 65, 66: To cut below the last printed line set n to 0.
• Function 65, 66: If n > 0, the printer feeds the paper to (cutting position +
[n * vertical motion unit]) and cuts it.
• Function 65, 66, 67: If n = 0, the printer feeds to the cutting position and
executes a full/partial cut
• Function 65, 66, 67: The distance between printing position and cutting
position is 17 mm.
• Function 65, 66, 67: If no autocutter is installed, the printer only feeds the
paper to the tear-off edge and additionally for specified amount.
• Function 65, 66, 67: Vertical motion unit is used for calculating a paper
feed amount.
155
Programmers Guide TH230/TH230+
• Function 67: This function can be used for compensation of the head loss
because of the distance between print line and cutting position.
• Function 67: To realize the smallest possible head loss of 5 mm set n to 96
steps (12mm).
• Function 67: The maximum value for backward feed is 96 steps (12 mm).
This reduces the top margin from 17 mm to 5 mm.
• Function 67: programming hints see page 8.
• The vertical motion unit is specified by GS P (see page 154).
• GS V 0: If Black mark sensor is enabled this command cuts paper not at the
mark position. To cut at mark positions please use GS V 65, 66 or 67.
156
TH230/TH230+ Programmers Guide
GS W
Function: Set printing area width
Code ASCII: GS W nL nH
Code HEX: 0x1D 0x57 nL nH
Range: 0 ≤ (nL + nH × 256) ≤ 65535 (0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255)
Default: Entire printable area
nL = 64, nH = 2 (when paper width is set to 80 mm (576 dots))
nL = 152, nH = 1 (when paper width is set to 57.5 mm (408 dots))
Description: In standard mode, sets the printing area width to (nL + nH × 256) × (horizontal
motion unit).
Notes: • When standard mode is selected, this command is enabled only when
processed at the beginning of the line.
• The printing area width has no effect in page mode. If this command is
processed in page mode, the printing area width is set and it is enabled
when the printer returns to standard mode.
• If the [left margin + printing area width] exceeds the printable area, the
printing area width is automatically set to [printable area – left margin].
• If this command and GS L set the printing area width to less than the
width of one character, the printing area width is extended to
accommodate one character for the line.
• Horizontal motion unit is used.
• If horizontal motion unit is changed after setting the printable area width,
the printable area width setting will not be changed.
• Printable area width setting is effective until ESC @ is executed, the
printer is reset, or the power is turned off.
• The horizontal motion unit is specified by GS P.
• See GS ( E Functions 5 and 6 for specifying the paper width.
157
Programmers Guide TH230/TH230+
GS \
Function: Set relative vertical print position in page mode
Code ASCII: GS \ nL nH
Code HEX: 0x1D 0x5C nL nH
Range: –32768 ≤ (nL + nH × 256) ≤ 32767 (0 ≤ nL ≤ 255, - 128 ≤ nH ≤ 127)
Default: None
Description: In page mode, moves the vertical printing position to (nL + nH × 256) ×
(vertical or horizontal motion unit) from the current position.
Notes: • This command is enabled only in page mode. If this command is
processed in standard mode, it is ignored.
• The printer ignores any setting that exceeds the printing area set
by ESC W.
• A positive number specifies movement to the downward, and a negative
number specifies movement to the upward. N pitch movement to the
downward: (nL + nH × 256) = N. Use the complement of N for setting N
pitch movement to the upward: (nL + nH × 256) = 65536 – N.
• The horizontal or vertical motion unit is used for the print direction set
by ESC T.
• When the starting position is set to the upper left or lower right of the
printing area using ESC T, the vertical motion unit is used.
• When the starting position is set to the upper right or lower left of the
printing area using ESC T, the horizontal motion unit is used.
• Even if vertical or horizontal motion unit is changed after changing the
printing position, the setting of printing position will not be changed.
• The vertical or horizontal motion unit is specified by GS P.
158
TH230/TH230+ Programmers Guide
GS ^
Function: Execute macro
Code ASCII: GS ^ r t m
Code HEX: 0x1D 0x5E r t m
Range: 1 ≤ r ≤ 255
0 ≤ t ≤ 255
m = 0, 1
Default: None
Description: Executes a macro r times while waiting t × 100 msec for each macro
execution, using the mode specified by m as follows:
• When m = 0, the macro executes r times continuously at the interval
specified by t.
• When m = 1, the printer waits for the period specified by t, blinks the
Paper LED, and then waits for the Paper feed button to be pressed. After this
button is pressed, the printer executes the macro once. The printer repeats
this operation r times.
Notes: • Macro function is useful to print the same data repeatedly. To define a
macro definition, send GS : just before and after the data desired to be
repeated. And then execute macro by using GS ^ to print the same data
repeatedly. Macro function eliminates the need for sending all the print
data every time.
• If a macro is not defined or if r is 0, this command is ignored.
• Even if the panel buttons are disabled by ESC c 5, paper feed button will
be enabled temporarily while printer is waiting for the button to be
pressed (m = 1). However, paper can not be fed if the paper feed button
is pressed.
• If this command is processed while a macro is being defined, the printer
cancels macro definition and clears the definition.
• This command can not be contained in the macro. Do not use this
command when the macro is defined.
• When m = 1, the Paper LED indicator blinks during a macro waiting state.
• See GS : for a state-machine!
• If the printer is in Sleep Mode the first wait time is extended by the
wake-up time for state “Sleep Mode 1” and (if necessary) the power
wake-up time for state “Printing Mode”.
159
Programmers Guide TH230/TH230+
GS a
Function: Enable/disable Automatic Status Back (ASB)
Code ASCII: GS a n
Code HEX: 0x1D 0x61 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Enable or disable ASB (Automatic Status Back) and specifies the status items
to include, using n as follows:
Bit Function Value
0 1
0 Drawer kick-out connector status Disabled Enabled
1 Busy status Disabled Enabled
2 Error status Disabled Enabled
3 Paper roll sensor status Disabled Enabled
4 Handshake customer display Disabled Enabled
5 Undefined
6 Undefined
7 Undefined
Notes: • ASB is the function that transmit the status of [cover open/close],
[Online/Offline] from the printer automatically. It is called [ASB function]
and the status is [ASB status]. If you use ASB, application can acquire the
printer change in a real-time and passively.
• Select any status enabled (except n = 0) and ASB starts. Then transmit the
current ASB status. After that during ASB is active, the selected enabled
ASB status is transmitted whenever the status changes.
• When n = 0, ASB is disabled. During ASB is disabled, ASB status is not
transmitted.
• Multiple status items can be selected.
• During ASB is active, ASB status is transmitted whenever the status
changes even if ESC = is not selected.
• This command setting is effective until the printer is reset or power is
turned off.
• During Block data [header – NUL] is transmitted, ASB is disabled
temporarily. Therefore you can not get the printer status change through
ASB status during block data [header – NUL] is transmitted.
• Basic ASB status is 4-byte configuration [first byte – fourth byte].
• If the error status is enabled, a change in the following conditions will
trigger the ASB:
- Cover
- Cutter Error
- Out-of-Range Printhead Temperature
- Out-of-Range Voltage
- Paper Exhaust
• If the busy status is enabled, a change in the following conditions will
trigger the ASB:
- Paper feed button
160
TH230/TH230+ Programmers Guide
161
Programmers Guide TH230/TH230+
Bit 0 and Bit 1: To avoid false reports the paper near end sensor is
monitored by a 0.2 m paper feed hysteresis. That means the printer
doesn’t report paper near end to the host until 0.2 m paper is feed and all
the time the paper near end sensor detects no paper! If the linefeed
button is pressed within the hysteresis, the printer reports paper near
end immediately.
• Fourth byte (paper sensor information)
Value
Bit Function
0 1
0 Sleep Mode status Normal-Mode Sleep Mode
1 Undefined
2 Undefined
3 Undefined
4 Not used Fixed to 0
5 Undefined
6 Undefined
7 Not used Fixed to 0
• The printer transmits a 4-byte ASB status message without confirming
whether the host can receive data. ASB status, except for the XOFF code,
is always consecutive.
• ASB status can be differentiated by other transmission data by Bit 0, 1, 4,
and 7 of the first byte. Process the transmitted data from the printer as
ASB status which is consecutive 3 byte if it is “0xx1xx00” [x = 0 or 1].
However, the processing shown in the following is necessary in the
identifying processing of ASB status.
• When processing block data [Header ~ NUL], do not identify ASB status.
• When the host communicates with the printer by XON/XOFF control, the
host should process 4 bytes of data, except for the XOFF code, as ASB
status. ASB status configuration is different from that of the XOFF code.
• Third byte (paper sensor information): When the paper roll cover is open,
paper detection (detected by the paper roll end sensor) may be incorrect.
162
TH230/TH230+ Programmers Guide
GS b
Function: Turn smoothing mode on/off
Code ASCII: GS b n
Code HEX: 0x1D 0x62 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Turns smoothing mode on or off.
• When the LSB of n is 0, smoothing mode is turned off.
• When the LSB of n is 1, smoothing mode is turned on.
Notes: • The smoothing mode is effective for all quadruple-size or larger
characters (except for HRI characters).
• The smoothing mode is not effective for all Asia characters.
• This command is effective until ESC @ is executed, the printer is reset, or
the power is turned off.
• The emphasized mode is not effective if smooth mode on (GS b)
• The italic mode is not effective if smooth mode on (GS b)
GS f
Function: Select font for HRI characters
Code ASCII: GS f n
Code HEX: 0x1D 0x66 n
Range: n = 0, 1, 48, 49
Default: n=0
Description: Selects a font for the Human Readable Interpretation (HRI) characters when
printing a bar code, using n as follows:
N Font of HRI characters
0, 48 Font A
1, 49 Font B
Notes: • The font set by this command is effective only for HRI character.
• The composition of the character of each font is different depending on
the model.
• Configurations of font A and font B are different, depending on the
printer model.
• HRI characters are printed at the position specified by GS H.
• HRI character is Human Readable Interpretation character indicated with
barcode.
• Character configurations
Font A: 13 * 24 Dots
Font B: 10 * 24 Dots
163
Programmers Guide TH230/TH230+
GS g 0
Function: Initialize maintenance counter
Code ASCII: GS g 0 m nL nH
Code HEX: 0x1D 0x67 0x30 0x00 nL nH
Range: m=0
(nL + nH × 256) = 20, 21, 50, 52~57, 59
Description: Sets the resettable maintenance counter specified by nL and nH to 0.
• nL and nH specify a resettable maintenance counter number as (nL + nH ×
256).
Counter Specification
(nL + nH x 256)
20 Paper feed of 1/7.52 inch as one line
21 All fired dots
50 Cutter operations
52 Cutter Errors
53 Black Mark Errors
54 Thermistor Errors
55 Low Voltage Errors
56 High Voltage Errors
57 Cover Open Counter
59 Maximum Head Temperature
Notes: • In standard mode, this command is effective only when processed at the
beginning of a line.
• Unsupported counter numbers cannot be specified.
• Do not use this command while a macro is being defined, because the
command cannot be included in the macro.
• There are two kinds of maintenance counters: resettable counters and
accumulation counters. A resettable counter is a maintenance counter
that can be initialized, and an accumulation counter indicates the counter
value from when the printer starts operation. An accumulation counter
cannot be initialized (see GS g 2 for details of the accumulation counter.)
• Take the following into account when writing data to a non-volatile
memory.
• The printer may be in BUSY state when processing this command. In this
case, be sure not to send a command from the host to the printer,
because the printer will not receive the command.
164
TH230/TH230+ Programmers Guide
165
Programmers Guide TH230/TH230+
GS g 2
Function: Transmit maintenance counter
Code ASCII: GS g 2 m nL nH
Code HEX: 0x1D 0x67 0x32 0x00 nL nH
Range: m=0
(nL + nH × 256) = 20, 21, 50, 52~57, 59, 148, 149, 178, 198~200, 238~240
Description: Transmits the value of the counter specified by the number.
• nL and nH specify a maintenance counter number as (nL + nH × 256).
Counter
Type Description
(nL + nH x 256)
LF counter – 1/7.52 inch (current
20 Resettable mechanic)
21 Resettable Fired dots (current print head)
50 Resettable Cutter operations (current unit)
52 Resettable Cutter Errors
53 Resettable Black Mark Errors
54 Resettable Thermistor Errors
55 Resettable Low Voltage Errors
56 Resettable High Voltage Errors
57 Resettable Cover Open Counter
59 Resettable Maximum Head Temperature
148 Accumulation LF counter – 1/7.52 inch (total)
149 Accumulation Counts all fired dots (total)
178 Accumulation Cutter operations (total)
198 Accumulation Power on time in hours (total)
199 Accumulation Power on cycles
200 Accumulation EEPROM update cycles
238 Accumulation Paper feeding mechanism changes
239 Accumulation Print head changes
240 Accumulation Cutter changes
Notes: • There are two kinds of maintenance counters: resettable counters and
accumulation counters. A resettable counter is a maintenance counter
that can be initialized by GS g 0, and an accumulation counter indicates
the counter value from when the printer starts operation.
• When a counter reaches its maximum value, its value is reset to 0 in the
next updating process.
• Unsupported counter numbers cannot be specified.
• The maintenance counter value consists of [Header + data + NUL], as
follows:
• Header: Hexadecimal = 0x5F/Decimal = 95: 1-byte data
• Data: Counter value = 0x30~ 0x39/Decimal = 48~ 57: 1-byte data
• NUL: Hexadecimal = 0x00/Decimal = 0: 1-byte data
166
TH230/TH230+ Programmers Guide
• When the counter values are transmitted, the printer converts them to
character codes corresponding to the decimal value and transmits from
the most significant bit.
Example: When the counter value is 120, the transmission data for “120”
is 3 bytes, consisting of 49, 50 and 48.
• The printer becomes BUSY immediately before transmitting a header and
recovers to READY after transmitting a NUL (unless there are other causes
of the printer being BUSY).
• The resettable maintenance counter can be initialized by GS g 0.
• The maintenance counter can be used for establishing the time for
replacing consumed parts or cleaning.
• Maintenance counter data can be differentiated from other transmission
data by the header of the block data. After outputting GS g 2 to the
printer, if the data transmitted from the printer is
[Hex=0x5F/Decimal=95], the host should process the data up to NUL
[Hex=0x00/Decimal=0] as maintenance counter data. There is an
exception, described below:
• When the host is communicating with the printer by XON/XOFF control,
the XOFF code might interrupt [Header ~ NUL].
• When transmitting data [Header ~ NUL] with this command, ASB status
and real-time commands cannot be used.
• Be sure to use this function when the host is in the READY state.
• The counter values may be different from actual counting depending on
the time difference or the error occurring.
• (nL + nH × 256) = 21, 149: The counter value for fired dots must be
multiplied by 1000.
• A detailed description how statistical information is saved can be found
on page 278.
• (nL + nH × 256) = 20, 148: Example for calculating the Linefeed Counter if a
receipt is printed with 12 mm backward feed after cutting. Let’s assume
the high of the printed graphics is 768 dots.
• Height of the printed graphics = 768 dots
+ Distance between thermal print lines and cutter = 17 mm * 8 = 136
steps
+ Backward feed to reduce the head loss = 12 mm * 8 = 96 steps
+ compensation of the mechanical clearance = 2 * 32 = 64 steps
167
Programmers Guide TH230/TH230+
GS h
Function: Set bar code height
Code ASCII: GS h n
Code HEX: 0x1D 0x68 n
Range: 1 ≤ n ≤ 255
Default: n = 216
Description: Sets the height of a bar code.
• n specifies number of dots in the vertical direction of a bar code
• Following minimum height exists
168
TH230/TH230+ Programmers Guide
GS k
Function: Print bar code
Code ASCII: ➀ GS k m d1 … dk NUL
(without 2D)
Code HEX: ➀ 0x1D 0x6B m d1 … dk NUL
(without 2D)
Code ASCII: ➁ GS k m n d1 ... dn
(without 2D)
Code HEX: ➁ 0x1D 0x6B m n d1 ... dn
(without 2D)
Code ASCII: ➁ GS k m n d1 ... dk | dk+2 … dn
(with 2D)
Code HEX: ➁ 0x1D 0x6B m n d1 … dk 0x7C dk+2 … dn
(with 2D)
Range: ➀ 0 ≤ m ≤ 6, 10 ≤ m ≤ 18 (k and d depend on the bar code system
(without 2D) used)
Range: ➁ 65 ≤ m ≤ 73, 75 ≤ m ≤ 82 (k, j and d depend on the bar code
(with 2D) system used.
n = k + j +1)
Description: Selects a bar code system and prints the bar code.
• Command is only valid at start of line!
All characters after GS k are used as normal characters, if command not
used at start of line.
• UPC-A, UPC-E, EAN-8, EAN-13, GS1 Databar support in ➁ mixed 1D/2D
data. With 2D-data the barcodes will be encoded like the composite code
specification. Without 2D Data, the barcodes will be encoded like the
normal specific 1D code specification.
• | (0x7C) of barcodes which supports 1D/2D data indicates the separator
between 1D and 2D data. Data before the separator are 1D, behind 2D data.
• k of ➀ indicates the number of the 1D bar code data to be printed. k does
not need to be sent. For some barcodes k could be infinite, but the printer
has an limitation until 255.
• n of ➁ indicates the number of the 1D + Separator + 2D bar code data.
• d indicates the character code of the bar code data to be printed.
• m specifies a bar code system as follows: (“SP” in the table indicates
space.)
169
Programmers Guide TH230/TH230+
Numb Number
Barcode 1D/2
m er of of Characters Remarks
system D
data characters
0
11 ≤ k ≤ 48 ≤ d ≤
0 UPC-A 1D Fixed ~
12 57
9
0
11 ≤ k ≤ 48 ≤ d ≤
1 UPC-E 1D Fixed ~
12 57
9
0
(E/J)AN1 12 ≤ k ≤ 48 ≤ d ≤
2 1D Fixed ~
3 13 57
9
0
48 ≤ d ≤
3 (E/J)AN8 1D Fixed 7 ≤ k ≤ 8 ~
57
9
0
48 ≤ d ≤
~
57
9
A
65 ≤ d ≤
~
90
Z
S
32
P
Variab 1 ≤ k ≤ $ 36
4 CODE39
le 255 % 37
➀
+ 43
- 45
. 46
/ 47
start/stop
character will be
* 42
added
automatically
ITF
0
(Interlea Variab 1 ≤ k ≤ 48 ≤ d ≤
5 ~
ved 2 of le 255 57
9
5)
0
48 ≤ d ≤
~
57
9
A
65 ≤ d ≤ (start/stop
CODABA Variab 1 ≤ k ≤ ~
6 68 character)
R (NW7) le 255 D
$ 36
+ 43
- 45
. 46
170
TH230/TH230+ Programmers Guide
/ 47
: 58
Variab 1 ≤ k ≤
10 PDF 417 32 ≤ d ≤ 255
le 255
Variab
11 GS1 1D 1 ≤ k ≤ 13 0~9 48 ≤ d ≤ 57
le
GS1
Variab
12 Truncat 1D 1 ≤ k ≤ 13 0~9 48 ≤ d ≤ 57
le
ed
GS1 Variabl 1 ≤ k ≤
13 1D 0~9 48 ≤ d ≤ 57
Stacked e 13
GS1
Stacked
Variabl 1 ≤ k ≤
14 Omni- 1D 0~9 48 ≤ d ≤ 57
e 13
Directio
nal
GS1 Variabl 1 ≤ k ≤
15 1D 0~9 48 ≤ d ≤ 57
Limited e 13
0~ 48 ≤ d ≤
9 57
A~ 65 ≤ d ≤
Z 90
a~ 97 ≤ d ≤
z 122
SP 32
! 33
” 34
# 35 (FNC1)
% 37
& 38
‘ 39
GS1 1≤k≤ ( 40
Variabl
16 Expande 1D 72 ) 41
e
d * 42
+ 43
, 44
- 45
. 46
/ 47
: 58
; 59
< 60
= 61
> 62
? 63
_ 95
171
Programmers Guide TH230/TH230+
11 ≤ k ≤ 0~ 48 ≤ d ≤
1D Fixed
12 9 57
65 UPC-A
Variabl CC-A, CC-B (4
2D 1≤j≤n 0≤ d ≤ 255
e Columns)
➁
11 ≤ k ≤ 0~ 48 ≤ d ≤
1D Fixed
12 9 57
66 UPC-E
Variabl CC-A, CC-B (2
2D 1≤j≤n 0≤ d ≤ 255
e Columns)
12 ≤
0~ 48 ≤ d ≤
1D Fixed k≤
9 57
67 (E/J)AN13 13
1≤j CC-A, CC-B (4
2D Variable 0≤ d ≤ 255
≤n Columns)
7≤k 0~ 48 ≤ d ≤
1D Fixed
JAN8 ≤8 9 57
68
(EAN8) 1≤j CC-A, CC-B (3
2D Variable 0≤ d ≤ 255
≤n Columns)
48 ≤
0~9 d≤
57
65 ≤
A~Z d≤
90
1 ≤ n SP 32
69 CODE39 Variable ≤ $ 36
255 % 37
+ 43
- 45
. 46
/ 47
(start/stop
* 42
character)
ITF
1≤n 48 ≤
(Interleav
70 Variable ≤ 0~9 d≤
ed
255 57
2 of 5)
48 ≤
0~9 d≤
57
65 ≤
A~D d≤
1≤n
CODABAR 68
71 Variable ≤
(NW7) $ 36
255
+ 43
- 45
. 46
/ 47
: 58
172
TH230/TH230+ Programmers Guide
48 ≤
0~9 d≤
57
65 ≤
A~Z d≤
1≤n 90
72 CODE93 Variable ≤ SP 32
255 $ 36
% 37
+ 43
- 45
. 46
/ 47
1≤n≤
73 CODE128 Variable 0 ≤ d ≤ 105
255
1≤n≤
75 PDF 417 Variable 0 ≤ d ≤ 255
255
1≤k≤ 0~ 48 ≤ d ≤
1D Variable
13 9 57
76 GS1
1≤j≤ CC-A, CC-B (4
2D Variable 0≤ d ≤ 255
n Columns)
1≤k≤ 0~ 48 ≤ d ≤
GS1 1D Variable
13 9 57
77 Truncate
1≤j≤ CC-A, CC-B (4
d 2D Variable 0≤ d ≤ 255
n Columns)
1≤k≤ 0~ 48 ≤ d ≤
1D Variable
GS1 13 9 57
78
Stacked 1≤j≤ CC-A, CC-B (4
2D Variable 0≤ d ≤ 255
n Columns)
GS1 1≤k≤ 0~ 48 ≤ d ≤
1D Variable
Stacked 13 9 57
79 Omni-
1≤j≤ CC-A, CC-B (4
Direction 2D Variable 0≤ d ≤ 255
n Columns)
al
1 ≤ k ≤ 0~ 48 ≤ d ≤
1D Variable
GS1 13 9 57
80
Limited 1≤j≤ CC-A, CC-B (3
2D Variable 0≤ d ≤ 255
n Columns)
0~ 48 ≤ d ≤
9 57
A~ 65 ≤ d ≤
GS1
1≤k≤ Z 90
81 Expande 1D Variable
72 a~ 97 ≤ d ≤
d
z 122
SP 32
! 33
173
Programmers Guide TH230/TH230+
” 34
35
#
(FNC1)
% 37
& 38
‘ 39
( 40
) 41
* 42
+ 43
, 44
- 45
. 46
/ 47
: 58
; 59
< 60
= 61
> 62
? 63
_ 95
1≤j≤ CC-A, CC-B (4
2D Variable 0≤ d ≤ 255
n Columns)
1≤k≤
UCC 1D Variable 0 ≤ d ≤ 105
48
82 EAN128
1≤j≤ CC-A, CC-B (2
CC-A/B 2D Variable 0≤ d ≤ 255
n Columns)
1≤k≤
UCC 1D Variable 0 ≤ d ≤ 105
48
83 EAN128
1≤j≤ CC-C (k < 57, 4
CC-C 2D Variable 0≤ d ≤ 255
n Columns)
Notes for ➀ • If not start of line, this command will be ignored.
and ➁: • When standard mode is selected, this command is enabled only when the
printing position is at the head of a line or when no data exists in the print
buffer.
• When page mode is selected, this command develops the bar code data
in the print buffer but the printer does not print the bar code data.
• The bar code width that exceeds the printing area cannot be specified.
• This command feeds as much paper as required to print the bar code,
regardless of the line spacing specified by line space setting commands.
• The bar code is not affected by print mode (emphasized, underline, 90°
clockwise-rotated or upside-down printing mode).
• After bar code printing, the printing position moves to the left end of the
printing area. The printer enters the status of the printing position at the
head of a line or no data exists in the print buffer.
• The values of m from 0 to 6 in ➀ and from 65 to 71 in ➁ select the same
bar code system, respectively. The printing results are the same.
• This command specifies m = 0 to 6 and ends with a NUL code.
174
TH230/TH230+ Programmers Guide
• When an odd number of data is processed for ITF bar code system (m =
5), the printer ignores the last received data.
• The printer processes n bytes from the next data as bar code data by this
command specifying m = 65 to 71.
• Printing area does not include quiet zone (left/right margin) of bar code.
Make sure to secure the quiet zone, using this command.
• When printing ladder bar code (bar code rotated by 90 degrees in page
mode) the printer starts actual printing after it reaches control speed for
printing ladder bar code. It is needed to feed paper amount of 10 dots or
less in this operation. Therefore, if there is no area more than 10 dots at
the top of the page, no-print area will be generated.
• If the printable area is to small for barcode, barcode will not printed!
• If the separator for composite code is given without composite code,
barcode will not be printed!
UPC-A • Modular check character is processed as following.
(m = 0, 65) • Automatically added when processing data is 11 byte.
process: • 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- • Barcode is combination of UPC-A and the composite codes CC-A and CC-B
Composite • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEZ)
(m = 65) • Barcode can be printed without composite part
process: • Barcode will not be printed if the separator is given without composite
code
UPC-E • The first data ( d1) is processed as number system character (NSC) so 0
(m = 1, 66) must be specified.
process: • 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.
• 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.
JAN13/EAN • Modular check character is processed as follows:
13 (m = 2, • Automatically added when processing data is 13 byte.
67) process: • 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.
JAN8/EAN8 • Modular check character is processed as follows:
(m = 3, 68) • Automatically added when processing data is 7 byte.
process: • 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
175
Programmers Guide TH230/TH230+
checked.
• Left guard bar/center bar/right guard bar are added automatically.
CODE39 • The printer processes the start code (ASCII = */Hex = 2Ah/Decimal = 42)
(m = 4, 69) as follows:
process: • 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 start 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.
ITF • Start code and stop code are added automatically.
(Interleaved • Check digits are not calculated and added.
2 of 5) • Note: ITF request a even count of digits. In case of odd digits, a leading 0
(m = 5, 70) will be inserted if the memory switch “CodeITF Leading 0” is enabled (see
process: GS ( E). In other case last digit will be discarded.
CODABAR • Start code and stop code are not added automatically. Transmit data
(m = 6, 71) including the codes.
process: • Check digits are not calculated and added.
PDF417 • Parameter is set with command GS p
(m = 10, 75) • Printing this barcode synchronize the printer. Therefore, the print would
process: be stopped for a short time.
CODE93 • Start code and stop code are added automatically.
(m = 72) • Check digits (2 character) are calculated and added automatically.
176
TH230/TH230+ Programmers Guide
Value Value
(dezimal (hex)
) Code A Code B Code C
0 00 Space Space “00“
1 01 ! ! “01“
2 02 “ “ “02“
3 03 # # “03“
4 04 $ $ “04“
5 05 % % “05“
6 06 & & “06“
7 07 ‘ ‘ “07“
8 08 ( ( “08“
9 09 ) ) “09“
10 0A * * “10“
11 0B + + “11“
12 0C , , “12“
13 0D - - “13“
14 0E . . “14“
15 0F / / “15“
16 10 0 0 “16“
17 11 1 1 “17“
18 12 2 2 “18“
19 13 3 3 “19“
20 14 4 4 “20“
21 15 5 5 “21“
22 16 6 6 “22“
23 17 7 7 “23“
24 18 8 8 “24“
25 19 9 9 “25“
26 1A : : “26“
27 1B ; ; “27“
28 1C < < “28“
29 1D = = “29“
30 1E > > “30“
31 1F ? ? “31“
32 20 @ @ “32“
33 21 A A “33“
34 22 B B “34“
35 23 C C “35“
36 24 D D “36“
37 25 E E “37“
38 26 F F “38“
39 27 G G “39“
40 28 H H “40
177
Programmers Guide TH230/TH230+
41 29 I I “41
42 2A J J “42“
43 2B K K “43“
44 2C L L “44“
45 2D M M “45“
46 2E N N “46“
47 2F O O “47“
48 30 P P “48“
49 31 Q Q “49“
50 32 R R “50“
51 33 S S “51“
52 34 T T “52“
53 35 U U “53“
54 36 V V “54“
55 37 W W “55“
56 38 X X “56“
57 39 Y Y “57“
58 3A Z Z “58“
59 3B [ [ “59“
60 3C \ \ “60“
61 3D ] ] “61“
62 3E ^ ^ “62“
63 3F _ _ “63“
64 40 NUL ` “64“
65 41 SOH a “65“
66 42 STX b “66“
67 43 ETX c “67“
68 44 EOT d “68“
69 45 ENQ e “69“
70 46 ACK f “70“
71 47 BEL g “71“
72 48 BS h “72“
73 49 HT i “73“
74 4A LF j “74“
75 4B VT k “75“
76 4C FF l “76“
77 4D CR m “77“
78 4E SO n “78“
79 4F SI o “79“
80 50 DLE p “80“
81 51 DC1 q “81“
82 52 DC2 r “82“
83 53 DC3 s “83“
84 54 DC4 t “84“
85 55 NAK u “85“
178
TH230/TH230+ Programmers Guide
86 56 SYN v “86“
87 57 ETB w “87“
88 58 CAN x “88“
89 59 EM y “89“
90 5A SUB z “90“
91 5B ESC { “91“
92 5C FS | “92“
93 5D GS } “93“
94 5E RS ~ “94“
95 5F US DEL “95“
96 60 FNC 3 FNC 3 “96“
97 61 FNC 2 FNC 2 “97“
98 62 SHIFT SHIFT “98“
99 63 CODE C CODE C “99”
100 64 CODE B FNC 4 CODE B
65 CODE
101 FNC 4 A CODE A
102 66 FNC 1 FNC 1 FNC 1
103 67 START_A
104 68 START_B
105 69 START_C
• 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 above).
• 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:
GS1– • Barcode is a combination of GS1 and the composite codes CC-A and CC-B
179
Programmers Guide TH230/TH230+
Composite • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEZ)
(m=11, 76) • Barcode can be print without composite part
process:
• Barcode will not be printed if the separator is given without composite
code
• If encoding of composite code failed, barcode will not be printed
• Example (2001234567890|Composite):
GS1- • Barcode is a combination of GS1 Truncated and the composite codes CC-
Truncated– A and CC-B
Composite • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEZ)
(m=12, 77) • Barcode can be printed without the composite part
process: • Barcode will not be printed if the separator is given without composite
code
• If encoding of composite code failed, barcode will not be printed
• Example (2001234567890|Composite):
GS1- • Barcode is combination of GS1 Stacked and the composite codes CC-A
Stacked– and CC-B
Composite • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEZ)
(m=13, 78) • Barcode can be printed without the composite part
process: • Barcode will not be printed if the separator is given without composite
code
• If encoding of composite code failed, barcode will not be printed
• Example (2001234567890|Composite):
180
TH230/TH230+ Programmers Guide
GS1- • Barcode is combination of GS1 Stacked Omni and the composite codes
Stacked- CC-A and CC-B
Omni– • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEZ)
Composite • Barcode can be printed without the composite part
(m=14, 79) • Barcode will not be printed if the separator is given without composite
process: code
• If encoding of composite code failed, barcode will not be print
• Example (2001234567890|Composite):
• Barcode is combination of GS1 Limited and the composite codes CC-A and
GS1- CC-B
Limited- • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEZ)
Composite
• Barcode can be printed without the composite part
(m=15, 80)
• Barcode will not be printed if the separator is given without composite
process:
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
• Example (0040941991026|Composite):
GS1- • Barcode can be print out over more than 1 row by setting the segments
Expand- per row (see ESC w n b Barcode is combination of GS1 Expand and the
Composite composite codes CC-A and CC-B
(m=16, 81) • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEZ)
process: • 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
• Example (2001234567890|Composite):
181
Programmers Guide TH230/TH230+
UCC • Barcode is combination of code 128 and the composite codes CC-A, CC-B
EAN128 (m=82) and CC-C (m=83)
(m=82,m=8 • Barcode can be printed without the composite part
3) process: • Barcode will not be printed if the separator is given without composite
code
• UCC EAN is an Code 128 with follow structure:
• 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 (DEZ)
• If encoding of composite code failed, barcode will not be printed
CC_A • Composite Code is only usable with an composite Barcode
• The maximum of encoded data depends from the parts of characters and
digits
Columns Max Max
Digits Chars
2 47 26
3 47 26
4 56 31
182
TH230/TH230+ Programmers Guide
GS p
Function: Select PDF 417 parameters
Code ASCII: GS p a b c d e f
Code HEX: 0x1D 0x70 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 Range Description SUPPORT
a, b The ration of bar NO !!
height to symbol
length.
a= 1 ≤ a ≤ 10 NO !!
height
b= 1 ≤ b ≤ 100 NO !!
width
c rows 3 ≤ c ≤ 90 Number of rows in NO !!
the matrix of code
words.
d columns 7 ≤ d ≤ 30 Number of NO !!
columns in the
matrix of code
words.
e x dimen 1≤e≤7 Width of a single YES
sion module in dots.
f y dimen 2 ≤ f ≤ 25 Height of the code NO !!
sion word in dots.
183
Programmers Guide TH230/TH230+
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.
184
TH230/TH230+ Programmers Guide
GS r
Function: Transmit status
Code ASCII: GS r n
Code HEX: 0x1D 0x72 n
Range: n = 1, 2, 4, 49, 50, 52
Description: Transmits 1 byte of status data using n as follows:
n Function
1, 49 Transmits paper sensor status
2, 50 Transmits drawer kick-out connector
status
4, 52 Transmits Flash Memory User Sector
status
Notes: • Each status is 1 byte.
• The status to be transmitted is as follows:
• Paper sensor status (n = 1, 49)
Bit Function Status
0 1
0 Paper roll near-end
Paper present No paper
sensor
1 Cover Closed Open
2 Paper roll end sensor Paper present No paper
3 Undefined
4 Not used Fixed to 0
5 Undefined
6 Undefined
7 Not used Fixed to 0
• The status to be transmitted is as follows:
• Drawer kick-out connector status (n = 2, 50)
Bit Function Status
0 1
0 Drawer kick-out connector Low High
pin 3
1 Drawer kick-out connector Low High
pin 3
2 Undefined
3 Undefined
4 Not used Fixed to 0
5 Undefined
6 Undefined
7 Not used Fixed to 0
185
Programmers Guide TH230/TH230+
186
TH230/TH230+ Programmers Guide
GS w
Function: Set bar code width
Code ASCII: GS w n
Code HEX: 0x1D 0x77 n
Range: 2≤n≤6
Default: n=3
Description: Sets the horizontal size of a bar code.
• n specifies the bar code module width.
Notes: • Bar code types are Multi level barcode (UPC-A, UPC-E, JAN13(EAN13),
JAN8(EAN8), CODE93, and CODE128) and Binary level barcode (CODE39,
ITF, CODABAR(NW7). The units for n depend on the printer model.
• This command setting is effective until performing of ESC @, reset or
power-off.
• If the barcode to wide for printable area, barcode will not be print.
• The module width differs depending on the specification. (Unit: mm)
187
Programmers Guide TH230/TH230+
GS 0x81
Function: Set paper type
Code ASCII: GS 0x81 m n
Code HEX: 0x1D 0x81 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.
188
TH230/TH230+ Programmers Guide
GS 0x82
Function: Print raster monochrome graphics
Code ASCII: GS 0x82 n1 … n72 (576 dots, 80 mm paper), or n51 (408 dots, 57.5 mm
paper)
Code HEX: 0x1D 0x82 n1 … n72 (576 dots, 80 mm paper), or n51 (408 dots, 57.5 mm
paper)
Range: n1 to n72/n51 corresponds to one dot row data for a thermal receipt printer
Description: Each bit defines whether or not a dot of the current color will be printed.
This command is used for printing a monochrome graphics in real-time.
Offsets, page and any other modes or overlays, including watermark do not
apply and are overwritten by this command. A complete rendering of the
intended final image should have been done by the application before
sending the dot rows.
If two-color paper is indicated by the set paper type command, then the
raster will be printed in the color that is defined by the set current color
command.
Notes: • This command is identical to command DC1(see page 31).
GS 0x83
Function: Print raster color graphics
Code ASCII: GS 0x83 n1 … n144 (576 dots, 80 mm paper), or n102 (408 dots, 57.5
mm paper)
Code HEX: 0x1D 0x83 n1 … n144 (576 dots, 80 mm paper), or n102 (408 dots, 57.5
mm paper)
Range: n1 to n144/n102 corresponds to one dot row data
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.
189
Programmers Guide TH230/TH230+
GS 0x84
Function: Download logo image
Code ASCII: GS 0x84 m n1 n2 d1 … dx
Code HEX: 0x1D 0x84 m n1 n2 d1 … dx
Range: x = (n1 * n2 * 8) * m
m = 1 = monochrome
m = 2 = two-color
n1 ≤ 640/8
n2 ≤ 512/8
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 57.5 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.
190
TH230/TH230+ Programmers Guide
Notes: • The minimum of rows are 8 !! n2 described the count of dot rows in byte,
like n1. That means the dot height of logo must be a multiple of 8!.
MSB LSB MSB LSB MSB LSB MSB LSB
d1 d2 ... dn1
GS 0x8D
Function: Text strike-through mode
Code ASCII: GS 0x8D n m
Code HEX: 0x1D 0x8D 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.
191
Programmers Guide TH230/TH230+
GS 0x8E
Function: Download paper type description
Code ASCII: GS 0x8E nL nH d1 … dn
Code HEX: 0x1D 0x8E 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. These bytes contain the
proprietary structure and CRC to operate the thermal print head. This
structure contains the hardware parameter values needed to print on
formulations of monochrome and two-color thermal papers. New paper
definitions should be obtained from trusted sources such as the TPG, Inc.
Web site in order to optimize print quality while preventing premature head
burnout or other damaging effects.
New definitions do not change any which had already been set. If an
immediate effect is desired, follow up this command with a set paper type m
n (where m and n are bytes 0 and 1 of the description). Once stored in flash
memory, this paper type, selectable by ID m n, remains a valid choice by the
set paper type command until firmware flash memory is erased.
Restrictions: If the value of m n = 0 0, then the command will be ignored. It is
thus impossible to overwrite the default monochrome paper setting. This
command will be ignored if the head type – carried in the description
(d1…dx) – is incompatible with the head type in the printer itself or if a
description with ID m n already exists.
There is room in firmware flash memory for a maximum of 16 paper type
descriptions; of these one is reserved for monochrome descriptions, with m
n =0 0 description that is always populated, and factory preloaded of two
color descriptions. Thus 13 remaining spaces are free for dynamic use; once
these are used up further download paper type descriptions will be ignored,
and a firmware reload will be necessary to again free up (except for m n = 0
0) the paper type description space.
192
TH230/TH230+ Programmers Guide
GS 0x8F
Function: Return paper type description
Code ASCII: GS 0x8F m
Code HEX: 0x1D 0x8F m
Range: m is the paper type index
0 ≤ m ≤ 15
Description: This command will return from flash memory a paper type description
indexed by m, (0 ≤ m ≤ 15) sending back the data sequence used in the
download paper type description command, i.e. the return is 0x1D 0x8F 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
24 bytes will be as follows:
#Bytes Offset Definition
1 0 Manufacturer paper type category
1 1 Version in type category
1 2 Print head type
1 3 Structure format type
20 4 Descriptive name as a null terminated ASCII
string
GS 0xA0
Function: Set temporary max target speed
Code ASCII: GS 0xA0 nL nH
Code HEX: 0x1D 0xA0 nL nH
Range: 0x15 ≤ (nL + nH * 256) ≤ 0xDC 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.
193
Programmers Guide TH230/TH230+
GS 0xFF
Function: Reset firmware
Code ASCII: GS 0xFF
Code HEX: 0x1D 0xFF
Description: Ends the load process and reboots the printer. Before executing this
command, the printer should have firmware loaded and external switches
set to the runtime settings. Application software for downloading should
prompt the user to set the external switches and confirm before sending this
command. If the downloading was started from a diagnostic, the reboot will
cause the printer to re-enter download state unless the external switches are
changed.
NOTE: PON will not be send by using LAN-Interface
US EOT
Function: Convert 6-dots/mm bitmap to 8-dots/mm bitmap
Code ASCII: US EOT n
Code HEX: 0x1F 0x04 n
Range: 0 = Off
1 = On
Default: n = 0 (Off)
Description: Selects or cancels 6-dot/mm emulation mode.
When the 6-dot/mm emulation is selected, logos and graphics are expanded
horizontally and vertically during download to emulate their size on a 6-
dot/mm printer. The horizontal positioning commands also emulate
positioning on a 6-dot/mm printer.
US ENQ
194
TH230/TH230+ Programmers Guide
US t
Function: Print Test Form
Code ASCII: US t
Code HEX: 0x1F 0x74
Description: Prints the current printer configuration settings on the receipt. Disabled in
Page Mode.
Notes: • While processing the print test form, it is recommended to wait sending
next print data until the actual job is finished.
• To print the extended test form and the print sample use the command
GS ( A…
• Executing this command resets all printer parameter to default (see ESC
@)
• In iPRINT it is possible to print the selftest when closing the cover while
pressing the Linefeed button.
US V
Function: Send printer software version
Code ASCII: US V
Code HEX: 0x1F 0x56
Description: The printer returns 8 bytes containing the loader and firmware software
version. The first 4 bytes returned are an ASCII string for the loader version.
The second 4 bytes are an ASCII string for the firmware version. Example: For
1.034.56 (8 bytes), the loader version is 1.03 and the firmware version is
4.56.
Notes: • New software applications should use the more significant command GS I
(see page 149) instead of US V.
US z
Function: Real time commands disabled
Code ASCII: US z n
Code HEX: 0x1F 0x7A n
Range: n = 0 => real time commands enabled
n = 1 => real time commands disabled
Default: n = 0 (real time commands enabled)
Description: 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.
Notes: • ESC @ (see page 54) does not change the US z real time command
setting.
195
Programmers Guide TH230/TH230+
196
TH230/TH230+ Programmers Guide
Possible Value
Parameter Influenced by Default
Max. Value
BM sensor Enabled, Disabled GS ( E Disabled
Endurance Test Enabled, Disabled GS ( E Disabled
Serial number 0 – 4294967295 GS ( E (fn = 129) 0
Serial number date YYMMDD GS ( E (fn=130) 0
Paper width 80 mm, 82,5 mm GS ( E (fn=5) 82,5 mm
Print density 50 % - 130 % GS ( E (fn=5) 100 %
BM adjustment value Depends of the printer
0 – 255 GS ( E (fn=5)
offset hardware
Depends of the printer
Sensor values 0 – 255 GS ( E (fn=5)
hardware
Maximum power Auto or 48 W – 110 W GS ( E (fn=5) Auto
Maximum speed 70 – 220 mm/sec GS ( E (fn=5) 220 mm/sec
Max speed TH230+ Draft 70 – 300 mm/sec GS ( E (fn=5) 220 mm/sec
Number of Endurance test
1 – 65535 Tickets GS ( E (fn=5) 100 Tickets
tickets
Single color, Two
Paper selection GS 0x81 Single color
color
Depends of the
Firmware version 00.00 - 99.99 no
firmware version
Linefeeds
0 - 4294967295 no 0
(total)
Dots (total) 0 - 4294967295 no 0
Cuts (total) 0 - 4294967295 no 0
Firmware
0 - 4294967295 no 0
start cycles
Power on
Maintenance 0 - 1000000000 no 0
hours
Counter for the
EEPROM
whole printer 0 - 4294967295 no 0
update cycles
life.
Cutter Errors 0 - 65535 GS g 0 0
Black Mark
0 - 65535 GS g 0 0
Errors
Thermistor
0 - 65535 GS g 0 0
Errors
Low Voltage
0 - 65535 GS g 0 0
Errors
197
Programmers Guide TH230/TH230+
High Voltage
0 - 65535 GS g 0 0
Errors
Cover Open
0 - 65535 GS g 0 0
Counter
Maximum
Head 0 - 255 GS g 0 0
Temperature
Reset able Linefeeds 0 - 4294967295 GS g 0 0
Maintenance Dots 0 - 4294967295 GS g 0 0
Counter for
replaced spare Cuts 0 - 4294967295 GS g 0 0
parts.
Linefeed
Counter for 0 - 255 GS g 0 0
mechanism
replacements of
Print head 0 - 255 GS g 0 0
spare parts.
Cutter unit 0 - 255 GS g 0 0
198
TH230/TH230+ Programmers Guide
Character Fonts
The character fonts will be selected by an escape command.
The controller provides two character sets with different character densities. The
dimensions (W*H) of the character cell are as follows:
Font A 13 * 24 Dots
Font B 10 * 24 Dots
The character density will be determined by the character spacing between two adjacent
character cells.
The character densities are determined by the control commands ESC SP (see page 38).
The following tables give an overview regarding some print densities:
Thermal Printer on 80 mm Paper:
Characters Font Character Spacing Character Used dots Print area Character
per line Dimension set by the size incl. per Line per Line Density
[cpl] W*H command spacing (max. 72 [cpi]
ESC SP (see [mm] mm
page 38). B*H = 576 dot)
[mm]
44 A 13 * 24 0* 1.625 * 3 572 71.50 15.6
41 A 13 * 24 1 1.75 * 3 574 71.75 14.5
38 A 13 * 24 2 1.875 * 3 570 71.25 13.5
57 B 10 * 24 0* 1.25 * 3 570 71.25 20.3
52 B 10 * 24 1 1.375 * 3 572 71.50 18.5
* = Default character spacing
Thermal Printer on 57.5 mm Paper:
Characters Font Character Spacing Character Used dots Print area Character
per line Dimension set by the size incl. per Line per Line Density
[cpl] W*H command spacing (max. 51 [cpi]
ESC SP (see [mm] mm
page 38). B*H = 408 dot)
[mm]
31 A 13 * 24 0* 1.625 * 3 403 50.38 15.6
29 A 13 * 24 1 1.75 * 3 406 50.75 14.5
27 A 13 * 24 2 1.875 * 3 405 50.63 13.5
40 B 10 * 24 0* 1.25 * 3 400 50.00 20,3
37 B 10 * 24 1 1.375 * 3 407 50.88 18.5
* = Default character spacing
199
Programmers Guide TH230/TH230+
200
TH230/TH230+ Programmers Guide
All codepages contains printable characters from 0x80 to 0xFF except PC437, which runs
from 0x20 to 0xFF. There are no international pages supported.
201
Programmers Guide TH230/TH230+
202
TH230/TH230+ Programmers Guide
Code Table Structure
203
Programmers Guide TH230/TH230+
Character Image 13 x 24 (Thermo)
Bits 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
Line 1 MSB Byte 2 LSB MSB Byte 1 LSB
Line 2 Byte 4 Byte 3
Line 3 Byte 6 Byte 5
Line 4 Byte 8 Byte 7
Line 5 Byte 10 Byte 9
Line 6 Byte 12 Byte 11
Line 7 Byte 14 Byte 13
Line 8 Byte 16 Byte 15
Line 9 Byte 18 Byte 17
Line 10 Byte 20 Byte 19
Line 11 Byte 22 Byte 21
Line 12 Byte 24 Byte 23
Line 13 Byte 26 Byte 25
Line 14 Byte 28 Byte 27
Line 15 Byte 30 Byte 29
Line 16 Byte 32 Byte 31
Line 17 Byte 34 Byte 33
Line 18 Byte 36 Byte 35
Line 19 Byte 38 Byte 37
Line 20 Byte 40 Byte 39
Line 21 Byte 42 Byte 41
Line 22 Byte 44 Byte 43
Line 23 Byte 46 Byte 45
Line 24 Byte 48 Byte 47
Example:
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 11
Line 12
Line 13
Line 14
Line 15
Line 16
Line 17
Line 18
Line 19
Line 20
Line 21
Line 22
Line 23
Line 24
204
TH230/TH230+ Programmers Guide
Character Image 10 x 24 (Thermo)
Bits 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
Line 1 MSB Byte 2 LSB MSB Byte 1 LSB
Line 2 Byte 4 Byte 3
Line 3 Byte 6 Byte 5
Line 4 Byte 8 Byte 7
Line 5 Byte 10 Byte 9
Line 6 Byte 12 Byte 11
Line 7 Byte 14 Byte 13
Line 8 Byte 16 Byte 15
Line 9 Byte 18 Byte 17
Line 10 Byte 20 Byte 19
Line 11 Byte 22 Byte 21
Line 12 Byte 24 Byte 23
Line 13 Byte 26 Byte 25
Line 14 Byte 28 Byte 27
Line 15 Byte 30 Byte 29
Line 16 Byte 32 Byte 31
Line 17 Byte 34 Byte 33
Line 18 Byte 36 Byte 35
Line 19 Byte 38 Byte 37
Line 20 Byte 40 Byte 39
Line 21 Byte 42 Byte 41
Line 22 Byte 44 Byte 43
Line 23 Byte 46 Byte 45
Line 24 Byte 48 Byte 47
Example:
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 11
Line 12
Line 13
Line 14
Line 15
Line 16
Line 17
Line 18
Line 19
Line 20
Line 21
Line 22
Line 23
Line 24
205
Programmers Guide TH230/TH230+
206
TH230/TH230+ Programmers Guide
207
Programmers Guide TH230/TH230+
208
TH230/TH230+ Programmers Guide
209
Programmers Guide TH230/TH230+
210
TH230/TH230+ Programmers Guide
211
Programmers Guide TH230/TH230+
212
TH230/TH230+ Programmers Guide
213
Programmers Guide TH230/TH230+
214
TH230/TH230+ Programmers Guide
215
Programmers Guide TH230/TH230+
216
TH230/TH230+ Programmers Guide
217
Programmers Guide TH230/TH230+
218
TH230/TH230+ Programmers Guide
219
Programmers Guide TH230/TH230+
220
TH230/TH230+ Programmers Guide
221
Programmers Guide TH230/TH230+
222
TH230/TH230+ Programmers Guide
223
Programmers Guide TH230/TH230+
224
TH230/TH230+ Programmers Guide
225
Programmers Guide TH230/TH230+
226
TH230/TH230+ Programmers Guide
227
Programmers Guide TH230/TH230+
228
TH230/TH230+ Programmers Guide
229
Programmers Guide TH230/TH230+
230
TH230/TH230+ Programmers Guide
231
Programmers Guide TH230/TH230+
232
TH230/TH230+ Programmers Guide
233
Programmers Guide TH230/TH230+
1 Reserved
All
2 Reserved
3 Reserved
5 Reserved Reserved
6 Reserved Reserved
7 Reserved Reserved
8 Reserved Reserved
9 Reserved Reserved
10 Reserved Reserved
11 Reserved Reserved
Subtype excludive
12 Reserved Reserved
13 Reserved Reserved
14 Reserved Reserved
15 Reserved Reserved
234
TH230/TH230+ Programmers Guide
USB Interface
The Universal Serial Bus (USB) is a peripheral bus for personal computers that was first
released in January 1996.
The TH230 supports the USB Printer Class.
USB Descriptors
When plugging in an USB device the USB enumeration process starts and the device
reports their attributes using descriptors. A descriptor is a data structure with a defined
format.
Device Descriptor
A device descriptor describes general information about an USB device. It includes
information that applies globally to the device and all of the device’s configurations. An
USB device has only one device descriptor.
235
Programmers Guide TH230/TH230+
Configuration Descriptor
The configuration descriptor describes information about a specific device configuration.
The descriptor contains a bConfigurationValue field with a value that, when used as a
parameter to the SetConfiguration() request, causes the device to assume the described
configuration.
A USB device has one or more configuration descriptors. Each configuration has one or
more interfaces and each interface has zero or more endpoints.
The whole configuration is transmitted in the following order:
- Configuration Descriptor
- Interface 0 Descriptor (Printer)
- Endpoint 1-2 Descriptors
- Interface 1 Descriptor (DFUX)
- DFUX Functional Descriptor
Bit 6: Self-powered
236
TH230/TH230+ Programmers Guide
Interface Descriptors
The interface descriptor describes a specific interface provided by the associated
configuration. A configuration provides one or more interfaces, each with its own
endpoint descriptors describing a unique set of endpoints within the configuration. An
interface descriptor is always returned as part of a configuration descriptor. It cannot be
accessed directly with a Get or Set Descriptor request.
An interface may include alternate settings that allow the endpoints and/or their
characteristics to be varied after the device has been configured. The default setting for an
interface is always alternate setting zero.
The TH230 printer provides two interfaces: the Firmware Upgrade interface (DFUX) and
the Printer interface. A multi-interface device is called composite device.
237
Programmers Guide TH230/TH230+
Endpoint Descriptors
Each endpoint used for an interface has its own descriptor. This descriptor contains the
information required by the host to determine the bandwidth requirements of each
endpoint. An endpoint descriptor is always returned as part of a configuration descriptor.
It cannot be accessed directly with a Get or Set Descriptor request. There is never an
endpoint descriptor for endpoint zero.
238
Programmers Guide TH230/TH230+
String Descriptors
Descriptors contain references to string descriptors that provide displayable information
describing a descriptor in human-readable form. The inclusion of string descriptors is
optional. If a device does not support string descriptors, all references to string descriptors
within device, configuration, and interface descriptors must be reset to zero.
The strings in a USB device may support multiple languages. When requesting a string
descriptor, the requester specifies the desired language using a sixteen bit language ID
(LANGID).
LangID
Manufacture String
Product String
240
TH230/230+ Programmer’s Guide
DFUX Interface String
Following string descriptors are not published in the devices descriptor set ( -> “hidden”
strings
241
Programmers Guide TH230/TH230+
Printer Interface
The TH230 printers are multi-interface-devices (composite device) and one of these
interfaces is the printer interface. Every interface is a logical device from the host point of
view and the printer interface is the printer in fact.
SOFT_RESET
This class-specific request clears all printer buffers and resets the printer interface to their
default states. This request does not change the USB addressing or USB configuration – in
other words there is none new USB enumeration.
USB Reset
On receipt of an USB reset all printer buffers are cleared and a new USB enumeration is
started.
USB Detach/Attach
When the printer is detached from USB the current printer receive buffer content will be
proceed on.
On attaching the printer to the USB all printer buffers will be cleared (like SOFT_RESET).
Receipt Buffer
While printer is in online state following hysteresis levels are valid:
242
TH230/230+ Programmer’s Guide
RS232 Interface
Specifications
Data transmission: Serial
Synchronization: Asynchronous
Handshaking: DTR/DSR or XON/XOFF control
Signal levels: MARK = -3 to -15 V: Logic "1" / OFF
SPACE = +3 to +15 V: Logic "0" / ON
Baud rate: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 bps
(bps: bits per second)
Data word length: 8 bits
Stop bits: 1 bit
Parity settings none, even or odd
For default settings and changing those please refer to GS ( E pL pH fn a d1...dk <Function
11> (page 114).
Handshake control
In DTR/DSR mode the RTS line is switch parallel to DTR to be conform to older cable
variants!
Receiving data
243
Programmers Guide TH230/TH230+
Receipt Buffer
Following hysteresis levels are valid:
3968 3072 27 9
244
TH230/230+ Programmer’s Guide
Ethernet Interface
Overview
Ethernet is a family of frame-based computer networking technologies for local
area networks (LANs) to connect multiple computers and devices. It is standardized
as IEEE 802.3.
Features
Speed 10/100 MBit Full/Half Duplex
Protocols IP, TCP, UDP, ICMP, DHCP, DNS, DDNS, ARP, BOOTP, HTTP, Telnet,
SNMP, DynDNS
Connector RJ-45
Handshake control
Due to technical limitations there is none data flow control (handshake). Therefore the
application must ensure, that the printer receipt data buffer does not overflow (see page
247 (0) for receipt buffer size)!
Only with “Printer Legacy Support” enabled, a receipt data buffer overflow will be
prevented, but with the disadvantage, that real-time commands will not work in offline
mode!
Receipt Buffer
See page 247(0) for receipt buffer size.
245
Programmers Guide TH230/TH230+
Service Menu
A service menu is integrated in the TH230 printer, which allows the user to easily
configure the printer, run several diagnostic tests and gain some information about the
printer state and the built-in functionality.
This chapter gives an overview about the handling and the content of the service menu.
Menu handling
The flowchart below shows the process to reach the service mode menu.
LF-Button pressed ?
no
Exit service
menu or save
changes?
246
TH230/230+ Programmer’s Guide
Action Effect
Short click Increment selection
Long click Execute selected function /
(approx. 1 sec.) Confirm
LED code
Function LED on / LED off
LED flashing
For example if you wish to choose the function with the number 3, you have to click the
LF button 3 times and then confirm the selection with a long click.
If the print menu is active, the current menu or sub-menu will also be printed.
Note: In case of paper end, cover open or error during printing, the service menu will be
finished and an automatic reset is forced. All changed settings will be lost.
247
Programmers Guide TH230/TH230+
Reset Printer
This function performs a warm reboot of the printer.
248
TH230/230+ Programmer’s Guide
Configuration
1 Exit/Save
2 Hardware
3 Software
4 Print Options
5 EEPROM & Counters
RS232 Communication* /
6
Ethernet Settings*
Information
1 Exit
2 Print Installed Code Pages
3 Print Code Pages
4 Print Statistic Report
5 Print Extended Self Test
6 Print Example
7 Help * depends on used interface card
249
Programmers Guide TH230/TH230+
Main Menu / Diagnostic
Diagnostic
1 Exit
2 Endurance Test Endurance Test
3 Rolling Pattern Test 1 Exit
4 Sensor Test 2 Run Test Unlimited
5 Black Mark Test 3 Run Test Limited
6 Cutter Test (Full Cut)
7 Cutter Test (Half Cut) Rolling Pattern Test
1 Exit
2 Print Pattern Once
3 Print Pattern Unlimited
4 Print Pattern 10 Times
5 Print Pattern 50 Times
6 Print Pattern 100 Times
7 Print Pattern 500 Times
250
TH230/230+ Programmer’s Guide
Endurance Test
1 Exit
2 Enable Endurance Test
3 Disable Endurance Test
Sleep Mode
1 Exit/Save Sleep Mode Enable/Disable
2 Sleep Mode Enable/Disable 1 Exit
3 Sleep Mode Time 2 Enable Sleep Mode
4 Sleep Mode Interface Power On/Off 3 Disable Sleep Mode
5 Sleep Mode Cash Drawer Delay
Sleep Mode Time
1 Exit
2 Endless
3 10 sec
4 30 sec
5 1 min
6 10 min
7 30 min
251
Programmers Guide TH230/TH230+
Main Menu / Configuration / Software
Software
1 Exit
2 Power-ON Notice Power-ON notice
3 Paper-NE Notice 1 Exit
4 Automatic Line Feed 2 Transmit
5 No. of Endurance Tickets 3 Don't Transmit
6 Legacy Printer Support
7 Listen To RT-Cmds Paper-NE Notice
1 Exit
2 Enable Paper-NE Notice
3 Disable Paper-NE Notice
Listen To RT-Cmds
1 Exit
2 Listen To RT-Cmds - Always
3 Listen To RT-Cmds - BufNotFull
252
TH230/230+ Programmer’s Guide
Main Menu / Configuration / Print Options
Print Options
1 Exit
2 Print Speed Print Speed
3 Paper Width 1 Exit
4 Paper Type Paper Width
2 70 mm/sec
5 Print Density 1 Exit
3 100 mm/sec
6 Color Print Density 2 New Paper Width 57.5 mm
4 130 mm/sec
7 Auto Recovery 3 New Paper Width 80 mm
5 160 mm/sec
8 Receipt Shooting Paper Type 6 190 mm/sec
1 Exit 7 220 mm/sec
2 Single Color 8 260 mm/sec
3 Two Color 9 300 mm/sec
Print Density
1 Exit
2 50 %
3 70 %
4 85 %
5 100 %
6 115 %
7 130 %
253
Programmers Guide TH230/TH230+
Main Menu / Configuration / EEPROM & Counters
EEPROM & Counters
1 Exit
2 Set EEPROM to Default
Parity
1 Exit
2 No Parity
3 Even Parity
4 Odd Parity
Flow Control
1 Exit
2 DTR/DSR
3 XON/XOFF
Bit Length
1 Exit
2 7 Bits
3 8 Bits
254
TH230/230+ Programmer’s Guide
Ethernet Settings
1 Exit
2 DHCP DHCP
3 Boot/P 1 Exit
2 Enable DHCP
3 Disable DHCP
Boot/P
1 Exit
2 Enable Boot/P
3 Disable Boot/P
255
Programmers Guide TH230/TH230+
Exit
This command leaves the service menu. If there are changes of one or more unsaved
settings, the user will be asked for saving. After that, the printer will perform a warm
reboot.
Print Selftest
By using this command the printer performs a self test printout. It is the same function like
started by the “(US) t” sequence or in iPRINT when closing the cover while pressing the
Linefeed button. A detailed description how statistical information is saved can be found
on page 278.
In case of paper out during printing, the printer performs an automatic reset.
Diagnostic - Menu
The diagnostic menu gives you the ability to do some basic diagnostic. You can print out
some endurance or rolling pattern tickets. You also can perform a sensor, a cutter and a
black mark test.
Main Menu Diagnostic
Endurance Test
1 Exit (See chapter x.x.x)
1 Exit
2 Print Selftest 1 Exit
2 Run Test Unlimited
3 Diagnostics 2 Endurance Test
3 Run Test Limited
4 Configuration 3 Rolling Pattern Test
5 Information 4 Sensor Test
Rolling Pattern Test
6 MF Menu* 5 Black Mark Test
1 Exit
6 Cutter Test (Full Cut)
2 Print Pattern Once
7 Cutter Test (Half Cut)
3 Print Pattern Unlimited
4 Print Pattern 10 Times
5 Print Pattern 50 Times
6 Print Pattern 100 Times
7 Print Pattern 500 Times
256
TH230/230+ Programmer’s Guide
257
Programmers Guide TH230/TH230+
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
readed (see 0 Save changed settings – page 248) To leave this menu, choose “Exit/Save”.
Hardware
258
TH230/230+ Programmer’s Guide
259
Programmers Guide TH230/TH230+
Software
260
TH230/230+ Programmer’s 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”.
261
Programmers Guide TH230/TH230+
262
TH230/230+ Programmer’s 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.
263
Programmers Guide TH230/TH230+
Ethernet Configuration
In this configuration menu, you can configure the parameters for use with a Ethernet
communication interface.
264
TH230/230+ Programmer’s Guide
Information - Menu
In this menu is it possible to print out different information’s about the TH230 printer.
MF Menu
The content of the MF menu varies from country to country. Please see the chapter MF
Service menu in your localized TH230 MF manual.
265
Programmers Guide TH230/TH230+
Diagnostic
Description Selection
Function
266
TH230/230+ Programmer’s Guide
Selftest Printout
With the TH230 it is possible to print some self tests and printer information. The
following table gives an overview about the printout versions.
Hardware X X X X
information’s
RS232 settings (X)* (X)*
Software modules X X
Printer settings X X
Measured values X X
Installed codepages X X
Statistic report X X
Pixel test X X
Piezo test X X
267
Programmers Guide TH230/TH230+
The self test starts with collecting the printer data. The short and the extended self test
perform a simple Piezo test before the printout starts.
268
TH230/230+ Programmer’s Guide
The self test printout contains the following information’s (depending on model, version,
etc.):
Software Modules:
269
Programmers Guide TH230/TH230+
Printer Settings:
Sensor Informations:
Sensor Plug Detection
• Black Mark Sensor Plugged/Unplugged
270
TH230/230+ Programmer’s Guide
Measured Values:
• Supply Voltage: “xx.x V”
• Printhead Temperature: “xx.x oC”
Installed Codepages:
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 –
14 –
15 –
16 WPC1254
17 WPC1250
18 WPC28591
19 WPC28592
20 WPC28599
21 WPC28605
22 PC864
23 PC720
24 WPC1256
25 WPC28596
26 KATAKANA
27 PC775 (Baltic)
28 WPC1257 (Baltic)
29 WPC28594 (Baltic)
271
Programmers Guide TH230/TH230+
Statistic Report:
Pixel Test:
• Printout of a graphics print pattern to check the print quality regarding missing dots.
There are two different pixel tests dependant of paper width.
272
TH230/230+ Programmer’s Guide
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.
Memory Switches
Black Mark Sensor Disabled
Endurance Test Disabled
Automatic Line Feed Enabled
Power Button Enabled
Power-ON Notice Disabled
Paper-NE Notice Enabled
Receipt Shooting Disabled
Sleep Mode Disabled / TH230+ enabled
Code 128 Check Digit Enabled
ITF Leading Zero Enabled
Barcode String Termination Enabled
Legacy Printer Support Disabled
Listen To RT-Cmds Always
Interface Power in Sleep Mode On
273
Programmers Guide TH230/TH230+
Default Code Page 0 (PC437)
Sleep Waiting Time 1 min
Sleep Cash Drawer Delay 1.7 sec
Default Code Page 0 (PC437)
RS232 Settings
Baud Rate 19200 baud
Bit Length 8 Bit
Parity None
Handshake DTR/DSR
Receive Buffer Large
Receive Error Ignore
274
TH230/230+ Programmer’s Guide
Endurance test
The endurancetest prints continuously a test pattern. There are two possibilities to start
this test:
1. By diagnostic menu. If the Endurancetest was started from diagnostic mode menu,
the test can be aborted by pressing the LF-Button for more than 1 second.
2. After power up or printer reset with the help of a short circuit plug. Additionally
the endurance test must be enable by memory switch (see page 98). If the short
circuit plug started the Endurancetest, the test can be aborted by removing this
plug.
Interface Description
USB The pins 1 and 4 (5V and GND) of the plug have to be
shortened.
RS232 The pins 6 and 20 (DSR and DTR) of the plug have to be
shortened.
When starting the Endurancetest by USB plug, the test is executed always in limited mode.
But if the linefeed button is pressed while switching on or resetting the printer, the
Endurancetest is executed in endless mode.
275
Programmers Guide TH230/TH230+
After printing a ticket, two status lines are printed and the printer performs a partial paper
cut. Then the printout starts again. The status lines at the end of the ticket gives
information’s about total number of printed tickets, information whether black mark
function is active or not, the expired time the endurance test is running and the serial
number of the printer.
276
TH230/230+ Programmer’s Guide
277
Programmers Guide TH230/TH230+
Specialties
This means, that during this update of the statistical data, parts of the self test printout
were added to the statistic data.
278
TH230/230+ Programmer’s Guide
279
Programmers Guide TH230/TH230+
Technical Specifications
Printmodule Method Thermal
Print Resolution
203 dpi (8 Dots/mm)
(horizontal)
Positioning
Resolution 203 dpi (8 Dots/mm)
(vertical)
Print Speed up to 220 mm/s
Print Speed
up to 300 mm/s
TH230+ Draft
Print Speed Color up to 110 mm/s (with 2 color paper)
Print Width With 80 mm Paper: 72 mm = 576 dot
With 57.5 mm Paper: 51 mm = 408 dot
Top Margin 5 mm incl. Reverse Feeding; 17 mm without Reverse Feeding
Temperature
Thermistor
Sensor
Cutter Method Guillotine
Function Full Cut or Partial Cut
Cutting Speed 300 ms
Drive Stepper Motor
Sensors Paper Near End
Optical Slot
(adjustable)
Paper End Optical Slot
Black Mark Reflective Optical Sensor; Optional as snap in. Backside or
frontside, left or right
Cover Open Mechanical Micro Switch
Cutter Home
Optical Slot
Sensor
Drive Paper Feed Stepper Motor
280
TH230/230+ Programmer’s Guide
281
Programmers Guide TH230/TH230+
Interface Boards 1.) 25 pin RS232, 6 pin RJ12 CDKO, 3 pin Hosiden Power Plug, 9
pin Customer Display
2.) 25 pin RS232, 6 pin RJ12 CDKO, 3 pin Hosiden Power Plug
3.) USB 2.0 Compliant (Full Speed), 6 pin RJ12 CDKO, 3 pin
Hosiden Power Plug
4.) Powered USB 2.0 Compliant (Full Speed), 6 pin RJ12 KLA
5.) MF On Board Interface: 25 pin RS232, 6 pin RJ12 CDKO, 3 pin
Hosiden Power Plug, 9 pin Customer Display, PS2 (edgeways),
MF-LED 2-color red/green (edgeways) - internal: MMC, MF-
Memory Module
6.) MF Ready Interface
7.) LAN 10BaseT, 6 pin RJ12 CDKO, 3 pin Hosiden Power Plug, 9
pin Customer Display
8.) USB 2.0 Compliant (Full Speed), 25 pin RS232, 6 pin RJ12
CDKO, 3 pin Hosiden Power Plug
Emulation Compatible to TH210 + 2 color printing functions
Input Voltage 24 V +/- 10 %
Power Consumption adjustable 48 W to 110 W or automatic detection for WN-
Powersupplies
Ready
Mode
Current / ca. 78 mA / 1,9 W (including USB interface board – this value
Power may change with other interface)
Sleep Mode
TH230+
1 Current / ca. 40 mA / 1,0 W (including USB interface board – this value
Power may change with other interface)
Sleep Mode
0 Current / ca. 12 mA / 0,29 W (including USB interface board – this value
Power may change with other interface)
Ready
Mode
Current / ca. 100 mA / 2,4 W (including USB interface board – this value
Power may change with other interface)
Sleep Mode
TH230
1 Current / ca. 65 mA / 1,6 W (including USB interface board – this value
Power may change with other interface)
Sleep Mode
0 Current / ca. 46 mA / 1,1 W (including USB interface board – this value
Power may change with other interface)
Mechanic Dimensions WxHxD Width: 145mm
Specs Height:148mm
Depth: 195mm
Weight ca. 2 Kg (depends from interface board)
282
TH230/230+ Programmer’s Guide
Storage conditions
IEC 721 3/1 class 1k2 according to EN 60721-3-1
Air temperature 5°C - 40°C
Humidity 5%r.h. (1g/m3) – 85%r.h. (25g/m3)
Temperature change 0.5 K/min
Transport conditions
IEC 721 3/2 class 2k2 according to EN 60721-3-2
Climatic tests according to IEC 68 / EN60068
Air temperature -25°C - 60°C (enhanced test condition for lottery
up to +70°C)
Humidity 15%r.h. (1g/m3) – 98%r.h. (32g/m3)
Temperature change -25°C / 25°C
283
Programmers Guide TH230/TH230+
284
TH230/230+ Programmer’s Guide
Recoverable Errors
The following table shows the blink pattern of all errors, which could be recovered by
DLE ENQ 2 or by opening and closing the cover. These patterns are called “positive” blink
patterns because the user has to count how many times the Error LED (red) is switched on.
Blink
Count
Approximately 240 ms
position.
Black Mark The printer doesn’t find the
detecting error Black Mark. 4
Approximately 2880 ms
Approximately 240 ms
Unrecoverable Errors
The following table shows the blink pattern of all errors, which could not be recovered by
DLE ENQ 2. These patterns are “negative” blink patterns too (see description above).
Approximately 240 ms
285
Programmers Guide TH230/TH230+
Power-Up-Test Errors
After power-on of the printer, several self tests are executed, before starting the printer
firmware itself:
Blink
Count
Approximately 240 ms
None valid Loader There is none valid Loader (SST) - All three LEDs are permanently
module found module existing in the Flash on.
memory
Printer stops
MCU error MCU hardware error found 1
Approximately 4800 ms
Printer stops
286
Wincor Nixdorf International GmbH, 2013
D 33094 Paderborn