Shandong New Beiyang Information Technology Co. BTP-M280 Programming Manual

Btp-m280a series impact receipt printer
Hide thumbs Also See for BTP-M280:

Advertisement

Quick Links

CONFIDENTIAL
PROGRAMMING MANUAL

Receipt Printer

BTP-M280
Shandong New Beiyang Information Technology Co., Ltd.

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

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

  • Page 1: Receipt Printer

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

    REVISION HISTORY Date Version Description Drafted by August 27, 2007 1.00 Primary version Mr. Zhuan Long Yu Add the options of 857/125 and 1257 November 11,2007 1.01 Mr. Zhuan Long Yu (code page) January 16,2008 1.03 Adjust the format of Appendix A Mr.
  • Page 3 Confidential BTP-M280 Programming Manual Declaration If you need this manual, please comply with the Clause as below. If you disagree with it, please return this manual immediately. This manual contains the private confidential information belonging to Shandong New Beiyang Info-Tech Co., Ltd. (hereinafter referred to as SNBC) or its distributors. You must keep its relative content as the confidential information.
  • Page 4: Table Of Contents

    Confidential BTP-M280 Programming Manual Contents 1 Overview ..............................7 1.1 C ......................7 OMMANDS CLASSIFICATION 1.2 K ............................7 EY TERMS 1.3 C ...........................7 OMMAND FORMAT 2 Command Description ........................9 2.1 P ..........................9 RINT COMMAND LF ..............................9 CR ..............................9 ESC J n .............................9 ESC K n ............................10...
  • Page 5 Confidential BTP-M280 Programming Manual ESC t n............................21 ESC { n............................21 FS ! n...............................22 FS & ..............................23 FS – n..............................23 FS ..............................23 FS 2 c1 c2 d1...dk ...........................23 FS ? c1 c2 ............................24 FS C n .............................25 FS S n1 n2 ............................25 FS W n ............................25...
  • Page 6 Confidential BTP-M280 Programming Manual ESC U n ............................37 ESC c 3 n ............................37 ESC c 4 n ............................38 ESC c 5 n ............................38 ESC I...............................38 ESC m.............................39 ESC p m t1 t2..........................39 ESC r n............................39 GS ( A pL pH n m ..........................39 GS ( C pL pH m fn b [c1 c2] [d1...dk]....................40...
  • Page 7: Overview

    1 Overview This manual classifies the printer commands into several kinds based on its functions, and also describes the applications of relative commands in detail depending on its sorts. We hope that it is helpful for programmers to get known of those commands. 1.1 Commands classification This receipt printer commands are classified as below: Print commands: used for printing and feeding paper;...
  • Page 8 Confidential BTP-M280 Programming Manual All command data in programming Demo use HEX. All normal font/characters are data. There is no explanation for the data of command such as 42 43 which is data. The font/character underlined and emphasized is a command such as 1B 40. All the data inside parentheses after all commands in Demo is used to explain the meanings of this command.
  • Page 9: Command Description

    Confidential BTP-M280 Programming Manual 2 Command Description 2.1 Print command Print and line feed [Function] ASCII [Format] Decimal This command sets the print position to the beginning of the line. [Note] [Reference] ESC 2, ESC 3 When the command is enabled, it equals to LF; it is used to print the data in the print...
  • Page 10: Esc K N

    Confidential BTP-M280 Programming Manual ESC K n Print and retract paper [Function] ASCII [Format] Decimal 0 ≤ n ≤ 48 [Range] Print the data in buffers and retract paper n dots [n x 0.176mm]. [Notes] If n exceed the paper retraction range, the data in the buffers shall be printed but not retract paper.
  • Page 11: Location Command

    Confidential BTP-M280 Programming Manual • If paper retraction spacing is more than 8.46mm,the printer prints the data and does not [Note] retract paper. • If n exceed the value range, the printer prints the data and does not retract paper.
  • Page 12: Esc D N1

    Confidential BTP-M280 Programming Manual ESC D n1...nk NUL Set horizontal tab positions [Function] ASCII n1... nk NUL [Format] 44 n1...nk 00 Decimal 68 n1...nk 0 1 ≤ n1 ≤ n2 ≤ …nk ≤ 255 [Range] 0 ≤ k ≤ 32 Set horizontal tab positions.
  • Page 13 Confidential BTP-M280 Programming Manual 41 42 43 0A 41 42 43 44 0A 41 42 43 44 45 0A 1B 61 01(Set the middle alignment of characters) 41 42 43 0A 41 42 43 44 0A 41 42 43 44 45 0A 1B 61 02(Set the right alignment of characters)...
  • Page 14: Gs Ff

    Confidential BTP-M280 Programming Manual • If you save the settings of this command into the printer, it shall not be lost after printer turned off or initialization. • After this command sets the excursion, the settings is effective when printer powered on again.
  • Page 15 Confidential BTP-M280 Programming Manual • Selects print mode(s) usiing n as follows [Notes] Decimal Function Select Font A (9 × 9) Select Font B (7 × 9) Undefined Emphasized mode not selected Emphasized mode selected Double-height mode not selected Double-height mode selected...
  • Page 16: Esc % N

    Confidential BTP-M280 Programming Manual ESC % n Select/cancel user-defined character set [Function] ASCII [Format] 25 n Hecimal 37 n 0 ≤ n ≤255 [Range] Select or cancel the user-defined character set: [Notes] • When the LSB of n is 0, the user-defined character set is canceled.
  • Page 17 Confidential BTP-M280 Programming Manual [Demo] • When Font A is selected • When Font B is selected - 17 -...
  • Page 18: Esc - N

    Confidential BTP-M280 Programming Manual ESC – n Turn underline mode on/off [Function] ASCII ESC - [Format] 2D n Hecimal 45 n 0 ≤ n ≤2, 48 ≤n ≤ 50 [Range] Turns underline mode on or off, based on the following values of n:...
  • Page 19: Esc E N

    Confidential BTP-M280 Programming Manual ESC E n Turn emphasized mode on/off [Function] ASCII [Format] 45 n Hecimal 69 n 0 ≤ n ≤ 255 [Range] • When the LSB of n is 0, emphasized mode is turned off. [Notes] • When the LSB of n is 1, emphasized mode is turned on.
  • Page 20: Esc M N

    Confidential BTP-M280 Programming Manual ESC M n Select character font [Function] ASCII [Format] 4D n Hecimal 77 n n = 0, 1, 48, 49 [Range] Function Standard Font A (9 × 9 ) selected 0,48 Compress Font (7 × 9) selected...
  • Page 21: Esc T N

    Confidential BTP-M280 Programming Manual ESC t n Select character code table [Name] ASCII [Format] Decimal 0 ≤ n ≤ 5, 16 ≤ n ≤ 19, n = 255 [Range] 0 ≤ n ≤ 5, 16 ≤ n ≤ 21, 26, n = 255* [Description] Select a page n from the character code table.
  • Page 22: Fs ! N

    Confidential BTP-M280 Programming Manual n = 0 [Default] [Example] 1B 40 1B 7B 00(Turn off upside-down printing mode) 41 42 43 44 45 46 0A 30 31 32 33 34 35 0A 1B 7B 01(Turn on upside-down printing mode) 41 42 43 44 45 46 0A...
  • Page 23: Fs - N

    Confidential BTP-M280 Programming Manual n = 0 [Default] [Reference] FS-, FS W FS & Select Kanji character mode [Name] ASCII & [Format] Decimal [Description] Select Kanji character mode. [Reference] FS ., FS C FS – n Turn underline mode on/off for Kanji characters...
  • Page 24: Fs ? C1 C2

    Confidential BTP-M280 Programming Manual The value range of c1, c2 is related to different character type: [Range] Character type Japanese(JIS code) c1 = 77H 21H ≤ c2 ≤ 7EH 40H ≤ c2 ≤ 7EH Japanese(SHIFT code) c1 = ECH 80H ≤ c2 ≤ 9EH...
  • Page 25: Fs C N

    Confidential BTP-M280 Programming Manual [Description] Cancel the user-defined double-byte character specified. c1 indicates the first byte of character code and c2 is for the second byte of character code. [Reference] FS 2,FS C FS C n Select character code system...
  • Page 26: Bitmap Command

    Confidential BTP-M280 Programming Manual 2.4 Bitmap command ESC * m nL nH d1... dk Select bitmap mode [Name] ASCII m nL nH d1...dk [Format] m nL nH d1...dk Decimal m nL nH d1...dk m = 0, 1 [Range] × 1 ≤ ( nL + nH ...
  • Page 27: Fs P N M

    Confidential BTP-M280 Programming Manual FS p n m Print NV bitmap [Name] ASCII [Format] Decimal 1 ≤ n ≤ 255 [Range] m = 0, 1, 48, 49 [Description] Print a NV bitmap n using the mode specified by m: Mode...
  • Page 28 Confidential BTP-M280 Programming Manual • This command cancels all NV bitmaps that have already been defined by this command. The printer cannot redefine only one of several data definitions previously defined. In this case, all data needs to be sent again.
  • Page 29: Real-Time Command

    Confidential BTP-M280 Programming Manual [Reference] FS p 2.5 Real-time command DLE EOT n Real-time status transmission [Name] ASCII EOT n [Format] Decimal 1 ≤ n ≤ 4 [Range] [Description] Transmits the printer status specified by ‘n’ in real-time. Function Transmit printer status...
  • Page 30 Confidential BTP-M280 Programming Manual • n = 2: off-line status Decimal Function Fixed 0 Fixed 1 Top cover is closed Top cover is opened FEED button not pressed FEED button pressed Fixed 1 Printer with paper Printer out of paper...
  • Page 31: Esc U N

    Confidential BTP-M280 Programming Manual • If print data contains the same character strings as this command, those data shall be executed as this command. Users must consider this case. • When printing is stopped due to high print head temperature until the print head temperature drops sufficiently, and the error recovers automatically.
  • Page 32: Gs A N

    Confidential BTP-M280 Programming Manual GS a n Enable/disable Automatic Status Back (ASB) [Name] ASCII [Format] 61 n Decimal 97 n 0 ≤ n ≤ 255 [Range] [Description] Enable or disable ASB and specify the status items to include, using n as follows:...
  • Page 33: Gs R N

    Confidential BTP-M280 Programming Manual Second byte (printer information) Decimal Printer status Undefined Undefined No HP error HP error occurs No cutter error Cutter error Undefined No unrecoverable error Unrecoverable error occurs No automatically recoverable error Automatically recoverable error occurs Undefined Bit 5: Unrecoverable error means that input voltage is abnormal.
  • Page 34: Other Commands

    Confidential BTP-M280 Programming Manual [Description] Transmit the status specified by n as follows: Function 1, 49 Transmit paper sensor status 2, 50 Transmit cash drawer kick-out connector status • This command is valid for serial, parallel, USB printers. [Notes] • This command is executed when the data in the receive buffer is developed.
  • Page 35: Dle Dc4 Fn M T

    Confidential BTP-M280 Programming Manual DLE DC4 fn m t Generate pulse at real-time [Name] ASCII [Format] Decimal fn = 1 [Range] m = 0, 1 1 ≤ t≤ 8 [Description] Outputs the pulse specified by t to connector pin m as follows:...
  • Page 36: Esc 2

    Confidential BTP-M280 Programming Manual ESC 2 Select default 1/6 inch line spacing (about 4.23mm) [Name] ASCII [Format] Decimal [Reference] ESC 3 ESC 3 n Set line spacing: n × 0.176 mm [Name] ASCII [Format] Decimal 0 ≤ n ≤ 255...
  • Page 37: Esc U N

    Confidential BTP-M280 Programming Manual [Description] Clear the data in the print buffer and reset the print mode to the mode that was in effect when the power was turned on. • The self-defined characters already defined are cleared. [Notes] • The NV bit image data is not cleared.
  • Page 38: Esc C 4 N

    Confidential BTP-M280 Programming Manual ESC c 4 n Select paper sensor(s) to stop printing [Name] ASCII [Format] 63 34 n Decimal 99 52 n 0 ≤ n ≤ 255 [Range] n = 0 [Default] [Description] Select the paper sensor(s) used to stop printing when a paper-end is detected, using n as...
  • Page 39: Esc M

    Confidential BTP-M280 Programming Manual ESC m Half cut [Name] ASCII [Format] Decimal [Description] • Printer doesn’t feed paper and cut paper directly. ESC p m t1 t2 Generate pulse [Name] ASCII [Format] Decimal m = 0, 1, 48, 49 [Range] 0 ≤...
  • Page 40 Confidential BTP-M280 Programming Manual (pL+ ( pH × 56))=2 (where pL=2, pH=0) [Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 1 ≤ m≤ 3, 49 ≤ m ≤ 51 [Description] • Execute a test print with a specified test pattern by n, m.
  • Page 41: (Function 0)Gs ( C Pl Ph M Fn B C1 C2 (Fn = 0, 48)

    Confidential BTP-M280 Programming Manual (Function 0)GS ( C pL pH m fn b c1 c2 (fn = 0, 48) ASCII GS ( pL pH m fn b c1 c2 [Format] 28 43 pL pH m fn b c1 c2 Decimal...
  • Page 42: (Function 3)Gs ( C Pl Ph M Fn B (Fn = 3, 51)

    Confidential BTP-M280 Programming Manual (Function 3)GS ( C pL pH m fn b (fn = 3, 51) ASCII GS ( pL pH m fn b [Format] 1D 28 43 pL pH m fn b Decimal 29 40 67 pL pH m fn b (pL + pH ×...
  • Page 43: Gs ( E Pl Ph Fn [Parameters]

    Confidential BTP-M280 Programming Manual d2 = 76 d3 = 82 [Description] Delete all users’ stored data. GS ( D pL pH m [a1 b1]...[ak bk] Turn on/off real-time command [Name] ASCII GS ( pL pH m [ a1 b1 ]...[ ak bk ] [Format] 1D 28 44 pL pH m [ a1 b1 ]...[ ak bk ]...
  • Page 44: (Function 1)Gs ( E Pl Ph Fn D1 D2 (Fn = 1)

    Confidential BTP-M280 Programming Manual recommended to write the NV memory 10 times or less a day. • During the processing of this command, the printer is in busy status. Because the data now is being inputted into NV memory at that moment, the printer stops receiving other commands.
  • Page 45: (Function 4)Gs ( E Pl Ph Fn A (Fn = 4)

    Confidential BTP-M280 Programming Manual • b = 50, remain same at corresponding position. • a = 2 (Memory switch 2) Status character Functions Settings 2-1,2-2 Undefined Simplified Chinese character set mode:GB18030 Simplified Chinese character set mode:GB2312 2-4 ~ 2-8 Undefined •...
  • Page 46: (Function 6)Gs ( E Pl Ph Fn A (Fn = 6)

    Confidential BTP-M280 Programming Manual (Function 6)GS ( E pL pH fn a (fn = 6) ASCII GS ( pL pH fn a [Format] 1D 28 45 pL pH fn a Decimal 29 40 69 pL pH fn a (pL + pH × 2 56) = 2 (pL = 2, pH = 0)
  • Page 47: (Function 12)Gs ( E Pl Ph Fn A (Fn = 12)

    Confidential BTP-M280 Programming Manual • Parity verify settings (a = 2) Parity verify Even • Flow control settings (a = 3) Flow control DTR/DSR XON/XOFF • Digit bit length settings (a = 4) Digit bit length 7 bit 8 bit •...
  • Page 48 Confidential BTP-M280 Programming Manual ① m = 0,1,48, 49 [Range] ② m = 65,66, 0 ≤n ≤255 [Description] Choose paper mode and cut paper Choosing paper mode according to m as follows: Cutting mode 0, 48 1, 49 Half cut 65, 66 the distance from printing position to tear-off bar + n x 0.176mm...
  • Page 49: Programming Process Guide

    Confidential BTP-M280 Programming Manual 3 Programming Process Guide Because the different printing status and error can be transmitted by Auto Status Back (ASB) command, it is recommended that you can use ASB command to inquiry status. ASB command is effective when power on the printer and can be directly sent to inquiry the status.
  • Page 50: Appendix

    Confidential BTP-M280 Programming Manual Appendix Appendix A:Control Sequences The control sequences of the printer controller are POS compatible. Code Function Moves the print position to the next horizontal tab position Print and line feed When the command is enabled, it equals to LF; it is used to print...
  • Page 51 Confidential BTP-M280 Programming Manual 1B 74 27 116 Select character code table ESC t 1B 75 27 117 Peripheral status transmission ESC u 1B 76 27 118 Paper status transmission ESC v 1B 7B 27 123 Turn on/off upside-down printing mode...

Table of Contents