User's Guide
Code Sets D-29
Table D-6. Epson and IBM Escape Sequences––continued
Function ASCII Hexadecimal Decimal Description
Horizontal Spacing
Set character spacing ........ ESC P 1B 50 27 80 This sequence sets character spacing/character cell size
to 10 or 17.1 CPI to 10 characters per inch. If condensed printing is on, this
sequence sets character spacing and character cell size to
17.1 chracters per inch.
Note: This sequence is not supported when the IBM
XL24 emulation is active.
Set character spacing ........ ESC M 1B 4D 27 77 These sequences set character spacing and character cell
to 12 CPI ESC : 1B 3A 27 58 size to 12 characters per inch.
Set character spacing ........ ESC g 1B 67 27 103 This sequence sets character spacing/character cell size
to 15 CPI to 15 characters per inch. Condensed printing does not
affect the function of this sequence.
Set character spacing ........ ESC f 1B 66 27 102 This sequence sets character spacing/character cell size
to 20 CPI to 20 characters per inch. Condensed printing does not
affect the function of this sequence.
Start condensed printing ... ESC SI 1B 0F 27 15 This sequence starts condensed printing, wherein
character spacing/character cell size are 17.1 characters
per inch. A DC2 code ends condensed printing.
Set spacing and cell size .... ESC ESC Z n 1B 1B 5A n 27 27 90 n This sequence sets the distance that the carriage moves
5 characters/inch ..... ESC ESC Z 8 1B 1B 5A 38 27 27 90 56 after printing a character or when spacing. The sequence
6 characters/inch ..... ESC ESC Z 4 1B 1B 5A 34 27 27 90 52 also sets the character cell size so that characters are the
6.6 characters/inch ..... ESC ESC Z 2 1B 1B 5A 32 27 27 90 50 correct size for the spacing. The value of variable n minus
7.5 characters/inch ..... ESC ESC Z 0 1B 1B 5A 30 27 27 90 48 32 defines a number of 1/120-inch increments to move:
8.5 characters/inch ..... ESC ESC Z . 1B 1B 5A 2E 27 27 90 46
10 characters/inch ..... ESC ESC Z , 1B 1B 5A 2C 27 27 90 44 Character spacing = (n - 32) x 1/120-inch
12 characters/inch ..... ESC ESC Z * 1B 1B 5A 2A 27 27 90 42
13.3 characters/inch ..... ESC ESC Z ) 1B 1B 5A 29 27 27 90 41
15 characters/inch ..... ESC ESC Z ( 1B 1B 5A 28 27 27 90 40
17.1 characters/inch ..... ESC ESC Z ' 1B 1B 5A 27 27 27 90 39
20 characters/inch ..... ESC ESC Z & 1B 1B 5A 26 27 27 90 38
Set intercharacter space ... ESC SP n 1B 20 n 27 32 n This sequence sets the amount of space for the printer to
add to the right of each character in addition to the space
already allowed in the design of the character. The value
of variable n defines the number of units to add. The size
depends on the current print quality/character spacing:
Quality Character Spacing (CPI) Unit Size
Letter and 10, 12, 13.3, 15 & proportional ... 1/180 inch
memo 17.1, 20 & prop. condensed ........1/360 inch
Draft 10, 12, 13.3, 15 & proportional ... 1/120 inch
17.1, 20, & prop. condensed .......1/240 inch
For example, to add 1/4 inch to the right of each character
in letter-quality at 10 cpi, variable n would be 45 decimal
(1/4 inch = 45 x 1/180 inch).
User's Guide
Code Sets D-29
Table D-6. Epson and IBM Escape Sequences––continued
Function ASCII Hexadecimal Decimal Description
Horizontal Spacing
Set character spacing ........ ESC P 1B 50 27 80 This sequence sets character spacing/character cell size
to 10 or 17.1 CPI to 10 characters per inch. If condensed printing is on, this
sequence sets character spacing and character cell size to
17.1 chracters per inch.
Note: This sequence is not supported when the IBM
XL24 emulation is active.
Set character spacing ........ ESC M 1B 4D 27 77 These sequences set character spacing and character cell
to 12 CPI ESC : 1B 3A 27 58 size to 12 characters per inch.
Set character spacing ........ ESC g 1B 67 27 103 This sequence sets character spacing/character cell size
to 15 CPI to 15 characters per inch. Condensed printing does not
affect the function of this sequence.
Set character spacing ........ ESC f 1B 66 27 102 This sequence sets character spacing/character cell size
to 20 CPI to 20 characters per inch. Condensed printing does not
affect the function of this sequence.
Start condensed printing ... ESC SI 1B 0F 27 15 This sequence starts condensed printing, wherein
character spacing/character cell size are 17.1 characters
per inch. A DC2 code ends condensed printing.
Set spacing and cell size .... ESC ESC Z n 1B 1B 5A n 27 27 90 n This sequence sets the distance that the carriage moves
5 characters/inch ..... ESC ESC Z 8 1B 1B 5A 38 27 27 90 56 after printing a character or when spacing. The sequence
6 characters/inch ..... ESC ESC Z 4 1B 1B 5A 34 27 27 90 52 also sets the character cell size so that characters are the
6.6 characters/inch ..... ESC ESC Z 2 1B 1B 5A 32 27 27 90 50 correct size for the spacing. The value of variable n minus
7.5 characters/inch ..... ESC ESC Z 0 1B 1B 5A 30 27 27 90 48 32 defines a number of 1/120-inch increments to move:
8.5 characters/inch ..... ESC ESC Z . 1B 1B 5A 2E 27 27 90 46
10 characters/inch ..... ESC ESC Z , 1B 1B 5A 2C 27 27 90 44 Character spacing = (n - 32) x 1/120-inch
12 characters/inch ..... ESC ESC Z * 1B 1B 5A 2A 27 27 90 42
13.3 characters/inch ..... ESC ESC Z ) 1B 1B 5A 29 27 27 90 41
15 characters/inch ..... ESC ESC Z ( 1B 1B 5A 28 27 27 90 40
17.1 characters/inch ..... ESC ESC Z ' 1B 1B 5A 27 27 27 90 39
20 characters/inch ..... ESC ESC Z & 1B 1B 5A 26 27 27 90 38
Set intercharacter space ... ESC SP n 1B 20 n 27 32 n This sequence sets the amount of space for the printer to
add to the right of each character in addition to the space
already allowed in the design of the character. The value
of variable n defines the number of units to add. The size
depends on the current print quality/character spacing:
Quality Character Spacing (CPI) Unit Size
Letter and 10, 12, 13.3, 15 & proportional ... 1/180 inch
memo 17.1, 20 & prop. condensed ........1/360 inch
Draft 10, 12, 13.3, 15 & proportional ... 1/120 inch
17.1, 20, & prop. condensed .......1/240 inch
For example, to add 1/4 inch to the right of each character
in letter-quality at 10 cpi, variable n would be 45 decimal
(1/4 inch = 45 x 1/180 inch).