Summary of Contents for Shandong New Beiyang Information Technology Co. BTP-R980
Page 1
BTP-R980 Programming Manual CONFIDENTIAL PROGRAMMING MANUAL Receipt Printer BTP-R980 Shandong New Beiyang Information Technology Co., Ltd.
Page 2
BTP-R980 Programming Manual REVISION HISTORY Date Version Description Drafted by 2012-2-8 V1.00 Primary version Qi Guowei 2013-3-18 V1.01 Add auto bitmap command Qi Guowei - 1 -...
Page 3
BTP-R980 Programming Manual Declaration If you need this manual, please comply with the clause below. If you disagree with it, please return this manual immediately. This manual contains the private confidential information belonging to Shandong New Beiyang Information Technology Co., Ltd. (hereinafter referred to as SNBC). You must keep its relative content as the confidential information.
Page 5
BTP-R980 Programming Manual ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] ................. - 19 - ESC – n.............................. - 21 - ESC ? n ............................. - 21 - ESC E n ............................. - 22 - ESC G n............................. - 22 - ESC M n ............................
Page 6
BTP-R980 Programming Manual FS ( E pL pH fn m kc1 kc2 a n(fn = 62) ..................- 41 - FS ( E pL pH fn m kc1 kc2 a (fn = 63) ................... - 41 - FS ( E pL pH fn m a n(fn = 65)....................... - 42 - 2.6 Status command ..........................
Page 7
BTP-R980 Programming Manual 2.13 Voice command ..........................- 64 - GS . B E . . A n m d1 d2 d3 ...d(k)(n = 0) ................... - 64 - GS . B E . . A n m (n = 1)........................- 65 - GS .
BTP-R980 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.
BTP-R980 Programming Manual l 1.3 Command format [Function] The name and function summary of commands; [Format] The format of command data, such as ASCII, Hex and Decimal; [Range] The value range of parameter in the command; [Note] Explain the main features and application notices of commands;...
BTP-R980 Programming Manual l 2 Command Description 2.1 Print command [Function] Print and line feed [Format] ASCII Decimal [Note] This command sets the print position to the beginning of the line. [Relative] ESC 2, ESC 3 [Function] Print all data in the print buffers and return to the standard mode.
BTP-R980 Programming Manual l ESC J n [Function] Print and feed paper [Format] ASCII Decimal 0 ≤n ≤ 255 [Range] [Notes] After printing is completed, this command sets the print starting position to the beginning of the line. The paper feed amount set by this command is not affected by the values set by ESC 2 or ESC 3.
BTP-R980 Programming Manual l • 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. [Relative] ESC 2, ESC 3 [Example] 1B 40(initialize printer) 41 41 41 41 41 41 41(data to be printed)
BTP-R980 Programming Manual l 1 ≤ n ≤ 255 [Range] 0 ≤ k ≤ 32 • The horizontal tab position is stored as a value of [character width × n] measured from [Notes] the 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.
Page 15
BTP-R980 Programming Manual l • Parameters for horizontal or vertical motion units (x or y) differ as follows, depending on the starting position of the printing area: If the starting position is the upper left or lower right of the printing area, data is...
BTP-R980 Programming Manual l • When pitch N is specified to the right: nL+ nH × 256 = N • When pitch N is specified to the left (the negative direction), use the complement of 65536. • When pitch N is specified to the left: nL+ nH × 256 = 65536 - N •...
BTP-R980 Programming Manual l • This command is effective only when processed at the beginning of the line in standard [Notes] mode. • If this command is input in page mode, it is disabled. • This command does not affect printing in page mode.
BTP-R980 Programming Manual l • When x and y are set to 0, the default setting of each value is used. [Notes] • The horizontal direction is perpendicular to the paper feed direction and the vertical direction is the paper feed direction.
BTP-R980 Programming Manual l • This command does not affect the printing in page mode. • If the [left margin + printing area width] exceeds the printable area, [printable area width - left margin) is used. • The horizontal and vertical motion units are specified by GS P. Changing the horizontal and vertical motion units does not affect the current left margin or print area width.
BTP-R980 Programming Manual l If the previously specified printing data also exists in the currently specified printing area, it is deleted. [Relative] ESC L, ESC W [Example] 1B 40(Initialization ) 1D 50 CB CB(Setting resolution 203× 203) 1B 4C (Enter page mode)
BTP-R980 Programming Manual l • When characters are enlarged, the right-side character spacing is enlarged the same times. • This command sets values independently in each mode (standard and page modes) • The horizontal and vertical motion units are specified by GS P. Changing the horizontal or vertical motion unit does not affect the current right-side spacing.
Page 25
BTP-R980 Programming Manual l Double-height mode not selected Double-height mode selected Double-width mode not selected Double-width mode selected Undefined Underline mode not selected Underline mode selected • When both double-height and double-width modes are selected, quadruple size characters are printed.
BTP-R980 Programming Manual l ESC % n [Function] Select/cancel user-defined character set [Format] ASCII ESC % Decimal 0 ≤ n ≤255 [Range] [Notes] When the LSB of n is 0, the user-defined character set is canceled. When the LSB of n is 1, the user-defined character set is selected.
Page 27
BTP-R980 Programming Manual l • It is possible to define multiple characters for consecutive character codes. If only one character is desired, use c1 = c2. • d is the data for downloaded characters. The dot pattern is in the horizontal direction from the left side.
BTP-R980 Programming Manual l ESC – n [Function] Turn underline mode on/off [Format] ASCII 2D n Decimal 45 n 0 ≤ n ≤2, 48 ≤n ≤ 50 [Range] [Notes] Turn underline mode on or off, based on the following values of n:...
BTP-R980 Programming Manual l [Notes] This command cancels the pattern defined for the character code specified by n. After the user-defined characters are canceled, the corresponding pattern for the internal character is printed. If a user-defined character has not been defined for the specified character code, the printer ignores this command.
BTP-R980 Programming Manual l [Example] See ESC E ESC M n [Function] Select character font [Format] ASCII 4D n Decimal 77 n 0 ≤ n ≤3, 48 ≤n ≤ 51 [Range] Function 0,48 Standard ASCII Font (12 × 24) selected 1,49 Compressed ASCII font (9 ×...
BTP-R980 Programming Manual l Spain II Latin America Korea [Default] n = 0 ESC V n [Function] Turn 90° clockwise rotation mode on/off [Format] ASCII ESC V 56 n Decimal 86 n 0 ≤ n ≤ 1, 48 ≤ n ≤ 49...
BTP-R980 Programming Manual l GS ! n [Function] Select character size [Format] ASCII Decimal 0 ≤ n ≤ 255 (1 ≤ vertical number of times ≤ 6, 1 ≤ horizontal number of times ≤ 6) [Range] [Notes] Select the character height using bits 0 to 3 and select the character width using bits 4 to...
BTP-R980 Programming Manual l GS B n [Function] Turn white/black reverse printing mode [Format] ASCII Decimal 0 ≤ n ≤ 255 [Range] [Notes] 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.
Page 36
BTP-R980 Programming Manual l 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. • The printer can underline all characters (including right- and left-side character spacing), but cannot underline the space set by HT and 90°...
BTP-R980 Programming Manual l • The printer can underline all characters (including right- and left-side character spacing), but cannot underline the space set by HT and 90° clockwise-rotated characters. • After the underline mode for Chinese characters is turned off, underline printing is no longer performed, but the previously specified underline thickness is not changed.
BTP-R980 Programming Manual l FS C n [Function] Select Japanese character mode. [Format] ASCII FS C Hecimal 28 67 0 ≤ n ≤ 1, 48 ≤ n ≤ 49 [Range] [Notes] Select Japanese character mode according to the values of n:...
BTP-R980 Programming Manual l • When double-width mode is selected, the left- and right-side character spacing is twice the normal value. • 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.
BTP-R980 Programming Manual l When 24-dot bitmap is selected: ESC # n [Function] Specify a number for the bitmap to be downloaded. This number is to be used when downloading and printing this bitmap. [Format] ASCII 23 n Decimal 33 n 0 ≤...
BTP-R980 Programming Manual l [Relative] GS / GS / m [Function] Print downloaded bitmap [Format] ASCII Decimal 0 ≤ m ≤ 3, 48 ≤ m ≤ 51 [Range] [Description] Print a downloaded bitmap with the print mode specified by m.
BTP-R980 Programming Manual l Decimal 1 ≤ n ≤ 255 [Range] 0 ≤ m ≤ 3, 48 ≤ m ≤51 [Notes] Print a NV bitmap in the mode specified by m. Mode Vertical Resolution (DPI) Horizontal Resolution (DPI) 0.48 Normal 1.49...
Page 45
BTP-R980 Programming Manual l • yL, yH specifies ( yL + yH × 256) × 8 dots in the vertical direction for the NV bitmap. • 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.
BTP-R980 Programming Manual l • 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 w hose total capacity [bitmap data + header] exceeds 64K bits (The download area is different according to different configuration).
BTP-R980 Programming Manual l Cancels the settings for bottom bitmap printing. • After canceling the settings for auto top/bottom bitmap printing, this bitmap will not be printed. • The settings are still valid after printer powering on again. FS ( E pL pH fn m c (fn = 61) [Function] Transmit the settings information for top/bottom bitmap printing.
BTP-R980 Programming Manual l FS ( E pL pH fn m kc1 kc2 a n(fn = 62) [Function] Set the bitmap number and alignment method for top bitmap. [Format] ASCII FS ( E pL pH fn m kc1 kc2 a n...
BTP-R980 Programming Manual l Function Left justification Centering 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) [Function] Enable/disable top/bottom bitmap printing.
Page 50
BTP-R980 Programming Manual l • n = 4: Transmit paper sensor status • when the printer receives the command, it returns relative status immediately. [Notes] • Even though the printer is not selected by ESC = (select peripheral device), this command is effective.
BTP-R980 Programming Manual l Auto-cutter error occurs. Fixed to 1. Fixed to 0. Temperature of print head is normal. Temperature print head abnormal. Fixed to 0. n = 4: Paper feeding status Decimal Function Fixed to 0. Fixed to 1.
Page 52
BTP-R980 Programming Manual l • Status information returned back is as following: First byte (Printer information) Off/On Decimal Printer status Not used. Fixed to 0. Not used. Fixed to 0. Drawer kick-out connector pin 3 is LOW. Drawer kick-out connector pin 3 is HIGH.
BTP-R980 Programming Manual l Off/On Decimal Status for ASB Undefined. Not used. Fixed to 0. Undefined. Not used. Fixed to 0. GS r n [Function] Status back [Format] ASCII Decimal 1 ≤ n≤ 2, 49 ≤ n ≤ 50 [Range]...
BTP-R980 Programming Manual l [Format] ASCII Decimal 0 ≤ n ≤ 3, 48 ≤ n ≤ 51 [Range] [Notes] n specifies the printing position for HRI as follows: Printing position 0, 48 Not printed. 1, 49 Above the barcode. 2, 50 Below the barcode.
BTP-R980 Programming Manual l ①GS k m d1...dk NUL②GS k m n d1...dn [Function] Select a barcode type and print barcode ①ASCII [Format] d1...d k NUL d1...d k 00 Decimal d1...d k 0 ②ASCII d1... dn d1... dn Decimal d1... dn ①0 ≤...
Page 56
BTP-R980 Programming Manual l • When UPC-A or UPC-E is selected, the characters after the first 12 bytes will be processed as normal characters after receiving12 bytes of barcode data. • When JAN13 (EAN13) is selected, the characters after the first 13 bytes will be processed as normal characters after receiving 13 bytes of barcode data.
Page 57
BTP-R980 Programming Manual l 1D 6B 0B 51 41 2C 30 31 32 33 34 35 36 37 38 39 41 42 43 44 20 32 44 20 63 6F 64 65 00(Automatic mode is recommended and the character symbol A can be omitted)
Page 58
BTP-R980 Programming Manual l [Notes in page mode] • This command develops bar code data in the print buffer, but does not print it. After processing barcode data, this command moves the print position to the right side dot of the barcode.
Page 59
BTP-R980 Programming Manual l • The printer does not print HRI characters that correspond to the shift characters or code set selection characters. • HRI characters for the function characters are not printed. • HRI characters for the control characters (<00>H to <1F>H and <7F>H) are not printed.
BTP-R980 Programming Manual l • n5 indicates the height of the separator. This parameter should be set in DataBar composite barcode or separate stacked, stacked omnidirectional, expanded stacked barcodes. • n6 indicates the number of segments of each line of barcode. Only in expanded stacked barcodeshould this parameter be set.
BTP-R980 Programming Manual l 1≤nE ≤7 2≤nF ≤25 [Description]The meaning of parameter n is shown as below: Parameter Meaning Appearance to height Appearance to width Lines limit Columns limit X size line height GS q n [Function] Set correction grade of barcode PDF417...
BTP-R980 Programming Manual l GS ( N pL pH fn a [Function] bi-color print setting command, set to enter/exit bi-color mode and print color. [Format] ASCII GS ( pL pH fn 1D 28 4E pL pH fn Hecimal 27 67 n...
Page 65
BTP-R980 Programming Manual l Command Function Start / end macro definition Perform macro definition Set horizontal tab position Define NV bitmap Select printer GS ( Perform testing print ESC c Greyscale print function Note: Although FS q command is not supported under upside-down printing mode, FS p command is supported.
BTP-R980 Programming Manual l • n4 indicates watermark greyscale and luminosity adjustment, recommended value 0x20. • n5 indicates the number of bitmap( defined by FS q command). • This command should be used at the beginning of each line, otherwise it is disabled.
Page 68
BTP-R980 Programming Manual l 0 ≤ d ≤ 255 k = ( yL + yH × 256) × ( zL + zH × 256) × 8 • The max capacity of Flash download is decided by the configuration of the printer, which [Notes] can be checked through printing self-test page.
BTP-R980 Programming Manual l • Format of the greyscale bitmap: every dot line of greyscale image is indicated by four dot lines of data. The four dot lines of data form different rank correlation of the greyscale bitmap. The table below shows the greyscale rank of a dot and the data of the four dot lines of data.
BTP-R980 Programming Manual l • Format of the greyscale bitmap: every dot line of greyscale image is indicated by four dot lines of data. The four dot lines of data form different rank correlation of the greyscale bitmap. The table below shows the greyscale rank of a dot and the data of the four dot lines of data.
BTP-R980 Programming Manual l DLE ENQ n [Function] Real-time request to printer [Format] ASCII Decimal 1 ≤n ≤ 2 [Range] [Note] n specifies the requests as follows: Request Recover from an error and restart printing from the line where the error occurred.
BTP-R980 Programming Manual l • This command is effective even when the printer is disabled with ESC = (Select peripheral device). • Do not insert the command into the data sequence of 2 or more bytes. [Relative] ESC p ESC 2 [Function] Select default line spacing to 1/6 inch (about 4.23mm)
BTP-R980 Programming Manual l [Description]The meaning of n is as follows: Decimal Function Printer disabled. Printer enabled. Undefined. [Notes] When the printer is disabled, it ignores all commands except for real-time commands (DLE EOT, DLE ENQ, DLE DC4) until it is enabled by this command.
BTP-R980 Programming Manual l 5) Set printable area width: GS W • The printer returns to standard mode when power is turned on, the printer is reset, or ESC @ is used. [Relative] FF, CAN, ESC FF, ESC S, ESC T, ESC W, GS $, GS \...
BTP-R980 Programming Manual l [Default] n = 0 [Relative] GS FF ESC c 3 n [Function] Select paper sensor(s) to output paper end signals [Format] ASCII 63 33 n Decimal 99 51 n 0 ≤ n ≤ 255 [Range] • Each bit of n is used as follows:...
BTP-R980 Programming Manual l Paper near end sensor enabled Paper near end sensor disabled Paper near end sensor enabled Undefined When either bit 0 or 1 is on (value is 1), paper near-end sensor is enabled, and when the printer detects paper near end, it stops printing after completing the current task.
BTP-R980 Programming Manual l Decimal 29 ②.ASCII GS Decimal 29 ① [Range] ② m = 66, 0 ≤n ≤255 [Notes] m selects cut paper mode as follows: Cut paper mode 0,48 Full cut 1,49 Half cut Feed([n ×(vertical motion unit)inches] (feed paper)and half cut •...
BTP-R980 Programming Manual l 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.
BTP-R980 Programming Manual l 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 84
BTP-R980 Programming Manual l 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 85
BTP-R980 Programming Manual l 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 86
BTP-R980 Programming Manual l 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 - 79 -...
BTP-R980 Programming Manual l 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 88
BTP-R980 Programming Manual l a command (e.g., LF or ESC J) that includes line feeding, a line feed is executed automatically within the 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).
Page 89
BTP-R980 Programming Manual l Figure B.3 Print Data Developing Position Figure B.4 Downloaded Bitmap Developing Position - 82 -...
BTP-R980 Programming Manual l Appendix C: Control Sequences Code Function Horizontal tab Print and line feed Print and paper feed Print and carriage return Cancel print data in page mode DLE EOT Real-time status transmission DLE ENQ Real-time request to printer...
Page 91
BTP-R980 Programming Manual l GS * Define downloaded bit image GS / Print downloaded bit image GS : Start/end macro definition GS B Turn white/black reverse printing mode on/off GS H Select printing position of HRI characters GS L Set left margin...
Need help?
Do you have a question about the BTP-R980 and is the answer not in the manual?
Questions and answers