Page 1
CONFIDENTIAL PROGRAMMING MANUAL KIOSK Printer BT-T080 Shandong New Beiyang Information Technology Co.,Lt...
Page 2
SNBC reasonably during the negotiation. SNBC has the right to disclose its confidential information and does not be responsible for the loss or damages caused from the wrong usage or reference of this manual by users.
BT-T080 Programming Manual Content 1 Overview ...............................1 1.1 Command Classification......................1 1.2 Key terms ............................1 1.3 Command format.........................1 2 Command Description ...........................3 2.1 Print command ..........................3 LF Print and feed one line .......................3 FF Print and feed paper......................3 CR Print and carriage return....................3 ESC FF Print in page mode.....................4...
Page 4
BT-T080 Programming Manual ESC % n Select/cancel user-defined character ..............20 ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] Define user-defined character ....20 ESC – n Select/Cancel underline mode ................22 ESC ? n Cancel user-defined characters ................23 ESC E n Select/Cancel bold mode ..................23...
Page 5
BT-T080 Programming Manual GS r n Transmit status......................42 GS a n Set Automatic Status Back (ASB) ................43 2.6 Barcode command ........................45 GS H n Select printing position for Human Readable Interpretation (HRI) characters...45 GS f n Select font for Human Readable Interpretation (HRI) characters ........45 GS h n Select barcode height....................46...
Page 6
BT-T080 Programming Manual GS ( M pL pH n m ((n) = 2, 50) <Function 2>................61 GS ( M pL pH n m ((n) = 3, 51) < Function 3>................62 GS : Start/end macro definition....................62 GS C 0 n m Select count print mode ................63...
BT-T080 Programming Manual 1 Overview 1.1 Command Classification This printer commands are classified as below: Print commands: used for printing and feeding paper; Position commands: to control the print position; Character commands: to set character property; Bitmap commands: to download bitmap and print relative commands, including NV and RAM bitmap;...
Page 8
BT-T080 Programming Manual [Notes] ――Explain the main features and application notices of commands; [Default] ――The initial value used after the printer initialized; [Relative] ――Other commands related to current command; [Example]――Example used for current or relative commands. 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.
BT-T080 Programming Manual 2 Command Description 2.1 Print command LF Print and feed one line [Function] Print the data in buffer and feed one line [Format] ASCII Decimal [Notes] This command sets the print position to the beginning of the line.
BT-T080 Programming Manual ESC FF Print in page mode [Function] Print all the data in buffer in page mode. [Format] ASCII Decimal 27 [Notes] • This command is enabled only in page mode. • 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.
BT-T080 Programming Manual ESC d n Print and feed n lines [Function] Print and feed n lines [Format] ASCII Decimal 27 100 n [Value range] 0 ≤n ≤ 255 [Notes] • Prints the data in the print buffer and feeds pape of n lines (character line).
BT-T080 Programming Manual [Relative] ESC D [Example] 0A (set the print position to the beginning of the line) 1B 40 (initialize printer) B 53 (enter standard mode) 33 33 33 33 33 33 1B 44 08 10 1C 00 (set the horizontal tab position)
BT-T080 Programming Manual ESC D n1...nk NUL Set horizontal tab positions [Function] Set horizontal tab positions. [Format] ASCII n1 nk NUL n1 nk 00 Decimal 27 n1 nk 0 [Value range] 1 ≤ n ≤ 255 0 ≤ k ≤ 32 [Notes] •...
Page 14
BT-T080 Programming Manual Starting position Print direction 0, 48 Left to right Upper left (A in the figure) 1, 49 Bottom to top Lower left (B in the figure) 2, 50 Right to left Lower right (C in the figure)
BT-T080 Programming Manual ESC W xL xH yL yH dxL dxH dyL dyH Set printing area in page mode [Function] Set printing area in page mode [Format] ASCII xL xH yL yH dxL dxH dyL dyH xL xH yL yH dxL dxH dyL dyH...
Page 16
BT-T080 Programming Manual • When the horizontal starting position, vertical starting position, printable area width, and printable area height are defined as X, Y, Dx, and Dy respectively, the printable area is set as shown in the figure below. • The horizontal and vertical motion units are specified by GS P. The change of horizontal or vertical motion unit does not affect the current printing area.
BT-T080 Programming Manual Decimal 27 [Value range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 [Notes] • Aligns all the data in one line to the specified position. • Relationship between value of n and justification method: Justification...
BT-T080 Programming Manual When the prin t 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 printable area by ESC T: Commands using x: ESC 3, ESC J, ESC W, GS $, GS \ Commands using y: ESC SP, ESC $, ESC W, ESC \,FS S, GS V •...
BT-T080 Programming Manual 2.3 Character command CAN Delete data in print buffer in page mode [Function] Delete data in current area in page mode. [Format] ASCII Hecimal 24 [Notes] • This command is enable only in page mode. • If data that existed in the previously specified area also exists in the current area, it is also deleted.
BT-T080 Programming Manual ESC SP n Set right-side character spacing [Function] Set right-side character spacing [Format] ASCII Decimal 27 [Value range] 0 ≤ n≤255 [Notes] • Set the character spacing for the right side of the character to [n×horizontal or vertical motion unit]inches.
Page 25
BT-T080 Programming Manual Select double-height mode Cancel double-width mode Select double-width mode Undefined Cancel underline mode Select underline mode • When both double-height and double-width modes are selected, characters will be enlarged two times in horizontal and vertical. • All the characters can be underlined, except for the space set by HT or 90° clockwise rotated characters and HRI characters.
BT-T080 Programming Manual ESC % n Select/cancel user-defined character [Function] Select/cancel user-defined character. [Format] ASCII 25 n Hecimal 27 37 n [Value range] 0 ≤ n ≤255 [Notes] • When the least significant bit of n is 0, the user-defined character is not used.
Page 27
BT-T080 Programming Manual • The allowable character code range is from ASCII code <20>H to <7F>H (96 characters) . • It is possible to define multiple characters for consecutive character codes. If only one character is desired, use c1 = c2.
BT-T080 Programming Manual Results: ESC ? n Cancel user-defined characters [Function] Cancel user-defined characters. [Format] ASCII Decimal 27 [Value range] 32 ≤n ≤127 [Notes] • Cancel the character with code is n in user-defined character. After cancel the character, the corresponding character in the internal character will be used.
BT-T080 Programming Manual ESC G n Select/Cancel double-strike mode [Function] Select/Cancel double-strike mode [Format] ASCII Decimal 27 [Value range] 0 ≤ n ≤ 255 [Notes] • When the LSB of n is 0, double-strike mode is cancelled. • When the LSB of n is 1, double-strike mode is selected.
BT-T080 Programming Manual Decimal [Value range] 0 ≤ n ≤ 12 [Notes] Select an international character set n from the following table: Character set U.S.A. France Germany U.K. Denmark I Sweden Italy Spain I Japan Norway Denmark II Spain II...
BT-T080 Programming Manual • This command does not affect printing in page mode. • In upside-down printing mode, the printer rotates the line to be printed by 180° and then prints it. [ Default ] n = 0 [Example] 1B 40...
BT-T080 Programming Manual • This command is effective to all characters (ASCII characters and Chinese), except for HRI characters. • If n is outside of the defined range, this command will be ignored. • In standard mode, the vertical direction is the paper feed direction, and the horizontal direction is perpendicular to the paper feed direction.
BT-T080 Programming Manual Result: FS ! n Set Chinese character mode [Function] Set Chinese character mode. [Format] ASCII Decimal 28 [Value range] 0 ≤n ≤ 255 [Notes] n specifies the print mode of Chinese: Decimal Function 0, 1 Undefined Cancel double-width mode...
BT-T080 Programming Manual Decimal 28 [Notes] • When Chinese character mode is selected, the printer checks whether the character is Chinese internal code or not. If it is Chinese internal code, printer will firstly processes the first byte; then printer will check if the second byte is Chinese internal code or not.
BT-T080 Programming Manual FS S n1 n2 Set left-side and right-side Chinese character spacing [Function] Set left-side and right-side Chinese character spacing. [Format] ASCII Decimal 28 [Value range] 0 ≤ n1 ≤ 255 0 ≤ n2 ≤ 255 [Notes] • Set the right spacing and the left spacing to n1 and n2 respectively.
BT-T080 Programming Manual • After printing one bitmap, the printer returns to normal data processing mode. • This command is not affected by print modes ( bold, double-strike, underline, character size enlargement or white/black reverse printing) , except for upside-down printing mode.
BT-T080 Programming Manual • This command is ignored if a downloaded bitmap has not been defined. • In standard mode, this command is effective only when there is no data in the print buffer. • This command has no effect in the print modes (bold, double-strike, underline, character enlargement, or white/black reverse printing), except for upside-down printing mode.
BT-T080 Programming Manual • yL, yH, indicates the number of data bytes ( yL+ yH × 256) in the vertical direction for the bitmap • In standard mode, this command is effective only when there is no data in the print buffer.
BT-T080 Programming Manual • This command is not affected by print modes (double-height, double-width, underline, character enlargement, white/black reverse printing, or 90° clockwise rotation, etc.), except upside-down printing mode. • If the downloaded bitmap to be printed exceeds current printing area, the excess data is not printed.
Page 45
BT-T080 Programming Manual defined, and in this case, all data needs to be sent again. • Because printer is in busy status during processes with this command, it writes data to NV memory and stops receiving other commands. Thus, when printer processes with this command, sending other commands including real-time command is forbidden.
BT-T080 Programming Manual 2.5 Status command DLE EOT n Real-time status transmission [Function] Real-time status transmission. [Format] ASCII EOT n Decimal 16 [Value range] 1 ≤ n ≤ 4 [Notes] Real-time transmit the printer status specified by parameter n: n = 1: Transmit printer status...
Page 47
BT-T080 Programming Manual • Auto Status Back (ASB) inquired by command GS a is different from the status inquired by real-time command. n = 1:Printer status Decimal Function Fixed to 0 Fixed to 1 Fixed to 1 On-line. Off-line Fixed to 1...
BT-T080 Programming Manual n = 4:Sensor status for continuous paper Decimal Function Fixed to 0 Fixed to 1 Paper near end sensor detects paper existance Paper near end sensor detects paper end Fixed to 1 Paper end sensor detects paper existance...
BT-T080 Programming Manual • This command is valid only for printer with serial interface. • This command is executed after the data in the receive buffer is processed. Therefore, there may be a time lag between receiving this command and transmitting the status.
Page 50
BT-T080 Programming Manual the settings set by this command. • The status to be transmitted is as follows: First byte (Printer information) Off/On Decimal Printer status Not used. Fixed to 0 Not used. Fixed to 0 Not used. Fixed to 1 On-line.
BT-T080 Programming Manual Third byte (paper sensor information) Printer Status Off/On Decimal Paper is not near end Paper near end. Paper present Paper end Not used. Fixed to 0 Complete printing normally. Not complete printing normally. Not in printing status.
BT-T080 Programming Manual [Format] ASCII Decimal 29 102 n [Value range] n = 0, 1, 48, 49 [Notes] Use n to selects a font: Font Standard ASCII character (12 × 24) 0,48 Compressed ASCII character (9 × 17) 1,49 • HRI is the character used for making notes of barcode.
Page 53
BT-T080 Programming Manual CODE39 1 ≤ k ≤ 255 45 ≤ d ≤ 57, 65 ≤ d ≤ 90, 32, 36, 37,43 1 ≤ k ≤ 255 48 ≤ d ≤ 57 CODABAR 1 ≤ k ≤ 255 48 ≤ d ≤ 57, 65 ≤ d ≤ 68 , 36, 43, 45,46,47,58 UPC-A 11 ≤...
Page 54
BT-T080 Programming Manual • 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 of the barcode. • If d is out of the specified range, this command is ignored.
Page 55
BT-T080 Programming Manual • HRI characters that are used as the function characters are not printed. • HRI characters that are used as the control character (<00>H to <1F>H and <7F>H) are not printed; • Be sure to keep spaces on both right and left sides of a barcode. (Spaces are different depending on the types of the barcode).
BT-T080 Programming Manual GS w n Set barcode width [Function] Set barcode width. [Format] ASCII Hecimal 29 [Value range] 2 ≤ n ≤ 6 [Notes] Set the horizontal width of the barcode. n specifies the barcode width in horizontal: Module Width (mm) for...
BT-T080 Programming Manual Set correction grade of PDF417 barcode GS q n [Function] Set correction grade of PDF417 barcode. [Format] ASCII Decimal 29 [Value range] 0≤ n≤8 [Notes] Set correction grade of PDF417 barcode. 2.7 Other commands ESC 2 Set default line spacing...
BT-T080 Programming Manual [Format] ASCII Decimal 27 [Notes] Clear the data in print buffer and set print mode to the default mode when powered on. The data in the command buffer is not cleared. The macro definition is not cleared.
BT-T080 Programming Manual • This command is effective only in page mode. • This command clears the print data in buffer in page mode. • This command sets the current position to the beginning of the line. • The page mode area is initialized as default value.
BT-T080 Programming Manual detects paper end, the paper end signal can be outputted. • The command is effective only when it is a parallel interface and is ignored when it is a serial interface. [Default] n = 0 ESC c 4 n Select paper sensor to stop printing...
Page 61
BT-T080 Programming Manual Decimal 29 [Notes] • Locate the marked paper to the print starting position. • This Command is effective only when the paper type is set to marked paper (the paper type is set by EEPROM). • This command sets the next print position to the beginning of the line.
Page 62
BT-T080 Programming Manual • The printer cuts paper after executing this command.. • When executing this command, the printer is busy, so it does not receive other commands. [Example] When m =1, print in Hex (dump) mode command, and the operation method is as...
BT-T080 Programming Manual • The number of bytes is specified by pL and pH ( pL + ( pH 256)). • m specifies the function • d1, d2 and d3 are the parameters of the selected mode. • a specifies the type of the stored data.
BT-T080 Programming Manual • The function with m = 2 of this command is effective only in the user-defined mode. GS ( E pL pH m [a1 b18...b11]...[ak bk8...bk1] (m = 3) <Function 3> [Format] ASCII pL pH [a1 b18...b11]...[ak bk8...bk1] pL pH [a1b18...b11]...[ak bk8...bk1]...
Page 65
BT-T080 Programming Manual The contents of the data in are defined as follows: ③ The on/off setting of the memory switch is defined as [On: Hex = 30H / Decimal = 48] or [Off: Hex = 31H / Decimal = 49]. The status of each memory switch is indicated by one byte, and the returned value corresponds to bit 8 ~ bit 1 of memory switch.
Page 66
BT-T080 Programming Manual • The adjustment of print starting position after cutting paper (a=2) will affect the following commands: GS V m n. • Meaning of print starting position parameters and cut position parameters: the distance of feeding forward or backward after the printer detects mark; when cutting paper, the printer first detects the mark, then feeds the distance corresponding to cut position parameter, and cuts paper.
BT-T080 Programming Manual 0 ≤m ≤1, 48 ≤m ≤49 [Notes] Save or load the data defined by command GS ( F Function 1,49 Save the settings of GS ( F into the user NV memory 2,50 Load the settings of GS ( F from user NV memory...
BT-T080 Programming Manual definition, and begins performing this command. • Refer to <Function 1> of this command for the setting values for this function. [Default] None [Relative] <Function 1> GS ( M pL pH n m ((n) = 3, 51) < Function 3>...
BT-T080 Programming Manual • Macro is not defined when the power is turned on. • The defined contents of the macro are not cleared by ESC @. Therefore, ESC @ can be included in the contents of the macro definition.
BT-T080 Programming Manual operation range specified by GS C 1 or GS C, it is forced to convert to the minimum value. • In count-down mode, if the count value specified by this command goes out of the count operation range specified by GS C 1 or GS C, it is forced to convert to the maximum value.
BT-T080 Programming Manual operation range, the count value is forced to convert to the maximum value. • Parameters sa to sc can be omitted. If omitted, these argument values are unchanged. • Parameters sa to sc must not contain characters, except 0 to 9.
BT-T080 Programming Manual • When 1 ≤ n ≤ 3 or 49 ≤ n ≤ 51, printer returns single-byte ID. • When 65 ≤ n ≤ 69, format returned is as following: Header: Hexadecimal code = 5FH / decimal code = 95 (1 byte).
BT-T080 Programming Manual 0 ≤ t ≤ 255 m = 0, 1 [Notes] • r specifies the number of times to execute the macro. • t specifies the waiting time for executing the macro. • m specifies macro executing mode.
BT-T080 Programming Manual 3 Programming instructions 3.1 General information 1) The instructions are compiled to help users who use commands to control the printer quickly master the command set. 2) All programming examples are given in Hex. 3) All normal fonts and characters are data and there is no note for the data in the programming examples, for instance, 42 43.
BT-T080 Programming Manual 3.2.4 Status check Printer status (normal status, error status)can be checked by command. Error status includes: 1. paper end 2. print head lift-up 3. cutter error, etc. 1) Real-time status transmission (refer to command 10 04 n). This command is automatically enabled when the printer is turned on or when error occurs after printer is powered on.
Page 80
BT-T080 Programming Manual const int nPixelsOfWidth, const int nPixelsOfHeight, char *pBmpDataRotated // Define process variables int nBytesOfWidth = 0, nBytesOfHeight = 0; int i=0, col=0, row=0, index = 0, colbyte = 0; char* midData; unsigned char tempdata = 0, colnum = 0, rownum = 0;...
Page 81
BT-T080 Programming Manual return 1; Example: The downloaded bitmap is as shown below: 1D 23 00 (Define a number for the btimap to be downloaded) 1D 2A 1C 08 (Defined downloaded bitmap) 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000003FC0000000 000001FFF0000000000007FFF800000000001FC0FC00000000003E003E000000000078003E02000 00000F0001E0200000001C0000E0200000003800000060000000700000006000000070000000E00 00000E0000003E0000000C000000FE0000001C00000FFE000000180000FFFE00000038000FFFFE 00000030807FFFF60000003087FFFFE600000030FFFFFF8600000060FFFFF80600000061FFFFC0 0600000061FFF8000600000061FFB0000600000061F8300006000000618030000E0000006000380...
BT-T080 Programming Manual 0C07FF800000000000078780000000003F0F01C000000003FF8E01C00000000FFFDC00C0000000 3FFFD800C00000007FFFF800C0000001FFFFF000C0000003FE07E000C0000007F001E001C0000 00F8001C001C000001E000380038000001C00038007800000380007000F80000070000E003F0000 0070001E01FF00000060007FFFFE000000E003FFFFFC000000E03FFFFFF8000000E3FFFFFFF00 00000FFFFFFFFC0000000FFFFFFFE00000000FFFFE00000000001FFFC000000000001FFC00000 00000003FC00000000000003C0000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000 1D 23 00 (Select the number of the bitmap to be printed) 1D 2F 00 (Print the RAM bitmap) 3.2.6 Recommendations on applicable flow for programm Make good use of ASB command during programming, since the ASB command is able to automatically return all kinds of printer status.
BT-T080 Programming Manual Appendix Appendix A CODE128 A.1 Overview of CODE128 In CODE128 system, it is possible to represent 128 ASCII characters, 100 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
BT-T080 Programming Manual FNC2 7B,32 123,50 FNC3 7B,33 123,51 FNC4 7B,34 123,52 < SHIFT 7B,53 123,83 CODEB 7B,42 123,66 > CODEC 7B,43 123,67 " & Characters in CODE B: Transmit Data Transmit Data Transmit Data Character Character Character Decimal Decimal Decimal "...
Page 85
BT-T080 Programming Manual FNC4 7B,34 123,52 SHIFT 7B,53 123,83 CODEA 7B,41 123,65 CODEC 7B,43 123,67 < > Characters in CODE C: Transmit Data Transmit Data Transmit Data Character Character Character Decimal Decimal Decimal FNC1 7B,31 123,49 - 79 -...
BT-T080 Programming Manual CODEA 7B,41 123,65 CODEB 7B,42 123,66 Appendix B: Print mode and its change B.1 General description The printer operates in two modes: standard mode and page mode. In standard mode, when line buffer is full or when the printer receives print or paper feed commands, the printer will print and feed paper. In page mode, all the received print data and paper feed commands are stored in the specified memory, and the printer executes no operation.
BT-T080 Programming Manual B.2 Set values in standard and page modes Some commands (such as ESC SP, ESC 2, ESC 3, and FS S) can be used in both standard and page modes, besides the parameters of them are the same. However, these values can be set independently in each mode.
Page 88
BT-T080 Programming Manual Appendix-figure B.2 storage location of character data Appendix-figure B.3 storage location of print data - 82 -...
Need help?
Do you have a question about the BT-T080 and is the answer not in the manual?
Questions and answers