0% found this document useful (0 votes)
34 views

58mm Programming Manual v1.0.0

This document provides a programming manual for a thermal receipt printer series. It contains 63 commands for controlling printer functions like setting print position, selecting fonts, printing barcodes, and more. Each command listing includes the name, format, valid values, description, usage details, and related commands. The commands are organized in alphabetical and functional groupings to aid users in programming and controlling the receipt printer.

Uploaded by

oscarjimenez80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

58mm Programming Manual v1.0.0

This document provides a programming manual for a thermal receipt printer series. It contains 63 commands for controlling printer functions like setting print position, selecting fonts, printing barcodes, and more. Each command listing includes the name, format, valid values, description, usage details, and related commands. The commands are organized in alphabetical and functional groupings to aid users in programming and controlling the receipt printer.

Uploaded by

oscarjimenez80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

RECEIPT PRINTER SERIES

Programming Manual

Thermal Receipt Printer Series

Version Date Content

V1.0.0 2016.05.19 Standard


Command Description Items

Command Notation:
1) [Name] Command function outline.

2) [Format] Command format expressed in ASCII, hexadecimal, and decimal codes.

Unless otherwise mentioned, the range of values are Decimal, for example 1 ≤ n ≤ 4 as

below, 1 is decimal not ASCII.

3) [Range] Argument value (Setting range) for the command.

4) [Description] Detailed command function description.

5) [Details] Describes the usage of the command in detail.

6) [Reference] Lists related commands.

7) [Default] Gives the default values, if any, for the command parameters.

Control Commands List in Alphanumeric Order

No. Command Function


1 HT Horizontal tab
2 LF Print and line feed
3 DLE EOT Transmit real-time status
4 DLE ENQ Real-time request to printer
5 DLE DC4 Generate pulse at real-time
6 ESC SP Set right-side character spacing
7 ESC ! Set print mode
8 ESC $ Set absolute print position
9 ESC % Select/cancel user-defined character set
10 ESC & Define user-defined character set
11 ESC * Specify bit image mode
12 ESC - Turn underline mode on/off
13 ESC 2 Select default line spacing
14 ESC 3 Set line spacing
15 ESC = Select peripheral device
16 ESC ? Cancel user-defined characters
17 ESC @ Initialize printer
18 ESC D Set Horizontal tab positions
19 ESC E Turn emphasized mode on/off
20 ESC G Turn double-strike mode on/off
21 ESC J Print and feed paper
22 ESC M Select character font
23 ESC R Specify an international character set

