User`s manual
MP-4000 TH POS Printer Rev.1.4 Programmer’s Manual
22-aug-2007
Firmware Release: 1.5
11
2.2 ESC/POS Command Table
Operation
Code Function Format hexadecimal Page
GS F9h 5 01h Select ESC/POS operation mode. Writes on flash.
Use with caution.
1D F9 35 01 56
GS F9h 20h 31h Select ESC/POS temporary operation mode.
Doesn’t alters flash.
1D F9 20 31 56
GS F9h 1Fh 31h Return to previous set of commands configured
before temporary setting.
1D F9 1F 31 57
ESC = n Select peripheral device 1B 3D n 57
ESC @ Initialize printer 1B 40 57
ESC c 3 n Select paper sensor(s) to output paper-end signals 1B 63 33 n 58
ESC c 4 n Select paper sensor(s) to stop printing 1B 63 34 n 58
ESC c 5 n Enable/disable panel buttons 1B 63 35 n 59
ESC p m t
1
t
2
General pulse 1B 70 m t
1
t
2
59
GS ( A p
L
p
H
n m Execute test print 1D 28 41 p
L
p
H
n m 60
DLE DC4 n m t Generate pulse at real-time 10 14 n m t 60
GS V m (n) Select cut mode and cut paper 1D 56 m (n) 61
ESC ( A pL pH fn n c
t1 t2
Activate buzzer 1B 28 41 pL pH fn n c
t1 t2
61
Vertical positioning
Code Function Format hexadecimal Page
LF Print and line feed 0A 62
FF Print and return to standard mode 0C 62
CR Print and carriage return 0D 62
ESC $ n
L
n
H
Set absolute print position 1B 24 n
L
n
H
63
ESC 2 Select default line spacing 1B 32 63
ESC 3 n Set line spacing 1B 33 n 63
ESC \ n
L
n
H
Set relative print position 1B 5C n
L
n
H
63
ESC d n Print and feed n lines 1B 64 n 64
Horizontal positioning
Code Function Format hexadecimal Page
HT Horizontal tab 09 65
ESC SP n Set right-side character spacing 1B 20 n 65
ESC D n1…n
K
NUL Set horizontal tab positions 1B 44 n1…nk 00 65
ESC a n Select justification 1B 61 n 66
GS L n
L
n
H
Set left margin 1D 4C n
L
n
H
66
Character types
Code Function Format hexadecimal Page
ESC – n Turn underline mode on/off 1B 2D n 67
ESC E n Turn emphasized mode on/off 1B 45 n 67
ESC M n Select character font 1B 4D n 67
GS B Activate/deactivate black/white reverse printing 1D 42 n 68
ESC R n Select an international character set 1B 52 n 68
ESC t n Select character code table 1B 74 n 68