Wincor Nixdorf TH180 Programmer's Manual
Wincor Nixdorf TH180 Programmer's Manual

Wincor Nixdorf TH180 Programmer's Manual

Hide thumbs Also See for TH180:
Table of Contents

Advertisement

Quick Links

TH180
Thermal Printer
Programmer's Guide
Edition November 2012

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TH180 and is the answer not in the manual?

Questions and answers

Summary of Contents for Wincor Nixdorf TH180

  • Page 1 TH180 Thermal Printer Programmer’s Guide Edition November 2012...
  • Page 2 All brand and product names mentioned in this document are trademarks of their respective owners. Copyright © Wincor Nixdorf International GmbH, 2012 The reproduction, transmission or use of this document or its contents is not permitted without express authority. Offenders will be liable for damages.
  • Page 3: Table Of Contents

    Contents Control Code List ............................1 Commands related to printing instructions ................... 1 Commands related to printing characters ..................1 Commands related to the print position ..................2 Commands related to bit images ....................2 Commands related to macro functions ..................2 Commands related to bar code .....................
  • Page 4 ESC - n ............................. 35 ESC ? n ............................36 ESC E n............................36 ESC G n ............................37 ESC M n ............................38 ESC R n ............................39 ESC V n ............................40 ESC t n ............................. 41 ESC { n ............................. 42 GS ! n ...............................
  • Page 5 Commands related to auxiliary functions .................. 104 DLE ENQ n ........................... 104 ESC @ ............................105 ESC L ............................106 ESC S ............................107 ESC p m t1 t2 ..........................108 GS I n ............................. 110 GS P x y ............................112 DLE DC4 n m t ..........................
  • Page 6: Control Code List

    TH180 Programmer’s Guide Control Code List Commands related to printing instructions Control code Designation Print and line feed Print and return to standard mode (in page mode) Print and carriage return ESC FF Print data in page mode ESC J n...
  • Page 7: Commands Related To The Print Position

    TH180 Programmer’s Guide Commands related to the print position Control code Designation Horizontal tab ESC $ nL nH Set absolute print position ESC D Set horizontal tab positions ESC T n Select print direction in page mode ESC W xL xH...
  • Page 8: Commands Related To New Line Quantities

    TH180 Programmer’s Guide Commands related to new line quantities Control code Designation ESC 2 Select 1/6-inch line spacing ESC 3 n Set line spacing Commands related to mechanical control Control code Designation GS V m Cut paper (No. 1) GS V m n Cut paper (No.
  • Page 9: Commands Related To Auxiliary Functions

    TH180 Programmer’s Guide Commands related to auxiliary functions Control code Designation DLE ENQ n Real-time request to printer ESC @ Initialize printer ESC L Select page mode ESC S Select standard mode ESC p m t1 t2 Generate pulse GS I n...
  • Page 10: Code Tables

    TH180 Programmer’s Guide Code Tables Page 0 (PC437)
  • Page 11: Katakana)

    TH180 Programmer’s Guide Page 1 (Katakana)
  • Page 12: Pc850)

    TH180 Programmer’s Guide Page 2 (PC850)
  • Page 13: Pc860)

    TH180 Programmer’s Guide Page 3 (PC860)
  • Page 14: Pc863)

    TH180 Programmer’s Guide Page 4 (PC863)
  • Page 15: Pc865)

    TH180 Programmer’s Guide Page 5 (PC865)
  • Page 16: Wpc1252)

    TH180 Programmer’s Guide Page 16 (WPC1252)
  • Page 17: Pc866)

    TH180 Programmer’s Guide Page 17 (PC866)
  • Page 18: Pc852)

    TH180 Programmer’s Guide Page 18 (PC852)
  • Page 19: Pc858)

    TH180 Programmer’s Guide Page 19 (PC858)
  • Page 20: Mik)

    TH180 Programmer’s Guide Page 254 (MIK)
  • Page 21: Blank Page)

    TH180 Programmer’s Guide Page 255 (Blank Page)
  • Page 22: Pc857)

    TH180 Programmer’s Guide Page 8 (PC857)
  • Page 23: Thai Code 18)

    TH180 Programmer’s Guide Page 26 ( Thai code 18)
  • Page 24: Pc864)

    TH180 Programmer’s Guide Page 40 (PC864)
  • Page 25: Pc851)

    TH180 Programmer’s Guide Page 249 (PC851)
  • Page 26: Pc869)

    TH180 Programmer’s Guide Page 250 (PC869)
  • Page 27: Iso8859-2)

    TH180 Programmer’s Guide Page 251 (ISO8859-2)
  • Page 28: Iso8859-7)

    TH180 Programmer’s Guide Page 252 (ISO8859-7)
  • Page 29: Pc866 Type 2)

    TH180 Programmer’s Guide Page 253 (PC866 Type 2)
  • Page 30: Command Details

    TH180 Programmer’s Guide Command Details Commands related to printing instructions [Designation] Print and line feed [Format] [Valid limits] --- [Initial value] --- [Function] (1) Prints the data in the print buffer and executes line feed based on the specified amount of line feed. (Standard mode) (2) After printing is finished, the beginning of a new line is set as the next print position.
  • Page 31: Esc Ff

    TH180 Programmer’s Guide [Designation] Print and carriage return [Format] [Valid limits] --- [Initial value] --- [Function] (1) Executes the same operations as print and (LF) if automatic line feed is enabled. Ignores this command if automatic line feed is disabled.
  • Page 32: Esc J N

    TH180 Programmer’s Guide ESC J n [Designation] Print and feed paper [Format] 1BH, 4AH, n [Valid limits [Initial value] --- [Function] (1) Prints the data in the print buffer and advances the paper [n × basic calculated pitch] inches. (2) After printing is finished, the beginning of the new line is set as the next print position.
  • Page 33: Esc D N

    TH180 Programmer’s Guide ESC d n [Designation] Print and feed n lines [Format] 1BH, 64H, n [Valid limits] 0 [Initial value] --- [Function] (1) Prints the data in the print buffer and advances the paper n lines. (2) After printing is finished, the beginning of the new line is set as the next print position.
  • Page 34: Commands Related To Printing Characters

    TH180 Programmer’s Guide Commands related to printing characters [Designation] Cancel print data in page mode [Format] [Valid limits] --- [Initial value] --- [Function] (1) Erases all data in the print area currently set in page mode. (2) This command is valid only when page mode is selected.
  • Page 35: Esc Sp N

    TH180 Programmer’s Guide ESC SP n [Designation] Set right-side character spacing [Format 1BH, 20H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Specifies the amount of space to be provided on the right side of a character to [n×basic calculated pitch] inches.
  • Page 36: Esc ! N

    TH180 Programmer’s Guide ESC ! n [Designation] Select print mode(s) [Format] 1BH, 21H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Batch-specifies print mode. (2) The table below lists the bit definitions: Value Function Font B/C is Character font Font A is selected.
  • Page 37 TH180 Programmer’s Guide (10) The table below lists the font selections Bit0 Font ANK size 12×24 bits 1 (FONT B = MODE1) 8×16 bits 1 (FONT B = MODE2) 9×24 bits (11) When characters are enlarged horizontally, the characters are enlarged to the right relative to the left edge of character space.
  • Page 38: Esc % N

    TH180 Programmer’s Guide ESC % n [Designation] Select / cancel user-defined character set [Format] 1BH, 25H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Specifies or cancels a user-defined character set. (2) The table below lists the bit definitions:...
  • Page 39: Esc & Y C1 C2 [Xld1 D(Y×X1)] [Xkd1D (Y×Xk)]

    TH180 Programmer’s Guide ESC & y c1 c2 [xld1 d(y×x1)] [xkd1d (y×xk)] [Designation] Define user-defined characters [Format] 1BH, 26H, y, c1, c2, [xld1..d (y×x1)]..[xkd1 ..d (y×xk)] [Valid limits] y = 3 (font A,B) y = 2 (font C)
  • Page 40: Esc - N

    TH180 Programmer’s Guide ESC - n [Designation] Turn underline mode on/off [Format] 1BH, 2DH, n [Valid limits] 0 2, 48 [Initial value] n = 0 [Function] (1) Selects or cancels an underline mode. Function 0, 48 Cancel an underline mode.
  • Page 41: Esc ? N

    TH180 Programmer’s Guide ESC ? n [Designation] Cancel user-defined characters [Format] 1BH, 3FH, n [Valid limits] 32 n 126 [Initial value] --- [Function] (1) Erases a character user-defined for a specified code. (2) n is a character code corresponding to a definition pattern to be deleted.
  • Page 42: Esc G N

    TH180 Programmer’s Guide ESC G n [Designation] Turn double-strike mode on/off [Format] 1BH, 47H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Specifies or cancels double-strike printing. (2) The table below lists the bit definitions: Value Function...
  • Page 43: Esc M N

    TH180 Programmer’s Guide ESC M n [Designation] Select character fonts [Format] 1BH, 4DH, n [Valid limits 2, 48 50, 128 130, 176 [Initial value] n = 0 [Function] (1) Selects a character font. (2) The table below lists the parameter definitions.
  • Page 44: Esc R N

    TH180 Programmer’s Guide ESC R n [Designation] Select an international character set [Format] 1BH, 52H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Selects the international character set as listed in the table below: Parameter Code 23 24 40 5B 5C 5D 5E 60 7B 7C 7D 7E...
  • Page 45: Esc V N

    TH180 Programmer’s Guide ESC V n [Designation] Turn 90°clockwise rotation mode on/off [Format] 1BH, 56H, n [Valid limits] 0 1, 48 [Initial value] n = 0 [Function] (1) Selects/cancels 90-degree clockwise rotation of characters. (2) Parameter n is defined as listed below.
  • Page 46: Esc T N

    TH180 Programmer’s Guide ESC t n [Designation] Select character code table [Format] 1BH, 74H, n [Valid limits] 0 5, 16 19, n = 8,26,40,254,255, 249 [Initial value] n = 0 [Function] (1) Selects page n of the character code table.
  • Page 47: Esc { N

    TH180 Programmer’s Guide ESC { n [Designation] Turn upside-down printing mode on/off [Format] 1BH, 7BH, n [Valid limits] [Initial value] n = 0 [Function] (1) Specifies or cancels inverted printing. (2) Each bit of parameter n is defined as listed below.
  • Page 48: Gs ! N

    TH180 Programmer’s Guide GS ! n [Designation] Set character size [Format] 1DH, 21H, n [Valid limits] 0 Character height scaling factor 8 Character width scaling factor 8 [Initial value] n = 0 [Function] (1) Specifies the character size (character height scaling factor/character width scaling factor).
  • Page 49 TH180 Programmer’s Guide (7) If characters with different character-height scaling factors are present on the same line, the characters are enlarged and disposed so as to be set on the base line (the line positioned on the 21st dot). (8) Double character width and double character height can be specified using the Select print mode (ESC !).
  • Page 50: Gs B N

    TH180 Programmer’s Guide GS B n [Designation] Turn white/black reverse printing mode on/off [Format] 1DH, 42H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Turns reverse printing mode on/off. (2) The table below lists the bit definitions:...
  • Page 51: Gs B N

    TH180 Programmer’s Guide GS b n [Designation] Select/cancel smoothing [Format] 1DH, 62H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Turns smoothing mode on/off. Value Function Smoothing Cancel Specify Smoothing Mode Mode1 Mode2 To be defined To be defined...
  • Page 52: Commands Related To The Print Position

    TH180 Programmer’s Guide Commands related to the print position [Designation] Horizontal tab [Format] 09 H [Valid limits] --- [Initial value] --- [Function] (1) Moves the print position to the next horizontal tab position. (2) This command is ignored if there is no tab position ahead.
  • Page 53: Esc $ Nl Nh

    TH180 Programmer’s Guide ESC $ nL nH [Designation] Set absolute print position [Format] 1BH, 24H, nL, nH [Valid limits] [Initial value] --- [Function] (1) Specifies the next print start position using the absolute print position relative to the left margin position.
  • Page 54: Esc D N1~Nk Null

    TH180 Programmer’s Guide ESC D n1~nk NULL [Designation] Set horizontal tab positions [Format] 1BH, 44H, n1 ~ nk, 00H (k k bytes Or 1BH, 44H, 00H (k = 0) [Valid limits] 0 data [Initial value] Every eight characters where font A (12 × 24) is selected and the right-side spacing amount of the characters is 0 (character position 9, 17, 25, ...).
  • Page 55 TH180 Programmer’s Guide (13) "Horizontal tab positions" at the time of the 90 degrees turn of the standard mode [n x character Height] + [right-side character spacing (ESC SP)] x [cross direction magnification]. The height of the character. Font A - 24...
  • Page 56: Esc T N

    TH180 Programmer’s Guide ESC T n [Designation] Select print direction in page mode [Format] 1BH, 54H, n [Valid limits] 0 3, 48 [Initial value] n = 0 [Function] (1) Selects the print direction in page mode and the starting point.
  • Page 57: Esc W Xl Xh Yl Yh Dxl Dxh Dyl Dyh

    TH180 Programmer’s Guide ESC W xL xH yL yH dxL dxH dyL dyH [Designation] Set printing area in page mode [Format] 1BH, 57H, xL, xH, yL, yH, dxL, dxH, dyL, dyH [Valid limits] 0 xL, xH, yL, yH, dxL, dxH, dyL, dyH This does not apply for dxL = dxH = 0 or dyL = dyH = 0.
  • Page 58 TH180 Programmer’s Guide (8) The basic calculated pitch is set up using the Set horizontal and vertical motion unit (GS P). In addition, the specified printable area will not be changed even if the basic calculated pitch is changed using the Set horizontal and vertical motion unit (GS P) after the printable area has been set up.
  • Page 59: Esc \ Nl Nh

    TH180 Programmer’s Guide ESC \ nL nH [Designation] Set relative print position [Format] 1BH, 5CH, nL, nH [Valid limits] [Initial value] --- [Function] (1) Specifies the next print start position using the print position relative to the current position, which is the origin.
  • Page 60: Esc A N

    TH180 Programmer’s Guide ESC a n [Designation] Select justification [Format] 1BH, 61H, n [Valid limits] 0 2, 48 [Initial value] n = 0 [Function] (1) Justifies all print data on a line to the specified position. (2) Available types of position alignment are as listed below:...
  • Page 61: Gs $ Nl Nh

    TH180 Programmer’s Guide GS $ nL nH [Designation] Set absolute position for character direction in page mode [Format] 1DH, 24H, nL, nH [Valid limits] 0 [Initial value] --- [Function] (1) Specifies the position of characters vertically at the data expansion start position in page mode using the print position as the starting point, which is the absolute position.
  • Page 62: Gs L Nl Nh

    TH180 Programmer’s Guide GS L nL nH [Designation] Set left margin [Format] 1DH, 4CH, nL, nH [Valid limits] 0 [Initial value] nL = 0, nH =0 [Function] (1) Sets up the left margin specified using nL and nH. (2) The left margin is [(nL+nH×256)×basic calculated pitch] inches.
  • Page 63 TH180 Programmer’s Guide (10) If the specified print area width is less than the amount for one character of the character width currently specified, the processing given below is executed for that line. This applies when character data is expanded.
  • Page 64: Gs W Nl Nh

    TH180 Programmer’s Guide GS W nL nH [Designation] Set printing area width [Format] 1DH, 57H, nL, nH [Valid limits] [Initial value] Paper width is 80mm 48 column : nl = 40H , nH = 02H Paper width is 80mm 42 column...
  • Page 65 TH180 Programmer’s Guide (10) If the print area width is smaller than the width (right space included) of the character to be expanded, the processing given below is executed for that line. This applies when the first character at the beginning of the line is expanded.
  • Page 66: Gs \ Nl Nh

    TH180 Programmer’s Guide GS \ nL nH [Designation] Set relative position for character direction in page mode [Format] 1DH, 5CH, nL, nH [Valid limits] 0 [Initial value] --- [Function] (1) Specifies the position of characters vertically at the data expansion start position in page mode using the print position relative to the current point, which is the origin.
  • Page 67: Commands Related To Bit Images

    TH180 Programmer’s Guide Commands related to bit images ESC * m nL nH d1 ~ dk [Designation] Select bit image mode [Format] 1BH, 2AH, m, nL, nH, d1 ... dk [Valid limits] m = 0, 1, 32, 33 [Initial value] Cancel [Function] (1) Specifies the mode m bit image for the number of dots specified in nL and nH.
  • Page 68 TH180 Programmer’s Guide (8) This command does not affect print modes (such as emphasized printing, underlining, and character size specification) other than inverted printing. (9) The relationships between the bit image and printed data are as follows: a. 8-bit image (if m = 0 or 1)
  • Page 69 TH180 Programmer’s Guide b. 24-dot image (if m = 32 or 33) (First byte) (Second byte) (Third byte) Head pin (10) The maximum number of printable character positions is as follows; a. Paper width is 80mm and 48 column : 576 b.
  • Page 70: Fs P N M

    TH180 Programmer’s Guide FS p n m [Designation] Print in NV bit mode image [Format] 1CH, 70H, n, m [Valid limits] n 255 3, 48 [Initial value] Cancel [Function] (1) Prints NV bit image n in mode m. Mode Vertical dot...
  • Page 71 TH180 Programmer’s Guide (11) Regardless of the set initial value of line feed increments (ESC 2), and of set line feed increments (ESC 3), a paper feed by dots (corresponding to the height of NV bit image n) is executed in normal mode and double character width mode.
  • Page 72: Fs Q N [Xl Xh Yl Yh D1 ~ Dk] 1

    TH180 Programmer’s Guide FS q n [xL xH yL yH d1 ~ dk] 1 ~ [xL xH yL yH d1 ~ dk] n [Valid limits] where, 1 (xL+xH×256) 1023 where, 1 (yL+yH×256) k = (xL+xH×256) × (yL+yH×256) × 8 [Initial value] --- [Function] (1) Defines a specified NV bit image.
  • Page 73 TH180 Programmer’s Guide (14) n NV bit images are defined in ascending order from NV bit image number 01H. The first data group [xL xH yL yH d1 ... dk], therefore, becomes the NV bit image with number 01H, while the last data group [xL xH yL yH d1... dk] becomes the NV bit image with number n.
  • Page 74: Gs * X Y [Data] X × Y × 8

    TH180 Programmer’s Guide GS * x y [data] x × y × 8 [Designation] Define user-defined bit image [Format] 1DH, 2AH, x, y, data 1 ... data x×y×8 [Valid limits] x × y 1536 [Initial value] Clear [Function] (1) Defines a user-definable bit image according to the number of dots specified in x and y.
  • Page 75: Gs / M

    TH180 Programmer’s Guide GS / m [Designation] Print user-defined bit image [Format] 1DH, 2FH, m [Valid limits] 0 3, 48 [Initial value] --- [Function] (1) Prints a user-defined bit image. (2) Parameter m specifies a print mode. Vertical dot Horizontal dot...
  • Page 76: Gs V 0 M Xl Xh Yl Yh D1 ~ Dk

    TH180 Programmer’s Guide GS v 0 m xL xH yL yH d1 ~ dk [Designation] Print a raster bit image [Format] 1DH, 76H, 30H, m, xL, xH, yL, yH, d1 to dk [Valid limits] 3, 48 k = (xL + xH×256) × (yL + yH×256) where k [Initial value] --- [Function] (1) Prints a raster bit image in mode m.
  • Page 77 TH180 Programmer’s Guide (10) The following commands enable specification of any print start position for a raster bit image. a. Horizontal tab (HT) b. Specify an absolute position (ESC $) c. Specify a relative position (ESC \) d. Set left margin command (GS L) (11) Position arrangement (ESC a) is also applicable to a raster bit image.
  • Page 78: Commands Related To Macro Functions

    TH180 Programmer’s Guide Commands related to macro functions GS : [Designation] Start/end macro definition [Format] 1DH, 3AH [Valid limits] --- [Initial value] Cleared [Function] (1) Specifies to start or stop a macro definition. (2) This command specifies to start a macro definition when entered during ordinary operation.
  • Page 79: Gs ^ R T M

    TH180 Programmer’s Guide GS ^ r t m [Designation] Execute macro. [Format] 1DH, 5EH, r, t, m [Valid limits] [Initial value] Cleared [Function] (1) Executes a macro definition. (2) The parameter r specifies the number of times the macro is executed.
  • Page 80: Commands Related To Bar Code

    TH180 Programmer’s Guide Commands related to bar code GS H n [Designation] Select printing position for HRI character [Format] 1DH, 48H, n [Valid limits] 0 3, 48 [Initial value] n = 0 [Function] (1) Selects the print position of HRI characters when printing bar codes.
  • Page 81: Gs F N

    TH180 Programmer’s Guide GS f n [Designation] Select character font for HRI characters [Format] 1DH, 66H, n [Valid limits] n = 0, 1, 2, 48, 49, 50 [Initial value] n = 0 [Function] (1) Selects a typeface for HRI characters.
  • Page 82: Gs K M D1 ~ Dk Null

    TH180 Programmer’s Guide GS k m d1 ~ dk NULL [Designation] Print bar code (No. 1) [Format] 1DH, 6BH, m, d1 ~ dk 00H [Valid limits] [Initial value] --- [Function] (1) Selects a bar code system and prints the bar code.
  • Page 83 TH180 Programmer’s Guide If data is present in the print buffer, the data subsequent to parameter m is processed as normal data. e. When bar code printing is finished, the beginning of the new line is set as the next print position.
  • Page 84: Gs K M N D1 ~ Dn

    TH180 Programmer’s Guide GS k m n d1 ~ dn [Designation] Print bar code (No. 2) [Format] 1DH, 6BH, m, n, d1 ... dn [Valid limits] [Initial value] --- [Function] (1) Selects a bar code system and prints the bar code.
  • Page 85 TH180 Programmer’s Guide (5) For page mode a. The bar code is only expanded. It is not printed. When bar code expansion is finished, the next dot of the final data of the bar code is set as the next data expansion start position.
  • Page 86: Gs W N

    TH180 Programmer’s Guide GS w n [Designation] Select bar code width [Format] 1DH, 77H, n [Valid limits] 1 [Initial value] n = 3 [Function] (1) Sets the bar code width size. Multilevel bar Double value level bar code code module width...
  • Page 87: Commands Related To New Line Quantities

    TH180 Programmer’s Guide Commands related to new line quantities ESC 2 [Designation] Select 1/6-inch line spacing [Format] 1BH, 32H [Valid limits] --- [Initial value] --- [Function] (1) Sets the line spacing pitch to 3.75 mm (60/406 inches). (2) The line feed amount can be set up separately for standard mode and page...
  • Page 88: Esc 3 N

    TH180 Programmer’s Guide ESC 3 n [Designation] Set line spacing [Format] 1BH, 33H, n [Valid limits] 0 [Initial value] n = 60 [Function] (1) Sets the line feed amount per line to [n×basic calculated pitch]inches. (2) The line feed amount can be set up separately for standard mode and page mode.
  • Page 89: Commands Related To Mechanical Control

    TH180 Programmer’s Guide Commands related to mechanical control GS V m [Designation] Cut paper (No. 1) [Format] 1DH, 56H, m [Valid limits] m = 0,1, 48,49 [Initial value] --- [Function] (1) Performs a cut operation of a specified type. Function...
  • Page 90: Gs V M N

    TH180 Programmer’s Guide GS V m n [Designation] Cut paper (No. 2) [Format] 1DH, 56H, m, n [Valid limits] m = 65,66 [Initial value] --- [Function] (1) Performs a cut operation of a specified type. Function Not specified Advance the paper (cut position + [n×basic calculated pitch]) and partially cut the paper (one point center uncut).
  • Page 91: Esc I

    TH180 Programmer’s Guide ESC i [Designation] Full cut (performs partial cut) [Format] 1BH, 69H [Valid limits] --- [Initial value] --- [Function] (1) Full cut the paper. (2) This command is valid only when entered at the beginning of a line.
  • Page 92: Command Related To Paper Detectors

    TH180 Programmer’s Guide Command related to paper detectors ESC c 3 n [Designation] Select paper sensor(s) to output paper out signals [Format] 1BH, 63H, 33H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Selects the paper detectors to output the paper out signal when paper out status occurs.
  • Page 93: Esc C 4 N

    TH180 Programmer’s Guide ESC c 4 n [Designation] Select paper sensor(s) to stop printing [Format] 1BH, 63H, 34H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Selects the paper detectors to stop printing when paper out status occurs.
  • Page 94: Commands Related To The Status

    TH180 Programmer’s Guide Commands related to the status DLE EOT n [Designation] Real-time status transmission [Format] 10H, 04H, n [Valid limits] 1 [Initial value] --- [Function] (1) Transmits real-time status information specified using parameter n. Function Transmits printer status Transmits offline cause factor...
  • Page 95 TH180 Programmer’s Guide (7) Details of status information transmitted are as follows: a. When n = 1 (printer status) Value Function Not used Fixed at 0 Not used Fixed at 1 State of drawer kick connector pin 3 High Online/offline condition...
  • Page 96 TH180 Programmer’s Guide c. When n = 3 (error cause status) Value Function Not used Fixed at 0 Not used Fixed at 1 Mechanical error (Cover open, Cutter jam) Cutter jam error Not used Fixed at 1 Unrecoverable error Auto-recoverable error...
  • Page 97 TH180 Programmer’s Guide (8) This command is ignored if parameter n is outside the definition area. (9) The auto cutter incurs no error. (10) Errors are indicated with the status information listed below: Status Parameter Status bit Remark b6 b5 b4...
  • Page 98 TH180 Programmer’s Guide Status Parameter Status bit Remark b6 b5 b4 b3 b2 b1 b0 Print head n = 1 × × × 0 State of drawer kick connector temperature pin 3 may be superimposed. high n = 2 ×...
  • Page 99: Gs A N

    TH180 Programmer’s Guide GS a n [Designation] Enable/disable automatic status back [Format] 1DH, 61H, n [Valid limits] 0 255 ( n = CF : Fixed ) [Initial value] ALL value is enabled. [Function] (1) Selects what status information to be subjected to automatic status back (ASB).
  • Page 100 TH180 Programmer’s Guide (6) Even if the specification of the printer is canceled using the Select peripheral device command (ESC =), a 4-byte status will be sent if the status is changed. (7) The following tables list the status information transferred.
  • Page 101 TH180 Programmer’s Guide c. Third byte (paper detector information) Value Function Roll paper near end detector Paper present No paper Roll paper end detector Paper present No paper Not used Fixed at 0 Not used Fixed at 0 Not used...
  • Page 102 TH180 Programmer’s Guide (8) Errors are indicated with the status information listed below: Status Status bit Parameter Remark b6 b5 b4 b3 b2 b1 b0 First byte × × × Roll Paper feed by paper feed paper switch and state of drawer...
  • Page 103 TH180 Programmer’s Guide Status bit Status Parameter Remark b7 b6 First byte × × × 0 Paper feed by paper feed switch, cover state, and state of the drawer kick connector pin 3 may be superimposed. Print head Second Byte 0 ×...
  • Page 104: Gs R N

    TH180 Programmer’s Guide GS r n [Designation] Transmit status [Format] 1DH, 72H, n [Valid limits] 1 2, 49 [Initial value] --- [Function] (1) Transmits status information specified using parameter n. Function 1, 49 Transmits paper detector status 2, 50 Transmits drawer kick connector status (2) Details of the transmitted status information are as follows: a.
  • Page 105 TH180 Programmer’s Guide b. When n = 2, 50 (drawer kick connector) Value Function State of drawer1 kick connector pin 3 High To be defined State of drawer2 kick connector pin 1 Fixed at 1(High) To be defined Not used...
  • Page 106: Esc U N

    TH180 Programmer’s Guide ESC u n [Designation] Transmit peripheral device status [Format 1BH, 75H, n [Valid limits] n = 0 [Initial value] --- [Function] (1) Transmits peripheral device status data (one byte length) corresponding to the connector pin specified by n.
  • Page 107: Esc V

    TH180 Programmer’s Guide ESC v [Designation] Transmit paper detector status [Format] 1BH, 76H [Valid limits] --- [Initial value] --- [Function] (1) Transmits paper detector status data (one byte length) as shown below. Value Function Roll paper near-end detector With paper...
  • Page 108: Command Related To The Panel Switches

    TH180 Programmer’s Guide Command related to the panel switches ESC c 5 n [Designation] Enable/disable panel buttons [Format] 1BH, 63H, 35H, n [Valid limits] 0 [Initial value] n = 0 [Function] (1) Enables/disables the paper feed switch. (2) Each bit of parameter n is defined as listed below:...
  • Page 109: Commands Related To Auxiliary Functions

    TH180 Programmer’s Guide Commands related to auxiliary functions DLE ENQ n [Designation] Real-time request to printer [Format] 10H, 05H, n [Valid limits] 0 [Initial value] - [Function] (1) Responds in real-time to requests from the host specified using parameter n.
  • Page 110: Esc

    TH180 Programmer’s Guide ESC @ [Designation] Initialize printer [Format] 1BH, 40H [Valid limits] - [Function] (1) Clears the print buffer and initializes the settings. (2) The receive buffer data is retained. (3) This command does not clear a macro definition.
  • Page 111: Esc L

    TH180 Programmer’s Guide ESC L [Designation] Select page mode [Format] 1BH, 4CH [Valid limits] --- [Function] (1) Switches from standard mode to page mode. (2) This command is valid only when entered at the beginning of the line. (3) This command is ignored if entered in page mode.
  • Page 112: Esc S

    TH180 Programmer’s Guide ESC S [Designation] Select standard mode [Format] 1BH, 53H [Valid limits] --- [Function] (1) Switches from page mode to standard mode. (2) This command is valid only when entered in page mode. (3) The data expanded in page mode is erased.
  • Page 113: Esc P M T1 T2

    TH180 Programmer’s Guide ESC p m t1 t2 [Designation] Generate pulse [Format] 1BH, 70H, m, t1, t2 [Valid limits] 0 5, 48 [Initial value] --- [Function] (1) Outputs the signals specified using parameters t1 and t2 for the connector pin specified using parameter m.
  • Page 114 TH180 Programmer’s Guide (6) At m=3(51), parameter ‘t3’ becomes effective. buzzer It follows the setting of 'Buzzer Interval'. 40msON / 120msOFF (Pattern 1) 140msON / 140msOFF (Pattern 2) 200msON / 200msOFF (Pattern 3) 10msON / 50msOFF (Pattern 4) 30msON / 50msOFF (Pattern 5)
  • Page 115: Gs I N

    TH180 Programmer’s Guide GS I n [Designation] Transmit printer ID [Format] 1DH, 49H, n [Valid limits] 1 3, 49 51, 65 69, n=112 [Initial value] --- [Function] (1) Transmits the following information after command execution, according to the setting of parameter n.
  • Page 116 TH180 Programmer’s Guide a. First byte = 40H b. Second byte = 40H (5) After the host is confirmed to be ready to receive (the DSR signal is in a space state) a printer ID, a printer ID is transmitted to the host if the DTR/DSR protocol is used.
  • Page 117: Gs P X Y

    TH180 Programmer’s Guide GS P x y [Designation] Set horizontal and vertical motion units [Format] 1DH, 50H, x, y [Valid limits] 0 [Initial value] x = 203 y = 406 [Function] (1) Sets the horizontal basic calculated pitch to approximately 25.4/xmm [(1/x) inches] and the vertical basic calculated pitch to approximately 25.4/ymm...
  • Page 118 TH180 Programmer’s Guide (6) In page mode, the parameters given below are used if the starting point has been specified as upper left or lower right using the Select print direction in page mode command (ESC T): a. Commands that use x...
  • Page 119: Dle Dc4 N M T

    TH180 Programmer’s Guide DLE DC4 n m t [Designation] Real-time output of designated pulse [Format] 10H, 14H, 01h, m, t [Valid limits] 0 m 2 1 t 8 [Function] (1) m corresponds to the designated connector pin and t outputs the designated signal in real time.
  • Page 120: Dle Dc4 0X02 A B

    TH180 Programmer’s Guide DLE DC4 0x02 a b [Designation] Execute power-off processing [Format] 10H, 14H, 02H, a, [Valid limits] a=1 [Function] (1) This command saves the maintenance counter value. (2) This command places the interface in BUSY state. (DTR=MARK, XOFF transmission, BUSY output) (3) This command transmits power-off notification.
  • Page 121: Dle Dc4 08H D1

    TH180 Programmer’s Guide DLE DC4 08H d1…..d7 [Designation] Buffer clear [Format] 10H, 14H, 08H, d1…….d7 [Valid limits] d1=1 d2=3 d3=20 d4=1 d5=6 d6=2 d7=8 [Function] (1) This command clears the receive buffer and all print buffer data. (2) This command transmits the data group of 3 bytes that is shown below:...
  • Page 122: Commands Related To Extension Functions

    TH180 Programmer’s Guide Commands related to extension functions GS ( A pL pH n m [Designation] Execute test print [Format] 1DH, 28H, 41H, pL, pH, n, m [Valid limits] (pL + pH × 256) = 2 (pL = 2, pH = 0)
  • Page 123: B1 ]

    TH180 Programmer’s Guide GS ( D pL pH m [ a1 b1 ]…[ ak bk ] [Designation] Valid / invalid real-time command [Format] 1DH, 28H, 44H, pL, pH, m, [ a1 b1 …[ ak bk ] [Valid limits] 3 (pL+pH×256) 65535...
  • Page 124 TH180 Programmer’s Guide GS ( E pL pH fn [ parameter ] [Designation] User setting command group [Function] (1) The command in the user setting command group is used to control the values that are stored in the non-volatile memory. It also executes the functions that are designated by the function code (fn).
  • Page 125: Function 1> Gs

    TH180 Programmer’s Guide <Function 1> GS ( E pL pH fn d1 d2 [Format] 1DH, 28H, 45H, pL, pH, fn, d1, d2 [Valid limits] (pL+pH×256)=3 (pL=3, pL=0) fn=1 d1=73("1") d2=78("N") [Function] (1) This command moves to the user setting mode and transmits the mode moving notification shown as...
  • Page 126: Function 3> Gs

    TH180 Programmer’s Guide <Function 3> GS ( E pL pH fn [ a1 b18 .. b11 ]..[ ak bk8…bk1] [Format] 1DH, 28H, 45H, pL, pH, fn, [ a1 b18 .. b11 ]..[ ak bk8…bk1] [Valid limits] 10 (pL+pH×256) 65535 fn=3...
  • Page 127 TH180 Programmer’s Guide Value setting(b) Function Batch (Other IF) : Disable Batch (Other IF) : Enable 48,49,50 Reservation (7) a=126 is valid. Sets the memory switch 126 (Msw126), as below: Value setting(b) Function Error : Recovery by CMND Error : Auto Recovery...
  • Page 128: Function 4> Gs

    TH180 Programmer’s Guide <Function 4> GS ( E pL pH fn a [Format] 1DH, 28H, 45H, pL, pH, fn, [Valid limits] (pL+pH×256)=2 (pL=2, pH=0) fn=4 a=1,2,8,125,126,127 [Function] (1) It transmits the value setting of the memory switch designated by a.
  • Page 129: Function 5> Gs

    TH180 Programmer’s Guide <Function 5> GS ( E pL pH fn [ a1 n1L n1H ]..[ ak nkL nkH ] [Format] 1DH, 28H, 45H, pL, pH, fn, [ a n1L n1H ]…[ ak nkL nkH ] [Valid limits] 4 (pL+pH×256) 65535...
  • Page 130 TH180 Programmer’s Guide (nL+nH×256) Max Speed 100mm/s 110mm/s 120mm/s 130mm/s 140mm/s 150mm/s 160mm/s 170mm/s 180mm/s For a=124, it changes to the ‘Error Alert’ specified by (nL+nH×256). (nL+nH×256) Error Alert None One Time Continuous For a=125, it changes to the ‘Buzzer Interval’ specified by (nL+nH×256).
  • Page 131: Function 6> Gs

    TH180 Programmer’s Guide <Function 6> GS ( E pL pH fn a [Format] 1DH, 28H, 45H, pL, pH, fn, a [Valid limits] (pL+pH×256)=2 (pH=2, pH=0) fn=6 a=1, 3, 5, 6, 124, 125, 126 [Function] (1) a transmits the value setting of the designated customized value.
  • Page 132 TH180 Programmer’s Guide Setting condition Transmission data Stored Print First byte Second byte Third byte Fourth byte Fifth byte value density 65530 65531 Undefined 65532 65533 Undefined 65534 65535 Undefined 100% Undefined 110% Undefined 120% Undefined 130% Designation of the max speed (a=6)
  • Page 133 TH180 Programmer’s Guide Designation of the buzzer repetition (a=126) Setting condition Transmission data Stored Buzzer First byte Second byte Third byte Fourth byte Fifth byte Value repetition Zero Three Four Five...
  • Page 134: Function 7> Gs

    TH180 Programmer’s Guide <Function 7> GS ( E pL pH fn a d1 d2 [Format] 1DH, 28H, 45H, pL, pH, fn, a, d1, d2, [Valid limits] (pL+pH×256)=4 (pL=4, pH=0) fn=7 a=12, 17, 18 30 d1 31 30 d2 31 [Function] (1) a executes the data copy of the designated font user-defined code page.
  • Page 135: Function 8> Gs ( E Pl Ph Fn Y C1 C2 [ X D1

    TH180 Programmer’s Guide <Function 8> GS ( E pL pH fn y c1 c2 [ x d1 … d(y × x) ]k [Format] 1DH, 28H, 45H, pL, pH fn, y, c1, c2 , [ x d1… d(y × x) ]k [Valid limits] 5 (pL+pH×256) 65535...
  • Page 136: Function 9> Gs ( E Pl Ph Fn X C1 C2 [ Y D1

    TH180 Programmer’s Guide <Function 9> GS ( E pL pH fn x c1 c2 [ y d1… d(x × y) ]k [Format] 1DH, 28H, 45H, pL, pH, fn, x, c1, c2, [ y d 1… d(x × y) ]k [Valid limits] 5 (pL+pH×256) 65535...
  • Page 137: Function 10> Gs

    TH180 Programmer’s Guide <Function 10> GS ( E pL pH fn c1 c2 [Format] 1DH, 28H, 45H, pL, pH, fn, c 1, c 2 [Valid limits] (pL+pH×256)=3 (pL=3, pL=0) fn=10 128 c1 c2 255 [Function] (1) It clears the data by the character unit, targeting the character code page in the operation (RAM).
  • Page 138: Function 11> Gs

    TH180 Programmer’s Guide <Function 11> GS ( E pL pH fn a d1…d k [Format] 1DH, 28H, 45H, pL, pH, fn, a , d1…dk [Valid limits] 3 (pL+pH×256) 65535 (0 pL 255, 0 pH 255) fn=11 1 a 4 48 d 57...
  • Page 139: Function 12> Gs

    TH180 Programmer’s Guide <Function 12> GS ( E pL pH fn a [Format] 1DH, 28H, 45H, pL, pH, fn, a [Valid limits] (pL+pH×256)=2 (pL=2, pH=0) fn=12 1 a 4 [Function] (1) It transmits the communication conditions of the serial interface that designated by a.
  • Page 140 TH180 Programmer’s Guide GS ( H pL pH fn m [Designation] Request to response sending. [Format ] 1DH, 28H, 48H, pL, pH, fn, m [Function] (1) It is selected processing about the response. pL, pH is m and it designates the subsequent byte value as (pL+pHx256).
  • Page 141: Function 48> Gs

    TH180 Programmer’s Guide <Function 48> GS ( H pL pH fn m d1 d2 d3 d4 [Designation] Selection of the process ID response. [Format] 1DH, 28H, 48H, pL, pH, fn, m, d1, d2, d3, d4 [Valid limits] (pL+pH×256)=6 (pL=6, pH=0)
  • Page 142: Function 49> Gs

    TH180 Programmer’s Guide <Function 49> GS ( H pL pH fn m d [Designation] Selection of the offline response. [Format] 1DH, 28H, 48H, pL, pH, fn, m, d1, d2, d3, d4 [Valid limits] (pL+pH×256)=3 (pL=3, pH=0) fn=49 m=49 0 d 2 , 48 d 50...
  • Page 143: Gs 8 L P1 P2 P3 P4 M Fn [ Parameter ]

    TH180 Programmer’s Guide GS ( L pL pH m fn [ parameter ] GS 8 L p1 p2 p3 p4 m fn [ parameter ] [Designation] Graphics data designation [Format] 1DH, 28H, 4CH, pL, pH, m, fn, [ parameter ] 1DH, 38H, 4CH, p1, p2, p3, p4, m, fn, [ parameter ] *The format of GS ( L is used to explain the different functions.
  • Page 144: Function 48> Gs

    TH180 Programmer’s Guide <Function 48> GS ( L pL pH m f n [Format] 1DH, 28H, 4CH, pL, pH, m, fn, [Valid limits] (pL+pH×256)=2 (pL=2, pH=0) m=48 fn=0, 48 [Function] (1) It transmits the total capacity of the NV graphics area in byte counts.
  • Page 145: Function 64> Gs

    TH180 Programmer’s Guide <Function 64> GS ( L pL pH m fn d1 d2 [Format] 1DH, 28H, 4CH, pL, pH, m, fn, d1, d2 [Valid limits] (pL+pH×256)=4 (pL=4, pH=0) m=48 fn=64 d1=75 d2=67 [Function] (1) It transmits the designated NV graphics key code list...
  • Page 146: Function 65> Gs

    TH180 Programmer’s Guide <Function 65> GS ( L pL pH m fn d1 d2 d3 [Format] 1DH, 28H, 4CH, pL, pH, m, fn, d1, d2, d3 [Valid limits] (pL+pH×256)=5 (pL=5, pH=0) m=48 fn=65 d1=67 d2=76 d3=83 [Function] (1) It clears the NV graphics total definition data collectively.
  • Page 147: Function 67> Gs

    TH180 Programmer’s Guide <Function 67> GS ( L pL pH m fn a kc1 kc2 b xL xH yL yH [ c d1…dk ]1… [ c d1…dk ]b [Format] 1DH, 28H, 4CH, pL, pH, m, fn, a, k c1, k c2, b, xL, xH , yL, yH, [ c d1…dk ]1…[ c d1…dk ]b...
  • Page 148 TH180 Programmer’s Guide <Function 69> GS ( L pL pH m fn kc1 kc2 x y [Format] 1DH, 28H, 4CH, pL, pH, m, fn, kc1, kc2, x, y [Valid limits] (pL+pH×256)=6 (pL=6, pH=0) m=48 fn=69 32 kc1 126 32 kc2 126...
  • Page 149: Function 112> Gs

    TH180 Programmer’s Guide <Function 112> GS ( L pL pH m fn a bx by c xL xH yL yH d1…dk [Format] 1DH, 28H, 4CH, pL, pH, m, fn, a, bx, by, c, xL, xH, yL, yH, d1…dk [Valid limits] (1) GS ( L parameter 11 (pL+pH×256) 65535 (0 pL 255, 0 pH 255)
  • Page 150 TH180 Programmer’s Guide GS ( M pL pH fn n [Designation] Customize the printer [Format] 1DH, 28H, 4DH, pL, pH, fn, n [Function] (1) It executes the processing of the value setting in the operation area by different commands or the save/ return of the defined data.
  • Page 151: Function 1> Gs

    TH180 Programmer’s Guide <Function 1> GS ( M pL pH f n m [Format] 1DH, 28H, 4DH, pL, pH, fn, m [Valid limits] (pL+pH×256)=2 (pL=2, pH=0) fn=1,49 m=1,49 [Function] (1) It copies the value setting stored in the operation area to the storage area (2) Using this command often may cause destruction of the non-volatile memory.
  • Page 152: Function 48> Gs

    TH180 Programmer’s Guide <Function 48> GS ( N pL pH fn m [Format] 1DH, 28H, 4EH, pL, pH, fn, [Valid limits] (pL+pH×256)=2 (pL=2, pH=0) fn=48 m=49 (single-color paper setting) m=49, 50 (double-color paper setting) [Initial value] m=49 [Function] (1) This subsequent command character prints the color designated by m.
  • Page 153: The Two-Dimensional Barcode

    TH180 Programmer’s Guide The two-dimensional barcode GS ( k pL pH cn fn [parameter] [Designation] Setting and the printing of the symbol [Valid limits] ---- [Function] (1) It moves the printing position to the beginning of the line. (2) the kind of the symbol a list shown below.
  • Page 154: Function 165> Gs

    TH180 Programmer’s Guide <Function 165> GS ( k pL pH cn fn n1 n2 [Designation] Select a model (QR) [Format] 1DH, 28H, 6BH, pL, pH, cn, fn, n1,n2 [Valid limits] pL=4, pH=0 cn=49 fn=65 n1 =49, 50, 51 n2 =0...
  • Page 155: Function 169> Gs

    TH180 Programmer’s Guide <Function 169> GS ( k pL pH cn fn n [Designation] Setting of Error level(QR code) [Format] 1DH, 28H, 6BH, pL, pH, cn, fn, n [Valid limits] pL=3, pH=0 cn=49 fn=69 48 n 51 [Initial value] n = 48 [Function] (1) set the error correction level of the symbol.
  • Page 156: Function 181> Gs

    TH180 Programmer’s Guide <Function 181> GS ( k pL pH cn fn m [Designation] Print the symbol (QR code) [Format] 1DH, 28H, 6BH, pL, pH, cn, fn, m [Valid limits] pL=3, pH=0 cn=49 fn=81 m=48, [Initial value] -- [Function] (1) Print the symbol.
  • Page 157: Initial Operations

    TH180 Programmer’s Guide Initial Operations Power is switched on or a reset Initialize printer signal is received (ESC @) Cutter operation Initialization Reception buffer Cleared Page mode expansion buffer Cleared Cleared Printing on-hold buffer Cleared Cleared Print buffer Cleared Cleared Character’s right-hand side space...
  • Page 158 TH180 Programmer’s Guide signal is received Barcode height 20.3 mm 20.3 mm Barcode printing Canceled Barcode horizontal size 3 times 3 times Line spacing 3.75 mm 3.75 mm Paper cut Canceled Paper end detectors to stop Roll paper near end detector...
  • Page 159: Transmission Status Identification

    TH180 Programmer’s Guide Transmission Status Identification (1) As the status transmitted by this command has fixed bit numbers, identifying the command status by the bit number is possible. (2) First confirm the first byte and process the three succeeding bytes exclusive of XOFF as ASB data when using ASB.
  • Page 160: Effective Invalidity Of The Ornamentation

    TH180 Programmer’s Guide Effective invalidity of the ornamentation O Enable * Disable Blank Print data canceled. (1) Standard Mode ornamentation (ESC -) (ESC E) (ESC G) (ESC V) (ESC {) (GS !) (GS B) (GS b) (ESC a) (FS -)
  • Page 161: Development Position With The Page Mode

    TH180 Programmer’s Guide Development position with the page mode barcode GS k m x * 8 downloa bit image Exten- GS * x y sion size (nH*256) Bit image ESC * m nL nH baseline 2DIM barcode GS ( k...
  • Page 162 Wincor Nixdorf International GmbH, 2012 D-33094 Paderborn...

Table of Contents