Shandong New Beiyang Information Technology Co. BTP-2002NP Programming Manual

Receipt printer

Advertisement

Quick Links

CONFIDENTIAL
PROGRAMMING MANUAL

Receipt Printer

BTP-2002NP
Shandong New Beiyang Information Technology Co., Ltd.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BTP-2002NP and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Shandong New Beiyang Information Technology Co. BTP-2002NP

  • Page 1: Receipt Printer

    CONFIDENTIAL PROGRAMMING MANUAL Receipt Printer BTP-2002NP Shandong New Beiyang Information Technology Co., Ltd.
  • Page 2: Revision History

    CONFIDENTIAL BTP-2002NP Programming Manual REVISION HISTORY Date Version Description Drafted by December 6 , 2005 1.00 Primary version Mr. Peng yuanbin - 1 -...
  • Page 3 BTP-2002NP Programming Manual Declaration Information in this document is subject to change without notice. SHANDONG NEW BEIYANG INFORMATION TECHNOLOGY CO., LTD. (hereinafter referred to as “New Beiyang”) reserves the right to improve products as new technology, components, software, and firmware become available. If users need further data about this products or have any doubt about safety issues that might arise from using it, please feel free to contact New Beiyang or your local agents.
  • Page 4: Table Of Contents

    BTP-2002NP Programming Manual Contents 1. User Guide ............................1 2. Command Description ........................2 HT..................................2 LF ..................................2 FF................................... 2 CR..................................3 CAN..................................3 DLE EOT ................................3 DLE ENQ ................................5 DLE DC4 ..............................6 N M T ESC FF................................... 7 ESC SP ................................
  • Page 5 BTP-2002NP Programming Manual ESC R ................................18 ESC S................................... 19 ESC T ................................20 ESC V ................................20 ESC W H......................21 ESC \ H ................................ 22 ................................23 ................................23 ................................24 ................................24 ................................25 ................................25 2 ..............................26 P M T ................................
  • Page 6 BTP-2002NP Programming Manual ①GS V ②GS V ............................40 GS W H................................ 40 GS \ H................................41 GS ^ ................................42 R T M .................................. 42 .................................. 45 .................................. 45 1... NUL②GS 1......................45 ①GS K M D K M N D ..................................
  • Page 7 BTP-2002NP Programming Manual C.5 P 4 (PC865: N )..........................68 ORDIC C.6 P 5 ( PC852 ) ............................69 C.7 P 6 (PC858)............................. 70 C.8 I ........................ 71 NTERNATIONAL HARACTER - 6 -...
  • Page 8: User Guide

    CONFIDENTIAL BTP-2002NP Programming Manual 1. User Guide This part explains to users how to use this programming manual. Please read it carefully before programming. The command explanation in this manual includes the following parts. 1) [Name] the name and function summary. This is the first part of the command explanation in which the command is expressed in ASCII.
  • Page 9: Command Description

    BTP-2002NP Programming Manual 2. Command Description [Name] Horizontal [Format] ASCII Decimal [Description] Moves the print position to the next horizontal tab position. [Notes] • This command is ignored unless the next horizontal tab position has been set. • If the next horizontal tab position exceeds the printing area, the printer sets the printing position to [Printing area width + 1].
  • Page 10: Can

    BTP-2002NP Programming Manual [Name] Print and carriage return [Format] ASCII Decimal [Description] When automatic line feed is enabled, this command functions the same as LF;when automatic line feed is disabled, this command is ignored. [Notes] · Sets the print starting position to the beginning of the line.
  • Page 11 BTP-2002NP Programming Manual Example: If you attempt to transmit ESC 3 n to the printer, but DTR (DSR for the host computer) goes to MARK before n is transmitted and then DLE EOT 3 interrupts before n is received, the code <10>H for DLE EOT 3 is processed as the code for ESC 3 <10>H.
  • Page 12: Dle Enq N

    BTP-2002NP Programming Manual Bit 5: Becomes on when the paper end sensor detects paper end and printing n = 3: Error status Off/On Decimal Function Not used. Fixed to Off Not used. Fixed to On Undefined No auto-cutter error Auto-cutter error occurs.
  • Page 13: Dle Dc4 N M T

    BTP-2002NP Programming Manual [Notes] · This command is effective only when an auto-cutter error occurs. · The printer starts processing data upon receiving this command. · This command is executed even when the printer is off-line, the receive buffer is full, or there is an error status with a serial interface model.
  • Page 14: Esc Ff

    BTP-2002NP Programming Manual [Notes] When the pulse is output to the connector pin specified while ESC p or DEL DC4 is executed while this command is processed, this command is ignored. The printer executes this command upon receiving it.· With a serial interface model, this command is executed even when the printer is off-line, the receive buffer is full, or there is an error status.
  • Page 15: Esc ! N

    BTP-2002NP Programming Manual ·In page mode, the horizontal or vertical motion unit differs in page mode,depending on starting position of the printable area as follows: 1 When the starting position is set to the upper left or lower right of the printable area using ESC T, the horizontal motion unit ( x) is used.
  • Page 16: Esc $ Nl Nh

    BTP-2002NP Programming Manual command is effective. · GS ! can also select character size. However, the setting of the last received command is effective. [Default] n = 0 [Reference] ESC -, ESC E, GS ! ESC $ nL nH [Name]...
  • Page 17: Esc & Y C 1 C

    BTP-2002NP Programming Manual [Default] n = 0 [Reference] ESC &, ESC ? ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] [Name] Define user-defined characters [Format] ASCII ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] 1B 26 y c1 c2 [x1 d1...d(y ×...
  • Page 18: Esc * M Nl Nh D1

    BTP-2002NP Programming Manual · When font B (9×17) is selected. ESC * m nL nH d1... dk [Name] Select bit-image mode [Format] ASCII ESC * m nL nH d1...dk 1B 2A m nL nH d1...dk Decimal 27 42 m nL nH d1...dk...
  • Page 19 BTP-2002NP Programming Manual [Range] m = 0, 1, 32, 33 0 ≤ nL ≤ 255 0 ≤ nH ≤ 3 0 ≤ d ≤255 [Description] Selects a bit-image mode using m for the number of dots specified by nL and nH,...
  • Page 20: Esc - N

    BTP-2002NP Programming Manual When 24-dot bit image is selected: ESC - n [Name] Turn underline mode on/off [Format] ASCII Decimal [Range] 0 ≤ n ≤2, 48 ≤n ≤ 50 [Description] Turns underline mode on or off, based on the following values of n:...
  • Page 21: Esc 2

    BTP-2002NP Programming Manual ESC 2 [Name] Select default line spacing [Format] ASCII Decimal [Description] Selects 1/6-inch lines spacing (approximately 4.23mm). [Notes] · The line spacing can be set independently in standard mode and in page mode. [Reference] ESC 3 ESC 3 n...
  • Page 22: Esc ? N

    BTP-2002NP Programming Manual [Description] Selects device to which host computer sends data, using n as follows: Off/On Decimal Function Printer disabled Printer enabled Undefined [Notes] · When the printer is disabled, it ignores all data except for error-recovery commands (DLE EOT, DLE ENQ, DLE DC4) until it is enabled by this command.
  • Page 23: Esc E N

    BTP-2002NP Programming Manual 44 n1...nk 00 Decimal 68 n1...nk 0 [Range] 1 ≤ n ≤ 255 1 ≤ k ≤ 32 [Description] Sets horizontal tab positions. ·n specifies the column number for setting a horizontal tab position from the beginning of the line.
  • Page 24: Esc G N

    BTP-2002NP Programming Manual ESC G n [Name] Turn on/off double-strike mode [Format] ASCII 47 n Decimal 71 n [Range] 0 ≤ n ≤ 255 [Description] Turns double-strike mode on or off. ·When the LSB of n is 0, double-strike mode is turned off.
  • Page 25: Esc M N

    BTP-2002NP Programming Manual [Format] ASCII Decimal [Description] Switches from standard mode to page mode. [Notes] ·This command is enabled only when processed at the beginning of a line in standard mode. ·This command has no effect in page mode. ·After printing by FF is completed or by using ESC S, the printer returns to standard mode.
  • Page 26: Escs

    BTP-2002NP Programming Manual Decimal [Range] 0 ≤ n ≤ 12 [Description] Selects an international character set n from the following table,see Character set Character set U.S.A Spain I France Japan Germany Norway Denmark II Denmark I Spain II Sweden Latin America...
  • Page 27: Esc T N

    BTP-2002NP Programming Manual ESC T n [Name] Select print direction in page mode [Format] ASCII Decimal [Range] 0 ≤ n ≤ 3 48 ≤ n ≤ 51 [Description] Selects the print direction and starting position in page mode. n specifies the print direction and starting position as follows: [Notes] ·...
  • Page 28: Escw Xl Xh Yl Yh Dxl Dxh Dyl Dyh

    BTP-2002NP Programming Manual [Description] Turns 90° clockwise rotation mode on/off n is used as follows: Function 0, 48 Turns off 90° clockwise rotation mode 1, 49 Turns on 90° clockwise rotation mode [Notes] · This command affects printing in standard mode. However, the setting is always effective.
  • Page 29: Esc \ Nl Nh

    BTP-2002NP Programming Manual vertical motion unit does not affect the current printing area. · Use the horizontal motion unit ( x) for setting the horizontal starting position and printing area width, and use the vertical motion unit ( y) for setting the vertical starting position and printing area height.
  • Page 30: Esca N

    BTP-2002NP Programming Manual · In page mode, the horizontal or vertical motion unit differs as follows,depending on the starting point of the printing area: ① When the starting position is set to the upper left or lower right of the printable area using ESC T, the horizontal motion unit ( x) is used.
  • Page 31: Esc C 3 N

    BTP-2002NP Programming Manual [Description] Selects the paper type n = 0, set paper type as normal paper roll. n = 1, 2, set paper type as Marked paper. [Notes] ·Marked paper is the paper with black mark. [Default] n = 0...
  • Page 32: Esc C 5 N

    BTP-2002NP Programming Manual Off/On Decimal Function Paper roll near end sensor disabled Paper roll near end sensor enabled Paper roll near end sensor disabled Paper roll near end sensor enabled Undefined [Notes] · When a paper sensor is enabled with this command, printing is stopped onlywhen the corresponding paper is selected for printing.
  • Page 33: Esc P M T1 T2

    BTP-2002NP Programming Manual line spacing) of more than 1016 mm (40 inches) is specified, the printer feeds the paper only 1016 mm (40 inches). [Reference] sESC 2, ESC 3 ESC p m t1 t2 [Name] Generate pulse [Format] ASCII Decimal...
  • Page 34: Esc { N

    BTP-2002NP Programming Manual ESC { n [Name] Turns on/off upside-down printing mode [Format] ASCII Decimal [Range] 0 ≤ n ≤ 255 [Description] Turns upside-down printing mode on or off. · When the LSB of n is 0, upside-down printing mode is turned off.
  • Page 35: Fs G 2 M A1 A2 A3 A4 Nl Nh

    BTP-2002NP Programming Manual · a1, a2, a3, and a4 specify the data stored starting address to ( a1+( a2×256) ×( a3×65536)+( a4×16777216)). · nL, nH select the number of stored data bytes ( nL+( nH×256)). · d specifies the stored data.
  • Page 36: Fsp N M

    BTP-2002NP Programming Manual [Notes] The printer transmits all data collectively without confirming whether the host is ready to receive data. To receive all data result correctly, (the capacity of the transmitted data + 2) bytes or more space is required in the receive buffer.
  • Page 37: L X H Y L Y H D 1

    BTP-2002NP Programming Manual [Detail] · NV bit image means a bit image which is defined in a non-volatile memory by FS q and printed by FS p. · This command is not effective when the specified NV bit image has not been defined.
  • Page 38 BTP-2002NP Programming Manual using the FEED button, etc.)cannot be performed. NV bit image means a bit image which is defined in a non-volatile memory by FS q and printed by FS p. · In standard mode, this command is effective only when processed at the beginning of the line.
  • Page 39: Gs Ff

    BTP-2002NP Programming Manual [Example] When xL = 64, xH = 0, yL = 96, yH = 0 GS FF [Name] Feed label to print position [Format] ASCII Decimal [Description] Feed label to print position. [Notes] . Feed paper until the next mark get to special position.
  • Page 40: Gs $ Nl Nh

    BTP-2002NP Programming Manual [Description] Selects the character height using bits 0 to 2 and selects the character width using bits 4 to 7, as follows: Off/On Decimal Function Character height selection. See Table 2. Character width selection. See Table 1.
  • Page 41 BTP-2002NP Programming Manual · The horizontal starting buffer position does not move. · The reference starting position is that specified by ESC T. · This command operates as follows, depending on the starting position of the printing area specified by ESC T: ①...
  • Page 42: Gs * X Y D1

    BTP-2002NP Programming Manual value. The printer also re-reads the DIP switch settings. · The printer cuts the paper at the end of the test print. · The printer goes BUSY while this command is executed. GS * x y d1...d(x × y × 8)
  • Page 43: Gs B N

    BTP-2002NP Programming Manual [Description] Prints a downloaded bit image using the mode specified by m. m selects a mode from the table below: Mode Vertical Dot Density (DPI) Horizontal Dot Density (DPI) 0, 48 Normal 1, 49 Double-width 2, 50...
  • Page 44: Gs H N

    BTP-2002NP Programming Manual · When the LSB of n is 0, white/black reverse mode is turned off. · When the LSB of n is 1, white/black reverse mode is turned on. [Notes] · Only the lowest bit of n is valid.
  • Page 45: Gs L Nl Nh

    BTP-2002NP Programming Manual [Description] Transmits the printer ID specified by n as follows: Printer ID Specification ID (hexadecimal) 1,49 Printer model ID BTP2002 series 2,50 Type ID See table below. 3,51 ROM version ID Depends on ROM version. Firmware version Depends on Firmware version.
  • Page 46: Gs P X Y

    BTP-2002NP Programming Manual [Range] 0 ≤ nL ≤ 255 0 ≤ nH ≤ 255 [Description] Sets the left margin using nL and nH. · The left margin is set to [( nL + nH × 256) × horizontal motion unit)] inches.
  • Page 47: ①Gs V M ②Gs V M N

    BTP-2002NP Programming Manual Commands using x: ESC 3, ESC J, ESC W, GS $, GS \ Commands using y: ESC SP, ESC $, ESC W, ESC \,FS S, GS V · The command does not affect the previously specified values.
  • Page 48: Gs \ Nl Nh

    BTP-2002NP Programming Manual [Notes] · This command is effective only processed at the beginning of the line. · In page mode, the printer performs only internal flag operations. · This command does not affect printing in page mode. · If the [left margin + printing area width] exceeds the printable area, [printable area width - left margin) is used.
  • Page 49: Gs ^ R T M

    BTP-2002NP Programming Manual · The horizontal and vertical motion unit are specified by GS P. [Reference] ESC $, ESC T, ESC W, ESC \, GS $, GS P, 3.12 Page Mode GS ^ r t m [Name] Execute macro [Format]...
  • Page 50 BTP-2002NP Programming Manual [Description] Enables or disables ASB and specifies the status items to include, using n as follows: Off/On Decimal Status for ASB Drawer kick-out connector pin 3 status disabled. Drawer kick-out connector pin 3 status enabled. On-line/off-line status disabled.
  • Page 51 BTP-2002NP Programming Manual Second byte (printer information) Off/On Decimal Status for ASB Undefined. Undefined. Undefined. No auto cutter error. Auto cutter error occurred. Not used. Fixed to Off. No unrecoverable error. Unrecoverable error occurred. No automatically recoverable error. Automatically recoverable error occurred.
  • Page 52: Gsf N

    BTP-2002NP Programming Manual GS f n [Name] Select font for Human Readable Interpretation (HRI) characters [Format] ASCII Decimal [Range] n = 0, 1, 48, 49 [Description] Selects a font for the HRI characters used when printing a bar code. n selects a font from the following table:...
  • Page 53 BTP-2002NP Programming Manual [Description] Selects a bar code system and prints the bar code. m selects a bar code system as follows: Number of Bar Code System Remarks Characters UPC-A 11 ≤ k ≤ 12 48 ≤ d ≤ 57 UPC-E 11 ≤...
  • Page 54 BTP-2002NP Programming Manual · This command is not affected by print modes (emphasized, double-strike, underline, character size, white/black reverse printing, or 90° rotated character, etc.), except for upside-down printing mode. [Notes in page mode] · This command develops bar code data in the print buffer, but does not print it. After processing bar code data, this command moves the print position to the right side dot of the bar code.
  • Page 55: Gsr N

    BTP-2002NP Programming Manual printer stops command processing and ignore the following data. · If the printer receives characters that cannot be used in the special code set, the printer stops command processing and ignore the following data. · The printer does not print HRI characters that correspond to the shift characters or code set selection characters.
  • Page 56 BTP-2002NP Programming Manual Drawer kick-out connector status ( n = 2, 50): Off/On Decimal Status for ASB Drawer kick-out connector pin 3 is LOW Drawer kick-out connector pin 3 is HIGH 1- 3 Undefined Not used. Fixed to Off Undefined Not used.
  • Page 57: Gsw N

    BTP-2002NP Programming Manual and begins performing this command. The definition of this command should be cleared. · d indicates the bit-image data. Set a bit to 1 prints a dot and setting it to 0 does not print a dot.
  • Page 58: Kanji Control Commands

    BTP-2002NP Programming Manual 3.Kanji Control Commands FS ! n [Name] Set print mode(s) for Kanji characters [Format] ASCII Decimal [Range] 0 ≤n ≤ 255 [Description] Sets the print mode for Kanji characters, using n as follows: Off/On Decimal Status for ASB...
  • Page 59: Fs - N

    BTP-2002NP Programming Manual · Kanji codes are processed in the order of the first byte and second byte. · Kanji character mode is not selected when the power is turned on. [Reference] FS ., FS C FS - n [Name]...
  • Page 60: Fs 2 C1 C2 D1

    BTP-2002NP Programming Manual FS 2 c1 c2 d1...dk [Name] Define user-defined Kanji characters [Format] ASCII c1 c2 d1...dk c1 c2 d1...dk Decimal c1 c2 d1...dk [Range] c1 and c2 indicate character codes for the defined characters. c1 = FEH, A1H ≤ c2 ≤ FEH 0 ≤...
  • Page 61: Fs S N1 N2

    BTP-2002NP Programming Manual FS S n1 n2 [Name] Set left- and right-side Kanji character spacing [Format] ASCII Decimal [Range] 0 ≤ n1 ≤ 255 0 ≤ n2 ≤ 255 [Description] Sets left-side and right-side Kanji character spacing n1 and n2, respectively.
  • Page 62 BTP-2002NP Programming Manual [Notes] · Only the lowest bit of n is valid. · In quadruple-size mode, the printer prints the same size characters as when double-width and double-height modes are both turned on. · When quadruple-size mode is turned off using this command, the following characters are printed in normal size.
  • Page 63: Appendix A: Code128 Bar Code

    BTP-2002NP Programming Manual Appendix A: Code128 Bar Code A.1 Description of the CODE128 Bar Code In CODE128 bar code system, it is possible to represent 128 ASCII characters and 2-digit numerals using one bar code character that is defined by combining one of the 103 bar code characters and 3 code sets.
  • Page 64: A.2 Code Tables

    BTP-2002NP Programming Manual A.2 Code Tables Printable characters in code set A Transmit Data Transmit Data Transmit Data Character Character Character Decimal Decimal Decimal NULL FNC1 7B,31 123,49 FNC2 7B,32 123,50 FNC3 7B,33 123,51 FNC4 7B,34 123,52 SHIFT 7B,53 123,83 <...
  • Page 65 BTP-2002NP Programming Manual Transmit Data Transmit Data Transmit Data Character Character Character Decimal Decimal Decimal " & 7B,7B 123,123 — FNC1 7B,31 123,49 FNC2 7B,32 123,50 FNC3 7B,33 123,51 FNC4 7B,34 123,52 SHIFT 7B,53 123,83 CODEA 7B,41 123,65 CODEC 7B,43 123,67 <...
  • Page 66 BTP-2002NP Programming Manual Transmit Data Transmit Data Transmit Data Character Character Character Decimal Decimal Decimal FNC1 7B,31 123,49 CODEA 7B,41 123,65 CODEB 7B,42 123,66 - 59 -...
  • Page 67: B.1 General Description

    BTP-2002NP Programming Manual Appendix B: Page Mode B.1 General Description The printer operates in two print modes only when the paper roll is selected as the print sheet: standard mode and page mode. In standard mode, the printer prints and feeds paper each time it receives print data or paper feed commands.
  • Page 68 BTP-2002NP Programming Manual beginning of the printable area as a default value. (When a character is printed, point A is the baseline.) Print data containing downloaded bit images or bar codes is formatted so that the bottom point of the left side of the image data (point B in Figure B.3) is aligned with the baseline.
  • Page 69 BTP-2002NP Programming Manual Figure B.2 Character Data Developing Position Figure B.3 Print Data Developing Position - 62 -...
  • Page 70 BTP-2002NP Programming Manual Figure B.4 Downloaded Bit Image Developing Position - 63 -...
  • Page 71: Appendix C: Character Code Tables

    BTP-2002NP Programming Manual Appendix C: Character Code Tables C.1 Page 0 (PC437: USA, Standard Europe) (International Character Set: U.S.A.) NOTE: The character code tables show only character configurations. They do not show the actual print pattern. - 64 -...
  • Page 72: Pc850: Multilingual)

    BTP-2002NP Programming Manual C.2 Page 1 ( PC850: Multilingual) - 65 -...
  • Page 73: Pc860: Portuguese)

    BTP-2002NP Programming Manual C.3 Page 2 (PC860: Portuguese) - 66 -...
  • Page 74: Pc863: Canadian-French)

    BTP-2002NP Programming Manual C.4 Page 3 (PC863: Canadian-French) - 67 -...
  • Page 75: Pc865: Nordic)

    BTP-2002NP Programming Manual C.5 Page 4 (PC865: Nordic) - 68 -...
  • Page 76: Pc852 )

    BTP-2002NP Programming Manual C.6 Page 5 ( PC852 ) - 69 -...
  • Page 77: Pc858)

    BTP-2002NP Programming Manual C.7 Page 6 (PC858) - 70 -...
  • Page 78: C.8 International Character Set

    BTP-2002NP Programming Manual C.8 International Character Set - 71 -...

Table of Contents