Command Notation
[Name]
Shows the name of the command.
[Format]
Shows the code sequence. [ ] k indicates the contents in brackets [] should be repeated k times.
The first row titled "ASCII" shows the sequence with ASCII characters, names of control
code, or names of parameter.
The second row titled "Hex" shows it with hexadecimal numbers or names of variable
parameter.
The third row titled "Decimal" shows it with decimal numbers or names of variable
parameter.
[Range]
Shows the allowable range of each parameter like "n = 0, 1, 3 – 6, 10".
The en-dash ("–") between numerals joins numbers in a range. For instance, "3 – 6"
indicates 3, 4, 5 and 6.
[Default]
Shows the default value of each parameter.
[Description]
Describes the function of the command.
The minus ("−") in tables indicates 0 or 1.
[Notes]
Provides important information on setting and using the command, if necessary.
Model specific information of selected products is shown after the above.
Parameter notation
-
Parameters are shown in bold italics.
-
Typical parameter notations are as follows:
-
-
n specifies 1 byte parameter in the range 0 – 255.
-
nL, nH specify 1 word (2 bytes) parameter as (nL + nH × 256) in the range 0 – 65535 or -32768 – +32767.
-
pL, pH specify the number of parameters after pH as (pL + pH × 256) in the range 1 – 65535.
-
p1, p2, p3, p4 specify the number of parameters after p4 as (p1 + p2 × 256 + p3 × 65536 + p4 × 16777216) in the rage 1 – 4294967295.
-
kc1, kc2 specify key code (2 bytes) of NV graphics or download graphics. Each range of kc1 and kc2 is 32 – 126.
-
Value notation
-
Numerical values are expressed in a hexadecimal, a decimal, or a binary format.
-
The hexadecimal notation has suffix 'h', and the binary notation has suffix 'B' except in a Bit value table.
-
Example: 10h, A6h, FFh, 00010000b, 10100110b, 11111111b
-
'x' in a binary notation indicates the bit is '0' or '1'.
-
Example: 0xxx1xxxb
Using Bit Value Tables
For each command that has a complex method of determining the variable n, there is a table showing how to calculate the variable in three numbering systems:
binary, hexadecimal, and decimal.
When you look at the table, first find the value of each component of the variable.
Then add the values of the components together to determine the value of the variable
n.
For example, here is how you would use the table on the following table, which selects
the print mode, to combine double-height, double-width, and underline. In the table,
you see that bit 4 on (or hex 10 or decimal 16) turns on double-height, bit 5 on (or
hex 20 or decimal 32) turns on double-width, and bit 7 on (or hex 80 or decimal 128)
turns on underline mode.
Bit
|
Binary
|
Function
|
Hex
|
Decimal
|
---|---|---|---|---|
0
|
0
|
Selects Font 1
|
00
|
0
|
1
|
Selects Font 2
|
01
|
1
|
|
1
|
−
|
(Reserved)
|
−
|
−
|
2
|
−
|
(Reserved)
|
−
|
−
|
3
|
0
|
Emphasized mode: OFF
|
00
|
0
|
1
|
Emphasized mode: ON
|
08
|
8
|
|
4
|
0
|
Double-height mode: OFF
|
00
|
0
|
1
|
Double-height mode: ON
|
10
|
16
|
|
5
|
0
|
Double-width mode: OFF
|
00
|
0
|
1
|
Double-width mode: ON
|
20
|
32
|
|
6
|
−
|
(Reserved)
|
−
|
−
|
7
|
0
|
Underline mode: OFF
|
00
|
0
|
1
|
Underline mode: ON
|
80
|
128
|
Binary, decimal, and hexadecimal numbers all have the same printing results.
To combine all three, turn on bits 4, 5, and 7, which is 10110000 in binary. Or you
can add the hex values 10, 20, and 80 for the hex sum of B0, or you can add the decimal
values 16, 32, and 128 for the decimal value of 176. Therefore, you send the following
to turn on double-height, double-width, and underline, depending on the numbering
system used:
ASCII
|
|
ESC
|
|
!
|
|
n
|
Hex
|
1B
|
21
|
B0
|
|||
Decimal
|
27
|
33
|
176
|
Quick Access
- [Name]
- [Format]
- [Range]
- [Description]
- [Notes]
ESC/POS® includes patented or patent pending commands. The contents must not be disclosed
to third parties.
- Introduction
- Command Lists
- Commands in Code Order
- Applicable printers
- Command List by Model
- EU-m30
- TM-J2000, TM-J2100
- TM-L90
- TM-L90 LFC
- TM-L100
- TM-m10
- TM-m30
- TM-m30II
- TM-m30II-H
- TM-m30II-NT
- TM-m30II-S
- TM-m30II-SL
- TM-m30III
- TM-m30III-H
- TM-m50
- TM-m50II
- TM-m50II-H
- TM-P20
- TM-P20II
- TM-P60
- TM-P60II
- TM-P80
- TM-P80II
- TM-T100
- TM-T20
- TM-T20II
- TM-T20III
- TM-T20IIIL
- TM-T20IV-L
- TM-T20X
- TM-T20X-II
- TM-T70
- TM-T70II
- TM-T81III
- TM-T82II
- TM-T82III
- TM-T82IIIL
- TM-T82IV-L
- TM-T82X
- TM-T82X-II
- TM-T83III
- TM-T83IV
- TM-T88IV
- TM-T88V
- TM-T88VI
- TM-T88VII
- TM-T90
- TM-U220
- TM-U220II
- TM-U230
- Obsolete Commands
- Commands Arranged by Function
- Print Commands
- Line Spacing Commands
- Character Commands
- Printing Paper Commands
- Label and black mark control
- Print Position Commands
- Paper Sensor Commands
- Mechanism Control Commands
- Bit Image Commands
- Bit Image
- GS ( L / GS 8 L
- GS D
- Graphics
- NV Graphics
- Download Graphics
- Panel Button Commands
- Status Commands
- Barcode Commands
- Two-dimensional Code Commands
- GS ( k
- PDF417
- QR Code
- MaxiCode
- 2-dimensional GS1 DataBar
- Composite Symbology
- Aztec Code
- DataMatrix
- Macro Function Commands
- Kanji Commands
- Miscellaneous Commands
- DLE ENQ
- DLE DC4 <fn=1>
- DLE DC4 <fn=2>
- DLE DC4 <fn=3>
- DLE DC4 <fn=7>
- DLE DC4 <fn=8>
- ESC ( Y
- ESC =
- ESC @
- ESC L
- ESC S
- ESC p
- GS ( A
- GS ( D
- GS I
- GS P
- GS g 0
- GS g 2
- GS z 0
- Response or status transmission
- Print control methods
- Beeper tone control
- Graphics drawing
- Receipt enhancement control
- Page mode control
- Customize Commands
- User setup
- GS ( E
- GS ( E <fn=1>
- GS ( E <fn=2>
- GS ( E <fn=3>
- GS ( E <fn=4>
- GS ( E <fn=5>
- GS ( E <fn=6>
- GS ( E <fn=7>
- GS ( E <fn=8>
- GS ( E <fn=9>
- GS ( E <fn=10>
- GS ( E <fn=11>
- GS ( E <fn=12>
- GS ( E <fn=13>
- GS ( E <fn=14>
- GS ( E <fn=15>
- GS ( E <fn=16>
- GS ( E <fn=48>
- GS ( E <fn=49>
- GS ( E <fn=50>
- GS ( E <fn=51>
- GS ( E <fn=52>
- GS ( E <fn=99>
- GS ( E <fn=100>
- Printer customization
- NV user memory
- User setup
- Counter Printing Commands
- Programming Examples
- Appendixes