THERMAL PRINTER – ESC COMMANDS MANUAL Coi Nel

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 22

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
No-32, 2nd 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
COMMAND LIST
1.1
Command Description
1.1.1
Miscellaneous Commands
1.1.2
Character Commands
1.1.3
Print Position Commands
1.1.4
Line Spacing Commands
1.1.5
Print Commands
1.1.6
Image Commands
1.1.7
Barcode Commands
1.1.8
Status Commands
2
USING TERMINAL SOFTWARE
DISCLAIMER
5
THERMAL PRINTER ESC COMMANDS MANUAL
1. COMMAND LIST
SUMMARY
TYPE
COMMAND (HEX)
DESCRIPTION
MISCELLANEOUS COMMANDS
0x1B 0x40
Initialize Printer
0x1D 0x28 0x4B 0x02 0x00 0x31 M
Select Print Density
CHARACTER COMMANDS
0x1B 0x20 N
Set Right-Side Character Spacing
0x1B 0x21 N
Select Print Modes
0x1B 0x45 N
Emphasized mode(BOLD) on/0ff
0x1B 0x4D N
Select Character Font
0x1B 0x2D N
Select Underline
0x1D 0x42 N
Turn Black/White Reverse Print Mode
on/off
0x1D 0x21 N
Select Character Size
PRINT POSITION COMMANDS
0x09
Horizontal Tab
0x1D 0x4C nL nH
Set Left Margin
0x1D 0x57 nL nH
Set Print Area Width
0x1B 0x61 N
Select Justification
0x1B 0x24 nL nH
Set Absolute Print Position
0x1B 0x5C nL nH
Set Relative Print Position
LINE SPACING COMMANDS
0X1B 0X33 N
Set Line Spacing
PRINT COMMANDS
0x0A
Print and Line Feed
0x0C
Print and feed label to print starting
position (on label)
0x1B 0x4A N
Print and Feed Paper
0x1B 0x64 N
Print and Feed N Lines
IMAGE COMMANDS
0x1B 0x2A M nL nH
Select Bit-Image Mode
0x1C 0x70 N M
Print NV Bit Image
0x1C 0x71 N
Define NV Bit Image
0x1D 0x76 0x30 M xL xH yL yH
Print Raster Bit Image
0x1B 0x2B N xL xH yL yH
Save Indexed Based Image
0x1B 0x2C N M
Print Indexed Based Image
BARCODE COMMANDS
0x1D 0x48 N
Select Print Position of HRI Characters
0x1D 0x66 N
Select Font for HRI Characters
0x1D 0x68 N
Set bar Code Height
6
THERMAL PRINTER ESC COMMANDS MANUAL
0x1D 0x6B M
Print Barcode
0x1D 0x77 N
Set Barcode Width
STATUS COMMANDS
0x1D 0x72 N
Transmit Status
CUSTOMIZE COMMANDS
0x1D 0x28 0x45 0x04 0x00 0x05 0x74
nL nH
Auto-Off Timer Setting
0x1D 0x28 0x45 0x02 0x00 0x06 0x74
Transmit customized settings
0x1B 0x68
Temperature Response
0x1B 0x79
Voltage Response
0x1D 0x28 0x45 0x04 0x00 0x0D
d1d2d3d4
Set Bluetooth pairing pin
0x1D 0x28 0x45 0x00 0x00 0x0E data
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)
FUNCTION
FORMAT
ASCII
HEXA DECIMAL
LIST OF ASCII CHARACTERS
LIST OF HEXADECIMAL CHARACTERS
DESCRIPTION:
EXAMPLE
Command Use Example
NOTES:
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
Initialize Printer
FORMAT
ASCII
HEXA DECIMAL
ESC @
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
HEXA DECIMAL
GS ( K pL pH fn M
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
Set Right-Side Character Spacing
FORMAT
ASCII
HEXA DECIMAL
ESC SP n
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
Select Print Modes
FORMAT
ASCII
HEXA DECIMAL
ESC ! N
0x1B 0x21 N
DESCRIPTION: Selects the character font and styles.
N (bit format)
ON value
OFF value
Functionality
0th
1
0
Font selection
1st
NA
NA
-
2nd
NA
NA
-
3rd
1
0
Emphasize mode(Bold)
4th
1
0
Double height
5th
1
0
Double width
6th
NA
NA
-
7th
1
0
Under line mode
NA = Not assigned.
EXAMPLE
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
Emphasized mode(BOLD) on/0ff
FORMAT
ASCII
HEXA DECIMAL
ESC E N
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
Select Character Font
FORMAT
ASCII
HEXA DECIMAL
ESC M N
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
Select Underline
FORMAT
ASCII
HEXA DECIMAL
ESC N
0x1B 0x2D N
DESCRIPTION: Sets the underline mode using N. Here N is in hex format.
N
Functionality
0x00 or 0x30
Underline mode off
0x01 or 0x31
1-dot line underline mode
0x02 or 0x32
2-dot line underline mode
EXAMPLE
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
Turn Black/White Reverse Print Mode on/off
FORMAT
ASCII
HEXA DECIMAL
GS B N
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
Select Character Size
FORMAT
ASCII
HEXA DECIMAL
GS ! N
0x1D 0x21 N
DESCRIPTION: Selects the character height and width as below. Here N is in hex format.
N
Bit 6
Bit 5
Bit 4
Width
0x00
0
0
0
Normal
0x10
0
0
1
Normal x 2
0x20
0
1
0
Normal x 3
0x30
0
1
1
Normal x 4
0x40
1
0
0
Normal x 5
0x50
1
0
1
Normal x 6
0x60
1
1
0
Normal x 7
0x70
1
1
1
Normal x 8
N
Bit 2
Bit 1
Bit 0
Height
0x00
0
0
0
Normal
0x01
0
0
1
Normal x 2
0x02
0
1
0
Normal x 3
0x03
0
1
1
Normal x 4
0x04
1
0
0
Normal x 5
0x05
1
0
1
Normal x 6
0x06
1
1
0
Normal x 7
0x07
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 PRINT POSITION COMMANDS
0x09
Horizontal Tab
FORMAT
ASCII
HEXA DECIMAL
HT
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
Set Left Margin
FORMAT
ASCII
HEXA DECIMAL
GS L nL nH
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
Set Print Area Width
FORMAT
ASCII
HEXA DECIMAL
GS W nL nH
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
Select Justification
FORMAT
ASCII
HEXA DECIMAL
ESC a N
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
Justification
0x00 or 0x30
Left justification
0x01 or 0x31
Centered
0x02 or 0x32
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
Set Absolute Print Position
FORMAT
ASCII
HEXA DECIMAL
ESC $ nL nH
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
Set Relative Print Position
FORMAT
ASCII
HEXA DECIMAL
ESC \ nL nH
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
Set Line Spacing
FORMAT
ASCII
HEXA DECIMAL
ESC 3 N
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
Print and Line Feed
FORMAT
ASCII
HEXA DECIMAL
LF
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
Print and feed label to print starting position (on label)
FORMAT
ASCII
HEXA DECIMAL
FF
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
Print and Feed Paper
FORMAT
ASCII
HEXA DECIMAL
ESC J N
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
Print and Feed N Lines
FORMAT
ASCII
HEXA DECIMAL
ESC d N
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
Select Bit-Image Mode
FORMAT
ASCII
HEXA DECIMAL
ESC * M nL nH
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
Mode
Density
Data length
0x00
8 dot single-density
Single-density
nL + nH*256
0x01
8 dot double density
Double density
nL + nH*256
0x20
24 dot single-density
Single-density
(nL + nH*256) * 3
0x21
24 dot double density
Double density
(nL + nH*256) * 3
EXAMPLE
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
Print NV Bit Image
FORMAT
ASCII
HEXA DECIMAL
FS p N M
0x1C 0x70 N M
DESCRIPTION: Prints NV bit image N with mode specified by M. Here M is in hex format.
M
Mode
0x00 or 0x30
Normal
0x01 or 0x31
Double-width
0x02 or 0x32
Double-height
0x03 or 0x33
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
HEXA DECIMAL
FS q N
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
Description
0x1C 0x71
Define NV image
N
Total number of NV images to define
xL xH
Width of an NV image in bytes (xL + xH*256)
yL yH
Height of an NV image in bytes (yL + yH*256)
d1…dk
Data bytes to define an NV image
[xL xH yL yH d1...dk]N
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
HEXA DECIMAL
GS v 0 M xL xH yL yH d1…..dk
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
Description
M = 0x00 or 0x30
Normal
M = 0x01 or 0x31
Double-width
M = 0x02 or 0x32
Double-height
M = 0x03 or 0x33
Quadruple
xL xH
Image width in bytes(xL + xH*256)
yL yH
Image height in bytes(yL +yH*256)
d1…..dk
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
Save Indexed Based Image
FORMAT
ASCII
HEXA DECIMAL
ESC + N xL xH yL yH
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
Description
0x1B 0x2B
Save image
N
Index number for the image
xL xH
Image width in bytes(xL + xH*256)
yL yH
Image height in bytes(yL +yH*256)
d1…dk
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
Print Indexed Based Image
FORMAT
ASCII
HEXA DECIMAL
ESC , N M
0x1B 0x2C N M
DESCRIPTION: Prints saved image of index value N with mode specified by M. Here M is in hex format.
M
Mode
0x00 or 0x30
Normal
0x01 or 0x31
Double-width
0x02 or 0x32
Double-height
0x03 or 0x33
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
Select Print Position of HRI Characters
FORMAT
ASCII
HEXA DECIMAL
GS H N
0x1D 0x48 N
DESCRIPTION: Select print position of HRI characters. Here N is in hex format.
N
Mode
0x00 or 0x30
No HRI print
0x01 or 0x31
Top of the barcode
0x02 or 0x32
Bottom of the barcode
0x03 or 0x33
Both top and bottom of the barcode
EXAMPLE
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
Select Font for HRI Characters
FORMAT
ASCII
HEXA DECIMAL
GS f N
0x1D 0x66 N
DESCRIPTION: Selects a font for HRI characters when printing a barcode. Here N is in hex format.
N
Mode
0 or 0x30
Font A(12x24)
1 or 0x31
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
Set bar Code Height
FORMAT
ASCII
HEXA DECIMAL
GS h N
0x1D 0x68 N
DESCRIPTION: Sets the height of the bar code to N dots.
EXAMPLE
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.
16
THERMAL PRINTER ESC COMMANDS MANUAL
0x1D 0x6B M
Print Barcode
FORMAT
ASCII
HEXA DECIMAL
GS k M
0x1D 0x6B M
DESCRIPTION: Prints the barcode using the barcode system specified by M.
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
Print Barcode command
0 to 6
GS k M d1……dk NULL
0x1D 0x6B M d1……dk 0x00
65 to 73
GS k M N d1…..dN
0x1D 0x6B M N d1…….dN
M
Barcode type
Barcode level
0
UPC-A
Multi-level
1
UPC-E
Multi-level
2
JAN13
Multi-level
3
JAN8
Multi-level
4
CODE39
Binary-level
5
ITF
Binary-level
6
CODABAR
Binary-level
65
UPC-A
Multi-level
66
UPC-E
Multi-level
67
JAN13
Multi-level
68
JAN8
Multi-level
69
CODE39
Binary-level
70
ITF
Binary-level
71
CODABAR
Binary-level
72
CODE93
Multi-level
73
CODE128
Multi-level
EXAMPLE
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
Set Bar Code Width
FORMAT
ASCII
HEXA DECIMAL
GS w N
0x1D 0x77 N
DESCRIPTION: Sets the width of the barcode depending on value of N. Here N is in decimal format.
N
Multi-level Barcode
Binary-level Barcode
Module width
Narrow element
Wide element
2
2 dots
2 dots
5 dots
17
THERMAL PRINTER ESC COMMANDS MANUAL
3
3 dots
3 dots
8 dots
4
4 dots
4 dots
10 dots
5
5 dots
5 dots
13 dots
6
6 dots
6 dots
15 dots
EXAMPLE
0x1D 0x77 0x04
This command will set barcode width to 4 dots.
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
Transmit Status
FORMAT
ASCII
HEXA DECIMAL
GS r N
0x1D 0x72 N
DESCRIPTION: Printer will respond with paper status for this command for N = 1 or 0x31
Response
Paper status
0x00
Paper present
0x0c
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
HEXA DECIMAL
GS ( E 0x04 0x00 0x05 0x74 nL nH
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
HEXA DECIMAL
GS ( E 0x02 0x00 0x06 0x74
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
Temperature Response
FORMAT
ASCII
HEXA DECIMAL
ESC h
0x1B 0x68
DESCRIPTION: This command will respond the printer temperature.
EXAMPLE
0x1B 0x68
Printer will reply the its temperature.
NOTES: None.
0x1B 0x79
Voltage Response
FORMAT
ASCII
HEXA DECIMAL
ESC y
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
HEXA DECIMAL
GS ( E 0x04 0x00 0x0D d1d2d3d4
0x1D 0x28 0x45 0x04 0x00 0x0D d1d2d3d4
DESCRIPTION: This command will set the custom Bluetooth pairing pin of 4 digits.
EXAMPLE
0x1D 0x28 0x45 0x04 0x00 0x0D 9876
This will set the Bluetooth pairing code to 9876.
NOTES: The pin must be of 4 digits.
19
THERMAL PRINTER ESC COMMANDS MANUAL
0x1D 0x28 0x45 0x00 0x00 0x0E data
Set Bluetooth discoverability mode
FORMAT
ASCII
HEXA DECIMAL
GS ( E 0x00 0x00 0x0E data
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
Button Details
TP
Test Print
AL
Align Left
AC
Align Center
AR
Align Right
FF
Select Fixedsys Font
FC
Select courier font
SS
Select Font Size as small
SM
Select Font Size as medium
SXL
Select Font Size as XL
BARC
Barcode
FIMG
Print Image from Flash (internally
stored)
BMP
Print BMP image
RGL
Print Regional language
BD
Battery Charge detect (Returns battery
charge value and the same is displayed
on terminal)
PLD
Detect (Returns Platten status and the
same is displayed on terminal)
PPD
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
Transmit macros are the commands.
Note: In this software $ is equivalent to 0x
(hexadecimal)
You can give the name for the buttons as
required.
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

Navigation menu