HPRT TP809 Programming Manual

HPRT TP809 Programming Manual

Hide thumbs Also See for TP809:
Table of Contents

Advertisement

Quick Links

TP809
Programming Manual
Rev.1.2

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for HPRT TP809

  • Page 1 TP809 Programming Manual Rev.1.2...
  • Page 2 REVISION RECORDS DATE DESCRIPTION Drawn Checked Approved 2017/11/14 PUBLICATION Yan Xiaomei Lin Yang Lin Yang Modify Function 065/066/067/068/069/080/081/ 2018/11/28 Baochun Lin Lin Yang Lin Yang 082/167/169/180/182 Add function: ESC &, ESC 3, ESC S, FS !, FS &, 2018.12.03 Baochun Lin Lin Yang Lin Yang FS –, FS ., FS 2, FS S , FS W, ESC i...
  • Page 3 About This Manual Please read this technical manual before programming. Main description for command as below: 1) Function This is the first part of command description. Here we propose the command of ASCII code and its function. 2) Format This part describes the command with ASCII code format, HEX., format, and Decimal format. 3)...
  • Page 4: Table Of Contents

    TABLE OF CONTENTS About This Manual .......................... 1 1 Bit Image Commands ........................1 Select bit-image mode.............................. 1 Define downloaded bit image ..........................1 Print downloaded bit image ............................. 2 Set graphics data ..............................2 GS ( L pL pH m fn [parameters]..........................3 Transmit the NV graphics memory capacity ......................
  • Page 5 ESC % n ................................... 18 ESC ? n ..................................19 ESC SP n .................................. 19 CAN ..................................19 ESC – n ..................................19 ESC E n ..................................20 ESC R n ..................................20 ESC M n ................................... 21 ESC V n ..................................21 ESC { n ..................................
  • Page 6 ESC 3 ..................................47 10. Miscellaneous Commands ......................48 ESC S ..................................48 11.KANJI Commands ........................49 FS ! ..................................49 FS & ..................................50 FS - ..................................51 FS ................................... 52 FS 2 ..................................53 FS W ..................................54 12.
  • Page 7: About This Manual

    TP809 Programming Manual 1 Bit Image Commands Select bit-image mode [Format] ASCII ESC * m nL nH d1...dk 2A m nL nH d1...dk Decimal m nL nH d1...dk [Range] m = 0, 1, 32, 33 1 ≤ (nL + nH × 256) ≤ 2047 (0 ≤...
  • Page 8: Print Downloaded Bit Image

    TP809 Programming Manual Print downloaded bit image [Format] ASCII 2F m Decimal 47 m [Range] 0 ≤ m ≤ 3, 48 ≤ m ≤ 51 Prints downloaded bit image defined by GS ∗ and using the mode specified by m.
  • Page 9 TP809 Programming Manual GS ( L pL pH m fn [parameters] [Format] ASCII pL pH m fn [parameters] 4C pL pH m fn [parameters] Decimal 76 pL pH m fn [parameters] [Note] • Frequent write command executions by an NV memory write command may damage the NV memory.
  • Page 10: Transmit The Nv Graphics Memory Capacity

    TP809 Programming Manual Transmit the NV graphics memory capacity [Format] ASCII pL pH m fn 4C pL pH m fn Decimal 76 pL pH m fn [Range] (pL + pH × 256) = 2 (pL = 2, pH = 0)
  • Page 11: Function 64> Gs ( L Pl Ph M Fn D1 D2 (Fn = 64)

    TP809 Programming Manual <Function 64> GS ( L pL pH m fn d1 d2 (fn = 64) [Function] Transmit the key code list for defined NV graphics [Format] ASCII pL pH m fn d1 d2 4C pL pH m fn d1 d2...
  • Page 12: Function 67> Gs ( L Pl Ph M Fn A Kc1 Kc2 B Xl Xh Yl Yh [C D1

    TP809 Programming Manual <Function 67> GS ( L pL pH m fn a kc1 kc2 b xL xH yL yH [c d1…dk]1…[c d1..dk]b (fn = 67) [Function] Define the NV graphics data (raster format) [Format] ASCII GS ( L pL pH m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b 1D 28 4C pL pH m fn a kc1 kc2 b xL xH yL yH [c d1...dk]1...[c d1...dk]b...
  • Page 13: Function 69> Gs ( L Pl Ph M Fn Kc1 Kc2 X Y (Fn = 69)

    TP809 Programming Manual <Function 69> GS ( L pL pH m fn kc1 kc2 x y (fn = 69) [Function] Print the specified NV graphics data [Format] ASCII pL pH m fn kc1 kc2 x y 4C pL pH m fn kc1 kc2 x y...
  • Page 14: Function 112> Gs ( L Pl Ph M Fn A Bx By C Xl Xh Yl Yh D1

    TP809 Programming Manual <Function 112> GS ( L pL pH m fn a bx by c xL xH yL yH d1...dk (fn = 112) [Function] Store the graphics data in the print buffer (raster format) [Format] ASCII GS ( pL pH m fn a bx by c xL xH yL yH d1...dk 1D 28 pL pH m fn a bx by c xL xH yL yH d1...dk...
  • Page 15: Print Position Commands

    TP809 Programming Manual 2 Print Position Commands [Function] Horizontal Tabs [Format] ASCII Decimal [Description] Moves the print position to the next horizontal tab position. ESC $ nL nH [Function] Set absolute print position [Format] ASCII nL nH nL nH Decimal...
  • Page 16: Gs $ Nl Nh

    TP809 Programming Manual GS $ nL nH [Function] Set absolute vertical print position in page mode [Format] ASCII nL nH nL nH Decimal nL nH [Range] 0≤(nL + nH × 256)≤65535 (0≤nL≤255, 0≤nH≤255) [Description] In page mode, moves the vertical print position to [(nL + nH × 256) × (vertical or horizontal motion unit)] from the starting position set with ESC T.
  • Page 17: Esc W Xl Xh Yl Yh Dxl Dxh Dyl Dyh

    TP809 Programming Manual ESC W xL xH yL yH dxL dxH dyL dyH [Function] Set print area in page mode [Format] ASCII ESC W xL xH yL yH dxL dxH dyL dyH 57 xL xH yL yH dxL dxH dyL dyH...
  • Page 18: Esc A N

    TP809 Programming Manual ESC a n [Function] Select justification [Format] ASCII ESC a Decimal [Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 [Default] n = 0 [Description] In standard mode, aligns all the data in one line to the selected layout.
  • Page 19: Gs W Nl Nh

    TP809 Programming Manual GS W nL nH [Function] Set print area width [Format] ASCII W nL nH 57 nL nH Decimal 87 nL nH [Range] 0 ≤ (nL + nH × 256) ≤ 65535 (0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255) [Default] (nL + nH ×...
  • Page 20: Print Commands

    TP809 Programming Manual 3 Print Commands [Function] Print and line feed [Format] ASCII Decimal [Description] Prints the data in the print buffer and feeds one line, based on the current line spacing. FF (In page mode) [Function] Print and return to standard mode (in page mode)
  • Page 21: Esc J N

    TP809 Programming Manual ESC J n [Function] Print and feed paper [Format] ASCII ESC J 4A n Decimal [Range] 0 ≤n ≤ 255 [Description] Prints the data in the print buffer and feeds the paper [n × (vertical or horizontal motion unit)].
  • Page 22 TP809 Programming Manual GS ( A pL pH n m [Function] Execute test print [Format] ASCII Decimal [Range] (pL + pH × 256) = 2 (pL = 2, pH = 0) 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 1 ≤...
  • Page 23: Miscellaneous Function Commands

    TP809 Programming Manual 4 Miscellaneous Function Commands ESC @ [Function] Initialize printer [Format] ASCII Decimal [Description] • Clears the data in the print buffer and resets the printer modes to the modes that were in effect when the power was turned on.
  • Page 24: Character Control Commands

    TP809 Programming Manual 5 Character Control Commands ESC ! n [Function] Select print mode(s) [Format] ASCII ESC ! Decimal [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] Select the character font and styles (emphasized, double-height, double-width, and underlined) together.
  • Page 25: Esc ? N

    TP809 Programming Manual ESC ? n [Function] Cancel user-defined characters [Format] ASCII ESC ? Decimal [Range] 32 ≤n ≤126 [Description] • Deletes the user-defined character pattern specified by character code n. ESC SP n [Function] Set right-side character spacing [Format]...
  • Page 26: Esc E N

    TP809 Programming Manual ESC E n [Function] Turn emphasized mode on/off [Format] ASCII ESC E Decimal [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] • Turns emphasized mode on or off. • When the LSB of n is 0, turns off emphasized mode.
  • Page 27: Esc M N

    TP809 Programming Manual ESC M n [Function] Select character font [Format] ASCII ESC M 4D n Decimal [Range] n = 0, 1, 48, 49 [Default] n = 0 [Description] • Selects a character font. Character font 0,48 Character font A (12 × 24) 1,49 Character font B (9 ×...
  • Page 28: Esc G N

    TP809 Programming Manual ESC G n [Function] Turn double-strike mode on/off [Format] ASCII ESC G Decimal [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] • Turns double-strike mode on or off. • When the LSB of n is 0, turns off double-strike mode.
  • Page 29: Gs ! N

    TP809 Programming Manual GS ! n [Function] Select character size [Format] ASCII 21 n Decimal 33 n [Range] 0≤n≤7, 16≤n≤23, 32≤n≤39, 48≤n≤55, 64≤n≤71, 80 ≤ n ≤ 87, 96 ≤ n ≤ 103, 112 ≤ n ≤ 119 (1≤Enlargement in vertical direction≤8, 1≤Enlargement in horizontal direction≤8)
  • Page 30: Esc T N

    TP809 Programming Manual ESC t n [Function] Select character code table [Format] ASCII ESC t 74 n Decimal 116 n [Range] 0 ≤ n ≤ 5, 16 ≤ n ≤ 19, n = 255 [Default] n = 0 [Description] Selects page n from the character code table.
  • Page 31: Esc

    TP809 Programming Manual ESC & [Function] Define user-defined characters [Format] ASCII ESC & y c1 c2 [x1 d1 ... d(y × x1)] ... [xk d1 ... d(y × xk)] 26 y c1 c2 [x1 d1 ... d(y × x1)] ... [xk d1 ... d(y × xk)] Decimal y c1 c2 [x1 d1 ...
  • Page 32 TP809 Programming Manual...
  • Page 33: Status Commands

    TP809 Programming Manual 6 Status Commands GS r n [Function] Transmit status [Format] ASCII 72 n Decimal 114 n [Range] n = 1, 2, 49, 50 [Description] • Transmits the status •This printer transmits the following status. •Paper sensor status ( n = 1, 49) •Drawer kick-out connector status ( n = 2, 50)
  • Page 34 TP809 Programming Manual Off/On Decimal Status Drawer kick-out connector pin3 is LOW. Drawer kick-out connector pin3 is HIGH. Reserved. Fixed. 5, 6 Reserved. Fixed. Function 1,49 Transmits paper sensor status. 2,50 Transmits drawer kick-out connector status.
  • Page 35: Esc V

    TP809 Programming Manual ESC v [Function] Transmit paper sensor status [Format] ASCII Decimal [Description] • Transmits the status of paper sensor(s) as 1 byte of data,as follows: [Note] •This command is only valid for serial model. Off/On Decimal Status Roll...
  • Page 36: Dle Eot N

    TP809 Programming Manual DLE EOT n [Function] Transmit real-time status [Format] ASCII DLE EOT n Decimal [Range] 1 ≤ n ≤ 4 [Description] Transmit the real-time status. • This printer transmits the following status in real time. • Printer status (n = 1) •...
  • Page 37 TP809 Programming Manual Off/On Decimal Status Fix as 0. Fix as 1. Drawer kick-out connector pin 3 is LOW. Drawer kick-out connector pin 3 is HIGH. Online Offline. Fix as 1. 5, 6 Reserved. Fix as 0. Off/On Decimal Status...
  • Page 38 TP809 Programming Manual Off/On Decimal Status Fixed Fixed Roll paper near-end sensor: paper adequate. Roll paper near-end sensor: paper near end. Fixed Roll paper end sensor (paper sensor): paper present. Roll paper end sensor (paper sensor): paper not present. Fixed...
  • Page 39: Barcode Commands

    TP809 Programming Manual 7 Barcode Commands GS h n [Function] Set bar code height [Format] ASCII Decimal 104 n [Range] 1 ≤ n ≤ 255 [Default] n = 162 [Description] • Sets the height of the bar code to n dots.
  • Page 40: Gs K

    TP809 Programming Manual GS k [Function] Print barcode [Format] <A> ASCII m d1...dk NUL m d1...dk 00 Decimal 107 m d1...dk 0 <B> ASCII m n d1...dn m n d1...dn Decimal 107 m n d1...dn [Range] <A> 0 ≤ m ≤ 6 (For the range of k and d, see [Description].) <B>...
  • Page 41: Gs W N

    TP809 Programming Manual Bar code system Range of n Range of d UPC-A n = 11, 12 48 ≤ d ≤ 57 UPC-E n = 11, 12 48 ≤ d ≤ 57 [where d1 = 48] JAN13 / EAN13 n = 12, 13 48 ≤...
  • Page 42 TP809 Programming Manual GS ( k pL pH cn fn [parameters] [Function] Set up and print symbol [Description] • Processes the data for symbols. • pL, pH specify (pL + pH × 256) as the number of bytes after pH (cn, fn, and [parameters]).
  • Page 43: Function 065> Gs ( K Pl Ph Cn Fn N (Cn = 48, Fn = 65)

    TP809 Programming Manual <Function 065> GS ( k pL pH cn fn n (cn = 48, fn = 65) [Function] PDF417: Set the number of columns in the data region [Format] ASCII k pL pH cn fn n 28 6B 03 00 30 41 n...
  • Page 44: Function 068> Gs ( K Pl Ph Cn Fn N (Cn = 48, Fn = 68)

    TP809 Programming Manual <Function 068> GS ( k pL pH cn fn n (cn = 48, fn = 68) [Function] PDF417: Set the row height [Format] ASCII GS ( pL pH cn fn n 1D 28 6B 03 00 30 44 n...
  • Page 45: Function 080> Gs ( K Pl Ph Cn Fn M D1

    TP809 Programming Manual Function number of error correction codewords Select error correction level0 Select error correction level1 Select error correction level2 Select error correction level3 Select error correction level4 Select error correction level5 Select error correction level6 Select error correction level7...
  • Page 46: Function 081> Gs ( K Pl Ph Cn Fn M (Cn = 48, Fn = 81)

    TP809 Programming Manual <Function 081> GS ( k pL pH cn fn m (cn = 48, fn = 81) [Function] PDF417: Print the symbol data in the symbol storage area [Format] ASCII GS ( pL pH cn fn m 1D 28...
  • Page 47: Function 167> Gs ( K Pl Ph Cn Fn N (Cn = 49, Fn = 67)

    TP809 Programming Manual <Function 167> GS ( k pL pH cn fn n (cn = 49, fn = 67) [Function] QR Code: Set the size of module [Format] ASCII pL pH cn fn n 03 00 31 43 n Decimal...
  • Page 48: Function 180> Gs ( K Pl Ph Cn Fn M D1

    TP809 Programming Manual <Function 180> GS ( k pL pH cn fn m d1…dk (cn = 49, fn = 80) [Function] QR Code: Store the data in the symbol storage area [Format] ASCII GS ( pL pH cn fn m d1…dk 1D 28 pL pH 31 50 30 d1…dk...
  • Page 49: Function 182> Gs ( K Pl Ph Cn Fn M (Cn = 49, Fn = 82)

    TP809 Programming Manual <Function 182> GS ( k pL pH cn fn m (cn = 49, fn = 82) [Function] QR Code: Transmit the size information of the symbol data in the symbol storage area [Format] ASCII GS ( pL pH cn fn m...
  • Page 50: Mechanical Control Commands

    TP809 Programming Manual 8 Mechanical Control Commands GS V [Function] Select cut mode and cut paper [Format] <A> ASCII GS V 1D 56 Decimal <B> ASCII GS V 1D 56 Decimal [Range] <A> m = 0, 1, 48, 49 <B> m = 65, 66, 0 <n ≤ 255 [Description] Executes paper cutting specified by m.
  • Page 51: Esc M

    TP809 Programming Manual ESC m [Function] Partial cut (three points left uncut) [Format] ASCII ESC m 1B 6D Decimal 27 109 [Range] None [Default] None [Description] Executes a partial cut of the roll paper. ■ See [Notes] GS V <Function A> for details.
  • Page 52: Esc U

    TP809 Programming Manual ESC u [Function] Transmit peripheral device status [Format] ASCII ESC u n 1B 75 n Decimal 27 117 n [Range] n = 0, 48 [Description] Transmits the peripheral device status as 1 byte of data. [Recommended This command is supported only by some printer models but will not be supported Functions]] by future models.
  • Page 53: Line Spacing Commands

    TP809 Programming Manual 9 Line Spacing Commands ESC 3 [Function] Set line spacing [Format] ASCII ESC 3 Decimal [Range] 0 ≤ n ≤ 255 [Default] In case of 203dpi n = 34 In case of 180dpi n = 30 [Description] Sets the line spacing to n ×...
  • Page 54: Miscellaneous Commands

    TP809 Programming Manual 10. Miscellaneous Commands ESC S [Function] Select standard mode [Format] ASCII ESC S Decimal [Range] None [Default] None [Description] Switches from page mode to standard mode. ■ This command is enabled only in page mode. Page mode can be selected by ESC L.
  • Page 55: Kanji Commands

    TP809 Programming Manual 11.KANJI Commands FS ! [Function] Select print mode(s) for Kanji characters [Format] ASCII 21 n Decimal [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] Selects the character styles (double-height, double-width, and Kanji-underlined) together for multi-byte code character as follows: ■...
  • Page 56 TP809 Programming Manual FS & [Function] Select Kanji character mode [Format] ASCII & Decimal [Description] Selects Kanji character mode. ■ This command can be used only for the Japanese, Hangeul, Simplified Chinese, and [Notes] Traditional Chinese models. ■ Settings of this command are effective until FS . is executed, ESC @ is executed, the...
  • Page 57 TP809 Programming Manual FS - [Function] Select print mode(s) for Kanji characters [Format] ASCII 2D n Decimal [Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 [Default] n = 0 [Description] Turns on or off underline mode for multi-byte code character (Kanji-underline), using n as follows: ■...
  • Page 58 TP809 Programming Manual FS . [Function] Cancel Kanji character mode [Format] ASCII Decimal [Description] Cancels Kanji character mode. ■ This command can be used only for the Japanese, H a n g e u l , Simplified [Notes] Chinese, and Traditional Chinese models.
  • Page 59 TP809 Programming Manual FS 2 [Function] Define user-defined Kanji characters c1 c2 d1...dk [Format] ASCII 32 c1 c2 d1...dk 50 c1 c2 d1...dk Decimal [Range] The ranges of c1 and c2 differ, depending on models and the character code system used. The ranges of c1 and c2 for each model are as follows.
  • Page 60: Fs W

    TP809 Programming Manual FS W [Function] Turn quadruple-size mode on/off for Kanji characters [Format] ASCII 57 n 87 n Decimal [Range] 0 ≤ n ≤ 255 [Default] n = 0 [Description] Turns quadruple-size mode on or off for multi-byte code character.
  • Page 61: Other Commands

    TP809 Programming Manual 12. Other Commands FS q n [xL xH yL yH d1...dk]1...[xL xH yL yH d1...dk]n & FS p n m [obsolete command] GS ( L <Function 69>, which is the upward-compatible command replacing FS p, is recommended to use, since FS p is an obsolete command in the ESC/POS command system.
  • Page 62: Esc 2

    TP809 Programming Manual • If the power is turned off or the printer is reset via an interface while this command is being executed, the printer may go into an abnormal condition. Do not turn the power off or do not reset the printer via an interface while this command is being executed.

Table of Contents