RECEIPT PRINTER
1
24 ESC V Turn 90° clockwise rotation mode on/off
25 ESC \ Set relative print position
26 ESC a Select justification
27 ESC c 3 Select paper sensor(s) to output paper end signals
28 ESC c 4 Select paper sensor(s) to stop printing
29 ESC c 5 Enable/disable panel buttons
30 ESC d Print and feed n lines
31 ESC p Generate pulse
32 ESC t Select character code table
33 ESC { Turn upside-down print mode on/off
34 FS P Print NV bit image
35 FS q Define NV bit image
36 GS ! Select character size
37 GS * Define downloaded bit image
38 GS / Print downloaded bit image
39 GS B Turn white/black reverse printing mode on/off
40 GS H Select print position of HRI characters
41 GS L Set left margin
42 GS P Set horizontal and vertical motion units
43 GS W Set printing area width
44 GS a Enable/disable Automatic Status Back (ASB)
45 GS f Select font for HRI characters
46 GS h Set bar code height
47 GS k Print bar code
48 GS r Transmit status
49 GS I Transmit printer ID
50 GS v 0 Print raster bit image
51 GS w Set bar code width

Chinese characters control commands


52 FS ! Set print mode(s) for Kanji characters
53 FS & Select Kanji character mode
54 FS - Turn underline mode on/off for Kanji characters
55 FS . Cancel Kanji character mode
56 FS 2 Define user-defined Kanji characters
57 FS S Set Kanji left and right spacing
58 FS W Turn quadruple-size mode on/off for Kanji characters

Black Mark related commands


59 GS ( F Set black mark position offset
60 GS FF Set black mark to the print starting position

Auto cutter related commands

RECEIPT PRINTER
2
61 GS V Select cut mode and execute a partial cut

Buzzer related commands


62 ESC B Beeps the buzzer when orders coming
63 ESC C Beeps the buzzer and flashes Error indicator when
orders coming

Ethernet printer status detection commands


64 ESC V Ethernet printer status detection

QR code commands
65 (K< Function 167> QR Code: Set the size of module
66 (K< Function 169> QR Code: Select the error correction level
67 (K< Function 180> QR Code: Store the data in the symbol storage area
68 (K< Function 181> QR Code: Print the symbol data in the symbol storage
area

1、HT Horizontal tab

[Format] ASCII HT
Hex 09
Decimal 9
[Description] Moves the print position to the next horizontal tab position.
[Details]
 This command is ignored unless the next horizontal tab position has been set.
 If the next horizontal tab position exceeds the printing area, the printer sets the printing position
to [Printing area width +1].
 The horizontal tab position is set by ESC D.
 If this command is received when the printing position is at [printing area width + 1], the
printer executes print buffer-full printing of the current line and horizontal tab processing from
the beginning of the next line.
 The default setting of the horizontal tab position for the paper roll is font A(12*24) every 8th
character(9th,17th,25th,…column).
 The below command is executed when the printer receive buffer is full:
In standard mode, prints the current line and sets the print position to the beginning of the
next line.
[Reference] ESC D

2、LF Print and line feed

[Format] ASCII LF
Hex 0A
Decimal 10
[Description] Prints the data in the print buffer and feeds one line based on the current line spacing.

RECEIPT PRINTER
3
[Details] This command sets the print position to the beginning of the line.
[Reference] ESC 2, ESC 3

3、DLE EOT n Transmit real-time status

[Format] ASCII DLE EOT n


Hex 10 04 n
Decimal 16 4 n
[Range] 1≤n≤4
[Description]
This command transmits the printer-related status specified by n as follows:
n=1: Transmit printer status
n=2: Transmit off-line status
n=3: Transmit error status
n=4: Transmit paper roll sensor status
[Details]
 The status is transmitted to the host upon being requested that can check the printer
operational condition with it and takes appropriate measures accordingly.
 This command should not be used within the data sequence of another command that consists
of 2 or more bytes.
 Even though the printer is not selected using ESC = (select peripheral device), this command
is effective.
 The printer transmits the current status; each status is represented by one byte data。
 The printer transmits the status without confirming whether the host computer can receive
data。
 The printer executes this command upon receiving it.
 The printer executes this command upon receiving it at any status.
n=1: Print status
Bit Binary Hex Decimal Status
0 0 00 0 Fixed to 0
1 1 02 2 Fixed to 1
0 00 0 Drawer open
2
1 04 4 Drawer close
0 00 0 On-line
3
1 08 8 Off-line
4 1 10 16 Fixed to 1
5,6 Undefined
7 0 00 00 Fixed to 0

n = 2: Off-line status

RECEIPT PRINTER
4
Bit Binary Hex Decimal Status
0 0 00 0 Fixed to 0
1 1 02 2 Fixed to 1
0 00 0 Cover is closed.
2
1 04 4 Cover is open.
0 00 0 Paper is not being fed by using the paper FEED button.
3
1 08 8 Paper is being fed by the paper FEED button.
4 1 10 16 Fixed to 1
0 00 0 Paper adequate
5
1 20 32 Paper shortage
0 00 0 No error.
6
1 40 64 Error has occurred
7 0 00 00 Fixed to 0

n = 3: Error status
Bit Binary Hex Decimal Status
0 0 00 0 Fixed to 0
1 1 02 2 Fixed to 1
2 --- --- undefined
0 00 0 No auto-cutter error.
3
1 08 8 Auto-cutter error occurred.
4 1 10 16 Fixed to 1
0 00 0 No unrecoverable error.
5
1 20 32 Unrecoverable error occurs.
0 00 0 Print head temperature and voltage normal
6
1 40 64 Print head temperature and voltage out of range
7 0 00 00 Fixed to 0

n = 4: Continuous paper sensor status


Bit Binary Hex Decimal Status
0 0 00 0 Fixed to 0
1 1 02 2 Fixed to 1
0 00 0 Paper roll near-end sensor: paper adequate.
2,3 Paper near-end is detected by the paper roll
1 0C 12
near-end sensor.
4 1 10 16 Fixed to 1
0 00 0 Paper roll sensor: Paper present.
5,6
1 60 96 Paper roll end detected by paper roll sensor.
7 0 00 00 Fixed to 0
[Reference] DLE ENQ, GS a, GS r

RECEIPT PRINTER
5
4、DLE ENQ n Real-time request to printer

[Format] ASCII DLE ENQ n


Hex 10 05 n
Decimal 16 5 n
[Range] 1 n ≤ 2
[Description]
Responds to a request from the host computer. n specifies the requests as follows:
n Request
1 Recover from an error and restart printing from the line where the error occurred
2 Recover from an error after clearing the receive and print buffers
[Details]
 This command is effective only when an auto-cutter error occurs.
 The serial interface printer starts processing data upon receiving this command.
 With a parallel interface model, this command can not be executed when the printer is busy.
 This command should not be contained within another command that consists of two or more
bytes.
 Even though the printer is disabled with ESC = (Select peripheral device), this command is still
effective.
[Reference] DLE EOT

5、DLE DC4 n m t Generate Pulse at real-time

[Format] ASCII DLE DC4 n m t


Hex 10 14 n m t
Decimal 16 20 n m t
[Range] n=1
m = 0, 1
1 ≤ t≤ 8
[Description] Output the pulse specified by t to connector pin m as following:
m Connector pin
0 Drawer kick-out connector pin 2
1 Drawer kick-out connector pin 5
Pulse ON time is [t x100 ms] and OFF time [t x100 ms].
[Details]
 When the pulse is output to the connector pin specified while ESC p or DEL DC4 is executed
while this command is processed, this command is ignored.
 The serial interface printer starts processing data upon receiving this command.
 With a parallel interface model, this command can not be executed when the printer is busy.
 If print data includes the same character strings as this command, the printer performs the
same operation specified by this command. The user must consider this.
 This command should not be contained within another command that consists of two or more
bytes.
 Even though the printer is disabled with ESC = (Select peripheral device), this command is still

RECEIPT PRINTER
6
effective.
[Reference] ESC p

6、ESC SP n Set right-side character spacing

[Format] ASCII ESC SP n


Hex 1B 20 n
Decimal 27 32 n
[Range] 0 ≤ n≤255
[Description]
Sets the character spacing for the right side of the character to [n × (horizontal or vertical motion
units) inch] .
[Details]
 When characters are enlarged, the right-side character spacing is n times normal value.
 This command sets values independently in each mode (standard and page modes).
 The horizontal and vertical motion unit is specified by GS P. Changing the horizontal or vertical
motion unit does not affect the current right-side spacing.
 The GS P command can change the horizontal (and vertical) motion unit. However, the value
cannot be less than the minimum horizontal movement amount, and it must be in even units of
the minimum horizontal movement amount.
 In standard mode, the horizontal motion unit is used.
 The maximum right-side spacing is 31.91mm (255/203 inches). Any setting exceeding the
maximum is converted to the maximum automatically.
[Default] n=0
[Reference] GS P

7、ESC ! n Select print mode

[Format] ASCII ESC ! n


Hex 1B 21 n
Decimal 27 33 n
[Range] 0 ≤ n ≤ 255
[Description] Selects print mode(s) using n as follows:

Bit Binary Hex Decimal Status


0 00 0 Character font A selected (12 × 24)
0
1 01 1 Character font B selected (9 × 17)
1,2 --- --- undefined
0 00 0 Emphasized mode not selected
3
1 08 8 Emphasized mode selected
0 00 0 Double-height mode not selected
4
1 10 16 Double-height mode selected
5 0 00 0 Double-width mode not selected

RECEIPT PRINTER
7
1 20 32 Double-width mode selected
6 --- --- undefined
0 00 0 c
7
1 80 128 Underline mode selected

[Details]
 When both double-height and double-width modes are selected, the characters will be
quadrupled.
 The printer can underline all characters, but can not underline the space set by HT or 90°
clockwise rotated characters.
 The thickness of the underline is that selected by ESC – , regardless of the character size.
 When some characters in a line are double or more height, all the characters on the line are
aligned at the baseline.
 ESC E can also turn on or off emphasized mode. However, the setting of the last received
command is effective.
 ESC – can also turn on or off underline mode. However, the setting of the last received
command is effective.
 GS ! can also select character size. However, the setting of the last received command is
effective.
 Emphasized mode is effective for alphanumeric and Kanji. All print modes except emphasized
mode is effective only for alphanumeric
[Default] n=0
[Reference] ESC -, ESC E, GS !

8、ESC $ nL nH Set absolute print position

[Format] ASCII ESC $ nL nH


Hex 1B 24 nL nH
Decimal 27 36 nL nH
[Range] 0≤nL ≤ 255
0 ≤nH≤255
[Description]
Sets the distance from the beginning of the line to the position at which subsequent characters are
to be printed. The distance from the beginning of the line to the print position is [( nL + nH × 256) ×
(vertical or horizontal motion units)] inches.
[Details]
 Any setting values that go beyond the printable area are ignored.
 Using GS P to set the horizontal motion unit and the vertical motion unit.
 In standard mode, the horizontal motion unit is used for the calculation
[Reference] ESC \, GS $, GS \, GS P

9、ESC % n Select/cancel user-defined character set

[Format] ASCII ESC % n

RECEIPT PRINTER
8
Hex 1B 25 n
Decimal 27 37 n
[Range] 0 ≤ n ≤255
[Description]
This command selects/deselects user-defined character set that is downloaded by user. To make it
valid, the least significant bit should be defined like following.
 When the LSB of n is 0, the user-defined character set is canceled.
 When the LSB of n is 1, the user-defined character set is selected.
[Details]
 When the user-defined character set is canceled, the internal character set is automatically
selected.
 n is available only for the least significant bit.
[Default] n=0
[Reference] ESC &, ESC ?

10、ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] Define user-defined character set

[Format] ASCII ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]


Hex 1B 26 y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]
Decimal 27 38 y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]
[Range] y=3
32 ≤ c1 ≤ c2 ≤ 127
0 ≤ x ≤ 12 Font A (12 × 24)
0 ≤ x ≤ 9 Font B (9 × 17)
0 ≤ d1 ... d(y × xk) ≤ 255
[Description]
This command defines user-defined characters for character codes in a designated range.
 y denotes the number of bytes in the vertical direction.
 c1 denotes the start character code, c2 denotes the end character code.
 x denotes the number of dots in the horizontal direction.
[Details]
 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.
 d is the dot data for the characters. The dot pattern is in the horizontal direction from the left
side.
 The data to define a user-defined character is (y × x) bytes.
 Set a corresponding bit to 1 to print a dot or 0 to not print a dot.
 The user-defined character definition is cleared when:
1、ESC @ is executed.
2、ESC ? is executed.
3、FS q is executed.
4、GS * is executed.
5、The printer is reset or the power is turned off.
 When the user-defined characters are defined in font B (9×17), only the most significant bit of
RECEIPT PRINTER
9
the 3rd byte of data in vertical direction is effective.
[Default] The internal character set
[Reference] ESC %, ESC ?
[Example]
 When font A (12 × 24) is selected

 When font B (9 × 17) is selected.

RECEIPT PRINTER
10
11、ESC * m nL nH d1... dk Specify bit-image mode

[Format] ASCII ESC * m nL nH d1...dk


Hex 1B 2A m nL nH d1...dk
Decimal 27 42 m nL nH d1...dk
[Range] m = 0, 1, 32, 33
0 ≤ nL ≤ 255
0 ≤ nH ≤ 3
0 ≤ d ≤255
[Description]
Specifies the bit image for the mode m as to the number of dots specified by nL and nH.
m Mode Vertical direction Horizontal direction
Number of Dot density Dot density Number of bytes(k)
dots (DPI) (DPI)
0 8-dot single-density 8 67 DPI 100 DPI nL + nH × 256
1 8-dot double-density 8 67 DPI 200 DPI nL + nH × 256
32 24-dot single-density 24 200 DPI 100 DPI ( nL + nH × 256) × 3
33 24-dot double-density 24 200 DPI 200 DPI ( nL + nH × 256) × 3
[DPI: Dots Per Inch, dot/25.4mm{1”}]
[Details]
 If the value of m is beyond the conditions, nL and the subsequent data after m will be treated as
normal data.
 The nL and nH indicate the number of dots of the bit image in the horizontal direction. The
number of dots is calculated by nL + nH × 256.
 If the bit image data being entered is beyond the number of dots to be printed, the surplus will
be discarded.

RECEIPT PRINTER
11
 d specifies the bit image data with 1 for printed data and 0 for not printed.
 After printing a bit image, the printer returns to normal data processing mode.
 This command is not affected by print modes (emphasized, double-strike, underline, character
size or white/black reverse printing), except upside-down printing mode.
 If the width of the printing area set by GS L and GS W less than the width required by the data
sent with the ESC * command, the following will be performed on the line in question (but the
printing cannot exceed the maximum printable area):
1、The width of the printing area is extended to the right to accommodate the amount of data.
2、If step1 does not provide sufficient width for the data, the left margin is reduced to accommodate
the data.
 The relationship between the image data and the dots to be printed is as follows:
When 8-dot bit image is selected:

When 24-dot bit image is selected:

RECEIPT PRINTER
12
12、ESC – n Turn underline mode on/off

[Format] ASCII ESC - n


Hex 1B 2D n
Decimal 27 45 n
[Range] 0 ≤ n ≤2, 48 ≤n ≤ 50
[Description] The underline mode varied depending on the following values of n:

n Function
0, 48 Turns off underline mode
1, 49 Turns on underline mode (set at 1-dot thick)
2, 50 Turns on underline mode (set at 2-dot thick)
[Details]
 The printer can underline all characters (including right-side character spacing), but cannot
underline the space set by HT.
 The printer cannot underline 90° clockwise rotated characters and white/black inverted
characters.
 When underline mode is turned off by setting the value of n to 0 or 48, 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.
 Using ESC !, the underline mode can be activated/deactivated as well. However, that the last
received command is effective.
 This command does not affect the setting of Kanji characters.
[Default] n=0
[Reference] ESC !

13、ESC 2 Select default line spacing

[Format] ASCII ESC 2


Hex 1B 32
Decimal 27 50
[Description] Selects approximately 3.75mm line spacing
[Details] The line spacing can be set independently in standard mode and in page mode.
[Reference] ESC 3

14、ESC 3 n Set line spacing

[Format] ASCII ESC 3 n


Hex 1B 33 n
Decimal 27 51 n
[Range] 0 ≤ n ≤ 255
[Description] Sets the line spacing as [n×(vertical or horizontal motion units)] inches.
[Details]

RECEIPT PRINTER
13
 The line spacing is settable independently for each of standard and page modes.
 The horizontal and vertical motion unit is specified by GS P. Changing the horizontal or vertical
motion unit does not affect the current line spacing.
 In standard mode, the vertical motion unit is used。
 In page mode, this command functions as follows, depending on the direction and starting
position of the printable area:
1、When the starting position is set to the upper left or lower right of the printable area using ESC T,
the vertical motion unit (y) is used.
2、When the starting position is set to the upper right or lower left of the print able area using ESC T,
the horizontal motion unit (x) is used.
 The maximum line spacing is 956mm. When the setting value exceeds the maximum, it is
converted to the maximum automatically.
[Default] Line spacing equivalent to approximately 3.75mm.
[Reference] ESC 2, GS P

15、ESC = n Select peripheral device

[Format] ASCII ESC = n


Hex 1B 3D n
Decimal 27 61 n
[Range] 0≤ n ≤ 1
[Description] Selects device to which host computer sends data, using n as follows:

Bit 1/0 Hex Decimal Function


0 00 0 Printer disabled
0
1 01 1 Printer enabled
1-7 --- --- Undefined
[Details]
When the printer is disabled, it ignores all other commands except for real-time commands (DLE
EOT, DLE ENQ, DLE DC4).
[Default] n=1

16、ESC ? n Cancel user-defined characters

[Format] ASCII ESC ? n


Hex 1B 3F n
Decimal 27 63 n
[Range] 32 ≤n ≤127
[Description] Cancel user-defined characters.
[Details]
 This command cancels the pattern defined for the character code specified by n. After the
user-defined characters are canceled, the corresponding pattern for the internal character is
printed.
 If a user-defined character has not been defined for the specified character code, the printer

RECEIPT PRINTER
14
ignores this command.
[Reference] ESC &, ESC %

17、ESC @ Initialize printer

[Format] ASCII ESC @


Hex 1B 40
Decimal 27 64
[Description]
Clears the data in the print buffer and resets the printer mode to the mode that was in effect when
the power was turned on.
[Details]
 The DIP switch settings are not checked again.
 The data in the receive buffer is not cleared.
 The NV bit image data is not cleared.
 The data of the user NV memory is not cleared.

18、ESC D n1...nk NUL Set horizontal tab positions

[Format] ASCII ESC D n1...nk NUL


Hex 1B 44 n1...nk 00
Decimal 27 68 n1...nk 0
[Range] 1 ≤ n ≤ 255
0 ≤ k ≤ 32
[Description] Set horizontal tab positions.
 n specifies the column number for setting a horizontal tab position from the beginning of the
line.
 k indicates the total number of horizontal tab positions to be set.
[Details]
 The horizontal tab position is stored as a value of [character width × n] measured from the
beginning of the line. The character width includes the right-side character spacing, and
double-width characters are set with twice the width of normal characters.
 This command cancels the previous horizontal tab settings.
 When setting n = 8, the print position is moved to column 9.
 Up to 32 tab positions (k = 32) can be set. Data exceeding 32 tab positions is processed as
normal data.
 Transmit [n] k in ascending order and place a NUL code 0 at the end.
 When [n] k is less than or equal to the preceding value [n] k-1, tab setting is finished and the
following data is processed as normal data.
 ESC D NUL cancels all horizontal tab positions.
 The previously specified horizontal tab positions do not change, even if the character width
changes.
 The character width is settable independently for each standard and page mode.
[Default]

RECEIPT PRINTER
15
The default tab positions are at intervals of 8 characters (columns 9, 17, 25,...) for font A (12 ×24)。
[Reference] HT

19、ESC E n Turn emphasized mode on/off

[Format] ASCII ESC E n


Hex 1B 45 n
Decimal 27 69 n
[Range] 0 ≤ n ≤ 255
[Description] Turns emphasized mode on or off.
 When the LSB of n is 0, emphasized mode is turned off.
 When the LSB of n is 1, emphasized mode is turned on.
[Details] Only the least significant bit of n is enabled.
 This command and ESC ! turn on and off emphasized mode in the same way, the setting of the
last received command is effective.
[Default] n=0
[Reference] ESC !

20、ESC G n Turn on/off double-strike mode

[Format] ASCII ESC G n


Hex 1B 47 n
Decimal 27 71 n
[Range] 0 ≤ n ≤ 255
[Description] Turn double-strike mode on or off.
 When the LSB of n is 0, double-strike mode is turned off.
 When the LSB of n is 1, double-strike mode is turned on.
[Details] Only the least significant bit of n is enabled.
 Printer output is the same in double-strike mode and in emphasized mode.
[Default] n=0
[Reference] ESC E

21、ESC J n Print and feed paper

[Format] ASCII ESC J n


Hex 1B 4A n
Decimal 27 74 n
[Range] 0 ≤n ≤ 255
[Description]
Prints the data in the print buffer and feeds the paper [n × vertical or horizontal motion unit] inches.
[Details]
 After printing is completed, this command sets the print starting position to the beginning of the
line.
 The paper feed amount set by this command does not affect the values set by ESC 2 or ESC 3.

RECEIPT PRINTER
16
 The horizontal and vertical motion unit is specified by GS P.
 In standard mode, the printer uses the vertical motion unit (y).
 The maximum line spacing is 956mm. When the setting value exceeds the maximum, it is
converted to the maximum automatically.
[Reference] GS P

22、ESC M n Select character font

[Format] ASCII ESC M n


Hex 1B 4D n
Decimal 27 77 n
[Range] n = 0, 1, 48, 49
[Description] Selects character fonts.
n Function
0,48 Character font A (12 × 24) selected.
1,49 Character font B (9 × 17) selected.

23、ESC R n Specify an international character set

[Format] ASCII ESC R n


Hex 1B 52 n
Decimal 27 82 n
[Range] 0 ≤n ≤ 15
[Description] Selects an international character set n from the following table::
n Character
0 U.S.A
1 France
2 Germany
3 U.K.
4 Denmark I
5 Sweden
6 Italy
7 Spain I
8 Japan
9 Norway
10 Denmark II
11 Spain II
12 Latin
13 Korean
14 Slovenia/Croatia
15 Chinese
[Default] n=0

RECEIPT PRINTER
17
24、ESC V n Turn 90° clockwise rotation mode on/off

[Format] ASCII ESC V n


Hex 1B 56 n
Decimal 27 86 n
[Range] 0 ≤ n ≤ 1, 48 ≤ n ≤ 49
[Description] Turn 90° clockwise rotation mode on/off, n is used as follows:
n Function
0,48 Turn off 90° clockwise rotation mode
1,49 Turn on 90° clockwise rotation mode
[Details]
 This command affects printing in standard mode.
 When underline mode is turned on, the printer does not underline 90° clockwise-rotated.
 Double-width and double-height commands in 90° rotation mode enlarge characters in the
opposite directions from double-height and double- width commands in normal mode.
[Default] n=0
[Reference] ESC !, ESC -

25、ESC \ nL nH Set relative print position

[Format] ASCII ESC \ nL nH


Hex 1B 5C nL nH
Decimal 27 92 nL nH
[Range] 0 ≤ nl ≤ 255 0 ≤ nH ≤ 255
[Description]
Sets the print starting position based on the current position by using the horizontal or vertical
motion unit. This command sets the distance from the current position to [( nL + nH×256)×
horizontal or vertical motion unit].
[Details]
 Any setting that exceeds the printable area is ignored.
 When pitch N is specified to the right: nL+ nH×256 = N
 When pitch N is specified to the left (the negative direction), use the complement of 65536.
When pitch N is specified to the left: nL+ nH×256 = 65536 - N.
 The print starting position moves from the current position to [ N×horizontal or vertical motion
unit].
 The horizontal and vertical motion unit is specified by GS P.
 In standard mode, the horizontal motion unit is used.
[Reference] ESC $, GS P

26、ESC a n Select justification

[Format] ASCII ESC a n


Hex 1B 61 n
Decimal 27 97 n

RECEIPT PRINTER
18
[Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
[Description]
Aligns all the data in one line to the specified position, n selects the justification as follows:
n justification
0,48 Left justification
1, 49 Center justification
2, 50 Right justification
[Details]
 The command is enabled only when processed at the beginning of the line in standard mode.
 If this command is input in page mode, the printer performs only internal flag operations.
 This command executes justification in the printing area.
 This command justifies the space area according to HT, ESC $ or ESC \.
[Default] n=0
[Example]

27、ESC c 3 n Select paper sensor(s) to output paper end signals

[Format] ASCII ESC c 3 n


Hex 1B 63 33 n
Decimal 27 99 51 n
[Range] 0 ≤ n ≤ 255
[Description]
Select the paper sensor(s) to output paper end signals. Each bit of n is used as follows:
Bit Off/On Hex Decimal Function
0 Off 00 0 Paper roll near-end sensor disabled
On 01 1 Paper roll near-end sensor enabled
1 Off 00 0 Paper roll near-end sensor disabled
On 02 2 Paper roll near-end sensor enabled
2 Off 00 0 Paper roll end sensor disabled
On 03 3 Paper roll end sensor enabled
3 Off 00 0 Paper roll end sensor disabled
On 04 4 Paper roll end sensor enabled
4-7 - - - Undefined
[Details]
 It is possible to select multiple sensors to output signals. Then, if any of the sensors detects a
paper end, the paper end signal is output.
 The command is available only with a parallel interface and is ignored with a serial interface.
RECEIPT PRINTER
19
 Sensor is switched when executing this command. The paper end signal switching be delayed
depending on the receive buffer state.
 If either bit 0 or bit 1 is ON, the paper roll near-end sensor is selected as the paper sensor
outputting paper-end signals.
 If either bit 2 or bit 3 is ON, the paper roll end sensor is selected as the paper sensor outputting
paper-end signals.
 When all the sensors are disabled, the paper end signal always outputs a paper present status.
[Default] n = 15

28、ESC c 4 n Select paper sensor(s) to stop printing

[Format] ASCII ESC c 4 n


Hex 1B 63 34 n
Decimal 27 99 52 n
[Range] 0 ≤ n ≤ 255
[Description]
Selects the paper sensor(s) used to stop printing when a paper-end is detected, using n as follows:
Bit Off/On Hex Decimal Function
0 Off 00 0 Paper roll near-end sensor disabled
On 01 1 Paper roll near-end sensor enabled
1 Off 00 0 Paper roll near-end sensor disabled
On 02 2 Paper roll near-end sensor enabled
2-7 - - - Undefined
[Details]
 When a paper sensor is enabled with this command, printing is stopped only when the
corresponding paper is selected for printing.
 When a paper -end is detected by the paper roll sensor, the printer goes offline after printing
stops.
 When either bit 0 or 1 is ON, the printer selects the paper roll near-end sensor for the paper
sensor to stop printing.
[Default] n = 0

29、ESC c 5 n Enable/disable panel buttons

[Format] ASCII ESC c 5 n


Hex 1B 63 35 n
Decimal 27 99 53 n
[Range] 0 ≤ n ≤ 255
[Description] Enable or disable the panel buttons.
 When the LSB of n is 0, the panel buttons are enabled.
 When the LSB of n is 1, the panel buttons are disabled.
[Details]
 Only the lowest bit of n is valid.

RECEIPT PRINTER
20
 When the panel buttons are disabled, none of them are usable.
 The panel buttons always are usable when executing the macro command.
[Default] n=0

30、ESC d n Print and feed n lines

[Format] ASCII ESC d n


Hex 1B 64 n
Decimal 27 100 n
[Range] 0 ≤n ≤ 255
[Description] Prints the data in the print buffer and feeds n lines.
[Details]
 This command sets the print starting position to the beginning of the line.
 This command does not affect the line spacing set by ESC 2 or ESC 3.
 The maximum paper feed amount is 1016 mm (40 inches). If the paper feed amount (n x line
spacing) of more than 1016 mm (40 inches) is specified, the printer feeds the paper only 1016
mm (40 inches).
[Reference] ESC 2, ESC 3

31、ESC p m t1 t2 Generate pulse

[Format] ASCII ESC p m t1 t2


Hex 1B 70 m t1 t2
Decimal 27 112 m t1 t2
[Range] m = 0, 1, 48, 49
0 ≤ t1 ≤ 255, 0 ≤ t2 ≤ 255
[Description] Outputs the pulse specified by t1 and t2 to connector pin m as follows:
M Connector pin
0, 48 Drawer kick-out connector pin 2
1, 49 Drawer kick-out connector pin 5
[Details]
 The pulse ON time is [t1 × 2 ms] and the OFF time is [t2 × 2 ms].
 If t2 < t1, the OFF time is [t1 × 2 ms].
[Reference] DLE DC4

32、ESC t n Select character code table

[Format] ASCII ESC t n


Hex 1B 74 n
Decimal 27 116 n
[Range] 0 ≤n ≤ 10, 16 ≤n ≤ 30, n=255
[Description] Specifies code page according to the value of n as follows:
n page
0 PC437 [U.S.A,Standard Europe]

RECEIPT PRINTER
21
1 Katakana
2 PC850 [Multilingual]
3 PC860 [Portuguese]
4 PC863 [Canadian-French]
5 PC865 [Nordic]
6 West Europe
7 Greek
8 Hebrew
9 PC755: East Europe
10 Iran
16 WPC1252
17 PC866:Cyrillic #2
18 PC852: Latin2
19 PC858
20 Iran ll
21 Latvian
22 Arabic
23 PT151,1251
24 PC747
25 WPC1257
27 Vietnam
28 PC864
29 PC1001
30 Uygur
255 Thai
[Details] Code page supported by reference to printer self-test page.
[Default] n=0

33、ESC { n Turn upside-down print mode on/off

[Format] ASCII ESC { n


Hex 1B 7B n
Decimal 27 123 n
[Range] 0 ≤ n ≤ 255
[Description] Turn upside-down printing mode on or off.
 When the LSB of n is 0, upside-down printing mode is turned off.
 When the LSB of n is 1, upside-down printing mode is turned on.
[Details]
 Only the lowest bit of n is valid.
 This command is enabled only when processed at the beginning of a line in standard mode.
 When this command is input in page mode, the printer performs only internal flag operations.
 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.

RECEIPT PRINTER
22
[Default] n=0
[Example]

34、FS p n m Print NV bit image

[Format] ASCII FS p n m
Hex 1C 70 n m
Decimal 28 112 n m
[Range] 1 ≤ n ≤ 255 0 ≤ m ≤ 3, 48 ≤ m ≤51
[Description] Prints NV bit image n using the mode specified by m as follows:
m Mode Vertical Dot Density (DPI) Horizontal Dot Density(DPI)
0, 48 Normal 200 200
1, 49 Double-width 200 100
2, 50 Double-height 100 200
3, 51 Quadruple 100 100
 n is the number of the NV bit image (defined using the FS q command).
 m specifies the bit image mode.
[Details]
 NV bit image means a bit image which is defined in a non-volatile memory by FS q and printed
by FS p.
 This command is not effective when the specified NV bit image has not been defined.
 In standard mode, this command is effective only when there is no data in the print buffer.
 This command is not affected by print modes (emphasized, double-strike, double-height,
double-width, underline, character size, white/black reverse printing, or 90° rotated characters,
etc.), except upside-down printing mode.
 The printer does not print the NV bit image that is beyond one line of print area.
 This command feeds dots (for the height n of the NV bit-image) in normal and double-width
modes, and feeds n×2dots (for the height n of the NV bit-image) in double-height and
quadruple modes, regardless of the line spacing specified by ESC 2 or ESC 3.
 After printing the bit image, this command sets the print position to the beginning of the line and
processes the data that follows as normal data.
[Reference] ESC *, FS q, GS /, GS v 0

RECEIPT PRINTER
23
35、FS q n [xL xH yL yH d1...dk]1...[xL xH yL yH d1...dk]n Define NV bit image

[Format] ASCII FS q n [ xL xH yL yH d1...dk]...[ xL xH yL yH d1...dk]


Hex 1C 71 n [xL xH yL yH d1...dk]...[ xL xH yL yH d1...dk]
Decimal 28 113 n [xL xH yL yH d1...dk]...[ xL xH yL yH d1...dk]
[Range] 1 ≤ n ≤ 255
0 ≤ xL ≤ 255
1 ≤ ( xL + xH × 256) ≤ 1023
1 ≤ ( yL + yH × 256) ≤ 288
0 ≤ d ≤ 255
k = ( xL + xH × 256) × ( yL + yH × 256) × 8
The capacity of NV memory area is 8096bytes (max).
[Description] Defines the NV bit image in the NV memory.
 n denotes the number of the NV being defined.
 xL, xH set the number of dots in the horizontal directions to (xL+xH×256)×8 for the NV bit
image.
 yL, yH set the number of dots in the vertical directions to (yL+yH×256)×8 for the NV bit image.
[Details]
 Excessive execution of this command may destroy the Flash memory. We recommend no
more than 10 times per day for writing data to the Flash memory.
 This command cancels all NV bit images that have already been defined by this command. The
printer can not redefine only one of several data definitions previously defined. In this case, all
data needs to be sent again.
 During processing this command, the printer is in BUSY when writing the data to the NV user
memory and stops receiving data. Therefore it is prohibited to transmit the data including the
real-time commands during the execution of this command.
 NV bit image means a bit image which is defined in a non-volatile memory by FS q and printed
by FS p.
 In standard mode, this command is effective only when processed at the beginning of the line.
 This command is effective when 7 bytes <FS~yH> is processed as a normal value.
 When the NV bit image bytes is exceeded the range for the left of xL, xH, yL, yH defined, the
printer processes the data which xL, xH, yL, yH defined.
 In the first group of NV bit images, when any of the parameters xL, xH, yL, yH is out of the
definition range, this command is disabled.
 In groups of NV bit images other than the first one, when the printer processes xL, xH, yL, yH
out of the defined range, it stops processing this command and starts writing into the NV
images. At this time, NV bit images that have been defined are disabled (undefined), but any
NV bit images before that are enabled.
 d indicates the definition data. In data (d) a 1 bit specifies a dot to be printed and a 0 bit
specifies a dot not to be printed.
 This command defines n as the number of a NV bit image. Numbers rise in order from NV bit
image. Therefore, the first data group [xL xH yL yH d1...dk] is NV bit image 1, and the last data
group [xL xH yL yH d1...dk] is NV bit image n. The total agrees with the number of NV bit
images specified by command FS p.
 A definition data of a NV bit image consists of [xL xH yL yH d1...dk]. Therefore, when only one

RECEIPT PRINTER
24
NV bit image is defined n=1, the printer processes a data group [xL xH yL yH d1...dk] once.
The printer uses ([data: (xL+xH×256)×(yL+yH ×256)×8]+[header: 4]) bytes of NV memory.
 The definition area in this printer is a maximum of 64K bits (8K bytes). This command can
define several NV bit images, but cannot define a bit image data whose total capacity [bit
image data header] exceeds 64K bits (8K bytes).(different capacity by different printer, please
refer to the print specification).
 The printer is busy immediately before writing into NV memory.
 During processing this command, the printer neither transmits the status, nor executes
status queries.
 When this command is received during macro definition, the printer ends macro definition, and
begins performing this command.
 Once a NV bit image is defined, it is not erased by performing ESC @, reset, and power off.
 This command performs only definition of a NV bit image and does not perform printing.
Printing of the NV bit image is performed by the FS p command.
[Reference] FS p
[Example] when xL = 64, xH = 0, yL = 96, yH = 0

RECEIPT PRINTER
25
36、GS ! n Select character size

[Format] ASCII GS ! n
Hex 1D 21 n
Decimal 29 33 n
[Range] 0 ≤ n ≤ 255
(1 ≤ vertical number of times ≤ 8,1 ≤ horizontal number of times ≤ 8)
[Description]
One byte has 8 bits, selects the character height using bits 0 to 2 and selects the character width
using bits 4 to 6, as follows:
Character width selection
Enlarged in Horizontal
Bit6 Bit5 Bit4 Hex Decimal
direction
0 0 0 00 0 1 (Normal)
0 0 1 10 16 2 (Double-width)
0 1 0 20 32 3
0 1 1 30 48 4
1 0 0 40 64 5
1 0 1 50 80 6
1 1 0 60 96 7
1 1 1 70 112 8

Character height selection


Enlarged in Horizontal
Bit6 Bit5 Bit4 Hex Decimal
direction
0 0 0 00 0 1 (Normal)
0 0 1 10 16 2 (Double-width)
0 1 0 20 32 3
0 1 1 30 48 4
1 0 0 40 64 5
1 0 1 50 80 6
1 1 0 60 96 7
1 1 1 70 112 8

[Details]
 This command is all characters (alphanumeric and Kanji) effective except for HRI characters.
 If n is outside of the defined range, this command is ignored.
 In standard mode, the vertical direction is the paper feed direction, and the horizontal direction
is perpendicular to the paper feed direction. However, when character orientation changes in
90° clockwise-rotation mode, the relationship between vertical and horizontal directions is
reversed.
 In page mode, vertical and horizontal directions are based on the character orientation.
 When characters are enlarged with different sizes on one line, all the characters on the line are
aligned at the baseline.

RECEIPT PRINTER
26
 ESC ! command can also turn double-width and double-height modes on or off. However, the
setting of the last received command is effective.
[Default] n=0
[Reference] ESC !

37、GS * x y d1...d(x × y × 8) Define downloaded bit image

[Format] ASCII GS * x y d1...d(x × y × 8)


Hex 1D 2A x y d1...d(x × y × 8)
Decimal 29 42 x y d1...d(x × y × 8)
[Range] 1 ≤ x ≤ 255, 1 ≤ y ≤ 48
x × y ≤ 912
0 ≤ d ≤ 255
[Description]
Defines a downloaded bit image using the number of dots specified by x and y.
 x specifies the number of dots in the horizontal direction.
 y specifies the number of dots in the vertical direction.
[Details]
 The number of dots in the horizontal direction is x × 8, in the vertical direction it is y × 8.
 If x × y is out of the specified range, this command is disabled.
 The d indicates bit-image data. Data (d) specifies a bit printed to 1 and not printed to 0.
 The downloaded bit image definition is cleared when:
1. ESC @ is executed.
2. ESC & is executed.
3. FS q is executed.
4. Printer is reset or the power is turned off.
 The following figure shows the relationship between the downloaded bit image and the printed
data:

[Reference] GS /

RECEIPT PRINTER
27
38、GS / m Print downloaded bit image

[Format] ASCII GS / m
Hex 1D 2F m
Decimal 29 47 m
[Range] 0 ≤ m ≤ 3, 48 ≤ m ≤ 51
[Description] Print a downloaded bit image using the mode specified by m.
m selects a mode from the table below:
m Mode Vertical Dot Density (DPI) Horizontal Dot Density (DPI)
0, 48 Normal 200 200
1, 49 Double-Width 200 100
2, 50 Double-Height 100 200
3, 51 Quadruple 100 100
[Details]
 This command is ignored when if a downloaded bit image is not defined.
 In standard mode, this command works only when the print buffer is empty.
 Except for upside-down printing mode, none of print mode such as emphasized, double-strike,
underline, character size, or white/black reverse printing, affects the printing of the downloaded
bit image.
 If the downloaded bit-image to be printed exceeds the printable area, the excess data is not
printed.
 The bit image to be printed using this commands is downloaded to RMA not FLASH,
corresponding image number is set by the GS *
[Reference] GS *

39、GS B n Turn white/black reverse printing mode on/off

[Format] ASCII GS B n
Hex 1D 42 n
Decimal 29 66 n
[Range] 0 ≤ n ≤ 255
[Description] Turn on or off white/black reverse printing mode by setting the least significant bit of n.
 When the LSB of n is 0, white/black reverse mode is turned off.
 When the LSB of n is 1, white/black reverse mode is turned on.
[Details]
 Only the lowest bit of n is valid.
 This command affects all characters except for HRI characters.
 When white/black reverse printing mode is on, it also applied to character spacing set by ESC
SP.
 This command does not affect bit image, user-defined bit image, bar code, HRI characters, and
spacing skipped by HT, ESC $, and ESC \.
 This command does not affect the space between lines.
 White/black reverse mode has a higher priority than underline mode. Even if underline mode is
on, it is disabled (but not canceled) when white/black reverse mode is selected. Underline

RECEIPT PRINTER
28
mode works when white/black reverse mode is not selected.
[Default] n=0

40、GS H n Select print position for HRI characters

[Format] ASCII GS H n
Hex 1D 48 n
Decimal 29 72 n
[Range] 0 ≤ n ≤ 3, 48 ≤ n ≤ 51
[Description] Select the printing position of HRI characters when printing a bar code.
The printing position is set according to the value of as follows:
n Printing position
0, 48 Not printed
1, 49 Above the bar code
2, 50 Below the bar code
3, 51 Both above and below the bar code
 HRI indicates Human Readable Interpretation.
[Details] HRI characters are printed using the font specified by GS f.
[Default] n=0
[Reference] GS f, GS k

41、GS L nL nH Set left margin

[Format] ASCII GS L nL nH
Hex 1D 4C nL nH
Decimal 29 76 nL nH
[Range] 0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
[Description] Set the left margin specified to [(nL + nH × 256) × (horizontal motion units)] inches.

[Details]
 This command is effective only processed at the beginning of the line in standard 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.
[Default] nL = 0, nH = 0
[Reference] GS P, GS W

RECEIPT PRINTER
29
42、GS P x y Set horizontal and vertical motion units

[Format] ASCII GS P x y
Hex 1D 50 x y
Decimal 29 80 x y
[Range] 0 ≤ x ≤ 255
0 ≤ y ≤255
[Description]
 Sets the horizontal and vertical motion units to approximately 25.4/ x mm {1/ x inches} and
approximately 25.4/ y mm {1/ y inches}, respectively.
 When x and y are set to 0, the default setting of each value is used.
[Details]
 The horizontal direction is perpendicular to the paper feed direction and the vertical direction is
the paper feed direction.
 In standard mode, the following commands use x or y, regardless of character rotation
(upside-down or 90° clockwise rotation):
① Commands using x: ESC SP, ESC $, ESC \, FS S, GS L, GS W
② Commands using y: ESC 3, ESC J, GS V
 The command does not affect the previously specified values.
 The calculated result from combining this command with others is truncated to the minimum
value of the mechanical pitch.
 1 inch=25.4mm.
[Default] x = 200, y = 200, one motion unit is one print point. Horizontal distance is
approximately 1/8mm; vertical distance is approximately 1/7mm.
[Reference] ESC SP, ESC $, ESC 3, ESC J, ESC W, ESC \, GS $, GS L, GS V, GS W, GS \

43、GS W nL nH Set printing area width

[Format] ASCII GS W nL nH
Hex 1D 57 nL nH
Decimal 29 87 nL nH
[Range] 0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
[Description] Sets the printing area width to [(nL + nH × 256) × (horizontal motion units)] inches.

[Details]
 This command is effective only processed at the beginning of the line.
 The printing area width is not effective in page mode; the printer treats the data as normal data.
 This command does not affect printing in page mode.

RECEIPT PRINTER
30
 When (left margin + printing area width) exceeds the printable area, the printing area width is
automatically set to (printing area width - left margin).
 The horizontal and vertical motion units are specified by GS P. Changing the horizontal and
vertical motion units does not affect the current left margin.
 The horizontal motion unit (x) is used for calculating the printing area width.
[Default] nL = 76, nH = 2
[Reference] GS L, GS P

44、GS a n Enable/disable Automatic Status Back (ASB)

[Format] ASCII GS a n
Hex 1D 61 n
Decimal 29 97 n
[Range] 0 ≤ n ≤ 255
[Description] Enables or disables ASB and specifies the status items to include, using n as follows:
Bit Off/On Hex Decimal Status for ASB
0 Off 00 0 Drawer kick-out, connector pin 3 status
disabled.
On 01 1 Drawer kick-out, connector pin 3 status
enabled.
1 - - - Undefined.
2 Off 00 0 Error status disabled.
On 04 4 Error status enabled.
3 Off 00 0 Paper roll sensor status disabled.
On 08 8 Paper roll sensor status enabled.
4-7 - - - Undefined.
[Default] n=0

45、GS f n Select font for HRI characters

[Format] ASCII GS f n
Hex 1D 66 n
Decimal 29 102 n
[Range] n = 0, 1, 48, 49
[Description] Select a font for the HRI characters used when printing a bar code.
n selects a font from the following table:

n Font
0,48 Font A (12 × 24)
1,49 Font B (9 × 17)
[Details]
 HRI indicates Human Readable Interpretation.
 HRI characters are printed at the position specified by GS H.
[Default] n=0

RECEIPT PRINTER
31
[Reference] GS H, GS k

46、GS h n Set bar code height

[Format] ASCII GS h n
Hex 1D 68 n
Decimal 29 104 n
[Range] 1 ≤ n ≤ 255
[Description] Set the height of the bar code to n dots.
n specifies the number of dots in the vertical direction.
[Default] n = 162
[Reference] GS k

47、①GS k m d1...dk NUL②GS k m n d1...dn Print bar code

[Format] ①ASCII GS k m d1...dk NUL


Hex 1D 6B m d1...dk 00
Decimal 29 107 m d1...dk 0
②ASCII GS k m n d1... dn
Hex 1D 6B m n d1... dn
Decimal 29 107 m n d1... dn
[Range] ①0 ≤ m ≤ 6 (k and d depends on the bar code system used)
②65 ≤ m ≤ 73 (n and d depends on the bar code system used)
[Description] Selects a bar code system and prints the bar code.
m selects a bar code system as follows:
m Bar Code System Number of Characters Remarks
Characters (ASCII)
0 UPC-A 11 ≤ k ≤ 12 0~9 48 ≤ d ≤ 57
1 UPC-E 11 ≤ k ≤ 12 0~9 48 ≤ d ≤ 57
2 JAN13 (EAN13) 12 ≤ k ≤ 13 0~9 48 ≤ d ≤ 57
3 JAN8 (EAN8) 7≤k≤8 0~9 48 ≤ d ≤ 57
0~9, 48 ≤ d ≤ 57,
A~Z, 65 ≤ d ≤ 90,
4 CODE39 1 ≤ k ≤ 255 SP,$,%,+, d = 32, 36, 37, 43,
① -,., / 45, 46, 47
* d = 42
5 ITF 1 ≤ k ≤255 0~9 48 ≤ d ≤ 57
(Even number)
0~9, 48 ≤ d ≤ 57,
A~D 65 ≤ d ≤ 68,
6 CODABAR 1 ≤ k ≤ 255
$, +, -, ., d = 36, 43, 45, 46,
/,: 47, 58

RECEIPT PRINTER
32
6 UPC-A 11 ≤ n ≤ 12 0~9 48 ≤ d ≤ 57
5
6 UPC-E 11 ≤ n ≤ 12 0~9 48 ≤ d ≤ 57
6
6 JAN13 (EAN13) 12 ≤ n ≤ 13 0~9 48 ≤ d ≤ 57
7
6 JAN8 (EAN8) 7≤n≤8 0~9 48 ≤ d ≤ 57
8
0~9, 45 ≤ d ≤ 57,
A~Z, 65 ≤ d ≤ 90,
6
CODE39 1 ≤ n ≤ 255 SP,$,%,+,-, d = 32, 36, 37, 43, 45,
9
② ., / 46, 47
* d = 42
7 ITF 1 ≤ n ≤ 255 0~9 48 ≤ d ≤ 57
0 (Even number)
7 CODABAR 1 ≤ n ≤ 255 0~9, 48 ≤ d ≤ 57,
1 A~D 65 ≤ d ≤ 68,
$, +, -, ., d = 36, 43, 45, 46,
/,: 47, 58
7 CODE93 1 ≤ n ≤ 255 NUL~SP(7FH) 0 ≤ d ≤ 127
2
7 CODE128 2 ≤ n ≤ 255 NUL~SP(7FH) 0 ≤ d ≤ 127
3
[Details for ①]
 This command ends with a NUL code.
 When the bar code system used is UPC-A or UPC-E, the printer prints the bar code data after
receiving 12 bytes bar code data and processes the following data as normal data.
 When the bar code system used is JAN13 (EAN13), the printer prints the bar code after
receiving 13 bytes bar code data and processes the following data as normal data.
 When the bar code system used is JAN8 (EAN8), the printer prints the bar code after receiving
8 bytes bar code data and processes the following data as normal data.
 The number of data for ITF bar code must be even numbers. When an odd number of data is
input, the printer ignores the last received data.
[details for ②]
 n indicates the number of bar code data, and the printer processes n bytes from the next
character data as bar code data.
 If n is outside of the specified range, the printer stops command processing and processes the
following data as normal data.
[Details in standard mode]
 This command is not effective when if d is outside of the specified range.
 This command is not effective when if the horizontal size exceeds printing area.
 This command feeds paper length to be same as bar code height, regardless of the line height
specified by ESC 2 or ESC 3.
 This command is enabled only when no data exists in the print buffer. When data exists in the
print buffer, this command is ignored.
RECEIPT PRINTER
33
 After printing bar code, this command sets the print position to the beginning of the line.
 Except for upside-down printing mode, none of print mode such as emphasized, double-strike,
underline, character size, white/black reverse printing, or 90° clockwise-rotation character,
affects the printing of the bar code.

When CODE128 (m = 73) is used:


 Refer to Appendix A for Code 128.
 when using CODE 128, coding as follows:
① Starting character must select character set from (any of CODE A, CODE B, or CODE C) firstly.
② Selecting the character set is by sending “{“ combined with the other character to execute,
ASCII character “{ “ is set by sending “{”two times.
special Sending data
character ASCII Hex Decimal
SHIFT {S 7B, 53 123,83
CODE A {A 7B, 41 123, 65
CODE B {B 7B, 42 123, 66
CODE C {C 7B, 43 123, 67
FNC1 {1 7B, 31 123, 49
FNC2 {2 7B, 32 123, 50
FNC3 {3 7B, 33 123, 51
FNC4 {4 7B, 34 123, 52
"{" {{ 7B, 7B 123, 123

[Example] Print “No.123456” using CODE128


Firstly select CODE B to print “No.”, and then select CODE C to print the rest numbers “123456”:

GS k 73 10 123 66 78 111 46 123 67 12 34 56

 If the front of bar code data is not character set selection, the printer will stop executing this
command, the rest of data will be treated as normal data.
 If “{”and the subsequent character is not the appointed combination as shown above, the
printer will stop executing this command, the rest of data will be treated as normal data.
 If receiving character is not bar code character set data, the printer will stop executing this
command, the rest of data will be treated as normal data.
 When printing HRI characters, shift character and character set selection data is not printed.
 HRI characters of the function characters are not printed.
 HRI characters of the control characters (in Hexadecimal: <00>H to <1F>H and <7F>H) are
not printed.
<Other> Make sure to keep the left-side and right-side spacing, as different spacing per different
bar code type.

RECEIPT PRINTER
34
[Reference] GS H, GS f, GS h, GS w

48、GS r n Transmit status

[Format] ASCII GS r n
Hex 1D 72 n
Decimal 29 114 n
[Range] n = 1, 2, 49, 50
[Description] Transmits the status specified by n as follows:
n Function
1,49 Transmits paper sensor status
2,50 Transmits drawer kick-out connector status
[Details]
 This command is executed when the data in the receive buffer is developed. Therefore, there
may be a time lag between receiving this command and transmitting the status, depending on
the receive buffer status.
 The status types to be transmitted are shown below:
Paper sensor status ( n = 1,49 ):
Bit 0/1 Hex Decimal Status for ASB
0,1 0 00 0 Paper roll near-end sensor: paper adequate.
1 03 3 Paper roll near-end sensor: paper near end.
2,3 0 00 0 Paper roll end sensor: paper adequate.
1 0c 12 Paper end sensor: Paper not present
4 0 00 0 Not used. Fixed to Off.
5,6 --- --- Undefined
7 0 00 0 Not used. Fixed to Off.
drawer kick-out connector status ( n = 2, 50):
Bit 0/1 Hex Decimal Status for ASB
0 0 00 0 Have cash drawer open
1 01 1 No cash drawer open
1-3 --- --- Undefined.
4 0 00 0 Not used. Fixed to Off.
5,6 --- --- Undefined.
7 0 00 0 Not used. Fixed to Off.
[Reference] DLE EOT,GS a

49、GS I Transmit printer ID

[Format] ASCII GS I n
Hex 1D 49 n
Decimal 29 73 n
[Range] n=66, 67
[Description] Transmit the printer ID specified by n as follows:

RECEIPT PRINTER
35
n Hex Status
66 42 Brand
67 43 Model

50、GS v 0 m xL xH yL yH d1...dk Print raster bit image

[Format] ASCII GS v 0 m xL xH yL yH d1...dk


Hex 1D 76 30 m xL xH yL yH d1...dk
Decimal 29 118 48 m xL xH yL yH d1...dk
[Range] 0 ≤ m ≤ 3, 48 ≤ m ≤ 51
0 ≤ xL ≤ 255
0 ≤ xH ≤ 255
0 ≤ yL ≤ 255
0 ≤ d ≤ 255
k = ( xL + xH × 256) × ( yL + yH × 256) ( k ≠ 0)
[Description] prints a raster bit image according to the mode defined by m:
m Mode Vertical Dot Density (DPI) Horizontal Dot density (DPI)
0, 48 Normal 200 200
1, 49 Double-width 200 100
2, 50 Double-height 100 200
3, 51 Quadruple 100 100
 xL、xH specifies(xL+ xH × 256)bytes in the horizontal direction for the bit image.
 yL、yH specifies(yL+ yH × 256)bytes in the vertical direction for the bit image.
[Details]
 In standard mode, this command is effective only when the printer buffer is empty.
 None of the print modes such as character size, emphasized, double-strike, upside-down
printing, underline, white/black reverse printing, etc, affects the printing of the bit image.
 If the bit image to be printed exceeds the printable area, the excess data is not printed.
 The ESC a (Select justification) setting is also effective on raster bit images.
 When this command is received during macro definition, the printer ends macro definition and
begins performing this command. This command is not for the part of macro definition.
 d specifies the definition data of the bit image data with 1 for printed a dot and 0 for not printed.
[Example] When xL+ xH × 256 = 64

RECEIPT PRINTER
36
51、GS w n Set bar code height

[Format] ASCII GS w n
Hex 1D 77 n
Decimal 29 119 n
[Range] 2≤n≤6
[Description] Sets the horizontal size of the bar code, using n as follows:
Multi-level bar code Binary-level bar code
n
module width (mm) Thin element width (mm) Thick element width (mm)
2 0.25 0.25 0.625
3 0.375 0.375 1.0
4 0.5 0.5 1.25
5 0.625 0.625 1.625
6 0.75 0.75 1.875
 Multi-level bar codes are as follows:
UPC-A, UPC-E, JAN13 (EAN13), JAN8 (EAN8), CODE93, CODE128
 Multi-level bar codes are as follows:
CODE39, ITF, CODABAR
[Default] n=3
[Reference] GS k

Chinese characters control commands

52、FS ! n Set print mode(s) for Kanji characters

[Format] ASCII FS ! n
Hex 1C 21 n
Decimal 28 33 n
[Range] 0 ≤n ≤ 255
[Description] Sets the print mode for Kanji characters, using n as follows:
Bit 0/1 Hex Decimal Function
0, 1 --- --- Undefined.
0 00 0 Double-width mode is OFF.
2
1 04 4 Double-width mode is ON.
3 0 00 0 Double-height mode is OFF.
1 08 8 Double-height mode is ON.
4-6 -- -- Undefined.
0 00 0 Underline mode is OFF.
7
1 80 128 Underline mode is ON.
[Details]
 When both double-width and double-height modes are set simultaneously, quadruple-size
characters are printed (including right-side and left-side character spacing).
 The printer can underline all characters (including right- and left-side character spacing), but
RECEIPT PRINTER
37
cannot underline the space set by HT and 90°clockwise-rotated characters.
 The thickness of the underline is that specified by FS -, regardless of the character size.
 When some of the characters in a line are different in height, all the characters on the line are
aligned at the baseline.
 It is possible to emphasize the Kanji character using FS W or GS !, the setting of the last
received command is effective.
 It is possible to turn underline mode on or off using FS -, and the setting of the last received
command is effective.
[Default] n=0
[Reference] FS - , FS W,GS !

53、FS & Select Kanji character mode

[Format] ASCII FS &


Hex 1C 26
Decimal 28 38
[Description] Select Kanji character mode.
[Details]
 When Kanji mode is selected, the printer checks if the character is Kanji code or not, if yes, the
printer processes the first byte of Kanji code, and then checks if the second byte is Kanji code
or not.
 Kanji mode is selected at default once printer is power on.
[Reference] FS .

54、FS - n Turn underline mode on/off for Kanji characters

[Format] ASCII FS - n
Hex 1C 2D n
Decimal 28 45 n
[Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
[Description] Turns underline mode for Kanji characters on or off, based on the following values
of n.
n Function
0, 48 Turns off underline mode for Kanji characters
1, 49 Turns on underline mode for Kanji characters (1-dot thick)
2, 50 Turns on underline mode for Kanji characters (2-dot thick)
[Details]
 The printer can underline all characters (including right-side and left-side character spacing),
but cannot underline the space set by HT and 90°clockwise-rotated characters.
 After the underline mode for Kanji characters is turned off by setting n to 0, underline printing is
no longer performed, but the previously specified underline thickness is not changed. The
default underline thickness is 1 dot.
 The specified line thickness does not change even when the character size changes.
 It is possible to turn underline mode on or off using FS !, and the last received command is

RECEIPT PRINTER
38
effective.
[Default] n=0
[Reference] FS !

55、FS . Cancel Kanji character mode

[Format] ASCII FS .
Hex 1C 2E
Decimal 28 46
[Description] Cancel Kanji character mode.
[Details]
 When Kanji mode is canceled, the printer processes all characters as ASCII character, and
processes a 1-byte code of character per each time.
 Kanji mode is selected at default once printer is power on.
[Reference] FS &

56、FS 2 c1 c2 d1...dk Define user-defined Kanji characters

[Format] ASCII FS 2 c1 c2 d1...dk


Hex 1C 32 c1 c2 d1...dk
Decimal 28 50 c1 c2 d1...dk
[Range] c1 and c2 indicate character codes for the defined characters.
c1 = FEH
A1H ≤ c2 ≤ FEH
0 ≤ d ≤ 255
k = 72
[Description] Defines user-defined Kanji characters for the character codes specified by c1 and
c2.
[Details]
 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.
[Default] None

RECEIPT PRINTER
39
57、FS S n1 n2 Set Kanji left and right spacing

[Format] ASCII FS S n1 n2
Hex 1C 53 n1 n2
Decimal 28 83 n1 n2
[Range] 0 ≤ n1 ≤ 255
0 ≤ n2 ≤ 255
[Description] Set left- and right-side Kanji character spacing n1 and n2, respectively.
 When the printer model used supports GS P, the left-side character spacing is [n1 × horizontal
RECEIPT PRINTER
40
or vertical motion units] inches, and the right-side character spacing is [n2 × horizontal or
vertical motion units] inches.
[Details]
 When double-width mode is set, the left- and right-side character spacing is twice the normal
value.
 The horizontal and vertical motion units are set by GS P. The previously specified character
spacing does not change, even if the horizontal or vertical motion unit is changed using GS P.
 In standard mode, the horizontal motion unit is used.
 In page mode, the horizontal or vertical motion unit differs in page mode, depending on starting
position of the printable area as follows:
① When the starting position is set to the upper left or lower right of the printable area, the
horizontal motion unit is used.
② When the starting position is set to the upper right or lower left of the printable area, the vertical
motion unit is used.
③ The maximum right-side spacing is 36mm, any setting exceeding the maximum is converted to
the maximum automatically.
[Default] n1 = 0, n2 = 0
[Reference] GS P

58、FS W n Turn quadruple-size mode on/off for Kanji characters

[Format] ASCII FS W n
Hex 1C 57 n
Decimal 28 87 n
[Range] 0 ≤ n ≤ 255
[Description] Turns quadruple-size mode on or off for Kanji characters.
 When the LSB of n is 0, quadruple-size mode for Kanji characters is turned off.
 When the LSB of n is 1, quadruple-size mode for Kanji characters is turned on.
[Details]
 Only the lowest bit of n is valid.
 In quadruple-size mode, the printer prints the same size characters as when double-width and
double-height modes are both turned on.
 When quadruple-size mode is turned off using this command, the following characters are
printed in normal size.
 When some of the characters on a line are different in height, all the characters on the line are
aligned at the baseline.
 FS ! or GS ! can also select and cancel quadruple-size mode by selecting double-height and
double-width modes, and the setting of the last received command is effective.
[Default] n=0
[Reference] FS !, GS !

Black mark related commands.

59、GS ( F PL PH a m nL nH Set black mark position offset

[Format] ASCII GS ( F pL pH a m nL nH

RECEIPT PRINTER
41
Hex 1D 28 46 pL pH a m nL nH
Decimal 29 40 70 pL pH a m nL nH

[Description] All function data specified by this commands will not be lost when the printer is power
down.
Using this command to select black mark position control allowable, and set cutting/tearing position
or print starting position relative to black mark detection offset.
pL+(pH×256) ≡4 means pL=4,pH=0
a=1 ,2;m=0,48
0≤(nL+ nH×256)<1700
Select to set cutting/tearing position or print starting position offset using a as follows:
a Function
1 Set print starting position relative to black mark detection offset.
2 Set cutting/tearing position relative to black mark detection offset.
 m=0 or 48, offset direction is same as feed paper direction.
 The offset specified by nL, nH corresponds to the actual distance for (nL+ nH×256)×
0.125mm.
 Black mark position set using GS FF and GS V is effective only when executing this command.
 To set print starting position offset (a=1) is effective when executing GS FF.
 To set cutting/tearing position offset (a=2) is effective when executing GS V m.
 Default nL=nH=0, it means, when the black mark detected, print-head position corresponds to
the current paper is set to the print starting position, cutting/tearing position corresponds to the
current paper is set to cutting/tearing position.
[Details]
 If both of cutting/tearing position offset and print starting position offset are 0, in this case, using
GS V m to execute position print for each receipt.
 If cutting/tearing position offset is not 0, in this case, using GS( F to set cutting/tearing position
offset for (a=2), and print starting position for (a=1).
 Feed paper to print start position using GS FF only when set the starting print position,
otherwise inaccurate positioning occurs or feed blank paper occurs.
 If updated the last offset data using GS( F, the first printed paper might occur inaccurate
positioning or feed blank paper, but it will be in normal for the subsequent printed paper.

60、GS FF Set black mark position to the print starting position


[Format] ASCII GS FF
Hex 1D 0C
Decimal 29 12
[Description]
 This command is effective only when black mark position control allowable.
 The printer detects black mark in the paper and feed paper to the print starting position which
set by GS ( F (a=1) .
 If the paper is in standby at the print starting position, the printer does not feed.
 If the printer with auto cutter and set partial cut mode, the printer does not back-feed.

RECEIPT PRINTER
42
Auto cutter related commands

61、①GS V m ②GS V m n Select cut mode and execute a partial cut

[Format] ①ASCII GS V m
Hex 1D 56 m
Decimal 29 86 m

②ASCII GS V m n
Hex 1D 56 m n
Decimal 29 86 m n
[Range] 0 ≤ n ≤ 255
[Description] Selects a mode for cutting paper and executes paper cutting. The value of m selects
the mode as follows:
M Cutting mode
1, 49 Partial cut
65,66 Feeds paper ([n×(vertical motion unit) inches] ) and cuts the paper partially.
 This command is effective only processed at the beginning of a line.
 When m = 0,48,1,49, the printer cuts the paper directly.
 When m = 65,66, the printer feeds the paper (the distance from printing position to cutter+ [ n
×vertical motion unit]) and then cuts it.
 The paper feed amount is calculated using the vertical motion unit (y).

Buzzer related commands

62、ESC B n t Beeps the buzzer when orders coming

[Format] ASCII ESC B n t


Hex 1B 42 n t
Decimal 27 66 n t
[Range] 1≤n≤9 ,1≤t≤9
[Description] Beep the buzzer.
 n specifies the number of beeps.
 t specifies the beeping cycle time (t×50)ms

63、ESC C Beeps the buzzer and flashes Error indicator when orders coming

[Format] ASCII ESC C m t n


Hex 1B 43 m t n
Decimal 27 67 m t n
[Range] 1≤m≤20, 1≤t≤20, 0≤n≤3
[Description] Beep the buzzer and error indicator flashes when orders coming.
 m: specifies the number of beeps or error indicator flashes.
 t: specifies the beeping cycle time (t×50)ms or error indicator flashing cycle time (t×50)ms.

RECEIPT PRINTER
43
When n=0, no beeps, and no flashes.
When n=1, beeps
When n=2, flashes.
When n=3, beeps and flashes.

Ethernet printer status detection commands


NOTE: When transmitting Hex 1B 76 commands to the printer, please set 4000 for TCP
protocol purpose port (9100 for transmitting print data port).

64、ESC v Ethernet printer status detection

[Format] ASCII ESC v


Hex 1B 76
Decimal 27 118
[Description] Printer returns four bytes of status back to host. Status data as follows:

The first byte(Printer status)


Bit OFF/ON Hex Decimal ASB Status
0,1 OFF 00 0 Not used. Fixed to Off.
2 OFF 00 0 Drawer kick-out connector pin 3 is LOW
ON 04 4 Drawer kick-out connector pin 3 is HIGH
3 OFF 00 0 Printer online
ON 08 8 Printer offline
4 ON 10 16 Not used. Fixed to On.
5 OFF 00 0 Cover is closed
ON 20 32 Cover is open
6 OFF 00 0 Paper is not being fed by using the paper FEED button
ON 40 64 Paper is being fed by using the paper FEED button
7 OFF 00 0 Not used. Fixed to Off.

The second byte(Printer status)

Bit OFF/ON Hex Decimal ASB Status


0-2 - - - Undefined.
OFF 00 0 No auto-cutter error.
3
ON 08 8 Auto-cutter error occurs.
4 OFF 00 0 Not used. Fixed to Off.
OFF 00 0 No unrecoverable error.
5
ON 20 32 Unrecoverable error has occurred.
OFF 00 0 No recoverable error.
6
ON 40 64 Recoverable error has occurred.
7 OFF 00 0 Not used. Fixed to Off.
The third byte(Paper sensor status)
Bit OFF/ON Hex Decimal ASB Status

RECEIPT PRINTER
44
0,1 OFF 00 0 Paper near end no detection
ON 03 3 Paper near end.
OFF 00 0 Paper adequate.
2,3
ON 0C 12 Paper end.
4 OFF 00 0 Not used. Fixed to Off.
5,6 - - - Undefined.
7 OFF 00 0 Not used. Fixed to Off.
The fourth byte(Paper sensor status)
Bit OFF/ON Hex Decimal ASB Status
0-3 - - - Undefined.
4 OFF 00 0 Not used. Fixed to Off.
5,6 - - - Undefined.
7 OFF 00 0 Not used. Fixed to Off.

QR code commands

65、(K< Function 167>

[Name] QR Code: Set the size of module


[Format] ASCII GS ( K pL pH cn fn n
Hex 1D 28 6B 03 00 31 43 n
Decimal 29 40 107 3 0 49 67 n
[Range] (pL+pH×256)=3 (pL=3, pH=0)
cn=49
fn=67
1≤n≤16
[Default] n=3
[Description] Set the size of the module for QR Code to n dots.
[Details]
 Settings of this function are effective until ESC @ is executed, the printer is reset, or the power
is turned off.
 n = width of a module = height of a module. (Because the QR code modules are square.)

66、(K< Function 169>

[Name] QR Code: Select the error correction level


[Format] ASCII GS ( K pL pH cn fn n
Hex 1D 28 6B 03 00 31 45 n
Decimal 29 40 107 3 0 49 69 n
[Range] (pL+pH×256)=3 (pL=3, pH=0)
cn=49
fn=69

RECEIPT PRINTER
45
48≤n≤51
[Default] n=48
[Description] Select the error correction level for QR Code.
n Function Recovery Capacity %(approx.)
48 Selects Error correction level L 7
49 Selects Error correction level M 15
50 Selects Error correction level Q 25
51 Selects Error correction level H 30

[Details] Settings of this function are effective until ESC @ is executed, or the power is turned off,
the printer will be reset.

67、(K< Function 180>

[Name] QR Code: Store the data in the symbol storage area


[Format] ASCII GS ( K pL pH cn fn m d1...dk
Hex 1D 28 6B pL pH 31 50 30 d1...dk
Decimal 29 40 107 pL pH 49 80 48 d1...dk
[Range] 4≤(pL+pH×256)≤7092 (0≤pL≤255,0≤pH≤27)
cn=49
fn=80
m=48
k=(pL+pH×256)-3
[Description] Store the QR Code symbol data (d1...dk) in the symbol storage area.
[Details]
 Store the QR code symbol data into the printer.
 Settings of this function are effective until ESC @ is executed, or the power is turned off, the
printer will be reset.

68、(K< Function 181>

[Name] QR Code: Print the symbol data in the symbol storage area
[Format] ASCII GS ( K pL pH cn fn m
Hex 1D 28 6B 03 00 31 51 30
Decimal 29 40 107 3 0 49 81 48
[Range] (pL+pH×256)=3 (pL=3,pH=0)
cn=49
fn=81
m=48
[Description] Encodes and prints the QR Code symbol data in the symbol storage area using the
process of (K< Function 180).

[Example]
Prints QRcode for “Gprinter”.
1. Set the size of module to 5 (default 3) according to(K< Function 167).

RECEIPT PRINTER
46
Transmit: 0x1d 0x28 0x6b 0x03 0x00 0x31 0x43 0x05,

2. Stores “Gprinter” QR Code symbol data in the symbol storage area according to(K< Function
180)
Transmit: 0x1d 0x28 0x6b 0x0b 0x00 0x31 0x50 0x30 0x47 0x70 0x72 0x69
0x6e 0x74 0x65 0x72 (ASCII Hex data corresponds to “Gprinter”)

3. Print QRCode
Transmit: 0x1d 0x28 0x6b 0x03 0x00 0x31 0x51 0x30

APPENDIX X: CODE128 BAR CODE

X.1 Description of the CODE128 Bar Code


In CODE128 bar code system, it is possible to represent 128 ASCII characters and 100 numbers
from 00 to 99 and some special characters to code using 3 code sets. Each code set is used for
representing the following characters:
• Code set A: ASCII characters 00H to 5FH
• Code set B: ASCII characters 20H to 7FH
• Code set C: 2-digit numeral characters (100 numerals from 00 to 99)
The following special characters are also available in CODE128:
• SHIFT characters
In code set A, the character just after SHIFT is processed as a character for code set B. In code set
B, the character just after SHIFT is processed as the character for code set A. SHIFT characters
cannot be used in code set C.
• Code set selection character (CODE A, CODE B, CODE C)
This character switches the following code set to code set A, B, or C.
• Function character (FNC1, FNC2, FNC3, FNC4)
The usage of function characters depends on the application software. In code set C, only FNC1 is
available.

RECEIPT PRINTER
47
X.2 Code Tables
Printable characters in code set A
Chara Transmit Data Char Transmit Data Char Transmit Data
cter Hex Decimal acter Hex Decimal acter Hex Decimal
NULL 00 0 ( 28 40 P 50 80
SOH 01 1 ) 29 41 Q 51 81
STX 02 2 * 2A 42 R 52 82
ETX 03 3 + 2B 43 S 53 83
EOT 04 4 , 2C 44 T 54 84
ENQ 05 5 - 2D 45 U 55 85
ACK 06 6 . 2E 46 V 56 86
BEL 07 7 / 2F 47 W 57 87
BS 08 8 0 30 48 X 58 88
HT 09 9 1 31 49 Y 59 89
LF 0A 10 2 32 50 Z 5A 90
VT 0B 11 3 33 51 [ 5B 91
FF 0C 12 4 34 52 \ 5C 92
CR 0D 13 5 35 53 ] 5D 93
SO 0E 14 6 36 54 ^ 5E 94
SI 0F 15 7 37 55 _ 5F 95
DLE 10 16 8 38 56 FNC 7B,31 123,49
DC1 11 17 9 39 57 1 7B,32 123,50
DC2 12 18 : 3A 58 FNC 7B,33 123,51
DC3 13 19 ; 3B 59 2 7B,34 123,52
DC4 14 20 < 3C 60 FNC 7B,53 123,83
NAK 15 21 = 3D 61 3 7B,42 123,66
SYN 16 22 > 3E 62 FNC 7B,43 123,67
ETB 17 23 ? 3F 63 4
CAN 18 24 @ 40 64 SHIF
EM 19 25 A 41 65 T
SUB 1A 26 B 42 66 COD
ESC 1B 27 C 43 67 EB
FS 1C 28 D 44 68 COD
GS 1D 29 E 45 69 EC
RS 1E 30 F 46 70
US 1F 31 G 47 71
SP 20 32 H 48 72
! 21 33 I 49 73
" 22 34 J 4A 74
* 23 35 K 4B 75
$ 24 36 L 4C 76
% 25 37 M 4D 77
& 26 38 N 4E 78
27 39 O 4F 79

RECEIPT PRINTER
48
Printable characters in code set B
Char Transmit Data Char Transmit Data Char Transmit Data
acter Hex Decimal acter Hex Decimal acter Hex Decimal
SP 20 32 H 48 72 p 70 112
! 21 33 I 49 73 q 71 113
" 22 34 J 4A 74 r 72 114
* 23 35 K 4B 75 s 73 115
$ 24 36 L 4C 76 t 74 116
% 25 37 M 4D 77 u 75 117
& 26 38 N 4E 78 v 76 118
' 27 39 O 4F 79 w 77 119
( 28 40 P 50 80 x 78 120
) 29 41 Q 51 81 y 79 121
* 2A 42 R 52 82 z 7A 122
+ 2B 43 S 53 83 { 7B,7B 123,123
, 2C 44 T 54 84 | 7C 124
- 2D 45 U 55 85 } 7D 125
. 2E 46 V 56 86 — 7E 126
/ 2F 47 W 57 87 DEL 7F 127
0 30 48 X 58 88 FNC 7B,31 123,49
1 31 49 Y 59 89 1 7B,32 123,50
2 32 50 Z 5A 90 FNC 7B,33 123,51
3 33 51 [ 5B 91 2 7B,34 123,52
4 34 52 \ 5C 92 FNC 7B,53 123,83
5 35 53 ] 5D 93 3 7B,41 123,65
6 36 54 ^ 5E 94 FNC 7B,43 123,67
7 37 55 _ 5F 95 4
8 38 56 ` 60 96 SHIF
9 39 57 a 61 97 T
: 3A 58 b 62 98 COD
; 3B 59 c 63 99 EA
< 3C 60 d 64 100 COD
= 3D 61 e 65 101 EC
> 3E 62 f 66 102
? 3F 63 g 67 103
@ 40 64 h 68 104
A 41 65 i 69 105
B 42 66 j 6A 106
C 43 67 k 6B 107
D 44 68 l 6C 108
E 45 69 m 6D 109
F 46 70 n 6E 110
G 47 71 o 6F 111

RECEIPT PRINTER
49
Printable characters in code set C
Char Transmit Data Chara Transmit Data Char Transmit Data
acter Hex Decimal cter Hex Decimal acter Hex Decimal
0 00 0 40 28 40 80 50 80
1 01 1 41 29 41 81 51 81
2 02 2 42 2A 42 82 52 82
3 03 3 43 2B 43 83 53 83
4 04 4 44 2C 44 84 54 84
5 05 5 45 2D 45 85 55 85
6 06 6 46 2E 46 86 56 86
7 07 7 47 2F 47 87 57 87
8 08 8 48 30 48 88 58 88
9 09 9 49 31 49 89 59 89
10 0A 10 50 32 50 90 5A 90
11 0B 11 51 33 51 91 5B 91
12 0C 12 52 34 52 92 5C 92
13 0D 13 53 35 53 93 5D 93
14 0E 14 54 36 54 94 5E 94
15 0F 15 55 37 55 95 5F 95
16 10 16 56 38 56 96 60 96
17 11 17 57 39 57 97 61 97
18 12 18 58 3A 58 98 62 98
19 13 19 59 3B 59 99 63 99
20 14 20 60 3C 60 FNC 7B,31 123,49
21 15 21 61 3D 61 1 7B,41 123,65
22 16 22 62 3E 62 COD 7B,42 123,66
23 17 23 63 3F 63 EA
24 18 24 64 40 64 COD
25 19 25 65 41 65 EB
26 1A 26 66 42 66
27 1B 27 67 43 67
28 1C 28 68 44 68
29 1D 29 69 45 69
30 1E 30 70 46 70
31 1F 31 71 47 71
32 20 32 72 48 72
33 21 33 73 49 73
34 22 34 74 4A 74
35 23 35 75 4B 75
36 24 36 76 4C 76
37 25 37 77 4D 77
38 26 38 78 4E 78
39 27 39 79 4F 79

RECEIPT PRINTER
50

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy