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

SP40plus Programmer Manual

Uploaded by

GeneBerg
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)
277 views

SP40plus Programmer Manual

Uploaded by

GeneBerg
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/ 220

Programmer Manual

MAN 10240-01
Programmer Manual

Table of Contents

Page

Table of Contents i
Introduction ii
Appendix A – IBM/EPSON/HPR Mode Commands A-1
Appendix B - Compuprint Native Commands B-1
Appendix C – OLIVETTI Protocol Commands C-1
Appendix D – HPR4915 Protocol Commands D-1
Appendix E – IBM/EPSON Character Sets E-1
Appendix F – OLIVETTI Character Sets F-1

MAN10240-01 i Introduction
Programmer Manual

Introduction

MAN10240-01 (April 2011)

This manual provides information about the programming information for your printer. Appendix A, B, C and
D describe the commands supported by your printer for the IBM/EPSON, Compuprint native, Olivetti and
specific Wincor Nixdorf HPPR4915 protocols respectively.
The command descriptions are divided into function groups. Each command has both a brief and a detailed
description.
Name and function description.
Information about protocols (IBM Proprinter Proprinter XL24/XL24E, IBM Personal 2391+, IBM 4722, IBM
9068, EPSON LQ1050/570, Olivetti PR2, Olivetti PR40+, Olivetti 2845, Wincor Noxdorf HPR4915).
The hexadecimal and decimal codes for the command: letters written in italics represent variable parameters
of the command. The functions of these parameters are explained in its corresponding command
description.
Appendices E and F show the Code Pages and Characters Sets for the IBM/EPSON and Olivetti protocols
respectively.

MAN10240-01 ii Introduction
Programmer Manual

Appendix A – IBM/EPSON/HPR Mode Commands

Summary in Alphabetical Order ............................. A-2


EPSON/IBM/HPR Mode Commands Description .. A-6
Print and Line Feed Execution............................. ..A-6
Format Control ....................................................... A-8
Print Mode............................................................ A-23
Character Sets ..................................................... A-36
Download Character ............................................ A-40
Bit-Image.............................................................. A-46
Data Input Control................................................ A-51
Miscellaneous ...................................................... A-54

MAN10240-01 A-1 Appendix A


Programmer Manual

IBM/EPSON/HPR Mode Commands

This printer according to the IBM Proprinter Proprinter XL24/XL24E, IBM 2391+, IBM 4722, IBM 9068 and
EPSON LQ1050/570 emulations supports the following printer commands.

Summary in Alphabetical Order


Command Command Description Page
BEL Buzzer. (IBM Proprinter XL24/XL24E, 2391+, 9068, EPSON LQ1050/570, HPR4915) A-54
Print and space back one position. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
BS A-55
EPSON LQ1050/570, HPR4915)
CAN Cancels line. (EPSON LQ1050/570, HPR4915) A-51
CAN Cancels data. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-51
Prints all received data and the column counter is set to the left margin. (IBM
CR A-6
Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
DC1 Selects printer. (IBM Proprinter XL24/XL24E, 2391+) A-51
DC1 Selects printer. (EPSON LQ1050/570, HPR4915) A-51
DC2 Sets 10 cpi printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-23
DC2 Cancels compressed printing. (EPSON LQ1050/570, HPR4915) A-23
DC3 Deselects printer. (EPSON LQ1050/570, HPR4915) A-52
DC3 Deselects printer. (IBM Proprinter XL24/24E) A-52
Cancels double width printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
DC4 A-23
EPSON LQ1050/570, HPR4915)
DEL Deletes the last character. (EPSON LQ1050/570, HPR4915) A-52
Sets or cancels underlined printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
ESC - A-24
EPSON LQ1050/570, HPR4915)
ESC ! Master Select. (EPSON LQ1050/570, HPR4915) A-24
ESC # Cancels MSB control. (EPSON LQ1050/570, HPR4915) A-52
ESC $ Sets the absolute printing position. (EPSON LQ1050/570, HPR4915) A-8
ESC % Selects user-defined character set. (EPSON LQ1050/570, HPR4915) A-40
ESC & Defines user-defined characters. (EPSON LQ1050/570, HPR4915) A-40
ESC ( - Sets score line. (EPSON LQ1050/570) A-24
ESC ( ^ Prints data as characters. (EPSON LQ1050/570) A-36
ESC ( C Sets page length in defined unit. (EPSON LQ1050/570) A-8
ESC ( c Sets Page Format. (EPSON LQ1050/570) A-9
ESC ( G Selects Graphics Mode. (EPSON LQ1050/570) A-46
ESC ( t Assigns character table. (EPSON LQ1050/570) A-36
ESC ( U Sets units. (EPSON LQ1050/570) A-10
ESC ( V Sets absolute vertical print position. (EPSON LQ1050/570) A-10
ESC ( v Sets relative vertical print position. (EPSON LQ1050/570) A-11
ESC * Sets dot graphics printing. (EPSON LQ1050/570, HPR4915) A-46
ESC . Print Raster Graphics. (EPSON LQ1050/570) A-47
ESC : Sets 12 CPI. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-25
ESC : Copies characters from ROM to RAM. (EPSON LQ1050/570, HPR4915) A-41
ESC ? Reassigns dot graphics mode. (EPSON LQ1050/570, HPR4915) A-48

MAN10240-01 A-2 Appendix A


Programmer Manual

Command Command Description Page


ESC @ Initializes the printer. (EPSON LQ1050/570) A-55
Sets double high printing and double line feed. (IBM Proprinter XL24/XL24E, 2391+,
ESC [ @ A-25
9068)
ESC [ \ Sets vertical units. (IBM Proprinter XL24/XL24E, 2391+, 9068) A-12
ESC [ c Send a device-dependent message to an ASCII printer. (IBM 4722, 9068) A-53
ESC [ d Set the print quality. (IBM 2391+) A-26
ESC [ F Page Presentation Media. (IBM 4722, 9068) A-21
ESC [ g High Resolution Graphics. (IBM Proprinter XL24/XL24E, 2391+, 9068) A-48
ESC [ I Sets font and pitch of a character. (IBM 2391+) A-26
ESC [ I Sets font and pitch of a character. (IBM 9068) A-28
ESC [ J Sets 5 lpi. (IBM 4722, 9068) A-19
ESC [ K Sets initial conditions. (IBM 2391+) A-55
ESC [ K Sets initial conditions. (IBM 9068) A-55
ESC [ T Selects a Code page. (IBM 2391+, 4722, EPSON LQ1050/570) A-37
ESC \ Sets the relative horizontal print position. (EPSON LQ1050/570, HPR4915) A-12
Prints characters from all characters table. (IBM Proprinter XL24/XL24E, 2391+,
ESC \ A-38
9068)
ESC ] Sets a reverse line feed. (IBM 2391+, 4722, 9068) A-6
Prints a single character from the all characters table. (IBM Proprinter XL24/XL24E,
ESC ^ A-38
2391+, 4722, 9068)
ESC _ Sets or cancels overscore printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-29
ESC + Sets n/360-inch line spacing. (EPSON LQ1050/570, HPR4915) A-13
ESC = Defines downloaded characters. (IBM Proprinter XL24/XL24E, 2391+) A-40
ESC = Defines downloaded characters. (IBM Proprinter 4722, 9068) A-43
ESC = Sets MSB to 0. (EPSON LQ1050/570, HPR4915) A-53
ESC > Sets MSB to 1. (EPSON LQ1050/570, HPR4915) A-53
Selects 1/8-inch line spacing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
ESC 0 A-13
EPSON LQ1050/570, HPR4915)
ESC 1 Selects 7/72-inch line spacing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-13
ESC 2 Selects 1/6-inch line spacing. (EPSON LQ1050/570, HPR4915) A-13
Enables the line spacing set by ESC A command. (IBM Proprinter XL24/XL24E,
ESC 2 A-14
2391+, 4722, 9068)
ESC 3 Sets n/180-inch line spacing. (EPSON LQ1050/570, HPR4915) A-14
ESC 3 Sets graphics line spacing at n/216 inch. (IBM Proprinter XL24/XL24E, 2391+) A-14
ESC 3 Sets graphics line spacing at n/216 inch. (IBM 4722, 9068) A-14
Sets top of form (first printable line). (IBM Proprinter XL24/XL24E, 2391+, 4722,
ESC 4 A-14
9068)
ESC 4 Sets italics printing mode. (EPSON LQ1050/570, HPR4915) A-29
Sets an automatic line feed after a carriage return. (IBM Proprinter XL24/XL24E,
ESC 5 A-6
2391+, 4722, 9068)
ESC 5 Cancels italics printing. (EPSON LQ1050/570, HPR4915) A-29
ESC 6 Enables Upper Control Codes. (EPSON LQ1050/570, HPR4915) A-38
ESC 6 Selects the Character Set 2. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-38
ESC 7 Selects the Character Set 1. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-38
ESC 7 Cancels Upper Control Codes. (EPSON LQ1050/570, HPR4915) A-39
ESC A Sets text line spacing at n/60 inch. (EPSON LQ1050/570, HPR4915) A-15

MAN10240-01 A-3 Appendix A


Programmer Manual

Command Command Description Page


ESC A Sets text line spacing at n/72 inch. (IBM Proprinter XL24E) A-15
ESC A Sets text line spacing at n/72 inch. (IBM Proprinter XL24, 2391+, 4722, 9068) A-15
Sets vertical tabs. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC B A-15
LQ1050/570, HPR4915)
ESC b Sets vertical tabs in VFU channel (EPSON LQ1050/570, HPR4915) A-16
ESC BEL Buzzer. (IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570) A-54
Print and space back one position. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC BS A-55
LQ1050/570)
Sets form length to n lines. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC C A-16
LQ1050/570, HPR4915)
Sets horizontal motion index (HMI). (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
ESC c A-30
EPSON LQ1050/570)
Sets form length to n inches. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC C 0 A-16
LQ1050/570, HPR4915)
ESC CAN Cancels data. (IBM Proprinter XL24/XL24E, 2391+) A-51
Prints all received data and the column counter is set to the left margin. (IBM
ESC CR A-6
Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570)
Sets horizontal tabs. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC D A-16
LQ1050/570, HPR4915)
ESC d Spaces forwards relative dot position. (IBM Proprinter XL24/XL24E, 2391+, 9068) A-17
ESC DC1 Selects printer. (IBM Proprinter XL24/XL24E, 2391+) A-51
ESC DC2 Sets 10 cpi printing. (IBM Proprinter XL24/XL24E, 2391+) A-23
ESC DC3 Deselects printer. (IBM Proprinter XL24/24E) A-52
Cancels double width printing. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC DC4 A-23
LQ1050/570)
Sets emphasized printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC E A-30
LQ1050/570, HPR4915)
ESC EM Loading/ejecting paper. (EPSON LQ1050/570, HPR4915) A-17
Cancels emphasized printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
ESC F A-30
EPSON LQ1050/570, HPR4915)
ESC FF Ejects loaded document form printer. (IBM Proprinter XL24/XL24E, 2391+) A-20
Sets double strike printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC G A-30
LQ1050/570, HPR4915)
Sets 15 CPI. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570,
ESC g A-31
HPR4915)
Cancels double strike printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
ESC H A-31
EPSON LQ1050/570, HPR4915)
ESC HT Horizontal Tab. (IBM Proprinter XL24/XL24E, 2391+) A-20
Selects printing type for resident and DLL characters. (IBM Proprinter XL24/XL24E,
ESC I A-31
2391+, 4722, 9068)
ESC J Advances paper n/180 inch. (EPSON LQ1050/570, HPR4915) A-7
ESC J Advances paper n/216 inch. (IBM Proprinter XL24/XL24E, 2391+, IBM 4722, 9068) A-7
ESC j Stops printing. (IBM Proprinter XL24/XL24E, 2391+, 9068) A-53
Selects LQ fonts. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC k A-39
LQ1050/570, HPR4915)
Normal density dot graphics printing (60 dpi). (IBM Proprinter XL24/XL24E, 2391+,
ESC K A-49
4722, 9068, EPSON LQ1050/570, HPR4915)
ESC l Sets left margin (10 cpi). (EPSON LQ1050/570, HPR4915) A-17
Double density dot graphics printing (120 dpi). (IBM Proprinter XL24/XL24E, 2391+,
ESC L A-49
4722, 9068, EPSON LQ1050/570, HPR4915)

MAN10240-01 A-4 Appendix A


Programmer Manual

Command Command Description Page


ESC LF Line Feed. (IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570) A-7
ESC M Selects 10.5 point, 12 cpi. (EPSON LQ1050/570, HPR4915) A-32
Sets the skipover perforation to n lines. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC N A-17
LQ1050/570, HPR4915)
Disables the skipover perforation. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC O A-18
LQ1050/570, HPR4915)
ESC P Selects 10.5 point, 10 cpi. (EPSON LQ1050/570, HPR4915) A-32
ESC P Sets or cancels proportional printing. (IBM Proprinter XL24/XL24E, 2391+) A-32
ESC p Sets or cancels proportional printing. (EPSON LQ1050/570, HPR4915) A-32
ESC Q Sets the right margin (10 cpi). (EPSON LQ1050/570, HPR4915) A-18
ESC q Selects character style. (EPSON LQ1050/570) A-32
ESC Q Deselects Printer. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-53
ESC R Sets all tabs to power-on settings. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068) A-19
ESC R Selects a national character set. (EPSON LQ1050/570, HPR4915) A-39
Sets subscript or superscript printing. (IBM Proprinter XL24/XL24E, 2391+, 4722,
ESC S A-33
9068, EPSON LQ1050/570, HPR4915)
Selects condensed mode. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC SI A-33
LQ1050/570, HPR4915)
Sets double width printing (one line). (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC SO A-33
LQ1050/570, HPR4915)
ESC SP Sets intercharacter space. (EPSON LQ1050/570, HPR4915) A-19
Cancels subscript or superscript printing. (IBM Proprinter XL24/XL24E, 2391+, 4722,
ESC T A-34
9068, EPSON LQ1050/570, HPR4915)
ESC t Selects characters table. (EPSON LQ1050/570, HPR4915) A-40
Sets printing direction. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC U A-57
LQ1050/570, HPR4915)
ESC VT Vertical Tab. (IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570) A-21
Sets or cancels double width printing. (IBM Proprinter XL24/XL24E, 2391+, 4722,
ESC W A-34
9068, EPSON LQ1050/570, HPR4915)
ESC w Sets or cancels double height printing. (EPSON LQ1050/570) A-34
ESC X Sets left and right margins. (IBM Proprinter XL24/XL24E, 2391+, 9068) A-19
ESC X Selects font by pitch and point. (EPSON LQ1050/570) A-34
ESC x Selects Letter Quality or Draft printing. (EPSON LQ1050/570, HPR4915) A-35
Double density dot graphics printing at double-speed graphics (120 virtual dpi). (IBM
ESC Y A-49
Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
Quadruple density dot graphics printing (240 virtual dpi). (IBM Proprinter
ESC Z A-50
XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
Ejects loaded document form printer. (IBM Proprinter XL24/XL24E, 2391+, 4722,
FF A-19
9068, EPSON LQ1050/570, HPR4915)
Horizontal Tab. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
HT A-20
LQ1050/570, HPR4915)
Line Feed. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068 and EPSON
LF A-7
LQ1050/570, HPR4915)
Sets condensed printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
SI A-35
LQ1050/570, HPR4915)
Sets double width printing (one line). (IBM Proprinter XL24/XL24E, 2391+, 4722,
SO A-36
9068, EPSON LQ1050/570, HPR4915)
Vertical Tab. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570,
VT A-20
HPR4915)

MAN10240-01 A-5 Appendix A


Programmer Manual

EPSON/IBM/HPR Mode Commands Description

Print and Line Feed Execution


CR
Prints all received data and the column counter is set to the left margin. (IBM Proprinter XL24/XL24E,
2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code CR
Hexadecimal Value 0D
Decimal Value 13

This code is a terminator code. The column counter is set to the left margin value (a line feed can be
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 CR
Prints all received data and the column counter is set to the left margin. (IBM Proprinter XL24/XL24E,
2391+, EPSON LQ1050/570)
ASCII Code ESC CR
Hexadecimal Value 1B 0D
Decimal Value 27 13

See description of CR command above.

ESC ]
Sets a reverse line feed. (IBM 2391+, 4722, 9068)
ASCII Code ESC ]
Hexadecimal Value 1B 5D
Decimal Value 27 93

This code is a terminator code; when received, 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.

ESC 5
Sets an automatic line feed after a carriage return.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC 5 n
Hexadecimal Value 1B 35 n
Decimal Value 27 53 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

MAN10240-01 A-6 Appendix A


Programmer Manual

ESC J
Advances paper n/180 inch. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC J n
Hexadecimal Value 1B 4A n
Decimal Value 27 74 n
Range 0 < n < 255

This is a terminator code; it therefore causes the current contents of the print buffer to be printed out before
performing a single line LF of n/180 inch. This command is cancelled after the LF has been performed. The
printing will restart after a line feed from the column at which the command was sent.

ESC J
Advances paper n base units.
(IBM Proprinter XL24/XL24E, 2391+, IBM 4722, 9068)
ASCII Code ESC J n
Hexadecimal Value 1B 4A n
Decimal Value 27 74 n
Range 0 < n < 255

This is a terminator code; it therefore causes the current contents of the print buffer to be printed out before
performing a single line LF of:
• n/180 inch for XL24E
• n/216 inch for other emulations
• n/v inch when the vertical base unit has been changed to v using ESC [ \.

LF
Line Feed.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068 and EPSON LQ1050/570, HPR4915)
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. When the line counter reaches the last line of
the form (defined by software or function menu), the LF code causes the ejects a cut sheet, if loaded. 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.

ESC LF
Line Feed.
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570)
ASCII Code ESC LF
Hexadecimal Value 1B 0A
Decimal Value 27 10

See the description of the LF command.

MAN10240-01 A-7 Appendix A


Programmer Manual

Format Control
ESC $
Sets the absolute printing position. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC & n1 n2
Hexadecimal Value 1B 24 n1 n2
Decimal Value 27 36 n1 n2
Range 0 < n1 < 255
0 < n2 < 127

This command specifies the distance from the left margin where you want to print subsequent characters.
The default unit is 1/60 inch. The distance is in number of dots and must be calculated using the following
formula:
Margin distance = n1 + (n2 x 256) x 1/60” + (left margin)
Where n2 is equal to:
[(horizontal position) – (left margin 1 )
INIT position)] x (
defined
unit
256
Where n1 is equal to:
[(horizontal position) – (left margin 1 )
MOD position)] x (
defined
unit
256
If the selected position is outside the current right margin, the sequence will be ignored.

ESC ( C
Sets page length in defined unit. (EPSON LQ1050/570)
ASCII Code ESC ( C n1 n2 d1 d2
Hexadecimal Value 1B 28 43 n1 n2 d1 d2
Decimal Value 27 40 67 n1 n2 d1 d2
Range n1 = 2
n2 = 0
0 < (d2 x 256) + d1) x (defined unit) < 22
This command sets the page length in the specified number of units (the default unit is 1/360 inch),
previously defined with the ESC ( U command according to the following formula:
Page length = (d2 x 256) + d1) x (defined unit)
Where d2 is equal to:
(page length) x 1 )
INIT (
defined
unit
256
Where d1 is equal to:
(page length) x 1 )
MOD (
defined
unit
256

MAN10240-01 A-8 Appendix A


Programmer Manual

Set the page length before paper is loaded or when the print position is at the top-of-form position.
Otherwise, the current print position becomes the top-of-form position. Setting the page length cancels the
top and bottom-margin settings. If the defined unit is changed it does not affect the current page-length
setting.

ESC ( c
Sets Page Format. (EPSON LQ1050/570)
ASCII Code ESC ( c n1 n2 t1 t2 b1 b2
Hexadecimal Value 1B 28 63 n1 n2 t1 t2 b1 b2
Decimal Value 27 40 99 n1 n2 t1 t2 b1 b2
Range n1 = 4
n2 = 0
((t2 x 256) + t1) < (b2 x 256) + b1)
(defined unit) x (b2 x 256) + b1) < 22
This command sets the top and bottom margins in the defined units, set with the ESC ( U command,
according to the following formulas:
Top margin = (t2 x 256) + t1) x (defined unit)
Where t2 is equal to:
(top margin) x ( 1 )
INIT
defined unit
256
Where t1 is equal to:
(top margin) x ( 1 )
MOD
defined unit
256

Bottom margin = ((b2 x 256) + b1) x (defined unit)


Where b2 is equal to:
(bottom margin) x 1 )
INIT (
defined unit
256
Where b1 is equal to:
MOD (bottom margin) 1 )
x(
defined unit
256
Send this command before paper is loaded or when paper is at the top-of-form position. Otherwise the
current print position becomes the top-margin position. Measure both top and bottom margins from the top
edge of the page. The baseline for printing characters on the first line is 20/180 inch below the top-margin
position.
This command cancels any previous top and bottom-margin settings.

MAN10240-01 A-9 Appendix A


Programmer Manual

ESC ( U
Sets units. (EPSON LQ1050/570)
ASCII Code ESC ( U n1 n2 d
Hexadecimal Value 1B 28 55 n1 n2 d
Decimal Value 27 40 85 n1 n2 d
Range n1 = 1
n2 = 0
d = 10, 20, 30, 40, 50,60

This command sets the unit to m/3600 inch. The printer uses this unit when moving the print position, setting
the page length and setting the top and bottom margins with the following commands (the default units
varies depending on the command and print quality):

Commands Default Unit


ESC ( V 1/360 inch
ESC ( v 1/360 inch
ESC ( C 1/360 inch
ESC ( c 1/360 inch
ESC \ (LQ mode) 1/180 inch
ESC \ (Draft mode) 1/120 inch
ESC $ 1/60 inch

ESC ( V
Sets absolute vertical print position. (EPSON LQ1050/570)
ASCII Code ESC ( V n1 n2 d1 d2
Hexadecimal Value 1B 28 56 n1 n2 d1 d2
Decimal Value 27 40 86 n1 n2 d1 d2
Range n1 = 2
n2 = 0
0 < d1 < 255
0 < d2 < 127

This command moves the vertical print position to the position specified by the following formula:
Vertical position = (d2 x 256)+d1) x (defined unit) + (top-margin position)
Where d2 is equal to:
INIT [(vertical position) – (top margin position)] 1 )
x(
defined
unit
256

Where d1 is equal to:


MOD [(vertical position) – (top margin position)] 1 )
x(
defined unit
256

MAN10240-01 A-10 Appendix A


Programmer Manual

The default unit is 1/360 inch. The new position is measured in defined units from the current top-margin
position. Moving the print position below the bottom-margin position moves the vertical print position to the
top-margin position on the next page ejects a cut sheet, if loaded.
The printer ignores this command if the command would move the print position more than 179/360 inch in
the negative direction or if the command would move the print position in the negative direction after a
graphics command is sent on the current line or above the point where graphics have previously been
printed.

ESC ( v
Sets relative vertical print position. (EPSON LQ1050/570)
ASCII Code ESC ( v n1 n2 d1 d2
Hexadecimal Value 1B 28 76 n1 n2 d1 d2
Decimal Value 27 40 118 n1 n2 d1 d2
Range n1 = 2
n2 = 0
0 < d1 < 255
0 < d2 < 127
This command moves the vertical print position up or down from the current position, as specified by the
following formula
Vertical position = (d2 x 256)+d1) x (defined unit) + (current position)
For positive (down) movement:
Where d2 is equal to:
INIT [(vertical position) – (current position)] x ( 1 )
defined unit
256
Where d1 is equal to:
MOD [(vertical position) – (current position)] x ( 1 )
defined
unit
256
For negative (left) movement:
Where d2 is equal to:
32768- [(current position) – (vertical position)] x ( 1 )
INIT
defined
unit
256

Where d1 is equal to:


32768- [(current position) – (vertical position)] x ( 1 )
MOD
defined
unit
256
The default unit is 1/360 inch. The new position is measured in defined units from the current position.
Moving the print position below the bottom-margin position, it moves the vertical print position to the top-
margin position on the next page ejects a cut sheet, if loaded.

MAN10240-01 A-11 Appendix A


Programmer Manual

The printer ignores this command if this one would move the print position more than 179/360 inch in the
negative direction or if the command would move the print position in the negative direction after a graphics
command is sent on the current line or above the point where graphics have previously been printed. The
command would move the print position above the top-margin position.

ESC [ \
Sets vertical units. (IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code ESC [ \ m1 m2 t1 … t4
Hexadecimal Value 1B 5B 5C m1 m2 t1 … t4
Decimal Value 27 91 92 m1 m2 t1 … t4
Range m1 = 4
m2 = 0
0 < t1 < 255
0 < t2 < 255
t3 = 0
t4 = 180 or 216
This command changes the base units for the graphics line spacing commands (ESC J, ESC 3). The default
value is 1/216 or 1/180 inch.

ESC \
Sets the relative horizontal print position. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC \ n1 n2
Hexadecimal Value 1B 5C n1 n2
Decimal Value 27 92 n1 n2
Range 0 < n1 < 255
0 < n2 < 127

This command moves the horizontal print position left or right from the current position as specified by the
following formula:
Horizontal position = (n2 x 256) + n1) x (defined unit) + (current position)
For positive (right) movement:
Where n2 is equal to:
INIT [(horizontal position) – (current position)] 1 )
x(
defined
unit
256

Where n1 is equal to:


MOD [(horizontal position) – (current position)] 1 )
x(
defined
unit
256
For negative (left) movement:
Where n2 is equal to:
32768- [(current position) – (horizontal position)] 1 )
INIT x(
defined
unit
256

MAN10240-01 A-12 Appendix A


Programmer Manual

Where n1 is equal to:


32768- [(current position) – (horizontal position)] 1 )
MOD x(
defined
unit
256
The default unit is 1/120 inch in Draft mode and 1/180 inch in LQ mode. If it would move the print position
outside the printing area, the printer ignores this command.

ESC +
Sets n/360-inch line spacing. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC + n
Hexadecimal Value 1B 2B n
Decimal Value 27 43 n
Range 0 < 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 page length.

ESC 0
Selects 1/8-inch line spacing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC 0
Hexadecimal Value 1B 30
Decimal Value 27 48
This command causes line spacing to be set to 1/8 inch. If the line spacing is changed, it does not affect
previous settings for vertical tabs or page length.
In IBM 4722/9068 emulation, when the page-presentation-media (ESC [ F) command sets the printer to
process passbooks, the printer ignores the ESC 0 command.

ESC 1
Selects 7/72-inch line spacing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC 1
Hexadecimal Value 1B 31
Decimal Value 27 49

This command causes line spacing to be set to 7/72 inch.


In IBM 4722/9068 emulation, when the page-presentation-media (ESC [ F) command sets the printer to
process passbooks, the printer ignores the ESC 1 command.

ESC 2
Selects 1/6-inch line spacing. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC 2
Hexadecimal Value 1B 32
Decimal Value 27 50

This command causes the line spacing to be set to 1/6 inch. If the line spacing is changed, it does not affect
previous settings for vertical tabs or page length.

MAN10240-01 A-13 Appendix A


Programmer Manual

ESC 2
Enables the line spacing set by ESC A command.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC 2
Hexadecimal Value 1B 32
Decimal Value 27 50

This command starts line spacing at a value that was set by ESC A.
The line spacing is set to 1/6 inch, if the command does not encounter an ESC A command, or if the PPM
(ESC [ F) command (4722 or 9068 emulations) sets the printer to process passbooks.

ESC 3
Sets n/180-inch line spacing. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC 3 n
Hexadecimal Value 1B 33 n
Decimal Value 27 51 n
Range 0 < n < 255
This command sets the line spacing to n/180 inch. If the line spacing is changed, it does not affect previous
settings for vertical tabs or page length.

ESC 3
Sets graphics line spacing at n/x inch. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code ESC 3 n
Hexadecimal Value 1B 33 n
Decimal Value 27 51 n
Range 0 < n < 255

default: x = 180 if XL24E otherwise 216


This command sets graphics line spacing at n default unit defined by the ESC [ \ command.

ESC 3
Sets graphics line spacing at n/216 inch. (IBM 4722, 9068)
ASCII Code ESC 3 n
Hexadecimal Value 1B 33 n
Decimal Value 27 51 n
Range 0 < n < 255

This command sets graphics line spacing to the hexadecimal value specified by n , measured in n/216
inches, or n/v of an inch if the vertical base unit has been changed to v using ESC [ \. If n is 0, the current
line spacing interval remains in effect.
When the page-presentation-media (ESC [ F) command sets the printer to process passbooks, the printer
ignores the ESC 3 command.

ESC 4
Sets top of form (first printable line).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC 4
Hexadecimal Value 1B 34
Decimal Value 27 52

MAN10240-01 A-14 Appendix A


Programmer Manual

This sequence sets the top of form, i.e. it ejects the loaded paper. The command is ignored if paper is
positioned on the first printable line.

ESC A
Sets text line spacing at n/60 inch. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC A n
Hexadecimal Value 1B 41 n
Decimal Value 27 65 n
Range 0 < n < 85

This command changes the default line spacing to n/60 inch. The new line spacing value is immediately
activated.

ESC A
Sets text line spacing
(IBM Proprinter XL24E)
ASCII Code ESC A n
Hexadecimal Value 1B 41 n
Decimal Value 27 65 n

This command changes the line spacing to n/60 inch.

ESC A
Sets text line spacing
(IBM Proprinter XL24, 2391+, 4722, 9068)
ASCII Code ESC A n
Hexadecimal Value 1B 41 n
Decimal Value 27 65 n

This command changes the line spacing to n/72 inch. The line spacing value is stored and activated only
after the ESC 2 code is received.

ESC B
Sets vertical tabs.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC B n1 … nx NUL
Hexadecimal Value 1B 42 n1 ... nx 00
Decimal Value 27 66 n1 ... nx 0
Range 1 < 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..nx in the 0 VFU channel. The tab stops are memorized as
physical positions. Send an ESC B NUL command cancel all tab setting.
In IBM modes, this 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 line at top of form is line 1. The tab stops are memorized as logical positions. Send
an ESC B NUL command cancel all tab setting.

MAN10240-01 A-15 Appendix A


Programmer Manual

ESC b
Sets vertical tabs.
(EPSON LQ1050/570, HPR4915)
ASCII Code ESC B m n1 … nx NUL
Hexadecimal Value 1B 42 m n1 ... nx 00
Decimal Value 27 66 m n1 ... nx 0
Range 1 < n < 255
0 <m<7

Sets vertical tab stops in the m Vertical Format Unit (VFU) channel. This code sets up to 16 vertical tab
stops at the line specified by n1..nx in the m VFU channel. The tab stops are memorized as physical
positions. Send an ESC b m NUL command cancel all tab setting in the m VFU channel.

ESC C 0
Sets form length to n inches.
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570, HPR4915)
ASCII Code ESC C 0 n
Hexadecimal Value 1B 43 00 n
Decimal Value 27 67 0 n
Range 1 < n < 22

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. Setting the paper length cancels the top and bottom-margin settings.
In IBM 4722 and 9068 emulations this command is recognized and discarded.

ESC C
Sets form length to n lines.
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570, HPR4915)
ASCII Code ESC C n
Hexadecimal Value 1B 43 n
Decimal Value 27 67 n
Range 1 < n < 127
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.
In IBM 4722 and 9068 emulations, this command is recognized and discarded.

ESC D
Sets horizontal tabs.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC D n1 n2 … nx 0
Hexadecimal Value 1B 44 n1 n2… nx 00
Decimal Value 27 68 n1 n2… nx 0
Range 1 < 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 in the page so that it is affected by
changing the horizontal spacing. The columns are numbered 1 through 93.

MAN10240-01 A-16 Appendix A


Programmer Manual

In EPSON mode, the tab stop position set by ESC D is memorized as 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 Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code ESC d n1 n2
Hexadecimal Value 1B 64 n1 n2
Decimal Value 27 100 n1 n2
Range 0 < n1, n2 < 255

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.

ESC EM
Loading/ejecting paper. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC EM n
Hexadecimal Value 1B 19 n
Decimal Value 27 25 n

This command controls the paper feeding according to the parameters below:
n Description
0, R Paper Ejection
8 Paper Ejection
9 Current Paper Loading
The parameter “R” ejects the currently loaded cut sheet without printing data from the line buffer.

ESC l
Sets left margin (10 cpi). (EPSON LQ1050/570, HPR4915)
ASCII Code ESC l n
Hexadecimal Value 1B 6C n
Decimal Value 27 108 n
Range 0 < n < 255
Rule: 0 ≤ n < (right margin at horizontal spacing)
This code sets the left margin to n columns at the current horizontal spacing. It must be sent at the beginning
of the line.

ESC N
Sets the skip-over perforation to n lines.
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570, HPR4915)
ASCII Code ESC N n
Hexadecimal Value 1B 4E n
Decimal Value 27 78 n
Range 1 < n < 127 (EPSON mode)
1 < n < 225 (IBM mode)

MAN10240-01 A-17 Appendix A


Programmer Manual

The skip-over 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 skip-over is memorized as physical position on
the page. It is cancelled by ESC O or changing the form length. The skip-over value, when accepted, will set
the top and bottom margins according to the operator panel setting (see the User Manual):
If the top margin set via operator panel is greater than the skip-over value, then the following value of the
margins will be set:
Top margin = skip-over value
Bottom margin = 0
If the top margin set via operator panel is less or equal to the skip-over value, then the following value of
the margins will be set:
Top margin = operator panel value
Bottom margin = the difference between skip-over value and top margin value
If the sum of the top and bottom margins values set via operator panel is less than the skip-over value, the
following values for the margins will be set:
Top margin = operator panel value
Bottom margin = the difference between skip-over value and top margin value

Changing the vertical spacing does not affect the skip-over distance. This can be changed by a further ESC
N command or can be reset by the ESC O command, which resets the skip-over value to 0. The skip-over
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 commands, the skip-over perforation is cancelled and must therefore be set again.
In IBM 4722 and 9068 emulations, this command is recognized and discarded.

ESC O
Disables the skip-over perforation.
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570, HPR4915)
ASCII Code ESC 0
Hexadecimal Value 1B 4F
Decimal Value 27 79
This sequence sets the number of lines of the skip-over perforation to the value 0 and so any skip
perforation set by ESC N is cancelled.
In IBM 4722 and 9068 emulations, this command is recognized and discarded.

ESC Q
Sets the right margin (10 cpi). (EPSON LQ1050/570, HPR4915)
ASCII Code ESC Q n
Hexadecimal Value 1B 51 n
Decimal Value 27 81 n
Range 1 < n < 255
Rule: (left margin) < (n x horizontal spacing) ≤ (printable area width)
This code sets the right margin to n columns at the current horizontal spacing. It must be sent at the
beginning of the line.
Any value outside the accepted range is ignored and the previous setting remains in effect. The physical
position set for the right margin does not change if the horizontal spacing is modified.

MAN10240-01 A-18 Appendix A


Programmer Manual

ESC R
Sets all tabs to power-on settings.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
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.

ESC SP
Sets inter-character space. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC SP n
Hexadecimal Value 1B 20 n
Decimal Value 27 32 n
Range 0 < n < 127

This command sets the inter-character space to n/120 inch in Draft printing and n/180 inch in Quality
printing.

ESC [ J
Sets 5 lpi. (IBM 4722, 9068)
ASCII Code ESC [ J 2 0 n
Hexadecimal Value 1B 5B 4A 32 30 n
Decimal Value 27 91 74 32 30 n

n is a two byte parameter.


This command sets the line-spacing distance in increments of 1/1440 inch. The only value that is accepted is
288/1440 (1/5 inch).

ESC X
Sets left and right margins. (IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code ESC X n1 n2
Hexadecimal Value 1B 58 n1 n2
Decimal Value 27 88 n1 n2
Range 0 < n1, n2 < 255

This command specifies left and right margin positions. The n1 and n2 parameters indicate respectively the
number of columns for the left and right margins at the current spacing. These margins are memorized in
terms of absolute displacement from the physical left edge of the page.
If n1 is equal to 0, the current left margin of the page is used. If n2 is equal to 0, the current right 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.

FF
Ejects loaded document form printer.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code FF
Hexadecimal Value 0C
Decimal Value 12

MAN10240-01 A-19 Appendix A


Programmer Manual
This code is a terminator code, when received, causes all data in the print buffer to be printed out, then it
ejects the paper.

ESC FF
Ejects loaded document form printer.
(IBM Proprinter XL24/XL24E, 2391+)
ASCII Code FF
Hexadecimal Value 1B 0C
Decimal Value 27 12

See description of FF command above.

HT
Horizontal Tab.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code HT
Hexadecimal Value 09
Decimal Value 9
This code moves logically the print carriage to the next horizontal tab stop as defined by ESC D.
In IBM mode, up to 28 horizontal tab stops can be set. The HT code is ignored if no tab stop has been set or
if the current print carriage 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). The horizontal tab stops can
be changed by the ESC D command.
In EPSON mode, up to 32 horizontal tab stops can be set. 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. Character scoring (underline, over-score and strikethrough) is not
printed between the current print position and the next tab when this command is sent.

ESC HT
Horizontal Tab.
(IBM Proprinter XL24/XL24E, 2391+)
ASCII Code ESC HT
Hexadecimal Value 1B 09
Decimal Value 27 9
See description of HT command.

VT
Vertical Tab. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code VT
Hexadecimal Value 0B
Decimal Value 11

This code is a terminator code and when received causes the contents of the print buffer to be printed before
advancing paper to the next vertical tab stop set by the ESC B command.
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 an LF code if no vertical tab stops have
been set by the ESC B command. In EPSON mode, the vertical tabulations are referred to the VHF channel
selected by 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 by SO or ESC SO command.

MAN10240-01 A-20 Appendix A


Programmer Manual

ESC VT
Vertical Tab. (IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570)
ASCII Code ESC VT
Hexadecimal Value 1B 0B
Decimal Value 27 11

See description of VT command above.

ESC [ F
Page Presentation Media. (IBM 4722, 9068)
ASCII Code ESC [ F l h pft fc bw io
Hexadecimal Value 1B 5B 46 n pft fc bw io
Decimal Value 27 91 70 n pft fc bw io

The page-presentation-media command selects the following:


• Forms type and feed technique
• Initial position
• Initial offset distance
• Amount of acceptable skew
• If skew override is allowed
• Book width
The page-presentation-media consists of 1 to 6 parameter bytes, where:
l, h Defines the number of parameter bytes l + (h * 256)
pft Defines the paper feed technique and is used to select cut form and passbookorm printing:

fc Defines the initial vertical offset.


bw Not used
io If the fc parameter indicates that the position is to an offset print line, the io byte indicates, if
included, the number of lines to offset in hexadecimal

MAN10240-01 A-21 Appendix A


Programmer Manual

According to the parameters set, the maximum accepted skew is determined.


Form Type Form Width pft (hex) fc (hex) Maximum Skew
Up to maximum 00 1,61 mm (0.06 in.)
01 2,27 mm (0.09 in.)
02 3,02 mm (0.12 in.)
Cut Form 01 03 3,78 mm (0.15 in.)
04 0,76 mm (0.03 in.)
Up to 153 mm 80 1,61 mm (0.06 in.)
81 2,27 mm (0.09 in.)
82 0,76 mm (0.03 in.)
Cut Form 03 03 2,27 mm (0.09 in.)
Up to maximum 00 1,61 mm (0.06 in.)
01 0,76 mm (0.03 in.)
Passbook vert. fold 11 02 2,27 mm (0.09 in.)
03 2,27 mm (0.09 in.)
Up to 153 mm 80 1,61 mm (0.06 in.)
81 0,76 mm (0.03 in.)
Up to maximum 00 1,61 mm (0.06 in.)
01 0,76 mm (0.03 in.)
Passbook horiz. fold 12 02 2,27 mm (0.09 in.)
03 2,27 mm (0.09 in.)
Up to 153 mm 80 1,61 mm (0.06 in.)
81 0,76 mm (0.03 in.)

MAN10240-01 A-22 Appendix A


Programmer Manual

Print Mode
DC2
Sets 10 cpi printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code DC2
Hexadecimal Value 12
Decimal Value 18

This is a terminator code. This command is accepted at any position within the line. The character that
follows this command will be printed at 10 cpi. This command disable compressed and proportional printing
but does not cancel doublewide printing.

ESC DC2
Sets 10 cpi printing. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code ESC DC2
Hexadecimal Value 1B 12
Decimal Value 27 18

See description of the DC2 command.

DC2
Cancels compressed printing. (EPSON LQ1050/570)
ASCII Code DC2
Hexadecimal Value 12
Decimal Value 18
This is a terminator code. It 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

DC4
Cancels double width printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570)
ASCII Code DC 4
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
has set double width commands.

ESC DC4
Cancels double width printing.
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570)
ASCII Code ESC DC4
Hexadecimal Value 1B 14
Decimal Value 27 20

See description of DC4 command above.

MAN10240-01 A-23 Appendix A


Programmer Manual

ESC -
Sets or cancels underlined printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570)
ASCII Code ESC - n
Hexadecimal Value 1B 2D n
Decimal Value 27 45 n

Enables or disables the underlined printing. See the following table:


n Underlined Printing
1 enabled
0 disabled

ESC !
Master Select. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC ! n
Hexadecimal Value 1B 21 n
Decimal Value 27 33 n
Range 0 < n < 255
This command selects any combination of several attributes. The parameter n is the sum up of the printing
style values to be used. See the following table:
n Style
0 10 cpi
1 12 cpi
4 Compressed
8 Emphasized
16 Double Strike
32 Double Width
64 Italic
128 Underlined
To print the desired combination of printing attributes, calculate the n parameter by adding up the values of
each attribute.

ESC ( -
Sets score line. (EPSON LQ1050/570)
ASCII Code ESC ( - n1 n2 m d1 d2
Hexadecimal Value 1B 28 2D n1 n2 m d1 d2
Decimal Value 27 40 45 n1 n2 m d1 d2
Range n1 = 3
n2 = 0
m=1
1 < d1 < 3
d2 = 1
This command enables/disables scoring of all characters and spaces following this command according to
the following parameters:

MAN10240-01 A-24 Appendix A


Programmer Manual

d1 Line
1 Underline
2 Strikethrough
3 Overscore

d2 Line
0 Cancel score line
1 Single continuous line
2 Double continuous line
5 Single broken line
6 Double broken line
Any combination of scoring may be set simultaneously. Each type is independent of other types. Graphics
characters are not scored.

ESC :
Sets 12 CPI. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC :
Hexadecimal Value 1B 3A
Decimal Value 27 58

This is a terminator code. 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.

ESC [ @
Sets double high printing and double line feed.
(IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code ESC [ @ l h m1 m2 m3 m4
Hexadecimal Value 1B 5B 40 l h m1 m2 m3 m4
Decimal Value 27 91 64 l h m1 m2 m3 m4

This command sets mode, height, width and vertical spacing. The l and h parameters specify the number of
mode bytes mx contained in the sequence. The m1, m3 and m4 parameters specify the printing
characteristics.

l =normally 4
h = normally 0

m1 = set character mode

m1 mode
0 No change
1 Set italic
2 Reset italic
4 Set outline
8 Reset outline
16 Set shadow
32 Reset shadow

MAN10240-01 A-25 Appendix A


Programmer Manual

m2 = 0
m3 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
m4 specifies the character width. Only the low-order half-byte is significant in this mode byte. The high-order
half-byte 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+)
ASCII Code ESC [ d 1 0 n
Hexadecimal Value 1B 5B 64 01 00 n
Decimal Value 27 91 100 1 0 n

This command sets the print quality to draft or LQ print. See the following table:
n Types
0 No change
From 1 to 127 Draft
From 128 to 254 Letter Quality
255 Default Quality

ESC [ I
Sets font and pitch of a character. (IBM 2391+)
ASCII Code ESC [ I 2 0 m n
Hexadecimal Value 1B 5B 49 02 00 m n
Decimal Value 27 91 73 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 lock and pitch lock are active, this 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.

MAN10240-01 A-26 Appendix A


Programmer Manual

Identify the type style (pitch and font) to use in the left column (pitch).
For the hexadecimal values for m n, look across the row to the second column (Hex m n).
For the decimal values for m n, look across the row to the third column (Decimal m n).
Substitute these values for m n in the printer command syntax

Font Pitch Hexadecimal Decimal Decimal Value


m n m n (m x 256 + n)
Courier 10 00 0B 0 11 11
12 01 EB 1 235 491
15 01 EC 1 236 492
17 01 ED 1 237 493
20 01 EE 1 238 494
24 01 1E 1 30 286
PS 00 AB 0 171 171
Prestige 10 00 0C 0 12 12
12 01 FE 1 239 495
15 01 OF 1 240 496
17 01 C9 1 201 457
20 01 CA 1 202 458
24 01 1F 1 31 287
PS 00 A4 0 164 164
Gothic 10 00 24 0 36 36
12 01 8F 1 143 399
15 01 8E 1 142 398
17 01 8D 1 141 397
20 01 8C 1 140 396
24 01 20 1 32 288
PS 01 AE 1 174 174

Font Pitch Hexadecimal Decimal Decimal Value


m n m n (m x 256 + n)
Presentor 10 00 19 0 25 25
12 01 D0 1 208 464
15 01 D1 1 209 465
17 01 D2 1 210 466
20 01 D3 1 211 467
24 01 23 1 35 291
PS 00 C7 0 199 199

MAN10240-01 A-27 Appendix A


Programmer Manual
Script 10 01 D4 1 212 468
12 01 D5 1 213 469
15 01 D6 1 214 470
17 01 D7 1 215 471
20 01 D8 1 216 472
24 01 24 1 36 292
PS 00 C8 0 200 200

ESC [ I
Sets font and pitch of a character. (IBM 9068)
ASCII Code ESC [ I c m n o p
Hexadecimal Value 1B 5B 49 c m n o p
Decimal Value 27 91 73 c m n o p

This command sets the pitch and the code page. The c, m, n, o and p parameters are all two-byte
parameters, where:
c Determines the number of parameter bytes. It is normally set to six or eight
(second byte always 0)
m This parameter is reserved and ignored.
n This parameter is effective only if the third parameter is specified and may have the following
hexadecimal values:
00, 90 Sets 10 pitch characters
00, 78 Sets 12 pitch characters
00, 60 Sets 15 pitch characters
00, 54 Sets 17,1 pitch characters
o This parameter can be set as follows:
00, 00 No change to character pitch
01, 00 Set character pitch

p Sets the code pages as follows:


01, 181 Default character set (cp437) 33, 123 96Greek
33, 122 Greek (cp437g) 33, 124 Gost
03, 82 Multilingual (cp850) 33, 125 Tass
03, 83 Greek (cp851) 33, 126 Mazowia
03, 84 Latin 2 (cp852) 33, 127 Roman-8
03, 85 Turkish (cp853) 33, 128 Ukrainian
03, 87 Cyrillic 1 (cp855) 33, 129 Cp437 Slavic
03, 89 Turkish (Latin 5) (cp857) 33, 140 ID-14
03, 90 Euro PC Multilingual (cp858) 33, 131 ID-12
03, 92 Portuguese (cp860) 33, 132 ID-17
03, 94 Hebrew (cp862) 33, 133 Sanyo
03, 95 Canadian French (c863) 33, 134 Ku
03, 96 Arabic (cp864) 33, 135 Philip

MAN10240-01 A-28 Appendix A


Programmer Manual

03, 97 Nordic (cp865) 33, 143 8859/1 (Latin 1)


03, 98 Russian (Cyrillic 2) (cp866) 33, 144 8859/2 (Latin 2)
03, 99 Turkish (cp867) 33, 145 8859/3 (Latin 3)
03, 108 OCR A (cp 876) 33, 146 8859/4 (Latin 4)
03, 109 OCR B(cp 877) 33, 147 8859/5 (Latin/Cyrillic)
03, 155 8859/15 – cp923 33, 148 8859/6 (Latin/Arabic)
04, 74 (cp1098) 33, 149 8859/7 (Latin/Greek)
04, 226 Central Europe (cp1250) 33, 150 8859/8 (Latin/Hebrew)
04, 227 Cyrillic (cp1251) 33, 151 8859/9 (Latin 5)
04, 228 Windows Ansi Latin (cp1252)

ESC _
Sets or cancels over-score printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC _ n
Hexadecimal Value 1B 5F n
Decimal Value 27 95 n
Enables or disables the over-score printing. See the following table:
n Over-score Printing
1 Enabled (all spaces and characters that follow are over-scored)
0 Disabled

ESC 4
Sets italics printing mode. (EPSON LQ1050/570, HPR4915)
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.

ESC 5
Cancels italics printing. (EPSON LQ1050/570, HPR4915)
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).

MAN10240-01 A-29 Appendix A


Programmer Manual

ESC c
Sets horizontal motion index (HMI).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570)
ASCII Code ESC c n1 n2
Hexadecimal Value 1B 63 n1 n2
Decimal Value 27 99 n1 n2
Range 0 < n2 < 4
0 < n1 < 255
0 < ((n2 x 256) + n1)) < 1080
HMI < 3.00 inches
This command fixes the character width (HMI) according to the following formula:
Where HMI is equal to:
[(n2 x 256 ) + n1 ] inch
360
Where n2 is equal to:
INT HMI x 360
256
Where n1 is equal to:
MO HMI x 360
D
256

ESC E
Sets emphasized printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
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.

ESC F
Cancels emphasized printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
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 set
by ESC E.

ESC G
Sets double strike printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC G
Hexadecimal Value 1B 47
Decimal Value 27 71
This command starts double-strike (NLQ) printing. ESC G must be canceled by ESC H.

MAN10240-01 A-30 Appendix A


Programmer Manual

ESC g
Sets 15 CPI.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
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. This
command resets the horizontal motion index (HMI) set with the ESC c command. If you change the pitch
during proportional mode (selected with the ESC p command) the change takes effect when the printer exits
proportional mode.

ESC H
Cancels double strike printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
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 Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC I n
Hexadecimal Value 1B 49 n
Decimal Value 27 73 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.
IBM Proprinter XL24/XL24E, 2391+, 9068 emulations:
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 (*)
8 Draft 12 cpi 12 Draft 12 cpi
10 LQ 12 cpi 14 LQ 12 cpi
16 Draft 17 cpi 20 Draft 17 cpi
18 LQ 17 cpi 22 LQ 17 cpi
(*) When using the 9068 emulation, this value is ignored.
IBM 4722 emulation:
n Resident font n Download font
0 Draft 4 Draft
2 LQ Gothic 5 Draft
3 LQ Gothic 6 LQ Gothic
10 LQ Gothic 7 LQ Gothic
11 LQ Gothic
14 LQ Prestige
15 LQ Prestige
18 LQ Courier

MAN10240-01 A-31 Appendix A


Programmer Manual

ESC M
Selects 10.5 point, 12 cpi. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC M
Hexadecimal Value 1B 4D
Decimal Value 27 77

This command selects 10.5-point, 12-cpi character printing. It resets the horizontal motion index (HMI) set
with the ESC c command. If you change the pitch during proportional mode (selected with the ESC p
command) the change takes effect when the printer exits proportional mode.
ESC P
Selects 10.5 point, 10 cpi. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC P n
Hexadecimal Value 1B 50 n
Decimal Value 27 80 n

This command selects 10.5-point, 10-cpi character printing. It resets the horizontal motion index (HMI) set
with the ESC c command. If you change the pitch during proportional mode (selected with the ESC p
command) the change takes effect when the printer exits proportional mode.

ESC P
Sets or cancels proportional printing. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code ESC P n
Hexadecimal Value 1B 50 n
Decimal Value 27 80 n
If n parameter is 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 LQ1050/570, HPR4915)
ASCII Code ESC p n
Hexadecimal Value 1B 70 n
Decimal Value 27 112 n
This command selects the proportional or fixed spacing according to the following values:
n Proportional Printing
0 Returns to current fixed character pitch
1 Selects proportional character spacing

It resets the horizontal motion index (HMI) set with the ESC c command. 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.

ESC q
Selects character style. (EPSON LQ1050/570)
ASCII Code ESC q n
Hexadecimal Value 1B 71 n
Decimal Value 27 113 n
Range 0<n<3

MAN10240-01 A-32 Appendix A


Programmer Manual

This command enables/disables outline and shadow printing according to the parameters below:

n Style
0 Normal
1 Outline
2 Shadow
3 Outline with Shadow

ESC S
Sets subscript or superscript printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC S n
Hexadecimal Value 1B 53 n
Decimal Value 27 83 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 command to cancel super/subscript printing.
ESC SI
Selects condensed mode.
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570, HPR4915)
ASCII Code ESC SI
Hexadecimal Value 1B 0F
Decimal Value 27 15
This command selects the condensed mode in which character width is reduced as follows:
10 CPI → 17.1 CPI
12 CPI → 20 CPI
Proportional → ½ width
DC2 code cancels the condensed printing. This command resets the horizontal motion index (HMI) set with
the ESC c command.

ESC SO
Sets double width printing (one line).
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570, HPR4915)
ASCII Code ESC S0
Hexadecimal Value 1B 0E
Decimal Value 27 14

This code causes subsequent data in the same line to be printed as double width characters. It is canceled
by the LF, VT, FF, DC4 and ESC W 0 commands or when the buffer is full. This command resets the
horizontal motion index (HMI) set with the ESC c command.

MAN10240-01 A-33 Appendix A


Programmer Manual

ESC T
Cancels subscript or superscript printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC T
Hexadecimal Value 1B 54
Decimal Value 27 84

This command cancels subscript or superscript printing selected by ESC S command.

ESC W
Sets or cancels double width printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC W n
Hexadecimal Value 1B 57 n
Decimal Value 27 87 n
Range 0<n<1

Enables or disables the double width printing. See the following table:
n Selection
1 Double Width Printing enabled
0 Double Width Printing disabled

ESC w
Sets or cancels double height printing. (EPSON LQ1050/570)
ASCII Code ESC w n
Hexadecimal Value 1B 77 n
Decimal Value 27 119 n
Range 0 < n < 255

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 double-height. See the following
table:
n Selection
1 Double Height Printing enabled
0 Double Height Printing disabled

ESC X
Selects font by pitch and point. (EPSON LQ1050/570)
ASCII Code ESC X m n1 n2
Hexadecimal Value 1B 58 m n1 n2
Decimal Value 27 88 m n1 n2
Range 5 < m < 127
0 < n1 < 255
0 < n2 < 127
This command puts the printer in scalable font mode and selects the pitch (default value 10 cpi) of the font
according to the following formula:

MAN10240-01 A-34 Appendix A


Programmer Manual

Where m defines the pitch:


m=0 maintains current density
m=1 sets proportional spacing
m>5 selects fixed pitch equal to 360/m cpi
This command overrides the current pitch setting.
This command selects the point (default value 10.5) attributes of the font according to the following formula:
Point size = (n2 x 256) + n1
2
n1 and n2 define size by point (1 point equals 1/72 inch).
n2 = INT (point size) x 2
256

n1= MOD (point size) x 2


256
The point sizes available are the following: 8, 10, (10.5), 12, 14, 16, 18, 20, (21), 22, 24, 26, 28, 30, 32.

ESC x
Selects Letter Quality or Draft printing. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC x n
Hexadecimal Value 1B 78 n
Decimal Value 27 120 n
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 proportional spacing with the ESC p command, the printer returns to Draft
printing.

SI
Sets condensed printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570,
HPR4915)
ASCII Code SI
Hexadecimal Value OF
Decimal Value 15

This command selects the condensed mode in which character width is reduced as follows:
10 CPI → 17.1 CPI
12 CPI → 20 CPI
Proportion → ½ width
al
DC2 code cancels the condensed printing. This command resets the horizontal motion index (HMI) set with
the ESC c command.

MAN10240-01 A-35 Appendix A


Programmer Manual

SO
Sets double width printing (one line).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
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 canceled
by the LF, FF, VT, DC4, ESC W codes o when the buffer is full. This command is not canceled by the VT
command when it functions the same as a CR command.

Character Sets
ESC ( ^
Prints data as characters. (EPSON LQ1050/570)
ASCII Code ESC ( ^ n1 n2 d1 …. dk
Hexadecimal Value 1B 28 5E n1 n2 d1…. dk
Decimal Value 27 40 94 n1 n2 d1…. dk
Range 0 < n1 < 255
0 < n2 < 127

This command prints data bytes d1 through dk as characters not control codes. The amount of data
to be sent is calculated as follows:
k = ((n2 x 256) + n1)
Where n2 is equal to:
INIT k
256
Where n1 is equal to:
MOD k
256
The printer ignores data if no character is assigned to that character code in the currently selected
character table.

ESC ( t
Assigns character table. (EPSON LQ1050/570)
ASCII Code ESC ( t n1 n2 d1 d2 d3
Hexadecimal Value 1B 28 74 n1 n2 d1 d2 d3
Decimal Value 27 40 116 n1 n2 d1 d2 d3
Range n1 = 3
n2 = 0
This command assigns the d2 registered character table to the d1 character table according to the following
values:
d1:
0 character set 0 Italic default
1 character set 0 Graphic default
2 character set 0 DLL default
3 character set 0 Graphic default

MAN10240-01 A-36 Appendix A


Programmer Manual

d2 d3 d2 d3
1 0 PC 437 15 0 PC867
1 16 PC 437G 25 0 PC877
3 0 PC850 16 0 GOST
4 0 PC851 29 1 8859/1
5 0 PC853 29 2 8859/2
6 0 PC855 29 3 8859/3
7 0 PC860 29 4 8859/4
8 0 PC863 29 5 8859/5
9 0 PC865 29 6 8859/6
10 0 PC852 29 7 8859/7
11 0 PC857 29 8 8859/8
44 0 PC858 29 9 8859/9
13 0 PC864 29 15 8859/15
14 0 PC866
12 0 PC862

ESC [ T
Selects a Code page. (IBM 2391+, 4722, EPSON LQ1050/570)
ASCII Code ESC [ T l h 0 0 Hc Lc x
Hexadecimal Value 1B 5B 54 l h 00 00 Hc Lc x
Decimal Value 27 91 84 l h 0 0 Hc Lc x
This sequence allows changing the current code page. If an unavailable code page is specified, this
command is ignored.
l,h Defines the number of parameter bytes l + (h * 256).
The number of byte have a value from 4 or 5.
Hc, Lc Define the code page number
x Not used.

Code Page Hc Lc Code Page Hc Lc Code Page Hc Lc


CP437 1 181 CP867 3 99 Mazowia 33 126
CP437g 33 122 CP874 3 106 Philip 33 135
CP437sl 33 129 CP876 3 108 Roman-8 33 127
CP850 3 82 CP877 3 109 Sanyo 33 133
CP851 3 83 CP1098 4 74 Tass 33 125
CP852 3 84 CP1250 4 226 Ukrainian 33 128
CP853 3 85 CP1251 4 227 8859/1 33 143
CP855 3 87 CP1252 4 228 8859/2 33 144
CP857 3 89 CP1257 4 233 8859/3 33 145
CP858 3 90 96greek 33 123 8859/4 33 146
CP860 3 92 Gost 33 124 8859/5 33 147
CP862 3 94 Id-12 33 131 8859/6 33 148
CP863 3 95 Id-14 33 130 8859/7 33 149
CP864 3 96 Id-17 33 132 8859/8 33 150
CP865 3 97 Koi8-u 33 138 8859/9 33 151
CP866 3 98 Ku 33 134 8859/15 3 155

MAN10240-01 A-37 Appendix A


Programmer Manual

ESC \
Prints characters from all characters table.
(IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code ESC \ n1 n2
Hexadecimal Value 1B 5C n1 n2
Decimal Value 27 92 n1 n2
Range 0 < n1 < 255
0 < n2 < 255

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 Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC ^ n
Hexadecimal Value 1B 5E n
Decimal Value 27 94 n
Range 0 < n < 255

This command prints the next character from the all characters table. This sequence prints only one
character from the all character table.

ESC 6
Enables Upper Control Codes. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC 6
Hexadecimal Value 1B 36
Decimal Value 27 54

This command enables the printing of upper control codes (from 128 to 159). These codes are treated as
printable characters instead of control codes. This command has no effect when the italic character table is
selected and remains in effect even if you change the character table.

ESC 6
Selects the Character Set 2. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
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. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC 7
Hexadecimal Value 1B 37
Decimal Value 27 55
This command selects the character set 1.

MAN10240-01 A-38 Appendix A


Programmer Manual

ESC 7
Cancels Upper Control Codes. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC 7
Hexadecimal Value 1B 37
Decimal Value 27 55
This command cancels the printing of upper control codes (from 128 to 159).

ESC k
Selects LQ fonts. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC k n
Hexadecimal Value 1B 6B n
Decimal Value 27 107 n

Selects one of the available fonts in Letter Quality mode. See the following table:
n Types
0 Courier
1 Gothic
2 Courier
3 Prestige
4 Script
5 OCR-B
6 OCR-A
7 Presentor
8 Boldface
9 Script
11 Boldface

If the font type selected is not available it will be replaced with the COURIER.
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.

ESC R
Selects a national character set. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC R n
Hexadecimal Value 1B 52 n
Decimal Value 27 82 n
Range 0 < n < 12

This code causes the national character set to be selected according to the parameter n. See the following
table:
n n n
0 USA 5 Sweden 10 Spain-I
1 France 6 Italy 11 Japan
2 Germany 7 Spain 12 Norway
3 United Kingdom 8 Japan Denmark-II
4 Denmark-I 9 Norway Spain-II

MAN10240-01 A-39 Appendix A


Programmer Manual

ESC t
Selects characters table. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC t n
Hexadecimal Value 1B 74 n
Decimal Value 27 116 n
Range 0<n<3

Selects the character table to be used for printing from among the four character tables described below:

n Character Tables
0 Standard Italic Character Set
1 PC437
2 User-defined characters
3 PC437

Download Character
ESC %
Selects user-defined character set. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC % n
Hexadecimal Value 1B 25 n
Decimal Value 27 37 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

ESC &
Defines user-defined characters. (EPSON LQ1050/570, HPR4915)
The format for this command depends on whether you are defining draft characters or LQ characters.
Draft mode
ASCII Code ESC & NUL n m [ a0 a1 a2 d 1 d 2 … d k ]
Hexadecimal Value 1B 26 00 n m [ a0 a1 a2 d 1 d 2 … d k ]
Decimal Value 27 38 0 n m [ a0 a1 a2 d 1 d 2 … d k ]
Range 0 < n < 127
0 < m < 127
n<m
0 < a1 < 15
0 < a0+a1+a2 < 18

LQ mode
ASCII Code ESC & NUL n m [a0 a1 a2 d 1 d 2 … d k ]
Hexadecimal Value 1B 26 00 n m [a0 a1 a2 d 1 d 2 … d k ]
Decimal Value 27 38 0 n m [a0 a1 a2 d 1 d 2 … d k ]
Range 0 < n < 127
0 < m < 127
n<m
0 < a1 < 37
0 < a0+a1+a2 < 42

MAN10240-01 A-40 Appendix A


Programmer Manual

The data within brackets above is repeated for each character you define.
The parameters in the command have the following meaning:
n and m The n and m parameters are two decimal numbers that define the first and the last characters to
be replaced in the character set in use.
a0 It sets space to the left of each proportional user-defined character.
a1 Actual width of user-defined characters.
a2 It sets space to the right of each proportional user-defined.
d1 ...dn They are the character data that is printed.

Maximum character width (height x width):


Print quality 10 cpi 12 cpi 15 cpi Proportional
Draft 24 x 12 24 x 10 24 x 8 Not available
Normal size 24 x 36 24 x 30 24 x 24 24 x 42
LQ
Super/subscript 16 x 36 16 x 30 16 x 24 16 x 42

ESC :
Copies characters from ROM to RAM. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC : NUL n m
Hexadecimal Value 1B 3A 00 n m
Decimal Value 27 58 n m
Range 0 < n < 127
m=0
This code copies the character generator in ROM into RAM area dedicated to the user-defined characters.
The n parameter represents the LQ typestyle.
The following attributes are reflected in the copied font: Typeface, international character set, size
(super/subscript or normal), quality (draft/quality). Before copying ROM characters to RAM, cancel italics
with the ESC 5 command. After copying you can italicize characters by sending the ESC 4 command.

ESC =
Defines downloaded characters.
(IBM Proprinter XL24/XL24E, 2391+)
ASCII Code ESC = n m id p t
Hexadecimal Value 1B 3D n m id p t
Decimal Value 27 61 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:

MAN10240-01 A-41 Appendix A


Programmer Manual

Byte 1, 2 The absolute 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 DLL 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.

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.
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 table, 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: Indicate the printer model. The id related to your printer is 23H.
p and t Indicate 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.

MAN10240-01 A-42 Appendix A


Programmer Manual

ESC =
Defines downloaded characters.
(IBM Proprinter 4722, 9068)
ASCII Code ESC = c1 c2 n
Hexadecimal Value 1B 3D c1 c2 n
Decimal Value 27 61 c1 c2 n
The character font image download (ESC = c1 c2 n) command downloads up to 256 user-defined characters.
9 pin font image
c1 c2 Define the least-significant and most-significant byte (respectively) of a hexadecimal count
of the bytes n that follow the count. You calculate the count as follows:

Count (c2 x 256) + c1


or
Count ((number of downloaded characters) * 13) + 2
The maximum number of customer defined characters is 256, therefore, the maximum count will be 3330 or
D02H. A count value of 0 will reload the customer defined character area from the resident character area.

n Contains the following hexadecimal data:


14H Start_code_point Slice_image_information
Start_code_point Is the code point of the first character representation to be downloaded and it
must be a value in the range 00H to FFH.
Slice_image_info Is a list of 13-byte entries (one entry for each character representation) having
the following format:
Attribute 00H Slice1 … Slice11

Attribute Indicates the physical attributes of the character representation with the following bit
information:
Bit 7 Indicates whether the character is a descender or an
ascender.
The bit is ignored is either bit 0 or bit 1 is set.
Bit 0 = Ascender
Bit 1 = Descender
Bits 6 to 2 Reserved and ignored
Bit 1 and 0 Define 12-high expansion for box drawing:
B 00 = No 12-high expansion
B 01 = Expand the bottom row (row 8) for information
down to rows 9, 10, 11 and 12
B 10 = Expand the top four (4) rows (rows 1, 2, 3 and 4)
down to rows 9, 10, 11 and 12.
Slice 1 to Each byte defines the image information for the vertical columns (slices) of the graphic. Slice 1
Slice 11 defines the leftmost vertical column, and Slice 11 defines the rightmost. Within each byte the
most significant bit (bit 7) defines the topmost dot and the least significant bit (bit 0) defines
the bottommost dot of the slice. A bit being on indicates that its associated dot is to be printed.
The eight bits of data are mapped onto 20 wires in the printer to give the same aspect ratio.
Bit image is mapped as follows:

MAN10240-01 A-43 Appendix A


Programmer Manual

1. Ascender
Dot Position Bit Print
Top Number Wires
o 7 1, 2 If dots 7 and 6 are printed, wire 3 is used
o 6 4, 5
o 5 6, 7 If dots 5 and 4 are printed, wire 8 is used
o 4 9, 10
o 3 11, 12 If dots 3 and 2 are printed, wire 13 is used
o 2 14, 15
o 1 16, 17 If dots 1 and 0 are printed, wire 18 is used
o 0 19, 20

Bottom
1. Ascender
Dot Position Bit Print
Top Number Wires
o 7 4, 5 If dots 7 and 6 are printed, wire 6 is used
o 6 7, 8
o 5 9, 10 If dots 5 and 4 are printed, wire 11 is used
o 4 12, 13
o 3 14, 15 If dots 3 and 2 are printed, wire 16 is used
o 2 17, 18
o 1 19, 20 If dots 1 and 0 are printed, wire 21 is used
o 0 22, 23
Bottom

There are actually 12 vertical columns in a graphic, however the last column must always be blank, so it is
not specifiable in the image information.

Horizontally consecutive dots are eliminated in standard text print mode (but are printed in near-
letter-quality print mode). The dot elimination process starts from the left.

Code points 00H, 20h, 7FH and FFH are handled specially by the printer and care should be taken when
you are downloading characters for these points.

24 pin font image


c1 c2 Define the least-significant and most-significant byte (respectively) of a hexadecimal count
of the bytes n that follow the count. You calculate the count as follows:
Count (c2 x 256) + c1
or
Count ((number of downloaded characters) * 38) + 2
The maximum number of customer defined characters is 256, therefore, the maximum count will be 9730 or
X2602. A count value of 0 will reload the customer defined character area from the resident character area.

MAN10240-01 A-44 Appendix A


Programmer Manual

A count value of 0 loads the customer defined character area from the resident character area.
n Contains the following hexadecimal data:
X D0 Start_code_point Slice_image_information
Start_code_point Is the code point of the first character representation to be downloaded and it
must be a value in the range 00H to FFH.
Slice_image_info Is a list of 38-byte entries (one entry for each character representation) having
the following format:
Attribute X 00H Slice1 Byte1, Slice2 Byte2… Slice12, Byte12

Attribute Indicates the physical attributes of the character representation with the
following bit information:
Bit 7-3 Are reserved
Bits 2 Defines horizontal box, character expansion.
B 0 = indicates no horizontal expansion.
B 1 = indicates that the first and last slices are expanded
horizontally to fill the character box on each side of the
character
Bit 1 - 0 Defines vertical box character expansion.
B 00 = indicates no vertical expansion
B 01 = indicates that bottom two rows of slice information
are expanded three times downward at the bottom of the
character.
B 10 = indicates that top six rows of slice information are
expanded downward at the bottom of the character.
B 11 = indicates no vertical expansion.
Using the attribute' expansion information box, characters in adjacent positions
can be made to touch each other vertically at 6 lines per inch and horizontally at
any character pitch.

Box drawing characters whose attributes indicate expansion are not expanded when printing double high
print mode.

Slice1 … Slice 12 Each byte defines the image information for the vertical columns (slices) of the
graphic. Slice 1 defines the leftmost vertical column, and Slice 12 defines the
rightmost vertical column. Within each slice, as defined by three consecutive
bytes, the bytes represent the top, middle and bottom-eight dots of the slice,
respectively. Within each byte the most significant bit (bit 7) defines the topmost
dot and the least significant bit (bit 0) defines the bottommost dot of the slice.
When a bit is on, the corresponding dot is to be printed.

Horizontally consecutive dots are eliminated in standard text print mode (but are printed in letter-quality
print mode). The dot elimination process starts from the left.

The printer interprets code points 00H, 20H, 7FH and FFH as cases. Care should be taken when you
downloaded characters for these code points.

MAN10240-01 A-45 Appendix A


Programmer Manual

Bit-Image

ESC ( G
Selects Graphics Mode. (EPSON LQ1050/570)
ASCII Code ESC ( G m n1 n2
Hexadecimal Value 1B 28 47 m n1 n2
Decimal Value 27 40 71 m n1 n2
Range m = 1, 49
n1 = 1
n2 = 0
This command selects graphics mode and allows you to print raster graphics. This command clears all user-
defined characters and tab settings. Only the following commands are available in graphics mode, the printer
ignores all other commands: LF, FF, CR, ESC EM, ESC . , ESC @, ESC ( c, ESC ( C, ESC ( V, ESC ( v,
ESC \, ESC $, ESC U, ESC +, ESC ( U.

ESC *
Sets dot graphics printing. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC * m n1 n2 d1.. dx
Hexadecimal Value 1B 2A m n1 n2 d1.. dx
Decimal Value 27 42 m n1 n2 d1.. dx

m = 0,1,2,3,4,5,6,32,33,38,39,40,64,65,70,71,72,73
0 < n1 < 255
0 < n2 < 31
This command prints dot-graphics in 8-dot columns, depending on the following parameters:
m Specifies the dot density
n1, n2 Specify the total number of columns of graphics data according to the formula:
number of dot columns = (n1 + (n2 x 256))
n2 = INT (number of dot columns)
256
n1 = MOD (number of dot columns)
256
d1 … d x Bytes of graphics data; x is determined by multiplying the total number of columns times the
number of bytes required for each column. See the table below:

Parameter m in Horizontal Vertical density Adjacent dot Dots per Bytes per
ESC * command density (dpi) (dpi) printing column column
0 60 60 60 Yes 8 1
1 120 60 60 Yes 8 1
2 120 60 60 No 8 1
3 240 60 60 No 8 1
4 80 60 60 Yes 8 1
6 90 60 60 Yes 8 1
32 60 180 180 Yes 24 3
33 120 180 180 Yes 24 3
38 90 180 180 Yes 24 3
39 180 180 180 Yes 24 3
40 360 180 180 No 24 3

MAN10240-01 A-46 Appendix A


Programmer Manual

ESC .
Print Raster Graphics. (EPSON LQ1050/570)
ASCII Code ESC . c v h m n1 n2 d1 d2 … dk
Hexadecimal Value 1B 2E c v h m n1 n2 d1 d2 … dk
Decimal Value 27 46 c v h m n1 n2 d1 d2 … dk
Range c = 0,1
v = 10, 20
h = 10, 20
0 < m < 24
0 < n1 < 255
0 < n2 < 127
0 < d < 255

This command prints dot graphics in raster format (row by row, left to right) and can be used only during
graphics mode entered by sending the ESC ( G command. It allows compression of graphics data during
raster graphics printing.
The parameters are used as described below:
c equal to 0 specifies full graphics mode (no compressed)
equal to 1 specifies compressed mode
v vertical dot density (v/3600 dpi)
h horizontal density (h/3600 dpi)
m vertical dot count (rows of dot graphics)
n1, n2 horizontal dot count (columns of dot graphics), according to the following formula:
n2 = INT (horizontal dot count)
256

n1 = MOD (horizontal dot count)

256
k total number of data bytes, according to the following formula:
k = m x INT (n2 x 256) + n1 + 7
8
d1 … d k During full graphics mode: graphics data.

During compressed mode: the first data byte is treated as a counter. Graphics data bytes then
alternate with a data counter byte as follows:
0 < (counter byte) < 127
Counter specifies the number of data bytes following according to this formula:
(counter byte) + 1 = (number of data bytes to follow)
or
(counter byte) = (number of data bytes to follow) -1
128 < (counter byte) < 255
Counter specifies the number of times to repeat the next byte of data according to this
formula:
256 - (counter byte) + 1 = (number of times to repeat next byte)
or
(counter byte) = 257 - (number of times to repeat next byte)

MAN10240-01 A-47 Appendix A


Programmer Manual

ESC ?
Reassigns dot graphics mode. (EPSON LQ1050/570, HPR4915)
ASCII Code ESC ? n m
Hexadecimal Value 1B 3F n m
Decimal Value 27 63 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,4,6,32,33,38,39,40,64,65,70,71,72,73
m N
0 (K): ESC K graphic command
1 (L): ESC L graphic command
2 (Y): ESC Y graphic command
3 (Z): ESC Z graphic command

ESC [ g
High Resolution Graphics. (IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code ESC [ g l h d1..dn
Hexadecimal Value 1B 5B 67 lhm d1..dn
Decimal Value 27 91 103 l h d1..dn

This command sends data for dot matrix graphics to the printer and allows the selection of eight modes for
both 8-wire graphics and 24-wire graphics.
l, h Defines the number of bytes l + (h x 256) that follow the count. The count is set to the number of
slice image data bytes + 1.
D1 Mode byte (see below)
D2..dn List of vertical slice for graphics print. The graphic data is organized by byte

d1 Horizontal Wires Description


Density
0 60 8 Same as ESC K graphic command
1 120 8 Same as ESC L graphic command
2 120 8 Same as ESC Y graphic command
3 240 8 Same as ESC Z graphic command
8 60 24 High resolution for ESC K
9 120 24 High resolution for ESC L
11 180 24
12 360 24

data .
For 8-wire modes, it is arranged and mapped to the wires identically to ESC K.
For 24-wire modes, the data has 3 bytes per slice, the most significant bit of the 1st byte mapping to the top
wire and the least significant bit of the 3rd byte mapping to the bottom wire. The slices are in sequence from
left to right.

MAN10240-01 A-48 Appendix A


Programmer Manual

ESC K
Normal density dot graphics printing (60 dpi).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC K n1 n2 p1 p2... px
Hexadecimal Value 1B 4B n1 n2 p1 p2... px
Decimal Value 27 75 n1 n2 p 1 p2 ... px
Range 0 < n1 < 255
0 < n2 < 31
0 < p < 255

Terminator code. This command prints dot graphics at 60 horizontal dot per inch by 60 vertical dpi. The
parameter values should be calculated as follows:
n1, n2 Number of column: n1 + (n2 x 256)
p1 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.

ESC L
Double density dot graphics printing (120 dpi).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC L n1 n2 p1 p2... px
Hexadecimal Value 1B 4C n1 n2 p1 p2... px
Decimal Value 27 76 n1 n2 p 1 p2 ... px
Range 0 < n1 < 255
0 < n2 < 31
0 < p < 255

Terminator code. This command prints dot graphics at 120 horizontal dot per inch by 60 vertical dpi. The
parameter values should be calculated as follows:
n1 Remainder of the number of column divided by 256.
n2 Integer result of the previous division.
p1 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.

ESC Y
Double density dot graphics printing at double-speed graphics (120 virtual dpi). (IBM Proprinter
XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC Y n1 n2 p1 p2... px
Hexadecimal Value 1B 59 n1 n2 p1 p2... px
Decimal Value 27 89 n1 n2 p 1 p2 ... px
Range 0 < n1 < 255
0 < n2 < 31
0 < p < 255

MAN10240-01 A-49 Appendix A


Programmer Manual

Terminator code. This command prints dot graphics at 120 horizontal dot per inch by 60 vertical dpi. The
parameter values should be calculated as follows:
n1 Remainder of the number of column divided by 256.
n2 Integer result of the previous division.
p1 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.

ESC Z
Quadruple density dot graphics printing (240 virtual dpi).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC Z n1 n2 p1 p2... px
Hexadecimal Value 1B 5A n1 n2 p1 p2... px
Decimal Value 27 90 n1 n2 p 1 p2 ... px
Range 0 < n1 < 255
0 < n2 < 31
0 < p < 255

Terminator code. This command prints dot graphics at 240 horizontal dot per inch by 60 vertical dpi. The
parameter values should be calculated as follows:
n1 Remainder of the number of column divided by 256.
n2 Integer result of the previous division.
p1 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.

MAN10240-01 A-50 Appendix A


Programmer Manual

Data Input Control

CAN
Cancels line. (EPSON LQ1050/570, HPR4915)
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 Proprinter XL24/XL24E, 2391+, 4722, 9068)
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.

ESC CAN
Cancels data. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code ESC CAN
Hexadecimal Value 1B 18
Decimal Value 27 24

See description of CAN command above.

DC1
Selects printer. (IBM Proprinter XL24/XL24E, 2391+)
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.
In IBM 4722 and 9068 emulations the command is treated as NULL.

DC1
Selects printer. (EPSON LQ1050/570, HPR4915)
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.

ESC DC1
Selects printer. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code ESC DC1
Hexadecimal Value 1B 11
Decimal Value 27 17

MAN10240-01 A-51 Appendix A


Programmer Manual

This command causes the printer to be enabled after it has been disabled by the ESC Q command.
In IBM 4722 and 9068 emulations the command is treated as NULL.

DC3
Deselects printer. (EPSON LQ1050/570, HPR4915)
ASCII Code DC3
Hexadecimal Value 13
Decimal Value 19

This code deselects the printer. The printer remains deselected until it receives a DC1 command or power is
turned off then on again. The printer ignores the ESC @ command (initialize printer) when it is deselected.

DC3
Deselects printer. (IBM Proprinter XL24/24E)
ASCII Code DC3
Hexadecimal Value 13
Decimal Value 19

This code is ignored on the parallel interface. On the serial interface the printer sends this control code to
indicate that its buffers are full.
In 4722 and 9068 emulations the command is treated as NULL.

ESC DC3
Deselects printer. (IBM Proprinter XL24/24E)
ASCII Code ESC DC3
Hexadecimal Value 1B 13
Decimal Value 27 19

See the description of the DC3 command above.

DEL
Deletes the last character. (EPSON LQ1050/570, HPR4915)
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 ignores this command if it follows a command that moves the horizontal
print position (ESC $, ESC \ or HT).

ESC #
Cancels MSB control. (EPSON LQ1050/570, HPR4915)
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.

MAN10240-01 A-52 Appendix A


Programmer Manual

ESC =
Sets MSB to 0. (EPSON LQ1050/570, HPR4915)
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 data.

ESC >
Sets MSB to 1. (EPSON LQ1050/570, HPR4915)
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 data.

ESC Q
Deselects Printer. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code ESC Q n
Hexadecimal Value 1B 51 n
Decimal Value 27 81 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 Printer) to accept data.
n Emulation
22 4722, 9068
35 XL24/XL24E, 2391+
36 XL24/XL24E, 2391+

ESC j
Stops printing. (IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code ESC j n
Hexadecimal Value 1B 6A n
Decimal Value 27 106 n
This command stops the printer. The printer goes offline and BUSY signal is sent to the computer. To place
the printer online, press the ON LINE key.

ESC [ c
Send a device-dependent message to an ASCII printer. (IBM 4722, 9068)
ASCII Code ESC [ c l h c m d..dn
Hexadecimal Value 1B 5B 63 l h c m d..dn
Decimal Value 27 91 99 l h c m d..dn

The message command sends a device-dependent message to an ASCII printer, where:

MAN10240-01 A-53 Appendix A


Programmer Manual

l, h defines the number of message bytes: l + (h x 256)


c First byte of the message in a device-dependent format. It defines the printer component type:
2 = PRINT
3 = REMS
m Second byte of the message in a device-dependent format. It defines the type of message that is
contained in the rest of message bytes:
23 = Write to indicators
52 = Media positioning
79 = Set print speed

If the header information is not in the form described, or the message length is less than two, the printer
discards the message command.
Write to Indicators:
Message Behavior
Write indicators Lights/unlights the STATION 1 and STATION 2 leds.

Media positioning:
Message Behavior
Media positioning Positions the registered document to a specified position referring
to a physical position on the media (d/72 inch)
Set print speed:
Message Behavior
Set print speed No action

Miscellaneous

BEL
Buzzer. (IBM Proprinter XL24/XL24E, 2391+, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code BEL
Hexadecimal Value 07
Decimal Value 7

This code sounds the printer’s buzzer.

ESC BEL
Buzzer. (IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570)
ASCII Code ESC BEL
Hexadecimal Value 1B 07
Decimal Value 27 7

This code sounds the printer’s buzzer.

MAN10240-01 A-54 Appendix A


Programmer Manual

BS
Print and space back one position.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
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.

ESC BS
Print and space back one position.
(IBM Proprinter XL24/XL24E, 2391+, EPSON LQ1050/570)
ASCII Code ESC BS
Hexadecimal Value 1B 08
Decimal Value 27 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.

ESC @
Initializes the printer. (EPSON LQ1050/570)
ASCII Code ESC @
Hexadecimal Value 1B 40
Decimal Value 27 64

This sequence causes the printer to be initialized. This command, inserted in the input buffer, will be
executed during data processing, so that data preceding this command will be printed according to the
previous setting. It causes the printer:
o to go back to the current printer setup settings
o to cancel any print attributes selected
o to initialize the printer carriage
o to reset the column counter
o to clear all vertical tabulations

Only the selection of Draft/Quality printing, DDL and the selected character generator are maintained.

ESC [ K
Sets initial conditions. ((IBM Proprinter XL24/XL24E, 2391+)
ASCII Code ESC [ K l h init id p1 p2
Hexadecimal Value 1B 5B 4B l h init id p1 p2
Decimal Value 27 91 75 l h init id p1 p2

This command causes the printer to reset to its initial status:


l,h Defines the number of parameter bytes l + (h x 256).
The number of byte have a value from 1 to 4.
init The init parameter specifies to which condition the printer should initialize, normally init =
0,1,4,5,254,255:

MAN10240-01 A-55 Appendix A


Programmer Manual

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 parameter changes, if any, and store in working RAM; the
data stored in the macro’s non-volatile RAM will not be affected.
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 parameter changes, if any, and store in working RAM; the data
stored in the macro’s non-volatile RAM will not be affected.
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 parameter changes, if any, and store in working RAM; the data
stored in the macro’s non-volatile RAM will not be affected.
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 in working RAM and in the selected macro.
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 The id parameter specifies the printer for which the following parameter bytes are intended. If
the ID does not address your printer (i.e. 0), the mode bytes that follow are ignored.
The ID values are: 3 (hex 03), 22 (hex 16) , 35 (hex 23), 36 (hex 24).

p1 Specifies the following functions:


Bit Not 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

MAN10240-01 A-56 Appendix A


Programmer Manual

p2 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 max horizontal width 8 inch
0 Reserved

ESC U
Sets printing direction.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON LQ1050/570, HPR4915)
ASCII Code ESC U n
Hexadecimal Value 1B 55 n
Decimal Value 27 85 n
Selects bi-directional or unidirectional printing, according to the parameters below:
n Direction
0 bi-directional printing
1 unidirectional (left to right) printing
Unidirectional printing provides better alignment of vertical lines while bi-directional printing is faster.

MAN10240-01 A-57 Appendix A


Programmer Manual

This page is intentionally left blank

MAN10240-01 A-58 Appendix A


Programmer Manual

Appendix B - Compuprint Native Commands

Summary in Alphabetical Order.............................B-2


COMPUPRINT Mode Commands Description ......B-3
Format Control ......................................................B-3
Native Character Sets ...........................................B-4
Bar Codes .............................................................B-5
Bar Code Description ............................................B-7
Miscellaneous......................................................B-18

MAN10240-01 B-1 Appendix B


Programmer Manual

COMPUPRINT Mode Commands

This printer according to the Native COMPUPRINT Mode supports the following printer commands.

Summary in Alphabetical Order

Command Command Description Page


DC4 DC4 ESC ! Bar Code Selection B-5
DC4 DC4 ESC (GS Prints bar code symbols (Compuprint) B-13
DC4 DC4 ESC @ Re-initializes the printer. (Compuprint) B-18
DC4 DC4 ESC ? Reads bar code symbols (Compuprint) B-22
DC4 DC4 ESC ? Reads code bar (Compuprint) B-17
DC4 DC4 ESC 3 1 Sets vertical spacing 12 lines/30 mm. (Compuprint) B-3
DC4 DC4 ESC 3 3 Sets vertical spacing to 3 lines/30 mm. (Compuprint) B-3
DC4 DC4 ESC 3 4 Sets vertical spacing 4 lines/30 mm. (Compuprint) B-3
DC4 DC4 ESC 3 6 Sets vertical spacing 6 lines/30 mm. (Compuprint) B-3
DC4 DC4 ESC 3 8 Sets vertical spacing 8 lines/30 mm. (Compuprint) B-3
DC4 DC4 ESC A Sets the horizontal spacing to 15, 17, 20, 24 CPI. (Compuprint) B-4
DC4 DC4 ESC DC4 Printer functions. B-18
DC4 DC4 ESC g Selects LQ fonts (Compuprint). B-4
DC4 DC4 ESC r Digit rotation. (Compuprint) B-18
DC4 DC4 ESC S Selects character set ISO Character Sets or Code Pages. B-4
(Compuprint)
DC4 DC4 ESC u Selects the program setups. (Compuprint) B-19
DC4 DC4 ESC VT Search for a blank line (without any marker) - (Compuprint) B-20
DC4 DC4 ESC W Page Rotation B-20
DC4 DC4 ESC X Reads the id of the cut sheets. (Compuprint) B-19
DC4 DC4 ESC Y Selects emulation. (Compuprint) B-19

MAN10240-01 B-2 Appendix B


Programmer Manual

COMPUPRINT Mode Commands Description

Format Control

DC4 DC4 ESC 3 1


Sets vertical spacing 12 lines/30 mm. (Compuprint)
ASCII Code DC4 DC4 ESC 3 1
Hexadecimal Value 14 14 1B 33 31
Decimal Value 20 20 27 51 49

This command sets vertical spacing to 12 lines per 30 mm.

DC4 DC4 ESC 3 3


Sets vertical spacing to 3 lines/30 mm. (Compuprint)
ASCII Code DC4 DC4 ESC 3 3
Hexadecimal Value 14 14 1B 33 33
Decimal Value 20 20 27 51 51

This command sets vertical spacing to 3 lines per 30 mm.

DC4 DC4 ESC 3 4


Sets vertical spacing 4 lines/30 mm. (Compuprint)
ASCII Code DC4 DC4 ESC 3 4
Hexadecimal Value 14 14 1B 33 34
Decimal Value 20 20 27 51 52

This command sets vertical spacing to 4 lines per 30 mm.

DC4 DC4 ESC 3 6


Sets vertical spacing 6 lines/30 mm. (Compuprint)
ASCII Code DC4 DC4 ESC 3 6
Hexadecimal Value 14 14 1B 33 36
Decimal Value 20 20 27 51 54

This command sets vertical spacing to 6 lines per 30 mm.

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 20 20 27 51 56

This command sets vertical spacing to 8 lines per 30 mm.

MAN10240-01 B-3 Appendix B


Programmer Manual

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 n
Decimal Value 20 20 27 65 n

This command sets the horizontal spacing specified by the n parameter:

n Spacing
4 15 cpi
5 17 cpi
6 20 cpi
7 24 cpi

Native Character Sets

DC4 DC4 ESC g


Selects LQ fonts (Compuprint).
ASCII Code DC4 DC4 ESC g n
Hexadecimal Value 14 14 1B 67 n
Decimal Value 20 20 27 103 n

n Setting
1 Gothic
2 Courier
3 Prestige
4 Script
5 OCR-B
6 OCR-A
7 Presentor
11 Boldface
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.

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 n
Decimal Value 20 20 27 83 n

n Character Set n Character Set


1 ISO 8859/1 Latin 1 135 CP864 Arabic
2 ISO 8859/2 Latin 2 136 TASS Cyrillic
3 ISO 8859/3 Latin 3 137 CP852 Eastern Europe
4 ISO 8859/4 Latin 4 138 CP876 OCR-A
5 ISO 8859/5 Latin/Cyrillic 139 CP877 OCR-B
6 ISO 8859/6 Latin/Arabic 140 CP855 Cyrillic
7 ISO 8859/7 Latin/Greek 141 CP866 Russian

MAN10240-01 B-4 Appendix B


Programmer Manual

n Character Set n Character Set


8 ISO 8859/8 Latin/Hebrew 142 GOST Cyrillic
9 ISO 8859/9 Latin 5 145 CP437G Greek
15 ISO 8859/15 Latin 9 146 CP853 Turkish
128 CP437 USA 147 CP857 Turkish
129 CP850 Multilingual 148 CP867 Turkish
130 CP860 Portugal 149 CP858 Euro PC Multil.
131 CP863 Canada/France 199 96 Greek
132 CP865 Denmark/Norway
133 CP851 Greek
134 CP862 Hebrew

Bar Codes

DC4 DC4 ESC !


Bar Code Selection
ASCII Code DC4 DC4 ESC ! h t f F r o q b s B S i EM
Hexadecimal Value 14 14 1B 21 h t f F r o q b s B S i EM
Decimal Value 20 20 27 33 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
16 Code 2 of 5 Bidirectional C25-BID

MAN10240-01 B-5 Appendix B


Programmer Manual

t Name

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 Special font for OCR-A o OCR-B bar codes according to the t value
3 Special font for OCR-A bar codes
4 Special font for OCR-B bar codes

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 character 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

MAN10240-01 B-6 Appendix B


Programmer Manual

Bar Code Description

EAN-8 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 digit 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.

EAN-13 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.

UPC-A 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.

UPC-E DC4 DC4 ESC! n 4 p EM


UPC-E bar code data fields contain numeric data only: question marks will be printed in
place of HRC string otherwise, if possible.

If 12-digit strings will be received within a DC4 DC4 ESC (... EM control sequence and o
check-digit option field is missing or takes values 0 or 2, the symbol is compressed as
received to an 8-digit string and encoded, even though this may affect its readability; if o
check digit option field takes values 1 or 3, the 12th digit is matched against the internally
generated check digit. The question marks will be printed in place of HRC string when
mismatch is found, if possible.

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 missing 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.

MAN10240-01 B-7 Appendix B


Programmer Manual

LEFT and RIGHT delimiters, the System-Digit and the Check-Digit will be printed as
descending bars to make a field to host a 6-digits HRC string 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.

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 matched versus the internally generated
check-digit an question 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 available algorithm 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.

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 check-digit 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.

MAN10240-01 B-8 Appendix B


Programmer Manual

CODE GP 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) by 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 possible, hence is the user task to provide 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.

C25-3BAR 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.

Code BCD 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.

Code 11 DC4 DC4 ESC ! n 14 p EM


CODE-11 bar code fields do not have a defined format length and contain data belonging
to the following character set: 0 1 2 3 4 5 6 7 8 9 -
Question marks will be printed in place of HRC string otherwise, if possible.
This bar-code type defines a variable WIDE/NARROW ratio. This bar code is printed at
1/180” horizontal and vertical graphical printing resolution, to ensure high readability rate.
Each digit encodation is separated from the next by a 1/90”-1/60 “, wide default
InterCharacter Gap.
CODE-11 has unique START/STOP character; the printer generates the couple related
to each symbol. It is visually interpreted by an OPEN TRIANGLE and will always appear
on the HRC string, because its size is usually varied to signify the number of check digits
being used in the particular symbol:
- SMALL open triangle means ONE check-digit
- LARGE open triangle means TWO check-digit
Due to this, f field is meaningless and always defaults to HRC string print.

MAN10240-01 B-9 Appendix B


Programmer Manual

MSI Plessey DC4 DC4 ESC ! n 13 p EM


MSI bar code data fields do not have a defined 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 value to o check-
digit option field, according to the following options:

0 Print the bar code symbol with no printer-


generated check digits
1 Print the bar code symbol with IBM 5 Print the bar code symbol with both
Modulus-10 check digit -generated by the check digits generated by the printer
printer and put at the end of the numeric and put at the end of the data. The 2nd
nd
string: this will be the 2 check digit, the check digit is IBM Modulus-10, the 1st
st
1 check digit is IBM Modulus-10 also. check digit is the complement to 11 of
NCR Modulus-11 algorithm applied to
the received string: if the modulus is 0
or 1 check digit is 0.
2 Print the bar code symbol with both 6 Print the bar code symbol with both
check digits generated by the printer and check digits generated by the printer
put at the end of the data. The 2nd check and put at the end of the data. The 2nd
digit is IBM Modulus-10; the 1st check check digit is IBM Modulus-10, the 1st
digit is IBM Modulus-10 also. check digit is the complement to 11 of
IBM Modulus-11 algorithm applied to
the received string: if the modulus is 0
or 1 check digit is 0.
3 Print the bar code symbol with both 7 Print the bar code symbol with both
check digits generated by the printer and check digits generated by the printer
put at the end of the data. The 2nd check and put at the end of the data. The 2nd
digit is IBM Modulus-10, the 1st check check digit is IBM Modulus-10, the 1st
digit is NCR Modulus-11: if modulus is check digit is the complement to 11 of
10, it is an error and question marks will NCR Modulus-11 algorithm applied to
be printed in place of HRC string, if the received string: if the modulus is 0
possible. or 1. It is an error and question marks
will be printed in place of HRC string, if
possible.
4 Print the bar code symbol with both 8 Print the bar code symbol with both
check digits generated by the printer and check digits generated by the printer
put at the end of the data. The 2nd check and put at the end of the data. The 2nd
digit is IBM Modulus-10, the 1st check check digit is IBM Modulus-10, the 1st
digit is IBM Modulus-11: if modulus is 10, check digit is the complement to 11 of
it is an error and question marks will be IBM Modulus-11 algorithm applied to
printed in place of HRC string, if possible. 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.
The printer-generated second check digit does not show on required HRC string.

MAN10240-01 B-10 Appendix B


Programmer Manual

Code 11 DC4 DC4 ESC ! n 14 p EM


CODE-11 bar code fields do not have a defined format length and contain data belonging
to the following character set: 0 1 2 3 4 5 6 7 8 9 -
Question marks will be printed in place of HRC string otherwise, if possible.
This bar-code type defines a variable WIDE/NARROW ratio. This bar code is printed at
1/180” horizontal and vertical graphical printing resolution, to ensure high readability rate.
Each digit encodation is separated from the next by a 1/90”-1/60 “, wide default
InterCharacter Gap.
CODE-11 has unique START/STOP character; the printer generates the couple related
to each symbol. It is visually interpreted by an OPEN TRIANGLE and will always appear
on the HRC string, because its size is usually varied to signify the number of check digits
being used in the particular symbol:
- SMALL open triangle means ONE check-digit
- LARGE open triangle means TWO check-digit
Due to this, f field is meaningless and always defaults to HRC string print.

Code 93 DC4 DC4 ESC ! n 15 p EM


CODE-93 bar code fields do not have a defined format length and contain data belonging
to the standard ASCII character set including control codes.

Since GS and EM control codes used within COMPUPRINT DC4 DC4 ESC (... EM “Print
bar-code” control sequence are part of the supported character set, the host application
must SET THE HIGHER-ORDER BIT of the above control codes, to allow the printer
distinguish between encodable data and string terminators.

The complete ASCII standard character set is encoded by means of 47 combinations of 9


bar/space narrow elements arranged into 3 variable width bars with their adjacent
variable width spaces: each of the bars in the supported combinations can be 1, 2 or 3
modules wide. The START/STOP character has a 4-module wide bar. CODE-93 directly
implements the basic subset shown below:

0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z- .SPACES $ /
+%

($) (%) (/) (+) (as special control characters)

# (as unique START/STOP character)

The other STANDARD-ASCII codes not presented above will be represented by means
of a combination of one control character in the above set followed by a symbol in the
alphabetical set. The HRC string is printed BELOW the symbol when f field is set to 1,
without check digits: ASCII non-printable characters are represented in the “control code”
format (e.g. CR is ^M, where "control” is represented as DARK-SQUARE symbol).

2 of 5 DC4 DC4 ESC! n 16 p EM


Bidirectional
BID-25 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 will be added to
the encoded string, that however will not show on the required HRC string.

MAN10240-01 B-11 Appendix B


Programmer Manual

2 of 5 DC4 DC4 ESC! n 17 p EM


Interleaved
The 2/5-INTERLEAVED bar code does not have a defined format length. However, the
total sum of the characters must be even. n indicates the bar code height 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.

2 of 5 DC4 DC4 ESC ! n 18 p EM


Industrial
The 2/5 INDUSTRIAL bar code. Data format length is variable and the supported
character set only provides ASCII numeric figures 0 to 9. N indicates the bar code height
in units of 1/6 inch and must be in the range 1 to 12. The parameter 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.

2 of 5 Matrix DC4 DC4 ESC ! n 19 p EM


The 2/5 MATRIX bar code. Data format length is variable and the supported character
set only provides ASCII numeric figures 0 to 9. N indicates the bar code height in units of
1/6 inch and must be in the range 1 to 12. The parameter 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.

Code 39 DC4 DC4 ESC ! n 20 p EM


The CODE 39 bar code. Data format length is variable and must always start and end
with an asterisk. It can contain the alphanumeric character listed below:

0 1 2 3 4 5 6 7 8 9

ABCDEFGHIJKLMNOPQRSTUVWXYZ -. SPACE $ / + % * (
as start / stop character)

The parameter indicates the bar code height in units of 1/6 inch and must be in the range
1 to 12. The p parameter must be NUL (hex. 00) if no Human Readable Characters are to
be printed, and 1 (hex. 01) if they are to be printed.

CODABAR DC4 DC4 ESC! n 22 p EM


The Codabar bar code data fields do not have a defined format length and contain data
belonging to the character set listed hereafter:

0 1 2 3 4 5 6 7 8 9 - $: /. +

A B C D E N T * a b c d e n t (only as START/STOP characters)

The printer allows any combination of START/STOP characters. If the first and last
characters of the received string do not belong to the START/STOP characters subset,
question marks will be printed in place of HRC string, if possible.

MAN10240-01 B-12 Appendix B


Programmer Manual

CODE 128 DC4 DC4 ESC ! n 23 p EM


The CODE-128 bar code data fields do not have a defined format length and contain data
belonging to the standard ASCII character set, including control codes.

Since GS and EM control codes used within the Compuprint DC4 DC4 ESC (...EM ”Print
Bar Code” control sequence are part of the supported character set, the host application
must SET THE HIGHER-ORDER BIT of the above control codes to allow the printer
distinguish between encodable data and string terminators.

POSTNET DC4 DC4 ESC! n 24 p EM


The POSTNET bar code data fields contain only numeric data and do not have a defined
format length. POSTNET bar codes have no HRC string printed and the LOW/TALL bars
that encode the symbol comply with the U.S.P.S standard; whatever will be p field value.

DC4 DC4 ESC (GS


Prints bar code symbols (Compuprint)
ASCII Code DC4 DC4 ESC (GS n1 data GS n2 data ... EM
Hexadecimal Value 14 14 1B 28 1D n1 data ... 19
Decimal Value 20 20 27 40 29 n1 data... 25
Range 1 < n < 12
0<p<1
This sequence causes the bar code symbol to be printed according to the previous selection. If you want to
print more than one bar code symbol of the same type and height, GS n defines the distance from the
beginning of the line or between two bar code symbols in multiples of 1/72 inch. At the end of the line, EM
must close this command.

MAN10240-01 B-13 Appendix B


Programmer Manual

DC4 DC4 ESC ?


Reads bar code symbols (Compuprint)
ASCII Code DC4 DC4 ESC ? n1 n2 options x y w t1 … tn NUL o1 … on NUL
Hexadecimal Value 14 14 1B 3F n1 n2 options x y w t1 … tn 00 o1 … on 00
Decimal Value 20 20 27 63 n1 n2 options x y w t1 … tn 0 o1 … on 0
Range 0 < n1 < 23
n2 = 0

n1 1 to 23
n2 0
options bit 0x01 = 1 the barcode reading is performed vertically
0 the barcode reading is performed horizontally
bit 0x04 = 1 reading is performed in inverse direction, i.e. the horizontal reading is
performed from the right to the left and the vertical reading is performed from
the lower to the upper position
0 reading is performed in normal direction
bit 0x40 = 1 debug: the result of the decoding of the barcode will be sent together with the
vector of the values read by the reading sensor
bit 0x80 = 1 must always be 1

x Distance from the first print position in mm of the highest leftmost point to be scanned (in case of
cut sheets it is at 3 mm from paper margin)
y Distance of the upper paper/page margin of the highest leftmost point to be scanned
w Dimension of the scanning area including the clear area in mm
T1 … tn List of the recognized bar code types
0x11 128
0x01 3 of 9
0x0c 2 of 5 interleaved
0x19 2 of 5 IATA
If no bar code type is specified, they are all recognized.

o1 … o n Listing of the options. Each option is followed by the corresponding parameters. The options are:
0x01 Check digit
0 No check, the barcode string is returned as it is decoded
1 Check digit is checked: when the barcode is decoded, the printer checks that the
check digit, if present, is correct. If it is not, the barcode scanning is not valid.

0x02 Ratio of the dimensions between the defined large and the small bar, one parameter:
B Ratio multiplied by 10 (dimension of the large bar =
((b/10) * (B/10)) mm), where 20 < B < 40
0x03 Dimension of the small bar, one parameter:
b Dimension of the small bar in 1/100 mm, where 20 < b < 255
0x04 Dimension of the white space between a symbol and the following, one parameter
i Dimension of the white space in 1/100 mm, where 20 < i < 255
0x05 Dimension of the maximum retries in case the bar code was not read correctly, one
parameter: 0 < rn < 10
0x06 Offset from initial position, to be used in case of retry. One parameter:

MAN10240-01 B-14 Appendix B


Programmer Manual

rof 0, 2 < rof < 20. The offset is set in 1/10 mm. When using the horizontal
scanning, the offset will be used starting from the y position, when using the
vertical scanning, the offset will be used starting from the x position. For
example, for the horizontal scanning:
• The first retry is performed in position (y+1*(0,1*rof)) mm
• The second in position(y-1*(0,1*rof)) mm
• The third in position(y+2*(0,1*rof)) mm
• The fourth in position(y-2*(0,1*rof)) mm, etc.

All parameters, except the options parameter, are optional. If they are not specified, they are set to their
default values, which are the following:
x 10 mm
Y 10 mm
W 100 mm
t1…tn Empty list, all types are accepted
B 25
B 0, not defined
I 0, not defined
Rn 0
rof 2 / 10 mm

Due to the physical position of the sensor, the scanning of the bars can be performed with the following
horizontal position limitations:

CUT SHEET x The scanning area must be inside 19 cm from the left paper margin; the area may
extend to 205 cm, but in this case the reading of the bars depends on the position in
which the sheet is inserted.

The background of the scanning area must have a clear color, whereas the bars must have a dark color
(black, dark blue, etc.).

x+w
In case the horizontal scanning is performed normally:
y
between x,y and (x + w) , y

x w
In case the horizontal scanning is performed in inverse
direction:

between (x + w) , y and x,y

In case the vertical scanning is performed normally: x


y
between x,y and x , (y + w)
y+w
w
In case the vertical scanning is performed in inverse
direction:

between x , (y + w) and x,y

MAN10240-01 B-15 Appendix B


Programmer Manual

When the command is performed, the serial line sends the following message:

DC4 DC4 ESC ? n


DC4 DC4 ESC ? n t <string >
Where:
n length of decoded barcode string
t 0x00 =invalid type or not decoded barcode
0x01 code 39
0x0C code 2 of 5 interleaved
0x11 code 128
0x19 code 2 of 5 IATA
<string> decoded barcode (ASCII)

If invalid parameters are encountered, or the scanning area goes outside the logical page margins, n will
have the value 0. If the reading was not successful, n = 0 and the string will be composed of 10 "?"
characters.
If the debug flag (0x40) has been set, the described string is sent together with the vector of the values read
by the reading sensor with the following format:
CR LF
n…n CR LF where n…n is the number of readings performed by the sensor, in ASCII
CR LF format
1st scanning
1…1 CR LF where 1…1 is the first read value, in ASCII format
2…2 CR LF where 2…2 is the second read value, in ASCII format

N…N CR LF where N…N is the Nth read value, in ASCII format
CR LF
2nd scanning (if rn ≥ 1 )
1…1 CR LF where 1…1 is the first read value, in ASCII format
2…2 CR LF where 2…2 is the second read value, in ASCII format
………………………….
N…N CR LF where N…N is the Nth read value, in ASCII format
CR LF
Other scanning procedures (if necessary; rn > 1 )
………………………….

FF

MAN10240-01 B-16 Appendix B


Programmer Manual

Miscellaneous
DC4 DC4 ESC ?
Read Code Bar

ASCII Code DC4 DC4 ESC ? n1 n2 options n x y w pe thr


Hexadecimal Value 14 14 1B 3F n1 n2 options n x y w pe thr
Decimal Value 20 20 27 63 n1 n2 options n x y w pe thr
Range 0 < n1 < 23
n2 = 0

n1 5 to 7
n2 0
options bit 0x01 = 1 vertical scanning
0 horizontal scanning
bit 0x02 = 1 sync black bar present: the printer search the first bar starting <pe> 1/10 mm
before the position set by scanning mode, horizontal/vertical normal/reverse,
and <x> <y> parameters.
0 sync black bar absent or not used for synchronization: the first bar position is
set by scanning mode, horizontal/vertical normal/reverse, and <x> <y>
parameters.
bit 0x04 = 1 reverse scanning:
horizontal scanning from right to left
vertical scanning from bottom to top
0 normal scanning:
horizontal scanning from left to right
vertical scanning from top to bottom
bit 0x08 = 1 relative vertical position : from current baseline
0 absolute vertical position : from top paper edge

bit 0x10 = 1 The information takes a part of the bars width (<w> parameter)
<w> <w>

0 The information takes all the bars width (<w> parameter)

<w> <w>

bit 0x80 = 1 must always be 1


n number of bars ( max 32 )
x distance in mm of the top/left bar center from the first printing position (on
single sheet this position is 3 mm from the left paper edge)
w bars width in the scanning direction in 1/10 mm ( ≥ 20 )
pe maximum position error of sync black bar in the scanning direction in 1/10 mm
( 10 → 200 ); optional parameter valid only if bit 0x02 is set in <options>,
default value=10
thr Optional parameter: it defines the white percentage compared with the black
level (default 60%). To insert this parameter, <pe>must be defined.

MAN10240-01 B-17 Appendix B


Programmer Manual

In horizontal scanning the scanning area will be:


from ( x – ( w / 2 + pe )) to ( x + (( n – 1) * w ) + ( w / 2 + pe ))
In vertical scanning the scanning area will be:
from ( y – ( w / 2 + pe )) to ( y + (( n – 1) * w ) + ( w / 2 + pe ))

If bit 0x02 is set in <options> the sync bar will be searched :


• in normal horizontal scanning
from ( x – ( w / 2 + pe )) to ( x – ( w / 2 ) + pe )
• in normal verical scanning
from ( y – ( w / 2 + pe )) to ( y – ( w / 2 ) + pe )
• in reverse horizontal scanning
from ( x + (( n – 1) * w ) + ( w / 2 ) + pe ) to ( x + (( n – 1) * w ) + ( w / 2 ) – pe )
• in reverse vertical scanning
from ( y + (( n – 1) * w ) + ( w / 2 ) + pe ) to ( y + (( n – 1) * w ) + ( w / 2 ) – pe )

Due the sensor physical position there are some limits for the bars horizontal position:
SINGLE SHEET <x> or the scanning area must be at max 19 cm from the left paper edge; if the
paper is aligned on the left side of the printer this limit rises to 20,5 cm.

Bars background must be light and the bars must be dark ( black, blue, … ).

After the command execution the printer sends on the serial line the message
DC4 DC4 ESC ? n
<n> = ASCII 1 and 0 : 1 Æ dark bar, 0 Æ light bar.
If some error occurs the printer sends DC4 DC4 ESC ? followed by <n> 0.

DC4 DC4 ESC @


Re-initializes the printer. (Compuprint)
ASCII Code DC4 DC4 ESC @
Hexadecimal Value 14 14 1B 40
Decimal Value 20 20 27 64

This command resets the printer mode and clears the buffer of printable data.

DC4 DC4 ESC r


Digit rotation. (Compuprint)
ASCII Code DC4 DC4 ESC r
Hexadecimal Value 14 14 1B 72
Decimal Value 20 20 27 114

This command is used to set the required character rotation to be applied to the selected font.

n Selection
0 No rotation
1 No rotation
2 Rotation at 90°
3 Rotation at 180°
4 Rotation at 270°

MAN10240-01 B-18 Appendix B


Programmer Manual

DC4 DC4 ESC Y


Selects emulation. (Compuprint)
ASCII Code DC4 DC4 ESC Y n
Hexadecimal Value 14 14 1B 59 n
Decimal Value 20 20 27 89 n
Range
Selects the printer emulation type according to the n parameter value:

n Emulation
1 EPSON LQ 2550/1050
2 IBM Proprinter XL 24
4 IBM Proprinter XL 24AGM
5 IBM 2391
6 IBM 9068S01
7 IBM 9068/4722
8 PR2
9 PR40
10 PR2845

DC4 DC4 ESC u


Selects the program setups. (Compuprint)
ASCII Code DC4 DC4 ESC u n
Hexadecimal Value 14 14 1B 75 n
Decimal Value 20 20 27 117 n
Range 0 <n<4

n Selection
1 Selects program setup 1
2 Selects program setup 2

DC4 DC4 ESC X


Reads the id of the cut sheets. (Compuprint)
ASCII Code DC4 DC4 ESC X n x y l
Hexadecimal Value 14 14 1B 58 n x y l
Decimal Value 20 20 27 88 n x y l
This command reads the markers of the cut sheets.
n Number of markers. (1 < n < 32)
x Horizontal position from the center of the first marker in mm from the first prints position.
y Vertical position from the center of the markers in mm from the upper page margin.
l Distance between the markers in mm.

MAN10240-01 B-19 Appendix B


Programmer Manual

DC4 DC4 ESC W


Page Rotation. (Compuprint)

ASCII Code DC4 DC4 ESC W d x


Hexadecimal Value 14 14 1B 57 d x
Decimal Value 20 20 27 87 d x

d 1 bi-directional printing
2 mono-directional printing
x 0 measure document width
0 < x < 250 document width in number of columns at current CPI

The document must be inserted in counterclockwise mode.


The printing is forced in LQ.
It is possible rotate only pages with printable characters and CR and LF commands.
Any other command causes the rotated printing of the current contents of the print buffer and the SP40 is
restored in normal printing.

DC4 DC4 ESC VT


Search for a blank line (without any marker) - (Compuprint)
ASCII Code DC4 DC4 ESC VT o w
Hexadecimal Value 14 14 1B 0B o w
Decimal Value 20 20 27 11 o w
This command searches for a blank line.
o Send a reply on the serial interface
o = 1, send a reply
o = 0, do not send a reply
w Marker width in 1/120”

DC4 DC4 ESC DC4


Printer functions.
ASCII Code DC4 DC4 ESC DC4 n1 n2 function arguments
Hexadecimal Value 14 14 1B 14 n1 n2 function arguments
Decimal Value 20 20 27 20 n1 n2 function arguments

N = (n1) +256* (n2) the character number that composes the command (function character included).

function = the function that performs the command.


function Description

0x07 Selects Cut Sheet Eject Side

0x09 Sets Passbook Parameters


0x30÷0x3f Multifunction Commands
arguments = the different values of the function.

MAN10240-01 B-20 Appendix B


Programmer Manual

Function Description

0x07 DC4 DC4 ESC DC4 n1 n2 0x07 arguments


Selects the Cut Sheet Ejection Side.
n1, n2 : The n1 and n2 parameters specify the number of characters that composes the
command. n = 2
function: 0x07
arguments: side: 0 : cut sheet ejection towards the front
1 : cut sheet ejection towards the rear

0x09 DC4 DC4 ESC DC4 n1 n2 0x09 arguments


Set Passbook Parameters.
n1, n2 : The n1 and n2 parameters specify the number of characters that composes the
command. n = 2
function: 0x09
arguments: type: 0 x 00 : fixed thickness
0 x 01 : passbook with vertical fold
0 x 02 : passbook with horizontal fold

MAN10240-01 B-21 Appendix B


Programmer Manual

Multifunction Command Description

MICR pre-setting commands

Command Coding Parameter values


Retry ASCII: DC4 DC4 ESC DC4 n1 n2 0 r r = 0x01, 0x02, 0x03 (HEX values),
Hex: 14 14 1B 14 02 00 30 r
Space detection ASCII: DC4 DC4 ESC DC4 n1 n2 1 s s = 0x00 - OFF
Hex: 14 14 1B 14 02 00 31 s 0x01 - ON
Autimatic eject ASCII: DC4 DC4 ESC DC4 n1 n2 2 m m = 0x00 - OFF
Hex: 14 14 1B 14 02 00 32 m 0x01 - ON
Standard ASCII: DC4 DC4 ESC DC4 n1 n2 3 s s = 0x00 - CMC7 alphanumeric
Hex: 14 14 1B 14 02 00 33 s 0x01 - E13B
0x02 - CMC7 numeric only

MSRW pre-setting commands

Command Coding Parameter values


Density Bpi ASCII: DC4 DC4 ESC DC4 n1 n2 4 t t= 0x00 Type 1: 161 bpi
(Bourroughs only) Hex: 14 14 1B 14 02 00 36 t 0x01 Type2: 210 bpi

Retry ASCII: DC4 DC4 ESC DC4 n1 n2 6 r r = 0x01, 0x02, 0x03 (HEX values),
Hex: 14 14 1B 14 02 00 36 r
Standard ASCII: DC4 DC4 ESC DC4 n1 n2 7 s s = 0x00 - IBM 3604
Hex: 14 14 1B 14 02 00 37 s 0x01 - DIN/ISO
0x02 - ANSI
0x03 - BOURROUGHS
Duplicate ASCII: DC4 DC4 ESC DC4 n1 n2 8 d d = 0x00 - NO
Hex: 14 14 1B 14 02 00 38 d 0x01 - YES
Displacement ASCII: DC4 DC4 ESC DC4 n1 n2 9 p p = 0x00 - standard
Hex: 14 14 1B 14 02 00 39 p 0x01 - standard + 10 mm
0x02 - standard + 20 mm
End of Sentinel ASCII: DC4 DC4 ESC DC4 n1 n2 : s s = 0x00 - ‘F’
(IBM 3604 only) Hex: 14 14 1B 14 02 00 3A s 0x01 - ‘C’
Double field check ASCII: DC4 DC4 ESC DC4 n1 n2 ; c c = 0x00 - NO
Hex: 14 14 1B 14 02 00 3B c 0x01 - YES

Magnetic stripe read and write command

Command Coding Parameter values


Stripe read ASCII: DC4 DC4 ESC DC4 n1 n2 < R
Hex: 14 14 1B 14 02 00 3C 52

Read stripe ASCII: DC4 DC4 ESC DC4 < R Status: last read command status byte
returned status status string FS 0 – OK
Hex: 14 14 1B 14 02 00 3C 52 1-…
status string 1C 2 - … ( error codings to be reported )

string:
data read is converted in ASCII format and returned back to
the host as a string.
Not recognized data are replaced with DEL (0x7f )
In case of a void stripe reading a single DEL character is
returned.

MAN10240-01 B-22 Appendix B


Programmer Manual

Record and check ASCII: DC4 DC4 ESC DC4 n1 n2 < W string:
string ‘!’ ASCII simbols to be recorded according to the previously
Hex: 14 14 1B 14 02 00 3C 57 selected standard. The sequence is terminated by the ‘!’
string 21 symbols.

Recording ASCII: DC4 DC4 ESC DC4 < W Status: last recording command status byte
returned status status 0 – OK
Hex: 14 14 1B 14 02 00 3C 1-…
status 2 - … ( error codings to be reported )

MICR commands

Command Coding Parameter values


MICR read ASCII: DC4 DC4 ESC DC4 n1 n2 5 R
Hex: 14 14 1B 14 02 00 35 52
Coded string ASCII: DC4 DC4 ESC DC4 5 R Status: last read command status byte
returned status string FS 0 – OK
Hex: 14 14 1B 14 35 52 1-…
status string 1C 2 - … ( error codings to be reported )

string:
data read is converted in ASCII format and returned back to
the host as a string.
Not recognized data are replaced with DEL (0x7f )
In case of a void stripe reading a single DEL character is
returned.

Turn page commands

Comando Codifica Valori Parametri


Turn 1 page ASCII: DC4 DC4 ESC DC4 n1 n2 > F
forward Hex: 14 14 1B 14 02 00 3E 52

Turn 1 page ASCII: DC4 DC4 ESC DC4 n1 n2 > B


backward Hex: 14 14 1B 14 02 00 3E 42

Read page ASCII: DC4 DC4 ESC DC4 n1 n2 > R


identifier Hex: 14 14 1B 14 02 00 3E 52

Return page ASCII: DC4 DC4 ESC DC4 > R Status: last read command status byte
identifier status string FS 0 – OK
Hex: 14 14 1B 14 3E 52 1-…
status string 1C 2 - … ( error codings to be reported )

string:
data read is converted in ASCII format and returned back to
the host as a string.
Not recognized data are replaced with DEL (0x7f )
In case of a void stripe reading a single DEL character is
returned.

MAN10240-01 B-23 Appendix B


Programmer Manual

This page is intentionally left blank.

MAN10240-01 B-24 Appendix B


Programmer Manual

Appendix C – OLIVETTI Protocol Commands

OLIVETTI Mode Commands .....................C-2


Summary in Alphabetical Order .................C-2
OLIVETTI Mode Commands Description ..C-5
Page Layout................................................C-5
Print Pitches................................................C-7
Print Attributes ............................................C-8
Printer Operations ....................................C-12
Graphics ...................................................C-16
Customized Characters............................C-22
Printer Control...........................................C-25
Magnetic Device Control ..........................C-33
Bar Code Print ..........................................C-39

MAN10240-01 C-1 Appendix C


Programmer Manual

OLIVETTI Mode Commands


The Olivetti PR2 emulation is designed as a container of SW commands for managing all new performance,
characteristic of the models.
The Olivetti PR 2 command interpreter is based on the PR40+ emulation of which it maintains, for the
common part, all the characteristics. Moreover, in order to maintain the best possible level of compatibility
with PR40+ emulation, the default is constituted by 9 pin management. Native emulation can be recognized
by its own specific identifier.

Summary in Alphabetical Order


Command Command Description Page
BEL Bell. (Olivetti PR2, PR40+) C-16
BS Back space. (Olivetti PR2) C-13
CR Carriage return. (Olivetti PR2, PR40+, 2845) C-13
DEL Clear print memory. (Olivetti PR2, PR40+, 2845) C-16
ESC ' Set document type. (Olivetti PR2, PR40+, 2845) C-37
ESC - Measure document length. (Olivetti PR2, PR40+) C-38
ESC ! G n 9 or 24 pin graphics and DLL selection. (Olivetti PR2) C-39
ESC ! sp Add columns to right of character. (Olivetti PR2) C-10
ESC ! W 0 Cancel double height. (Olivetti PR2) C-10
ESC ! W 1 Double height. (Olivetti PR2) C-10
ESC # Assign reference for ESC L. (Olivetti PR2, PR40+) C-36
ESC & Elementary vertical spacing. (Olivetti PR2, PR40+) C-6
ESC ( Bold face. (Olivetti PR2, PR40+) C-11
ESC ) Cancel bold face. (Olivetti PR2, PR40+) C-11
ESC * Underline. (Olivetti PR2, PR40+) C-11
ESC . Select automatic operator booking mode. (Olivetti PR2, PR40+, 2845) C-32
ESC / Set absolute vertical position in elementary steps. (Olivetti PR2, PR40+) C-38
ESC / 7 Printer ID. (Olivetti PR2, PR40+, 2845) C-25
ESC : 000 Copy character generator into user memory. (Olivetti PR2, PR40+) C-25
ESC ? Proportional spacing. (Olivetti PR2, PR40+) C-8
ESC [ Select character set. (Olivetti PR2, PR40+) C-15
ESC \ Record and check magnetic stripe. (Olivetti PR2, PR40+, 2845) C-34
ESC ] Magnetic read of the passbook stripe. (Olivetti PR2, PR40+, 2845) C-33
ESC ^ 0 Change emulation. (Olivetti PR2, PR40+, 2845) C-15
ESC _ Select manual operator booking mode. (Olivetti PR2, PR40+, 2845) C-33
ESC ` Superscript - Subscript. (Olivetti PR2, PR40+) C-12
ESC { Cancel superscript subscript. (Olivetti PR2, PR40+) C-12
ESC | A Define offset in elementary steps. (Olivetti PR2, PR40+) C-37
ESC | B Define document width in elementary steps. (Olivetti PR2, PR40+) C-37
ESC } - Measure document width. (Olivetti PR2) C-38
ESC } r MICR magnetic read (Olivetti PR2, PR40+) C-36
ESC + Cancel underline. (Olivetti PR2, PR40+) C-11
ESC < Print pitch 10 cpi. (Olivetti PR2, PR40+, 2845) C-7

MAN10240-01 C-2 Appendix C


Programmer Manual

Command Command Description Page


ESC = Print pitch 12 cpi. (Olivetti PR2, PR40+, 2845) C-7
ESC > Print pitch 16.6 cpi. (Olivetti PR2, PR40+) C-7
ESC 0 General reset. (Olivetti PR2, PR40+) C-31
ESC 1 9 pin Bit Image Mode. (Olivetti PR2, PR40+) C-16
ESC 1 24 pin Bit Image Mode. (Olivetti PR2, PR40+) C-18
ESC 2 Reset Bit Image Mode. (Olivetti PR2, PR40+) C-21
ESC 3 Double width. (Olivetti PR2, PR40+, 2845) C-9
ESC 4 Cancel double width. (Olivetti PR2, PR40+, 2845) C-9
ESC 7 Line feed back. (Olivetti PR2, PR40+, 2845) C-13
ESC a Print Pitch. (Olivetti PR2) C-7
ESC B id m ESC Z Synchronous document status. (Olivetti PR2) C-29
ESC b idrel1;idver1; FW Release ID. (Olivetti PR2) C-30
........... idrel.n;idver.n
ESC Z
ESC d Double height and double width. (Olivetti PR2, PR40+) C-9
ESC e Cancel double height and double width. (Olivetti PR2, PR40+) C-9
ESC H Set absolute horizontal position. (Olivetti PR2, PR40+, 2845) C-14
ESC h 0 9 pin Downline Loading Characters into the User Memory (DLL). C-22
(Olivetti PR2, PR40+)
ESC h 0 24 pin Downline Loading Characters into the User Memory (DLL). C-23
(Olivetti PR2, PR40+)
ESC I Set relative vertical position. (Olivetti PR2, PR40+, 2845) C-14
ESC i Request for printer configuration. (Olivetti PR2, PR40+, 2845) C-26
ESC J Set left margin. (Olivetti PR2, PR40+, 2845) C-5
ESC j Status request. (Olivetti PR2, PR40+, 2845) C-27
ESC L Set absolute vertical position. (Olivetti PR2, PR40+, 2845) C-14
ESC l Resets the printer error status. (Olivetti PR2, PR40+, 2845) C-30
ESC M Define bottom of form "BOF". (Olivetti PR2, PR40+) C-6
ESC m n 0 Select character generator. (Olivetti PR2, PR40+) C-25
ESC n Olivetti controlled procedure selection. (Olivetti PR2, PR40+, 2845) C-30
ESC O Eject document. (Olivetti PR2, PR40+, 2845) C-15
ESC o Select free running mode. (Olivetti 2845) C-30
ESC p Printer configuration. (Olivetti PR2, PR40+, 2845) C-26
ESC Q n ESC Z Define document length. (Olivetti PR2, PR40+, 2845) C-5
ESC R Select graphic font. (Olivetti PR2, PR40+, 2845) C-8
ESC r Synchronous basic machine status. (Olivetti PR2, PR40+, 2845) C-27
ESC r Answer to book operator command. (Olivetti PR2, PR40+, 2845) C-32
ESC S Document length or width document: answer. (Olivetti PR2) C-39
ESC S 5 Select printer device. (Olivetti PR2, PR40+, 2845) C-12
ESC sp Add columns to right of character. (Olivetti PR2) C-11
ESC sp a Request for set-up configuration. (Olivetti PR2) C-30
ESC sp B Request for document status. (Olivetti PR2) C-29
ESC sp b Request for FW Release ID. (Olivetti PR2) C-29
ESC T Define top of form "TOF". (Olivetti PR2, PR40+) C-5
ESC t data GS Data to be recorded on the magnetic stripe. (Olivetti PR2, PR40+, 2845) C-34

MAN10240-01 C-3 Appendix C


Programmer Manual

Command Command Description Page


ESC U Book operator. (Olivetti PR2, PR40+, 2845) C-31
ESC V Switch operator panel LED on or off. (Olivetti 2845) C-31
ESC W Partially eject document. (Olivetti 2845) C-15
ESC W 0 Cancel double height. (Olivetti PR2) C-10
ESC W 1 Double height. (Olivetti PR2) C-10
ESC X Set Relative Horizontal Position. (Olivetti PR2, PR40+) C-21
ESC x mm; hh; zz; n Set Bar Code Print. (Olivetti PR2) C-40
ESC Z
ESC y ... data ... Enable bar code printing. (Olivetti PR2) C-41
ESC Z
ESC Y B Set MICR magnetic read (Olivetti PR2, PR40+) C-34
ESC Y E Set horizontal magnetic device. (Olivetti PR2, PR40+) C-35
ESC Z Request for primary ID. (Olivetti PR2, PR40+, 2845) C-25
FF Form Feed (rear ejection). (Olivetti PR2, PR40+) C-13
LF Line feed forward. (Olivetti PR2, PR40+, 2845) C-12

MAN10240-01 C-4 Appendix C


Programmer Manual

OLIVETTI Mode Commands Description

Page Layout

ESC Q n ESC Z
Define document length. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC Q n ESC Z
Hexadecimal Value 1B 51 n 1B 5A
Decimal Value 27 81 n 1B 90

Defines the length of the document to be used in place of the one defined previously.
The decimal value of n defines the total length of the document as the number of line feeds in the currently
selected value.
The parameter n may vary in length from 1 to 3 numeric characters.
The command is not accepted (command specification error) if:
• The document length is less than 70 mm or greater than 500 mm.
• Parameter n is greater than 255.
• It is sent with a document present on the paper stand.
• It is sent inside a printing field.

ESC J
Set left margin. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC J n
Hexadecimal Value 1B 4A n
Decimal Value 27 74 n

Sets the current position of the left margin of the print line with respect to the edge of the paper or the margin
set using ESC | A n. This position depends on the type of print pitch selected (double width is considered as
normal spacing).
The decimal value of n defines, as an absolute value, the position of the left margin, which will coincide with
the first printing position of each line. This position is assigned the value 001 and becomes the reference
point for all horizontal positioning commands.
If n is equal to 000, the left margin will be set at the edge of the paper or at the margin set using ESC | A n.
If the value of n exceeds the length of line-1, the edge of the paper or the margin set using ESC | A n will be
set.
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• Parameter n is greater than 255.

ESC T
Define top of form "TOF". (Olivetti PR2, PR40+)
ASCII Code ESC T n
Hexadecimal Value 1B 54 n
Decimal Value 27 84 n

Defines, in n/216", the top of form starting from the top edge of the document.

MAN10240-01 C-5 Appendix C


Programmer Manual

The command is not accepted (command specification error) if:


• The value of n is less than the mechanical top margin (defined during setting)
• It is sent with a document present on the paper stand.
• It is sent inside a printing field.

ESC M
Define bottom of form "BOF". (Olivetti PR2, PR40+)
ASCII Code ESC M n
Hexadecimal Value 1B 4D n
Decimal Value 27 77 n

Defines the length of the bottom of form, that is, the area at the bottom of the form in which you do not want
to print, replacing the value defined previously.
The decimal value of n defines the length of the bottom of the form, as a number of line feeds of the currently
selected value. No check is made to ensure that the form length and bottom of form values are compatible
with one another.
If parameter n is set to any value between 000 and 999, the default value (4.23 mm) is set. The command is
not accepted (command specification error) if:
• It is sent with a document present on the paper stand.
• It is sent inside a printing field.

ESC &
Elementary vertical spacing. (Olivetti PR2, PR40+)
ASCII Code ESC M n
Hexadecimal Value 1B 26 n
Decimal Value 27 38 n

Defines the new line feed value, expressed in n elementary steps, without recalculating the form length and
the BOF. The value of the elementary step is expressed in n/216".
When n is equal to 00, the default value (1/6") is set.
The command is not accepted (command specification error) if it is sent inside a printing field.

MAN10240-01 C-6 Appendix C


Programmer Manual

Print Pitches

ESC <
Print pitch 10 cpi. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC <
Hexadecimal Value 1B 3C
Decimal Value 27 60

Sets the print pitch to 10 cpi (characters per inch) starting from the current position. It is not a printing
command and can be inserted in a printing field.

ESC =
Print pitch 12 cpi. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC =
Hexadecimal Value 1B 3D
Decimal Value 27 61

Sets the print pitch to 12 cpi starting from the current position. It is not a printing command and can be
included in a printing field. The command is not accepted if it is sent with the OCR-A or B Font selected, as
these fonts do not accept any attribute or print pitch changes.

ESC >
Print pitch 16.6 cpi. (Olivetti PR2, PR40+)
ASCII Code ESC >
Hexadecimal Value 1B 3E
Decimal Value 27 62

Sets the print pitch to 16.6 cpi starting from the current position. It is not a printing command and can be
included in a printing field. The command is not accepted if it is sent with the OCR-A or B Font selected, as
these fonts do not accept any attribute or print pitch changes.

ESC a
Print Pitch. (Olivetti PR2)
ASCII Code ESC a n
Hexadecimal Value 1B 61 n
Decimal Value 27 97 n

Sets the print pitch defined by parameter n starting from the current position.

n Print Pitch
0 Default
1 10 cpi
2 12 cpi
3 15 cpi
4 16.6 cpi
8 17.1 cpi

MAN10240-01 C-7 Appendix C


Programmer Manual

It is not a printing command and can be included in a printing field. The command is not accepted if:
• it is sent with parameter n not set to 1
• with the OCR-A or B Fonts selected as these fonts do not accept any attribute or print pitch changes.

ESC ?
Proportional spacing. (Olivetti PR2, PR40+)
ASCII Code ESC ?
Hexadecimal Value 1B 3F
Decimal Value 27 63

Sets proportional spacing starting from the current position at a print pitch of 10 cpi. It is not a printing
command and can be included in a printing field.
The command is not accepted if it is sent with the OCR-A or B Font selected, as these these fonts do not
accept any attribute or print pitch changes.

Print Attributes

ESC R
Select graphic font. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC R n
Hexadecimal Value 1B 52 n
Decimal Value 27 82 n

Sets the graphic font that will be used starting from the current position.

n Font n Font
000 Default 009 OCR-B
001 HSD 010 OCR-A
002 Draft 015 VHSD
003 NLQ1 017 LQ2
014 NLQ2 018 Italics NLQ1
006 NLQ2 Italics 020 Italics LQ2
007 Draft Italics

The OCR-A font can only be selected with the following character sets:
010 International 070 Italy
020 Germany 080 Sweden/Finland
030 Portugal 090 Switzerland
040 Spain 100 United Kingdom
050 Denmark/Norway 110 U.S.A.
060 France

MAN10240-01 C-8 Appendix C


Programmer Manual

The OCR-B font can only be selected with the following character sets:
010 International 070 Italy
020 Germany 080 Sweden/Finland
030 Portugal 090 Switzerland
040 Spain 100 United Kingdom
050 Denmark/Norway 110 U.S.A.
060 France 200 Yugoslavia
The command is not accepted if it is sent inside a printing field.

ESC 3
Double width. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC 3
Hexadecimal Value 1B 33
Decimal Value 27 51

Sets the printing of double-width characters starting from the current position. Each character is printed twice
its normal width and occupies two printing positions.
This setting remains active until the relevant cancellation command is received. The command is not
accepted if it is sent with the OCR-A or B font selected.

ESC 4
Cancel double width. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC 4
Hexadecimal Value 1B 34
Decimal Value 27 52

Cancels the double width setting starting from the current position.

ESC d
Double height and double width. (Olivetti PR2, PR40+)
ASCII Code ESC d
Hexadecimal Value 1B 64
Decimal Value 27 100

Sets double height and double width printing in NLQ starting from the current position. It has no effect on
vertical positioning commands, which continue to work on the basis of the current line feed value.
The command is not accepted (command specification error) if it is sent with superscript or subscript
enabled.
• It is sent with the OCR-A or B Font selected.
• It is sent with a document positioned at the first printing line.
• It is sent inside a printing field.

ESC e
Cancel double height and double width. (Olivetti PR2, PR40+)
ASCII Code ESC e
Hexadecimal Value 1B 65
Decimal Value 27 101

MAN10240-01 C-9 Appendix C


Programmer Manual

Cancels the double height setting starting from the current position. As the double height setting also
activates double width, canceling the former feature also cancels the latter, unless the latter was set
previously using ESC 3.
The command is not accepted if it is sent inside a printing field.

ESC ! W 1
Double height. (Olivetti PR2)
ASCII Code ESC ! W 1
Hexadecimal Value 1B 21 57 31
Decimal Value 27 33 87 49

Sets the printing of double height characters starting from the current position. The print pitch is not
changed. This setting remains active until the relevant cancellation command is received.
The command is not accepted if it is sent with the OCR-A or B Font selected.

ESC W 1
Double height. (Olivetti PR2)
ASCII Code ESC W 1
Hexadecimal Value 1B 57 31
Decimal Value 27 87 49

See description of the ESC ! W 1 command above.

ESC ! W 0
Cancel double height. (Olivetti PR2)
ASCII Code ESC ! W
Hexadecimal Value 1B 21 57 30
Decimal Value 27 33 87 48

Cancels the double height setting starting from the current position. The print pitch is not changed.

ESC W 0
Cancel double height. (Olivetti PR2)
ASCII Code ESC ! W
Hexadecimal Value 1B 21 57 30
Decimal Value 27 33 87 48

See description of the ESC ! W 0 command above.

ESC ! sp
Add columns to right of character. (Olivetti PR2)
ASCII Code ESC ! sp m
Hexadecimal Value 1B 21 20 m
Decimal Value 27 33 32 m

This command may be used to add to the current print pitch a number m of columns expressed in n/120"
(with n = 001-255D). If, after defining the interspace, the print of the nth character is outside the right logic
margin (90 characters at 10 cpi), the print will generate “command specification error”.
The command is not accepted (command specification error) if it is sent when current print pitch is
proportional.

MAN10240-01 C-10 Appendix C


Programmer Manual

ESC sp
Add columns to right of character. (Olivetti PR2)
ASCII Code ESC sp m
Hexadecimal Value 1B 20 m
Decimal Value 27 32 m

See description of the ESC ! sp command above..


ESC (
Bold face. (Olivetti PR2, PR40+)
ASCII Code ESC (
Hexadecimal Value 1B 28
Decimal Value 27 40

Sets bold face printing starting from the current position. The command is not accepted if it is sent with the
OCR-A or B Font selected.

ESC )
Cancel bold face. (Olivetti PR2, PR40+)
ASCII Code ESC )
Hexadecimal Value 1B 29
Decimal Value 27 41

Cancels the bold face setting starting from the current position.

ESC *
Underline. (Olivetti PR2, PR40+)
ASCII Code ESC * n
Hexadecimal Value 1B 2A n
Decimal Value 27 42 n

Sets underlined printing starting from the current position and remains active until a cancellation command is
received. Parameter n defines the type of underline, which can be set to the following values:
n Setting
0 Normal underline
3 Overline
4 Over and underline

The command is not accepted if it is sent with the OCR-A or B Font selected, or the parameter n is set to
any value other than those values mentioned above.

ESC +
Cancel underline. (Olivetti PR2, PR40+)
ASCII Code ESC +
Hexadecimal Value 1B 2B
Decimal Value 27 43

Cancels the underline setting starting from the current position.

MAN10240-01 C-11 Appendix C


Programmer Manual

ESC `
Superscript - Subscript. (Olivetti PR2, PR40+)
ASCII Code ESC `n
Hexadecimal Value 1B 60 n
Decimal Value 27 96 n

Sets superscript or subscript printing, defined by parameter n, starting from the current position, and remains
active until a cancellation command is received.
If double height printing has been set, the command is interpreted but has no effect on printing until double
height printing is cancelled.

n Type
0 Superscript
1 Subscript

The command is not accepted if:


• It is sent with the OCR-A or B Font selected, in that these fonts do not accept any attribute or print pitch
changes.
• It is sent with parameter n equal to any value other than those indicated above.

ESC {
Cancel superscript subscript. (Olivetti PR2, PR40+)
ASCII Code ESC {
Hexadecimal Value 1B 7B
Decimal Value 27 123

Cancels the superscript/subscript setting starting from the current position.

Printer Operations

ESC S 5
Select printer device. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC S 5
Hexadecimal Value 1B 53 35
Decimal Value 27 83 53

Selects the front paper stand feeder, the only device present. Documents managed by the Horizontal
Magnetic and MICR reader devices (where present) are also handled by the front paper stand.

LF
Line feed forward. (Olivetti PR2, PR40+, 2845)
ASCII Code LF
Hexadecimal Value 0A
Decimal Value 10

Prints the current line and executes a line feed of a value determined by the vertical spacing selected.

MAN10240-01 C-12 Appendix C


Programmer Manual

If the LF+CR feature has been selected in the printer Set-Up, the printing position is set at the left margin.
The command is not accepted if:
• the new position lies in the bottom of form area or off the form (the line is printed).
• It is sent without a document inserted.

FF
Form Feed (rear ejection). (Olivetti PR2, PR40+)
ASCII Code FF
Hexadecimal Value 0C
Decimal Value 12

Prints the current line and ejects the document from the rear of the printer.
If the LF+CR feature has been selected in the printer Set-Up, the printing position is set at the left margin. If
there is no document present, it is ignored.

CR
Carriage return. (Olivetti PR2, PR40+, 2845)
ASCII Code CR
Hexadecimal Value 0D
Decimal Value 13

Prints the current line and sets the printing position at the left margin.

BS
Back space. (Olivetti PR2)
ASCII Code BS
Hexadecimal Value 08
Decimal Value 8

This command repositions a character backward with current print pitch. If the command is sent in zero
column, it is ignored.
The command generates command specification errors if the command is sent with no characters to print.

ESC 7
Line feed back. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC 7
Hexadecimal Value 1B 37
Decimal Value 27 55

Prints the current line and executes a back line feed according to the selected vertical spacing.
If the LF+CR feature has been selected in the printer Set-Up, the printing position is set at the left margin.
The command is not accepted if:
• The print line is the first on the form (the line is printed).
• Sent without a document inserted.

MAN10240-01 C-13 Appendix C


Programmer Manual

ESC H
Set absolute horizontal position. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC H n
Hexadecimal Value 1B 48 n
Decimal Value 27 72 n

Moves the current position, from wherever it is, to character position n of the current line.
This position depends on the selected print pitch; the decimal value of n defines, as an absolute value, the
new current position with respect to the start of the line to which the decimal value 1 is to be assigned.
If the value n moves the current position beyond the end of the line, it prints the current line, executes a line
feed and moves the current position to the start of the new line.
If the value n moves the current position back with respect to the current value, it prints without executing
line feeds and moves the current position to the value indicated.
The command opens a printing field. If parameter n is set to 0, it moves the current position to 1.

ESC I
Set relative vertical position. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC I n
Hexadecimal Value 1B 49 n
Decimal Value 27 73 n

Prints the current line and feeds the form n line feeds; the actual value of this movement depends on the
selected vertical spacing. If the LF+CR feature has been selected in the printer Set-Up, the printing position
is set at the left margin.
The decimal value n defines the vertical increment, as a number of line feeds, to be carried out in order to
reach the new current position. If parameter n is set to 0, the document is printed but no paper movement is
performed.
The command is not accepted (command specification error) if:
• The new position lies in the bottom of form or off the form (the line is printed).
• Sent without a document inserted.

ESC L
Set absolute vertical position. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC L n
Hexadecimal Value 1B 4C n
Decimal Value 27 76 n

Prints the current line and feeds the form to the line specified by n; the actual value of this movement
depends on the selected vertical spacing.
If the LF+CR feature has been selected in the printer Set-Up, the printing position is set at the left margin.
The decimal value n defines, as a number of line feeds, the value of the new current line with respect to the
start of the printing area.
If the document is not inserted, the printer feeds it in and positions it at the line indicated by n. If parameter n
is equal to 0, the document is positioned on the first printing line (TOF or Mechanical top margin).
The command is not accepted (command specification error) if:
• The new position lies in the bottom of form, in the top of form or off the form (the line is printed)
• The length of the document has not yet been defined (ESC Q...ESC Z).

MAN10240-01 C-14 Appendix C


Programmer Manual

ESC O
Eject document. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC O
Hexadecimal Value 1B 4F
Decimal Value 27 79

Prints the current print line and ejects the document on the front slot. If the LF+CR feature has been selected
in the printer Set-Up, the printing position is set at the left margin.
If there is no document inserted, the document ejection movement is carried out in any case, without causing
any error to be indicated.

ESC W
Partially eject document. (Olivetti 2845)
ASCII Code ESC W
Hexadecimal Value 1B 57
Decimal Value 27 84

This command is present for compatibility with the past, but has no function on your printer (ignored).

ESC ^ 0
Change emulation. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC ^ 0
Hexadecimal Value 1B 5E 30
Decimal Value 27 94 48

Selects "IBM Emulation".


If sent with the machine in local, it is executed when the printer leaves local mode.

ESC [
Select character set. (Olivetti PR2, PR40+)
ASCII Code ESC [ n
Hexadecimal Value 1B 5B n
Decimal Value 27 91 n

Identifies the symbol set from which the characters to be printed are taken.
Parameter n may be set to any of the following values:
n Symbol set - Olivetti n Symbol set - IBM/PC
000 International 600 ISO 8856/1 Latin 1
010 International 602 ISO 8856/9 Latin 5
020 Germany 605 ISO 8856/2 Latin 2
030 Portugal 620 ISO 8856/6 Latin Arabic
040 Spain 1 623 ISO 8856/7 Greek
050 Denmark/Norway 625 ISO 8856/8 Hebrew
060 France 680 OLI-UNIX
070 Italy 700 PC-437 International
080 Sweden/Finland 701 PC-220 Spain 2
090 Switzerland 710 PC-865 Nordic
100 Great Britain 711 PC-Denmark/Norway
110 USA ASCII 712 PC-Denmark OPE

MAN10240-01 C-15 Appendix C


Programmer Manual

n Symbol set - Olivetti n Symbol set - IBM/PC


140 Greece ** 720 PC-860 Portugal
150 Israel ** 730 PC-863 Canadian/French
170 Spain 2 ** 740 PC-850 Latin1
200 Yugoslavia * 750 PC-852 Latin 2
410 Olivetti TCV 370 ** 770 PC-851 Greek
510 SDC ** 771 PC-210 Greek
520 Turkey ** 780 PC-855 Cyrillic
540 CIBC 781 PC-862 Hebrew
782 PC-864 Arabic
783 PC-866 Cyrillic

The command is not accepted (command specification error) if:


• A PC set is chosen with the OCR-A or B Font selected.
• One of the Olivetti sets followed in the table by at least one " * " is selected, when the OCR-A font is
selected.
• One of the Olivetti sets followed in the table by two " * " characters is selected, when the OCR-B font
is
• selected.
BEL
Bell. (Olivetti PR2, PR40+)
ASCII Code BEL
Hexadecimal Value 07
Decimal Value 7

Rings a bell to attract the operator’s attention.

DEL
Clear print memory. (Olivetti PR2, PR40+, 2845)
ASCII Code DEL
Hexadecimal Value 7F
Decimal Value 127

Clears the print buffer and the commands it contains.


Cancels the ESC sequence containing it.

Graphics

ESC 1
9 pin Bit Image Mode. (Olivetti PR2, PR40+)
ASCII Code ESC 1 p m n
Hexadecimal Value 1B 31 p m n
Decimal Value 27 49 p m n

Sets the machine to print in 9 pin Bit Image Mode. The type of graphic print, 9 pin or 24 pin, is selected with
the ESC ! G n command. The bits of parameter p identify the print modes selected:

MAN10240-01 C-16 Appendix C


Programmer Manual

b8: = 0 fixed
b7: = 1 fixed
b6: = 0 fixed
b5: = 0 fixed
b4: = 0 fixed
b3: = 0 Print in positive
=1 Print in negative
b2: = 0 parameter m does not follow
=1 parameter m follows
b1: = 0 parameter n does not follow
=1 parameter n follows

Printing in positive prints a dot when the bit received is equal to 1 and does not print when it is equal to 0,
while printing in negative does the exact opposite. The decimal value of parameter m defines the length of
the print line, expressed as a number of dots.

If the parameter is set to 0 or is not present, the default value is set, that is, the maximum number of dots
that can be printed per line at the density selected, minus any left margin value.
The decimal value of parameter n defines, in elementary steps, the horizontal distance at which two
consecutive dots can be printed. If the parameter is set to 0 or is not present, the default value (180 dpi) is
set. The accepted values of parameter n are:
n Dot density
0 180 dpi
1 240 dpi
2 120 dpi
3 80 dpi
4 60 dpi
When the command is received, the printer sets the 24/180" line feed value, which corresponds to the
movement of the paper by an amount such that the consecutive vertical dots are printed equidistantly.
The parameter consistency checks and the default values must be calculated on the basis of the following
equation:
b-c
a = 
d*e

where: a = Maximum length of print line (number of dots).


b = Maximum length of printing area (in n/360").
c = Left margin (in n/240").
d = Value of parameter n.
e = Value of elementary step(1/240").

The command is not accepted (command specification error) if:


• It is sent inside a printing field.
• Parameter m is greater than the length of the print line.
• Parameter n has any value other than those specified.
• Unrecognized functions are sent inside the data field.

MAN10240-01 C-17 Appendix C


Programmer Manual

When a quantity of data which, in terms of dots, exceeds the length of the printing line defined by parameter
m, the data is printed automatically and a line feed is executed. The printer waits for a CR or LF command, if
the amount of data left is less than the length of the line.

Codes handled as data


All codes with a hexadecimal value of between 00 and FF are treated as data, with the exception of code 1B
(ESC), which must be repeated (ESC ESC) to be recognized as data.

Codes handled as control functions


All codes that follow the (ESC) code are treated as control functions with the exception of the code (ESC).
The functions recognized are: ESC 0, ESC CR, ESC LF, ESC 7, ESC X nnn, ESC 2.

Printing field
The printing field is closed when one of the following commands is received: ESC CR, ESC LF, ESC 7, ESC
2.

Length and bottom of form


With BIM printing, the preset length and bottom of form values are not handled in the normal way: a paper
jam error occurs when the length is exceeded (ESC r 1).

Left Margin
BIM printing uses the preset left margin.

Printing Direction
BIM printing is unidirectional.

Printing
The diagram below shows the arrangement assigned to the bits according to the printing element:
pin 1 b1
pin 2 b2
pin 3 b3
pin 4
pin 5 b5
pin 6 b6
pin 7 b7
pin 8 b8

ESC 1
24 pin Bit Image Mode. (Olivetti PR2, PR40+)
ASCII Code ESC 1 p m n
Hexadecimal Value 1B 31 p m n
Decimal Value 27 49 p m n

Sets the printer to print in 24 pin Bit Image Mode. The type of graphic print, 9 pin or 24 pin, is selected with
the command ESC ! G n.

MAN10240-01 C-18 Appendix C


Programmer Manual

The bits of parameter "p" identify the print modes selected:


b8: = 0 fixed
b7: = 1 fixed
b6: = 0 fixed
b5: = 0 fixed
b4: = 0 fixed
b3: = 0 Positive print
= 1 Negative print
b2: = 0 Does not follow m parameter
= 1 Follows m parameter
b1: = 0 Does not follow n parameter
= 1 Follows n parameter

Positive print associates to level 1 of the bit received the print of a dot and to the level 0 the non print;
negative print does the opposite.
The decimal value of the m parameter defines the length of the print line, expressed in number of points.
If the parameter has value 0 or is absent, the default condition is forced; its value corresponds to the
maximum number of points printable per line at the selected density, minus any value of the left margin.
The decimal number of the n parameter defines, in elementary steps, the horizontal position at which two
consecutive dots can be printed.
If the parameter has value 0 or is absent, the default condition is forced (180 dpi).

The allowed values of the n parameter are:

n Dot density
0 180 dpi
1 360 dpi
2 240 dpi
3 120 dpi
4 60 dpi
Upon receiving the command, the printer forces the line spacing value to 24/180", which corresponds to the
displacement of the paper by such a quantity that consecutive vertical dots are printed equidistant.
The consistency checks for the parameters, as well as the default values, shall be computed according to
the following expression:

(b - c) * d
a = ----------------
e

where: a = Maximum print line length (number of dots).


b = Maximum print field length (in n/360").
c = Left margin (in n/240").
d = Value of the n parameter.
e = Value of the elementary step (1/240").
The command is not accepted (command specification error) if:
o It is sent inside a printing field.
o The m parameter exceeds line print lengths.
o The n parameter has a different value from those allowed.
o Inside the data field are sent not recognized functions.

MAN10240-01 C-19 Appendix C


Programmer Manual

The reception from the line of a number of data such as to exceed, in terms of dots, the length of the print
line defined by the m parameter, causes the automatic print and the execution of one line feed. It then waits
for a CR or LF, if the number of data left pending is less than the line length.

Codes handled as data


All codes with a hexadecimal value of between 00 and FF are treated as data, with the exception of code 1B
(ESC), which must be repeated (ESC ESC) to be recognized as data.

Codes handled as control functions


All codes that follow the (ESC) code are treated as control functions with the exception of the code (ESC).
The functions recognized are: ESC 0, ESC CR, ESC LF, ESC 7, ESC X nnn, ESC 2.

Printing field
The printing field is closed when one of the following commands is received: ESC CR, ESC LF, ESC 7, ESC
2.

Length and bottom of form


With BIM printing, the preset length and bottom of form values are not handled in the normal way: a paper
jam error occurs when the length is exceeded (ESC r 1).

Left Margin
BIM printing uses the preset left margin.

Printing Direction
BIM printing is unidirectional.

Printing
The diagram below shows the arrangement assigned to the bits according to the printing element

pin 1 b1
pin 2 b2
pin 3 b3
pin 4 b4 first byte
pin 5 b5
pin 6 b6
pin 7 b7
pin 8 b8
----------------------------------------------------------------------
pin 9 b1
pin 10 b2
pin 11 b3
pin 12 b4 second byte
pin 13 b5
pin 14 b6
pin 15 b7
pin 16 b8
----------------------------------------------------------------------

MAN10240-01 C-20 Appendix C


Programmer Manual

----------------------------------------------------------------------
pin 17 b1
pin 18 b2
pin 19 b3
pin 20 b4 third byte
pin 21 b5
pin 22 b6
pin 23 b7
pin 24 b8
----------------------------------------------------------------------
pin 9 b1
pin 10 b2
pin 11 b3
pin 12 b4 second byte
pin 13 b5
pin 14 b6
pin 15 b7
pin 16 b8
----------------------------------------------------------------------
pin 17 b1
pin 18 b2
pin 19 b3
pin 20 b4 first byte
pin 21 b5
pin 22 b6
pin 23 b7
pin 24 b8

ESC 2
Reset Bit Image Mode. (Olivetti PR2, PR40+)
ASCII Code ESC 2
Hexadecimal Value 1B 32
Decimal Value 27 50

Prints the contents of the buffer in BIM, executes a CR and cancels BIM.

ESC X
Set Relative Horizontal Position. (Olivetti PR2, PR40+)
ASCII Code ESC X
Hexadecimal Value 1B 58
Decimal Value 27 88

The command sets a relative horizontal position in elementary steps.


The command is only accepted with BIM set.
Parameter n defines a movement equal to n times the horizontal distance between two points defined by
parameter n of the ESC 1 command.

MAN10240-01 C-21 Appendix C


Programmer Manual

Customized Characters

ESC h 0
9 pin Downline Loading Characters into the User Memory (DLL).
(Olivetti PR2, PR40+)
ASCII Code ESC h 0 n m d0 d1 d2 D1a D1b D1c......Dnc
Hexadecimal Value 1B 68 30 n m d0 d1 d2 D1a D1b D1c......Dnc
Decimal Value 27 104 48 n m d0 d1 d2 D1a D1b D1c......Dnc

The command enables the characters received to be transferred from the line into the user memory (9 pin).
The type of DLL, 9 or 24 pin, is selected with the command ESC ! G n.
Parameters n and m are, respectively, the binary start and end codes and mark the range in which the
characters will be loaded (as a number "m" - n + 1). In the particular case where n is equal to m a single
character will be loaded.
Values n and m must be between Hex. 20 - 7E and 80 - FE
The format of each individual character is as follows:
d0 d1 d2 D1a D1b D1c......Dnc
where:
- d0,d1,d2 represent, respectively, as binary values:
- d0: number of leading columns.
- d1: number of main columns.
- d2: number of trailing columns.
- The sum (d0 + d1 + d2 ) defines the number of columns in the character’s gross matrix.
- D1a, D1b, D1c.......... Dnc constitute the pattern of the character currently being loaded. Each data column
has three bytes.
Columns: 1 2 3 4 5 6 7 8 9 10 11 12
-------------------------------------------------------------------------------------------------------------------
b7 pin 1
b6 pin 2
b5 pin 3
first byte b4 pin 4
b3 pin 5
b2 pin 6
b1 pin 7
b0 pin 8
-------------------------------------------------------------------------------------------------------------------
25 12 12 12 12 25
5 8 8 8 8 5
The parameters in the example are:
d0=128; d1=6; d2=6; D1=255; D2=129; D3=129; D4=129; D5=129; D6=255

MAN10240-01 C-22 Appendix C


Programmer Manual

MSB function of the d0 byte

MSB = 1 MSB = 0

The command is not accepted (command specification error) if:


It is sent inside a printing field.
The n and m parameters are different from those allowed
The d0 - d1 - d2 parameters are incompatible with one another

ESC h 0
24 pin Downline Loading Characters into the User Memory (DLL).
(Olivetti PR2, PR40+)
ASCII Code ESC h 0 n m d0 d1 d2 D1a D1b D1c......Dnc
Hexadecimal Value 1B 68 30 n m d0 d1 d2 D1a D1b D1c......Dnc
Decimal Value 27 104 48 n m d0 d1 d2 D1a D1b D1c......Dnc

The command enables the characters received to be transferred from the line into the user memory (9 pin). The
type of DLL, 9 or 24 pin, is selected with the command ESC ! G n.
Parameters n and m are, respectively, the binary start and end codes and mark the range in which the
characters will be loaded (as a number m - n + 1). In the particular case where n is equal to m, a single
character will be loaded.
Values n and m must be between Hex. 20 - 7E and 80 - FE
The format of each individual character is as follows:
d0 d1 d2 D1a D1b D1c......Dnc
where:
- d0, d1, d2 represent, respectively, as binary values:
- d0: number of leading columns.
- d1: number of main columns.
- d2: number of trailing columns.
- The sum (d0 + d1 + d2) defines the number of columns in the character’s gross matrix.
- D1a, D1b, D1c..........Dnc constitute the pattern of the character currently being loaded. Each data column has
three bytes.

MAN10240-01 C-23 Appendix C


Programmer Manual

Columns: 1 2 3 4 5 6 7 8 9 10 11 12
-------------------------------------------------------------------------------------------------------------------
b7 pin 1
b6 pin 2
b5 pin 3
first byte b4 pin 4
b3 pin 5
b2 pin 6
b1 pin 7
b0 pin 8
-------------------------------------------------------------------------------------------------------------------
b7 pin 9
b6 pin 10
b5 pin 11
second byte b4 pin 12
b3 pin 13
b2 pin 14
b1 pin 15
b0 pin 16
-------------------------------------------------------------------------------------------------------------------
b7 pin 17
b6 pin 18
b5 pin 19
third byte b4 pin 20
b3 pin 21
b2 pin 22
b1 pin 23
b0 pin 24
-------------------------------------------------------------------------------------------------------------------
255 128 128 128 128 255

The parameters of the example are:


d0=0; d1=11; d2=1;
D1a=255, D1b=255, D1c=255;
D2a=0, D2b=0, D2c=0;
D3a=128, D3b=0, D3c=1;
D4a=0, D4b=0, D4c=0;
D5a=128, D5b=0, D5c=1;
D6a=0, D6b=0, D2c=0;
D7a=128, D7b=0, D7c=1;
D8a=0, D8b=0, D8c=0;
D9a=128, D9b=0, D9c=1;
D10a=0, D10b=0, D10c=0;
D11a=255, D11b=255, D11c=255

The command is not accepted (command specification error) if:


• It is sent inside a printing field.
• The n and m parameters are different from those allowed
• The d0 - d1 - d2 parameters are incompatible with each other
• If the printer is in High Speed Draft or Very High Speed Draft mode the command is accepted all the
same; however, the subsequent activation command ESC m n 0 generates an error.

MAN10240-01 C-24 Appendix C


Programmer Manual

ESC : 000
Copy character generator into user memory. (Olivetti PR2, PR40+)
ASCII Code ESC : 0 0 0
Hexadecimal Value 1B 3A 30 30 30
Decimal Value 27 58 48 48 48

The command transfers the current character generator set into the user memory.
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• It is sent with the OCR-A or B Font selected, in that these fonts cannot be loaded into the user memory.

ESC m n 0
Select character generator. (Olivetti PR2, PR40+)
ASCII Code ESC m n 0
Hexadecimal Value 1B 6D n 30
Decimal Value 27 109 n 48

The command selects the current character generator or the one in the user memory depending on the
decimal value of parameter n.

n Generator selected
0 Current character generator
1 Character generator in user memory

The command is not accepted if it is sent with the OCR-A or B Font selected.

Printer Control

ESC Z
Request for primary ID. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC Z
Hexadecimal Value 1B 5A
Decimal Value 27 90

This command requests the printer to indicate its ID. The printer answers with different IDs according to the
current emulation.
The command gives a command specification error (The request is fulfilled in any case) if, it is sent inside a
printing field.

ESC / 7
Printer ID. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC / 7
Hexadecimal Value 1B 2F 37
Decimal Value 27 47 55

Answer sent by printer on receiving command ESC Z.

MAN10240-01 C-25 Appendix C


Programmer Manual

ESC i
Request for printer configuration. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC i
Hexadecimal Value 1B 69
Decimal Value 27 105

This command requests the printer to indicate its basic machine configuration. The command gives a
command specification error (The request is fulfilled in any case) if it is sent inside a printing field.

ESC p
Printer configuration. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC p x y z k
Hexadecimal Value 1B 70 x y z k
Decimal Value 27 106 x y z k

Answer to the request for the printer configuration ESC i.


Parameters "x y z k" may have the following configurations:
Byte x:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 fixed
bit 5: = 0 fixed
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2: = 1 fixed.
bit 1: = 1 fixed

Byte y:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 fixed
bit 5: = 0 reserved
bit 4: = 0 fixed
bit 3: = 1 Magnetic stripe management option present
0 Magnetic stripe management option not present
bit 2: = 0 fixed
bit 1: = 1 fixed

Byte z:
bit 8: = 0 fixed
bit 7: = 0 fixed
bit 6: = 1 fixed
bit 5: = 1 fixed
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2: = reserved
bit 1: = 0 fixed

Byte k:
bit 8: = 0 fixed
bit 7: = 0 fixed
bit 6: = 1 fixed
bit 5: = 0 Horizontal magnetic stripe handling
bit 4: = 0 fixed
bit 3: = 0 Magnetic stripe management option not present
1 Magnetic stripe management option present
bit 2: = 0 reserved
bit 1: = 0 fixed

MAN10240-01 C-26 Appendix C


Programmer Manual

ESC j
Status request. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC j
Hexadecimal Value 1B 6A
Decimal Value 27 106

This command requests the printer to indicate its synchronous status. Timing of the status reply is depends
on the STATUS REQUEST setup parameter. If NO WAIT is selected, the reply will be provided as soon as
possible and simultaneously with the print or with paper movements. If WAIT is selected, the status reply will
be provided at the end of the print.
The command gives a command specification error (The request is fulfilled in any case) if it is sent inside a
printing field.

ESC r
Synchronous basic machine status. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC r x
Hexadecimal Value 1B 72 x
Decimal Value 27 114 x

Answer sent by the printer on receiving command ESC j.


The bits of parameter "x" indicate the printer status which may be WARNING or ERROR.
The WARNING status indicates that the operation was performed correctly.
The ERROR status indicates that the operation has not been performed or was performed incorrectly.
The bits of parameter "x" may have the following meanings:

WARNING FRONT PAPER STAND


Byte x:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 fixed
bit 5: = 1 fixed
bit 4: = 1 Document completely inserted (1)
bit 3: = 1 Local or Cover open (2)
bit 2: = 0 fixed
bit 1: = 1 Almost end of document (3)

(1) Generated when the last line of the document is reached.


(2) Generated when the machine is set in local or when the cover is opened without any executive
commands suspended.
(3) Generated when the first line of the declared bottom of form is reached: if you try to print in any case, an
error is indicated.

GENERIC ERROR
Byte x:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 1 fixed
bit 5: = 0 fixed
bit 4: = 1 Command specification error (1)
bit 3: = 1 Cover open (2)
bit 2: = 1 Local (3)
bit 1: = 1 Line error (4)

MAN10240-01 C-27 Appendix C


Programmer Manual

(1) Generated when the command received does not respect the specifications.
(2) Generated when the cover is opened with executive commands suspended.
(3) Generated when the machine is set in local with executive commands suspended.
(4) Generated when an error is detected in reception (framing error, parity error, overflow).

PAPER STAND ERROR


Byte x:
bit 8: = 0 fixed
bit 7: = 0 fixed
bit 6: = 1 fixed
bit 5: = 1 fixed
bit 4: = 1 Command specification error (1)
bit 3: = 1 Cover open (2)
bit 2: = 1 No document present (3)
bit 1: = 1 Jam(4)

(1) Generated when the command received does not respect the specifications
(2) Generated when the cover is opened with executive commands suspended.
(3) Generated when a paper load command is sent and the document is not present in the slot.
(4) Generated when an incorrect paper movement is detected.

ERROR DURING MAGNETIC/OPTICAL OPERATION


Byte x:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 1 fixed
bit 5: = 1 fixed
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2: = 1 Virgin stripe (1)
bit 1: = 1 Read or check error (2)

(1) Generated when no character is read during a read operation.


(2) Generated when read errors are detected.

When the machine enters error status, it stays there until the reset error command
(ESC l) is received.
While in the error status, the machine discards all the data and/or commands sent to it except for status or
ID requests (ESC j, ESC i, ESC Z).
In the event of a jam, the reset error command must be followed by an eject document command (ESC l,
ESC O).
The general reset command resets all kinds of errors.

MECHANICAL FAULT
Byte x: "o" (6F)

When a mechanical movement is not performed, a mechanical fault is signaled.


The printer stays in this condition until a general reset command (ESC 0) is received,

MAN10240-01 C-28 Appendix C


Programmer Manual

ESC sp B
Request for document status. (Olivetti PR2)
ASCII Code ESC sp B
Hexadecimal Value 1B 20 42
Decimal Value 27 32 65

This command requests the printer to indicate its status as regards the current position of the document.
The command generates a command specification error (The request is fulfilled in any case) if it is sent
inside a printing field.

ESC B id m ESC Z
Synchronous document status. (Olivetti PR2)
ASCII Code ESC B id m ESC Z
Hexadecimal Value 1B 42 id m 1B 5A
Decimal Value 27 66 id m 27 102

The synchronous status of documents, which answers the ESC sp B command has the following structure:
id = 5 (PAPER FRONT STAND)
m consists of a single byte and identifies the position of the document in the device identified by id.
Byte m:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 reserved
bit 5: = 0 reserved
bit 4: = 0 reserved
bit 3: = 0 reserved
bit 2,1:= 0 0 Document not present.
0 1 Document parked.
1 0 Document aligned.
1 1 Document inserted.
Key:
Document parked Position assumed by the document downstream of a SW ejection (ESC O)
Document aligned Position assumed by the document downstream of a manual introduction
into the paper stand.
Document inserted Position assumed by the document downstream of a paper insertion from
SW command (ESC L nnn)

ESC sp b
Request for FW Release ID. (Olivetti PR2)
ASCII Code ESC sp b
Hexadecimal Value 1B 20 62
Decimal Value 27 32 98

This command requests the printer to indicate its FW Release ID.


The command generates a command specification error (The request is fulfilled in any case) if it is sent
inside a printing field.

MAN10240-01 C-29 Appendix C


Programmer Manual

ESC b idrel1;idver1; ........... idrel.n;idver.n ESC Z


FW Release ID. (Olivetti PR2)
ASCII Code ESC b idrel1;idver1; ........... idrel.n;idver.n ESC Z
Hexadecimal Value 1B 62 idrel1;idver1; ........... idrel.n;idver.n 1B 5A
Decimal Value 27 98 idrel1;idver1; ........... idrel.n;idver.n 27 102

Answer to a request for the FW Release ID.


Parameters idrel.n and idver.n have the following meaning:
idrel.n / idver.n FW release/ FW version Number
idrel.1 MAIN FW release + Magnetic option x.xxxy
idver.1 MAIN FW version + Magnetic option xxx
idrel.2 OCR FW release x.xx

x = a number y = a letter

Example of an answer to a request for the FW ID: ESC b1.00E;011;1.00;005;ESC Z

ESC sp a
Request for set-up configuration. (Olivetti PR2)
ASCII Code ESC sp a
Hexadecimal Value 1B 20 61
Decimal Value 27 32 97

This command requests the printer to indicate its Set-Up configuration.


The command generates a command specification error (The request is fulfilled in any case) if it is sent
inside a printing field.

ESC l
Resets the printer error status. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC I
Hexadecimal Value 1B 6C
Decimal Value 27 108

ESC n
Olivetti controlled procedure selection. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC n
Hexadecimal Value 1B 6E
Decimal Value 27 110

Selects the Olivetti controlled data exchange procedure (the only procedure accepted in OLIVETTI
emulation). The command is not accepted (command specification error) if it is sent inside a printing field.

ESC o
Select free running mode. (Olivetti 2845)
ASCII Code ESC o
Hexadecimal Value 1B 6F
Decimal Value 27 111

This command is accepted (for compatibility with the past) only before the selection of the "Olivetti
controlled" selection. After an ESC n it generates a command error.

MAN10240-01 C-30 Appendix C


Programmer Manual

ESC V
Switch operator panel LED on or off. (Olivetti 2845)
ASCII Code ESC V n
Hexadecimal Value 1B 55 n
Decimal Value 27 85 n

This command is present only for compatibility with the past. It is ignored by the printer.

ESC 0
General reset. (Olivetti PR2, PR40+)
ASCII Code ESC 0
Hexadecimal Value 1B 30
Decimal Value 27 48

Resets all the printer’s FW. The HW (mechanical) reset is not performed and all default parameters are
restored. The command is recognized in lines (as soon as it is received, it discards the data and the pending
commands and is executed).
If the command is received with the machine in the LOCAL or COVER open status, it still resets the FW. The
general reset:
• Cancels all the settings made from the line (spacing, fonts, etc.).
• Switches off the console indications activated by commands from the line.
• Cancels any pending book operator commands.
• Restores the default values, that is, the parameters set from the Set-Up.
• Keeps the machine status (Local or Ready) and the contents of the user memory (DLL) unchanged.

ESC U
Book operator. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC U n
Hexadecimal Value 1B 55 n
Decimal Value 27 85 n

Books an operator and switches on/off the station LEDs specified by the configuration of parameter "n",
which has the following structure:
Byte n:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 1 Book Operator
bit 5: = 0 Led OFF
1 Led ON
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2: = 1 Station 2
bit 1: = 1 Station 1

The STATION 1 and STATION 2 LEDs inform the single operator whether the printer has been dedicated to
him or not. Bits 5 and 6 may have one of the four combinations indicated in the table below:

MAN10240-01 C-31 Appendix C


Programmer Manual

Bit 6 Bit 5 Printer behaviour


0 0 Switches the Station1 or Station2 LED off as specified in bits 1 and 2. If both are off, after
this sequence has been executed, any pending book operator commands will be
cancelled
1 0 Switches the Station1 or Station2 LED off as specified in bits 1 and 2. After this sequence
has been executed, the book operator command becomes pending and is stored.
0 1 Switches the Station1 or Station2 LED on as specified in bits 1 and 2. Pending book
operator commands are not cancelled
1 1 Switches the Station1 or Station2 LED on as specified in bits 1 and 2. This sequence
always enables the book operator command.

If both operators are booked (Station1 and Station2 LEDs on), the printer will be assigned to the first
operator to press the key, canceling the other pending book operator command.
If the key corresponding to the unbooked operator is pressed, the printer ignores the action and does not
answer.
This behavior gives priority to the manual book operator command (ESC _).
If automatic operation booking is selected (ESC .), the LEDs do not light up even if parameter n indicates
power-on: to make the LEDs light up, the LED on command must be sent separately from the book operator
command.
A pending book operator command does not block any printer function.
The command is not accepted (command specification error) if it is sent inside a printing field.

ESC r
Answer to book operator command. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC r x
Hexadecimal Value 1B 72 n
Decimal Value 27 114 n

The answer to the book operator command may be determined by the pressing of a key (if manual O.B.) or
the presence of the document in the slot (if automatic O.B.).
If automatic O.B. is enabled, the answer will always be Station 1.
The bits of parameter x may have the following meanings:
Byte x:
bit 8: = 0 fixed
bit 7: = 0 fixed
bit 6: = 1 fixed
bit 5: = 0 fixed
bit 4: = 0 fixed
bit 3: = 1 Document present
bit 2: = 1 Station 2 pressed
bit 1: = 1 Station 1 pressed

ESC .
Select automatic operator booking mode. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC .
Hexadecimal Value 1B 2E
Decimal Value 27 46

Sets the printer to automatically answer the pending book operator command (without any key being
pressed on the console) as soon as the document is inserted in the feeder.
The command is not accepted (command specification error) if, iIt is sent inside a printing field.

MAN10240-01 C-32 Appendix C


Programmer Manual

ESC _
Select manual operator booking mode. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC _
Hexadecimal Value 1B 5F
Decimal Value 27 95

Sets the printer to answer the pending book operator command only when the key on the console that
corresponds to the operator selected is pressed.
The command is not accepted (command specification error) if it is sent inside a printing field.

Magnetic Device Control

ESC ]
Magnetic read of the passbook stripe. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC ]
Hexadecimal Value 1B 5D
Decimal Value 27 93

Reads the magnetic stripe, if present.


If the document is not inserted, the printer feeds in the document.
The data read is converted into ASCII characters and sent to the central unit in the following format:
ESC s ........data field............. FS
(1B 73 ........data field............. 1C)

In the case of a magnetic stripe with field duplication:


ESC s ......first data field ...... A ........second data field ...... FS
(1B 73 ......first data field ...... 41 ........second data field ...... 1C)
where A represents the separator between the two fields.

Unrecognized data is replaced with DEL (7F).


Should no data be found during the read operation, the answer will be:
ESC s DEL FS
(1B 73 7F 1C)
If any errors occur during the read operation, the answer to the status request (ESC j) will be:
ESC r r no character found
ESC r q read/check error

In a magnetic read operation, it may happen that all the data in the read answer is correct (no DEL in the
data field), but a read error is indicated when the status request is made. This is caused by the detection
of an error in the LRC calculation, so we recommend that a read command should always be followed by
a status request.
Since after the execution of the command the position of the document is unknown, its subsequent
positioning must be given as an absolute position.
The command is not accepted (command specification error) if it is sent inside a printing field or the option is
not present.

MAN10240-01 C-33 Appendix C


Programmer Manual

ESC t data GS
Data to be recorded on the magnetic stripe. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC t data GS
Hexadecimal Value 1B 74 data 1D
Decimal Value 27 116 data 29

Sets the data to be recorded according to the previously selected standard (from the line or the Set-Up). The
command is not accepted (command specification error) if:
• It is sent inside a printing field.
• There are more than 105 data items to be recorded in a single field or 45 in field duplication.
• The data is not in column 3 of the ASCII codes.
• It is not followed by ESC \.
• A device other than the front paper stand is selected.
• The option is not present.

ESC \
Record and check magnetic stripe. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC \
Hexadecimal Value 1B 74 data 1D
Decimal Value 27 116 data 29

Records the data sent by ESC t data GS and is considered the end of data.
If the document is not inserted, the printer feeds it in.
The command is not accepted (command specification error) if it is not preceded by the ESC t data GS
command
If, at the end of the recording, errors are found during the check, the answer to the status request will
indicate a record or check error ESC r q.
Since after the execution of the command the position of the document is unknown, its subsequent
positioning must be given as an absolute position.

ESC Y B k1 k2
Set MICR Magnetic Read(Olivetti PR2, PR40+)
Upon reception of the command, the device assumes the configuration indicated by k1 and k2
parameters.
ASCII Code ESC Y B k1 k2
Hexadecimal Value 1B 59 42 k1 k2
Decimal Value 27 89 66 k1 k2

k1 b8 = 0 fixed
b7 = 1 fixed
b6 = 0 values of k1 and k2
1 default values
b5 = 0 one retry
1 three retries
b4 = 1 fixed
b3 = 0 space detection off
1 space detection on
b2 = 0 command eject
1 auto eject
b1 = 0 Reserved

MAN10240-01 C-34 Appendix C


Programmer Manual

k2 b8 = 0 fixed
b7 = 1 fixed
b6, = 0 Reserved
b5 = 0 Reserved
b4, = 0 Reserved
b3 = 0 Reserved
b2, b1 = 00 CMC7 alpha numeric
01 E13B
10 CMC7 numeric only
11 Reserved

Note: In the absence of a command the default setting is as follows:


- one retry
- Space detection ON
- Automatic ejection
- CMC7 alpha numeric

The command is not accepted (command specification error) if:


- It is sent inside a printing field.
- The device is not present.
- It is sent with the document already loaded.

ESC Y E
Set horizontal magnetic device. (Olivetti PR2, PR40+)
ASCII Code ESC Y E k1 k2
Hexadecimal Value 1B 59 45 k1 k2
Decimal Value 27 89 69 k1 k2

When the command is received, the device takes on the configuration indicated by parameters k1 and k2.

Byte k1:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 values of k1 k2
1 default values
bit 5: = 0 one retry
1 three retries
bit 4: = 0 End of Sentinel = 0F
1 End of Sentinel = 0C
bit 3: = 0 fixed
bit 2-1: = 00: IBM 3604
01: DIN/ISO
10: ANSI
11: Reserved

MAN10240-01 C-35 Appendix C


Programmer Manual

Byte k2:
bit 8: =
0 fixed
bit 7: =
1 fixed
bit 6: =
0 duplication OFF
1 duplication ON
bit 5: = 0 fixed
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2-1: = 00: standard position
01: position + 10 mm
10: position + 20 mm
11: Reserved
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• The device is not present.
• A device other than the front paper stand is selected.

ESC } r
MICR Magnetic Read (Olivetti PR2, PR40+)
ASCII Code ESC } r
Hexadecimal Value 1B 7D 72
Decimal Value 27 125 114

This command activates the magnetic read of MICR characters and causes their trasmission to U.C.
according to the format already in use: ESC s <data> FS.
NOTA - Unrecognised data are replaced with DEL (7F)
The command is not accepted (command specification error) if:
¾ It is inside a printing field.
¾ The device is not present.
¾ A device different from IFA/IFAM is selected.

ESC #
Assign reference for ESC L. (Olivetti PR2, PR40+)
ASCII Code ESC # n
Hexadecimal Value 1B 23 n
Decimal Value 27 35 n

This command defines the criteria for counting the number of lines selected by ESC L n.
With parameter n = 0, the ESC L command always feeds in the paper to the line defined by the ESC T n
command or, if it is not defined, to the minimum top margin and, with parameter n > 0, the ESC L command
is changed according to the following values of parameter n of ESC # n.

n Behavior
0 Positions the document at line n defined by ESC L with a document edge reference
1 Positions the document at line n defined by ESC L with a reference at the top margin defined by
ESC T or, if no top margin is defined, at the minimum top margin

The command is not accepted if it is sent inside a printing field or a device other than the front paper stand is
selected.

MAN10240-01 C-36 Appendix C


Programmer Manual

ESC | A
Define offset in elementary steps. (Olivetti PR2, PR40+)
ASCII Code ESC | A n
Hexadecimal Value 1B 7C 41 n
Decimal Value 27 124 65 n

Defines, in n/120", the distance between the left margin and the edge of the printer and constitutes the
reference for all the horizontal setting or positioning functions.
As a result, the length of the line is reduced by n. Parameter n may be set to any value from 0 to 999.
The command is not accepted (command specification error) if it is sent inside a printing field or a device
other than the front paper stand is selected.

ESC | B
Define document width in elementary steps. (Olivetti PR2, PR40+)
ASCII Code ESC | A n
Hexadecimal Value 1B 7C 42 n
Decimal Value 27 124 66 n

Defines, in n/120", the actual width of the passbook on which magnetic operations are to be carried out.
This command is used exclusively for horizontal magnetic recording/reading on machines configured with
left alignment, to determine the start position for magnetic operations.
Parameter n may be set to any value from 0 to 1156 (width of slot)
The command is not accepted (command specification error) if it is sent inside a printing field or a device
other than the front paper stand is selected.

ESC '
Set document type. (Olivetti PR2, PR40+, 2845)
ASCII Code ESC ' n
Hexadecimal Value 1B 27 n
Decimal Value 27 39 n

Sets the printer to handle the type of document defined by parameter n, which has the following structure:
Byte n:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 fixed
bit 5: = x not significant
bit 4: = 0 multicopy document
1 single-copy document
bit 3: = 0 document
1 passbook
bit 2: = 0 vertical seam
1 horizontal seam
bit 1: = x not significant
The values of bits 4, 3 and 2 determine the situations as shown in the table below:
bit 4 bit 3 bit 2 Document Type
1 0 x Single-copy document
0 0 x Multicopy document
0 1 1 Horizontal seam book
0 1 0 Vertical seam book
The command is not accepted if it is sent inside a printing field or a device other than the front paper stand is
selected.

MAN10240-01 C-37 Appendix C


Programmer Manual

ESC /
Set absolute vertical position in elementary steps. (Olivetti PR2, PR40+)
ASCII Code ESC / m n
Hexadecimal Value 1B 2F m n
Decimal Value 27 47 m n

If the document is not inserted, the printer feeds it in and positions it at n elementary steps from the margin
indicated by parameter m.
The elementary step value is expressed as n/240" or as n/216" depending on the value selected from set-up.
Parameter m may be set to the following values:

m Reference margin
0 bottom margin
1 top margin

The command is not accepted (command specification error) if:


• It is sent inside a printing field.
• If the value of parameter n is greater than the declared document length or lies in the declared TOF
or BOF.
• A device other than the front paper stand is selected.

ESC -
Measure document length. (Olivetti PR2, PR40+)
ASCII Code ESC -
Hexadecimal Value 1B 2D
Decimal Value 27 45

If the document is not inserted, the printer feeds it in, measures its length in elementary steps and sends the
value to the CU by means of the ESC S n command.
The elementary step value is expressed in n/240" or n/216", depending on the value selected in setup.
When the command has been executed, the position of the document is unknown, so its next position must
be given by an absolute position setting.
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• A device other than the front paper stand is selected.

ESC } -
Measure document width. (Olivetti PR2)
ASCII Code ESC } -
Hexadecimal Value 1B 7D 2D
Decimal Value 27 45 125

If the document is not inserted, the printer feeds it in, measures the width in elementary steps and sends the
value to CU by means of ESC S n. The elementary step value is 1/240"
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• A device other than the front paper stand is selected.

MAN10240-01 C-38 Appendix C


Programmer Manual

ESC S
Document length or width document: answer. (Olivetti PR2)
ASCII Code ESC S n
Hexadecimal Value 1B 53 n
Decimal Value 27 45 125

Answer to the ESC - command.


ESC ! G n
9 or 24 pin graphics and DLL selection. (Olivetti PR2)
ASCII Code ESC ! G n
Hexadecimal Value 1B 21 47 n
Decimal Value 27 33 71 n

Sets graphic printing (BIM) and DLL printing at 9 or 24 pins. When this command is sent, it erases from the
printer memory any DLL characters loaded previously.
n BIM and DLL
30 (H) 9 pin
31 (H) 24 pin

The default setting is 9 pin.


The command is not accepted (command specification error) if it is sent inside a printing field or a device
other than the front paper stand is selected.

Bar Code Print

ESC x mm; hh; zz; n ESC Z


Set Bar Code Print. (Olivetti PR2)
ASCII Code ESC x m ; h ; z ; n ESC Z
Hexadecimal Value 1B 21 m ; h ; z ; n 1B 5A
Decimal Value 27 33 m ; h ; z ; n 27 90

Sets bar code printing according to the characteristics defined by the following parameters. The ";" character
serves as a spacer and the ESC Z command serves to close the sequence.
The m parameter defines the following Bar Code types:
m Bar Code Type
00 DEFAULT
01 UPC-A
02 UPC-E
03 EAN-8
04 EAN-13
05 CODE39
06 CODABAR
07 2/5 INTERLEAVED
08 2/5 INDUSTRIAL

The h parameter defines Bar Code Height:


h Bar Code Height
00 DEFAULT
01-99 Height as number h of passes (*)

MAN10240-01 C-39 Appendix C


Programmer Manual
(*) One pass = 8/72” at 9/18 pin
8/60” at 24 pin

The z parameter defines the horizontal zoom coefficient in decimals.


The following values are allowed for it:

z Values
00-09 Ignored values
10-34 Acceptable values

The n parameter, comprising one byte, enables or disables plain language printing of the Bar Code ("Human
Readable Line" - H.R.L.) in the lower part:

n Human Readable Line


0 Disabled
1 Enabled

“Human readable” characters are printed with the fonts listed below, where no zoom factor is applied. The
fonts used for the Human Readable Line depend on the type of Bar Code selected:

H.R.L. Font Bar Code Type


OCR-A Code39, Codabar, 2/5 Interleaved and 2/5 Industrial
OCR-B UPC-A, UPC-E, EAN-8 and EAN-13

If the numeric parameters are omitted, the current value is retained.

The command is not accepted (command specification error) if it is sent with the following parameter values:
m between 09 and 99
z between 35 and 99
n between 2 and 9

ESC y ... data ... ESC Z


Enable bar code printing. (Olivetti PR2)
ASCII Code ESC y data ESC Z
Hexadecimal Value 1B 79 data 1B 5A
Decimal Value 27 121 data 27 90

It performs Bar Code printing of the alphanumeric data, and brings the print head back to the left margin.
The command is not accepted (command specification error) if the number and type of characters is not
compatible with the standard of the selected Bar Code.

MAN10240-01 C-40 Appendix C


Programmer Manual

Appendix D – HPR4915 Protocol Commands

HPR4915 Mode Commands.............................D-2


Summary in Alphabetical Order ........................D-2
HPR4915 Mode Commands Description .........D-3
Page Layout.......................................................D-3
Status and Error messages...............................D-7
Control of MSR Functions ...............................D-13

MAN10240-01 D-1 Appendix D


Programmer Manual

HPR4915 Mode Commands


The Wincor Nixdorf HPR4915 emulation is designed as a container of SW commands for managing all new
performance, characteristic of the models.
The Wincor Nixdorf HPR4915 command interpreter is based on the HPR4915 emulation of which it
maintains, for the common part, all the characteristics.

Summary in Alphabetical Order


Command Command Description Page
ESC [ n $ p Paper feed of the document D-2
ESC [ n ! p Absolute vertical positioning in relation to the top form D-3
edge
ESC [ n “ p Absolute vertical positioning in relation to the bottom D-4
form edge
ESC [ n # p Relative vertical positioning backwards D-4
ESC [ “ t Requesting the document width D-4
ESC [ # t Document edge detection D-5
ESC [ n $ t Activating passbook processing D-5
ESC [ n % t Specification of the horizontal leading edge D-5
ESC [ n ( t Mode switch-over for handling end of paper D-6
ESC [ n * t Dual station control D-7
ESC [ n , t Multi Part on/off D-7
ESC [ n # q Selection of type fonts / character sets D-11
ESC [ n ! t Initiating the control cycle D-7
ESC [ n ) t Setting control point II D-7
ESC [ n ! z Global printer status D-8
ESC [ “ z Requesting special printer messages D-8
ESC [ n;m “ z Special printer messages D-8
ESC [ n # z Requesting printing unit parameters D-9
ESC [ n1;...;n9 # z Printing unit parameters D-9
ESC [ n1;...; n5 ! r Activating parameter command MSR D-13
ESC [ " r Reading command MSR D-14
ESC [ n1;.;n4 STX.data.ETX Response to a reading command of an MSR track D-16
ESC [ # r STX.data.. ETX Writing an MSR track D-16
ESC [ " n1;n2 Response to a writing command of an MSR track D-14
ESC [ % r Deleting a track D-16

MAN10240-01 D-2 Appendix D


Programmer Manual

HPR4915 Mode Commands Description

Page Layout
ESC [ n $ p
Paper Feed of the Document.
ASCII Code ESC [ n $ p
Hexadecimal Value 1B 5B n 24 70
Decimal Value 27 91 n 36 112

Parameter:
n = 0 : Ejection of a document
n = 1 : Insertion of a document to the base line of the logical first line which can be set via the document
printer menu (TOF- POS)

Function:
This command initiates a mechanical action. The ejection procedure also refers to documents which were
only form fed and on which no insertion or print proce dure was carried out.

If this command is used to eject documents (n = O), it must be considered that after ejection the current
logical position is outside the form. Therefore a new first print position must be set here before transferring
new print characters, for ex- ample, using the command FF (form feed) or via paper feed of the document
(positioning on the base line of the logical first line, see definition of default positioning for insertion) or using
the command 'Absolute vertical positioning'.

ESC [ n ! p
Absolute vertical positioning in relation to the top form edge.
ASCII Code ESC [ n ! p
Hexadecimal Value 1B 5B n 21 70
Decimal Value 27 91 n 33 112

Parameter:
n = positioning in a vertical direction by n/180 inch (n = 1 to 9999)
The permitted upper limit of the parameter value is specified by the set document height.

Function:
For document processing, two commands are available for the absolute vertical positioning (y co-ordinates)
of the write head on a form. Generally, both commands, after transfer to the printer, are valid for effecting the
output of the characters still situated in the print buffer. The requested vertical movement is then carried out
mechanically when new write operations are executed at the document printing point.

The following differences are to be noted for the two commands for absolute vertical positioning:
o With the absolute vertical positioning in relation to the upper edge of the form (CSI n ! p), the spacing
is specified in n/I8O inch from the upper edge of the form to the base line of a line.
o With the absolute vertical positioning in relation to the lower edge of the form (CSI n " p), the spacing
is specified in n/I8O inch from the lower edge of the form to the base line of a line.
For these commands the printing unit of the document printer is fitted with equipment for the detection of the
edges of the form.

MAN10240-01 D-3 Appendix D


Programmer Manual

ESC [ n ˝ p
Absolute vertical positioning in relation to the bottom form edge.
ASCII Code ESC [ n ! p
Hexadecimal Value 1B 5B n 21 70
Decimal Value 27 91 n 33 112

Parameter:
n = positioning in a vertical direction by n/180 inch (n = 1 to 9999)
The permitted upper limit of the parameter value is specified by the set document height.

Function:
For document processing, two commands are available for the absolute vertical positioning (y co-ordinates)
of the write head on a form. Generally, both commands, after transfer to the printer, are valid for effecting the
output of the characters still situated in the print buffer. The requested vertical movement is then carried out
mechanically when new write operations are executed at the document printing point.

The following differences are to be noted for the two commands for absolute vertical positioning:
– With the absolute vertical positioning in relation to the upper edge of the form (CSI n ! p), the spacing
is specified in n/180 inch from the upper edge of the form to the base line of a line.
– With the absolute vertical positioning in relation to the lower edge of the form (CSI n " p), the spacing
is specified in n/180 inch from the lower edge of the form to the base line of a line.
For these commands the printing unit of the document printer is fitted with equipment for the detection of the
edges of the form.

ESC [ n # p
Relative vertical positioning backwards.
ASCII Code ESC [ n # p
Hexadecimal Value 1B 5B n 23 70
Decimal Value 27 91 n 35 112

Parameter:
n = backwards positioning in a vertical direction of n/180 inch (n = 0 to 9999). The permitted upper limit of
the parameter value is specified by the set document height and the current line position.

Function:
Via the command CSI n # p, a positioning of n/180 inch backwards relative to the base line of the current line
is executed. After transferring this command, all characters are printed which are still in the print buffer.

ESC [ ˝ t
Requesting the document width.
ASCII Code ESC [ ˝ t
Hexadecimal Value 1B 5B 22 74
Decimal Value 27 91 34 116

Response:
ASCII Code ESC [ n ˝ t
Hexadecimal Value 1B 5B n 22 74
Decimal Value 27 91 n 34 116

n = document width of the current form in n/180 inch.

MAN10240-01 D-4 Appendix D


Programmer Manual

Function:
Via the control command CSI " t, the printer control transmits information to the program about the width of
the document currently being processed.

If the width of the document is not known to the printer control at this point of time, a measuring operation is
carried out to determine the document width.

The response CSI n " t has the same structure as the requesting command supplemented by the parameter
n, which identifies the determined document width
of the form with the measurement 'n/180 inch'. 'n' can be in the range from 0 to 9999.

ESC [ # t
Document Edge Detection.
ASCII Code ESC [ # t
Hexadecimal Value 1B 5B 23 74
Decimal Value 27 91 35 116

Function:
The document printer ignores this function.

ESC [ n $ t
Activating passbook processing.
ASCII Code ESC [ $ t
Hexadecimal Value 1B 5B 24 74
Decimal Value 27 91 36 116

Function:
The ignores this function.

ESC [ n % t
Specification of the horizontal leading edge.
ASCII Code ESC [ n % t
Hexadecimal Value 1B 5B n 25 74
Decimal Value 27 91 n 37 116

Parameter:
n = switch for the horizontal leading edge
n = 0 : (flush left, default value)
n = 1 : (flush right)

Function:
Via CSI n % t, the printer control is informed to which horizontal edge the subsequent print and read
operations are to refer (also see section “Important notes on document processing”, subsection “Horizontal
positioning” in this chapter).

MAN10240-01 D-5 Appendix D


Programmer Manual

ESC [ n ( t
Mode switch-over for handling end of paper.
ASCII Code ESC [ n % t
Hexadecimal Value 1B 5B n 28 74
Decimal Value 27 91 n 40 116

n = switch for type of mode switch-over


n = O : manual; default value
n = 1 : automatic

Function:
By means of CSI n ( t depending on the parameter n the behaviour of the printing unit on the document
printing point can be influenced in the case of the following errors (fatal errors):

PAPER LENGTH End of paper within a form:


upper or lower edge of document was passed over because of wrong document format or incorrect
programming.
PAPER WIDTH The print job exceeds the right document edge.

n = 0 : manual error handling


After an error the operator must clear the error via the control panel of the printer and put the printer into
ONLINE status (also see the operating manual)

n = 1 : automatic error handling


After an error the following actions are executed by the printing unit:
– Locking the printer interface for further data;
– Response 'Global printer status' in the coding CSI n ! z with n = 2 (ERROR);
– Response 'Special printer message' in the coding CSI n; m " z with n = 2 (NO PAPER);
– Paper ejection, deletion of all print buffers, setting of default parameters;
– Response 'Global printer status' in the coding CSI n ! z with n = 0 (ONLINE);
– Release of the interface for the transfer of new data.

The operator no longer needs to clear the error status on the printing unit. However, after a short
pause (ejection of the document) the printing unit is in the ONLINE status again for the system driver and
can thus be addressed.

ESC [ n * t
Dual Station control.
ASCII Code ESC [ n * t
Hexadecimal Value 1B 5B n 2A 74
Decimal Value 27 91 n 42 116

Parameter:
Dual station control USER1 LED USER 2 LED
n = 0 : de-activated; default value
n =1 : activated off off
n = 2 : activated on off
n = 3 : activated off on
n = 4 : activated on on

MAN10240-01 D-6 Appendix D


Programmer Manual

Function:
The 'Dual station control' for the document printer can be activated using this command. In this way the control of
workstations using a common printer can be synchronized.

Using the command CSI n * t USER1 and USER2 LEDs can be switched over
in the application program in order to indicate, for example, which job is being processed or which operator is to
insert a form. In order to receive a response from the respective operator, the use of the ’User 1’ or User 2 key
can be requested via the 'Special printer messages' (request via CSI " z, see section “Status and error messages”
in this chapter).

ESC [ n , t
Switching on/off Multi Part.
ASCII Code ESC [ n , t
Hexadecimal Value 1B 5B n 2C 74
Decimal Value 27 91 n 44 116

n = 0 : multipart off
n =1 : multipart on

Status and error messages


ESC [ n ! t
Initiating the control cycle.
ASCII Code ESC [ n ! t
Hexadecimal Value 1B 5B n 21 74
Decimal Value 27 91 n 33 116

Response:
ASCII Code ESC [ n ! t
Hexadecimal Value 1B 5B n 21 74
Decimal Value 27 91 n 33 116

n = value freely definable by the application in the range 0 to 9999.


The command CSI n ! t triggers the initiation of an acknowledgement signal to the computer interface if all the
jobs transferred up to this command have been processed.
For a definite assigning of the acknowledgement signals (also CSI n ! t) to the transferred requests, the
acknowledgement message contains the same para- meter value n that the application transferred in the
request.

ESC [ n ) t
Setting control point 2.
ASCII Code ESC [ n ) t
Hexadecimal Value 1B 5B n 29 74
Decimal Value 27 91 n 41 116

Response:
ASCII Code ESC [ n ) t
Hexadecimal Value 1B 5B n 29 74
Decimal Value 27 91 n 41 116

n = value freely definable by the application in the range 0 to 9999.

MAN10240-01 D-7 Appendix D


Programmer Manual

Function:
The command CSI n ) t triggers the release of an acknowledgement signal to
the processor interface if the last mechanical procedure was started in the prin- ting unit and no error has occurred
at this point in time.
For a definite assigning of the acknowledgement signals (also CSI n ) t) to the transferred requests, the
acknowledgement message contains the same para- meter value n that the application transferred in the
request.

ESC [ n ! z
Global printer status.
ASCII Code ESC [ n ! z
Hexadecimal Value 1B 5B n 21 7A
Decimal Value 27 91 n 33 122

Parameter:
n = 0 ONLINE
n = 1 STOP
n = 2 ERROR

Function:
This response in the coding CSI n ! z is produced spontaneously after initializing the printer, after each status
change (ONLINE, STOP, ERROR) and after a
'break' on the printer interface.
The global printer status cannot be explicitly requested (see “Notes on the printer status” in this chapter).

ESC [ n ˝ z
Special printer messages.
ASCII Code ESC [ ˝ z
Hexadecimal Value 1B 5B 22 7A
Decimal Value 27 91 34 122

Response:
ASCII Code ESC [ n ;m ˝ z
Hexadecimal Value 1B 5B n ;m 22 7A
Decimal Value 27 91 n;m 34 122

Parameter:
n= Global Code ( 0 to 999)
m= Special Code ( 0 to 999)

Function:
The special printer messages give more detailed specifications of status change (STOP) in certain cases or
indicate that the operator has pressed the USER 2 or USER I key.

Special printer messages are produced in the following cases and transferred to the system:
– when changing the appropriate statuses
– when using the USER 2 or USER Ikeys by the operator (only if the functionDual station control' was
activated using the command CSI n  t).
Further, the current status can be requested using the command CSI " z.

MAN10240-01 D-8 Appendix D


Programmer Manual

The following n/m combinations for the encryption of a special printer message are possible:

PAPER n=I/m=4
The paper sensor on the document printing point is covered with paper again
NO PAPER n=2/m=4
The paper sensor on the document printing point is no longer covered with paper
Key USER 1 n = 20 / m = I
The USER 1 key on the control panel was pressed. This printer message can only occur if
the function 'Dual station control' was activated using the command CSI n  t.
Key USER 2 n = 20 / m = 2
The USER 2 key on the control panel was pressed. This printer message can only occur if
the function 'Dual station control' was activated using the command CSI n  t.

ESC [ n # z
Special unit messages.
ASCII Code ESC [ n # z
Hexadecimal Value 1B 5B n 23 7A
Decimal Value 27 91 n 35 122

n=1 Response with parameter n8 (printer type)


n = 4915 Response with parameter n8=4915 (printer type)

Response:
ASCII Code ESC [ n1;…. :n9 # z
Hexadecimal Value 1B 5B n1;…..:n9 23 7A
Decimal Value 27 91 n1;…..:n9 35 122

Parameters (with command n=0):


n1 = Printer station number
0: Document station
1: Journal station
n2 = 3: Journal
4: Document
n3 = maximum width of form I/IO inch
n4 = Number of feed channels
2: feeder option
n5 = Number of eject channels
n5 = OCR reader option not available
n7 = MSR option
0: Option not available
1: Option available

Parameters (with command n=1):


n1 = Printer station number
0: Document station
1: Journal station
n2 = 3: Journal
4: Document

MAN10240-01 D-9 Appendix D


Programmer Manual

n3 = maximum width of form I/IO inch


n4 = Number of feed channels
2: feeder option
n5 = Number of eject channels
n5 = OCR reader option not available
n7 = MSR option
0: Option not available
1: Option available
n8 = 4905 (printer type)

Parameters (with command n=49I5):


n1 = Printer station number
0: Document station
1: Journal station
n2 = 3: Journal
4: Document
n3 = maximum width of form 1/10 inch
n4 = Number of feed channels
2: feeder option
n5 = Number of eject channels
n5 = MICR option
0: option not available
n7 = MSR option
0: Option not available
1: Option available
n8 = 49I5 (printer type)
n9 = Memory Expansion
0: No Memory Expansion
1: El. Journal
2: 2. CG
3: Asia GB 23I2
4: Asia GB 5OO7
5: Asia GB 5I99
6: Asia GB BIG 5

Function:
In the following cases the response of the printing unit parameters will be trans- ferred from the printing unit
to the system:
– after switching on the printing unit;
– as response to a 'Break' at the printer interface;
– as response to the command 'Requesting printing unit parameters'.

MAN10240-01 D-10 Appendix D


Programmer Manual

ESC [ n # q
Selection of type fonts / character sets.
ASCII Code ESC [ n # q
Hexadecimal Value 1B 5B n 23 71
Decimal Value 27 91 n 35 113

Parameter:
n = type font or character set or font number (O to 9999)

The font number is fixed when developing a specific character set.


Function:
Using this command by means of a type font or character set number n, special character sets (fonts) can be
selected which do not belong to the standard cha- racter sets of the Epson protocol.
Extensions can thus be implemented without coming into conflict with the current and future definitions of the
standard Epson protocol.
o The character fonts for the document printer have the following standard options:
DQ area = DQ
LQ area = 1. Roman
2. Sans-Serif
3. OCR-A (OCR-A1 Eurobanking)
4. OCR-B (OCR-B1 Eurobanking)

o The fonts DQ, Roman and Sans Serif can be selected using the standard commands 'Switch over
print quality’ (ESC x (n)) and ’Select LQ type font’ (ESC k (n)). In contrast, the fonts OCR A, OCR B
and ISO 8859 can only be selected by means of the additional command 'Selection of type fonts /
character sets’ (CSI n # q). The following table contains the necessary character set and font
numbers :

Font Font number


OCR-A n = 900
OCR-B n = 901
Roman ISO 8859 n = 600 (only with font CP15_437)
Sans-Serif ISO 8859 n = 601 (only with font CP15_437)
DQ ISO 8859 n = 602 (only with font CP15_437)

Country versions for the ISO 8859 character set are selected using the com- mand 'Select national
character set' (ESC R (n)):

Font Country versions


ISO 8859-2 East Europe n=0
ISO 8859-5 Cyrillic n=1
ISO 8859-7 Greece n=2
ISO 8859-8 Hebrew n=3
ISO 8859-9 Turkey n=4
ISO 8859-15 Euro n=5

The character tables for OCR-A, OCR-B and ISO 8859 are listed in the appendix
"Character set tables".

MAN10240-01 D-11 Appendix D


Programmer Manual

o Before using the command CSI n # q, the printer must be switched to 'LQ
print quality' (ESC x (n)). The character fonts selected via this command are treated as normal LQ
type fonts, this means that all standard commands (print quality and character size, types of print)
also work on these fonts in the manner described in the chapter "Standard Commands". No
special handling takes place.

ESC [ n ! q
Change between Document and Journal Printing.
ASCII Code ESC [ n ! q
Hexadecimal Value 1B 5B n 21 98
Decimal Value 27 91 n 33 113

Parameter:
n = 0 Document print (Default)
n = 1 Electronic journal memory

The parameter ’Journal memory’ is used to redirect all following print characters
to a resident memory. All control sequences are ignored, except for line feeds. This command initializes the
printout of all characters still located in the internal print buffer. Command sequences which are written into
the journal memory have no influence to the printout off the document station:
The selection Memory Expansion -> EL-Journal must be enabled in the service menu. If the selection is not
enabled, the command will be ignored.

Journal printing
The data in the journal memory can be printed on the print station using the'JOURNAL' menu (single sheet
or feeder).
– The DIN-A4 format is always used for the printout.
– Font attribute DQ I5 cpi, 8 lpi.
– Font attributes are always ignored.
An unprintable margin of 2cm is provided on each side of the journal for filing ho- les. An identifier for the
page numbers and a hint on the following pages (e.g. Page 5 of I7) are printed on the bottom of each page.

Error situation exception handling


When the printer is switched off while printing the journal data, or a print error occurs, the data is not lost, but
the complete print process must be repeated.
When the memory is filled by approx. 95 %, the status message 'End-of-paper journal' is generated.
When the journal memory is filled completely, the error message 'End-of-paper journal' is generated. Any
subsequent attempt to print data on the journal will be rejected with the same error message. Print jobs can
still be carried out on the document station.

Capacity
Because the print data is stored in compressed form, it is not possible to provide an exact specification of the
memory behavior. In typical applications, a capacity
of 3000 to 6000 print lines can be achieved.

Technical data - memory:


– 128 KB usable memory volume.
– 20 years guaranteed data retention without power supply.
– 1 million guaranteed delete/programming cycles.
– Partial deletion of data not possible.

MAN10240-01 D-12 Appendix D


Programmer Manual

Control of the MSR functions


The magnetic stripe reader (MSR) is a device which can optionally be integrated into the document printing
point of the document printer. MSR processing is used for passbook processing, whereby relevant data is
encrypted on the magnetic stripe
The execution of MSR functions does not influence the current logical print po- sition. The necessary vertical
movements for the correct positioning of the passbook for MSR are controlled internally by the document
printer.
After the output of an MSR command, any data still in the print buffer is printed.
The MSR device supports the recording modes of DIN, IBM and ISO7811

Position and measurements for MSR magnetic stripes


The print areas for passbooks with MSR processing correspond to the specifica- tions in the appendix
“Paper specification”. The position of a magnetic stripe on a passbook and the measurements of the
magnetic stripe are fixed according to DIN 32744. The following specifications are in mm. Upright fold book
(magnetic stripe for DIN/IBM format):

Vertical passbook Horizontal Book

ESC [ n1 ;… ;n5 ! r Name


Parameter block MSR.
ASCII Code ESC [ n1 ;… ;n5 ! r
Hexadecimal Value 1B 5B n1 ;… ;n5 21 72
Decimal Value 27 91 n1 ;… ;n5 33 114

Parameter:
n1 = number of write repetitions (0 to 2)
n2 = number of read repetitions (0 to 2)
n3 = identifier for the write / read format (number of the recording format)
n4 = vertical distance from the form edge (0 to 9999 in the measuring unit 1/180 inch, thus n4/180 inch)
n5 = leading edge for the vertical distance (0 = top, 1 = bottom).

MAN10240-01 D-13 Appendix D


Programmer Manual

Function:
CSI n1;...; n5 ! r is used to define under what conditions subsequent MSR tran- sactions (e. g., reading or
writing the magnetic stripe) are to be controlled by the MSR unit.

o Repetitions
The parameters nI and n2 are set if the first writing or reading attempts cannot be carried out without
error. These actions will then be automatically repeated n1 or n2 times. If they do not deliver a
correct result after repetition, the operation will be interrupted. If no data is found on the magnetic
stripe the reading or writing attempt will not be repeated.
o Write / read format; magnetic stripe position
The parameter n3 specifies the format of the data on the magnetic stripe. The position of the
magnetic stripe on the passbook is defined by the two parameters n4 and n5, whereby n4 fixes the
distance of the stripe in 1/180 inch steps from the edge defined by n5 (0 = top leading edge, 1 =
bottom leading edge).
o Table for recording formats
Depending on the recording formats, the user must transfer the following va- lues via CSI ...! r in
order to be able to process the following recording modes:

Format n3 n4 n5
DIN 0 14 mm (99/180”) 1
IBM 1 1 11 mm (78/180”) 1
IBM 2 2 11 mm (78/180”) 1
105 characters 5 11 mm (99/180”) 1
ISO7811 6 14 mm (99/180”) 1

o Default values:
If no parameters are set, the respective MSR transactions are carried out on the basis of the
following default values:
n1 = 0 (unsuccessful writing attempts are not repeated)
n2 = 0 (unsuccessful reading attempts are not repeated)
n3 = 0 (writing of the magnetic stripe in the DIN format, reading of the magnetic stripe in the DIN
format)
n4 = 99 99/180 inch vertical distance from the leading edge
n5 = 1 (bottom leading edge).

o Incorrect parameters:
If incorrect parameters are used, these are reset to their default values with the exception of n3. The
use of an incorrect n3 parameter (format) leads to an error message of the printer.

ESC [ " r
Reading an MSR track.
ASCII Code ESC [ " r
Hexadecimal Value 1B 5B 22 72
Decimal Value 27 91 34 114

Response:
ASCII Code ESC [ n1;…. :n4 " r STX…ETX
Hexadecimal Value 1B 5B n1;…..:n4 22 72 02…..03
Decimal Value 27 91 n1;…..:n4 34 114 2……3

MAN10240-01 D-14 Appendix D


Programmer Manual

n1 = Number of reading attempts


n2 = reading threshold (always = 2)
n3 = horizontal reading block number
n4 = reading error (0 = without error; > 0 = error)
STX (02h) = start of the read data area
Read data = in the range of 3Oh-3Fh (ASCII)
ETX (03h) = end of the read data area

Meaning of parameter n4 = reading error: 0 = No error


1= LRC error
2 = Parity error
3 = No data found
4 = No start character found
5 = Incorrect flux change distance
6 = No end character found
7 = Magnetic track interruption

Function:
The MSR track is read using the command CSI " r. The desired options are pre- set, if necessary, via the
command 'MSR parameter block’ (CSI ... ! r) (number of reading attempts, recording mode, position of the
magnetic stripe, etc.). Irrespective of whether the reading attempt could be completed successfully, data for
the program is transferred. In addition to the actual user data (contents of the magnetic stripe), this can also
contain statistic specifications (for example, num-
ber of reading attempts) and error messages..

Format n3 Stat Character End Character


DIN 0 3D 3F
IBM 1 1 3B 3C
IBM 2 2 3B 3F
105 characters 5 3D 3F
ISO7811 6 3B 3F

Depending on the recording format, the following user data can be read:

Format n3 Max. number Information


information character
characters
range (hex)
DIN 0 45 30 to 39 + 3E
IBM 1 1 36 30 to 39 + 3A 3D 3E
IBM 2 2 36 30 to 39 + 3A 3D 3E
105 characters 5 105 30 to 39 + 3E
ISO7811 6 35 30 to 39 + 3A 3E

MAN10240-01 D-15 Appendix D


Programmer Manual

ESC [ # r STX..ETX
Writing an MSR track.
ASCII Code ESC [ # r STX..ETX
Hexadecimal Value 1B 5B 23 72 02…03
Decimal Value 27 91 35 114 2…3

Response:
ASCII Code ESC [ n1:n2 # r
Hexadecimal Value 1B 5B n1:n2 23 72
Decimal Value 27 91 n1:n2 35 114

n1= number of required writing attempts


n2 = error in the read after write check (0 = no error, 1 = error)

Function:
The block of characters specified via CSI # r between STX and ETX is recorded on the magnetic stripe
under the conditions set using the command ’MSR parameter block’ (CSI ... ! r). The character string must
contain the start and end characters appropriate to the selected recording format:

Format n3 Start character End character


DIN 0 3D 3F
IBM 1 1 3B 3C
IBM 2 2 3B 3F
105 characters 5 3D 3F
ISO7811 6 3B 3F

After the execution of the command a acknowledgement CSI nI; n2 # r is produced, which can be evaluated
in the program. The acknowledgement contains the number of writing attempts and a message if an error
has occurred during control reading.

ESC [ % r
Deleting an MSR track.
ASCII Code ESC [ % r
Hexadecimal Value 1B 5B 25 72
Decimal Value 27 91 37 114

Function:

The vertical position on the magnetic stripe fixed at the transfer of the MSR parameters (CSI ... ! r) is
overwritten with 'ZERO' characters (the MSR track is deleted).

MAN10240-01 D-16 Appendix D


Programmer Manual

Appendix E – IBM/EPSON Character Sets

PC Standard Character Sets ................................... E.2 GOST (Russian) ..................................................E.27


CS1 ........................................................................ E.2 Mazowia ...............................................................E.28
CS2 ........................................................................ E.3 TASS (Cyrillic)......................................................E.29
EPSON National Variations ..................................... E.4 96Greek................................................................E.30
IBM National Variations............................................ E.5 Ku..........................................................................E.31
USA (CP 437)........................................................ E.5 Farsi Arabic (CP1098).........................................E.32
Greek (CP437-G).................................................. E.6 ID-12.....................................................................E.33
CP437 Slavic......................................................... E.7 ID-14.....................................................................E.34
Multilanguage (CP850)......................................... E.8 ID-17.....................................................................E.35
Greek (CP851) ...................................................... E.9 Philip .....................................................................E.36
Latin2 (CP852) ........................................................10 Roman-8 ..............................................................E.37
Turkish (CP853) .................................................. E.11 Sanyo ...................................................................E.38
Russian (CP855)................................................. E.12 Ukrainian ..............................................................E.39
Turkish (CP857) .................................................. E.13 ISO 8859/1 (Latin 1) ............................................E.40
Euro PC Multilingual (CP858) ............................ E.14 ISO 8859/2 (Latin 2) ............................................E.41
Portuguese (CP860) ........................................... E.15 ISO 8859/3 (Latin 3) ............................................E.42
Hebrew (CP862) ................................................. E.16 ISO 8859/4 (Latin 4) ............................................E.43
French/Canadian (CP863) ................................. E.17 ISO 8859/5 (Latin/Cyrillic) ...................................E.44
Arabic (CP864).................................................... E.18 ISO 8859/6 (Latin/Arabic)....................................E.45
Norwegian (CP865) ............................................ E.19 ISO 8859/7 (Latin/Greek) ....................................E.46
Cyrillic (CP866).................................................... E.20 ISO 8859/8 (Latin/Hebrew) .................................E.47
Turkish (CP867) .................................................. E.21 ISO 8859/9 (Latin 5) ............................................E.48
OCR-A (CP876) .................................................. E.22 ISO 8859/15 (Latin 9) ..........................................E.49
OCR-B (CP877) .................................................. E.23
Central Europe (CP1250)................................... E.24
Cyrillic (CP1251) ................................................. E.25
Windows Latin1 Ansi (CP1252) ......................... E.26

MAN10240-01 E-1 Appendix E


Programmer Manual

PC Standard Character Sets

CS1

MAN10240-01 D-2 Appendix E


Programmer Manual

CS2

MAN10240-01 D-3 Appendix E


Programmer Manual

EPSON National Variations

MAN10240-01 D-4 Appendix E


Programmer Manual

IBM National Variations

USA (CP 437)

MAN10240-01 D-5 Appendix E


Programmer Manual

Greek (CP437-G)

MAN10240-01 D-6 Appendix E


Programmer Manual

CP437 Slavic

MAN10240-01 D-7 Appendix E


Programmer Manual

Multilanguage (CP850)

MAN10240-01 D-8 Appendix E


Programmer Manual

Greek (CP851)

MAN10240-01 D-9 Appendix E


Programmer Manual

Latin2 (CP852)

MAN10240-01 D-10 Appendix E


Programmer Manual

Turkish (CP853)

MAN10240-01 D-11 Appendix E


Programmer Manual

Russian (CP855)

MAN10240-01 D-12 Appendix E


Programmer Manual

Turkish (CP857)

MAN10240-01 D-13 Appendix E


Programmer Manual

Euro PC Multilingual (CP858)

MAN10240-01 D-14 Appendix E


Programmer Manual

Portuguese (CP860)

MAN10240-01 D-15 Appendix E


Programmer Manual

Hebrew (CP862)

MAN10240-01 D-16 Appendix E


Programmer Manual

French/Canadian (CP863)

MAN10240-01 D-17 Appendix E


Programmer Manual

Arabic (CP864)

MAN10240-01 D-18 Appendix E


Programmer Manual

Norwegian (CP865)

MAN10240-01 D-19 Appendix E


Programmer Manual

Cyrillic (CP866)

MAN10240-01 D-20 Appendix E


Programmer Manual

Turkish (CP867)

MAN10240-01 D-21 Appendix E


Programmer Manual

OCR-A (CP876)

MAN10240-01 D-22 Appendix E


Programmer Manual

OCR-B (CP877)

MAN10240-01 D-23 Appendix E


Programmer Manual

Central Europe (CP1250)

MAN10240-01 D-24 Appendix E


Programmer Manual

Cyrillic (CP1251)

MAN10240-01 D-25 Appendix E


Programmer Manual

Windows Latin1 Ansi (CP1252)

MAN10240-01 D-26 Appendix E


Programmer Manual

GOST (Russian)

MAN10240-01 D-27 Appendix E


Programmer Manual

Mazowia

MAN10240-01 D-28 Appendix E


Programmer Manual

TASS (Cyrillic)

MAN10240-01 D-29 Appendix E


Programmer Manual

96Greek

MAN10240-01 D-30 Appendix E


Programmer Manual

Ku

MAN10240-01 D-31 Appendix E


Programmer Manual

Farsi Arabic (CP1098)

MAN10240-01 D-32 Appendix E


Programmer Manual

ID-12

MAN10240-01 D-33 Appendix E


Programmer Manual

ID-14

MAN10240-01 D-34 Appendix E


Programmer Manual

ID-17

MAN10240-01 D-35 Appendix E


Programmer Manual

Philip

MAN10240-01 D-36 Appendix E


Programmer Manual

Roman-8

MAN10240-01 D-37 Appendix E


Programmer Manual

Sanyo

MAN10240-01 D-38 Appendix E


Programmer Manual

Ukrainian

MAN10240-01 D-39 Appendix E


Programmer Manual

ISO 8859/1 (Latin 1)

MAN10240-01 D-40 Appendix E


Programmer Manual

ISO 8859/2 (Latin 2)

MAN10240-01 D-41 Appendix E


Programmer Manual

ISO 8859/3 (Latin 3)

MAN10240-01 D-42 Appendix E


Programmer Manual

ISO 8859/4 (Latin 4)

MAN10240-01 D-43 Appendix E


Programmer Manual

ISO 8859/5 (Latin/Cyrillic)

MAN10240-01 D-44 Appendix E


Programmer Manual

ISO 8859/6 (Latin/Arabic)

MAN10240-01 D-45 Appendix E


Programmer Manual

ISO 8859/7 (Latin/Greek)

MAN10240-01 D-46 Appendix E


Programmer Manual

ISO 8859/8 (Latin/Hebrew)

MAN10240-01 D-47 Appendix E


Programmer Manual

ISO 8859/9 (Latin 5)

MAN10240-01 D-48 Appendix E


Programmer Manual

ISO 8859/15 (Latin 9)

MAN10240-01 D-49 Appendix E


Programmer Manual

This page is intentionally left blank.

MAN10240-01 D-50 Appendix E


Programmer Manual

Appendix F – OLIVETTI Character Sets

CS000 – C010 International ...............................F-2


CS020 Germany..................................................F-3
CS030 Portugal ...................................................F-4
CS040 Spain1......................................................F-5
CS050 Denmark/Norway....................................F-6
CS060 France .....................................................F-7
CS070 Italy...........................................................F-8
CS080 Sweden/Portugal ....................................F-9
CS090 Switzerland............................................F-10
CS100 Great Britain ..........................................F-11
CS110 USA Ascii...............................................F-12
CS140 Greece...................................................F-13
CS150 Israel ......................................................F-14
CS170 Spain 2...................................................F-15
CS200 Yugoslavia.............................................F-16
CS410 Olivetti TCV 370....................................F-17
CS510 SDC .......................................................F-18
CS520 Turkey....................................................F-19
CS540 CIBC ......................................................F-20
CS680 OLI-UNIX...............................................F-21
CS701 PC-220 ..................................................F-22
CS711 PC-Denmark/Norway ...........................F-23
CS712 PC-Denmark OPE ................................F-24
CS771 PC-210 Greek .......................................F-25

MAN10240-01 F-1 Appendix F


Programmer Manual

CS000 – C010 International

MAN10240-01 F-2 Appendix F


Programmer Manual

CS020 Germany

MAN10240-01 F-3 Appendix F


Programmer Manual

CS030 Portugal

MAN10240-01 F-4 Appendix F


Programmer Manual

CS040 Spain1

MAN10240-01 F-5 Appendix F


Programmer Manual

CS050 Denmark/Norway

MAN10240-01 F-6 Appendix F


Programmer Manual

CS060 France

MAN10240-01 F-7 Appendix F


Programmer Manual

CS070 Italy

MAN10240-01 F-8 Appendix F


Programmer Manual

CS080 Sweden/Portugal

MAN10240-01 F-9 Appendix F


Programmer Manual

CS090 Switzerland

MAN10240-01 F-10 Appendix F


Programmer Manual

CS100 Great Britain

MAN10240-01 F-11 Appendix F


Programmer Manual

CS110 USA ASCII

MAN10240-01 F-12 Appendix F


Programmer Manual

CS140 Greece

MAN10240-01 F-13 Appendix F


Programmer Manual

CS150 Israel

MAN10240-01 F-14 Appendix F


Programmer Manual

CS170 Spain 2

MAN10240-01 F-15 Appendix F


Programmer Manual

CS200 Yugoslavia

MAN10240-01 F-16 Appendix F


Programmer Manual

CS410 Olivetti TCV 370

MAN10240-01 F-17 Appendix F


Programmer Manual

CS510 SDC

MAN10240-01 F-18 Appendix F


Programmer Manual

CS520 Turkey

MAN10240-01 F-19 Appendix F


Programmer Manual

CS540 CIBC

MAN10240-01 F-20 Appendix F


Programmer Manual

CS680 OLI-UNIX

MAN10240-01 F-21 Appendix F


Programmer Manual

CS701 PC-220

MAN10240-01 F-22 Appendix F


Programmer Manual

CS711 PC-Denmark/Norway

MAN10240-01 F-23 Appendix F


Programmer Manual

CS712 PC-Denmark OPE

MAN10240-01 F-24 Appendix F


Programmer Manual

CS771 PC-210 Greek

MAN10240-01 F-25 Appendix F


Programmer Manual

This page is intentionally left blank.

MAN10240-01 F-26 Appendix F


COMPUPRINT s.r.l.
Via Lombardore, 282
10040 Leinì (TO)
ITALY

SPECIFICATIONS ARE SUBJECT TO CHANGE WITHOUT NOTICE.


This manual refers to various company and products by their trade names.
In most of the cases, these designations are claimed as trademarks or
registered tramarkers by their respective companies.

Copyright 2011 COMPUPRINT s.r.l. - Printed in Italy

You might also like