TH230/TH230+ POS Printer Programmers Guide (July 2013)
We would like to know your opinion on this publication.Please send us a copy of this page if you have any constructive criticism. We would like to thank you in advance for your comments.
TH230/TH230+ 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.
Contents Overview .................................................................................................................................. 1 Purpose of this document .................................................................................................................. 1 Introduction ........................................................................................................................................ 1 Firmware Characteristics of the Controller ........................
Character code table Page 4 (PC863: Canadian French): ........................................................... 210 Character code table Page 5 (PC865: Nordic): ........................................................................... 211 Character code table Page 6 (PC858: Multilingual I + Euro): ..................................................... 212 Character code table Page 7 (PC866: Russian): ..........................................................................
Service Menu ........................................................................................................................ 246 Menu handling ............................................................................................................................... 246 Selecting the service menu......................................................................................................... 246 Controlling the service menu ...............................................................
TH230/TH230+ Programmers Guide Overview Purpose of this document This Programmers Guide describes the properties of the controller for the high speed ESCPOS 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+.
Programmers Guide TH230/TH230+ General Characteristics of the Printer • High speed ESC-POS thermal printer • Interface Board Changeable • Different Host Interfaces: RS232, USB, PoweredUSB and others • Printer is able to operate in horizontal and vertical position • Paper width: 80 mm or 57.5 mm • Diameter of Paper rolls: up to 90 mm • 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.
TH230/TH230+ Programmers Guide Firmware Characteristics of the Controller The TH230 printer is controlled with the aid of control sequences, i.e. a series of characters. The standard setting is thus overridden, which means that you are able to set many print functions individually if the standard values do not correspond to your requirements. Possible changes are, among others, the selection of different line feed sizes and the printing of various graphics.
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).
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.
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.
TH230/TH230+ Programmers Guide Diagram of Power States TH230 / TH230+ The following diagram is valid for TH230 and TH230+ and not for iPRINT.
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. Vertical Dot Lines Text To increase the lifetime of the thermal print head the programmer has to avoid printing of long vertical dot lines like in the ticket on the left side. In this ticket the two vertical dot lines are printed always with the same two print dots of the thermal print line.
TH230/TH230+ Programmers Guide Power off control by the host The following is an example of the printer power off process when the printer is turned off using DLE SO (fn = 2) command. 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.
Programmers Guide TH230/TH230+ Basic processing procedure for the page mode: 1. 2. 3. 4. 5. 6. Select the page mode with ESC L (standard mode is changed to page mode). Set the position and size for the printing area with ESC W. Select the starting position and the direction for data development with ESC T. Store print data (such as characters or graphics) in the print buffer. Print all data in the print buffer collectively with ESC FF. Return to standard mode with ESC S.
TH230/TH230+ Programmers Guide Absolute Origin of Graphics and Text in Page Mode The printing area is set by the command ESC W (see page 63). The absolute origin of graphics and text is the lower left of the printable area. This caused a different behavior: Text and graphics (for example GS *, ESC (+*.BMP file) and GS ( L) can be printed in the same row Print buffer will be print form bottom to top.
Programmers Guide TH230/TH230+ Positioning with Left to Right printing Positioning with Top to Bottom printing x Graphics TEXT y TEXT y x Graphics Positioning with Right to Left printing Graphics Positioning with Bottom to Top printing TEXT TEXT Graphics x 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.
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.
Programmers Guide TH230/TH230+ Command Overview Code HT LF FF FF CR DLE DLE EOT DLE ENQ DLE SO (fn = 2) DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC (+*.BMP file) ESC BEL ESC FF ESC DC2 ESC DC4 ESC SYN ESC SP ESC ! ESC $ ESC % ESC & ESC ‘ ESC * ESC * 1 ESC * b m ESC ESC .
TH230/TH230+ ESC ? ESC @ ESC D ESC E ESC G ESC I ESC J ESC K ESC L ESC R ESC S ESC T ESC V ESC W ESC Y ESC [ ! t ESC \ ESC a ESC c 3 ESC c 4 ESC c 5 ESC d ESC i ESC j ESC l ESC m ESC p ESC r ESC s ESC t ESC u ESC v ESC w n 7 ESC w n 8 ESC w n b ESC w n c ESC { FS ! (Asia version) FS & (Asia version) FS - (Asia version) FS .
Programmers Guide FS W (Asia version) GS ETX GS EOT GS ENQ GS ! GS “ GS “ U GS # GS $ GS ( A GS ( D GS ( E Function 1 Function 2 Function 3 Function 4 Function 5 Function 6 Function 11 Function 12 Function 129 Function 130 Function 131 Function 132 GS ( FGS ( FGS ( FGS ( FGS ( F GS ( L Function 48 Function 51 Function 64 Function 65 Function 66 Function 67 Function 69 GS * GS / GS : GS @ GS B GS H GS I GS L GS P GS V GS W GS \ GS ^ 16 TH230/TH230+ Turn quadruple-size mode on/off for Kanji characters Real
TH230/TH230+ GS a GS b GS f GS g 0 GS g 2 GS h GS k GS p GS r GS w GS 0x81 GS 0x82 GS 0x83 GS 0x84 GS 0x8D GS 0x8E GS 0x8F GS 0xA0 GS 0xFF US EOT US ENQ US t US V US z Programmers Guide Enable/disable Automatic Status Back (ASB) Turn smoothing mode on/off Select font for HRI characters Initialize maintenance counter Transmit maintenance counter Set bar code height Print bar code Select PDF 417 parameters Transmit status Set bar code width Set paper type Print raster monochrome graphics Print raster color g
Programmers Guide TH230/TH230+ Line spacing commands ESC 2 ESC 3 Set line spacing to 1/6 inch Set line spacing 49 50 Select Double-Wide Characters Select Single-Wide Characters Cancel print data in page mode Select 90 Degree Counter-Clockwise Rotated Print Set right-side character spacing Select print mode(s) Set absolute print position Turn underline mode on/off Cancel user-defined characters Turn emphasized mode on/off Turn italic print mode on/off Turn double-strike mode on/off Select an internation
TH230/TH230+ ESC $ ESC D ESC T ESC W ESC \ ESC a GS $ GS L GS W GS \ Programmers Guide Set absolute print position Set horizontal tab positions Select print direction in page mode Set printing area in page mode Set relative print position Select justification Set absolute vertical print position in page mode Set left margin Set printing area width Set relative vertical print position in page mode 40 55 61 63 66 67 91 153 157 158 Bit-image commands (graphics) DC1 ESC (+*.
Programmers Guide GS a GS r US V TH230/TH230+ Enable/disable Automatic Status Back (ASB) Transmit status Send printer software version 160 185 195 Special Wincor barcode parameter Set bar code height Print bar code Select PDF 417 parameters Set bar code width Select printing position of HRI characters Select font for HRI characters Set and print barcode (PDF417, QR) 78 168 169 183 187 148 163 135 Start/end macro definition Execute macro 145 159 Bar code commands ESC w n b GS h GS k GS p GS w GS H GS
TH230/TH230+ Programmers Guide Customize commands ESC ‘ ESC 4 ESC : ESC j ESC s GS ( E GS “ GS “ U Function 1 Function 2 Function 3 Function 4 Function 5 Function 6 Function 11 Function 12 Function 129 Function 130 Function 131 Function 132 GS ( F GS @ GS 0x8E GS 0x8F Write to User Data Storage Read from User Data Storage Copy Character Set from ROM to RAM Read from Non-Volatile Memory Write to Non-Volatile Memory (NVRAM) Customize NV memory Select memory type (SRAM/Flash) Flash Memory User Sectors Alloc
Programmers Guide TH230/TH230+ Resolution GS P Set horizontal and vertical motion units 154 Clear printer Real time status transmission Real time request to printer Turn off the power Real time request to printer Real time status transmission Real time printer status transmission Enable/disable real-time command 25 26 29 30 85 85 86 93 Initialize maintenance counter Transmit maintenance counter 164 166 ESC % ESC & ESC ? Select/cancel user-defined character set Define user-defined characters Cancel
TH230/TH230+ Programmers Guide Description of the Control Characters and Sequences: HT Function: Code ASCII: Code HEX: Description: Horizontal tab HT 0x09 Moves the printing position to the next horizontal tab. Notes: • This command is ignored unless the next horizontal tab position has been set. • Horizontal tab positions are set by ESC D. • If the next horizontal tab position exceeds the printing area, the printer sets the printing position to [Printing area width + 1].
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 printer prints the label and feeds to bottom of the label. Reference: ESC 2, ESC 3, ETB Function: Code ASCII: Code HEX: Description: (1) Print and return to standard mode (in page mode) FF 0x0C In page mode, prints the data in the print buffer collectively and returns to standard mode.
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.
Programmers Guide TH230/TH230+ DLE EOT Function: Code ASCII: Code HEX: Range: Real time status transmission DLE EOT n 0x10 0x04 n 1≤n≤4 Description: Transmits 1 byte of status data specified in real time, using n as follows: n 1 2 3 4 Notes: Function Transmit printer status Transmit busy status Transmit error status Transmit paper roll sensor status • This is a real-time command that the printer executes upon receiving it.
TH230/TH230+ Programmers Guide 4 Not used 5 Customer display Fixed to 1 Connected Not connected and or Handshake Handshake blocked ready 6 Undefined 7 Not used Fixed to 0 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.
Programmers Guide TH230/TH230+ n = 4 (paper roll sensor status) Bit 0 1 2 3 4 5 6 7 Notes: Reference: 28 Function Not used Not used Paper near end sensor Paper near end sensor Not used Paper end sensor Paper end sensor Not used Value 0 1 Fixed to 0 Fixed to 1 Paper present No paper Paper present No paper Fixed to 1 Paper present No paper Paper present No paper Fixed to 0 Bit 2 and Bit 3: To avoid false reports the paper near end sensor is monitored by a 0.2 m paper feed hysteresis.
TH230/TH230+ Programmers Guide DLE ENQ Function: Code ASCII: Code HEX: Range: Real time request to printer DLE ENQ n 0x10 0x05 n 1≤n≤2 Description: Responds to a request in real time from the host system. n specifies the request as follows: n 1 2 Notes: Request Restarts printing from the beginning of the line where an error occurred, after recovering from the error. Recover from an error after clearing the data in the receive buffer and print buffers.
Programmers Guide TH230/TH230+ • This command is identical to command GS ETX. Reference: Command GS ETX (see page 85); Table for the Transmit Status Identification DLE SO (fn = 2) Function: Code ASCII: Code HEX: Range: Turn off the power DLE SO fn a 0x10 0x0E 0x02 a fn = 2 a=1 b=8 Description: Executes the following in a power-off sequence: b b • Sends “Power off notice.” • Wait for 250 ms.
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.
Programmers Guide TH230/TH230+ DC3 Function: Code ASCII: Code HEX: Description: Select Single-Wide Characters DC3 0x13 Prints single-wide characters. Single-wide characters may be used in the same line with double-wide characters. Reference: ESC ! (see page 39), GS ! Function: Code ASCII: Code HEX: Range: Feed n Print Lines DC4 n 0x14 n 0 ≤ n ≤ 255 Description: Feeds the paper n lines at the current line height without printing.
TH230/TH230+ Programmers Guide SYN Function: Code ASCII: Code HEX: Range: Add n Extra Dot Rows SYN n 0x16 n 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 Rows Lines Per Inch Dot Rows Extra Rows Lines Per Inch Dot Rows 0 8.
Programmers Guide TH230/TH230+ CAN Function: Code ASCII: Code HEX: Description: Cancel print data in page mode CAN 0x18 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. Function: Code ASCII: Code HEX: Description: Full cut EM 0x19 This command is the same like ESC i (see page 70).
TH230/TH230+ Programmers Guide ESC (+*.BMP file) Function: Download BMP logo Code ASCII: Code HEX: Range: ESC (+*.BMP file) 0x1B (+*.BMP file) Maximum width = 576 Maximum height = 512 Description: Enters a downloaded BMP logo into RAM or flash. The downloaded BMP logo can be printed by using the print downloaded bit image (1D 2F m) command. To downloaded BMP file to save it as a logo, send the hexadecimal code 1B followed by the whole BMP file.
Programmers Guide TH230/TH230+ ESC BEL Function: Generate tone Code ASCII: Code HEX: Description: ESC BEL 0x1B 0x07 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.
TH230/TH230+ Programmers Guide ESC DC4 Function: Code ASCII: Code HEX: Range: Set Column ESC DC4 n 0x1B 0x14 n 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.
Programmers Guide TH230/TH230+ ESC SP 38 Function: Code ASCII: Code HEX: Range: Set right-side character spacing ESC SP n 0x1B 0x20 n 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.
TH230/TH230+ Programmers Guide ESC ! Function: Code ASCII: Code HEX: Range: Select print mode(s) ESC ! n 0x1B 0x21 n 0 ≤ n ≤ 255 Default: n=0 Description: Selects or cancels print modes collectively (Emphasized, Double-height, Double-width, Underline) using n as follows: Bit Function 0 1 2 3 4 5 6 7 Notes: Selected character font Undefined Undefined Emphasized mode Double-height mode Double-width mode Undefined Underline mode Value 0 1 Font A Font B Disabled Enabled Disabled Enabled Disabled Enabl
Programmers Guide TH230/TH230+ • The underline thickness is that specified by ESC –, regardless of the character size. • 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 \. • Character configurations Bit 0: Pitch Dots Columns 80 mm Paper Columns 57.5 mm Paper CPI Font A 13 x 24 44 31 15.6 Font B 10 x 24 57 40 20.
TH230/TH230+ Programmers Guide • After command, printer isn’t at start of line, independent from given value (nL + nH × 256) ESC % Function: Code ASCII: Code HEX: Range: Select/cancel user-defined character set ESC % n 0x1B 0x25 n 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.
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) • The relationship between the definition data and printing result is as follows- see example below.
TH230/TH230+ Programmers Guide ESC ‘ Function: Code ASCII: Code HEX: Range: ESC ‘ 0x1B 0x27 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.
Programmers Guide TH230/TH230+ ESC * Function: Code ASCII: Code HEX: Range: Description: Select bit-image mode ESC * m nL nH d1 ... dk 0x1B 0x2A m nL nH d1 ...
TH230/TH230+ Programmers Guide 8 dots mode (m = 0,1) 24 dots mode (m = 32, 33) MSB d1 d1 d2 … dk d2 d4 d5 … … dk2 dk1 MSB LSB MSB LSB MSB d3 d6 … dk LSB LSB • The modes selectable by m are as follows: “Vertical” is in the direction of paper feeding and “horizontal” is perpendicular (at right angles) to the direction of paper feeding. • See Functions 5 and 6 of GS ( E to specify the paper width and paper (2color paper/monochrome paper).
Programmers Guide TH230/TH230+ Vertical Set adjacent dots Maximum Horizontal number dot of dots density m Mode Dot density 0 8-dot singledensity 203/2 dpi Permitted 288 203/3 dpi 1 8-dot doubledensity 203 dpi Permitted 576 203/3 dpi 32 24-dot singledensity 203/2 dpi Permitted 288 203 dpi 33 24-dot doubledensity 203 dpi Permitted 576 203 dpi 90° or 270° rotated bit-image data will be printed. dpi: dots per 25.
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).
Programmers Guide TH230/TH230+ ESC Function: Code ASCII: Code HEX: Range: Turn underline mode on/off ESC n 0x1B 0x2D n 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 Default: n=0 Description: Turns underline mode on or off using n as follows: Notes: 48 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) • The underline mode is effective for all characters (except for HRI characters).
TH230/TH230+ Programmers Guide ESC . Function: Code ASCII: Code HEX: Range: Print Advanced Raster Graphics ESC . m n rL 0x1B 0x2E m n rL 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.
Programmers Guide TH230/TH230+ ESC 3 50 Function: Code ASCII: Code HEX: Range: Set line spacing ESC 3 n 0x1B 0x33 n 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).
TH230/TH230+ Programmers Guide ESC 4 Function: Code ASCII: Code HEX: Range: Read from User Data Storage ESC 4 m a0 a1 0x1B 0x34 m a0 a1 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). a2 a2 The high order byte of the address (a0) ranges from 0 to n2–1, with n2 specified in the flash allocation command.
Programmers Guide TH230/TH230+ ESC = Function: Code ASCII: Code HEX: Range: Select peripheral device ESC = n 0x1B 0x3D n 1≤n≤3 Default: n=1 Description: Selects the device to which the host computer sends data, using n as follows: Notes: 52 n Function 1 Enables the printer 2 Enables the customer display 3 Enables the printer and customer display • When the printer is disabled, it ignores all received data and commands with the exception of ESC = and real-time commands.
TH230/TH230+ Programmers Guide ESC ? Function: Code ASCII: Code HEX: Range: Cancel user-defined characters ESC ? n 0x1B 0x3F n 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.
Programmers Guide TH230/TH230+ ESC @ 54 Function: Code ASCII: Code HEX: Range: Initialize printer ESC @ 0x1B 0x40 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.
TH230/TH230+ Programmers Guide ESC D Function: Code ASCII: Code HEX: Range: Set horizontal tab positions ESC D n1 ... nk NUL 0x1B 0x44 n1 ... nk NUL 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.
Programmers Guide TH230/TH230+ ESC E Function: Code ASCII: Code HEX: Range: Turn emphasized mode on/off ESC E n 0x1B 0x45 n 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).
TH230/TH230+ Programmers Guide ESC I Function: Code ASCII: Code HEX: Range: Turn italic print mode on/off ESC I n 0x1B 0x49 n 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).
Programmers Guide TH230/TH230+ • The vertical or horizontal motion unit is specified by GS P. • In standard mode, if the character height is greater than the specified paper feed amount, the paper is fed the amount of the character height. For example, if a paper feed of 34 dots is specified with ESC J, but the character height is 40 dots, the paper is fed 40 dots. • When an amount of paper feed that exceeds the maximum value is specified, the paper feed of the maximum amount is executed.
TH230/TH230+ Programmers Guide ESC L Function: Code ASCII: Code HEX: Range: Select page mode ESC L 0x1B 0x4C 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.
Programmers Guide TH230/TH230+ ESC S 60 Function: Code ASCII: Code HEX: Range: Select standard mode ESC S 0x1B 0x53 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.
TH230/TH230+ Programmers Guide ESC T Function: Code ASCII: Code HEX: Range: Select print direction in page mode ESC T n 0x1B 0x54 n 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
Programmers Guide TH230/TH230+ ESC V Function: Code ASCII: Code HEX: Range: Turn 90° clockwise rotation mode on/off ESC V n 0x1B 0x56 n 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 Default: n=0 Description: Notes: 62 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 2, 50 Turns on 90° clockwise rotation mode (1-dot character spacing).
TH230/TH230+ Programmers Guide ESC W Function: Code ASCII: Code HEX: Range: Set printing area in page mode ESC W xL xH yL yH 0x1B 0x57 xL xH yL yH 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 dxL dxL dxH dxH dyL dyL dyH dyH 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.
Programmers Guide TH230/TH230+ • The settings of this command are effective until FF 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. • See Functions 5 and 6 of GS ( E for specifying the paper width. ESC Y Function: Code ASCII: Code HEX: Range: Select Double-Density Graphics ESC Y n1 n2 d1 ... dn 0x1B 0x59 n1 n2 d1 ...
TH230/TH230+ Programmers Guide ESC [ ! t Function: Code ASCII: Code HEX: Range: Description: Set control point ESC [ ! t nL nH 0x1B 0x5B 0x21 0x74 nL nH 0 ≤ (nL + nH * 256) ≤ 0xFFFF 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.
Programmers Guide TH230/TH230+ ESC \ 66 Function: Code ASCII: Code HEX: Range: Set relative print position ESC \ nL nH 0x1B 0x5C nL nH -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.
TH230/TH230+ Programmers Guide ESC a Function: Code ASCII: Code HEX: Range: Select justification ESC a n 0x1B 0x61 n 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 Notes: • The justification has no effect in page mode.
Programmers Guide TH230/TH230+ ESC c 4 Function: Code ASCII: Code HEX: Range: Select paper sensor(s) to stop printing ESC c 4 n 0x1B 0x63 0x34 n 0 ≤ n ≤ 255 Default: n=0 Description: Selects whether to stop printing or not when the paper runs out using n as follows: Bit Function 0 Notes: • • • • • • • • • 68 Value 0 1 Disabled Enabled Paper roll near end sensor 1 Paper roll near end Disabled Enabled sensor 2 Undefined 3 Undefined 4 Undefined 5 Undefined 6 Undefined 7 Undefined It is possible t
TH230/TH230+ Programmers Guide ESC c 5 Function: Code ASCII: Code HEX: Range: Enable/disable feed button ESC c 5 n 0x1B 0x63 0x35 n 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.
Programmers Guide TH230/TH230+ ESC d Function: Code ASCII: Code HEX: Range: Print and feed n lines ESC d n 0x1B 0x64 n 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).
TH230/TH230+ Programmers Guide ESC j Function: Code ASCII: Code HEX: Range: Read from Non-Volatile Memory ESC j k 0x1B 0x6A k 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. Function: Code ASCII: Code HEX: Description: Start firmware upgrade mode ESC l 0x1B 0x6C This command starts the firmware upgrade mode if RS232 interface is used.
Programmers Guide TH230/TH230+ ESC p Function: Code ASCII: Code HEX: Range: Generate pulse ESC p m 0x1B 0x70 m 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: t1 t1 t2 t2 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).
TH230/TH230+ Programmers Guide ESC r Function: Code ASCII: Code HEX: Range: Set current color ESC r m 0x1B 0x72 m 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.
Programmers Guide TH230/TH230+ ESC t Function: Code ASCII: Code HEX: Range: Select character code table ESC t n 0x1B 0x74 n 0 ≤ n ≤ 29 Default: n=0 Description: Selects a page n from the character code table as follows: n 0 1 2 3 4 5 6 7 8 9 10 11 12 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Notes: 74 Character code table PC437 (USA, Standard Europe) PC850 (Multilingual Latin I) PC852 (Latin II PC860 (Portuguese) PC863 (Canadian French) PC865 (Nordic) PC858 (Multilingual I + Euro) PC866 (Russian)
TH230/TH230+ Programmers Guide ESC u Function: Code ASCII: Code HEX: Description: Transmit Peripheral Device Status ESC u 0 0x1B 0x75 0x00 Transmits 1 byte of peripheral device status data as follows: Status Byte Bit Function Notes: 0 1 0 Drawer kick-out connector pin 3 Low High 1 Drawer kick-out connector pin 3 Low High 2 Undefined 3 Undefined 4 Undefined 5 Undefined 6 Undefined 7 Undefined • The printer sends one byte to the host computer when it is not busy or in a fault condit
Programmers Guide TH230/TH230+ ESC v Function: Code ASCII: Code HEX: Description: Transmit paper sensor status ESC v 0x1B 0x76 Transmits 1 byte of paper sensor status data as follows: Status Byte Bit Function Notes: 76 0 1 Paper present No paper Closed Open Paper present No paper No error Error occurred 0 Paper near end sensor 1 Cover 2 Paper end sensor 3 Cutter error 4 Not Used Fixed to Zero Fixed to Zero 5 Temperature In valid range Too hot or too cold 6 Voltage In valid
TH230/TH230+ Programmers Guide ESC w n 7 Function: Code ASCII: Code HEX: Range: Receipt shooting flush ESC w n 7 0x1B 0x77 0x6E 0x37 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 n • n specifies the function. n Function 0, 48 Receipt shooting flush without printer synchronize 1, 49 Receipt shooting flush with printer synchronize Notes: • The answer byte is fixed to 0x19.
Programmers Guide TH230/TH230+ ESC w n b Function: Code ASCII: Code HEX: Range: Description: Special Wincor barcode parameter ESC w n b n d1 .. dk 0x1B 0x77 0x6E 0x62 n n = 16, 79 • n specifies the function. • k specifies the count of following bytes n Bar code system 16, GS1 79 Databar Expanded Number Characters Function of characters k=1 0~9 Specifies the count of DataSegments in one Line. Contains the barcode more Segments, the barcode will be wrapped.
TH230/TH230+ Programmers Guide ESC { Function: Code ASCII: Code HEX: Range: Turn upside-down printing mode on/off ESC { n 0x1B 0x7B n 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.
Programmers Guide TH230/TH230+ • Wincor Nixdorf specific function TH230 + only. Firmware 01.07 or newer • Last error mechanism works at time with following command: GS ( k pL pH cn fn m (cn = 49, fn = 81) Command returns the last error until a new error occurred or the error is reset by ESC w n _ r e s e t _ sys _ e r r o r ESC w n _ r e s e t _ sys _ e r r o r FUNCTION: Code ASCII: Code HEX: Description: Reset last error.
TH230/TH230+ Programmers Guide FS ! (Asia version) Function: Code ASCII: Code HEX: Description: Select print mode(s) for Kanji characters FS ! n 0x1C 0x21 n Selects the character styles (double-height, double-width, and Kanjiunderlined) together for multi-byte code character as follows: Bit Function Notes: Value 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
Programmers Guide TH230/TH230+ FS - (Asia version) Function: Code ASCII: Code HEX: Range: Turn underline mode on/off for Kanji characters FS n 0x1C 0x2D n 1 ≤ n ≤ 2, 48 ≤ n ≤ 51 Default: n=0 Description: Turns on or off underline mode for multi-byte code character(Kanjiunderline) as follows: n Function 0, 48 Turns off Kanji-underline mode. 1, 49 Turns on Kanji-underline mode, set at 1-dot width. 2, 50 Turns on Kanji-underline mode, set at 2-dot width.
TH230/TH230+ Programmers Guide FS 2 (Asia version) Function: Code ASCII: Code HEX: Range: Define user-defined Kanji characters FS 2 c1 c2 d1...dk 0x1C 0x32 c1 c2 d1...dk The ranges of c1 and c2 differ, depending on the character code system used.
Programmers Guide TH230/TH230+ FS C (Asia version) Function: Code ASCII: Code HEX: Range: Select Kanji character code system FS C n 0x1C 0x43 n n = 0, 1, 48, 49 Default: n=0 Description: Selects a Kanji character code system for the Japanese model as follows: Bit Kanji character code system 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.
TH230/TH230+ Programmers Guide FS W (Asia version) Function: Code ASCII: Code HEX: Range: Turn quadruple-size mode on/off for Kanji characters FS W n 0x1C 0x57 n 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.
Programmers Guide TH230/TH230+ GS ENQ Function: Code ASCII: Code HEX: Description: Real time printer status transmission GS ENQ 0x1D 0x05 Transmits one byte status of the printer in real time.
TH230/TH230+ Programmers Guide GS ! Function: Code ASCII: Code HEX: Range: Select character size GS ! n 0x1D 0x21 n 0 ≤ n ≤ 7, 16 ≤ n ≤ 23, 32 ≤ n ≤ 39, 48 ≤ n ≤ 55, 64 ≤ n ≤ 71, 80 ≤ n ≤ 87, 96 ≤ n ≤ ≤ 103, 112 ≤ n ≤ 119 (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
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.
TH230/TH230+ Programmers Guide GS “ U Function: Code ASCII: Code HEX: Range: Flash Memory User Sectors Allocation GS “ U n1 n2 0x1D 0x22 0x55 n1 n2 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.
Programmers Guide TH230/TH230+ GS # Function: Code ASCII: Code HEX: Range: Select the Current Logo GS # n 0x1D 0x23 n 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.
TH230/TH230+ Programmers Guide GS $ Function: Code ASCII: Code HEX: Range: Set absolute vertical print position in page mode GS $ nL nH 0x1D 0x24 nL nH 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.
Programmers Guide TH230/TH230+ GS ( A Function: Code ASCII: Code HEX: Range: Default: Description: Executes test and diagnosis functions GS ( A pL pH n 0x1D 0x28 0x41 pL pH n (pL + (pH × 256)) = 2 (where pL = 2, pH = 0) 0 ≤ n ≤ 255 m = 1, 2, 6, 49, 50, 54 m m 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.
TH230/TH230+ Programmers Guide GS ( D Function: Code ASCII: Code HEX: Range: Default: Enable/disable real-time command GS ( D pL pH m [a1 b1]...[ak bk] 0x1D 0x28 0x44 pL pH 0x14 [a1 b1]...[ak bk] (pL + pH × 256) = 3 (pL = 3, pH = 0) m = 20 a=2 b = 0, 1, 48, 49 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.
Programmers Guide TH230/TH230+ GS ( E Function: Code ASCII: Code HEX: Description: User setup commands GS ( E pL pH fn parameters 0x1D 0x28 0x45 pL pH fn parameters 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 1 Function 1 Changes into the user setting mode. 2 Function 2 Ends user setting mode session. (Performs a software reset.) 3 Function 3 Changes the memory switch.
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.
Programmers Guide TH230/TH230+ GS ( E pL pH fn d1 d2 Code ASCII: Code HEX: Range: Description: Notes: GS ( E pL pH fn d1 d2 0x1D 0x28 0x45 0x03 0x00 0x01 0x49 0x4E (pL + pH × 256) = 3 (pL = 3, pH = 0) fn = 1 d1 = 73 = ‘I’ d2 = 78 = ‘N’ This command changes the printer into the user setting mode. • 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.
TH230/TH230+ Programmers Guide GS ( E pL pH fn d1 d2 d3 Code ASCII: Code HEX: Range: Description: Notes: GS ( E pL pH fn d1 d2 d3 0x1D 0x28 0x45 0x04 0x00 0x02 0x4F 0x55 0x54 (pL + pH × 256) = 4 (pL = 4, pH = 0) fn = 2 d1 = 79 = ‘O’ d2 = 85 = ‘U’ d3 = 84 = ‘T’ Ends the user setting mode and the printer performs software reset. • 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.
Programmers Guide TH230/TH230+ GS ( E pL pH fn [a1 b18...b11]...[ak nk8 nk1] Code ASCII: Code HEX: Range: Default: Description: GS ( E pL pH fn [a1 b18...b11]...[ak nk8 nk1] 0x1D 0x28 0x45 pL pH 0x03 [a1 b18...b11]...[ak nk8 nk1] 10 ≤ (pL + pH × 256) ≤ 65530 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 255: (pL + pH × 256) = 9 × k + 1) fn = 3 b = 48, 49, 50 a = 1, 2, 128 All Memory switches are OFF (b = 48) except for Sleep-Mode (128-3)(b = 49).
TH230/TH230+ Programmers Guide When a = 128, memory switch 128 is set as follows: Msw 128-1 128-2 Setting Value (b) 48 49 48 49 128-3 48 49 48 49 48 49 48 128-4 128-5 128-6 49 128-7 48 49 48 49 128-8 Function Power button is enabled Power button is disabled In Sleep-Mode is Interface Power On (only TH230+) In Sleep-Mode is Interface Power Off (only TH230+) Sleep-Mode enabled Sleep-Mode disabled (default) Legacy printer support disabled * Legacy printer support enabled * Receipt shooting is disabled
Programmers Guide TH230/TH230+ • The printer transmits the power-on notification for the following processes: − Initializing by turning on the power by switch (except with Ethernet interface) − Initializing by hardware reset (except with Ethernet interface) − Initializing by software reset, such as by transmitting Function 2 (except with Ethernet interface and Ethernet parameter changed) • • • • • • • • • • 100 − Initializing after the service menu functions2 (except with Ethernet interface and Etherne
TH230/TH230+ Programmers Guide GS ( E pL pH fn a Code ASCII: Code HEX: Range: Description: Notes: GS ( E pL pH fn a 0x1D 0x28 0x45 0x02 0x00 0x04 a (pL + pH × 256) = 2 (pL = 2, pH = 0): fn = 4 a = 1, 2, 128 The printer transmits the value for the memory switch specified by parameter a to the host. • This function works both in user setting mode and during normal printer operation.
Programmers Guide TH230/TH230+ GS ( E pL pH fn [a1 n1L n1H]...[ak nkL nkH] Code ASCII: Code HEX: Range: GS ( E pL pH fn [a1 n1L n1H]...[ak nkL nkH] 0x1D 0x28 0x45 pL pH 0x05 [a1 n1L n1H]...
TH230/TH230+ Description: Programmers Guide Changes the customized value specified by parameter a to (nL + nH × 256).
Programmers Guide TH230/TH230+ BM adjustment value offset (a = 6): (nL + nH * 256) BM offset Offset value with forward direction in 0…127 0.125 mm Offset value with backward direction in 128…255 0.
TH230/TH230+ Programmers Guide Color density settings (a = 12): (nL + nH * 256) Print density Default -10 (65526) 50 % -9 (65527) 55 % -8 (65528) 60 % -7 (65529) 65 % -6 (65530) 70 % -5 (65531) 75 % -4 (65532) 80 % -3 (65533) 85 % -2 (65534) 90 % 100 % -1 (65535) 95 % 0 100 % 1 105 % 2 110 % 3 115 % 4 120 % 5 125 % 6 130 % Receipt shooting flush time (a=13) (nL + nH * 256) 0 1 … 255 Flush time Endless Time in 0.
Programmers Guide TH230/TH230+ Sleep-Mode waiting time (a=14) (nL + nH * 256) 0 10 … 2550 Waiting time Endless Time in sec Default TH230 10 sec TH230+ 1 min This value sets the time how long the printer is waiting before SleepMode 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.
TH230/TH230+ Programmers Guide Default character code table after Reset (a=16) (nL + nH * 256) 0 … 255 Code Page Equal to ESC t n Default 0 (PC437) 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.
Programmers Guide TH230/TH230+ • a = 6: The cutting position behind a black mark can be adjusted by an internal correction value which is restored after every power-on. (Refer to GS_(_F); Bit 7 is used as direction bit, Bit 6 – Bit 0 as offset value. • a = 9: If maximum power setting “Auto” is selected, the printer detects the power of the connected power supply automatically. This works with all power supplies from Wincor Nixdorf.
TH230/TH230+ Programmers Guide GS ( E pL pH fn a Code ASCII: Code HEX : Range: Description: GS ( E pL pH fn a 0x1D 0x28 0x45 0x02 0x00 0x06 a (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 The printer transmits the host the customized value for the NV memory area specified by parameter a.
Programmers Guide TH230/TH230+ Print density settings (a = 5): hexadecimal Print density d1 d2 d3 d4 50 % 0x36 0x35 0x35 0x32 55 % 0x36 0x35 0x35 0x32 60 % 0x36 0x35 0x35 0x32 65 % 0x36 0x35 0x35 0x32 70 % 0x36 0x35 0x35 0x33 75 % 0x36 0x35 0x35 0x33 80 % 0x36 0x35 0x35 0x33 85 % 0x36 0x35 0x35 0x33 90 % 0x36 0x35 0x35 0x33 95 % 0x36 0x35 0x35 0x33 100 % 0x30 105 % 0x31 110 % 0x32 115 % 0x33 120 % 0x34 125 % 0x35 130 % 0x36 - decimal d5 0x36 0x37 0x38 0x39 0x30 0x31 0x32 0x33 0x34 0x35 - d1 54 54 54 54 5
TH230/TH230+ Programmers Guide Maximum speed (a = 10): Maximum speed String setting n Speed in mm/sec 70 70 mm/sec “70” 71 71 mm/sec “71” … … … 219 219 mm/sec “219” 220 220 mm/sec “220” Only TH230+ Draft ...
Programmers Guide TH230/TH230+ Receipt shooting flush time (a = 13): Value Flush time 1…255 250 msec … 63.
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. • Settings expressed as decimal numbers are converted to ASCII character data and transmitted from the most significant digit. Example: When 120 bytes is being used, 120 is expressed with 3 bytes of data (decimal numbers = 49, 50, 48).
Programmers Guide TH230/TH230+ GS ( E pL pH fn a d1...dk Code ASCII: Code HEX: Range: Default: Description: GS ( E pL pH fn a d1...dk 0x1D 0x28 0x45 pL pH 0x0B a d1...dk 3 ≤ (pL + pH × 256) ≤ 65535 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 255) fn = 11 1≤a≤4 48 ≤ d ≤ 57 [a = 1] 48 ≤ d ≤ 50 [a = 2] d = 48, 49 [a = 3] d = 55, 56 [a = 4] 1 ≤ k ≤ 65532 d1...
TH230/TH230+ Programmers Guide • Parity ( a = 2) is specified by d as follows: d Function 48 Select no parity 49 Select odd parity 50 Select even parity • Flow control ( a = 3) is specified by d as follows: d Function 48 Select Flow control of DTR/DSR 49 Select Flow control of XON/XOFF • Bit length (a = 4) is specified by d as follows: Notes: d Function 55 Select 7 bits length 56 Select 8 bits length • If the communication control between host and printer does not correspond, the prin
Programmers Guide TH230/TH230+ GS ( E pL pH fn a Code ASCII: Code HEX: Range: Description: Notes: GS ( E pL pH fn a 0x1D 0x28 0x45 pL pH 0x0C a (pL + pH × 256) = 2 (pL = 2, pH = 0) fn = 12 1≤a≤4 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 • This function works in user setting mode and during normal operation.
TH230/TH230+ Programmers Guide GS ( E pL pH fn d1…dn (fn=129) Function: Code ASCII: Code HEX: Range: Description: Notes: Set serial number GS ( E pL pH fn d1 … dn 0x1D 0x28 0x45 pL pH 0x81 d1 … dn 2 ≤ (pL + pH × 256) ≤ 11 fn = 129 32 ≤ d ≤ 255 1 ≤ n ≤ 10 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.
Programmers Guide TH230/TH230+ GS ( E pL pH fn a d1...dk Code ASCII: Code HEX: Range: Default: Description: GS ( E pL pH fn a d1...dk 0x1D 0x28 0x45 pL pH 0x83 a d1...dk 3 ≤ (pL + pH × 256) ≤ 65535 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 255) fn = 131 2≤a≤6 d = 48,49 [a = 2,6] d = 46, 48..57 [a = 3,4,5] 1 ≤ k ≤ 65532 d = 49 [a = 2] = DHCP enabled d1...dk = “192.0.0.192” [a = 3] = IP Address d1...dk = “0.0.0.0” [a = 4] = Net Mask d1...dk = “0.0.0.0” [a = 5] = Gateway d1...
TH230/TH230+ Notes: Programmers Guide • This function works only, if an Ethernet interface card is installed! • If the communication control between host and printer does not correspond, the printer cannot process data from the host normally, and the host cannot receive data from the printer normally. • This function works in user setting mode.
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.
TH230/TH230+ Programmers Guide • The adjustment value for the print starting position (a = 1) is affected by the command FF • (see page 24). The value “0” means cut below of the mark position. • The print start position is relative to the lower edge of the detected mark. • This command is stored in the receive buffer first from the host, and then executed in the execution process of other normal commands.
Programmers Guide TH230/TH230+ GS ( L Function: Description: Specify graphics data Performs the various tasks related to graphics data listed in the table below. • Function code fn specifies the individual function. fn Function Description 0, 48 Function 48 Sends the entire capacity of NV graphics domains. 3, 51 Function 51 Sends the available capacity of NV graphics memory. 64 Function 64 Sends the key code list for defined NV graphics.
TH230/TH230+ Programmers Guide • Management of data using key codes. • Deletion of and redefinition of single items of data. • Color coding of defined data. • Definition of data in both raster and column formats. • Confirmation of available capacity in domain. • Continuous processing possible (without a software reset when a command has been processed). • The following three types of graphics functions are included: • NV graphics [Functions 48, 51, 64, 65, 66, 67 and 69] Stores data in non-volatile memory.
Programmers Guide TH230/TH230+ Notes for transmission process: • Functions 65, 66 or 67 write data to a non-volatile memory. Note the following items when using the function. • The printer may be BUSY when storing data and will not receive any data. In this case, be sure not to transmit data from the host. • Excessive use of this function may destroy the non-volatile memory.
TH230/TH230+ Programmers Guide (*1) Response Code ASCII Hexadecimal Decimal Request definition ACK 0x06 6 Send next data group. NAK 0x15 21 Resend just-received data group. CAN 0x18 24 Cancel send operation. (*2) Processing According to Response Code (When Send Data Remains (indicated by identification status of send data group)) Response code Description ACK Initiates operation to send next data. NAK Resends the just-received data. CAN Cancels processing initiated by this command.
Programmers Guide TH230/TH230+ GS ( L pL pH m fn (fn=48) Code ASCII: Code HEX: Range: GS ( L pL pH m fn 0x1D 0x28 0x4C 0x02 0x00 0x30 fn (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.
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.
Programmers Guide TH230/TH230+ • The unused capacity data in the NV graphics domain 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.
TH230/TH230+ Programmers Guide GS ( L pL pH m fn d1 d2 (fn=64) Code ASCII: Code HEX: Range: GS ( L pL pH m fn 0x1D 0x28 0x4C 0x04 0x00 0x30 0x40 (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. d1 d2 0x4B 0x43 • 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.
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.
TH230/TH230+ Programmers Guide GS ( L pL pH m fn kc1 kc2 (fn=66) Code ASCII: Code HEX: Range: GS ( L pL pH m fn 0x1D 0x28 0x4C 0x04 0x00 0x30 0x42 (pL + pH × 256) = 4 (pL = 4, pH = 0) m = 48 fn = 66 32 ≤ kc1 ≤ 126 32 ≤ kc2 ≤ 126 Description: Deletes NV graphics data that has been defined using key codes kc1 and kc2. kc1 kc1 kc2 kc2 • Deleted areas are designated “Unused areas.” • Deleted key codes are designated as undefined.
Programmers Guide TH230/TH230+ GS ( L pL pH m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b (fn=67) Code ASCII: Code HEX: Range: Description: GS ( L pL pH m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b 0x1D 0x28 0x4C pL pH 0x30 0x43 0x30 kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...
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.
Programmers Guide TH230/TH230+ GS ( L pL pH m fn kc1 kc2 x y (fn=69) Code ASCII: Code HEX: Range: GS ( L pL pH m fn 0x1D 0x28 0x4C 0x06 0x00 0x30 0x45 (pL + pH × 256) = 6 (pL = 6, pH = 0) m = 48 fn = 69 32 ≤ kc1 ≤ 126 32 ≤ kc2 ≤ 126 x = 1, 2 y = 1, 2 Description: Prints items of NV graphics data defined using key codes kc1 and kc2. kc1 kc1 kc2 kc2 x x y y • Users have the option of specifying horizontal (times x) × vertical (times y) size settings for the selected data.
TH230/TH230+ Programmers Guide • The maximum print area in the vertical direction is information used when graphics are printed with the page mode selected (for the starting point specified with ESC T is “Upper right” or “Lower left”). In this case, bit images rotated by 90 degrees or 270 degrees are printed. • See Functions 5 and 6 of GS ( E for the paper width and paper (two-color paper / monochrome paper). • See Functions 3 and 4 of GS ( E for the memory switch.
Programmers Guide TH230/TH230+ GS ( k pL pH cn fn (cn = 0, fn = 0) Code ASCII: Code HEX: Range: Description: Notes: GS ( k pL pH 0x1D 0x28 0x6B pL pH (pL + pH × 256) = 2 (pL = 2, pH = 0) cn = 0 fn = 0 Erase symbol storage area. 0 0 0x00 0x00 • TH230+ only, Firmware 01.
TH230/TH230+ Programmers Guide GS ( k pL pH cn fn n (cn = 48, fn = 67) Code ASCII: Code HEX: Range: GS ( k pL pH 0x1D 0x28 0x6B pL pH (pL + pH × 256) = 3 (pL = 3, pH = 0) cn = 48 fn = 67 1 ≤ n ≤ 7 (3 default) Description: Set the module width of PDF417 Barcode 0 C 0x30 0x43 n n n is the width of a single module in dots. Notes: • TH230+ only, Firmware 01.
Programmers Guide TH230/TH230+ GS ( k pL pH cn fn m (cn = 48, fn = 81) Code ASCII: Code HEX: Range: Description: Notes: GS ( k pL pH 0 Q 0 0x1D 0x28 0x6B pL pH 0x30 0x51 0x30 (pL + pH × 256) = 3 (pL = 3, pH = 0) cn = 48 fn = 81 m = 48 Encodes and print the PDF417 symbol data in the symbol storage area. • TH230+ only, Firmware 01.07 or newer • 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.
TH230/TH230+ Programmers Guide GS ( k pL pH cn fn n (cn = 49, fn = 69) Code ASCII: Code HEX: Range: Description: GS ( k pL pH 1 E 0x1D 0x28 0x6B pL pH 0x31 0x45 (pL + pH × 256) = 3 (pL = 3, pH = 0) cn = 49 fn = 69 48 ≤ n ≤ 51 (48 default) Selects the error correction level for QR Code n Notes: Function n n Ability for Reconstruction 48 Select error correction level L 7% 49 Select error correction level M 15% 50 Select error correction level Q 25% 51 Select error correction level H 30% •
Programmers Guide TH230/TH230+ GS ( k pL pH cn fn m d1 … dk (cn = 49, fn = 80) Code ASCII: Code HEX: Range: GS ( k pL pH 1 P 0 d1…dk 0x1D 0x28 0x6B pL pH 0x31 0x50 0x30 d1…dk 4 ≤ (pL + pH × 256) ≤ 7092 (0 ≤ pL ≤ 255, 0 ≤ pH ≤ 27) cn = 49 fn = 80 m = 48 0 ≤ d ≤ 255 k = (pL + pH × 256) - 3 Description: Stores the QR symbol data (d1…dk) in the symbol storage area. Notes: • TH230+ only, Firmware 01.07 or newer • Storage area will be taken from RAM – Font memory.
TH230/TH230+ Programmers Guide GS ( k pL pH cn fn (cn = 51, fn = 72) Code ASCII: Code HEX: Range: GS ( k pL pH 3 H 0x1D 0x28 0x6B pL pH 0x33 0x48 (pL + pH × 256) = 3 (pL = 3, pH = 0) cn = 51 fn = 72 n = 2, 4, 6, 8, 10, 12, 14, 16 (8 default) n n 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.
Programmers Guide TH230/TH230+ GS * Function: Code ASCII: Code HEX: Range: Define downloaded bit image GS * x y d1…dk 0x1D 0x2A x y d1…dk 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.
TH230/TH230+ Programmers Guide • The relationship between bit image data and print result is as follows.T d1 dy+1 … dy•7+1 … dk-3 MSB LSB d2 dy+2 … dy•7+2 … dk-2 MSB LSB . . . . … … dk-1 MSB LSB dy dy•2 … dy•8= df(x=1)= dx•8•y … dk=dx•8 MSB •y LSB • A downloaded bit image and a user-defined character cannot be defined simultaneously when memory switch 8-7 is ON. See Functions 3 and 4 of GS ( E for the memory switch.
Programmers Guide Notes: TH230/TH230+ • 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.
TH230/TH230+ Programmers Guide GS : Function: Code ASCII: Code HEX: Description: Notes: Start/end macro definition GS : 0x1D 0x3A Starts or ends macro definition. • Macro definition starts when this command is received during normal operation and ends when it is processed during macro definition. • While the macro is defined, the printing is also executed. • The maximum number of data is limited to 2048 bytes. All exceeded data bytes are not stored.
Programmers Guide TH230/TH230+ GS @ Function: Code ASCII: Code HEX: Range: Erase User Flash/RAM Sector GS @ n 0x1D 0x40 n 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.
TH230/TH230+ Programmers Guide GS B Function: Code ASCII: Code HEX: Range: Default: Description: Turn white/black reverse printing mode on/off GS B n 0x1D 0x42 n 0 ≤ n ≤ 255 n=0 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).
Programmers Guide TH230/TH230+ GS H Function: Code ASCII: Code HEX: Range: Select printing position of HRI characters GS H n 0x1D 0x48 n 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: Notes: 148 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 • HRI characters are printed u
TH230/TH230+ Programmers Guide GS I Function: Code ASCII: Code HEX: Range: Transmit printer ID GS I n 0x1D 0x49 n 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 1, 49 2, 50 3, 51 4, 52 65 Printer model ID 66 Manufacturer String with 6 characters “_xx.
Programmers Guide TH230/TH230+ 135 Print line resolution 136 Character generator checksum result 143 Booter version 144 Loader version 145 Poweruptest version 146 Poweruptest checksum result 148 EEPROM status 149 Loader verified status “_203 dpi” String “_OK” or “_Err” String with 6 characters “_xx.xx” String with 6 characters “_xx.xx” String with 6 characters “_xx.
TH230/TH230+ Programmers Guide n ≥ 65: When send printer information (character string) is specified, the printer sends the “Header to NUL” character string. Notes for the printer information: • • Each printer information is composed of [header + printer information + NUL] (when n ≥ 65).
Programmers Guide TH230/TH230+ • n = 4 or 52 Logo Definition: 0 Functio n Logo 1 2 3 4 5 6 7 Not used Not used Not used Not used Not used Not used Not used Bit Value 0 1 No logo downloaded Logo downloaded (SRAM (SRAM or Flash) or Flash) Fixed to 0 Fixed to 0 Fixed to 0 Fixed to 0 Fixed to 0 Fixed to 0 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 • n = 254 Sensor Plug Info: Byte # Sensor (from
TH230/TH230+ Programmers Guide GS L Function: Code ASCII: Code HEX: Range: Default: Description: Set left margin GS L nL nH 0x1D 0x4C nL nH 0 ≤ (nL + nH × 256) ≤ 65535 (0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255) (nL + nH × 256) = 0 (nL = 0, nH = 0) 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.
Programmers Guide TH230/TH230+ GS P Function: Code ASCII: Code HEX: Range: Set horizontal and vertical motion units GS P x y 0x1D 0x50 x y 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.
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). 1, 49 Executes a partial cut (one point left uncut).
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).
TH230/TH230+ Programmers Guide GS W Function: Code ASCII: Code HEX: Range: Default: Set printing area width GS W nL nH 0x1D 0x57 nL nH 0 ≤ (nL + nH × 256) ≤ 65535 (0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255) 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).
Programmers Guide TH230/TH230+ GS \ 158 Function: Code ASCII: Code HEX: Range: Default: Description: Set relative vertical print position in page mode GS \ nL nH 0x1D 0x5C nL nH –32768 ≤ (nL + nH × 256) ≤ 32767 (0 ≤ nL ≤ 255, - 128 ≤ nH ≤ 127) None 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.
TH230/TH230+ Programmers Guide GS ^ Function: Code ASCII: Code HEX: Range: Execute macro GS ^ r t m 0x1D 0x5E r t m 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.
Programmers Guide TH230/TH230+ GS a Function: Code ASCII: Code HEX: Range: Default: Description: Enable/disable Automatic Status Back (ASB) GS a n 0x1D 0x61 n 0 ≤ n ≤ 255 n=0 Enable or disable ASB (Automatic Status Back) and specifies the status items to include, using n as follows: Bit Notes: • • • • • • • • • • 160 Function Value 0 Disabled Disabled Disabled Disabled Disabled 1 Enabled Enabled Enabled Enabled Enabled 0 Drawer kick-out connector status 1 Busy status 2 Error status 3 Paper roll
TH230/TH230+ Programmers Guide - Busy (RS232 interface only) • All ASB status is represent the enabled status whenever the status changes. Therefore the disabled status items may change, because each status transmission represents the current status.
Programmers Guide TH230/TH230+ • Third byte (paper sensor information) Bit 0 1 2 3 4 5 6 7 Value Function Paper roll near-end sensor Paper roll near-end sensor Paper roll end sensor Paper roll end sensor Not used Undefined Undefined Not used 0 1 Paper present No paper Paper present No paper Paper present No paper Paper present No paper Fixed to 0 Fixed to 0 Bit 0 and Bit 1: To avoid false reports the paper near end sensor is monitored by a 0.2 m paper feed hysteresis.
TH230/TH230+ Programmers Guide GS b Function: Code ASCII: Code HEX: Range: Default: Description: Turn smoothing mode on/off GS b n 0x1D 0x62 n 0 ≤ n ≤ 255 n=0 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.
Programmers Guide TH230/TH230+ GS g 0 Function: Code ASCII: Code HEX: Range: Initialize maintenance counter GS g 0 m nL nH 0x1D 0x67 0x30 0x00 nL nH 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). In addition, the associated change counter (if existing) is increased by one. This is only possible by nL + nH x 256 = 20, 21 and 50.
TH230/TH230+ Programmers Guide • 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, or FS g 1. • When a counter reaches its maximum value, its value is reset to 0 in the next updating process (maximum values for maintenance counter see page 197).
Programmers Guide TH230/TH230+ GS g 2 Function: Code ASCII: Code HEX: Range: Transmit maintenance counter GS g 2 m nL nH 0x1D 0x67 0x32 0x00 nL nH 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).
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).
Programmers Guide TH230/TH230+ GS h Function: Code ASCII: Code HEX: Range: Default: Description: Set bar code height GS h n 0x1D 0x68 n 1 ≤ n ≤ 255 n = 216 Sets the height of a bar code.
TH230/TH230+ Programmers Guide GS k Function: Code ASCII: (without 2D) Code HEX: (without 2D) Code ASCII: (without 2D) Code HEX: (without 2D) Code ASCII: (with 2D) Code HEX: (with 2D) Range: (without 2D) Range: (with 2D) Print bar code ➀ GS k m d1 … dk NUL ➀ 0x1D 0x6B m d1 … dk NUL ➁ GS m n d1 ... dn ➁ 0x1D 0x6B m n d1 ... dn ➁ GS m n d1 ...
Programmers Guide TH230/TH230+ m 0 1 2 3 4 ➀ Numb Number Barcode 1D/2 er of of Characters system D data characters 0 11 ≤ k ≤ 48 ≤ d ≤ UPC-A 1D Fixed ~ 12 57 9 0 48 ≤ d ≤ 11 ≤ k ≤ UPC-E 1D Fixed ~ 57 12 9 0 (E/J)AN1 12 ≤ k ≤ 48 ≤ d ≤ 1D Fixed ~ 57 3 13 9 0 48 ≤ d ≤ (E/J)AN8 1D Fixed 7 ≤ k ≤ 8 ~ 57 9 0 48 ≤ d ≤ ~ 57 9 A 65 ≤ d ≤ ~ 90 Z S 32 P $ 36 Variab 1 ≤ k ≤ CODE39 % 37 le 255 + 43 - 45 .
TH230/TH230+ Programmers Guide / 47 : 58 10 PDF 417 11 GS1 1D GS1 12 Truncat 1D ed Variab 1 ≤ k ≤ 32 ≤ d ≤ 255 le 255 Variab 1 ≤ k ≤ 13 0~9 48 ≤ d ≤ 57 le Variab 1 ≤ k ≤ 13 0~9 le 48 ≤ d ≤ 57 GS1 1D Stacked GS1 Stacked 14 Omni1D Directio nal GS1 15 1D Limited Variabl 1 ≤ k ≤ e 13 0~9 48 ≤ d ≤ 57 Variabl 1 ≤ k ≤ e 13 0~9 48 ≤ d ≤ 57 Variabl 1 ≤ k ≤ e 13 0~9 48 ≤ d ≤ 57 GS1 16 Expande 1D d 1≤k≤ Variabl 72 e 13 0~ 9 A~ Z a~ z SP ! ” # % & ‘ ( ) * + , .
Programmers Guide TH230/TH230+ 65 UPC-A 1D 2D ➁ 66 UPC-E 67 (E/J)AN13 1D 2D 1D 2D 68 JAN8 (EAN8) 1D 2D Fixed 11 ≤ k ≤ 0~ 48 ≤ d ≤ 12 9 57 Variabl 1≤j≤n e 11 ≤ k ≤ Fixed 12 Variabl 1≤j≤n e 12 ≤ Fixed k≤ 13 1≤j Variable ≤n 7≤k Fixed ≤8 1≤j Variable ≤n 0≤ d ≤ 255 0~ 48 ≤ d ≤ 9 57 0≤ d ≤ 255 0≤ d ≤ 255 0~ 48 ≤ d ≤ 9 57 0≤ d ≤ 255 A~Z Variable 1 ≤ n SP $ ≤ 255 % + .
TH230/TH230+ Programmers Guide 0~9 A~Z 72 CODE93 Variable 73 CODE128 Variable 75 PDF 417 Variable 1D Variable 2D Variable 1D GS1 77 Truncate d 2D Variable 1D Variable 2D Variable 76 GS1 78 GS1 Stacked GS1 1D Stacked 79 OmniDirection 2D al 80 GS1 Limited 1D 2D GS1 81 Expande 1D d Variable Variable Variable 1≤n SP ≤ 255 $ % + .
Programmers Guide TH230/TH230+ ” # % & ‘ ( ) * + , . / : ; < = > ? _ 1≤j≤ CC-A, CC-B (4 0≤ d ≤ 255 n Columns) 1≤k≤ 1D Variable 0 ≤ d ≤ 105 UCC 48 82 EAN128 1≤j≤ CC-A, CC-B (2 CC-A/B 2D Variable 0≤ d ≤ 255 n Columns) 1≤k≤ 0 ≤ d ≤ 105 1D Variable UCC 48 83 EAN128 1≤j≤ CC-C (k < 57, 4 CC-C 2D Variable 0≤ d ≤ 255 n Columns) If not start of line, this command will be ignored.
TH230/TH230+ UPC-A (m = 0, 65) process: 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.
Programmers Guide TH230/TH230+ checked. • Left guard bar/center bar/right guard bar are added automatically. CODE39 (m = 4, 69) process: • The printer processes the start code (ASCII = */Hex = 2Ah/Decimal = 42) as follows: • When the first bar code ( d1) is “*”, the printer processes the data as a first character. • If the first bar code ( d1) is not “*”, the printer adds a start character (*) automatically.
TH230/TH230+ Programmers Guide Value Value (dezimal (hex) ) Code A Code B 0 00 Space Space 1 01 ! ! 2 02 “ “ 3 03 # # 4 04 $ $ 5 05 % % 6 06 & & 7 07 ‘ ‘ 8 08 ( ( 9 09 ) ) 10 0A * * 11 0B + + 12 0C , , 13 0D 14 0E . .
Programmers Guide TH230/TH230+ 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 178 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n
TH230/TH230+ Programmers Guide 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 SYN v “86“ ETB w “87“ CAN x “88“ EM y “89“ SUB z “90“ ESC { “91“ FS | “92“ GS } “93“ RS ~ “94“ US DEL “95“ FNC 3 FNC 3 “96“ FNC 2 FNC 2 “97“ SHIFT SHIFT “98“ CODE C CODE C “99” CODE B FNC 4 CODE B CODE FNC 4 A CODE A FNC 1 FNC 1 FNC 1 START_A START_B START_C • CODE C values are coded BCD like. Range goes from 00 – 99 and encode two digits, e.g.
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): 180 GS1Truncated– Composite (m=12, 77) process: • Barcode is a combination of GS1 Truncated and the composite codes CCA and CC-B • Separator to composit
TH230/TH230+ GS1StackedOmni– Composite (m=14, 79) process: GS1LimitedComposite (m=15, 80) process: GS1ExpandComposite (m=16, 81) process: Programmers Guide • Barcode is combination of GS1 Stacked Omni and the composite codes CC-A and CC-B • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEZ) • Barcode can be printed without the composite part • Barcode will not be printed if the separator is given without composite code • If encoding of composite code failed, barcode will not be print • Examp
Programmers Guide UCC EAN128 (m=82,m=8 3) process: TH230/TH230+ • Barcode is combination of code 128 and the composite codes CC-A, CC-B (m=82) and CC-C (m=83) • Barcode can be printed without the composite part • Barcode will not be printed if the separator is given without composite code • UCC EAN is an Code 128 with follow structure: Start Character Function Code 1 Element String Applicati Data on Filed(s) Identifie r (AI) (START_A, (FNC_1) START_B, START_C) CC_A CC_B 8 CC_C 182 Checksum Stop Ch
TH230/TH230+ Programmers Guide GS p Function: Code ASCII: Code HEX: Default: Select PDF 417 parameters GS p a b c d e f 0x1D 0x70 a b c d e f a=1 b=2 c = 58 d=7 e=3 f = 10 Description: Selects the two-dimensional PDF 417 parameters as follows: Value Range a, b Description SUPPORT The ration of bar height to symbol length. NO !! a= height 1 ≤ a ≤ 10 NO !! b= width 1 ≤ b ≤ 100 NO !! c rows 3 ≤ c ≤ 90 Number of rows in NO !! the matrix of code words.
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.
TH230/TH230+ Programmers Guide GS r Function: Code ASCII: Code HEX: Range: Description: Notes: Transmit status GS r n 0x1D 0x72 n n = 1, 2, 4, 49, 50, 52 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 • Each status is 1 byte.
Programmers Guide TH230/TH230+ • The status to be transmitted is as follows: • Flash Memory User Sector status (n = 4, 52) Bit Function 0 1 2 Undefined Undefined User data storage 3 Flash Logo 4 5 Not used User-defined characters Undefined Not used 6 7 0 Status Write successful 1 Write failed, specified area not erased Area adequate, Area not adequate definition stored Fixed to 0 Not written to Written to Flash Flash Fixed to 0 • After the print changing line operation ends, paper sensor sta
TH230/TH230+ Programmers Guide GS w Function: Code ASCII: Code HEX: Range: Default: Description: Set bar code width GS w n 0x1D 0x77 n 2≤n≤6 n=3 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.
Programmers Guide TH230/TH230+ GS 0x81 Function: Code ASCII: Code HEX: Range: Set paper type GS 0x81 m n 0x1D 0x81 m n 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.
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.
Programmers Guide TH230/TH230+ GS 0x84 Function: Code ASCII: Code HEX: Range: Download logo image GS 0x84 m n1 0x1D 0x84 m n1 x = (n1 * n2 * 8) * m m = 1 = monochrome m = 2 = two-color n1 ≤ 640/8 n2 ≤ 512/8 n2 n2 d1 … dx d1 … dx Description: The latest value from the set current logo command will be the logo index to be used to store the download graphics.
TH230/TH230+ Notes: Programmers Guide • 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 dn1+1 dn1+2 … d(2xn1) . . . . . . . .
Programmers Guide TH230/TH230+ GS 0x8E Function: Code ASCII: Code HEX: Description: Download paper type description GS 0x8E nL nH d1 … dn 0x1D 0x8E nL nH d1 … dn 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.
TH230/TH230+ Programmers Guide GS 0x8F Function: Code ASCII: Code HEX: Range: Return paper type description GS 0x8F m 0x1D 0x8F m 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.
Programmers Guide TH230/TH230+ GS 0xFF Function: Code ASCII: Code HEX: Description: Reset firmware GS 0xFF 0x1D 0xFF 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.
TH230/TH230+ US t Programmers Guide Function: Code ASCII: Code HEX: Description: Print Test Form US t 0x1F 0x74 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.
Programmers Guide TH230/TH230+ Transmit Status Identification Table The following table shows the Transmit Status Identification: Command & Function ESC l (upgrade) ESC w n 7 DLE EOT GS ENQ GS I with 1 ≤ n ≤ 3; 49 ≤ n ≤ 51 GS I with n >= 65 (1st byte) GS g 2 (1st byte) GS ( E with fn = 4 or 6 (1st byte) XON XOFF ASB (1st byte) ASB (2nd to 4th byte) Power-on notification 196 Status Reply <00011011>B <00011001>B <0**1**10>B <1*0*****>B <0**0****>B <01011111>B <01011111>B <00110111>B <00010001>B <00010011>
TH230/TH230+ Programmers Guide Printer Parameter Table The following table shows the possible adjustments and how it can be changed. BM sensor Endurance Test Possible Value Max.
Programmers Guide TH230/TH230+ High Voltage Errors Cover Open Counter Maximum Head Temperature Linefeeds Dots Reset able Maintenance Counter for replaced spare Cuts parts. Linefeed Counter for mechanism replacements of Print head spare parts.
TH230/TH230+ Programmers Guide Character Sets and Fonts Representation of the printed data 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 Font B 13 * 24 Dots 10 * 24 Dots The character density will be determined by the character spacing between two adjacent character cells.
Programmers Guide TH230/TH230+ User defined character sets User defined character could be loaded in RAM (default) or in flash-memory (GS “) by the sequence ESC &. It is possible to define one page (font A and font B) from the character code 20H to the character code FFH (16x24). Depend from the storage (RAM or flash) characters are available or not after power off. The flash-memory works like a backup medium for the RAM. If a font defined in flash and not in RAM, the RAM will be update.
TH230/TH230+ Programmers Guide Character code tables Standard Code Pages - Overview Following character code tables are standard and can be selected by sequence ESC t and ESC R: Number 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 WPC1252 (Latin I) 9 PC862 (Hebrew) 10 PC737 (Greek) 11 PC874 (Thai) 12 PC857 (Turkish) 16 WPC1254 (Turkish)
Programmers Guide TH230/TH230+ Standard code pages – Definition for USB Loader Character Set Structure This Structure is divided into two blocks. The first block is the header of the loader (See document [R1] "TH230 - Firmware Upgrade Concept"). At offset 64 begins the second block with character set data. All Offsets in this and next structures are relative pointer with base of the beginning from first block (offset 0). Name fields can be up to 16 characters and must be terminated by zero.
TH230/TH230+ Programmers Guide Code Table Structure Offset Field Size Description 0 FirstCharacter 1 ASCII value of first character 1 LastCharacter 1 ASCII value of last character 2 CharacterWidth 1 Width of character in pixels 3 CharacterHeight 1 Height of character in pixels 4 MinSpacing 1 Minimal spacing between characters 5 Reserved 3 Reserved 8 CharImage[n] n*8 Character image(n) (max n = LastCharacter – FirstCharacter + 1) International 1 Index for International Code
Programmers Guide TH230/TH230+ Character Image 13 x 24 (Thermo) Bits 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 7 6 MSB 5 4 3 Byte 2 Byte 4 Byte 6 Byte 8 Byte 10 Byte 12 Byte 14 Byte 16 Byte 18 Byte 20 Byte 22 Byte 24 Byte 26 Byte 28 Byte 30 Byte 32 Byte 34 Byte 36 Byte 38 Byte 40 Byte 42 Byte 44 Byte 46 Byte 48 2 1 0 LSB 7 6 MSB 5 4 3 Byte 1 Byte 3 Byte 5 By
TH230/TH230+ Programmers Guide Character Image 10 x 24 (Thermo) Bits 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 7 6 MSB 5 4 3 Byte 2 Byte 4 Byte 6 Byte 8 Byte 10 Byte 12 Byte 14 Byte 16 Byte 18 Byte 20 Byte 22 Byte 24 Byte 26 Byte 28 Byte 30 Byte 32 Byte 34 Byte 36 Byte 38 Byte 40 Byte 42 Byte 44 Byte 46 Byte 48 2 1 0 LSB 7 6 MSB 5 4 3 Byte 1 Byte 3 Byte 5 By
Programmers Guide Standard code pages - tables In the following tables the implemented code pages are shown: Character code table Page 0 (PC437: USA, Standard Europe): 206 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 1 (PC850: Multilingual Latin I): 207
Programmers Guide Character code table Page 2 (PC852: Latin II): 208 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 3 (PC860: Portuguese): 209
Programmers Guide Character code table Page 4 (PC863: Canadian French): 210 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 5 (PC865: Nordic): 211
Programmers Guide Character code table Page 6 (PC858: Multilingual I + Euro): 212 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 7 (PC866: Russian): 213
Programmers Guide Character code table Page 8 (WPC1252: Latin I): 214 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 9 (PC862: Hebrew): 215
Programmers Guide Character code table Page 10 (PC737: Greek): 216 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 11 (PC874: Thai): 217
Programmers Guide Character code table Page 12 (PC857: Turkish): 218 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 16 (WPC1254: Turkish): 219
Programmers Guide Character code table Page 17 (WPC1250: Central Europe): 220 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 18 (WPC28591: Latin 1): 221
Programmers Guide Character code table Page 19 (WPC28592: Latin 2): 222 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 20 (WPC28599: Turkish): 223
Programmers Guide Character code table Page 21 (WPC28605: Latin 9): 224 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 22 (PC864: Arabic): 225
Programmers Guide Character code table Page 23 (PC720: Arabic): 226 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 24 (WPC1256: Arabic): 227
Programmers Guide Character code table Page 25 (WPC28596: Arabic): 228 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 26 (KATAKANA: Asia): 229
Programmers Guide Character code table Page 27 (PC775: Baltic): 230 TH230/TH230+
TH230/TH230+ Programmers Guide Character code table Page 28 (WPC1257: Baltic): 231
Programmers Guide Character code table Page 29 (WPC28594: Baltic): 232 TH230/TH230+
TH230/TH230+ Programmers Guide Asia Code Pages – Definition for USB Loader Character Set Structure This Structure is divided into two blocks. The first block is the header from loader. At offset 64 begins the second block with character set data. At the end, 20 character-tables (See Code Table Structure) can be defined, with the range from the first character to the last. The table must start from the end of the offset – member + the offset.
Programmers Guide 86 Control TH230/TH230+ 2 16-Bit Control-Field for special Settings: All Bit Description 0 No user defined characters 1 Reserved 2 Reserved 3 Reserved Subtype excludive Subtype = 1 (JIS) 88 CodeTableArray[20] 4 JIS-SHIFTJIS-Conversion allowed Reserved 5 Reserved Reserved 6 Reserved Reserved 7 Reserved Reserved 8 Reserved Reserved 9 Reserved Reserved 10 Reserved Reserved 11 Reserved Reserved 12 Reserved Reserved 13 Reserved Reserved 14 Reser
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.
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.
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.
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.
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.
TH230/230+ Programmer’s Guide DFUX Interface String Printer Interface String Offset Field Size Value Description 0 bLength 1 24h Size of this descriptor, in bytes 1 bDescriptorType 1 03h STRING descriptor type 2 bString 22h Unicode “Printer Interface” Following string descriptors are not published in the devices descriptor set ( -> “hidden” strings SerialNumber String (index 80h) Offset Field Size Value Description 0 bLength 1 12h Size of this descriptor, in bytes 1 bDescrip
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. IEEE 1284 Device ID (GET_DEVICE_ID) Upon receive of the printer class-specific request GET_DEVICE_ID the printer returns a device ID string that is compatible with IEEE 1284. See IEEE 1284 for syntax and formatting information.
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...
Programmers Guide TH230/TH230+ Receipt Buffer Following hysteresis levels are valid: Size 4096 Bytes Handshake Off Handshake On Handshake Off Handshake On 3968 3072 27 9 (fill level >=) 244 Size 45 Bytes (fill level <=) (fill level >=) (fill level <=)
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).
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 Selecting the service menu To start the service menu you just have to press and hold the linefeed (LF) button during power up or printer reset.
TH230/230+ Programmer’s Guide Controlling the service menu The linefeed button (LF) controls the service menu. A short click of the LF button increments the selection and a long click (approx. 1 sec) executes the selected function or rather prints out the selected sub-menu. Action Effect Short click Increment selection Long click (approx. 1 sec.) Execute selected function / Confirm The current selection is indicated by the 3 LED’s.
Programmers Guide TH230/TH230+ Save changed settings In the configurations menu is it possible to change some Memory switches or customer values. If one or more changes are done, the user will ask for save this new setting. It is possible to ignore the save request and continue the settings. However, every “Exit/Save” command or additional change will ask again. It is the fastest procedure to continue the settings and save all changes at one time, because every saved setting needs a warm reboot.
TH230/230+ Programmer’s Guide Print Service Menu The print menu allows you to change the most important printer settings and gives you access to all diagnostic and information functions. Unlike the LED menu, the print menu expands over several menus with sub-menus. The current menu level is printed out. Below a detailed description of the overall structure and the functions of the service menu is shown.
Programmers Guide TH230/TH230+ Main Menu / Diagnostic 1 2 3 4 5 6 7 Diagnostic Exit Endurance Test Rolling Pattern Test Sensor Test Black Mark Test Cutter Test (Full Cut) Cutter Test (Half Cut) 1 2 3 Endurance Test Exit Run Test Unlimited Run Test Limited 1 2 3 4 5 6 7 Rolling Pattern Test Exit Print Pattern Once Print Pattern Unlimited Print Pattern 10 Times Print Pattern 50 Times Print Pattern 100 Times Print Pattern 500 Times Start Sensor Test Start Black Mark Test 250 1 2 3 4 5 6 7 Cutter Test
TH230/230+ Programmer’s Guide Main Menu / Configuration / Hardware 1 2 3 4 5 6 7 Hardware Exit/Save Power Button Max. Power Black Mark Sensor Endurance Test Sleep Mode iPRINT Settings 1 2 3 Power Button Exit Enable Button Disable Button Max Power 1 Exit 2 Set Max. Power to Auto 3 Set Max. Power to 48 W 4 Set Max. Power to 60 W 5 Set Max. Power to 75 W 6 Set Max. Power to 90 W 7 Set Max.
Programmers Guide TH230/TH230+ Main Menu / Configuration / Software 1 2 3 4 5 6 7 Software Exit Power-ON Notice Paper-NE Notice Automatic Line Feed No. of Endurance Tickets Legacy Printer Support Listen To RT-Cmds 1 2 3 Power-ON notice Exit Transmit Don't Transmit 1 2 3 Paper-NE Notice Exit Enable Paper-NE Notice Disable Paper-NE Notice 1 2 3 Automatic Line Feed Exit Enable Automatic Line Feed Disable Automatic Line Feed 1 2 3 4 5 6 7 252 No.
TH230/230+ Programmer’s Guide Main Menu / Configuration / Print Options 1 2 3 4 5 6 7 8 Print Options Exit Print Speed Paper Width Paper Type Print Density Color Print Density Auto Recovery Receipt Shooting 1 2 3 Paper Width Exit New Paper Width 57.
Programmers Guide TH230/TH230+ Main Menu / Configuration / EEPROM & Counters 1 2 EEPROM & Counters Exit Set EEPROM to Default Main Menu / Configuration / RS232 Communication 1 2 3 4 5 6 7 8 RS232 Communication Exit Baud Rate Parity Flow Control Bit Length Receive Buffer Capacity Receive Error Handling Print Settings 1 2 3 4 5 6 7 8 9 Baud Rate Exit 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps 38400 bps 57800 bps 115200 bps 1 2 3 4 Parity Exit No Parity Even Parity Odd Parity 1 2 3 Flow Control E
TH230/230+ Programmer’s Guide Main Menu / Configuration / Ethernet Settings Main Menu / Configuration / Ethernet Settings 1 2 3 Ethernet Settings Exit DHCP Boot/P 1 2 3 DHCP Exit Enable DHCP Disable DHCP 1 2 3 Boot/P Exit Enable Boot/P 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.
TH230/230+ Programmer’s Guide Every diagnostic function will be explained in the table below. Menu Nr. Description 3.1 Exit/Save 3.2 Endurance Test This menu gives the ability to start the endurance test with several conditions. At first it is possible to start the endurance test limited, which means the test will be performed as many times as defined by the Customized Value “Number of Endurance Tickets”. In endless mode, the execution can be interrupted by a long click of the LF button. 3.
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 Menu Nr. Description 4.2.1 Exit/Save 4.2.2 Power Button Available Options Enable Button, Disable Button Select the function of the power button.
TH230/230+ 4.2.6.5 Programmer’s Guide Sleep Mode Cash Drawer Delay The minimum time between leaving Sleep Mode and opening cash drawer 0 sec, 0.5 sec, 1 sec, 1.7 sec, 2.
Programmers Guide TH230/TH230+ Software Menu Nr. Description 4.3.1 Exit Available Options Exit this menu level and give a save request, if there are unsaved changes. 4.3.2 Power-ON Notice Select a power up notification on the communication interface 4.3.3 Paper-NE Notice 4.3.4 Automatic Line Feed Enable Paper-NE Select the usage of the Paper-Near-End Sensor.
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”. Menu Nr. Description 4.4.1 Exit Available Options Exit this menu level and give a save request, if there are unsaved changes. 4.4.2 Print Speed Set the maximum of print speed for power consumption and print quality.
Programmers Guide 4.4.8.2 Receipt Shooting Time Defines the flush time for the Receipt Shooting memory. TH230/TH230+ Endless, 2 sec, 5 sec, 10 sec, 30 sec, 60 sec EEPROM & Counters Menu Nr. Description 4.5.1 Exit Exit this menu level and give a save request, if there are unsaved changes. 4.5.
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. Menu Nr. Description 4.6.1 Exit Available Options Exit this menu level and gives a save request, if there are unsaved changes. 4.6.2 Baud Rate Select the baud rate for serial communication. 4.6.3 Parity Select the data parity for serial communication. 4.6.4 Flow Control 4.6.
Programmers Guide TH230/TH230+ Ethernet Configuration In this configuration menu, you can configure the parameters for use with a Ethernet communication interface. Menu Nr. Description 4.6.1 Exit Available Options Exit this menu level and gives a save request, if there are unsaved changes. 4.6.2 DHCP Enable the “Dynamic Host Configuration Protocol” to use a automatically assign of IP address and other configuration information. 4.6.
TH230/230+ Programmer’s Guide Information - Menu In this menu is it possible to print out different information’s about the TH230 printer. Menu Nr. Description 6.1 Exit Available Options Exit this menu level. 6.2 Print Installed Code Pages That prints a printout with printer data and an overview of installed codepages. 6.3 Print Code Pages That prints a collection of printouts of all chars of installed codepages. 6.
Programmers Guide TH230/TH230+ TH230 Diagnostic Functions Diagnostic Function Description Selection Printout printer info, settings and • Entering diagnostic mode statistic data. • ESC – Command • Diagnostic mode menu Sensor test Allow to test sensor functions. • LED diagnostic menu Set some settings in EEPROM to • Diagnostic mode menu EEPROM to default default. • LED diagnostic menu • Diagnostic mode menu Produce endless or a fixed count • Short cut the USB Endurance Test of test prints.
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. Menu Nr. Availability Short self test Extended self test service menu 2. / service menu 6.
Programmers Guide TH230/TH230+ Example of the Extended Selftest form: 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.
TH230/230+ Programmer’s Guide The self test printout contains the following information’s (depending on model, version, etc.
Programmers Guide TH230/TH230+ Printer Settings: • • • • • • • • • • • • • • • • • • • • • • • Black Mark Sensor: Endurance Test: Automatic linefeed: Power button: Power-ON Notice: Paper- NE Notice: Receipt Shooting: Shoot Flush Time: Sleep Mode: Max. power: Max. speed: Nr. of endurance tickets Paper width Print density Paper type Code-128 ChkDigit ITF Leading Zero Brc String Term Legacy Printer Support Listen to RT-Cmds Default Code Page Auto Recovery Orig.
TH230/230+ Programmer’s Guide Measured Values: • Supply Voltage: • Printhead Temperature: “xx.x V” “xx.
Programmers Guide TH230/TH230+ Statistic Report: • • • • • Dots Total: Dots Actual: Printhead Changes: Linefeeds Total: Linefeeds Actual: mechanism • • • • • • • • • • • • • • • Mechanic Changes: Cuts Total: Cuts Actual: Cutter Changes Cutter Errors: Max. Head Temp.
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.
Programmers Guide TH230/TH230+ Default Code Page 0 (PC437) Sleep Waiting Time 1 min Sleep Cash Drawer Delay 1.
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).
Programmers Guide TH230/TH230+ Endurance test Printout The width of the graphics depends on the setting of the paper width. The number of tickets is divided into two kinds. The first Ticket is a ticket with graphics (see below) and the following nine tickets are without graphics. The endurance test prints the following graphics: (for 80 mm paper width) (for 57.5 mm paper width) After printing a ticket, two status lines are printed and the printer performs a partial paper cut.
TH230/230+ Programmer’s Guide Black Mark test The printer moves the paper to the next black mark, prints three lines, moves the paper until the next black mark is underneath the cutter (one Form Feed) and cuts the paper. After this operation, the paper is moved backwards to the first print position (top of form). This test is repeated continuously and can be stopped by pushing the Linefeed button once.
Programmers Guide TH230/TH230+ Description of EERPOM Updates After switching on the printer the statistic counters, which are stored in the EEPROM, were copied into the RAM. Up from that point the statistic counters are accumulated inside of the RAM. This means, actual statistic counters, which are stored in the RAM and EEPROM statistic counters are different! The first time after switching on the printer, the statistic data are saved after 7,5 minutes.
TH230/230+ Programmer’s Guide Calculating Power On Time The Power on time is calculated by subtracting the Power on counter from the EEPROM update counter and dividing afterwards by 4. This calculation of the Power on time is correct, because the EEPROM update counter is increased and saved every 15 minutes. In special situations the EEPROM is updated additionally and then the Power on count is increased. This occurs every time when the Revision level counter was changed.
Programmers Guide TH230/TH230+ Technical Specifications Printmodule Method Print Resolution (horizontal) Positioning Resolution (vertical) Print Speed Print Speed TH230+ Draft Print Speed Color Print Width Cutter Sensors Drive 280 Top Margin Temperature Sensor Method Function Cutting Speed Drive Paper Near End (adjustable) Paper End Black Mark Cover Open Cutter Home Sensor Paper Feed Thermal 203 dpi (8 Dots/mm) 203 dpi (8 Dots/mm) up to 220 mm/s up to 300 mm/s up to 110 mm/s (with 2 color paper) Wit
TH230/230+ Programmer’s Guide Printing Character Sets Specification (fixed) PC437 (USA, Standard Europe) PC850 (Multilingual) PC852 PC860 (Portuguese) PC863 (Canadian-French) PC865 (Nordic) PC858 (Euro) PC866 (Cyrillic #2) PC1252 PC862 PC737 (Greek) PC874 (Thai) PC857 (Turkish) WPC1254 (Turkish) WPC1250 (Central Europe) WPC28591 (Latin 1) WPC28592 (Latin 2) WPC28599 (Turkish) WPC28605 (Latin 9) PC864 (Arabic) PC720 (Arabic) WPC1256 (Arabic) WPC28596 (Arabic) KATAKANA (Asia) PC775 (Baltic) WPC1257 (Baltic
Programmers Guide Interface Boards TH230/TH230+ 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.
TH230/230+ Programmer’s Guide Special Features Statistical Data Yes Self test and Diagnostic Yes Functions Paper Loading Clamshell, Easy yes Drop Paper Reverse yes possible to full cut with automatic reverse feeding by Feeding command GS V (see page 155) Operating/ Climatic Operation conditions: Environment Requirements (IEC IEC 721 3/3 class 3k3 according to EN 60721-3-3 al Conditions 721) Climatic tests according to IEC 68 / EN60068 - Approvals Operating: 3/3 Air temperature 5°C - 45°C Class 3K3 Humidi
Programmers Guide TH230/TH230+ Mechanical Mechanic test conditions: Requirements (EC 721) Environmental classes/conditions : Stationary operation, Operating: 3/3 weather protected DIN EN 60721-3-3 Class 3M3 printer on, Class 3M2 printing attempts/printouts during test Transport conditions DIN Non Operating: EN 60721-3-2,Class 2M2 printer off Remark: The stress 3/1 Class 3M2 according to environmental class 3M1 (storage) is contained in Transport: 3/2 environmental class 3M2 (transport).
TH230/230+ Programmer’s Guide ERROR Blink Pattern 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.
Programmers Guide Power-Up-Test Errors TH230/TH230+ Error Description Blink Count After power-on of the printer, several self tests are executed, before starting the printer firmware itself: None valid Loader module found There is none valid Loader (SST) module existing in the Flash memory Printer stops - MCU error MCU hardware error found Printer stops 1 IRAM error Internal RAM hardware error found Printer stops 2 RAM error External RAM hardware error found Printer stops 3 Timer/C
Wincor Nixdorf International GmbH, 2013 D 33094 Paderborn