Page 2
Confidential BTP-R880NP Programming Manual REVISION HISTORY Date Version Description Drafted by Ding Jinfeng, Cao 2010-7-13 V100 Release Yongkang - 1 -...
Page 3
When you terminate the cooperation with ORIENT Technologies and SNBC or bring about your request, you have to stop using this manual and return it to ORIENT Technologies or SNBC, or destroy the confidential information.
Page 5
Confidential BTP-R880NP Programming Manual ESC SP n .................................. 17 ESC ! n ..................................18 ESC % n ................................... 21 ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] .................... 21 ESC – n ..................................23 ESC ? n ..................................24 ESC E n ..................................
Page 6
Confidential BTP-R880NP Programming Manual ESC r n enter /exit bi-colour print mode ........................56 ESC C n select print colour ............................57 2.8 I ............................57 NVERT PRINT COMMAND GS ( z nL nH 0 S enter upside-down printing mode ....................57 GS ( z nL nH 0 E print sample data and exit upside-down printing mode ...............
Confidential BTP-R880NP 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.
Confidential BTP-R880NP Programming Manual 1.3 Command format The name and function summary of commands; [Function] The command expressed in ASCII, Hex and Decimal separately. If not specified, the [Format] value in “range” part is decimal. For instance, in range” 1 ≤ n≤ 4”, ‘1’ is not an ASCII code but a decimal number;...
Confidential BTP-R880NP 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] [Relevant command] ESC 2, ESC 3 Print all data in the print buffers and return to the standard mode.
Confidential BTP-R880NP Programming Manual · This command is enabled only in page mode. [Notes] · After printing, the printer does not clear the buffered data, setting values for ESC T and ESC W, and the position for buffering character data.
Confidential BTP-R880NP Programming Manual ESC d n Print and feed n lines [Function] ASCII [Format] Decimal 0 ≤n ≤ 255 [Range] · 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.
Confidential BTP-R880NP Programming Manual • When current buffer is full, the printer shall execute the actions as below: In standard mode, the printer shall print current line and set the print position to the beginning of next line; • In page mode, the printer shall shift the line and set the print position to the beginning of next line.
Confidential BTP-R880NP Programming Manual of the printable area as follows: 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. 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.
Page 14
Confidential BTP-R880NP Programming Manual [Range] 0 ≤ n ≤ 3 48 ≤ n ≤ 51 n print direction and starting position: [Notes] · When the command is input in standard mode, the printer executes only internal flag operation. This command does not affect printing in standard mode.
Page 16
Confidential BTP-R880NP Programming Manual printing area width is automatically set to (horizontal printable area horizontal starting position). · If (vertical starting position + printing area height) exceeds the printable area, the printing area height is automatically set to (vertical printable area – vertical starting position).
Confidential BTP-R880NP Programming Manual ESC \ nL nH Sets the print starting position based on the current position by using the horizontal or [Function] vertical motion unit. · This command sets the distance from the current position to [(nL + nH × 256) ×...
Page 18
Confidential BTP-R880NP Programming Manual 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 [Range] n selects the justification as follows: Justification Left justification Centering Right justification • This command is enable only when processed at the beginning of the [Notes] line in the standard mode.
Confidential BTP-R880NP 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-R880NP Programming Manual T: Commands using x: ESC SP, ESC $, ESC W, ESC \, FS S Commands using y: ESC 3, ESC J, ESC W, GS $, GS \, GS V 2) When the print starting position is set to the upper right(Printing direction from top to down) or lower left (Printing direction from down to top)of the printing area using ESC T:...
Confidential BTP-R880NP Programming Manual • The horizontal and vertical motion unit are specified by GS P. Changing the horizontal or vertical motion unit does not affect the current right-side spacing. • In standard mode, the horizontal motion unit is used.
Page 25
Confidential BTP-R880NP Programming Manual Emphasized mode not selected Emphasized mode selected 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.
Confidential BTP-R880NP Programming Manual ESC % n Select/cancel user-defined character set [Function] ASCII ESC [Format] Decimal 0 ≤ n ≤255 [Range] • When the LSB of n is 0, the user-defined character set is canceled. [Notes] • When the LSB of n is 1, the user-defined character set is selected.
Page 28
Confidential BTP-R880NP Programming Manual 2)The power is turned off. The internal character set [Default] [Reference] ESC %, ESC ? × • When standard ASCII font (12 24) is selected [Example] × • When compress ASCII font (9 17) is selected...
Confidential BTP-R880NP Programming Manual ESC – n Turn underline mode on/off [Function] ASCII ESC - [Format] Decimal 0 ≤ n ≤2, 48 ≤n ≤ 50 [Range] Turns underline mode on or off, based on the following values of n: [Notes]...
Confidential BTP-R880NP Programming Manual • When underline mode is turned off, the following data is not underlined, and the underline thickness set before the mode is turned off does not change. The default underline thickness is 1 dot. • Changing the character size does not affect the current underline thickness.
Confidential BTP-R880NP Programming Manual • 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. • Only the least significant bit of n is enabled.
Confidential BTP-R880NP Programming Manual Denmark II Spain II Latin America Korea n = 0 [Default] ESC V n Turn 90° clockwise rotation mode on/off [Description] ASCII ESC [Format] Decimal 0 ≤ n ≤ 1, 48 ≤ n ≤ 49 [Range] n is used as follows::...
Confidential BTP-R880NP 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) Selects the character height using bits 0 to 2 and selects the character width using bits 4...
Confidential BTP-R880NP Programming Manual However, the setting of the last received command is effective. n = 0 [Default] [Reference] ESC ! Refers to ESC ! [Example] GS B n Turn white/black reverse printing mode [Function] ASCII [Format] Decimal 0 ≤ n ≤ 255 [Range] Turns on or off white/black reverse printing mode.
Confidential BTP-R880NP Programming Manual [Description] Sets the print mode for Kanji characters, using n as follows: Decimal Status for ASB 0, 1 Undefined Double-width mode is OFF Double-width mode is ON Double-height mode is OFF. Double-height mode is ON Undefined...
Confidential BTP-R880NP Programming Manual [Description] Turns underline mode for Kanji characters on or off, based on the following values of n. Function 0, 48 Turns off underline mode for Kanji characters 1, 49 Turns on underline mode for Kanji characters (1-dot thick)
Confidential BTP-R880NP Programming Manual [Description] c1 and c2 indicate character codes for the defined characters. c1 specifies for the first byte, and c2 for the second byte. d indicates the dot data. Set a corresponding bit to 1 to print a dot or to 0 to not print a dot.
Confidential BTP-R880NP Programming Manual Coding mode 0,48 JIS code 1,49 SHIFT JIS code • This commmand is valid only under Japanese character mode. • Under JIS code mode, the following character codes are valid: First byte: <21>H to <7E>H Second byte: <21>H to <7E>H •...
Confidential BTP-R880NP Programming Manual FS W n Turn quadruple-size mode on/off for Kanji characters [Function] ASCII [Format] Decimal 0 ≤ n ≤ 255 [Range] [Description] · When the LSB of n is 0, quadruple-size mode for Kanji characters is turned off.
Page 42
Confidential BTP-R880NP Programming Manual normal data. · The nL and nH indicate the number of dots of the bitmap in the horizontal direction. The number of dots is calculated by nL + nH × 256. · If the bit-image data input exceeds the number of dots to be printed on a line, the excess data is ignored.
Confidential BTP-R880NP Programming Manual ESC # n Specify a number for the bit-image to be downloaded. [Function] ASCII [Format] 23 n Decimal 35 n 0 ≤ n ≤ 7 [Range] [Description] Specifies a number for the bit-image to be downloaded. This number is to be used when downloading and printing this bit-image.
Confidential BTP-R880NP Programming Manual [Reference] GS / GS / m Print downloaded bitmap [Function] ASCII [Format] Decimal 0 ≤ m ≤ 3, 48 ≤ m ≤ 51 [Range] [Description] Prints a downloaded bitmap using the mode specified by m. m selects a mode from the table below:...
Confidential BTP-R880NP Programming Manual · yL, yH indicate the number of data bytes ( yL+ yH × 256) in the vertical direction of the bitmap. · In standard mode, this command is effective only when there is no data in the print buffer.
Confidential BTP-R880NP Programming Manual · This command is not affected by print modes (emphasized, double-strike, underline, character size, white/black reverse printing, or 90° rotated characters, etc.), except upside-down printing mode. · If the downloaded bit-image to be printed exceeds one line, the excess data is not printed.
Page 47
Confidential BTP-R880NP Programming Manual · This 7 bytes <from FS~yH> is command data but not data of image. · When the amount of data exceeds the capacity left in the range defined by xL, xH, yL, yH, the printer processes xL, xH, yL, yH out of the defined range.
Confidential BTP-R880NP Programming Manual 2.5 Status command DLE EOT n Real-time status transmission [Function] ASCII [Format] Decimal 1 ≤ n ≤ 4 [Range] n = 1: Transmit printer status n = 2: Transmit off-line status n = 3: Transmit error status n = 4: Transmit paper roll sensor status [Description] Transmits the selected printer status specified by n in real-time.
Page 49
Confidential BTP-R880NP Programming Manual Not used. Fixed to 1 Undefined Not used. Fixed to 0. n = 2: Off-line status Decimal Function used. Fixed to used. Fixed to Cover is closed. Cover is open FEED button is not been pushed...
Confidential BTP-R880NP Programming Manual Paper near end status Not used. Fixed to 1 Paper present Paper end Not used. Fixed to 0 Please avoid to insert this command between 2 or more byte command. For Example: In the process of sending ESC 3 n to printer, DTR become to MARK(DSR is used to host) before sending n and DLE EOT 3 interrupted before receiving n, then the printer take code<10>H of DLE EOT 3 as code <10>H of ESC 3.
Confidential BTP-R880NP Programming Manual Second byte (printer information) Off/On Decimal Printer Status Undefined. Undefined. Undefined. No auto cutter error. Auto cutter error occurred. Not used. Fixed to Off. No recoverable error. Recoverable error occurred. No automatically recoverable error. Automatically recoverable error occurred.
Confidential BTP-R880NP Programming Manual · The status types to be transmitted are shown below: Paper sensor status ( n = 1, 49): Off/On Decimal Status for ASB Paper near-end sensor: paper adequate 0, 1 Paper near-end sensor: paper near end...
Page 53
Confidential BTP-R880NP Programming Manual n selects a font from the following table: Font 0,48 Font A (12 × 24) 1,49 Font B (9 × 17) · HRI indicates Human Readable Interpretation. [Notes] · HRI characters are printed at the position specified by GS H.
Confidential BTP-R880NP Programming Manual GS h n Select barcode height [Function] ASCII [Format] Decimal 1 ≤ n ≤ 255 [Range] [Description] Selects the height of the barcode. n specifies the number of dots in the vertical direction. n = 162...
Page 55
Confidential BTP-R880NP Programming Manual Bar Code type Number of Characters UPC-A 11 ≤ k ≤ 12 48 ≤ d ≤ 57 ① UPC-E 11 ≤ k ≤ 12 48 ≤ d ≤ 57,d1=48 JAN13 (EAN13) 12 ≤ k ≤ 13 48 ≤...
Page 56
Confidential BTP-R880NP Programming Manual aa: The position of the specific symbosl; input 2bytes hexadecimal data bb: The total amount of the symbols; input 2bytes hexadecimal data cc: The even and odd data; input 2bytes hexadecimal data ,: Fixed separator symbol (2) E: Error correction grade Range: L,M,Q,H.
Page 57
Confidential BTP-R880NP Programming Manual Legal character: alphabet and numbers; Length of variable: Changeble; 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...
Confidential BTP-R880NP Programming Manual GS o n Set barcode parameter of QRCODE [Function] ASCII m nA nB nC [Format] m nA nB nC Decimal m nA nB nC m = 0 ,1≤ nA ≤255 ,0≤nB≤1,1≤nC ≤2 [Range] [Description] The meaning of parameter n is shown as below:...
Confidential BTP-R880NP Programming Manual Decimal 2 ≤ n ≤ 6 [Range] [Description] Set the horizontal size of the barcode. n specifies the bar code width as follows: Binary-level Barcode Module Width (mm) for Single -level Barcode Thin element width (mm) Thick element width (mm) 0.25...
Page 64
Confidential BTP-R880NP Programming Manual • Forbid command The following commands are not supported under upside-down printing mode.If sending the followingcommands under upside-down printing mode, the printer may not be able to perform the expected result. Command Function Start / end macro definition...
Confidential BTP-R880NP Programming Manual • n4 indicates water print grayscale and luminosity adjustment, recommended value 0x20. • n5 indicates the symbol of bitmap( defined by FS q command). • This command should be used in the beginning of each row, otherwise it will be ignored.
Page 67
Confidential BTP-R880NP Programming Manual which can be checked through printing self-test page. The download FLASH bitmap should be no larger than Flash download capacity, otherwise download will fail. • n specifies the number of the defined NV bitmap • yL、 yH specifies ( yL + yH × 256) × 8 dots in the horizontal direction for the NV bitmap you are defining.
Confidential BTP-R880NP Programming Manual Once a NV bitmap is defined, it is not erased by performing ESC @, reset, and power off. · This command performs only definition of a NV bitmap and does not perform printing. Printing of the NV bitmap is performed by the FS p command Format of the greyscale bitmap: every dot line of greyscale image is indicated by four dot lines of data.
Confidential BTP-R880NP Programming Manual • This command is disabled in upside-down printing mode. If any of the related parameters is out of the specified range, this command is disabled. If the defined RAM grayscale bitmap is beyond the max capacity of RAM128kB, this command is disabled.
Confidential BTP-R880NP Programming Manual 2.11 Other commands DLE ENQ n Real-time request to printer [Function] ASCII [Format] Decimal 1 ≤n ≤ 2 [Range] n specifies the requests as follows: [Note] Request Recover from an error and restart printing from the line where the error occurred Recover from an error after clearing the receive and print buffers ·...
Confidential BTP-R880NP Programming Manual the same operation specified by this command. The user must consider this. ·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 over 2 or more bytes.
Confidential BTP-R880NP Programming Manual ASCII [Format] Decimal 0 ≤ n ≤ 1 [Range] [Description] Selects device to which host computer sends data, using n as follows: Off/On Decimal Function Printer disabled Printer enabled Undefined · When the printer is disabled, it ignores all data except for error-recovery commands [Notes] (DLE EOT, DLE ENQ, DLE DC4) until it is enabled by this command.
Confidential BTP-R880NP Programming Manual 3) Turn upside-down printing mode on/off: ESC { 4) Set left margin: GS 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.
Confidential BTP-R880NP Programming Manual · This command is effective only in page mode. [Notes] · Data buffered in page mode are cleared. · This command sets the print position to the beginning of the line. · The page area are initialized as default data.
Confidential BTP-R880NP Programming Manual · Each bit of n is used as follows: [Note] Decimal Function Paper near end send is disabled Paper near end send is enabled Paper near end send is disabled Paper near end send is enabled...
Confidential BTP-R880NP Programming Manual Paper near end sensor disabled Paper near end sensor enabled Paper near end sensor disabled Paper near end sensor enabled Undefined · When either bit 0 or 1 is on, paper near-end sensor enabled, and it stops printing after printer the current task.
Page 77
Confidential BTP-R880NP Programming Manual Print and carriage return Cancel print data in page mode 10 04 16 04 Real-time status transmission DLE EOT 10 05 16 05 Real-time request to printer DLE ENQ 10 14 16 20 Generate pulse at real-time...
Need help?
Do you have a question about the BTP-R880NP and is the answer not in the manual?
Questions and answers