The Serial Interface .................................................................. 221
Serial Interface Signals..........................................................222
2
CCoommmmaannddss
This section provides information about the commands supported by your printer. The
commands are organized by function groups. Each command has both a brief and a detailed
description.
GGeenneerraall OOvveerrvviieeww
This appendix provides information about the commands supported by your printer. The
commands are organized by function groups. Each command has both a brief and a detailed
description.
Each command has the following structure:
• Name and function description. Information about protocol (IBM Proprinter XL24/XL24
AGM, IBM Personal 2391+, EPSON LQ Series).
• The hexadecimal and decimal codes for the command: n represents variable parameters of
the command. The functions of these parameters are explai ned in its corresponding command
description.
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ @
EESSCC [[ @
EESSCC [[ \
EESSCC [[ d
EESSCC [[
EESSCC [[ K
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ p
EESSCC [[ T
EESSCC \
EESSCC \
EESSCC BB NNUUL
EESSCC bb NNUUL
EESSCC c
EESSCC c
EESSCC CC 00 n
EESSCC CC n
EESSCC D
EESSCC d
EESSCC DD oorr IINND
EESSCC e
EESSCC E
EESSCC EE oorr NNEEL
EESSCC F
EESSCC G
EESSCC
EESSCC H
EESSCC HH oorr HHTTS
EESSCC I
EESSCC J
EESSCC JJ oorr VVTTS
EESSCC k
EESSCC K
EESSCC k
EESSCC KK oorr PPLLD
EESSCC l
EESSCC L
EESSCC LL oorr PPLLU
EESSCC M
EESSCC m
EESSCC MM oorr RRI
EESSCC N
EESSCC O
EESSCC P
EESSCC P
EESSCC p
EESSCC PP ddaatta
EESSCC Q
EESSCC Q
EESSCC QQ oorr PPUU1
EESSCC R
EESSCC R
EESSCC rr n
EESSCC S
EESSCC s
EESSCC SSP
EESSCC T
EESSCC t
EESSCC U
EESSCC W
EESSCC w
EESSCC X
EESSCC x
EESSCC
EESSCC Y
EESSCC Z
Prints all received data and the column counter is set to the left margin.
ASCII Code CR
Hexadecimal Value 0D
Decimal Value 13
This code is a terminator code; when receiv ed, it causes any data i n the buffer to be printed out.
The print head then moves logically to the left margin position. The column counter is set to the
left margin value and a line feed is inserted automatically after the carriage return (see the
automatic carriage return function in the printer setup). The code resets the double width
printing set by SO code.
ESC ]
Sets a reverse line feed. (IBM)
ASCII Code ESC ]
Hexadecimal Value 1B 5D
Decimal Value 27 93
This code is a terminator code; when receiv ed, it causes the current contents of the print buffer
to be printed out, before reversing the paper by one line at the current vertical spacing. If no
data precedes this command or if the preceding data consists of spaces, the code causes only a
reverse line feed to be performed. When the line counter is equal to or less than the top of the
form value, the ESC ] is ignored.
8
ESC 5
Sets an automatic line feed after a carriage return. (IBM)
ASCII Code ESC 5 n
Hexadecimal Value 1B 35
Decimal Value 27 53
n
n
If n is equal to 1, this command sets an automatic line feed on receiving of a CR code. If n is
equal to 0, this command cancels the automatic line feed.
n Automatic line feed
0 Disabled
1 Enabled
ESC J
Advances paper n/180 inch. (EPSON and IBMXL24AGM)
Advances paper n/216 inch. (IBMXL24 and 2391)
ASCII Code ESC J n
Hexadecimal Value 1B 4A
Decimal Value 27 74
Range 1 <
This is a terminator code; it therefore causes the current contents of the print buffer to be
printed out before performing a single line feed of n/180 or n/216 inch. This command is
cancelled after the line feed has been performed. The printing will restart after a line feed from
the column at which the command was sent.
n
n
n < 255
9
LF
Line Feed.
ASCII Code LF
Hexadecimal Value 0A
Decimal Value 10
This is a terminator code; it therefore causes the current contents of the print buffer to be
printed out before advancing the paper by one line at the current vertical spacing. If no data
precedes the LF code, or if the preceding data consists of spaces, the code causes only a line feed.
When the line counter reaches the last line of the form (defined by software or function menu),
the LF code causes a skip to the first line of the next form. This code cancels the double width
printing set by the SO code. In IBM mode, the column counter is set to the first column if the
automatic carriage return is selected. In EPSON mode, the column is always set to the first
column.
10
FFoorrmmaatt CCoonnttrrooll
ESC $
Sets the absolute printing position. (EPSON)
n1 n2
n1 n2
n1, n
n1 n
2
< 255
2
ASCII Code ESC &
Hexadecimal Value 1B 24
Decimal Value 27 36
Range 0 <
This command specifies the distance from the left margin where you want to print subsequent
characters. The distance is in number of dots and must be calculated using the following
formula:
Margin distance = n
+ (n
1
x 256)
2
where n2 is the integer result of the number of dots divided by 256 and the n1 is the remainder. 1 dot =
1/60 inch. If the selected pos ition is outside the cur rent right margin, the se quence will be ignored.
ESC [ \
Sets vertical units. (IBM)
= 4
1
= 0
2
t
< 255
1
t
< 255
2
m1 m2 t1 … t
m1 m2 t1 … t
m1 m2 t1 … t
4
4
4
11
ASCII Code ESC [ \
Hexadecimal Value 1B 5B 5C
Decimal Value 27 91 92
Range m
m
0 <
0 <
t
= 0
3
t
= 180 or 216
4
This command changes the base units for the graphics line spacing commands (ESC J, ESC 3).
The default is 1/216 or 1/180 inch.
ESC /
Selects the Vertical Format Unit (VFU) channel. (EPSON)
ASCII Code ESC / m
Hexadecimal Value 1B 2F
Decimal Value 27 47
Range 0 <
m
m
m < 7
This sequence selects the VFU channel that you want to use. Eight different channels are
available. The parameter m represents the channel that you want to select.
ESC \
Sets the relative dot position. (EPSON)
n1, n
n1 n
n1 n
n1 n
2
2
2
2
< 255
+ (n
1
x 256)
2
+ (n
1
x 256).
2
ASCII Code ESC \
Hexadecimal Value 1B 5C
Decimal Value 27 92
Range 0 <
This command specifies the distance between the current print head position and the position
where you want to print subsequent characters (relative position). The distance is in number of
dots and must be calculated using the following formula:
Current position distance = n
where n2 is the integer result of the number of dots divided by 256 and the n1 is the remainder.
The unit of the dots is 1/120 inch for Draft printing or 1/180 inch for Letter Quality. If the
distance is negative (Most Significant Bit of m2 equal to 1), the print head will be moved to the
left of the current position by a number of dots equal to the complement on two of n
12
ESC 0
Sets vertical spacing to 1/8 inch.
ASCII Code ESC 0
Hexadecimal Value 1B 30
Decimal Value 27 48
This code causes vertical spacing to be set to 1/8 inch.
ESC 1
Sets vertical spacing to 7/72 inch. (IBM)
ASCII Code ESC 1
Hexadecimal Value 1B 31
Decimal Value 27 49
This command causes vertical spacing to be set to 7/72 inch.
ESC +
Sets n/360-inch line spacing. (IBM)
ASCII Code ESC + n
Hexadecimal Value 1B 2B
Decimal Value 27 43
Range 0 <
n
n
n < 255
This command sets the line spacing to n/360 inch. If the line spacing is changed, it does not
affect previous settings for vertical tabs or pa ge length..
13
ESC 2
Sets the vertical spacing to 1/6 inch. (EPSON)
ASCII Code ESC 2
Hexadecimal Value 1B 32
Decimal Value 27 50
This command causes the vertical spacing to be set to 1/6 inch.
ESC 2
Enables the vertical spacing set by ESC A. (IBM)
ASCII Code ESC 2
Hexadecimal Value 1B 32
Decimal Value 27 50
This command enables the vertical spacing sets by ESC A.
14
ESC 3
Sets vertical spacing to n/180 inch. (IBM XL24 AGM, EPSON)
ASCII Code ESC 3 n
Hexadecimal Value 1B 33
Decimal Value 27 51
Range 1 <
n
n
n < 255
This sequence sets the vertical spacing to n/180 inch. It is ignored if n is equal to 0.
ESC 3
Sets vertical spacing to n/216 inch. (IBM XL24, 2391 +)
ASCII Code ESC 3 n
Hexadecimal Value 1B 33
Decimal Value 27 51
Range 0 <
n
n
n < 255
This sequence sets the vertical spacing to n/216 inch.
ESC 4
Sets the current position as top of form (first printable line). (IBM)
ASCII Code ESC 4
Hexadecimal Value 1B 34
Decimal Value
2277 5522
This sequence sets the first line of the fanfold paper as the current paper position of the form.
ASCII Code ESC A n
Hexadecimal Value 1B 41
Decimal Value 27 65
n
n
This command changes the default vertical spacing to n/72 inch. The vertical spacing value is
stored and activated only after the ESC 2 code is recei ved.
ESC B
Sets vertical tab stops.
ASCII Code ESC B
Hexadecimal Value 1B 42
Decimal Value 27 66
Range 1 <
n1 … n
n1 ... nx 00
n1 ... n
n < 255
In EPSON mode, sets vertical tab stops in the 0 Vertical Format Unit (VFU) channel. This code
sets up to 16 vertical tab stops at the line specified by n1, n
tab stops are memorized as physical positi ons. In IBM modes, thi s code sets up to 64 vertical tab
stops at the line number specified by n1, n2 and so on in the 0 VFU channel. The tab stops are
memorized as logical positi ons.
0
x
0
x
and so on in the 0 VFU channel. The
2
16
ESC B NUL
Resets vertical tab stops.
ASCII Code ESC B NUL
Hexadecimal Value 1B 42
Decimal Value 27 66 00
00
Resets vertical tab stops in the 0 Vertical Format Unit (VFU) channel.
ESC b
Sets vertical tab stops in one of the 8 Vertical Format Unit channels available. (EPSON)
ASCII Code ESC b
Hexadecimal Value 1B 62
Decimal Value 27 98
Range 0 <
1 <
m
n1 ... nx
m n1 ... nx 0
m n1 ... nx 00
m n1 ... nx 0
< 7
< 255
This sequence sets vertical tabulations in the VFU channel specified by the parameter m.
The VFU channel can be imagined as a blank page where you can set up to 16 vertical
tabulations in order to format your page as you like. 8 channels are available and in each of
them you can create a sample page tha t you can recall later. n1 to n16 specify the lines at which
vertical tabulations must be set.
The values of n must be in ascending order. If you change the vertical spacing, the vertical
tabulations set are not cancelled and they maintain their physical position on the page.
The vertical tabulations set in the channel specified by the m parameter are executed by the VT
code when the specific channel is selected by the ESC / command, this code is executed as a line
feed.
17
ESC b NUL
Resets vertical tab stops in one of the 8 Vertical Format Unit channels available. (EPSON)
ASCII Code ESC b NUL
Hexadecimal Value 1B 62
Decimal Value 27 98 0
00
Resets vertical tab stops in one of the 8 Vertical Format Unit channels available.
ESC C 0 n
Sets form length to n inches.
ASCII Code ESC C 0 n
Hexadecimal Value 1B 43 00
Decimal Value 27 67 0
Range 1 <
n < 24
n
n
This command sets the form length to the number of inches specified by n. The current position
of the paper is assumed as top of form.
ESC C n
Sets form length to n lines.
ASCII Code ESC C n
Hexadecimal Value 1B 43
Decimal Value 27 67
n
n
Range 1 <
n < 255
This command sets the form length to the number of lines specified by n at the current vertical
spacing. The current position of the paper is assumed as top of form.
18
ESC D
Sets horizontal tab stops.
ASCII Code ESC D
Hexadecimal Value 1B 44
Decimal Value 27 68
Range 1 <
n1 n2 … nx 0
n1 n2… nx 00
n1 n2… nx 0
n < 255
This sequence sets up to 28 (IBM mode) or 32 (EPSON mode) horizontal tab stops after canceling
the current setting. The n1 to nx parameters specify the number of columns at which horizontal
tab stops are required and must be entered in the sequence in ascending numerical order. Any
value outside this range will be ignored. In IBM mode, the tab stop position is memorized as
logical position i n the pag e so that i t i s affected by chang ing the horizonta l spa cing. The col umns
are numbered 1 through 136. In EPSON mode , th e tab st op pos ition s et b y ES C D is memoriz ed a s
physical position in the page and therefore it is not affected by changing the horizontal spacing. The
physical position of the tab stop depends on the horizontal spacing in operation when ESC D is used.
The ESC D 0 cancels all active tab stops.
ESC d
Spaces forwards relative dot position. (IBM)
ASCII Code ESC d
Hexadecimal Value 1B 64
Decimal Value 27 100
Range 0 <
n1 n
2
n
1 n2
n1 n
2
n1, n
< 255
2
This command moves the print carriage of a (n1 + (n2*256))/120 inch displacement on the right of its
current dot position. If the selected position is outside the current right margin, it is forced to the last
column.
19
ESC e
Spaces backward relative dot position. (IBM)
n1, n
n1 n
n1 n
n
n
n
1
1
2
2
2
n
2
2
< 255
ASCII Code ESC e
Hexadecimal Value 1B 65
Decimal Value
Range 0 <
2277 110011
This command moves the print carriage of a (n1 + (n2*256))/120 inch displacement on the left of its
current dot position. If the selected position is outside the current left ma rgin, it is forced to the
first column.
ESC l
Sets left margin. (EPSON)
ASCII Code ESC l n
Hexadecimal Value 1B 6C
Decimal Value
Range 0 <
n
n
2277 110088
n
n < 255
This code sets the left margin at the current horizontal spacing. It must be sent at the beginni ng
of the line. The n parameter specifies the number of columns. For each type of horizontal spaci ng
there is a different range of possible values, as shown in the following table:
20
Character Width Horizontal Spacing Range of columns
Double Width
5 0 < n < 67
6 cpi 0 < n < 80
7.5 cpi 0 < n < 100
8.5 cpi 0 < n < 114
10 cpi 0 < n < 134
Normal
10 cpi 0 < n < 134
12 cpi 0 < n < 160
15 cpi 0 < n < 201
17 cpi 0 < n < 229
20 cpi 0 < n < 255
24 cpi 0 < n < 255
Any value outside the accepted range is i gnored and the previous setting remains in effect. The
left margin must be smaller than the right margin. The physical position set for the left margin
does not change if the horizontal spacing is modified. This command overrides the menu setting.
ESC N
Sets the skipover perforation to n lines.
ASCII Code ESC N n
Hexadecimal Value 1B 4E
Decimal Value 27 78
Range 1 <
n
n < 127 (EPSON mode)
1 <
n < 225 (IBM mode)
n
21
The skipover perforation is the sum of top and bottom margins values at the selected vertical
spacing. The n parameter must be less than the current form length. The skipover i s memorized
as physical position on the page. It is cancelled by ESC O or changing the form length.
The skipover value, when accepted, will set the top and bottom margins according to the
operator panel setting (see User Manual in this CD-ROM):
If the top margin set via operator panel is greater than the skipover value, then the following
value of the margins will be set:
Top margin = skipover value
Bottom margin = 0
If the top margin set via operator panel is less or equal to the skipover value, then the following
value of the margins will be set:
Top margin = operator panel value
Bottom margin = the difference between skipover value and top margin value
If the sum of the top and bottom margins values set via operator panel is less than the skipover
value, the following values for the margins will be set:
Top margin = operator panel value
Bottom margin = the difference between skipover value and top margin value
Changing the vertical spacing does not affect the skipover distance. This can be changed by a
further ESC N command or can be reset by the ESC O command, which resets the skipover
value to 0. The skipover perforation will be executed when the end of the page is reached with a
LF, VT or FF code and not with the ESC J or ESC C command, the skipover perforation is
cancelled and must therefore be set again.
22
ESC O
Disables the skipover perforation.
ASCII Code ESC 0
Hexadecimal Value 1B 4F
Decimal Value 27 79
This sequence sets the number of lines of the skipover perforation to the value 0 a nd so any ski p
perforation set by ESC N is cancelled.
ESC Q
Sets the right margin. (EPSON)
ASCII Code ESC Q n
Hexadecimal Value 1B 51
Decimal Value 27 81
Range 1 <
n
n
n < 225
This code sets the line length at the current horizontal spaci ng. It must be sent at the beginning
of the line.
The n parameter specifies the number of columns a nd for each type of horizontal spacing there is
a range of values, as shown in the following table:
23
Character Width Horizontal Spacing Range of columns
Double Width
5 cpi 1 < n < 67
6 cpi 1 < n < 81
7.5 cpi 1 < n < 101
8.5 cpi 1 < n < 116
10 cpi 1 < n < 135
Normal
10 cpi 1 < n < 135
12 cpi 1 < n < 162
15 cpi 1 < n < 203
17 cpi 1 < n < 232
20 cpi 1 < n < 255
24 cpi 1 < n < 255
Any value outside the accepted range is i gnored and the previous setting remains in effect. The
right margin must be greater than the left margin. The physical position set for the right margin
does not change if the horizontal spacing is modified.
ESC R
Sets horizontal and vertical tab stops to default values. (IBM)
ASCII Code ESC R
Hexadecimal Value 1B 52
Decimal Value 27 82
This command sets horizontal tab stops every eight columns starting from column 9 and cancels
all vertical tab stops.
24
ESC SP
Sets intercharacter space. (EPSON)
ASCII Code ESC SP n
Hexadecimal Value 1B 20
Decimal Value 27 32
Range 0 <
n
n
n < 255
This command sets the intercharacter space to n/120 inch in Draft printing and n/180 inch in
Quality printing.
ESC X
Sets left and right margins. (IBM)
ASCII Code ESC X
Hexadecimal Value 1B 58
Decimal Value 27 88
Range 0 <
2 <
This command sets the left and right margins simultaneously. The n
respectively the number of columns for the left and right margi ns at the current spacing. These
margins are memorized in terms of absolute displacement from the physical left edge of the
page. Use a CR immediately after ESC X n to establish the print head position relative to the
new margin setting.
n1 n
2
n1 n2
n1 n
2
n
< 134 (left margin)
1
n
< 136 (right margin)
2
and n
1
parameters indicate
2
If n1 is equal to 0, the current left margin of the page is used. If n
is equal to 1, the current right
2
margin of the page is used. The left margin value must be less than the right margin value. The
right margin value must not exceed the physical right edge of the paper; otherwise the
maximum acceptable value for the right margin will be set.
25
FF
Advances paper to the top of the next page.
ASCII Code FF
Hexadecimal Value 0C
Decimal Value 12
This code is a terminator code, when received, ca uses all data in the print buffer to be printed
out. Then it advances the paper to the first printable line of the next form. The line counter is set
to the first line value and the column counter is set to the left margin value. This code cancels
the double width printing set by SO code.
HT
Moves logically the print carriage to the next horizontal tab stop.
ASCII Code HT
Hexadecimal Value 09
Decimal Value 9
This code moves logically the print carriag e to the next horizontal tab stop as defined by ESC D.
Up to 28 (IBM mode) or 32 (EPSON mode) horizontal tab stops can be set. The HT code is
ignored if no tab stop has been set or if the current print carri age position has moved past the
last tab position or if the tab stop is on or beyond the right margin. At power on, the tab stops
are set every eight columns (default).
In EPSON mode, the default tab stops are memorized as logical position in the page, so that are
affected by changing the horizontal spacing. The tab stop positions set by ESC D are memorized
as physical position in the page and therefore they are not affected by changing the horizontal
spacing. When the double width printing is selected, the tab stop setting must take account that
each character occupies two columns. In IBM mode, the tab stops, both, default and set by ESC,
are memorized as logical position in the page, so that are affected by changing the horizontal
spacing. The horizontal tab stops can be changed by the ESC D command.
26
VT
Advances paper to the next vertical tab stop of the selected VFU channel.
ASCII Code VT
Hexadecimal Value 0B
Decimal Value 11
This code is a terminator code and when receiv ed causes the contents of the print buffer to be
printed before advancing paper to the next vertical tab stop set by the ESC B or the ESC b
commands.
This code will be executed normally, if vertical tab stops follow the current print position. It will
be executed like a FF code (EPSON mode) or like a LF code (IBM mode), if the vertical tab stops
follow the bottom of form position (which corresponds to the form length if the bottom of form
has not been set) or if the current position is beyond the last vertical tab stop. It will be executed
like a LF code if no vertical tab stops have been set by the ESC B or ESC b commands.
In EPSON mode, the vertical tabul ations are referred to the VHF channel selected b y the ESC /
m. If no VFU channels have been selected, the printer assumes as default channel 0.
This command resets the double width printing set b y SO or ESC SO command.
27
PPrriinntt MMooddee
DC2
Sets 10 cpi printing. (IBM)
ASCII Code DC2
Hexadecimal Value 12
Decimal Value 18
This is a terminator code. It causes all data present in the print buffer to be printed. This
command is accepted at any position within the line. The character that follows this command
will be printed at 10 cpi.
DC2
Cancels compressed printing. (EPSON)
ASCII Code DC2
Hexadecimal Value 12
Decimal Value 18
This is a terminator code. It causes all data present in the print buffer to be printed. This
command is accepted at any position within the line. The character that follows this command
will be printed as follows:
17 CPI
→
10 CPI
20 CPI
→
12 CPI
28
DC4
Cancels double width printing.
ASCII Code DC4
Hexadecimal Value 14
Decimal Value 20
This code cancels the double width printing set by SO or ESC SO code. It has no effect if the ESC
W or ESC ! command has set double width.
ESC -
Sets or cancels underlined printing.
ASCII Code ESC - n
Hexadecimal Value 1B 2D
Decimal Value 27 45
n
n
Enables or disables the underlined printing.
See the following table:
n Underlined Printing
1 enabled
0 disabled
29
ESC !
Sets printing style. (EPSON)
ASCII Code ESC ! n
Hexadecimal Value 1B 21
Decimal Value 27 33
n
n
This command is used to select any valid combination of the printing attributes. Each printing
attribute is selected by the n parameter, as specified in the following page:
To print the desiderated combinati on of printing attributes, calcula te the n para meter by addi ng
up the values of each attribute.
If attributes are sent in the print line during the HS Draft print ing, these att ributes will be forced to
be printed in Draft mode.
30
ESC ( -
Sets score line. (EPSON)
ASCII Code ESC ( Hexadecimal Value 1B 28 2D
Decimal Value 27 40 45
Range
n1 =
n2 =
m =
1 <
d
n1 n2 m d1 d
n1 n2 m d1 d
n1 n2 m d1 d
3
0
1
d1
< 3
= 0, 1, 2, 5, 6
2
2
2
2
This command enables/disables scoring of all characters and spces following this command
according to the following parameters:
d1 Line d2 Line
1 Underline 0 Cancel score line
2 Strikethrough 1 Single continous line
3 Overscore 2 Double continous line
5 Single broken line
6 Single broken line
Any combination of scoring may be simultaneously. Each type is independent of other types.
Graphics characters are not scored.
31
ESC [ -
Selects the score line. (IBM 2391 + only)
ASCII Code ESC [ -
Hexadecimal Value 1B 5B 2D
Decimal Value 27 91 45
Range
n1 =
n2 =
n1 n2 loc type
n1 n2 loc type
n1 n
2
0
loc type
2
This command selects several forms of overscore, underscore and strikethrough.
To select loc: To select type:
loc Selection type Selection
1 Underscore 0 Cancels line
2 Strikethrough 1 Single line
3 Overscore 2 Double line
255 Cancels all score selections
ESC :
Sets 12 CPI. (IBM)
ASCII Code ESC :
Hexadecimal Value 1B 3A
Decimal Value 27 58
This is a termi nator code. I t causes a ll data present in the pri nt buffer to b e printed. Subsequent
data will be printed at 12 cpi. This command is accepted at any position within the line. The
setting of another horizontal spacing resets this command.
32
ESC <
Prints characters for one line from left to right. (EPSON)
ASCII Code ESC <
Hexadecimal Value 1B 3C
Decimal Value 27 60
This command causes the printing of one line from left to right.
ESC [ @
Selects the printing type style. (IBM 2391 + only)
ASCII Code ESC [ @
Hexadecimal Value 1B 5B 40
Decimal Value 27 91 64
4 0 m1 0 m3 m
04* 00* m1 00* m3 m
4 0 m1 0 m3 m4
4
4
(*) These values are constants.
This command is used to modify the type style of the character and the number of line spacing.
Use this command for:
1. Italic printing
2. Single-high character
3. Double-high character
4. Single-wide character
5. Double-wide character
6. Single Line Feed
7. Double Line Feed
These selections may be combined: italic print with double height, doublewide character and double
line feed.
33
See the following tables for m1, m3 and m4 selections:
m3 Selection
0 No Change
1 Single-High Character
2 Double-High Character
16 Single Line Feed
32 Double Line Feed
m4 Selection
0 No Change
1 Single-Wide Character
2 Double-Wide Character
16 Single Line Feed
32 Double Line Feed
34
ESC [ @
Sets double high printing and double line feed. (IBM)
ASCII Code ESC [ @
Hexadecimal Value 1B 5B 40
Decimal Value 27 91 64
l =normally 4, h = normally 0, m
l h m1 m2 m3 m
l h m1 m2 m3 m
l h m1 m2 m3 m
= 0, m2 = 0
1
4
4
4
This command sets height, width and vertical spacing.
The l and h parameters specify the number of mode bytes mx contained in the sequence.
The m3 and m4 parameters specify the printing characteri stics.
The m3 parameter controls both the line spacing and the character height. It has two parts: a
high-order half-byte of m3 controls the line spacing and the low-order half-byte controls the
character height.
m3 Character Height Line Spacing
0 No change No change
1 Standard character height Line feeds unchanged
2 Double character height Line feeds unchanged
16 Character height unchanged Normal line feeds
17 Standard character height Normal line feeds
18 Double character height Normal line feeds
32 Character height unchanged Double line feeds
33 Standard character height Double line feeds
34 Double character height Double line feeds
35
The m4 parameter specifies the character width. Only the low-order half-byte is significant in
this mode byte. The high-order half-by t e is ignored.
m4 Character Width Line Spacing
0 No change No change
1 Standard width character No change
2 Double width character No change
ESC [ d
Set the print quality. (IBM 2391+ only)
ASCII Code ESC [ d
Hexadecimal Value 1B 5B 64
Decimal Value 27 91 100
1 0 n
01 00 n
1 0 n
This command sets the print quality to draft or LQ print.
n Types
0 No change
From 1 to 63 HS Draft
From 64 to 127 Draft
From 128 to 254 Letter Quality
255 Initialization on NVRAM values
If attributes are sent in the print line during the HS Draft print ing, these att ributes will be forced to
be printed in Draft mode.
36
ESC [ I
Sets font and pitch of a character. (IBM 2391 + only)
ASCII Code ESC [ I
Hexadecimal Value 1B 5B 49
Decimal Value 27 91 73
2 0 m n
02 00 m n
2 0 m n
This command allows modifying the font and pitch type style of a character.
The values 2 and 0 are constants. If font and pitch l ocks are active, thi s command is ignored. To
select the values for the variables m and n, which identify the pitch and the font type style to
use, refer to the table below.
1. Identify the type style (pitch and font) to use in the left column (pitch).
2. For the hexadecimal values for m n, look across the row to the second column (Hex m n)
3. For the decimal values for m n, look a cross the row to the third column (Decimal m n).
4. Substitute these values for m n in the printer command syntx.
ASCII Code ESC _ n
Hexadecimal Value 1B 5F
Decimal Value 27 95
n
n
Enables or disables the overscore printing. See the following table:
n Overscore Printing
1 Enabled
(all spaces and characters that follow are overscored)
0 Disabled
ESC 4
Sets italics printing mode. (EPSON)
ASCII Code ESC 4
Hexadecimal Value 1B 34
Decimal Value 27 52
Sets the style attribute of the font to italic. This command selects italic printing even if the italic
character table is not selected.
39
ESC 5
Cancels italics printing. (EPSON)
ASCII Code ESC 5
Hexadecimal Value 1B 35
Decimal Value 27 53
Sets the style attribute of the font to normal (cancels the italic style attribute previously selected
with the ESC 4 command).
ESC a
Sets Letter Quality justification printing. (EPSON)
ASCII Code ESC a n
Hexadecimal Value 1B 61
Decimal Value 27 97
Range 0 <
n
n
n < 3
Selects from four types of justification, as follows:
n Justification
0 Left
1 Centered
2 Right
3 Allows an uniform printing between the margins when the buffer is full.
40
ESC b
Selects black ribbon band . (IBM )
ASCII Code ESC b
Hexadecimal Value 1B 62
Decimal Value 27 98
This command selects the black ribbon band.
ESC c
Selects cyan ribbon band. (IBM)
ASCII Code ESC c
Hexadecimal Value 1B 63
Decimal Value 27 99
This command selects the cyan ribbo n band.
ESC E
Sets emphasized printing.
ASCII Code ESC E
Hexadecimal Value 1B 45
Decimal Value 27 69
This command starts emphasized printing. The print head strikes each dot twice to produce a
darker, bolder character. The second strike is offset horizontally.
41
ESC F
Cancels emphasized printing.
ASCII Code ESC F
Hexadecimal Value 1B 46
Decimal Value 27 70
This command ends emphasized printing. This escape sequence cancels emphasized printing
that was started by ESC E.
ESC G
Sets double strike printing.
ASCII Code ESC G
Hexadecimal Value 1B 47
Decimal Value 27 71
This command starts double-strike printing. ESC G may be canceled by ESC H.
ESC g
Sets 15 CPI. (EPSON)
ASCII Code ESC g
Hexadecimal Value 1B 67
Decimal Value 27 103
Subsequent data will be printed at 15 cpi. This command is accepted at any position within the
line. If you change the pitch during proportional mode (selected wih the ESC p command) the
change takes effect when the printer exits proportional mode.
42
ESC H
Cancels double strike printing.
ASCII Code ESC H
Hexadecimal Value 1B 48
Decimal Value 27 72
This command cancels double-strike printing with the ESC G command.
ESC I
Selects printing type for resident and DLL characters. (IBM)
ASCII Code ESC I n
Hexadecimal Value 1B 49
Decimal Value 27 73
n
n
This command selects the resident or the download font in Draft o LQ printing mode. It is
ignored if you select a font that has not been downloaded or has been overwritten.
See the following table:
n Resident font n Download font
0 Draft 10 cpi 4 Draft 10 cpi
2 LQ 10 cpi 6 LQ 10 cpi
3 Proportional 7 Proportional
ASCII Code ESC M
Hexadecimal Value 1B 4D
Decimal Value 27 77
This is a termi nator code. I t causes a ll data present in the pri nt buffer to b e printed. Subsequent
data will be printed at 12 cpi if you previously set the compressed spacing by sending the SI or
ESC SI command. If you select the proportional printing, this command is stored.
ESC m
Selects magenta ribbon band. (IBM)
ASCII Code ESC m
Hexadecimal Value 1B 6D
Decimal Value 27 109
This command selects the magenta ribbon band.
ESC P
Selects 10.5 point, 10 cpi. (EPSON)
ASCII Code ESC P n
Hexadecimal Value 1B 50
Decimal Value 27 80
n
n
This command selects 10.5-point, 10-cpi character printing. If you change the pitch during
proportional mode (selected with the ESC p command) the change takes effect when the printer
exits proportional mode.
44
ESC P
Sets or cancels proportional printing. (IBM)
ASCII Code ESC P n
Hexadecimal Value 1B 50
Decimal Value 27 80
Range 1 <
n
n
n < 255
This code is a terminator code; when receiv ed it causes all data i n the print buffer to be printed
out. Then if n parameter i s equal to 1, the subsequent data is printed in proportional mode. If n
parameter is equal to 0, proportional mode is reset. If the any horizontal spacing command is
sent to the printer when the proportional printing is set, the command will be stored and will be
activated as soon as the proportional printing will be reset.
ESC p
Sets or cancels proportional printing. (EPSON)
ASCII Code ESC p n
Hexadecimal Value 1B 70
Decimal Value 27 112
Range 1 < n < 255
This command selects the proportional or fix ed spacing according to the following values:
n Proportional Printing
0 Returns to current fixed character pitch
n
n
1 Selects proportional character spacing
The changes made to the fixed-pitch setting with ESC P, ESC M or ESC g commands during
proportional mode take effect when the printer exits proportional mode. The printer
automatically switches to LQ mode when the printer exits proportional mode.
45
ESC r n
Selects the ribbon color. (EPSON)
ASCII Code ESC r n
Hexadecimal Value 1B 72
Decimal Value 27 144
Range 0 < n < 6
n
n
Selects the color of printing. The printer ignores this command if color printing is not available.
See the following table:
n Ribbon Color
0 Black
1 Magenta
2 Cyan
3 Violet (cyan on magenta)
4 Yellow
5 Red (magenta on yellow)
6 Green (cyan on yellow)
46
ESC S
Sets subscript or superscript printing.
ASCII Code ESC S n
Hexadecimal Value 1B 53
Decimal Value 27 83
n
n
Selects the subscript or the superscript printing. See the following table:
n Selection
1 Subscript Print enabled
0 Superscript Print enabled
The proportional printing of the subscript or superscript characters is performed at 2/3 of the
proportional character width. Use the ESC T comma nd to cancel super/subscript printing.
SI or ESC SI
Sets compressed printing.
ASCII Code SI or ESC SI
Hexadecimal Value 0F or 1B 0F
Decimal Value 15 or 27 15
This command is accepted at any position within the line. The setting of this command depends
on the horizontal spacing previously set:
10 CPI
12 CPI
Proportional
→
→
→
17 CPI
20 CPI
½ width
DC2 code cancels the compressed printing.
47
SO or ESC SO
Sets double width printing (one line).
ASCII Code SO or ESC S0
Hexadecimal Value 0E or 1B 0E
Decimal Value 14 or 27 14
This code causes subsequent data in the same li ne to be printed a s double width characters. It is
canceled by the CR, LF, VT, FF and DC4 codes o when the buffer is full.
ESC s
Sets and resets Quiet printing. (EPSON)
ASCII Code ESC s n
Hexadecimal Value 1B 73
Decimal Value 27 115
n
n
This command controls printing speed as foll o ws:
n Selection
0 Normal speed printing
1 Quiet speed printing
48
ESC T
Cancels subscript or superscript printing.
ASCII Code ESC T
Hexadecimal Value 1B 54
Decimal Value 27 84
This command cancels subscript or superscript pri nting selected by ESC S command.
ESC W
Sets or cancels double width printing.
ASCII Code ESC W n
n
n
Hexadecimal Value 1B 57
Decimal Value 27 87
Range 0 < n < 1
Enables or disables the double width printing.
See the following table:
ASCII Code ESC w n
Hexadecimal Value 1B 77
Decimal Value 27 119
Range 0 < n < 255
n
n
Enables or disables the double-height printing of all characters. The first line of a page is not
doubled if the ESC w command is sent on the first line; all following lines are printed at doubleheight. Double-height printing overrides super/subscript, condensed, HS Draft printing,
super/subscript, condensed. HS Draft printing resumes when double-height printing is canceled.
See the following table:
This command selects either LQ or Draft printing according to the following values:
n Selection
0 Draft printing
1 Letter Quality printing
If you select proportional spacing with the ESC p command during Draft printing, the printer
prints an LQ font instead. When you cancel proporti onal spacing with the ESC p command, the
printer returns to Draft printing.
ESC y
Selects yellow ribbon band. (IBM)
ASCII Code ESC y
Hexadecimal Value 1B 79
Decimal Value 27 121
This command selects yellow ribbon band.
51
SI
Sets compressed printing. (EPSON)
ASCII Code SI
Hexadecimal Value OF
Decimal Value 15
This command is accepted at any position within the line. DC2 code cancels the compressed
printing: The setting of this command depends on the horizontal spacing previously set
10 CPI
12 CPI
→
→
17 CPI
20 CPI
Proportional ½ width
DC2 code cancels the condensed printing.
SO
Sets double width printing (one line).
ASCII Code SO
Hexadecimal Value 0E
Decimal Value 14
This code causes subsequent data in the same line to be printed as double width characters. It is
cancelled by the CR, LF, VT, FF and DC4 codes o when the buffer is full.
52
CChhaarraacctteerr SSeett
ESC [ T
Selects a Code page.
ASCII Code ESC [ T
Hexadecimal Value 1B 5B 54
Decimal Value 27 91 84
4 0 0 0 Hc Lc
04 00 00 00 Hc Lc
4 0 0 0 Hc Lc
This sequence allows cha nging the current code page. If an unavailable code page i s specified,
this command is ignored. The digits 04 00 00 00 (hexadecimal) and 4 0 0 0 (decimal) are
constant. To calculate Hc Lc for a code page that is not shown: If your code page has an
alphabetic character, such as 437G, add 10,000 to the code page number, then divide by 256.
Prints characters from all characters table. (IBM)
ASCII Code ESC \
Hexadecimal Value 1B 5C
Decimal Value 27 92
Range 0 <
0 <
n1 n
n1 n
n1 n
2
n1
< 255
n2 < 255
2
2
This command prints the next n1 + n2 x 256 characters from the table of all printable characters.
The total number of characters that will be printed from the table of all printable characters is
equal to n1 + (n2 x 256). For example, to print 300 characters from the table of all printable
characters: n1 = 44, n2 = 1.
The control codes are not recognized as long as this sequence is active. The space character is
printed as an unassigned character.
ESC ^
Prints a single character from the all characters table. (IBM)
ASCII Code ESC ^ n
Hexadecimal Value 1B 5E
Decimal Value 27 94
Range 0 <
n
n
n < 255
This command prints the next character from the al l characters table. This sequence prints only
one character from the all character table.
54
ESC 6
Selects the Character Set 2.
ASCII Code ESC 6
Hexadecimal Value 1B 36
Decimal Value 27 54
This command selects the character set 2.
ESC 7
Selects the Character Set 1.
ASCII Code ESC 7
Hexadecimal Value 1B 37
Decimal Value 27 55
This command selects the character set 1.
55
ESC k
Selects the LQ fonts. (EPSON)
ASCII Code ESC k n
Hexadecimal Value 1B 6B
Decimal Value 27 107
n
n
Selects one of the available fonts in Letter Quality. If the Draft mode is selected when this
command is sent, the new LQ font will be selected when the printer returns to LQ printing.
Boldface available if the command ESC p1 (proportional) is sent.
ASCII Code ESC R n
Hexadecimal Value 1B 52
Decimal Value 27 82
Range 0 <
n
n
n < 13
This code causes the national character set to be selected according to the parameter n.
See the following table:
n National Character Sets n National Character Sets
0 USA 7 Spain-I
1 France 8 Japan
2 Germany 9 Norway
3 United Kingdom 10 Denmark-II
4 Denmark-I 11 Spain-II
5 Sweden 12 Latin America
6 Italy
57
ESC t
Selects characters table. (EPSON)
ASCII Code ESC t n
Hexadecimal Value 1B 74
Decimal Value 27 116
Range 0 < n < 3
n
n
Selects the upper half (from 128 to 255) from the character table.
n Character Tables
0 Standard Italic Character Set
1 ASCII Character Set
2 Remaps DLL Character Set from position 0-127 to 128-255
58
DDoowwnnllooaadd CChhaarraacctteerr
ESC %
Selects user-defined character set. (EPSON)
ASCII Code ESC % n
Hexadecimal Value 1B 25
Decimal Value 27 37
n
n
This command switches between the normal (resident) and user-defined (downloaded)
characters:
n Selection
1 Selects the use of down-loaded character set in RAM
0 Selects the use of resident character set in ROM
59
ESC &
Defines the 24-pin download characters. (EPSON)
ASCII Code ESC &
Hexadecimal Value 1B 26
Decimal Value 27 38
Range 0 < n < 127
0 <
0 < = d
a0 a1 a
NUL n m a0 a1 a2 d1… d
00 n m a0 a1 a2 d1… d
0 n m a0 a1 a2 d1… dx
m < 127
<= 255
x
see below
2 :
x
x
This escape sequence is used to download fonts into the printer. Once fonts have been
downloaded they can be selected by ESC % n.
Parameter n is the character position of the first character and parameter m is the character
position of the last character to be downloaded. F or example, to download character “RST” the
user would specify n=52H and m=54H. Characters must be dowloaded to consecutive positions
after the first character. The parameters a0, a1 and a2 must be sent for each character being
downloaded and are known as the attribute bytes. Parameter a0 specifies the number of dot
columns to be added before the character.
Parameter a1 specifies the width of the character.Parameter a2 specifies the number of dot
columns to add after the character. The parameters d1 …dx represent the dot column data being
downloaded for each character. 2 or 3 data b ytes represent 1 column of dots depending upon the
print mode type as shown below. Draft, Letter Quality and super/subscript fonts can be
downloaded. It is necessary to sel ect the desired print mode prior to sending the downl oad data.
Each dot column has a width of 1/120 ” in Draft and 1/360 in Letter Quality. Following are limits
of parameters a0,a1 and a2 for LQ Draft and Super/Subscript print mode at various character
pitches.
If a data bi t has a value of 1 , then the corresponding wire is fired. If a data bit has a value of 0,
then the wire is not fired. In general the user of this feature must be careful that the number of
bytes of downloaded information is equal to 3 x width of the character being defined (a1) or the
results will be unpredictable. Only one print mode type may be downloade at a time. That is, if
draft characters have been downloaded, then selecting Letter Quality and downloading
characters will cause the draft download characters to be cleared. This applies similarly to script
characters.
ESC :
Copies characters from ROM to RAM. (EPSON)
ASCII Code ESC :
Hexadecimal Value 1B 3A
Decimal Value 27 58
NUL n 0
00 n 00
n 0
This code copies the chara cter generator in ROM into RAM area dedicated to the user-defi ned
characters. The n parameter represents the LQ typestyle. I t copies the data for the characters
between 0 and 255 (from the italic character table) of the Courier or Gothic font from ROM to
RAM memory according to the following values:
n Selection n Selection
2 Courier 1 Gothic
4 Script 5 OCR-B
6 OCR-A
182 DLL
Before copying ROM characters to RAM, cancel ita lics with the ESC 5 command. After copying
you can italicize characters by sending the ESC 4 command.
62
ESC =
Defines downloaded characters. (IBM)
ASCII Code ESC = n
Hexadecimal Value 1B 3D
Decimal Value 27 61
m id p t
n m id p t
n m id p t
This sequence allows you to design and then down-line load special characters not present in the
character set in use. Whenever you would like to start the DLL setting procedure, proceed as
follows:
• Copy the character generator in ROM into RAM
• Select the DLL generator
There are 256 entries of 9 bytes that compose the look up table of a character generator. One
entry describes one character as follows:
Byte 1, 2 The a bsolute address of the character definition.
Byte 3 :
- Bit 7 1: indicates that the character is a graphic character (connects at 6 lpi)
0: indicates that the character is an alphanumerical character
- Bit 6 0: indicates a D LL character
1: indicates a resident character
- Bit 5 to 0 These 6 bits indicate the effective number of dot columns of the character shape
stored in memory.
63
Byte 4:
- Bit 7, 6 Graphic character description:
- 0: shading character
- 1: line drawing character
- 10: underscored character
- 11: not supported All graphics characters are 30 dot high. An underscored character is defined as a
blank graphic (all zeros) and it is automatically generated by the printer. A
shading character repeats dots 1-6 of each column as dots 25 through 30
respectively. A line drawing character repeats dots 23 and 24 as the pairs 25
and 26, 27 and 28, 29 and 30.
- Bit 5 to 0 The number of dot columns of the character shape minus one. For example: the
character width of Draft generator is 10 dots and bit 5 to 0 must be set to 9.
- Bit 5 to 9 Compression mask description. It is used to optimize the memory occupation
and it is based on the concept that a dot column on its left is not stored. You can
calculate the compression mask of a character only after designing the entire
character. Every bit is associated with a dot column with the bit 7 of byte 5
associated with the leftmost column. The bit is set to {1}, if the column is equal
to the preceding one; otherwise, it is set to {0}. If the character is longer than 39
dot columns the remaining dot columns must be stored without compression.
The bit 40 (bit 0 of byte 9) must be 0. If no compression is present in the
character, byte 5 to 9 is composed by all zeros.
64
If you wish to copy an entry over another entry so that two characters with the same
characteristics and different code are present in the same look up tab le, the DLL sequence ESC
= n m id p t has the following meaning:
n and m: Indicate the byte number of the sequence n is the low part and m is the high
part.
id:
Indicates the printer model. The id related to your printer is 23H.
p and t: Indi cate the memory address of the character that you wish to replace. p is the
low part and t is the high part.
data:
Is the entry 9 bytes of the character that you want to position at address
specified by p and t.
65
BBiitt--IImmaaggee
ESC *
Sets dot graphics printing. (IBM XL24 AGM, EPSON)
ASCII Code ESC *
Hexadecimal Value 1B 2A
Decimal Value 27 42 m
Range
m n1 n
m n1 n2 p1 p2 … px
n
0 <
, n2 < 255
1
px < 255
0 <
p1 p2 … p
2
n1 n2 p1 p2 … p
x
x
Selects 8-dot graphics or 24-dot graphics modes accordi ng to the table below: The parameter m
determinates the horizontal density as well as the number of wires to be fired.
For the 8-dot images, the total number of data bytes (p) to be sent is determined by the following
formula: n1 + n2 x 256.
m DPI # DOTS DENSITY NAME Other ESC
0 60 8 Normal density ESC K
1 120 8 Dual density ESC L
2 120 (virtual) 8 Double speed, Dual density ESC Y
3 240 (virtual) 8 Quadruple-density ESC Z
4 80 8 CTR Graphic I
6 90 8 CTR Graphic II
66
For the 24-dot images, the total number of data bytes (px) to be sent is determined by the
following formula: 3.x.(n1 + n2 x 256).
m DPI # DOTS DENSITY NAME
32 60 24 Normal density
33 120 24 Double density
38 90 24 CRT Graphic III
39 180 24 Triple-density
40 360 (virtual) 24 Hex-density
ESC ?
Reassigns dot graphics mode. (EPSON)
ASCII Code ESC ?
Hexadecimal Value 1B 3F
Decimal Value 27 63
n m
n m
n m
Reassigns one of the dots graphics mode (described in the command ESC *) to one of the
following commands: ESC K, ESC L, ESC Y and ESC Z. The parameter n specifies a character
(K, L, Y or Z) which is reassigned to specific mode m = 0,1,2,3.
m n m n
0 (K): ESC K graphic command 2 (Y): ESC Y graphic command
1 (L): ESC L graphic command 3 (Z): ESC Z graphic command
67
ESC K
Normal density dot graphics printing (60 dpi).
ASCII Code ESC K
Hexadecimal Value 1B 4B
Decimal Value 27 75
Range 0 <
0 <
0 <
n1 n2 p1 p2... p
n1 n2 p1 p2... px
n1 n
2 p 1 p2
n1
< 255
n
< 31
2
p < 255
... p
x
x
Terminator code. This command prints dot graphics at 60 horizontal dot per inch by 180 vertical
dpi.
The parameter values should be calculated as follows:
n1
n 2
p 1
Remainder of the number of column divided by 256.
Integer result of the previous division.
Sum of the values corresponding to the dots that should be printed in the first column
of the graphics pattern.
p2
Sum of the values corresponding to the dots that should be printed in the second
column of the graphics pattern.
px
Sum of the values corresponding to the dots that should be printed in the last column
of the graphics pattern.
68
ESC L
Double density dot graphics printing (120 dpi).
ASCII Code ESC L
Hexadecimal Value 1B 4C
Decimal Value 27 76
Range 0 <
n1 n2 p1 p2... p
n1 n2 p1 p2... px
n1 n
2 p 1 p2
n1
< 255, 0 <
x
... p
x
n
< 31, 0 < p < 255
2
Terminator code. This command prints dot graphics at 120 horizontal dot per inch by 180
vertical dpi.
The parameter values should be calculated as follows:
n1
n 2
p 1
Remainder of the number of column divided by 256.
Integer result of the previous division.
Sum of the values corresponding to the dots that should be printed in the first column
of the graphics pattern.
p2
Sum of the values corresponding to the dots that should be printed in the second
column of the graphics pattern.
px
Sum of the values corresponding to the dots that should be printed in the last column
of the graphics pattern.
69
ESC Y
Double density dot graphics printing at double-speed graphics (120 virtual dpi).
ASCII Code ESC Y
Hexadecimal Value 1B 59
Decimal Value 27 89
Range 0 <
n1 n2 p1 p2... p
n1 n2 p1 p2... px
n1 n
2 p 1 p2
n1
< 255, 0 <
x
... p
x
n
< 31, 0 < p < 255
2
Terminator code. This command prints dot graphics at 120 horizontal dot per inch by 180
vertical dpi.
The parameter values should be calculated as follows:
n1
Remainder of the number of column divided by 256.
n 2
Integer result of the previous division.
Sum of the values corresponding to the dots that should be printed in the first column of
p1
the graphics pattern.
p2
Sum of the values corresponding to the dots that should be printed in the second column
of the graphics pattern.
px
Sum of the values corresponding to the dots that should be printed in the last column of
the graphics pattern.
70
ESC Z
Quadruple density dot graphics printing (240 virtual dpi).
ASCII Code ESC Z
Hexadecimal Value 1B 5A
Decimal Value 27 90
Range 0 <
n1 n2 p1 p2... p
n1 n2 p1 p2... px
n1 n
2 p 1 p2
n1
< 255, 0 <
x
... p
x
n
< 31, 0 < p < 255
2
Terminator code. This command prints dot graphics at 240 horizontal dot per inch by 180
vertical dpi.
The parameter values should be calculated as follows:
n1
n 2
p 1
Remainder of the number of column divided by 256.
Integer result of the previous division.
Sum of the values corresponding to the dots that should be printed in the first column
of the graphics pattern.
p2
Sum of the values corresponding to the dots that should be printed in the second
column of the graphics pattern.
71
ESC [ g
Selects 8 or 24 needle dot graphics mode. (IBM)
ASCII Code ESC [ g
Hexadecimal Value 1B 5B 67
Decimal Value 27 91 103
l h m n1 … n
l h m n1 … nk
l h m n1 … n
k
k
This command selects dot graphics in 8 or 24 needle configuration. h*256+l represents the
number of data + l . The m parameter represents the dot graphics modes as shown in the
following table:
m DENSITY NEEDLE FUNCTION
0 60 8 Same as ESC K (8 needles)
1 120 8 Same as ESC L (8 needles)
2 120 8 Same as ESC Y (8 needles)
3 240 8 Same as ESC Z (8 needles)
8 60 24 Same as ESC * (32)
9 120 24 Same as ESC * (33)
11 180 24 Same as ESC * (39)
12 360 24 Same as ESC * (40)
The n1, n2 up to nk parameters are dot graphics data. If you select the 8 needle dot graphics
mode, one byte data is needed for each column so that the formulas h*256+l = number of columns + l is valid. If you select the 24 needle dot graphics mode, three bytes data is needed for
each column so that the formulas h*256+l = number of columns *3+l is valid.
72
DDaattaa IInnppuutt CCoonnttrrooll
CAN
Cancels line. (EPSON)
ASCII Code CAN
Hexadecimal Value 18
Decimal Value 24
This code clears all printable characters and bit-image graphics on the current line. This code
moves the print position to the left-margin position.
CAN
Cancels data. (IBM)
ASCII Code CAN
Hexadecimal Value 18
Decimal Value 24
This code clears all data stored in the preceding print buffer but does not change the current
print position.
DC1
Selects printer. (IBM)
ASCII Code DC1
Hexadecimal Value 11
Decimal Value 17
This command causes the printer to be enabled after it has been disabled by the ESC Q
command.
73
DC1
Selects printer. (EPSON)
ASCII Code DC1
Hexadecimal Value 11
Decimal Value 17
This command causes the printer to be enabled after it has been disabled by the DC3 command.
DC3
Deselects printer. (EPSON)
ASCII Code
Hexadecimal Value
Decimal Value
DC3
13
19
This code deselects the printer. The printer remains desel ected until it recei ves a DC1 command
or power is turned off then on again. The printer ignores the ESC @ command (initialize printer)
when it is deselected.
DEL
Deletes the last character. (EPSON)
ASCII Code DEL
Hexadecimal Value 7F
Decimal Value 127
This command causes the printer to delete the last printable character sent to the printer.
Printer control codes are not affected. The printer i gnores this command if it follows a command
that moves the horizontal print position (ESC $, ESC \ or HT).
74
ESC #
Cancels MSB control. (EPSON)
ASCII Code ESC #
Hexadecimal Value 1B 23
Decimal Value 27 35
This command cancels any controls on the MSB (bit number 7) set by ESC = or ESC >
commands; printer then accepts all MSB data as is.
ESC =
Sets MSB to 0. (EPSON)
ASCII Code ESC =
Hexadecimal Value 1B 3D
Decimal Value 27 61
This command sets the Most Significant bit (bit number 7) of all incoming data to 0. All data is
affected including graphics da ta.
ESC >
Sets MSB to 1. (EPSON)
ASCII Code ESC >
Hexadecimal Value 1B 3E
Decimal Value 27 62
This command sets the Most Significant bit (bit number 7) of all incoming data to 1. All data is
affected including graphics da ta.
75
ESC Q
Deselects Printer. (IBM)
ASCII Code ESC Q n
Hexadecimal Value 1B 51
Decimal Value 27 81
n
n
This sequence tells the printer not to accept data from the host. The host must reset the printer
or select the printer by using DC1 (Select Pri nter) to accept data. To deselect the printer, use
ESC Q35.
MMiisscceellllaanneeoouuss
BEL
Buzzer.
ASCII Code BEL
Hexadecimal Value 07
Decimal Value 7
This code sounds the printer’s buzzer.
BS
Print and space back one position.
ASCII Code BS
Hexadecimal Value 08
Decimal Value 8
This code causes the printing to be continued from one column to the left of the current carriage
position. The printer ignores this command if it would move the print position to the left of the
left margin.
76
ESC @
Initializes the printer. (EPSON)
ASCII Code ESC @
Hexadecimal Value 1B 40
Decimal Value 27 64
This sequence causes the printer:
• to go back to the current printer setup settings
• to cancel any selected print attributes
• to reset the column counter
• to set the horizontal tabulations every 8 columns
• to clear all vertical tabulations
Only the selection of Draft/Quality printing, DLL and the selected character generator are
maintained.
ESC [ K
Sets initial conditions. (IBM 2391 + only)
ASCII Code ESC [ K
Hexadecimal Value 1B 5B 4B
Decimal Value 27 91 75
This command causes the printer to reset to its initial status:
n1 ,n2
The n1 and n2 parameters specify the number of bytes in the escape sequence normally,
n1 n2 init id
n1n2 init id
n1n2 init id
n1 = 2 and n2 = always 0.
init
The init parameter specifies to which condition the printer should initialize, normally
init = 0,1,4,5,254,255.
77
init Description
0 Initializes printer to user-default settings. The download font remains
unchanged. If parameters are specified, they will overwrite the default settings. If
the emulation mode is changed, the download font will be initialized. This
command will only copy data from the selected macro, add parameter changes, if
any, and store in working RAM; the data stored in the macro’s non-volatile RAM
will not be affected.
1 Initializes printer to user-default settings. The download font is initialized. If
parameters are specified, they will overwrite the default settings. This command will
only copy data from the selected macro, add pa rameter changes, if any, a nd store in
working RAM; the data stored in the macro’s non-volatile R AM will no t be affec ted.
4 Initializes printer to factory settings. The download font remains unchanged. If
parameters are specified, they will overwrite the default settings. If the emulation
mode is changed, the download font will be initialized. This command will only copy
the default settings from ROM, add para meter changes, if a ny, and store in worki ng
RAM; the data stored in the macro’s non-volatile RA M will not be af fect ed.
5 Initializes printer to factory settings. The download font is initialized. If parameters
are specified, they will overwrite the default settings. This command will only copy
the default settings from ROM, add para meter changes, if a ny, and store in worki ng
RAM; the data stored in the macro’s non-volatile RA M will not be af fec ted.
254 Initializes printer to user-default settings. The download font is initialized. If
parameters are specified, they will overwrite the default settings. This command will
change data stored in the selected macro. It will copy data from the selected macro,
add parameter changes, if any, and store i n wo rking RAM and in the selected macro.
It will also change the default macro to the valu e of parm 3.
78
255 Initializes printer to default settings. The download font is initialized. If parameters
are specified, they overwrite the default settings. This command will change data
stored in the macro’s non-volatile RAM. It will copy default settings from ROM, add
parameter changes, if any, and store in working RAM and all macros. It will also set
the default macro to disable.
id
parm1
The id parameter specifies the printer for which the following parameter bytes are
intended. If the ID does not address your printer, the mode bytes that follow are
ignored. The ID values are Hex = B6, Dec = 182.
Specifies the following functions:
Bit No t set Set
7 Discard byte Process this byte Ignore this byte
6 Reserved
5 Alarm Alarm enabled Alarm disabled
4 Automatic CR No CR on vertical movement CR on vertical movement
3 Automatic LF No LF after CR LF after CR
2 Page length 11 inches 12 inches
1 Slashed zero Zero without slash Zero with slash
0 Character set CS1 CS2
79
parm2
Specifies the following functions:
Bit Not set Set
7 Discard byte Process this byte Ignore this byte
6 Pass over from CP437-CP850 CP437 CP850
5 Reserved
4 Reserved
3 Reserved
2 Reserved
1 Line length 13.6 inch 8 inch
0 Reserved
ESC j
Stops printing. (IBM)
ASCII Code ESC j n
2277 110066
n
n
n
ON LINE
key.
Hexadecimal Value 1B 6A
Decimal Value
This command stops thje printer. The printer goes offline and BUSY signal is sent to the
computer. To place the printer online, press the
80
ESC U
Sets printing direction.
ASCII Code ESC U n
2277 8855
n
n
n
Hexadecimal Value 1B 55
Decimal Value
Selects bidirectional or unidirectional printing, according to the parameters below:
n Direction
0 Bidirectional printing
1 Unidirectional (left to right) printing
Unidirectional printing provides better alignment of vertical lines while bidirectional printing is
faster.
81
CCOOMMPPUUPPRRIINNTT MMooddee
This printer according to the Native COMPUPRINT Mode supports the following printer
commands.
FFoorrmmaatt CCoonnttrrooll
DC4 DC4 ESC 1
Sets vertical spacing n/180 inch. (Compuprint)
ASCII Code DC4 DC4 ESC 1 n
Hexadecimal Value 14 14 1B 31
Decimal Value 20 20 27 49
Range 0 <
n < 255
n
n
This command sets vertical spacing to n/180 inch for subsequent line feeds.
DC4 DC4 ESC 3 1
Sets vertical spacing 12 lines/30 mm. (Compuprint)
This command sets vertical spacing to 6 lines per 30 mm.
83
DC4 DC4 ESC 3 8
Sets vertical spacing 8 lines/30 mm. (Compuprint)
ASCII Code DC4 DC4 ESC 3 8
Hexadecimal Value 14 14 1B 33 38
Decimal Value
2200 2200 2277 5511 5566
This command sets vertical spacing to 8 lines per 30 mm.
DC4 DC4 ESC A
Sets the horizontal spacing to 15, 17, 20, 24 CPI. (Compuprint)
ASCII Code DC4 DC4 ESC A n
Hexadecimal Value 14 14 1B 41
Decimal Value 20 20 27 65
This is terminator code and therefore causes the current contents of the print buffer to be
printed out. Then, the subsequent characters will be printed at the horizontal spacing specified
by the n parameter.
n Spacing
4 15 cpi
5 17 cpi
6 20 cpi
7 24 cpi
n
n
84
NNaattiivvee CChhaarraacctteerr SSeett
DC4 DC4 ESC g
Selects LQ fonts (Compuprint).
ASCII Code DC4 DC4 ESC g n
Hexadecimal Value 14 14 1B 67
Decimal Value 20 20 27 103
Range 0 <
n < 255
n
n
If the down-line loading is selected, the command is stored and will be activated as soon as the
down-line loading will be canceled.
Boldface is available if the ESC p1 (proportional) is sent.
The OCR-A and OCR-B print styles are selected by the DC4 DC4 ESC S command.
85
DC4 DC4 ESC S
Selects character set ISO Character Sets or Code Pages. (Compuprint)
ASCII Code DC4 DC4 ESC S n
Hexadecimal Value 14 14 1B 53
Decimal Value 20 20 27 83
n
n
n Character Set n Character Set
1 ISO 8859/1 Latin 1 137 CP 852 Eastern Europe
2 ISO 8859/2 Latin 2 138 CP 876 OCR-A
3 ISO 8859/3 Latin 3 139 CP 877 OCR-B
4 ISO 8859/4 Latin 4 140 CP 855 Cyrillic
5 ISO 8859/5 Latin/Cyrillic 141 CP 866 Russian
6 ISO 8859/6 Latin/Arabic 142 GOST Cyrillic
7 ISO 8859/7 Latin/Greek 145 CP 437G Greek
8 ISO 8859/8 Latin/Hebrew 146 CP 853 Turkish
9 ISO 8859/9 Latin 5 147 CP 857 Turkish
15 ISO 8859/15 Latin 9 148 CP 867 Turkish
128 CP 437 USA 149 CP 858 Euro PC Multilingual
129 CP 850 Multilingual 199 96 Greek
130 CP 860 Portugal 200 CP 1250
131 CP 863 Canada/France 201 MAZOWIA
132 CP 865 Denmark/Norway 202 CP 1251
133 CP 851 Greek 203 CP 1252
134 CP 862 Hebrew
135 CP 864 Arabic
136 TASS Cyrillic
86
BBaarr CCooddeess
DC4 DC4 ESC !
Bar Code Selection.
ASCII Code DC4 DC4 ESC !
Hexadecimal Value 14 14 1B 21 !
Decimal Value 20 20 27 33 !
h t f F r o q b s B S i EM
h t f F r o q b s B S i EM
h t f F r o q b s B S i EM
h = Bar Code Height at n/6”, 1 <h < 30
t = Standard Bar Code to use
t Name
1 8-digits European Article Numbering EAN-8
2 13-digits European Article Numbering EAN-13
3 Universal Product Code Type A UPC-A
4 Universal Product Code Type E UPC-E
5 UPC/EAN 2 Digit Supplement UPC-EAN 2
6 UPC/EAN 5 Digit Supplement UPC-EAN 5
7,8,9 8-digits European Article Numbering EAN-8
10 General Purpose Bar Code Code-GP
11 Code 2 of 5 3-BAR (Data Logic) C25-3BAR
12 Binary Coded Decimal CODE BCD
13 MSI-Plessey MSI
14 AIM-USD-8 / Code-11 Code 11
15 AIM-USD-7 / Code-93 Code 93
87
t Name
16 Code 2 of 5 Bidirectional C25-BID
17 Code 2 of 5 Interleaved C25-INT
18 Code 2 of 5 Industrial C25-IND
19 Code 2 of 5 Matrix C25-MTX
20 Code 3 of 9 Code-39
21 8-digits European Article Numbering EAN-8
22 Codabar (all types) CODABAR
23 Code 128 CODE-128
24 USPS-PostNet POSTNET
f = Readable character printing
f = 1 printing enabled
f = 0 printing disabled
F = Font selection for the printable characters
F Selection
0 Selected font by r value
1 Default font for text
2 Speci al font for OCR-A o OCR-B bar codes according to the t value
3 Speci al font for OCR-A bar codes
4 Speci al font for OCR-B bar codes
88
r = Bar code rotation
r Selection
0 No rotation
1 Rotation at 0°
2 Rotation at 90°
3 Rotation at 180°
4 Rotation at 270°
o = Check digit inserted as last chara cter of the received string according to the bar code
q = Horizontal graphic density of the bar code
q Selection
0 1/60”
1 1/180”
b = Narrow bar width in n/180”, 3 < b < 18
s = Narrow space width in n/180”, 3 < s < 18
B = Wide bar width in n/180”, 6 < B < 72
S = Wide space width in n/180”, 6 < S < 72
i = Spacing between characters in n/180”, 3 < i < 72
EM = Check sequence terminator
89
BBaarr CCooddee DDeessccrriippttiioonn
EAN-8
EAN-13
UPC-A
DC4 DC4 ESC!
n 1 p EM
The EAN-8 bar code data field must only contain numeric data, and must be
eight bytes long, check digi t included. The EAN-8 character repertoire provides
0 to 9 ASCII numeric figures. n indicates the bar code height in units of 1/6 inch
and must be in the range 1 to 12. p must be NUL (hex. 00) if no Human
Readable Characters are to be printed, and 1 (hex. 01) if they are to be printed.
The range of values for n and p parameters can be increased of 32 dec.
DC4 DC4 ESC!
n 2 p EM
The EAN-13 bar code data field must only contain numeric data, and must be 13
bytes long, check digit included. The EAN-13 character repertoire provides 0 to 9
ASCII numeric figures. n indicates the bar code height in units of 1/6 inch and
must be in the range 1 to 12. If you want to print the Human Readable
Characters, p must have the value 1 (hex. 01); otherwise this value must be
NUL (hex. 00). The range of values for n and p parameters can be increased of
32 dec.
DC4 DC4 ESC!
n 3 p EM
The UPC-A bar code data field allows 10 numeric characters plus one system
number digit and one check digit, at the leftmost and rightmost positions
respectively. The UPC-A character repertoire provides 0 to 9 ASCII numeric figures.
n indicates the bar code height in units of 1/6 inch and must be in the range 1 to 12.
p must be NUL (hex. 00) if no Human Readable Characters are to be printed, and 1
(hex. 01) if they are to be printed. The range of values for n and p parameters can be
increased of 32 dec.
90
UPC-E
DC4 DC4 ESC!
n 4 p EM
If 11-digit strings will be received and o check digit field is missing or takes
values 0 or 2, question marks will be printed in place of HRC string, when
possible; if o field takes value 1, the 12th digit is inserted by the printer as
result of the internally available algorithm applied to the received string.
If 10-digit strings will be received and o check-digit is missi ng or takes NULL
value, question marks will be printed in place of HRC string, if possible; if o field
takes value 1, a default 0 System-Digit will be automatically inserted by the
printer and the 12th digit will also be inserted as result of he internally
available algorithm applied to the final string.
If the final UPC-A string cannot be compressed to an 8-digits string or the
received System-Digit is different than 0 or 1, question marks will be printed in
place of HRC string, if possible.
LEFT and RIGHT delimiters, the System-Digit and the Check-Digit will be
printed as descending bars to make a fiel d to host a 6-digits HRC stri ng and the
System-Digit HRC to the left of LEFT delimiter (at about the middle of the
symbol) when f field is missing or set to 1; in this case, the Check-Digit will
show in HRC to the right of the RIGHT delimiter (at about the middle of the
symbol), when o field takes values 2 or 3: it will never show on HRC string
otherwise.
91
UPC-EAN 2
DC4 DC4 ESC!
n 5 p EM
ADD ON-2 bar code data fields contain numeric data only: question marks will
be printed in place of HRC string otherwise, if possible.
If 3-digit strings will be received within a DC4 DC4 ESC (... EM control
sequence and o check-digit option field is missing or takes NULL value, the
symbol will encode the first 2 digits and the 3rd received digit will be used as
check digit, even though this may affect its readability; if o field takes 1 value,
the 3rd digit is ma tched versus the internally g enerated check-digit an questi on
marks will printed in place of HRC string when mismatching, if possible.
If 2-digit strings will be received and o check digit field is missing or takes
NULL value, question marks will be printed in place of HRC string, when
possible; if o field takes value 1, the check digit will be computed applying the
internally avai lable algori thm to the received string in order to properly encode
the symbol.
If f field is missing or takes value 1, the 2-digits HRC string will be printed
above the Bar/Spaces symbol and its height will be part of the overall symbol’s
height; the check-digit will never show on HRC string. If f field takes value 0,
the symbol’s encoding will print at full height.
92
UPC-EAN 5
DC4 DC4 ESC !
n 6 p EM
ADD ON-5 bar code data fields contain numeric data only: question marks will
be printed in place of HRC string otherwise, if possible.
If 6-digit strings will be received within a DC4 DC4 ESC (... EM control
sequence and o check-digit option field is missing or takes NULL value, the
symbol will encode the first 5 digits and the 6th received digit will be used as
check digit, even though this may affect its readability; if o check digit option
takes 1 value, the 6th digit is matched versus the internally generated checkdigit an question marks will printed in place of HRC string when mismatching,
if possible.
If 5-digit strings will be received and o check digit field is missing or takes
NULL value, question marks will be printed in place of HRC string, if possible;
if o field takes value 1, the check digit will be computed applying the internally
available algorithm to the received string in order to properly encode the
symbol
If f field is missing or takes value 1, the 5-digits HRC string will be printed
above the Bar/Spaces symbol and its height will be part of the overall symbol’s
height; the check-digit will never show on HRC string. If f field takes value 0,
the symbol’s encoding will print at full height.
93
CODE GP
C25-3BAR
Code BCD
DC4 DC4 ESC !
n 10 p EM
CODE-GP bar code allows bar codes to be constructed from the two basic
elements (BAR and SPACE) b y sending 0,1 digits: digit 0 produces a BAR and
digit 1 produces a SPACE.
These two elements may be combined in any sequence, thus giving the
possibility of producing bars and spaces of any width that is a multiple of the
basic element width. Default bar/spaces width is 1/60” (q = 0,1) but these values
may be set by the user according to its specific needs. Data fields do not have a
defined format length and contain 0,1 data only; question marks will be printed
in place of HRC string otherwise, if possible.
No Human Readable Interpretation is possib le, hence is the user task to prov ide
a TEXT STRING below or above the bar/space symbol: f field is meaningless. No
internal check digit algorithm is available: o field is meaningless.
DC4 DC4 ESC !
n 11 p EM
C25-3BAR bar code data fields do not have a defined format length and contain
numeric data only: question marks will be printed in place of HRC string
otherwise, if possible. If o check digit option field takes 1 value, an internally
generated check digit complying with general 2/5 family algorithm will be added
to the encoded string: however it will not show on the required HRC string.
DC4 DC4 ESC !
n 12 p EM
CODE-BCD bar code data fields do not have a defined format length and contain
numeric data only: question marks will be printed in place of HRC string
otherwise, if possible. No internal check digit algorithm is available for this
standard: o field is meaningless.
94
MSI Plessey
DC4 DC4 ESC !
n 13 p EM
MSI bar code data fields do not have a defi ned format length and must contain
numeric data only: question marks will be printed in place of HRC string
otherwise, if possible. To releaf the host from calculating MSI check digits,
internal algorithms are provided that are accessible by the host application
program giving the proper supported valu e to o check-digit option fi eld, accordi ng
to the following options:
0 Print the bar code symbol with
no printer-generated check
digits
1 Print the bar code symbol with
IBM Modulus-10 check digit generated by the printer and
put at the end of the numeric
string: this will be the 2nd
check digit, the 1st check digit
2 Print the bar code symbol with both
check digits generated by the printer
and put at the end of the data. The 2nd
check digit is IBM Modulus-10, the 1st
check digit is IBM Modulus-10 also.
is IBM Modulus-10 also.
3 Print the bar code symbol with
both check digits generated by
the printer and put at the end
of the data. The 2nd check digit
is IBM Modulus-10, the 1
check digit is NCR Modulus-11:
if modulus is 10, it is an error
and question marks will be
printed in place of HRC string ,
4 Print the bar code symbol with both
check digits generated by the printer
and put at the end of the data. The 2
check digit is IBM Modulus-10 , the 1st
st
check digit is IBM Modulus-11: if
modulus is 10, it is an error and
question marks will be printed in
place of HRC string, if possible.
nd
if possible.
95
5 Print the bar code symbol with
both check digits generated by
the printer and put at the end
of the data. The 2nd check digit
is IBM Modulus-10, the 1st
check digit is the complement
to 11 of NCR Modulus-11
algorithm applied to the
received string: if the modulus
6 Print the bar code symbol with both
check digits generated by the printer
and put at the end of the data. The 2nd
check digit is IBM Modulus-10 , the 1st
check digit is the complement to 11 of
IBM Modulus-11 algorithm a pplied to
the received string: if the modulus is
0 or 1 check digit is 0.
is 0 or 1 check digit is 0.
7 Print the bar code symbol with
both check digits generated by
the printer and put at the end
of the data. The 2nd check digit
is IBM Modulus-10, the 1st
check digit is the complement
to 11 of NCR Modulus-11
algorithm applied to the
received string: if the modulus
is 0 or 1. It is an error and
8 Print the bar code symbol with both
check digits generated by the printer
and put at the end of the data. The 2nd
check digit is IBM Modulus-10 , the 1st
check digit is the complement to 11 of
IBM Modulus-11 algorithm a pplied to
the received string: if the modulus is
0 or 1. it is an error and question
marks will be printed in place of HRC
string, if possible.
question marks will be printed
in place of HRC string, if
possible.
The printer-generated second check digit does not show on required HRC string.
96
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.