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

Pos 408

This document summarizes ESC/POS commands for controlling a display in various modes. It lists commands for moving the cursor, clearing the screen, and selecting display settings. Modes include EPSON ESC/POS compatible, UTC standard, UTC enhanced, and AEDEX. Each mode supports different command codes for functions like setting the cursor position, scrolling text, and displaying messages on specific lines.
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)
38 views

Pos 408

This document summarizes ESC/POS commands for controlling a display in various modes. It lists commands for moving the cursor, clearing the screen, and selecting display settings. Modes include EPSON ESC/POS compatible, UTC standard, UTC enhanced, and AEDEX. Each mode supports different command codes for functions like setting the cursor position, scrolling text, and displaying messages on specific lines.
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/ 16

ESC/POS Commands List (for ESC/POS Mode)

Code Description
Command Function Description
(decimal)
BS 8 Move cursor left

HT 9 Move cursor right

LF 10 Move cursor down

US LF 31 10 Move cursor up

HOM 11 Move cursor to home position


Move cursor to left-most
CR 13
position
Move cursor to right-most
US CR 31 13
position
US B 31 66 Move cursor to bottom position
31 36 n m Move cursor to specified
US $
position
CLR 12 Clear display screen

CAN 24 Clear cursor line


27 61 n
ESC= Select peripheral device

ESC @ 27 64 Initialize display


27 37 n Select/cancel user-defined
ESC %
character set
273 8sbm s=1
Define user-defined character
ESC &
set

27 63 n Cancel user-defined
ESC ?
characters
27 82 n Select an international
ESC R
character set

82
Code Description
Command Function Description
(decimal)
27 116 n
ESC t Select character code table
18, 19, 254, 255
27 28 n m(x1 y x2 t2)
ESC W Select/cancel window range

US MD1 31 1 Specify overwrite mode

US MD2 31 2 Specify vertical scroll mode

US MD3 31 3 Specify horizontal scroll mode


31 67 n
US C Select/cancel cursor display
n=0, 1, 48, 49
31 69 n Select/cancel display screen
US E
blinking
31 84 h m
US T Set and display time counter

US U 31 85 Display time counter


31 88 n
US X Brightness adjustment
31 114 n Select/cancel reverse
US r
n=0, 1, 48, 49 characters
31 118 n Status confirmation by DRT
US v
n=0, 1, 48, 49 signal
US @ 31 64 Execute self-test

US : 31 58 Start/end macro definition


31 94 n m
US ^ Execute and quit macro

31 46 n
US.n Select/cancel cursor display

83
Code Description
Command Function Description
(decimal)
n= a displayable character
31 42 n
US,n code display the code with a
dot
n= a displayable character
31 59 n
US:n code display the code with a
semicolon
31 35 n
US#nm
ON/OFF

84
SELECT COMMAND MODES
(for VFD 200/450/650/850/895)

The command modes can be selected when the display is operating in


VFD/200/450/650/850/895 mode.

Mode 0: VFD-450 (Default)


Mode 1: EPSON ESC/POS Compatible
Mode 2: UTC Standard
Mode 3: UTC Enhanced
Mode 4: AEDEX
Mode 5: ICD 2002
Mode 6: CD 5220
Mode 7: DSP-800
Mode 8: ADM 787/788

85
Mode 0: VFD-450 mode
Command Hexadecimal Codes Function

B 42H Set baud rate and parity

S 53H Save the current view message

P 50H Set cursor position

C 43H Clear display message


Display the saved DEMO
D 44H
message
ESC G IBH 47H Print ON command
ESC S IBH 53H Print OFF command
M 4DH Select command mode

X 58H Set all default

86
Mode 1: EPSON ESC/POS Compatible
Code Description
Command Function
(hex)
HT 09 Move cursor right
BS 08 Move cursor left
US LF 1F 0A Move cursor up
LF 0A Move cursor down
Move cursor to right-most
US CR 1F 0D
position
Move cursor to left-most
CR 0D
position
HOM 0B Move cursor to home position
Move cursor to bottom
US B 1F 42
position
1F 24 x y x=1-20 Move cursor to specified
US $ x y
y=01,02 position
CLR 0C Clear display screen
CAN 18 Clear cursor line
US E n 1F 45 n n=00-ff Blink display screen
ESC @ 1B 40 Initialize display
US MD1 1F 01 Specify overwrite mode
US MD2 1F 02 Specify vertical scroll mode
US MD3 1F 03 Specify horizontal scroll mode
1B 57 n s x1 y1 x2 Specify/cancel the window
ESC W n s x1
y2 n=1,2,3,4 range
y1 x2 y2
s=0,1
Set starting/ending position of
US: 1F 3A
macro definition
1F 5E n m
US ^ n m Execute and quit macro

US @ 1F 40 Execute self-test

87
Code Description
Command Function
(hex)

US T h m Display time

US U 1F 55 Display time continuously


n= a displayable character
US.n 1F 2E n core
Display the code with a dot
n= a displayable character
code
US,n 1F 2C n
Display the code with a
comma
n= a displayable character
code
US;n 1F 3B n
Display the code with a
semicolon
1F 23 n m n=0 or 1
US#nm
ON/OFF

88
Mode 2: UTC Standard mode
Code Description
Command Function
(hex)
BS 08 Back space
HT 09 Horizontal tab
LF 0A Lined feed
CR 0D Carriage return
DLE 0F Display position
DC1 11 Over write display mode
DC2 12 Vertical scroll mode
DC3 13 Cursor on
DC4 14 Cursor off
Change to UTC enhanced
ESC d 1B 64
mode
US 1F Clear display

