THERMAL PRINTER – ESC COMMANDS MANUAL Coi Nel
User Manual: Pdf
Open the PDF directly: View PDF .
Page Count: 22
Download | |
Open PDF In Browser | View PDF |
1 THERMAL PRINTER – ESC COMMANDS MANUAL THERMAL PRINTER ESC Commands Manual 2 THERMAL PRINTER – ESC COMMANDS MANUAL Document Title: Thermal Printer - ESC Commands Manual. Version: Ver 1.0 Date: 2nd NOV 2017 Author: Technical Support E-mail: info@coineltech.com Company Contact Information CoiNel Technology Solutions LLP nd No-32, 2 Floor, HAPBCO Tower, RPC Layout, Hampinagar, Bangalore-560104 Ph: 080-23154423 3 THERMAL PRINTER – ESC COMMANDS MANUAL Revision: Revision Changes Rev 1.0 Initial Revision 4 THERMAL PRINTER – ESC COMMANDS MANUAL TABLE OF CONTENTS 1 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 2 COMMAND LIST Command Description Miscellaneous Commands Character Commands Print Position Commands Line Spacing Commands Print Commands Image Commands Barcode Commands Status Commands USING TERMINAL SOFTWARE DISCLAIMER 5 6 6 7 8 9 11 13 15 13 24 27 5 THERMAL PRINTER – ESC COMMANDS MANUAL 1. COMMAND LIST SUMMARY TYPE COMMAND (HEX) DESCRIPTION 0x1B 0x40 0x1D 0x28 0x4B 0x02 0x00 0x31 M Initialize Printer Select Print Density 0x1B 0x20 N 0x1B 0x21 N 0x1B 0x45 N 0x1B 0x4D N 0x1B 0x2D N 0x1D 0x42 N 0x1D 0x21 N Set Right-Side Character Spacing Select Print Modes Emphasized mode(BOLD) on/0ff Select Character Font Select Underline Turn Black/White Reverse Print Mode on/off Select Character Size 0x09 0x1D 0x4C nL nH 0x1D 0x57 nL nH 0x1B 0x61 N 0x1B 0x24 nL nH 0x1B 0x5C nL nH Horizontal Tab Set Left Margin Set Print Area Width Select Justification Set Absolute Print Position Set Relative Print Position 0X1B 0X33 N Set Line Spacing 0x0A 0x0C Print and Line Feed Print and feed label to print starting position (on label) 0x1B 0x4A N 0x1B 0x64 N Print and Feed Paper Print and Feed N Lines 0x1B 0x2A M nL nH 0x1C 0x70 N M 0x1C 0x71 N 0x1D 0x76 0x30 M xL xH yL yH 0x1B 0x2B N xL xH yL yH 0x1B 0x2C N M Select Bit-Image Mode Print NV Bit Image Define NV Bit Image Print Raster Bit Image Save Indexed Based Image Print Indexed Based Image 0x1D 0x48 N 0x1D 0x66 N 0x1D 0x68 N Select Print Position of HRI Characters Select Font for HRI Characters Set bar Code Height MISCELLANEOUS COMMANDS CHARACTER COMMANDS PRINT POSITION COMMANDS LINE SPACING COMMANDS PRINT COMMANDS IMAGE COMMANDS BARCODE COMMANDS 6 THERMAL PRINTER – ESC COMMANDS MANUAL 0x1D 0x6B M 0x1D 0x77 N Print Barcode Set Barcode Width 0x1D 0x72 N Transmit Status 0x1D 0x28 0x45 0x04 0x00 0x05 0x74 nL nH 0x1D 0x28 0x45 0x02 0x00 0x06 0x74 0x1B 0x68 0x1B 0x79 0x1D 0x28 0x45 0x04 0x00 0x0D d1d2d3d4 0x1D 0x28 0x45 0x00 0x00 0x0E data Auto-Off Timer Setting STATUS COMMANDS CUSTOMIZE COMMANDS Transmit customized settings Temperature Response Voltage Response Set Bluetooth pairing pin Set Bluetooth discoverability mode 1.1 COMMAND DESCRIPTIONS EXEL thermal printer control board use ESC/POS command set. The printing command is decrypted as followed format: COMMAND (Hex Format) FORMAT ASCII HEXA DECIMAL DESCRIPTION: EXAMPLE NOTES: FUNCTION LIST OF ASCII CHARACTERS LIST OF HEXADECIMAL CHARACTERS Command Use Example If user is using Terminal.exe software then to give commands in hex format, user needs to use ‘$’symbol to specify the hex codes. Example:- To initialize printer the command is 0x1B 0x40. In Terminal software user should give command as $1B$40 without any space between character codes. 1.1.1 MISCELLANEOUS COMMANDS 0x1B 0x40 FORMAT Initialize Printer ASCII ESC @ HEXA DECIMAL 0x1B 0x40 DESCRIPTION: Clears the data in the print buffer and resets the printer modes to the modes that were in effect when the power was turned ON. EXAMPLE Send ESC @ or send 0x1B 0x40 NOTES: None 0x1D 0x28 0x4B 0x02 0x00 0x31 M Select Print Density 7 THERMAL PRINTER – ESC COMMANDS MANUAL FORMAT ASCII GS ( K pL pH fn M HEXA DECIMAL 0x1D 0x28 0x4B 0x02 0x00 0x31 M DESCRIPTION: The print density is tuned by how much of power is supplied to the head. EXAMPLE Send 0x1D 0x28 0x4B 0x02 0x00 0x31 0x06 This will set print density max print density. I,e 130% NOTES: 0x00 ≤ M ≤ 0x06 and 0xFA ≤ M ≤ 0xFF 1.1.2 CHARACTER COMMANDS 0x1B 0x20 N FORMAT Set Right-Side Character Spacing ASCII ESC SP n HEXA DECIMAL 0x1B 0x20 N DESCRIPTION: Sets the right-side character spacing to n vertical unit. EXAMPLE 0x1B 0x20 0X0A Sets right side gap of a character to 10 dots. NOTES: Here value of N is in dots. The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1B 0x21 N FORMAT ASCII HEXA DECIMAL DESCRIPTION: Selects the character font and styles. N (bit format) 0th 1st 2nd 3rd 4th 5th 6th 7th NA = Not assigned. EXAMPLE ON value 1 NA NA 1 1 1 NA 1 Select Print Modes ESC ! N 0x1B 0x21 N OFF value 0 NA NA 0 0 0 NA 0 Functionality Font selection Emphasize mode(Bold) Double height Double width Under line mode 0x1B 0x21 0x38 Sets text to double height, double width and emphasized mode. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1B 0x45 N FORMAT Emphasized mode(BOLD) on/0ff ASCII ESC E N HEXA DECIMAL 0x1B 0x45 N DESCRIPTION: Turns emphasized mode on or off. Here N is in hex format. 8 THERMAL PRINTER – ESC COMMANDS MANUAL N Functionality 0x00 When the LSB of N is 0, emphasized mode is turned off. 0x01 When the LSB of N is 1, emphasized mode is turned on. EXAMPLE 0x1B 0x45 0x01 Sets text sent to BOLD. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1B 0x4D N FORMAT Select Character Font ASCII ESC M N HEXA DECIMAL 0x1B 0x4D N DESCRIPTION: Sets font type depending on the value of N Here N is in hex format. N = 0x00 or 0x30 -> Font A (FONT 12x24) N = 0x01 or 0x31 -> Font B (FONT 8x16) EXAMPLE 0x1B 0x4D 0x31 Sets text font type to FONT B. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1B 0x2D N FORMAT Select Underline ASCII ESC – N HEXA DECIMAL 0x1B 0x2D N DESCRIPTION: Sets the underline mode using N. Here N is in hex format. N 0x00 or 0x30 0x01 or 0x31 0x02 or 0x32 EXAMPLE Functionality Underline mode off 1-dot line underline mode 2-dot line underline mode 0x1B 0x2D 0x02 Sets the text to 2-dot underline mode NOTES: Character size affects the size of underline mode of that character. The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1D 0x42 N FORMAT Turn Black/White Reverse Print Mode on/off ASCII GS B N HEXA DECIMAL 0x1D 0x42 N DESCRIPTION: Turns white/black reverse print mode on or off. Here N is in hex format. N Functionality 0x00 When the LSB of N is 0, white/black reverse print mode is turned off. 0x01 When the LSB of N is 1, white/black reverse print mode is turned on. 9 THERMAL PRINTER – ESC COMMANDS MANUAL EXAMPLE 0x1D 0x42 0x01 Sets the following characters to reverse mode. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1D 0x21 N FORMAT Select Character Size ASCII GS ! N HEXA DECIMAL 0x1D 0x21 N DESCRIPTION: Selects the character height and width as below. Here N is in hex format. N 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 Bit 6 0 0 0 0 1 1 1 1 Bit 5 0 0 1 1 0 0 1 1 Bit 4 0 1 0 1 0 1 0 1 Width Normal Normal x 2 Normal x 3 Normal x 4 Normal x 5 Normal x 6 Normal x 7 Normal x 8 Bit 2 Bit 1 Bit 0 Height 0 0 0 Normal 0 0 1 Normal x 2 0 1 0 Normal x 3 0 1 1 Normal x 4 1 0 0 Normal x 5 1 0 1 Normal x 6 1 1 0 Normal x 7 1 1 1 Normal x 8 EXAMPLE 0x1D 0x21 0x57 Sets the character size as below. width = normal width x 6 and height = normal height x 8. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 1.1.3 N 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 PRINT POSITION COMMANDS 0x09 FORMAT Horizontal Tab ASCII HT HEXA DECIMAL 0x09 DESCRIPTION: Moves the print position to the next horizontal tab position. EXAMPLE 0x09 Sets print position to next horizontal tab position. NOTES: None. 0x1D 0x4C nL nH FORMAT Set Left Margin ASCII GS L nL nH HEXA DECIMAL 0x1D 0x4c nL nH DESCRIPTION: The command sets the left side margin specified by nL and nH. 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255 EXAMPLE 0x1D 0x4c 0x64 0x00 Sets the left margin to 100 dots. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. If the setting exceeds the printable area, the left margin is automatically set to the maximum value of the printable area. 10 THERMAL PRINTER – ESC COMMANDS MANUAL 0x1D 0x57 nL nH FORMAT Set Print Area Width ASCII GS W nL nH HEXA DECIMAL 0x1D 0x57 nL nH DESCRIPTION: The command sets width of the print area specified by nL and nH. 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255 EXAMPLE 0x1D 0x57 0x64 0x00 Sets print area to 100 dots. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1B 0x61 N FORMAT Select Justification ASCII ESC a N HEXA DECIMAL 0x1B 0x61 N DESCRIPTION: The command aligns all the data in one line of the selected layout. Here N is in hex format. N is in hex format. N 0x00 or 0x30 0x01 or 0x31 0x02 or 0x32 Justification Left justification Centered Right justification EXAMPLE 0x1B 0x61 0x01 Sets data alignment to centere position. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1B 0x24 nL nH FORMAT Set Absolute Print Position ASCII ESC $ nL nH HEXA DECIMAL 0x1B 0x24 nL nH DESCRIPTION: Moves the print position from the left edge of the print area to the specified value. 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255 EXAMPLE 0x1B 0x24 0x96 0x00 Sets print position to 150th dot from left edge. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1B 0x5C nL nH FORMAT Set Relative Print Position ASCII ESC \ nL nH HEXA DECIMAL 0x1B 0x5C nL nH DESCRIPTION: Moves the print position from the current position to the specified value. 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255 EXAMPLE 0x1B 0x5C 0x64 0x00 Sets print position to 100th dot from current position. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 11 THERMAL PRINTER – ESC COMMANDS MANUAL A positive number specifies movement to the right, and a negative number specifies movement to the left. 1.1.4 LINE SPACING COMMAND 0X1B 0X33 N FORMAT Set Line Spacing ASCII ESC 3 N HEXA DECIMAL 0X1B 0X33 N DESCRIPTION: Sets the line spacing to N lines. N is in hex format and 0 ≤ N ≤ 255 EXAMPLE 0X1B 0X33 0x30 Sets 48 line spacing. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 1.1.5 PRINT COMMANDS 0x0A FORMAT Print and Line Feed ASCII LF HEXA DECIMAL 0x0A DESCRIPTION: Prints the data in the print buffer and feeds one line, based on the current line spacing. EXAMPLE 0x0A Feeds one line after printing. NOTES: None. 0x0C FORMAT Print and feed label to print starting position (on label) ASCII FF HEXA DECIMAL 0x0C DESCRIPTION: Prints the data in the print buffer and feeds paper to the print starting position on the next label. EXAMPLE 0x0C Prints data in print buffer and feeds paper for certain length to detect the mark. NOTES: None. 0x1B 0x4A N FORMAT Print and Feed Paper ASCII ESC J N HEXA DECIMAL 0x1B 0x4A N DESCRIPTION: Prints the data in the print buffer and feeds the paper to N dots. N is in hex format and 0 ≤ N ≤ 255. EXAMPLE 0x1B 0x4A 0x0A Prints data in print buffer and feeds 10 dots. NOTES: None. 12 THERMAL PRINTER – ESC COMMANDS MANUAL 0x1B 0x64 N FORMAT Print and Feed N Lines ASCII ESC d N HEXA DECIMAL 0x1B 0x64 N DESCRIPTION: Prints the data in the print buffer and feeds the paper to N specified lines. N is in hex format and 0 ≤ N ≤ 255. EXAMPLE 0x1B 0x64 0x0A Prints data in print buffer and feeds 10 lines. NOTES: None. 1.1.6 IMAGE COMMANDS 0x1B 0x2A M nL nH FORMAT Select Bit-Image Mode ASCII ESC * M nL nH HEXA DECIMAL 0x1B 0x2A M nL nH DESCRIPTION: Stores the bit image data in the print buffer using the mode specified by M as follows. Here M is in hex format. M 0x00 0x01 0x20 0x21 Mode 8 dot single-density 8 dot double density 24 dot single-density 24 dot double density EXAMPLE Density Single-density Double density Single-density Double density Data length nL + nH*256 nL + nH*256 (nL + nH*256) * 3 (nL + nH*256) * 3 Command: 0x1B 0x2A 0x00 0x08 0x00 Data: 0x7f 0xff 0xc4 0xc4 0xc4 0xc4 0xff 0x7f This will store image into print buffer with mode 0. NOTES: None. 0x1C 0x70 N M FORMAT Print NV Bit Image ASCII FS p N M HEXA DECIMAL 0x1C 0x70 N M DESCRIPTION: Prints NV bit image N with mode specified by M. Here M is in hex format. M 0x00 or 0x30 0x01 or 0x31 0x02 or 0x32 0x03 or 0x33 Mode Normal Double-width Double-height Quadruple EXAMPLE 0x1C 0x70 0x01 0x02 Command will print 1st NV image stored in flash in mode2 format. NOTES: Command is ignored if no NV image for the specified N value. 0x1C 0x71 N Define NV Bit Image 13 THERMAL PRINTER – ESC COMMANDS MANUAL FORMAT ASCII FS q N HEXA DECIMAL 0x1C 0x71 N DESCRIPTION: Defines the N number of NV bit images in the NV graphics area. The complete command for defining NV image is 0x1C 0x71 N [xL xH yL yH d1...dk]1...[xL xH yL yH d1...dk]N Command code 0x1C 0x71 N xL xH yL yH d1…dk [xL xH yL yH d1...dk]N Description Define NV image Total number of NV images to define Width of an NV image in bytes (xL + xH*256) Height of an NV image in bytes (yL + yH*256) Data bytes to define an NV image Set of parameters for Nth NV image EXAMPLE 0x1c 0x71 0x01 0x01 0x00 0x01 0x00 0xef 0x88 0x88 0x88 0x88 0xef 0x00 0x00 Command will define one NV image into flash memory. NOTES: The NV bit image defined is effective until the next NV bit image is defined. 0x1D 0x76 0x30 M xL xH yL yH Print Raster Bit Image FORMAT ASCII GS v 0 M xL xH yL yH d1…..dk HEXA DECIMAL 0x1D 0x76 0x30 M xL xH yL yH d1…..dk DESCRIPTION: Prints a raster bit image using the mode specified by M. Here M is in hex format. Command code M = 0x00 or 0x30 M = 0x01 or 0x31 M = 0x02 or 0x32 M = 0x03 or 0x33 xL xH yL yH d1…..dk Description Normal Double-width Double-height Quadruple Image width in bytes(xL + xH*256) Image height in bytes(yL +yH*256) Data bytes EXAMPLE 0x1D 0x76 0x30 0x03 0x01 0x00 0x08 0x00 0x7E 0x81 0x81 0x81 0xFF 0x81 0x81 0x81 Command will print image in quadruple mode. NOTES: The NV bit image defined is effective until the next NV bit image is defined. 0x1B 0x2B N xL xH yL yH FORMAT Save Indexed Based Image ASCII ESC + N xL xH yL yH HEXA DECIMAL 0x1B 0x2B N xL xH yL yH d1…..dk DESCRIPTION: Save an image into flash memory with referenced index number. 14 THERMAL PRINTER – ESC COMMANDS MANUAL Command code 0x1B 0x2B N xL xH yL yH d1…dk Description Save image Index number for the image Image width in bytes(xL + xH*256) Image height in bytes(yL +yH*256) Data bytes EXAMPLE 0x1B 0x2B 0x05 0x01 0x00 0x08 0x00 0x7E 0x81 0x81 0x81 0xFF 0x81 0x81 0x81 Command will save image defined by data bytes into flash memory with the index value 5. NOTES: Maximum 10 images can be saved by this command. Maximum size of each image should not exceed 64KB. This command will overwrite previously saved image with new image for the same indexed image. 0x1B 0x2C N M FORMAT Print Indexed Based Image ASCII ESC , N M HEXA DECIMAL 0x1B 0x2C N M DESCRIPTION: Prints saved image of index value N with mode specified by M. Here M is in hex format. M 0x00 or 0x30 0x01 or 0x31 0x02 or 0x32 0x03 or 0x33 Mode Normal Double-width Double-height Quadruple EXAMPLE 0x1B 0x2C 0x01 0x02 Command will print an image with index value 1 in mode2 format. NOTES: Command is ignored if no image is saved for the specified N value. 1.1.7 BARCODE COMMANDS 0x1D 0x48 N FORMAT Select Print Position of HRI Characters ASCII GS H N HEXA DECIMAL 0x1D 0x48 N DESCRIPTION: Select print position of HRI characters. Here N is in hex format. N 0x00 or 0x30 0x01 or 0x31 0x02 or 0x32 0x03 or 0x33 EXAMPLE Mode No HRI print Top of the barcode Bottom of the barcode Both top and bottom of the barcode 0x1D 0x48 0x01 Prints the HRI characters on top of barcode 15 THERMAL PRINTER – ESC COMMANDS MANUAL NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1D 0x66 N FORMAT Select Font for HRI Characters ASCII GS f N HEXA DECIMAL 0x1D 0x66 N DESCRIPTION: Selects a font for HRI characters when printing a barcode. Here N is in hex format. N 0 or 0x30 1 or 0x31 Mode Font A(12x24) Font B(8x16) EXAMPLE 0x1D 0x66 0x01 Sets the HRI character font to FONT B characters. NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 0x1D 0x68 N FORMAT ASCII HEXA DECIMAL DESCRIPTION: Sets the height of the bar code to N dots. EXAMPLE Set bar Code Height GS h N 0x1D 0x68 N 0x1D 0x68 0x64 Sets barcode height to 100 dots. NOTES: This command setting is effective until performing ESC@, reset or Power-off. If 0 is given as N, the default value is used. THERMAL PRINTER – ESC COMMANDS MANUAL 16 0x1D 0x6B M FORMAT Print Barcode GS k M 0x1D 0x6B M ASCII HEXA DECIMAL DESCRIPTION: Prints the barcode using the barcode system specified by M. M 0 to 6 65 to 73 Print Barcode command GS k M d1……dk NULL 0x1D 0x6B M d1……dk 0x00 GS k M N d1…..dN 0x1D 0x6B M N d1…….dN M → Barcode system. Here M is in decimal format. N → Length of Barcode. d1….dk → Barcode data. d1….dN → Barcode data of length N. M 0 1 2 3 4 5 6 65 66 67 68 69 70 71 72 73 . Barcode type UPC-A UPC-E JAN13 JAN8 CODE39 ITF CODABAR UPC-A UPC-E JAN13 JAN8 CODE39 ITF CODABAR CODE93 CODE128 EXAMPLE Barcode level Multi-level Multi-level Multi-level Multi-level Binary-level Binary-level Binary-level Multi-level Multi-level Multi-level Multi-level Binary-level Binary-level Binary-level Multi-level Multi-level 0x1D 0x6B 0x00 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x31 0x32 0x00 0x1D 0x6B 0x41 0x0B 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x31 0x32 Both of these commands will print same UPC-A barcode NOTES: 0x1D 0x77 N FORMAT Set Bar Code Width ASCII GS w N HEXA DECIMAL 0x1D 0x77 N DESCRIPTION: Sets the width of the barcode depending on value of N. Here N is in decimal format. N 2 Multi-level Barcode Binary-level Barcode Module width Narrow element Wide element 2 dots 2 dots 5 dots 17 THERMAL PRINTER – ESC COMMANDS MANUAL 3 3 dots 4 5 6 4 dots 5 dots 6 dots 3 dots 8 dots 4 dots 10 dots 5 dots 13 dots 6 dots 15 dots 0x1D 0x77 0x04 This command will set barcode width to 4 dots. EXAMPLE NOTES: The setting of this command is effective until ESC@ is executed, the printer is reset, or the power is turned off. 1.1.8 STATUS COMMAND 0x1D 0x72 N FORMAT Transmit Status ASCII GS r N HEXA DECIMAL 0x1D 0x72 N DESCRIPTION: Printer will respond with paper status for this command for N = 1 or 0x31 Response 0x00 0x0c Paper status Paper present Paper is not present EXAMPLE 0x1D 0x72 0x01 Printer will transmit the paper status. NOTES: The platen should be closed while processing this command. 1.1.9 CUSTOMIZE COMMANDS 0x1D 0x28 0x45 0x04 0x00 0x05 0x74 nL nH Auto-Off Timer Setting FORMAT ASCII GS ( E 0x04 0x00 0x05 0x74 nL nH HEXA DECIMAL 0x1D 0x28 0x45 0x04 0x00 0x05 0x74 nL nH DESCRIPTION: The command will set the auto power-off time for the printer. 0 ≤ (nL + nH*256) ≤ 60 EXAMPLE 0x1D 0x28 0x45 0x04 0x00 0x05 0x74 0x05 0x00 Command will sets the auto power-off time to 5min. 18 THERMAL PRINTER – ESC COMMANDS MANUAL NOTES: 0x1D 0x28 0x45 0x04 0x00 0x05 0x74 0x00 0x00 will turn-off the auto power-off setting. 0x1D 0x28 0x45 0x02 0x00 0x06 0x74 Transmit Customized Settings FORMAT ASCII GS ( E 0x02 0x00 0x06 0x74 HEXA DECIMAL 0x1D 0x28 0x45 0x02 0x00 0x06 0x74 DESCRIPTION: This command will transmit the customized setting values. EXAMPLE 0x1D 0x28 0x45 0x02 0x00 0x06 0x74 Printer will transmit the current printing density, auto-off time value and thermal head run. NOTES: None. 0x1B 0x68 FORMAT Temperature Response ASCII ESC h HEXA DECIMAL 0x1B 0x68 DESCRIPTION: This command will respond the printer temperature. EXAMPLE 0x1B 0x68 Printer will reply the its temperature. NOTES: None. 0x1B 0x79 FORMAT Voltage Response ASCII ESC y HEXA DECIMAL 0x1B 0x79 DESCRIPTION: This command will respond the printer voltage and battery life. EXAMPLE 0x1B 0x79 Printer will reply the its current voltage and battery life. NOTES: None. 0x1D 0x28 0x45 0x04 0x00 0x0D d1d2d3d4 Set Bluetooth pairing pin FORMAT ASCII GS ( E 0x04 0x00 0x0D d1d2d3d4 HEXA DECIMAL 0x1D 0x28 0x45 0x04 0x00 0x0D d1d2d3d4 DESCRIPTION: This command will set the custom Bluetooth pairing pin of 4 digits. EXAMPLE NOTES: The pin must be of 4 digits. 0x1D 0x28 0x45 0x04 0x00 0x0D 9876 This will set the Bluetooth pairing code to 9876. 19 THERMAL PRINTER – ESC COMMANDS MANUAL 0x1D 0x28 0x45 0x00 0x00 0x0E data Set Bluetooth discoverability mode FORMAT ASCII GS ( E 0x00 0x00 0x0E data HEXA DECIMAL 0x1D 0x28 0x45 0x00 0x00 0x0E data DESCRIPTION: This command will set the Bluetooth discoverability mode. EXAMPLE 0x1D 0x28 0x45 0x00 0x00 0x0E 0x01 This will set the Bluetooth to undiscoverable mode. Only devices which are already paired to the printer can access and print. NOTES: If the device is not paired with the printer, then it is unable to print. 2. USING TERMINAL SOFTWARE You will need terminal software to communicate to the printer. This software is provided when you purchase the printer. Just double click on the terminal software and the window will open as below. Select COM Port as detected in the CDC Set Baud Rate: 115200 Data Bits: 8 Parity: none Atop Bits: 1 Handshaking: None Click on Connect Note: Make sure that the printer is turned ON when you click connect LOADING .tmf FILE The tmf file consists of various macros in it. Macros are pre-defined commands (as given in command list) for various printing options. Each macro will appear in the form of button, which is easier to use. Clicking on it will send the command entered. Click on Macro Click on load Locate .tmf file provided along with terminal 20 THERMAL PRINTER – ESC COMMANDS MANUAL software and click open Transmit macros are the commands. Note: In this software $ is equivalent to 0x (hexadecimal) You can give the name for the buttons as required. Button Details TP AL AC AR FF FC SS SM SXL BARC FIMG BMP RGL BD PLD PPD Test Print Align Left Align Center Align Right Select Fixedsys Font Select courier font Select Font Size as small Select Font Size as medium Select Font Size as XL Barcode Print Image from Flash (internally stored) Print BMP image Print Regional language Battery Charge detect (Returns battery charge value and the same is displayed on terminal) Detect (Returns Platten status and the same is displayed on terminal) Paper Detect (Returns paper status and same is displayed on terminal) Close Macro Settings window, macro buttons will appear as below. By clicking the buttons, the particular macro will execute/transmit. Clicking both +CR will transmit \n after every macro is sent 21 THERMAL PRINTER – ESC COMMANDS MANUAL Click appropriate button for printer to execute commands. Note: 1. To print desired text, simple enter the text and click send 2. For BMP image, click BMP button and click “Send File” and select desired BMP file to be printed. a. Make sure the width and height match printer used i. 3 inch : Max width: 576 pixel (image should be multiple of 8 pixels) ii. 2 inch : Max width: 384 pixel (image should be multiple of 8 pixels) b. Use only black and white image (1 bits/pixel) Same process is followed for Bin file print also. DISCLAIMER CoiNel Technology Solutions LLP, provides the enclosed document under the following conditions: This document is intended for use for ENGINEERING DEVELOPMENT, DEMONSTRATION and EDUCATION OR EVALUATION PURPOSES ONLY. As such, the document being provided are not intended to be complete in terms of required design, marketing-, and/or related protective considerations, The user assumes all responsibility and liability for proper usage of the document. Further, the user indemnifies CoiNel Technology Solutions LLP from all claims arising from the handling or use of the documents. EXCEPT TO THE EXTENT OF THE INDEMNITY SET FORTH ABOVE, NEITHER PARTY SHALL BE LIABLE TO THE OTHER FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES. No license is granted under any patent right or other intellectual property right of CoiNel Technology Solutions LLP covering or relating to any machine, process, or combination in which such CoiNel Technology Solutions LLP products or services might be or are used. Information in this document is believed to be reliable and accurate. However, CoiNel Technology Solutions LLP does not give any representations or warranties, expressed or implied, as to the completeness or accuracy of such information and shall have no liability for the consequences of use of such information. CoiNel Technology Solutions LLP reserves the right to make changes to information published in this document, at any time and without notice, including without limitation specifications and product descriptions. This document replaces and supersedes all information supplied prior to the publication hereof. Trademark All referenced trademarks, product names, brands and service names are the property of their respective owners. 22 THERMAL PRINTER – ESC COMMANDS MANUAL READER RESPONSE It is our intention to provide you with the best documentation possible to ensure successful use of the product. If you wish to provide your comments on organization, clarity, subject matter, and ways in which our documentation can better serve you, please mail your comments to support@coineltech.com or call our Technical Publications Officer at (+91) 80-23154423. Please list the following information, and use this outline to provide us with your comments about this document. 1. How does this document meet your hardware and software development needs? 2. Do you find the organization of this data sheet easy to follow? If not, why? 3. What additions to the data sheet do you think would enhance the structure and subject? 4. What deletions from the data sheet could be made without affecting the overall usefulness? 5. Is there any incorrect or misleading information (what and where)? 6. How would you improve this document? 7. How would you improve our software, systems, and products? AFTER SALE SERVICE We have special Technical Support Engineers to provide support and consultation in forms of telephone, E-mail and so on. TEL: +91-80-23154423 Technical Support E-mail: support@coineltech.com
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 22 Language : en-US Tagged PDF : Yes Title : THERMAL PRINTER – ESC COMMANDS MANUAL Author : Coinel Creator : Microsoft® Office Word 2007 Create Date : 2018:01:12 06:57:30 Modify Date : 2018:01:12 06:57:30 Producer : Microsoft® Office Word 2007EXIF Metadata provided by EXIF.tools