BTP-R180II Programming Manual REVISION HISTORY Date Version Description Drafted by 2014-3-01 V100 Primary version Feng Bin - 1 -...
Page 3
Declaration Information in this document is subject to change without notice. SHANDONG NEW BEIYANG INFORMATION TECHNOLOGY CO., LTD. (hereinafter referred to as “SNBC”) 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 SNBC or your local distributor.
Page 5
BTP-R180II Programming Manual ESC % n ............................... - 18 - ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] ................- 19 - ESC – n ..............................- 20 - ESC ? n ..............................- 21 - ESC E n ...............................
Page 6
BTP-R180II Programming Manual FS ( E pL pH fn m c (fn = 61) ......................- 39 - FS ( E pL pH fn m kc1 kc2 a n(fn = 62) ..................- 39 - FS ( E pL pH fn m kc1 kc2 a (fn = 63) ..................... - 40 - FS ( E pL pH fn m a n(fn = 65) ......................
Page 7
BTP-R180II Programming Manual ESC c 7 n RAM ............................ - 61 - 2.12 Other commands ..........................- 62 - ESC c : n .............................. - 62 - DLE ENQ n ............................- 62 - DLE DC4 n m t ............................. - 63 - ESC 2 ..............................
Confidential BTP-R180II Programming Manual 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.
Page 9
Confidential BTP-R180II Programming Manual The format of command data, such as ASCII, Hex and Decimal; [Format] The value range of parameter in the command; [Range] Explain the main features and application notices of commands; [Note] The initial value used after the printer initialized;...
Confidential BTP-R180II 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 Print all data in the print buffers and return to the standard mode.
Confidential BTP-R180II Programming Manual ESC J n Print and feed paper [Function] ASCII [Format] Decimal 0 ≤n ≤ 255 [Range] After printing is completed, this command sets the print starting position to the beginning of [Notes] the line. The paper feed amount set by this command is not affected by the values set by ESC 2 or ESC 3.
Confidential BTP-R180II Programming Manual This command sets the print starting position to the beginning of the line. [Notes] This command does not affect the line spacing set by ESC 2 or ESC 3. The maximum paper feed amount is 1016 mm. If the paper feed amount is more than 1016 mm , the printer feeds paper only 1016 mm.
Confidential BTP-R180II Programming Manual The horizontal tab position is stored as a value of [character width × n] measured from the [Notes] beginning of the line. The character width includes the right-side character spacing, and double-width characters are set with twice the width of normal characters.
Confidential BTP-R180II Programming Manual Commands using character width: ESC SP, ESC $, ESC \ Commands using vertical motion units: ESC 3, ESC J, GS $, GS \ If the starting position is the upper right or lower left of the printing area, data is...
Page 16
Confidential BTP-R180II Programming Manual 0 ≤ xL, xH, yL, yH, dxL, dxH, dyL, dyH ≤ 255 (except dxL= dxH=0 or dyL= dyH=0) [Range] If this command is input in standard mode, the printer executes only internal flag operation. [Notes] This command does not affect printing in standard mode.
Confidential BTP-R180II Programming Manual 1B 24 64 00(set absolute horizontal starting position to be 100/203 inches) 0A(newline) 1B 24 00 00(set absolute horizontal starting position to be starting point) 1B 5C 32 00(set relative horizontal starting position to be 50/203 inches)...
Confidential BTP-R180II Programming Manual 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. 2) When the starting position is set to the upper right or lower left of the printable area using ESC T, the vertical motion unit (y) is used.
Confidential BTP-R180II Programming Manual This command does not affect printing in page mode. If the setting exceeds the printable area, the maximum value of the printable area is used. The horizontal and vertical motion units are specified by GS P. Changing the horizontal and vertical motion unit does not affect the current left margin.
Confidential BTP-R180II Programming Manual 1) When the print starting position is set to the upper left (Printing direction from left to right)or lower right(Printing direction from right to left) of the printing area by ESC T: Commands using x: ESC SP, ESC $, ESC W, ESC \, FS S...
Confidential BTP-R180II Programming Manual · GS ! can also select character size. However, the setting of the last received command is effective. [Default] n = 0 [Reference] ESC -, ESC E, GS ! [Example] 1B 40(Initialize printer) 1B 21 00(Select normal print mode)...
Confidential BTP-R180II Programming Manual When the user-defined character set is canceled, the internal character set is automatically selected. n is available only for the least significant bit. n = 0 [Default] [Reference] ESC &, ESC ? ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]...
Confidential BTP-R180II Programming Manual × · When compressed ASCII font (9 17) is selected ESC – n Turn underline mode on/off [Function] ASCII [Format] 2D n Decimal 45 n 0 ≤ n ≤2, 48 ≤n ≤ 50 [Range] Turn underline mode on or off, based on the following values of n:...
Confidential BTP-R180II Programming Manual · Changing the character size does not affect the current underline thickness. · Underline mode can also be turned on or off by using ESC !. Note, however, that the last received command is effective. n = 0...
Confidential BTP-R180II Programming Manual 42 42 42 42 42 0A Results: ESC G n Turn on/off double-strike mode [Function] ASCII [Format] 47 n Decimal 71 n 0 ≤ n ≤ 255 [Range] · When the LSB of n is 0, double-strike mode is turned off.
Confidential BTP-R180II Programming Manual Select an international character set n from the following table: [Notes] Character set U.S.A France Germany Denmark I Sweden Italy Spain I Japan Norway Denmark II Spain II Latin America Korea n = 0 [Default] ESC V n Turn 90°...
Confidential BTP-R180II Programming Manual GS ! n Select character size [Function] ASCII [Format] Decimal 0 ≤ n ≤ 255 [Range] (1 ≤ vertical number of times ≤ 6, 1 ≤ horizontal number of times ≤ 6) Select the character height using bits 0 to 3 and select the character width using bits 4 to 7...
Confidential BTP-R180II Programming Manual Refer to ESC ! [Example] GS B n Turn white/black reverse printing mode [Function] ASCII [Format] Decimal 0 ≤ n ≤ 255 [Range] When the LSB of n is 0, white/black reverse mode is turned off.
Page 35
Confidential BTP-R180II Programming Manual Decimal Function 0, 1 Undefined Double-width mode is OFF Double-width mode is ON Double-height mode is OFF. Double-height mode is ON Undefined Underline mode is OFF Underline mode is ON When both double-width and double-height modes are set (including right-side and [Notes] left-side character spacing), quadruple-size characters are printed.
Confidential BTP-R180II Programming Manual Turn underline mode for Chinese characters on or off, based on the following values of n. [Notes] Function 0, 48 Turn off underline mode for Chinese characters 1, 49 Turn on underline mode for Chinese characters (1-dot thick)
Confidenti P-R180II Pro ogramming g Manual [Reference e] FS C The relat ionship betw ween user-d defined Chin ese font and d data: FS C n Select J Japanese ch haracter mod [Function] ASCII [Format] Decima 0 ≤ n ≤ 1 , 48 ≤...
Confidential BTP-R180II Programming Manual · The horizontal and vertical motion units are set by GS P. The previously specified character spacing does not change even if the horizontal or vertical motion unit is changed by GS P. · In standard mode, the horizontal motion unit is used.
Page 39
Confidential BTP-R180II Programming Manual 1B 2A m nL nH d1...dk Decimal 27 42 m nL nH d1...dk m = 0, 1, 32, 33 [Range] 0 ≤ nL ≤ 255 0 ≤ nH ≤ 3 0 ≤ d ≤255 Select a bit-image mode using m with the number of dots specified by nL and nH, as...
Confidential BTP-R180II Programming Manual When 24-dot bitmap is selected: GS # n Specify a number for the bit-image to be downloaded. This number is to be used when [Function] downloading and printing this bit-image. ASCII [Format] 23 n Decimal 33 n 0 ≤...
Confidential BTP-R180II Programming Manual x y d1...d(x × y × 8) Decimal x y d1...d(x × y × 8) 1 ≤ x ≤ 255, 1 ≤ y ≤ 48 [Range] x × y ≤ 912 0 ≤ d ≤ 255 [Description] ·...
Confidential BTP-R180II Programming Manual Decimal 1 ≤ n ≤ 255 [Range] 0 ≤ m ≤ 3, 48 ≤ m ≤51 Print a NV bitmap in the mode specified by m. [Notes] Mode Vertical Resolution (DPI) Horizontal Resolution (DPI) 0.48 Normal 1.49...
Page 44
Confidential BTP-R180II Programming Manual · Frequent execution of the command may damage the NV memory. Therefore, it is recommended to write the NV memory 10 times or less a day. ·This command cancels all NV bitmaps that have already been defined by this command.
Confidential BTP-R180II Programming Manual · The download area in Flash of this printer is a maximum of 64K bits (8K bytes). This command can define several NV bitmaps, but cannot define a bitmap data whose total capacity [bitmap data + header] exceeds 64K bits (The download area is different according to different configuration).
Confidential BTP-R180II Programming Manual printed. • The settings are still valid after printer powering on again. FS ( E pL pH fn m c (fn = 61) Transmit the settings information for top/bottom bitmap printing. [Function] ASCII FS ( E pL pH fn m c...
Confidential BTP-R180II Programming Manual ASCII FS ( E pL pH fn m kc1 kc2 a n [Format] 1C 28 45 pL pH fn m kc1 kc2 a n Decimal 28 40 69 pL pH fn m kc1 kc2 a n (pL + pH ×...
Confidential BTP-R180II Programming Manual Right justification • The settings are still valid after printer powering on again. • This command is only valid under line mode, it is invalid under page mode. FS ( E pL pH fn m a n(fn = 65) Enable/disable top/bottom bitmap printing.
Page 49
Confidential BTP-R180II Programming Manual · The printer transmits the current status. Each status is represented by one-byte data. · The printer transmits the status without confirming whether the host computer can receive data. · The printer executes this command upon receiving it.
Confidential BTP-R180II Programming Manual Fixed to 0 Temperature of print head is normal Temperature of print head is abnormal Fixed to 0 n = 4: Paper feeding status Decimal Function Fixed to 0 Fixed to 1 Non-paper near status Paper near end status...
Confidential BTP-R180II Programming Manual Not used. Fixed to 0. Drawer kick-out connector pin 3 is LOW. Drawer kick-out connector pin 3 is HIGH. On-line. Off-line. Not used. Fixed to 1. Cover is closed. Cover is open. Paper is not being fed by using the PAPER FEED button.
Confidential BTP-R180II Programming Manual ASCII [Format] Decimal 1 ≤ n≤ 2, 49 ≤ n ≤ 50 [Range] Transmit the status specified by n as follows: [Notes] Function 1, 49 Transmit paper sensor status 2, 50 Transmit drawer kick-out connector status This command is valid for serial, bi-direction parallel and USB interface printer.
Confidential BTP-R180II Programming Manual 0, 48 Not printed 1, 49 Above the barcode 2, 50 Below the barcode 3, 51 Both above and below the barcode HRI refers to the character which applies notes to barcodes. HRI character font is specified by GS f.
Page 54
Confidential BTP-R180II Programming Manual 0 ≤ m ≤ 6 ( The range of k and d depends on the barcode type used) ① [Range] 65 ≤ m ≤ 73 ( The range of n and d depends on the barcode type used) ②...
Page 55
Confidential BTP-R180II Programming Manual D: Link structure mode, input specific mark symbol”D”. This mode is optional and the following three parameters and separator should be assigned if this mode is selected. aa: The position of the specific symbol; input 2 bytes decimal data bb: The total number of the symbols;...
Page 56
Confidential BTP-R180II Programming Manual (5) The character strings Legal character: alphabet and numbers; Length of variable: changeable; Legal length of the bar: The ratio of the bar is not changeable. Example: 1D 6B 0C 33 32 37 38 39 35 35 35 35 38 34 30 36 36 36 54 48 49 53 20 50 41 43 4B 41 47 45 49 53 20 47 4F 49 4E 47 20 54 4F 20 44 41 54 41 4D 41 58 43 4F 52 50 2E ②...
Confidential BTP-R180II Programming Manual • n7 indicates the content of the note character Parameter Note character DataBar and 2D in composite barcode DataBar only in separate barcode Print DataBar in composite or separate barcode Print 2D in composite barcode, no print in separate barcode No note character •...
Confidential BTP-R180II Programming Manual GS q n Set correction grade of barcode PDF417 [Function] ASCII [Format] Decimal 0≤ n ≤8 [Range] Set correction grade of PDF417 code, the higher the correction grade is, the bigger the [Notes] capacity of the barcode is.
Page 63
Confidential BTP-R180II Programming Manual 1D 28 7A nL nH 30 53 Decimal 29 40 122 nL nH 48 83 nL = 2 nH = 0 [Range] · The difference between upside-down command and ESC { n upside-down printing: this [Notes] upside-down printing command can print the note upside down, while ESC { n can only print the character line upside down.
Confidential BTP-R180II Programming Manual Command Function Automatically back to state DLE ENQ Real-time request DLE DC4 Real-time cash drawer pulse Back to state Produce cash drawer control pulse Steps to enter upside-down printing mode through command: Send command of entering upside-down printing mode;...
Confidential BTP-R180II Programming Manual A definition data of a NV bitmap consists of [yL yH zL zH d1...dk]. Therefore, when only one NV bitmap is defined, n=1. The printer uses ([data:( yL + yH × 256)×( zL+ zH × 256)...
Confidential BTP-R180II Programming Manual ·If the defined RAM grayscale bitmap is beyond the max capacity of RAM128kB, this command is disabled. ·The downloaded RAM grayscale bitmap is cleared when printer is powered off. ·Format of the grayscale bitmap: every dot line of grayscale image is indicated by four dot lines of data.
Confidential BTP-R180II Programming Manual 2.12 Other commands ESC c : n Choose paper-saving mode and reduce ticket width [Function] ASCII [Format] Decimal 0 ≤ n ≤ 4 [Range] • Paper-saving function refers to vertical compression according to a proportionality factor [Notes] set by user to reach the goal of saving paper.
Confidential BTP-R180II Programming Manual DLE DC4 n m t Generate pulse at real-time to open cash drawer [Function] ASCII [Format] Decimal n = 1 [Range] m = 0, 1 1 ≤ t≤ 6 Output the pulse specified by the connector pin m as follows:...
Confidential BTP-R180II Programming Manual • In page mode, this command functions as follows, depending on the direction and starting position of the printable area: 1) When the starting position is set to the upper left or lower right of the printable area by ESC T, the vertical motion unit (y) is used.
Confidential BTP-R180II Programming Manual 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. • This command sets the position where data is buffered to the position specified by ESC T within the printing area defined by ESC W.
Confidential BTP-R180II Programming Manual [Reference] FF, ESC FF, ESC L ESC c 0 n Select the paper type [Function] ASCII [Format] 63 30 n Decimal 99 40 n 0 ≤ n ≤ 2 [Range] n = 0, set paper type as continuous paper roll.
Confidential BTP-R180II Programming Manual ESC c 4 n Select paper sensor(s) to stop printing [Function] ASCII [Format] 63 34 n Decimal 99 52 n 0 ≤ n ≤ 255 [Range] n is defined as below: [Notes] Decimal Function Paper near end sensor disabled...
Page 75
Confidential BTP-R180II Programming Manual GS ( A pL pH n m Execute test printing. [Function] ASCII GS ( pL pH n [Format] 1D 28 41 pL pH n Decimal 29 40 65 pL pH n ( pL+( pH × 56))=2 (pL=2, pH=0) [Range] 0 ≤...
Confidential BTP-R180II Programming Manual ① ② GS V m GS V m n Select cut paper mode and cut paper. [Function] ASCII ① [Format] Decimal ASCII ② Decimal 0 ≤ m ≤ 1, 48≤m ≤ 49 ① [Range] ② m = 66, 0 ≤n ≤255...
Confidential BTP-R180II 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 the printer is powered on and can be directly sent to inquiry the status.
Confidential BTP-R180II Programming Manual Appendix 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, the one hundred numbers from 00 to 99 and some special characters with three code sets: A, B and C. Each code set is used for representing the following characters: ·...
Page 79
Confidential BTP-R180II 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...
Page 80
Confidential BTP-R180II Programming Manual Printable characters in code set B 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...
Page 81
Confidential BTP-R180II Programming Manual Printable characters in code set C 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 - 74 -...
Confidential BTP-R180II Programming Manual Appendix B: Print mode and its change B.1 General Description The printer operates in two print modes: standard mode and page mode. In standard mode, the printer prints and feeds paper each time it receives print data or paper feed commands. In page mode, all the received print data and paper feed commands are processed in the specified memory, and the printer executes no operation.
Page 83
Confidential BTP-R180II Programming Manual printable area. The print position, therefore, moves to the beginning of the next line. The line feed amount depends on the values set by commands (such as ESC 2 and ESC 3). 4) The default value of the line spacing is set to 1/6 inch and corresponds to 31 dots in the vertical direction.
Page 84
Confidential BTP-R180II Programming Manual Print Data Developing Position Downloaded Bit Image Developing Position - 77 -...
Confidential BTP-R180II Programming Manual Appendix C: Control Sequences Code Function Print and line feed Print all data in the print buffers and return to the standard mode When the command is enabled, it equals to LF ESC FF Print data in page mode...
Page 86
Confidential BTP-R180II Programming Manual GS # n Specify a number for the bit-image to be downloaded. GS * x y d1...d(x × y × 8) Define the bit-image to be downloaded GS / m Print downloaded bitmap GS v 0 m xL xH yL yH d1..dk...
Page 87
Confidential BTP-R180II Programming Manual ESC c 3 n Select paper sensor(s) to output paper end signals ESC c 4 n Select paper sensor(s) to stop printing ESC c 5 n Enable/disable panel buttons ESC p m t1 t2 Output the cash drawer control pulse to specified connector pin...