89
Mode 3: UTC enhanced mode
Code Description
Command Function
(hex)
ESC u ACR 1B 75 41 [data x 20] 0D Upper line display
ESC u BCR 1B 75 42 [data x 20] 0D Bottom line display
Upper line message scroll
ESC u DCR 1B 75 44 [data x 20] 0D
continuously

ESC u ECR Display time


-
Upper line message scroll
ESC u FCR 1B 75 46 [data x 20] 0D
once pass
1B 75 48 n m 0D
ESC u HCR Change attention code

ESC u ICR 1B 75 49 [data x 40] 0D Two line display


Change to UTC standard
ESC RS CR 1B 0F 0D
mode

90
Mode 4: AEDEX mode
Code Description
Command Function
(hex)
21 23 31 [data x 20]
! # 1CR Upper line display
0D
21 23 32 [data x 20]
! # 2CR Bottom line display
0D
21 23 34 [data x 20] Upper line message scroll
! # 4CR
0D continuously

! # 5CR Display time


-
21 23 36 [data x 20] Upper line message scroll
! # 6CR
0D once pass
21 23 38 n m 0D
! # 8CR Change attention code
20h
21 23 39 [data x 40]
! # 9CR Two line display
0D
21 23 41 [data x 20]
! # ACR Upper line scroll message
0D
21 23 42 [data x 20]
! # BCR Bottom line display message
0D

91
Mode 5: ICD 2002 mode
Code Description
Command Function
(hex)
Move cursor right (only valid in
HT 09
overwrite mode)
Move cursor left (only valid in
BS 08
overwrite mode)
Move cursor left-most (only
CR 0D
valid in overwrite mode)
Initialize customer display to
initial state, clears display
ESC @ 1B 40 buffer, set display mode to shift
and sets current display row to
upper row
Select upper row as current
ESC U 1B 55
row (default)
Select lower row as current
ESC D 1B 44
row
Set customer display disable or
enable

Move cursor to specified


position (only valid in overwrite
mode)
ESC C r c 1B 43 r c -r Row

-c Column number
(range from 1-20)
Set special effect or display
mode of specified row

92
(REMARK)
r 58= all rows
55= upper row
44= lower row

30= shift mode (default)


31= rotation mode
32= blink mode
33= clear this row and switch to shift mode
34= overwrite mode
35= vertical mode

93
Mode 6: CD 5220 standard mode
Code Description
Command Function
(hex)
ESC DC1 1B 11 Overwrite mode
ESC DC2 1B 12 Vertical scroll mode
ESC DC3 1B 13 Horizontal scroll mode
Set the string display mode,
1B 51 41 [n]x20 0D
write string to upper line
Set the string display mode,
1B 51 42 [n]x20 0D
write string to lower line
Upper line message scroll
1B 51 44 [n]x20 0D
continuously
ESC [ D 1B 5B 44 Move cursor left
BS 08 Move cursor left
ESC [ C 1B 5B 43 Move cursor right
HT 09 Move cursor right
ESC [ A 1B 5B 41 Move cursor up
ESC [ B 1B 5B 42 Move cursor down
LF 0A Move cursor down
Move cursor to home
ESC [ H 1B 5B 48
position
Move cursor to home
HOM 0B
position
Move cursor to left-most
ESC [ L 1B 5B 4C
position
Move cursor to left-most
CR 0D
position

94
Code Description
Command Function
(hex)
Move cursor to right-most
ESC [ R 1B 5B 52
position
Move cursor to bottom
ESC [ K 1B 5B 4B
position
1B 6C x y Move cursor to specified
ESC 1 x y
position
ESC @ 1B 40 Initialize display
Set or cancel the window
1B 57 1 x1 x2 y
ESC W s x1 x2 y range at horizontal scroll
mode
Clear display screen, and
CLR 0C
clear string mode
Clear cursor line, and clear
CAN 18
string mode
ESC_n 1B 5F n n=0.1 Set cursor ON/OFF

95
Mode 7: DSP-800 mode
Code Description
Command Function
(hex)
04 01 50 n 17 Move cursor to
EOT SOH P n ETB
n=31H-58H specified position
Clear display range
04 01 53 n 17 from n position to m
EOT SOH C n m ETB
position and move
cursor to n position
Save the current
04 01 53 n 17
EOT SOH S n ETB displaying data to n
n=31H-35H
layer for demo display
04 01 44 n m 17
EOT SOH D n m ETB n=31H-4FH Display the saved data
m=31H-33H
Transmit the current
EOT SOH T ETB 04 01 54 17 view message to
computer
04 01 42 n 4E 17
n=31H: 9600
n=32H: 4800
EOT SOH B n N ETB n=33H: 2400 Set baud rate
n=34H: 1200
n=35H: 600
n=36H: 300

96
Mode 8: ADM 787/788 mode
Code Description
Command Function
(hex)
CLR 0C Clear display
CR 0D Carriage return
Clear upper line and move
SLE1 0E cursor to upper left-end
position
Clear bottom line and move
SLE2 0F cursor to bottom left-end
position
Set period to upper line, last
DC0 10 n

Set line blinking, upper line


DC1 11 n

Clear line blinking, upper line


DC2 12 n

Clear field 1 and move


SF1 1E
cursor to field 1, first position
Clear field 2 and move
SF2 1F
cursor to field 2, first position

97

You might also like