T5023/5023+ Programming Guide
"All rights, including rights of translation by printing, copying or similar methods, even of parts, are reserved. All rights, including rights created by patent grants or registration of a utility model or design, are reserved. Delivery subject to availability; right of technical modifications reserved." TRADEMARKS All names of hardware and software products mentioned in this manual are trade names and/ or trademarks of their respective manufactores.
Contents Preface ..................................................................................................... 1 Conventions .............................................................................................. 1 Abbreviations ............................................................................................ 2 Use of the manual ..................................................................................... 2 Contents of the manual ............................................
Contents Standard commands............................................................................. 33 Notes about command description.......................................................... 33 Description components.................................................................... 33 Coding of decimal command parameters ......................................... 34 Controlling the configuration of the printer .............................................. 41 Initializing the printer ...............
Contents Paper control .................................................................................... 74 Horizontal print control ........................................................................... 75 Setting the left margin ...................................................................... 77 Setting the right margin ................................................................... 80 Setting the text alignment ...............................................................
Contents Character set commands .................................................................. 123 Character set selection ......................................................................... 124 Definition of characters.......................................................................... 133 Notes on the use of user defined characters......................................... 145 Syntax of the character set commands .................................................
Contents Absolute vertical positioning ........................................................... 194 Relative vertical positioning backwards .......................................... 196 Requesting the document width...................................................... 197 Document edge detection ............................................................... 198 Activating passbook processing...................................................... 199 Specification of the horizontal leading edge .......
Contents Passbook processing with MSR............................................................ 265 Passbook data ................................................................................ 266 Program steps (annotated) ............................................................. 267 Program (pseudo code) .................................................................. 270 Loadable Firmware/Character Generators........................................ 273 Activating the Load Function .............
Contents ISO 8859-9 Latin No. 5 ................................................................... 312 ISO 8859-15.................................................................................... 313 OCR-A ............................................................................................ 314 OCR-B ............................................................................................ 315 Code Page ISO 2............................................................................
Contents Paper Specifications.............................................................................. 356 Reference Lines .............................................................................. 356 Error messages ..................................................................................... 359 Status messages............................................................................. 359 Status messages (Bootstrap loader activated) .............................. 360 Malfunctions .....
Preface This programming manual describes in the main the instruction set of the multifunctional flat bed printer. The document printer is a workstation printer with one printing point and is used to process documents and passbooks. The printer can be fitted with a magnetic stripe reader (MSR) as an option. This manual is intended for all users, who wish to create their own programs, for example, for document or passbook processing .
Abbreviations Preface Abbreviations APA graphics APR CS DQ IF LQ MSR MICR CSI LSB MSB OCR All Points Addressable graphics Automatic Passbook Reader Character Set Draft Qualitiy Interface Letter Quality Magnetic Stripe Reader Magnetic Ink Character Recognition Control Sequence Introducer Least Significant Bit Most Significant Bit Optical Character Recognition printer fonts Use of the manual This manual describes printer programming for various document processing applications.
Preface Contents of the manual Contents of the manual Chapter “Short description of the document printer“ This chapter briefly lists the hardware components of the document printer and outlines the application areas of the printer. Chapter “Programming interface (General)” This chapter outlines the basic principle of logical communication between an application and the printer via ESC sequences. The functions of the multifunctional document printer are described using examples.
Contents of the manual Preface Chapter “Additional commands” This chapter explains special control commands for document processing or for processing ZeKoSa data. An important application area for the commands described here is the processing of passbooks. This also contains important information on processing documents using horizontal and vertical print positioning.
Preface Contents of the manual Appendix The appendix of this product manual contains the following information: – List of all document printer commands – Character set tables – Printable document and paper versions/ paper specification – Table of error messages – Description of the physical interface Chapter “Index“ Facilitates searching for selected terms.
Contents of the manual 6 T5023/5023+ - Programming Guide Preface
Short description of the document printer The document printer has a document printing point with which single documents, multiple documents (sets of forms) and passbooks can be processed. The printer can also be equipped with a magnetic stripe reader (MSR), a magnetic ink card rea- der (MICR) or a single sheet feeder as an option. Document printing point The term ’document’ includes all single documents, for example, cheques, unprinted DIN A4 papers (blank documents), forms of various sizes or passbooks.
Options Short description of the document printer Options Magnetic stripe reader (MSR) As an option, the document printer can be delivered with a magnetic stripe reader (MSR device) for passbooks. This enables reading and updating from the magnetic stripe on passbooks depending on certain recording modes (DIN / IBM). It is possible to change between various recording modes via the program. MICR Magnetic ink character reader for the fonts CMC7 and E13B. Feeder Single sheet feeder for 500 sheets A4.
Short description of the document printer System interface System interface Data, which activates the functions of the printer is transferred through the system interface. The interfaces has the following characteristics: – the physical connection – the logic protocol (command sequences) The characteristics are selected via the operating panel. Physical interface Two interfaces are available: – internal interface (RS232) – optional (external) interface (Centronics, LAN, etc.
System interface Short description of the document printer Epson ANSI The manual describes detailed this emulation. As all functions of the printer are supported optimal, this emulation should be used for the relisation of new applications. Also this emulation can be used for the removal of the following printers: – EPSON ESC P – ND 90 – HPR 4904 – HPR 4905 IBM 4722, Proprinter XL 24, Olivetti This emulations copy printers of other producers (partially with restrictions).
Short description of the document printer Application areas Application areas The processing of single/multiple documents and passbooks allows the use of the document printer in the following areas: Industry and commerce: – Delivery notes – Freight and customs papers – Invoices – Envelopes Public authorities: – Application forms – Filing cards – Tax car ds – Motor vehicle papers – Driving licences Banks, Insurances and Services: – Passbooks – Cheques – Transfers – Medical certific
Application areas 12 Short description of the document printer T5023/5023+ - Programming Guide
Programming interface (General) This chapter contains general information on how the functions of the document printer can be activated by a user program, i. e., how the document printer can be programmed. This chapter also explains the functions which can be activated by means of the program in a short, comprehensive summary.
Encryptions/Codes Programming interface (General) ASCII code A code table specifies how the printable characters and control commands, for example, for document ejection and carriage return are encrypted binarily in the computer or printer. The encryption is expressed by a corresponding hexadecimal or decimal number. A certain character then lies in hexadecimal notation or in the decimal representation, for example, in the range hex 00 to hex FF or decimal 0 to decimal 255 (8- bit encryption).
Programming interface (General) Encryptions/Codes characters depending on the command I (= Intermediate Character) and F (= Final Character). The CSI sequences are used to control special document printer functions for document and MSR processing (see “document printer specifications” in this chapter and the chapter “Additional commands”).
Encryptions/Codes Programming interface (General) Activating the document printer functions The control codes or ESC or CSI sequences must be addressed to the printer directly and uniquely via corresponding program commands. Depending on the respective programming language, this is, e. g., via PRINT or WRITE instructions. Example: Three lines are to be printed. Lines 1 and 3 are printed in normal print, line 2 in italic print.
Programming interface (General) Print effects Print effects The design of a print product is dependent on the print quality, type font, type size or character width and highlighting text, e. g., by underlining or bold print. Print quality The print quality is characterized by the density of the print characters and by the print rate. The document printer provides two print qualities: – LQ mode (Letter Quality) The LQ mode has the higher print quality and lower print rate.
Print effects Programming interface (General) Fonts In addition to the DQ font for drafts, the default fonts Roman, Sans Serif, OCR A (OCR A1 Eurobanking) and OCR B (OCR B1 Eurobanking), as well as the character set ISO 8859 with the following versions are available for Letter Quality (LQ mode): – East Europe – Cyrillic – Greece – Hebrew – Tur key The DQ, Roman and Sans Serif fonts are selected via corresponding ESC sequences in the program.
Programming interface (General) Print effects Font size / character density The width of a printed character is expressed in ’characters per inch’ (cpi) and is often called ’character density’, for example 10 characters per inch = 10 cpi The document printer can print in the character widths 10, 12 and 15 pitch. Each individual character is then the same width. Example: The font size can also be influenced by proportional type, as well as by elongated or condensed print.
Print effects Programming interface (General) Condensed print If printing takes place in 10 or 12 pitch in condensed print, each character can be reduced to 60% of its width in normal print.
Programming interface (General) Print effects Highlighting text The following print functions of the document printer can be influenced by corresponding ESC sequences: – Double impact print/ bold print – Underlining – Superscript/ subscript – Double Superscript Double impact print / bold print With double impact print (= vertical bold print) the print head goes over each line twice.
Print effects Programming interface (General) Superscript / subscript Footnotes, equation or special text designs are possible by switching superscript and subscript on and off.
Programming interface (General) Print effects Page layout By means of appropriate ESC sequences the page design can be influenced or the text output controlled on the basis of pre- printed forms. This includes, for example: – Setting and deleting horizontal and vertical tabs – Setting the width of a printed page – Setting the line spacing – Presenting a text flush left, flush right, centered or with margin justification.
Print effects Programming interface (General) Example (Text adjustment): Example (line spacing): 24 T5023/5023+ - Programming Guide
Programming interface (General) Character tables Character tables Two areas are differentiated with the printable characters in a code table: – Area with the basic character set of each type font (Draft standard type, Roman, Sans Serif). This area is also called the ’basic character table’. The characters of the basic character table are encrypted in ASCII by the codes hex 20 to hex 7F (decimal 32 to 127).
Character tables Programming interface (General) National character sets By selecting a national character set, characters used in other languages are additionally available to the user. The selection of national character sets results via an ESC sequence or via the operating panel of the printer. These characters replace in each case the corresponding encrypted characters in the basic character table. Examples: Code Basic character Italy Japan Norway 5B 60 7C Ä , : .
Programming interface (General) Character tables where each dot is to be printed. Characters defined by the user are copied by means of ESC sequences into the memory of the document printer. It is possible to switch over at will between the normal character set and that defined by the user.
Document printer specifications Programming interface (General) Document printer specifications Business procedures or transactions in a financial institution involve a series of manual and program activities, e. g., the insertion and removal of documents and passbooks or the entry of deposits and withdrawals, bank code and account number. These processes are supported by special banking periphery and the appropriate programs.
Programming interface (General) Document printer specifications Document printing For documents (DIN A4 sheets, standard forms) or passbooks the logical structure of a document must be considered. Example (passbook constants): 1 Page heading area (is not printed during a passbook transaction) 2 3 4 Area with lines for logging deposits and withdrawals Last printable line Footer area (is not printed during a passbook transaction).
Document printer specifications Programming interface (General) Magnetic stripe processing The device called MSR is used for processing magnetic stripes on passbooks. The MSR equipment allows an automatic reading and updating of data in encrypted form. In what form the appropriate data is encrypted on a MSR magnetic stripe depends on the respective recording mode (DIN/IBM).
Programming interface (General) Document printer specifications Special features of the document processing When processing documents, in contrast to the normal processing of single sheets or continuous forms, the varying sizes of the documents and the document feeding mode must be considered. Insertion and ejection of documents In principle there are two possibilities for controlling the insertion and ejection of documents.
Document printer specifications 32 Programming interface (General) T5023/5023+ - Programming Guide
Standard commands This chapter describes all Epson- compatible commands (ESC sequences). Commands for changing character sets (see “Character set commands”) and commands with which graphics can be created (see “Graphics commands”) are not included here. Special commands (CSI sequences) for document processing or for processing MSR data are described in the chapter “Additional commands”.
Notes about command description Standard commands Example of a formal command description (command syntax): ESC 27 1B Q R A 65 41 (n) n n ASCII character Decimal Hexadecimal Q R Command name/ESC sequence Decimal encryption according to ASCII table Hexadecimal encryption according to ASCII table Coding of decimal command parameters All command parameters n or n1, n2, etc.
Standard commands Notes about command description Example: Determining the document length at n inches ESC 27 1B A 65 41 Q (n) n n ASCII character Decimal Hexadecimal Function: ESC C NUL( n) sets the document length at n inches (absolute document length independent of the line spacing). The value n must be between 1 (inch) and 22 (inches).
Notes about command description Standard commands Example: BEGIN PRINTLF("Print page with bottom margin") CALL LINE PRINT PRINT(char(27),"O") PRINTLF("Print page without bottom margin") CALL LINE PRINT END BEGIN LINE PRINT SET N = 0 REPEAT SET N = N + 1 PRINTLF("Line", N,"after title") UNTIL N = 6 END LINE PRINT Explanation of the pseudo code instructions: 1 2 3 4 5 6 7 7 7 8 Function Coding Instruction block Loop Alternative Initializing Changing variable value Subprogram call Printing without line
Standard commands Notes about command description 1 When defining subprograms, after BEGIN and END the subprogram name is specified (for example, BEGIN LINE PRINT ... END LINE PRINT). 2 The instruction within REPEAT ... UNTIL (loop body) are executed until the abort criterion specified after UNTIL is fulfilled (for example, REPEAT ... UNTIL N = 6).
Notes about command description Standard commands The following values occur as arguments of PRINT and PRINTLF: Argument Meaning "x" Code of a printable character x from the sequence ESC character (x) ... x ... x := decimal encryption of an ASCII value character (a, b,..., n) "text" A, B, C,..., N or counter, page, pass, etc. or x := value of a parameter n, m, etc., which is to be coded binarily char( a), char( b), ...
Standard commands Notes about command description Setting the document length (for example, 6 inches = ESC C NULL 6): PRINT( char(27,67,0,6)) or PRINT( char(27),"C", char(0), char(6)) Initializing the printer after printing with line feed: PRINT("text", char(10), char(27),"@") or PRINT("text") PRINT(char( 10)) PRINT(char( 27),"@") or PRINTLF("text") PRINT(char(27),"@") Printing variable values: SET counter = 0 REPEAT SET counter = counter + 1 PRINTLF("This is the line",counter) UNTIL counter = 10 Enlargin
Notes about command description Standard commands Reaction to incorrect parameters or incorrect syntax Normally incorrect parameters n, n1, etc. are automatically replaced by the respective default value (for example, if the specified value range is exceeded). Commands with parameters which are within the specified value range, but infringe on the set conditions, are ignored (for example, if horizontal absolute positioning is attempted outside the possible print area).
Standard commands Controlling the configuration of the printer Controlling the configuration of the printer The status of the printer can be controlled from a program irrespective of the data to be printed via the following control commands: Command Function ESC @ ESC < ESC U (n) ESC > ESC = ESC # Initializing the printer Selecting unidirectional printing for one line Unidirectional printing mode on/ off one line Setting the 8th bit of incoming data (MSB = 1) Deleting the 8th bit of incoming data (MSB
Controlling the configuration of the printer Standard commands Initializing the printer ESC 27 1B @ 64 40 ASCII character Decimal Hexadecimal Function: Via ESC @ the printer can be reset by the program to certain operating conditions (initializing of software). ESC @ resets the printer to the default values and deletes all the print data of the current line out of the print buffer, which were transmitted prior to the command.
Standard commands i Controlling the configuration of the printer When initializing or defining printer parameters for certain applications, the following cases are to be differentiated: – Parameters, which are specified by means of their default value – Parameters, which are set by corresponding ESC sequences (document length, type font, character width, etc.) – Parameters, which are reset to their default value by means of the command ESC @.
Controlling the configuration of the printer Standard commands Selecting unidirectional printing for one line ESC 27 1B ASCII character Decimal Hexadecimal < 60 3C Function: Via ESC < the next printing line is printed from right to left. This command will be cancelled automatically by a carriage return (CR). Switching the unidirectional printing mode on/ off ESC 27 1B U 85 55 (n) n n ASCII character Decimal Hexadecimal Function: Normally printing is bidirectional (optimal printing path).
Standard commands Controlling the configuration of the printer BEGIN PRINT(char(27),"U",char(0)) <-- bidirectional on PRINTLF("bidirectional printing") PRINTLF("bidirectional printing") PRINTLF("bidirectional printing") PRINT(char(27),"U",char(1)) PRINTLF() <-- bidirectional off PRINTLF("unidirectional printing") PRINTLF("unidirectional printing") PRINTLF("unidirectional printing") END Result: T5023/5023+ - Programming Guide 45
Controlling the configuration of the printer Standard commands Setting the MSB to 1 ESC 27 1B > 62 3E ASCII character Decimal Hexadecimal Function: ESC > sets the most significant bit (MSB) of all incoming data to 1. Thus it is possible to print italic or graphics characters or characters defined by the user for programs on computers, which only transfer 7- bit data (access to character table range from hex 80 to hex FF).
Standard commands Controlling the configuration of the printer Setting the MSB to 0. ESC 27 1B = 61 3D ASCII character Decimal Hexadecimal Function: ESC = sets the most significant bit (MSB) of all incoming data to 0 (zero). Thus it is possible to print characters of the standard code table even for programs on computers which only transfer 7- bit data.
Controlling the configuration of the printer Standard commands Deleting the MSB specification ESC 27 1B # 35 23 ASCII character Decimal Hexadecimal Function: ESC # cancels the MSB specification (deleting or setting the most significant bit) resulting from ESC = or ESC >. i 48 An MSB specification resulting from ESC = or ESC > is also cancelled, when the printer is initialized with software (see ESC @).
Standard commands Controlling the configuration of the printer Printer offline DC3 19 13 ASCII character Decimal Hexadecimal Function: DC3 (device control 3) switches the printer offline (printer inactive) until a DC1 code (printer online) is received. In no way can the printer be reactivated via the STOP key. Printer online DC1 17 11 ASCII character Decimal Hexadecimal Function: DC1 (device control 1) switches the printer back online after it has previously been switched offline by a DC3 code.
Controlling the configuration of the printer Standard commands Automatic single sheet feeder on/off ASC II Decimal Hexadecimal Function 0 1 48 49 30 31 2 50 32 4 R 52 82 34 52 Switches single sheet feeder off Selects feeder compartment 1 (only if 2 feeder compartments are available) Selects feeder compartment 2 (only if 2 feeder compartments are available) Switches single sheet feeder on Ejects one sheet without pulling in a new one.
Standard commands Special character codes Special character codes In this chapter the following commands are described: Command Function CR BS DEL CAN Carriage Return Backspace of one character Deleting a character Canceling a line J J Carriage return CR 13 0D ASCII character Decimal Hexadecimal Function: After CR (carriage return) the data contained in the buffer is printed and the print head is returned logically to the left edge.
Special character codes Result: – CR without line feed – CR with line feed 52 T5023/5023+ - Programming Guide Standard commands
Standard commands Special character codes Backspace of one character BS 8 08 ASCII character Decimal Hexadecimal Function: After each BS character (backspace) the print head is moved logically one character to the left. Thus characters can be printed one upon the other. If this command is received immediately following graphics printing, the print head will return to the position in which it was before the start of graphics printing.
Special character codes Standard commands Deleting a character DEL 127 7F ASCII character Decimal Hexadecimal Function: DEL (Delete) deletes the previous text character in the buffer as long as it has not yet been printed. The control codes remain unchanged. Cancelling a line CAN 24 18 ASCII character Decimal Hexadecimal Function: CAN (Cancel) cancels in the printing buffer the whole text of one print line prior to this code, but not the control codes.
Standard commands Line feed commands Line feed commands The standard line spacing amounts to six lines per inch, i. e. the line spacing is 1/ 6 inch. The line spacing can be changed using the following commands, whereby the smallest unit for the line spacing is 1/ 180 inch.
Line feed commands Standard commands Line feed LF 10 0A ASCII character Decimal Hexadecimal Function: On receipt of the command LF (line feed) the data contained in the buffer is printed and the paper transported one line further according to the current line spacing. i 56 – If after LF the logical bottom edge of the sheet is exceeded (depending on the set document format), the document is ejected. – If a bottom margin set using ESC N (n) is exceeded, the document is also ejected.
Standard commands Line feed commands Carrying out an n/ 180 inch line feed ESC 27 1B J 74 4A (n) n n ASCII character Decimal Hexadecimal Function: ESC J (n) transports the paper n/ 180 inch on. A value between 0 and 255 must be given for n. This command produces an immediate line feed, but does not effect a carriage return (no CR with positioning of the print head at the beginning of the line).
Line feed commands Standard commands Determining 1/8 inch line spacing ESC 27 1B 0 48 30 ASCII character Decimal Hexadecimal Function: ESC 0 sets the line spacing to 1/8 inch for the subsequent line feed commands. The 0 is the ASCII character for the figure zero and not the ASCII code 0.. i The line spacing set by ESC 0 is cancelled, if – the printer is initialized a new (ESC @) – a different line spacing is set by means of ESC 2, ESC 3 (n) or ESC A (n).
Standard commands Line feed commands Determining 1/6 inch line spacing ESC 27 1B 2 50 32 ASCII character Decimal Hexadecimal Function: ESC 2 sets the line spacing to 1/ 6 inch for the subsequent line feed commands. This value is the effective default value when the printer is switched on. The 2 is the ASCII character for the figure two and not the ASCII code 2. Example: see ESC 0.
Line feed commands Standard commands Determining n/180 inch line spacing ESC 27 1B 3 51 33 (n) n n ASCII character Decimal Hexadecimal Function: ESC 3 (n) sets the line spacing to n/ 180 inch for the subsequent line feed commands. A value between 0 and 255 inclusive must be given for n. The 3 is the ASCII character for the figure three and not the ASCII code 3. Example: A demonstration of the printout for n = 1 to 20 with a measuring unit of n/ 180 inch line spacing.
Standard commands Line feed commands Determining n/60 inch line spacing ESC 27 1B A 65 41 (n) n n ASCII character Decimal Hexadecimal Function: ESC A (n) sets the line spacing to n/ 60 inch for the subsequent line feed commands. A value between 0 and 127 inclusive must be given for n (0 = no feed). Example: A demonstration of the printout using four n- values (0, 3, 5, 18) with a measuring unit of n/ 60 inch line spacing. 6 lines are printed for each n.
Line feed commands Standard commands Result: 62 T5023/5023+ - Programming Guide
Standard commands Line feed commands Determining n/360 inch line spacing ESC 27 1B + 43 2B (n) n n ASCII character Decimal Hexadecimal Function: ESC + (n) sets the line spacing to n/ 360 inch for the subsequent line feed commands (LF). A value between 0 and 255 inclusive must be given for n. i As the document printer can only execute line feeds in a matrix of min. 1/180 inch, an uneven value for n (1, 3, 5, ...) leads to a rounding-off error of 1/360 inch.
Sheet ejection commands Standard commands Sheet ejection commands The length of a document can be set directly or indirectly and the document ejected using the following commands: Command Function FF ESC C (n) ESC C NUL (n) Sheet ejection Determining the document length in lines Determining the document length in inches i Using ESC C (n) or ESC C NUL (n) the document length depending on the size of the document to be processed is set for the document.
Standard commands Sheet ejection commands Sheet ejection FF 12 0C ASCII character Decimal Hexadecimal Function: After FF all the data still contained in the printing buffer is printed and subsequently the current document ejected.
Sheet ejection commands Standard commands Determining the document length at n lines ESC 27 1B C 67 43 (n) n n ASCII character Decimal Hexadecimal Function: ESC C (n) sets the document length at n lines in the selected line spacing. A value between 1 and 127 must be given for n. The actual physical document length is then determined by the respective current line spacing. It should be noted that the respective document length (n lines ∗ line spacing) must not exceed the length of the document.
Standard commands Sheet ejection commands Determining the document length at n inches ESC 27 1B C 67 43 NUL 0 00 (n) n n ASCII character Decimal Hexadecimal Function: ESC C NUL (n) sets the document length at n inches (absolute document length independent of the line spacing). The value of n must lie between 1 (inch) and 50 (inches) inclusive. The value n (inches) must be selected so that the length of the paper format is not exceeded.
Vertical print control Standard commands Vertical print control This section describes the commands for setting vertically arranged document positions (end of document and vertical tabs). An automatic end of document and feeding on certain lines are thus possible without the corresponding printing of blank lines. The data of vertical tabs is allocated to channels, which are numbered from 0 to 7. Command Function ESC N (n) ESC O ESC B ... NUL ESC b (c) ...
Standard commands Vertical print control Setting the bottom margin ESC 27 1B N 78 4E (n) n n ASCII character Decimal Hexadecimal Function: ESC N (n) sets a bottom margin of n lines in the currently valid line spacing. The standard document length (presetting of the printer) or the document length set by ESC C (document length in lines) or by ESC C NUL (document length in inches) serves as the basis. A value between 0 and 127 can be selected for n.
Vertical print control i Standard commands – Subsequent alterations to the line spacing have no influence on the set margin area. If necessary, after a change in the line spacing the bottom margin setting must be deleted (ESC O) and then reset using ESC N. – A set bottom margin is automatically cancelled, when the document length is altered using ESC C or ESC C NUL.
Standard commands Vertical print control Determining / deleting vertical tabs (channel 0) ESC 27 1B B 66 42 (n1) n1 n1 (n2) n2 n2 ... ... ... NUL 0 00 ASCII character Decimal Hexadecimal Function: – Setting tabs Using ESC B ... NUL up to 16 vertical tabs can be determined in the relevant line spacing. Subsequent alterations in the line spacing do not affect this. The tab values are entered as n1, n2 (number of lines), etc. from 1 up to and including 255 in ascending order.
Vertical print control Standard commands Determining / deleting vertical tabs for any channel ESC 27 1B b 98 62 (c) c c (n1) n1 n1 ... ... ... NUL 0 00 ASCII character Decimal Hexadecimal Function: – Setting tabs ESC b (c) ... NUL has (in principle) the same function as ESC B ... NUL. By means of the variable c (a number between 0 and 7) a certain channel for vertical tabs can be selected additionally. Thus it is possible to define eight different tab groups, each with up to 16 vertical tabs.
Standard commands Vertical print control Selecting a vertical tab channel ESC 27 1B / 47 2F (c) c c ASCII character Decimal Hexadecimal Function: Via ESC / (c) a vertical tab channel c can be selected. The values 0 to 7 (= channel 0 to channel 7) are permitted for c. For all subsequently entered VT commands (Vertical tabulation) the paper feed will then be controlled by the valid tabs in the current channel.
Vertical print control Standard commands Paper control ESC 27 1B EM 25 19 n n n ASCII character Decimal Hexadecimal Parameter: n=0 Deactivates the mode n=1 Selects the feeder compartment 1 n=2 Selects the feeder compartment 1 n=4 Selects the feeder compartment 1 n=R Ejection i 74 This command is only to be used if a single sheet feeder is installed.
Standard commands Horizontal print control Horizontal print control This section describes the commands for setting horizontally arranged document positions (left or right margin and horizontal tabs). The following functions are possible: – automatic end of line, i. e. automatic carriage return with line feed when a certain column position is reached – feeding at certain column positions without the corresponding printing of blank spaces – feeding to any (dot) positions of a line.
Horizontal print control Standard commands right, centered or with margin justification (ESC a). Feeding to a certain position on a line is specified in dots and calculated either starting from the left margin (ESC $, 1 dot = 1/60 inch) or starting from the current print position (ESC \ , 1 dot = 1/180 inch or 1/120 inch).
Standard commands Horizontal print control Setting the left margin ESC 27 1B I 108 6C (n) n n ASCII character Decimal Hexadecimal Function: Using ESC l (n) the horizontal ’print position 0’ can be influenced, that is to say, a left margin can be set. The left margin (absolute distance from the left edge of the document) is determined by means of the value of n and the currently valid character width. A value between 0 and 160 can be selected for n.
Horizontal print control i Standard commands – The absolute margin position is dependent on the set character size (10, 12 or 15 cpi) and the print mode (condensed, elongated, normal). With proportional spacing the left margin is determined according to the character size 10 cpi. Subsequent alterations to the character size have no influence on the set margin. – The distance between the left and right margins must be at least 10 cpi.
Standard commands Horizontal print control Result (reduced in size): Result (original size): T5023/5023+ - Programming Guide 79
Horizontal print control Standard commands Setting the right margin ESC 27 1B Q 81 51 (n) n n ASCII character Decimal Hexadecimal Function: ESC Q (n) influences the last horizontal print position, that is to say, a right margin can be set. The right margin is determined by means of the value of n and the current valid character width. A value between 0 and 255 can be selected for n. The n th column will then not be printed.
Standard commands i Horizontal print control – The absolute margin position is dependent on the set character size (10, 12 or 15 cpi) and the print mode (condensed, elongated, normal). With proportional spacing, the right margin is determined according to the character size 10 cpi. Subsequent alterations to the character size have no influence on the set margin. – The distance between the left and right margins must be at least two 2/10“(two characters with 10 cpi).
Horizontal print control Standard commands Setting the text alignment ESC 27 1B a 97 61 (n) n n ASCII character Decimal Hexadecimal Function: ESC a (n) sets the following text alignments depending on n (0 ...
Standard commands i Horizontal print control – After switching on or initializing the printer (ESC @) the text alignment is flush left (n = 0). – In most programming languages there are print commands, which, after the output of the printed text, automatically carry out the CR or LF command (for example, PRINTLF). – The control commands HT (Horizontal tabulation) and BS (Backspace) are without effect with centered and flush right text alignment or with margin justification.
Horizontal print control Standard commands Setting / deleting horizontal tabs ESC 27 1B D 68 44 (n1) n1 n1 (n2) n2 n2 ... ... ... NUL 0 00 ASCII character Decimal Hexadecimal Function: – Setting tabs Using ESC D ... NUL up to 32 column positions in the current character width can be set as horizontal tabs. The tab values are specified as n1, n2, etc. between 1 and 137 inclusive in ascending order. Tab positions, which exceed the right margin, are ignored. The sign NUL marks the end of the command.
Standard commands Horizontal print control Horizontal tabulation HT 9 09 ASCII character Decimal Hexadecimal Function: Using HT the print head is set to the next tab position. After positioning on the last (right) tab position the HT command has no effect. This also applies if all the tab positions were deleted using ESC D NUL. i – After switching on the printer or after initializing (ESC @) the tabs are set at a spacing of eight 10-cpi characters.
Horizontal print control Standard commands Horizontal positioning (absolute) ESC 27 1B $ 36 24 (n) n n (m) m m ASCII character Decimal Hexadecimal Function: By means of ESC $ (n) (m) the print head is moved horizontally to a position which is calculated independently of the current character size from the values n and m relative to the previously set “logical left” margin (left margin of sheet set using ESC l (n)).
Standard commands Horizontal print control Result (reduced in size): Result (Original size): T5023/5023+ - Programming Guide 87
Horizontal print control Standard commands Horizontal positioning (relative) ESC 27 1B \ 92 5C (n) n n (m) m m ASCII character Decimal Hexadecimal Function: Via ESC \ (n) (m) the print head is displaced horizontally to a position relative to the current print position.
Standard commands Horizontal print control Example: At the beginning the Draft print quality is set. BEGIN PRINT("Displacement") PRINT(char(27),"\",char(180,0)) PRINTLF("by 1.
Horizontal print control Standard commands Determining the character spacing ESC 27 1B SP 32 20 (n) n n ASCII character Decimal Hexadecimal Function: Using ESC SP (n) the normal distance between two print characters can be increased. The additional character spacing is calculated depending on the selected print quality (Draft or LQ) from the value of n using the following formula: n /120 inch (Draft) n /180 inch (LQ) n can accept values between 0 and 127.
Standard commands Horizontal print control Example: The character spacing is increased step- by- step.
Print quality and character size Standard commands Print quality and character size This section describes the commands for setting the print quality and the character size.
Standard commands Print quality and character size Width and height of character (example 'H' character): font LQ-Sans Serif LQ-Roman DQ 10 cpi width/ height 2.0/2.6 mm 2.3/2.5 mm 1.8/2.5 mm 12 cpi width/ height 1.7/2.6 mm 2.0/2.5 mm 1.6/2.5 mm 15 cpi width/ height 1.4/1.9 mm 1.5/1.8 mm 1.4/1.9 mm proportional width/ height 1.9/2.6 mm 2.1/2.
Print quality and character size Standard commands Switching print quality (Draft/ LQ) ESC 27 1B x 120 78 (n) n n ASCII character Decimal Hexadecimal Function: – Switching to draft print quality ESC x (0) switches from LQ to draft print quality. This results in a higher print rate and a lower print density (60 print dots per inch in a horizontal direction). – Switching to LQ print quality ESC x (1) switches from draft to LQ print quality.
Standard commands Print quality and character size Example: The character spacing is increased step- by- step.
Print quality and character size Standard commands Selecting the LQ type font ESC 27 1B k 107 6B (n) n n ASCII character Decimal Hexadecimal Using ESC k (n) the following type fonts in LQ print quality can be selected: n=0 LQ type font Roman n=1 LQ type font Sans Serif The selection of the type font can take place in draft or in LQ mode. The selected type font is only actually printed in LQ print quality mode (switch with ESC x (1)).
Standard commands Print quality and character size Switching proportional spacing on/off ESC 27 1B p 112 70 (n) n n ASCII character Decimal Hexadecimal Function: – Switching on proportional spacing ESC p (1) switches proportional spacing on. With proportional spacing the character layout is based on the character size 10 cpi. The character width of the individual characters is however different, for example, the width of the character ’i’ is smaller than that of the character ’w’.
Print quality and character size Standard commands Selecting the character size 10 cpi (Pica) ESC 27 1B P 80 50 ASCII character Decimal Hexadecimal Function: ESC P sets the character size to 10 cpi (10 characters per inch). This character size is also set after switching on or initializing the printer if it has been selected in the emulation menu. i – The character size 10 cpi can be combined with condensed and elongated print.
Standard commands Print quality and character size Selecting the character size 12 cpi (Elite) ESC 27 1B M 77 4D ASCII character Decimal Hexadecimal Function: ESC M sets the character size to 12 cpi (12 characters per inch). Set character sizes in 10 cpi or 15 cpi are cancelled. i – After switching on or initializing the printer, the character size is set to the value, which has been set in the emulation menu. – The character size 12 cpi can be combined with condensed and elongated print.
Print quality and character size Standard commands Selecting the character size 15 cpi ESC 27 1B g 103 67 ASCII character Decimal Hexadecimal Function: ESC g sets the character size to 15 cpi (15 characters per inch). Set character sizes in 10 cpi or 12 cpi are cancelled. i – After switching on or initializing the printer, the character size is set to the value, which has been set in the emulation menu.
Standard commands Print modes Print modes The use of different print modes (e. g., bold print, elongated print, underlining) enables a document to be structured for optical effect. This section describes the commands for the selection of the print modes..
Print modes Standard commands Switching on condensed print SI 15 0F ASCII character Decimal Hexadecimal Function: SI switches condensed print on. The character size in condensed print is approximately 40% smaller than in normal print. i – The command SI has the same effect as the command ESC SI. – Condensed print is switched off again using DC2. – Condensed and elongated print can be combined. – 10 cpi and 12 cpi characters can be printed condensed.
Standard commands Print modes Switching on condensed print ESC 27 1B SI 15 0F ASCII character Decimal Hexadecimal Function: ESC SI has the same effect as the command SI.
Print modes Standard commands Switching off condensed print DC2 18 12 ASCII character Decimal Hexadecimal Function: DC2 switches the condensed print off, which was set using SI, ESC SI or ESC ! (n) or in the emulation menu.
Standard commands Print modes Switching on elongated print for one line SO 14 0E ASCII character Decimal Hexadecimal Function: SO switches on elongated print for the current print line. Before beginning the next print line elongated print is switched off again. In elongated print the width of the characters is doubled. i – The command SO has the same effect as the command ESC SO. – Elongated print is switched off again using DC4.
Print modes Standard commands Switching on elongated print for one line ESC 27 1B SO 14 0E ASCII character Decimal Hexadecimal Function: ESC SO has the same effect as the command SO.
Standard commands Print modes Switching off elongated print DC4 20 14 ASCII character Decimal Hexadecimal Function: DC4 switches off the elongated print set using SO or ESC SO (within the current print line). i Elongated print switched on using ESC W (n) or ESC ! (n) is not switched off by DC4.
Print modes Standard commands Switching elongated print on/off ESC 27 1B W 87 57 (n) n n ASCII character Decimal Hexadecimal Function: – Switching on elongated print ESC W (1) switches elongated print on. In elongated print the width of the characters is doubled. – Switching off elongated print ESC W (0) switches elongated print off. i Elongated print can be combined with condensed print and all the character sizes (10, 12, 15 cpi).
Standard commands Print modes Enable/Disable Double Character Height ESC 27 1B w 119 77 (n) n n ASCII character Decimal Hexadecimal Function: All characters following this command are printed with double the normal height.
Print modes Standard commands Switching on bold print ESC 27 1B E 69 45 ASCII character Decimal Hexadecimal Function: ESC E switches bold print on. With bold print each dot of a print character is printed twice. The second dot is printed slightly displaced to the right. i – Bold print is switched off again using ESC F or ESC ! (n). – Bold print and double impact print can be combined. – Bold print can be used with draft and LQ print quality.
Standard commands Print modes Switching off bold print ESC 27 1B F 70 46 ASCII character Decimal Hexadecimal Function: ESC F switches off the bold print set using ESC E or ESC ! (n).
Print modes Standard commands Switching on double impact print ESC 27 1B G 71 47 ASCII character Decimal Hexadecimal Function: ESC G switches double impact print on. With double impact print each line is printed twice, the second time slightly displaced horizontally. i – Double impact print is switched off again using ESC H or ESC ! (n). – Double impact print and bold print can be combined. – Double impact print can be used with draft and LQ print quality.
Standard commands Print modes Switching off double impact print ESC 27 1B H 72 48 ASCII character Decimal Hexadecimal Function: ESC H switches off the double impact print set using ESC G or ESC ! (n).
Print modes Standard commands Switching underlining on/off ESC 27 1B 45 2D (n) n n ASCII character Decimal Hexadecimal Function: – Switching on underlining After setting ESC - (1) all subsequent print characters (even the spaces) are underlined continuously. – Switching off underlining ESC - (0) switches off the underlining of the print characters. Example: BEGIN PRINT("Highlighting",char(27),"-",char(1)) PRINT(" with underlining") PRINT(char(27),"-",char(0)) PRINTLF(" is possible.
Standard commands Print modes Switching on superscript/subscript ESC 27 1B S 83 53 (n) n n ASCII character Decimal Hexadecimal Function: – Switching on superscript After setting ESC S (0) all subsequent print characters are printed reduced to half the size and displaced upwards (for example, in mathematical or chemical formulas).
Print modes Standard commands Switching off superscript/subscript ESC 27 1B T 84 54 ASCII character Decimal Hexadecimal Function: ESC T switches off superscript or subscript of the print characters.
Standard commands Print modes Selection of combined print mode ESC 27 1B ! 33 21 (n) n n ASCII character Decimal Hexadecimal Function: Using ESC ! (n) the following character sizes and print modes in any (valid) combination can be switched on or off (by specifying a value n between 0 and 255): – 10 cpi character size (Pica) – 12 cpi character size (Elite) – Proportional spacing – Condensed and elongated print – Bold and double impact print – Italic print – Underlining – Switching on sev
Print modes – Standard commands Combination of several print modes or character sizes In order to combine several print modes or character sizes the values given in the list (above) must be added together. Calculation examples: Proportional spacing, bold print, underlining: n = 2 + 8 + 128 = 138 12 cpi, condensed print, double impact print: n = 1 + 4 + 16 = 21 i 118 – ESC ! (0) switches off all print mode combinations and sets the character size to 10 cpi.
Standard commands Print modes Example: BEGIN PRINT(char(27),"!",char(0) PRINTLF("10 pitch normal") PRINT(char(27),"!",char(1) PRINTLF("12 pitch normal") PRINT(char(27),"!",char(2),"proportional") PRINT(char(27),"!",char(130) PRINTLF(" and underlined") PRINT(char(27),"!",char(0),"normal") PRINT(char(27),"!",char(64)," italic") PRINT(char(27),"!",char(72)," italic bold") PRINT(char(27),"!",char(192) PRINTLF(" italic underlined") END Result (reduced in size): T5023/5023+ - Programming Guide 119
Non- executable commands Standard commands Non- executable commands This section describes the commands which cannot be executed by the document printer because of specific requirements. Such commands are ignored, therefore they do not cause an error. Command Function BEL ESC s (n) ESC r (n) Signal tone Switching half- rate printing on/ off Selecting the print colour Signal tone BEL 7 07 ASCII character Decimal Hexadecimal Function: BEL normally activates the acoustic signal of a printer.
Standard commands Non- executable commands Switching half- rate printing on/off ESC 27 1B s 115 73 (n) n n ASCII character Decimal Hexadecimal Function: ESC s (1) normally switches to half- rate printing. ESC s (0) cancels this mode again. This command is not relevant for the document printer.
Non- executable commands 122 T5023/5023+ - Programming Guide Standard commands
Character set commands With the help of the following control commands, it is possible to change between the different character sets of the printer. Furthermore, your own characters can be defined as dot patterns and stored in the memory of the printer.
Character set selection Character set commands Character set selection The document printer prints characters as dot patterns. The data for the dot patterns of the characters is stored in the ROM (Read Only Memory) of the printer. If the printer receives a character code from the computer, it prints the corresponding character according to the stored pattern.
Character set commands Character set selection Area with basic characters or italic characters This area lies in the lower character table (hex 20 to hex 7F or decimal 32 to 127). It contains large and small letters, figures, punctuation marks and special characters in the print quality selected in each case (draft or LQ) or the LQ type font (Roman, Sans Serif). The characters in the lower character table can be printed by specifying the character code according to the following table.
Character set selection Character set commands Basic character set: After entry of the control commands ESC 4 (’Switching on italic printing’) and ESC ! (64) (’Selection of combined print modes’) all the basic character symbols of the currently selected print quality or LQ type font are printed in italics. i 126 The lower control code table is occupied by control codes (hex 00 to 1F or decimal 0 to 31). It contains no printable characters.
Character set commands Character set selection Country versions (national character sets) A total of twelve character codes of the basic character set (hex 23-24, 40, 5B60 and 7B- 7E) can be occupied with national special characters using the command ESC R (n). Thirteen country versions are available: i The country versions also apply for italic characters in the upper character table.
Character set selection Character set commands Area with italic characters or graphics and special characters The italic character area for the italic character set lies in the upper character table. It contains all the basic characters in the currently selected print quality or LQ type font in italics. For the graphics character set there are graphics characters in the upper character table.
Character set commands Character set selection Graphics character table Here the upper control code table (hex 80 to 9F) is not occupied by printable characters.
Character set selection Character set commands Extended graphics character table: The upper control code table is occupied by printable special characters. After the control command ESC t (1) has been entered, the extended graphics character set can be addressed in the complete upper character table.
Character set commands Character set selection Characters defined by the user The pattern of the ground character in the used print qualities and fonts and the graphic signs are in the resident menory of the printer. After turn off the printer this memory is not lost. In addition, the user can define his own characters. For this, an appropriate dot pattern must be developed, encrypted via a sequence of numbers and transferred to the memory of the printer by means of the control code ESC &.
Character set selection Character set commands The following diagram explains the selection of the different character sets: i 132 – The character set defined by the user can be switched on using ESC % (1) in the lower character table or using ESC t (2) in the upper character table. – After the control command ESC 6 has been entered, the complete upper character table for characters defined by the user can be used.
Character set commands Definition of characters Definition of characters For the definition of a new character the following steps are necessary: 1. 2. 3. 4. Design of a character Transferring the design to a dot grid Encryption of the dot pattern into a number sequence Transferring the number sequence to the printer using the control com mand ESC &.
Definition of characters Character set commands Design of a character A character is depicted according to the following points: – type image, i. e. ’form of the character’ – relative height and width of the character in comparison to the other characters of the character set – position of the character in relation to the base line (print line) – descender or ascender – left or right space.
Character set commands Definition of characters Transferring the design onto a dot grid The document printer prints characters as dot patterns. A character consists of a maximum of 24 dots in a vertical direction (spacing 1/ 180 inch). In a horizontal direction, the number of dots and the densitiy depend on the print quality: – – – 9 dots (spacing 1/120 inch) in draft print quality 29 dots (spacing 1/360 inch) in LQ print quality 37 dots (spacing 1/360 inch) with proportional spacing.
Definition of characters Character set commands Dot grid for LQ print quality: 136 T5023/5023+ - Programming Guide
Character set commands Definition of characters Dot grid for superscript or subscript characters in draft print quality: The extent of the dot grid is determined by the print quality and the print mode.
Definition of characters i 138 Character set commands – On a dot grid, dots may not be set directly beside each other horizontally. A dot position must remain free to the right and to the left of each dot to be printed. – In normal print, the complete width of a character (including the left and the right space) is fixed. Each character occupies 12 (draft) or 36 (LQ) horizontal dot positions.
Character set commands Definition of characters Encryption of the dot pattern into a number sequence Before being transferred to the printer, the dot pattern of a newly defined character must be encrypted into a sequence of data bytes, i. e. into numbers between 0 and 255. For this, the grid is divided into columns each of eight dot positions lying one beneath the other (squares).
Definition of characters Character set commands The number of the totals to be calculated (data bytes) depends on the size of the dot grid. For example, with a 24 by 29 dot grid, three data bytes per column must be calculated, i. e. altogether 3 * 29 = 87 data bytes.
Character set commands Definition of characters Transferring the number sequence to the printer When the complete dot pattern of a character is encrypted as a number sequence, this number sequence is transferred to the printer (RAM) using the control command ESC &. Subsequently the character can be printed as a character defined by the user. If several characters are to be defined, normally each character definition must be transferred separately using ESC &.
Definition of characters Character set commands Using the control command ESC &, the data bytes of one or more characters defined by the user can be transferred: ESC & (n1) (n2) (n3) (d0) (d1) (d2) (data 1) (d0) (d1) (d2) (data 2) ... The meaning of the individual parameters is explained in the command description of ESC & ... (see section “Transferring the character definition” in this chapter).
Character set commands Definition of characters Example of the definition of a draft character The example shows the following steps: – Definition of a draft character under the character code of the letter A (left space two dot columns, character width nine dot columns, right space one dot column). – Printing of the newly defined character in normal, elongated and italic print.
Definition of characters Character set commands Example of the definition of LQ characters: The example shows the following steps: – Definition of two proportional LQ characters under the character codes of the letters A and B; the character width of the first character amounts to ten dot columns, that of the second character eighteen dot columns. – Printing of the newly defined characters in normal and elongated print.
Character set commands Notes on the use of user defined cha- Notes on the use of user defined characters This section contains some general notes on the use of characters defined by the user. Storage of characters defined by the user The characters defined by the user are stored in the RAM of the printer. Only one character set can be loaded. When switching off the printer, the set of characters defined by the user is deleted. Therefore, it must be possible at any time to reload the characters.
Notes on the use of user defined characters Character set commands Print effects of characters defined by the user For characters defined by the user, the same print effects are available as for normal characters: – bold print, double impact print – condensed print, elongated print – italic print – underlining – character sizes 10, 12, 15 cpi Transfer of the resident character set (Download) If only a few characters within a resident character set (for example, LQ type font or the standard type
Character set commands Syntax of the character set com- Syntax of the character set commands This section extensively describes the syntax of the control commands for the character set selection and the character definition. Exact notes and program examples are contained in the previous sections. Switching on italic print ESC 27 1B 4 52 34 ASCII character Decimal Hexadecimal Function: Italic print is switched on using ESC 4. The characters of each current character set, i. e.
Switching on italic print Character set commands Result: Switching off italic print ESC 27 1B 5 53 35 ASCII character Decimal Hexadecimal Function: Italic print activated using ESC 4 is switched off again using ESC 5. i 148 In the upper character table, italic characters can be addressed even after entering ESC 5 (see ESC t (n)).
Character set commands Switching on italic print Selecting the character set ESC 27 1B t 116 74 (n) n n ASCII character Decimal Hexadecimal Function: Using ESC t (n), one of the following character sets of the complete upper character table is selected: – Italic character set (n= 0) The upper character table contains the italic characters of the current character set (draft, LQ or defined by the user).
Switching on italic print Character set commands Selecting a national character set ESC 27 1B R 82 52 (n) n n ASCII character Decimal Hexadecimal Function: Altogether twelve character codes of the basic character set (hex 23, 24, 40, 5B60 and 7B- 7E) can be occupied with national special characters using the command ESC R (n).
Character set commands Switching on italic print Switching on/off the character set defined by the user ESC 27 1B % 37 25 (n) n n ASCII character Decimal Hexadecimal Function: Using ESC % (n) the character set defined by the user is switched on. Characters defined by the user will only be printed if the currently selected print quality (draft or LQ) and the current print mode (proportional or superscript/ subscript) correspond to the character definition.
Switching on italic print Character set commands Switching on extended character set ESC 27 1B 6 54 36 ASCII character Decimal Hexadecimal Function: The command ESC 6 influences the complete upper character table. The effect of the command depends on the character set activated using ESC t (n): – The upper character table contains characters defined by the user. In this case, after entry of the command ESC 6, the upper control code table for characters defined by the user can also be used.
Character set commands Switching on italic print Switching off extended character set ESC 27 1B 7 55 37 ASCII character Decimal Hexadecimal Function: The command ESC 7 influences the complete upper character table. The effect of the command depends on the character set activated using ESC t (n): – The upper character table contains characters defined by the user. ESC 7 cancels the effect of the command ESC 6. The upper and lower control code tables are identical.
Switching on italic print Character set commands Copying the character set into the RAM ESC 27 1B : 58 3A NUL NUL NUL (n) n n NUL NUL NUL ASCII character Decimal Hexadecimal Function: It is advisable to use this command when only a few characters of a resident character set are to be modified.
Character set commands Switching on italic print Transferring the character definition & 38 26 ESC 27 1B (s) s s (n) n n (m) m m Data Data Data ASCII character Decimal Hexadecimal Function: Using the control command ESC &, the encryption (number sequence) of one or more characters defined by the user can be transferred: ESC & (s) (n) (m) (d0) (d1) (d2) (data 1) (d0) (d1) (d2) (data 2) ...
Switching on italic print 156 Character set commands T5023/5023+ - Programming Guide
Graphics commands The instruction set of the document printer contains commands for printing graphics, for example, drawings, diagrams or pictures. There are two different approaches to printing graphics: – Graphics printing in text mode The graphics are composed from individual graphics characters (upper character table) (see chapter “Character set commands”). – Graphics printing in graphics mode (dot graphics) The graphics are printed as dot graphics.
Graphics commands i 158 – General notes on the command description can be found in the chapter “Standard commands” in the sections “Description components”, “Coding of decimal command parameters” and “Program examples”. – The document printer works in different graphics modes. A graphics mode is labelled by the number of print head needles addressed when printing, (8 needles or 24 needles) and by the horizontal dot spacing (60 – 360 characters per inch).
Graphics commands Graphics modes Graphics modes The graphics modes of the document printer are identified by the number of vertically arranged dots, which the print head prints in a graphics line, i. e. by the number of print head needles addressed during the printing operation: – 8- dot mode In one graphics line, 8 dots spaced at 1/60 inch can be printed vertically. In this mode, six different horizontal dot spacings are available.
Mode of operation of the graphics commands Graphics commands Mode of operation of the graphics commands This section describes the mode of operation of the graphics commands. The graphics commands are structured as follows: ESC command identifier (n) (m) data ... Command identifiers are the letters K, L, Y, Z or * (s). Via entry of the identifier, with ESC * by means of entry of the parameter s, one of the graphics modes of the document printer is switched on.
Graphics commands Mode of operation of the graphics Example: T5023/5023+ - Programming Guide 161
Mode of operation of the graphics commands Graphics commands The total number of data bytes must be adhered to exactly. If too many data bytes are entered, some may be interpreted as character codes. If too few data are entered, subsequent control or character codes may be interpreted as graphics data. i 162 – With 8-dot graphics modes ’double rate, double density’ and “quadruple density”, horizontally adjacent dots cannot be printed.
Graphics commands Syntax of the graphics commands Syntax of the graphics commands Selecting the graphics mode * 42 2A ESC 27 1B (s) s s (n) n n (m) m m Data... Data... Data... ASCII character Decimal Hexadecimal Function: Using ESC * (s) (n) (m) according to the value (s) one of the graphics modes is activated according to the following table: s graphics mode needles used horiz. density vert.
Syntax of the graphics commands Graphics commands The parameters n and m determine the number of dot columns to be printed: Number of dot columns = m * 256 + n In 8-dot graphics mode, one data byte per dot column must be specified, in 24dot graphics mode three data bytes per dot column. i 164 The section “Mode of operation of the graphics commands” contains further notes on the command ESC * (s) (n) (m).
Graphics commands Syntax of the graphics commands Example: Using shading, the various dot densities of the graphics modes are illustrated. In the main program, the parameter s is set for the command ESC *. In the subroutines EIGHT DOT and TWENTY- FOUR the command ESC *, the number of dot columns (100 each time) and the data bytes (encryption) of the shading (decimal 170 followed by decimal 85) are given.
Syntax of the graphics commands BEGIN EIGHT DOT PRINTLF("Parameter S =",S) PRINT(char(27),"*",char(S)) PRINT(char(100,0)) SET N=0 REPEAT SET N=N+1 PRINT(char(170),char(85)) UNTIL N=50 PRINTLF( ) END EIGHT DOT BEGIN TWENTY-FOUR PRINTLF("Parameter S =",S) PRINT(char(27),"*",char(S)) PRINT(char(100,0)) SET N=0 REPEAT SET N=N+1 PRINT(char(170),char(85)) UNTIL N=150 PRINTLF( ) END TWENTY-FOUR 166 T5023/5023+ - Programming Guide Graphics commands
Graphics commands Syntax of the graphics commands Result: T5023/5023+ - Programming Guide 167
Syntax of the graphics commands Graphics commands Switching on the ’single density’ graphics mode ESC 27 1B K 75 4B (n) n n (m) m m Data... Data... Data... ASCII character Decimal Hexadecimal Function: The 8-dot graphics mode ’single density’ is switched on with ESC K (n) (m). The parameters n and m determine the number of dot columns to be printed: Number of dot columns = m * 256 + n One data byte must be specified per dot column.
Graphics commands Syntax of the graphics commands Switching on the ’double density’ graphics mode ESC 27 1B L 76 4C (n) n n (m) m m Data... Data... Data... ASCII character Decimal Hexadecimal Function: The 8-dot graphics mode ’double density’ is switched on with ESC L (n) (m). The parameters n and m determine the number of dot columns to be printed: Number of dot columns = m * 256 + n One data byte must be specified per dot column.
Syntax of the graphics commands Graphics commands Switching on the ’double density and double rate’ graphics mode ESC Y 89 59 27 1B (n) n n (m) m m Data... Data... Data... ASCII character Decimal Hexadecimal Function: The 8- dot graphics mode “double density and double rate” is switched on with ESC Y (n) (m). The parameters n and m determine the number of dot columns to be printed: Number of dot columns = m * 256 + n One data byte must be specified per dot column.
Graphics commands Syntax of the graphics commands Switching on the ’quadruple density’ graphics mode Z 90 5A ESC 27 1B (n) n n (m) m m Data... Data... Data... ASCII character Decimal Hexadecimal Function: The 8- dot graphics mode ’quadruple density’ is switched on with ESC Z (n) (m). The parameters n and m determine the number of dot columns to be printed: Number of dot columns = m * 256 + n One data byte must be specified per dot column.
Syntax of the graphics commands Graphics commands Reassigning graphics commands ESC 27 1B ? 63 3F m m m (s) s s ASCII character Decimal Hexadecimal Function: One of the graphics modes of the document printer can be assigned to the graphics commands ESC K, ESC L, ESC Y and ESC Z with ESC ? m (s). For m, the identifier of the graphics command must be given as a character code (K, L, Y or Z). The parameter s identifies the graphics mode, as in the command ESC * .
Additional commands (Printer) The document printer can process single documents, multiple documents (form sets) and passbooks. This chapter explains special control commands (= additional commands) for processing documents and for processing MSR/MICR data, which are not a component of the Epson range of commands.
Structure of the additional commands Additional commands (Printer) Structure of the additional commands We begin with an explanation of the component parts used in the additional commands and responses. General Additional commands for controlling document and passbook processing and responses have, in general, the following syntactic structure: CSI P1 ; ...
Additional commands (Printer) Structure of the additional commands – CSI starts the control sequence of an additional command and the sequence of responses and stands for the sequence ESC [. – The parameters Pi, regarding number and use, depend on the respective control command. Numeric parameter values are specified as ASCII characters (in contrast to the ESC sequences of the standard, character set and graphics commands for which numeric values are transmitted to the document printer in binary form).
Structure of the additional commands Additional commands (Printer) Transfer of user data The transfer of MSR data is archived by adding an STX... ETX sequence to the respective CSI command: CSI ... I F STX...
Additional commands (Printer) Structure of the additional commands Requested data responses The basic characteristics of requested data responses are that for each response a requesting control command from the printer control was recognized (for example, request = read the MSR track, response = MSR data or error identification). These control commands are processed in series with the other print control commands. The timing of the response cannot therefore be exactly specified.
Structure of the additional commands Additional commands (Printer) Notes on the command description In the individual descriptions of the CSI commands the Pi parameters are represented as follows: n : one parameter n1; n2;n3 n1; ... ; n5 : parameters (in this case 3) (0 - 9) : Value range of a parameter from 0– 9 or 0– 99 or 0– 999, etc.
Additional commands (Printer) Important notes on document processing Important notes on document processing The document printer can process single documents, multiple documents and passbooks. Optionally the document printing point can also be equipped with a magnetic stripe reader (MSR). The manual document feed is supported by an automatic document adjustment on the right- hand side.
Important notes on document processing Additional commands (Printer) Character box The printable areas on documents refer on the one hand to the outer edges of the documents and passbooks as well as to staggered edges and folds, on the other hand to the character box of the print character (also see appendix “Paper specification”).
Additional commands (Printer) i Important notes on document processing When printable areas are defined in this section, reference is always to the character box defined here. The capital letter ’H’, used in the relevant illustrations of printable areas, only serves as an example for all print characters. On the document printer the position of the print character within the character box is not generally determined horizontally and vertically (Epson compatibility).
Important notes on document processing Additional commands (Printer) Definition 2: The reference line for vertical positioning on the document printer is the base line (needle 20). The distances between print characters and reference lines above and below the print characters specified in this manual always refer to this base line.
Additional commands (Printer) Important notes on document processing Horizontal print position 0 With the horizontal leading edge on the left, the left edge of the document is identical to print position 0 for all character spacings unless a left margin was set using the standard command ESC l (n) (see the next subsection “Position 0 after ESC l (n)”).
Important notes on document processing Additional commands (Printer) With the horizontal leading edge on the right, the right character box limit of the 90th character (with character spacing of 10 characters/inch) lies on the right edge of the document. This means that print position 89 of the 90th character lies 1/10 inch to the left of the right edge of the document (method of counting: print position 0 for the 1st character, print position 1 for the 2nd character, etc.).
Additional commands (Printer) Important notes on document processing Position 0 after ESC l (n) The horizontal print position 0 changes if a left margin was set by means of the standard command ESC l (n). In this case, the left edge (= horizontal print position 0) is displaced to the right by the value n.
Important notes on document processing Additional commands (Printer) Vertical print position 0 For the absolute vertical positioning of the print head, a distinction must be made between the leading edges ’upper edge of document’ (top reference) and “lower edge of document” (bottom reference). Two additional commands CSI n ! p (absolute vertical positioning from the upper edge of the form) and CSI n " p (absolute vertical positioning from the lower edge of the form) are available for this.
Additional commands (Printer) Important notes on document processing Absolute vertical positioning (bottom reference): j n ≥ 1 is admissible; n = 0 causes an error message. Selection of the vertical leading edge For performance reasons, care should be taken that the text lines are processed from top to bottom when processing documents on which the lines relate to the top of the document (top reference).
Important notes on document processing Additional commands (Printer) Mixed use of character fonts If different character fonts are to be used in one text line, care must be taken that the respective fonts have the same matrix density in order to avoid loss of performance. Printable document areas When printing documents, it is important not to print on the document edges or other uneven parts of the document (for example, folds or staggering) in order to avoid damaging the document or the print head.
Additional commands (Printer) Basic commands for document processing Basic commands for document processing By means of the following control commands, the document processing can be controlled: Command Function ESC [ n $ p Paper feed of the document ESC [ n # q Selection of type fonts/ character sets ESC [ n ! p Absolute vertical positioning in relation to the top form edge ESC [ n “ p Absolute vertical positioning in relation to the bottom form edge ESC [ n # p Relative vertical positioning b
Basic commands for document processing Additional commands (Printer) Paper feed of the document CSI ESC [ 91 5B 27 1B n $ p n n n $ 36 24 p 112 70 Name ASCII character Decimal Hexadecimal Parameter: n = 0 : Ejection of a document n = 1 : Insertion of a document to the base line of the logical first linewhich can be set via the document printer menu (TOF- POS) Function: This command initiates a mechanical action.
Additional commands (Printer) Basic commands for document processing Selection of type fonts/ character sets CSI ESC [ 91 5B 27 1B n # q n n n # 35 23 q 113 71 Name ASCII character Decimal Hexadecimal Parameter: n = type font or character set or font number (0 to 9999) The font number is fixed when developing a specific character set.
Basic commands for document processing – – Additional commands (Printer) 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) 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)).
Additional commands (Printer) Basic commands for document processing – Before using the command CSI n # q the printer must be switched to ’LQ print quality’ (ESC x (n)). Otherwise 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.
Basic commands for document processing Additional commands (Printer) Absolute vertical positioning Leading edge = upper edge of form CSI ESC 27 1B [ 91 5B n ! p n n n ! 33 21 p 112 70 Name ASCII character Decimal Hexadecimal Leading edge = lower edge of form CSI ESC 27 1B [ 91 5B n " p n n n " 34 22 p 112 70 Name ASCII character Decimal Hexadecimal Parameter: n = positioning in a vertical direction by n/180 inch (n = 1 to 9999) The permitted upper limit of the parameter value is specif
Additional commands (Printer) Basic commands for document processing 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.
Basic commands for document processing Additional commands (Printer) Relative vertical positioning backwards CSI ESC 27 1B [ 91 5B n # p n n n # 35 23 p 112 70 Name ASCII character Decimal Hexadecimal 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.
Additional commands (Printer) Basic commands for document processing Requesting the document width Command: CSI ESC [ 91 5B 27 1B " t " 34 22 t 116 74 Name ASCII character Decimal Hexadecimal Response: CSI ESC [ 91 5B 27 1B n " t n n n " 34 22 t 116 74 Name ASCII character Decimal Hexadecimal n = document width of the current form in n/ 180 inch.
Basic commands for document processing Additional commands (Printer) Document edge detection CSI ESC 27 1B [ 91 5B # t # 35 23 t 116 74 Name ASCII character Decimal Hexadecimal Function: The document printer ignores this function.
Additional commands (Printer) Basic commands for document processing Activating passbook processing CSI ESC 27 1B [ 91 5B n $ t n n n $ 36 24 t 116 74 Name ASCII character Decimal Hexadecimal Function: The document printer ignores this function.
Basic commands for document processing Additional commands (Printer) Specification of the horizontal leading edge CSI ESC [ 91 5B 27 1B n % t n n n % 37 25 t 116 74 Name ASCII character Decimal Hexadecimal Parameter: n = switch for the horizontal leading edge n = 0 : (flush left, default value) n = 1 : (flush right)l 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 documen
Additional commands (Printer) Basic commands for document processing T5023/5023+ - Programming Guide 201
Basic commands for document processing Additional commands (Printer) Mode switch- over for handling end of paper CSI ESC 27 1B [ 91 5B n ( t n n n ( 40 28 t 116 74 Name ASCII character Decimal Hexadecimal n = switch for type of mode switch-over n = 0 : 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 LENG
Additional commands (Printer) Basic commands for document processing n = 0 : manual error handling After an error the operator must clear the error via the operating 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 ’Spe
Basic commands for document processing Additional commands (Printer) Use: Control when printing lists on documents where the document length is unknown. For each print line the program generates a control point with a uniquely marked parameter (for example, line number). In the case of an error the lines not yet printed are deleted in the printer and in the system driver. Using the control points reported back the program can now determine the rerun point after the end of the paper.
Additional commands (Printer) Basic commands for document processing Dual station control CSI ESC [ 91 5B 27 1B n * t n n n * 42 2A t 116 74 Name ASCII character Decimal Hexadecimal Parameter: Dual station control USER1 LED USER2 LED n = 1 : activated off off n = 2 : activated on off n = 3 : activated off on n = 4 : activated on on n = 0 : de-activated; default value Function: The ’Dual station control’ for the document printer can be activated using this command.
Basic commands for document processing Additional commands (Printer) Switching on/off Multi Part Encreasing the copying power CSI ESC 27 1B [ 91 5B n , t n n n , 44 2C t 116 74 Name ASCII character Decimal Hexadecimal Parameter: n = 0 : Switching off Multi Part n = 1 : Switching on Multi Part for curent page Function: If the printout of copies is too weak, the copying power can be increased with the help of this parameter. 3 to 4 copies can be printed afterwards.
Additional commands (Printer) Controlling the MSR / MICR functions Controlling the MSR / MICR 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 MICR (Magnetic Ink Character Recognition) reader is a device that can be installed as an option at the journal print station of the document printer.
Controlling the MSR / MICR functions Additional commands (Printer) Position and measurements for MSR magnetic stripes The print areas for passbooks with MSR processing correspond to the specifications 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.
Additional commands (Printer) Controlling the MSR / MICR functions Horizontal fold book: T5023/5023+ - Programming Guide 209
Controlling the MSR / MICR functions Additional commands (Printer) Parameter block MSR CSI ESC [ 91 5B 27 1B n1;...;n5 ! r n1;...;n5 n1;...;n5 n1;...
Additional commands (Printer) – – Controlling the MSR / MICR functions Table for recording formats Depending on the recording formats, the user must transfer the following values via CSI ...
Controlling the MSR / MICR functions Additional commands (Printer) Reading a MSR track Command: " r " 34 22 r 114 72 CSI ESC [ 91 5B 27 1B Name ASCII character Decimal Hexadecimal Response: CSI ESC 27 1B [ 91 5B n1;...;n4 " r STX...ETX Name n1;...;n4 n1;...;n4 n1;...;n4 " 34 22 r 114 72 STX...ETX 2...3 02..
Additional commands (Printer) Controlling the MSR / MICR functions Function: The MSR track is read using the command CSI " r. The desired options are preset, 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.
Controlling the MSR / MICR functions – 214 Additional commands (Printer) Depending on the recording format, the following user data can be read: Format n3 Max.
Additional commands (Printer) Controlling the MSR / MICR functions Writing a MSR track CSI ESC [ 91 5B 27 1B # r STX...ETX Name # 35 23 r 114 72 STX...ETX 2...3 02...
Controlling the MSR / MICR functions Additional commands (Printer) After the execution of the command a acknowledgement CSI n1; n2 # r is produced, which can be evaluated in the program. The acknowledgement contains the num- ber of writing attempts and a message if an error has occured during control reading. i 216 – In the MSR unit of the document printer, the characters are limited to the range from 30h-3Fh. Characters outside this range lead to an error in the printer control.
Additional commands (Printer) Controlling the MSR / MICR functions Deleting a MSR track CSI ESC [ 91 5B 27 1B % r % 37 25 r 114 72 Name ASCII character Decimal Hexadecimal 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). i The command triggers the output of characters still in the print buffer to the document printing point.
Controlling the MSR / MICR functions Additional commands (Printer) The MICR Read Process Two jobs must be issued to the printer for every magnetic stripe read process: – a parameter job specifying the number of repetitions required for read errors, and the font type (CMC7/E13B), – the actual read command. The parameter n3 in the parameter job (CMC7 / E13B) informs the firmware that the next MSR read job is a magnetic ink character recognition process.
Additional commands (Printer) Controlling the MSR / MICR functions Example sequence for an MICR reader Status: NO_PAPER. 1 Switch MSR to magnetic ink character recognition (see MSR parameter) without repeating the read process and with 90mm = 638/180 inches (smaller than default value) max. admissible cheque width (Parameter = 0;0;10;638;0): 1B 5B 3B 3b 31 30 3B 36 33 38 3B 21 72 2. Start magnetic ink character recognition: 1B 5B 22 72 – Green light is flashing, LCD display: LOAD PAPER.
Controlling the MSR / MICR functions Additional commands (Printer) 1B 5B 31 3B 3B 3B 22 72 02 30 31 32 3F 34 35 ... 39 03 – Not OK (The document is wider than 90mm.): The document remains in its position (it is not moved). An MSR acknowledgement is generated (without read data between start and end character), and contains the error code 8 (= ASCII "38") in the parameter byte n4: 1B 5B 3B 3B 3B 38 22 72 02 03 The document can be processed (printed, ejected) without any limitations.
Additional commands (Printer) Controlling the MSR / MICR functions Activate parameter command MICR CSI ESC 27 1B [ 91 5B n1;...;n5 ! r n1;...;n5 n1;...;n5 n1;...
Controlling the MSR / MICR functions Additional commands (Printer) Reading command MICR Command: CSI ESC [ 91 5B 27 1B " r " 34 22 r 114 72 Name ASCII character Decimal Hexadecimal By this command reading is started corresponding to the parameters which have been handed over before. For magnetic ink character reading the corresponding parameter has to be handed over immediately before. Response: CSI ESC [ 91 5B 27 1B n1;...;n4 " r STX...ETX Name n1;...;n4 n1;...;n4 n1;...
Additional commands (Printer) Status and error messages Status and error messages The CSI sequences described in the following section are either issued by the program and acknowledged with appropriate responses or, depending on the processing situation, are automatically generated by the document printer and transmitted to the processor: Command Function Initiator ESC [ n ! t Initiating the control cycle Program ESC [ n ) t Setting control point II Program ESC [ n ! z Global printer status Doc
Status and error messages Additional commands (Printer) Notes on the printer status ONLINE This status exists after an error- free initializing operation. In this status the receiving channel is open. The printer is ready to receive and execute jobs. There is a response only with requested data or special printer messages which have no influence on the current processing of print data. STOP This status signals an operation interruption.
Additional commands (Printer) Status and error messages ERROR This status signals an operating termination. It can only be cleared by means of manual intervention on the printer. All jobs not carried out up to the termination are cancelled. There are two groups of errors: – Hardware errors The most common cause of the error status is a hardware error. If this error is only restricted to a subfunction of the printer (for example, MSR), it can be ignored by pressing the STOP key.
Status and error messages Additional commands (Printer) Setting control points/ initiating the control cycle Command: CSI ESC [ 91 5B 27 1B n ! t n n n ! 33 21 t 116 74 n ! t n n n ! 33 21 t 116 74 Name ASCII character Decimal Hexadecimal Response (control point): CSI ESC [ 91 5B 27 1B Name ASCII character Decimal Hexadecimal Parameter: n= 226 value freely definable by the application in the range 0 to 9999.
Additional commands (Printer) Status and error messages Function: 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 parameter value n that the application transferred in the request.
Status and error messages Additional commands (Printer) Setting control point II Command: CSI ESC [ 91 5B 27 1B n ) t n n n ) 41 29 t 116 74 n ) t n n n ) 41 29 t 116 74 Name ASCII character Decimal Hexadecimal Response (control point): CSI ESC [ 91 5B 27 1B Name ASCII character Decimal Hexadecimal Parameter: n= value freely definable by the application in the range 0 to 9999.
Additional commands (Printer) i Status and error messages The command CSI n ) t should always be used when only one print line can be made available to the printer and for this reason performance problems arise. The control point is acknowledged when the last mechanical task is started.
Status and error messages Additional commands (Printer) Global printer status CSI ESC 27 1B [ 91 5B n ! z n n n ! 33 21 z 122 7A Name ASCII character Decimal Hexadecimal 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.
Additional commands (Printer) Status and error messages Special printer messages Command (requesting special printer messages): CSI ESC [ 91 5B 27 1B " z " 34 22 z 122 7A Name ASCII character Decimal Hexadecimal Response (requesting special printer messages): CSI ESC [ 91 5B 27 1B n;m " z n;m n;m n;m " 34 22 z 122 7A Name ASCII character Decimal Hexadecimal Parameter: n= m= ’Global Code’ (0 to 999) ’Special Code’ (0 to 999) T5023/5023+ - Programming Guide 231
Status and error messages Additional commands (Printer) Function: Special printer messages are produced in the following cases and transferred to the system: – when changing the appropriate statuses – when using the keys USER 2 or USER 1 via the operator (only if the function ’Dual station control’ was activated using the command CSI n * t) Further, the current status can be requested using the command CSI " z.
Additional commands (Printer) Status and error messages Printing unit parameters Command (requesting printing unit parameters): CSI ESC [ 91 5B 27 1B n # z n n n # 35 23 z 122 7A Name ASCII character Decimal Hexadecimal n=0 Response without parameter n8 (printer type) n=1 Response with parameter n8 (printer type) Response (printing unit parameters): CSI ESC [ 91 5B 27 1B n1;...;n9 # z n1;...;n9 n1;...;n9 n1;...
Status and error messages n= 9 Additional commands (Printer) Memory Extension 0: No Memory Extension 1: El. Journal 2: 2. CG 3: Asien GB 2312 4: Asien GB 5007 5: Asien GB 5199 6: Asien GB BIG 5 Parameter message with el.
Additional commands (Printer) Electronic Journal Functions Electronic Journal Functions Change between Document and Journal Printing CSI ESC [ 91 5B 27 1B n ! q n n n ! 33 21 q 113 98 Name ASCII character Decimal Hexadecimal 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.
Electronic Journal Functions Additional commands (Printer) 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 15 cpi, 8 lpi. – Font attributes are always ignored. An unprintable margin of 2 cm is provided on each side of the journal for filing holes. An identifier for the page numbers and a hint on the following pages (e.g.
Application examples This chapter demonstrates using detailed examples how the document printer is programmed for common application cases.
Processing of a blank form Application examples Processing of a blank form In the following example, a DIN A4 document will be printed with defined text. To structure the layout and to highlight important parts of the text, standard commands for print attributes, horizontal and vertical tabulation will be used. All the print data relates logically to the left leading edge so that a conversion of the print positions of the document to print positions of the printing unit need not be taken into account.
Application examples Processing of a blank form Type area Selection of standard print functions is demonstrated in the letter below. All the print functions can also be used on the journal printing point.
Processing of a blank form 1: 2: 3: 4: = 72 lines with 1/ 6 inch line spacing = left margin (logical) = position 12 (10 cpi) Last print position = right margin (logical) = position 72 (10 cpi) Position of processor ab- = 35 (horizontal tab) breviation 5 : Position of date = 40 (horizontal tab) 6 : First print line = 8 (vertical tab) 7 : Reference line = 16 (vertical tab) 8 : Start of text = 20 (vertical tab) 9 : Greetings line = 42 (vertical tab) 10: Name of sender = 46 (vertical tab) 240 Document lengt
Application examples Processing of a blank form Print effects T5023/5023+ - Programming Guide 241
Processing of a blank form Application examples General – Character size = 10 cpi – Type font = Roman Specialities 1 : Reference line in italics and additional line spacing of 12/180 inch 2 : Part of text ’connector for the RS-232 interface’ highlighted with bold print 3 : Type font for sketch = Sans Serif, text centred 4 : For the illustration of the pins (small ’o’) the following conditions apply: – – – 242 no proportional spacing character size 15 cpi additional character spacing between small ’o
Application examples Processing of a blank form Program steps (annotated) 1. Switching on LQ mode Command: Parameter: ESC x (n) n = 1 (LQ mode) 2. Switching on proportional spacing Command: ESC p (n) Parameter: n = 1 (proportional spacing on) Remarks: With proportional spacing setting the character width is unnecessary. 3. Setting line spacing Command: Remarks: 4. ESC 2 (1/6 inch) This command is not actually necessary for the example as 1/6 inch line spacing is the default value.
Processing of a blank form Application examples 6. Determining the right margin Command: ESC Q (n) Parameter: n = 72 (position 72 with 10 cpi) Remarks: The default value is 90. With a setting ’right margin = position 72’ printing is possible up to position 71. 7.
Application examples Processing of a blank form 10. Vertical tabulation to the first address line Command: VT 11. Printing address Remarks: Last address line (place) without line feed 12. Horizontal tabulation to the processor abbreviation Command: HT 13. Printing processor abbreviation Printing without line feed Remarks: 14. Horizontal tabulation to the date Command: HT 15. Printing date 16. Vertical tabulation to the reference line Command: VT 17.
Processing of a blank form Application examples 18. Determining additional spacing between characters Command: ESC SP (n) Parameter: n = 12 Remarks: SP = space stands for the blank space (ASCII = hex 20 or decimal 32 and EBCDIC = hex 40 or decimal 64). Via n = 12 in LQ mode, an additional character spacing of 12/180 inch is determined. In draft mode this would be 12/120 inch. 19. Printing reference line 20.
Application examples Processing of a blank form 26. Switching off bold print Command: 27. ESC F Printing text to ’... 9- pin Cannon plug’ plus blank lines to sketch 28. Selecting other LQ type Command: Parameter: ESC k (n) n = 1 (Sans Serif) 29. Setting centred print format adjustmentext Command: ESC a (n) Parameter: n=1 30. Printing ’05 ... 01’ 31. Switching off proportional spacing Command: ESC p (n) Parameter: n = 0 (Default value) 32. Setting character size to 15 cpi Command: ESC g 33.
Processing of a blank form Application examples 34. Printing lines with ’oo ... oo’ (5 times) and ’oo ... oo’ (4 times) 35. Deleting additional spacing between characters Command: ESC SP (n) Parameter: n=0 36. Setting character size to 10 cpi again Command: ESC P 37. Switching proportional spacing on again Command: ESC p (n) Parameter: n=1 38. Printing from ’09 ... 06’ to ’Pin numbering (plan view)’ 39.
Application examples Processing of a blank form 43. Vertical tabulation to the name of sender Command: VT 44. Printing name of sender 45.
Processing of a blank form Application examples Program (pseudo code) The corresponding numbering refers to the annotated program steps in the previous section.
Application examples Processing of a blank form BEGIN LETTER HEAD PRINT(char(11)) PRINTLF(Mr. Specimen")) PRINTLF("7,Princes Road,")) PRINTLF( ) PRINT("London. W. 5.") PRINT(char(9)) PRINT("js") PRINT(char(9)) PRINTLF("14.06.
Processing of a blank form BEGIN INTRODUCTION PRINT(char(11)) PRINT("Dear Mr. Specimen,") PRINTLF( ) PRINT(" herewith we should like to answer your query about the type of") PRINT(char(27),"E") PRINT("connector for the RS-232 interface") PRINT(char(27),"F") PRINTLF("of the printer.
Application examples Processing of a blank form BEGIN SKETCH PRINT(char(27),"k",char(1)) PRINT(char(27),"a",char(1)) PRINTLF("05 ... 01") PRINT(char(27),"p",char(0)) PRINT(char(27),"g") PRINT(char(27)," ",char(24)) PRINTLF(" ooooo") PRINTLF(" oooo") PRINT(char(27)," ",char(0)) PRINT(char(27),"P") PRINT(char(27),"p",char(1)) PRINTLF("09 ...
Document processing Application examples Document processing This example is to illustrate document processing with the following features: – Coding the coding line – Printing a text on the document. This example is based on producing a specimen cheque. The coding line on the cheque is to be processed with bottom reference, the text on the cheque with top reference.
Application examples Document processing Document structure 1: Distance bottom edge of document/ bottom edge of coding line = 8. 47 mm = 60/180 inch (DIN 66008) 2: Distance left edge of document/ left edge of first OCR A character = 3/10 inch (DIN 66008) ≡ print position 3 (with 1/10 inch/character) 3: Distance top edge of document/ bottom edge of first text line = 24 mm = 170/180 inch 4: Distance between the text lines = 7.
Document processing Application examples Print positions The following illustration shows the different print positions for text and OCR printing: An absolute dot position on the respective current vertical position is reached via the command ESC $ (n) (m). The position is calculated with the formula x = m * 256 + n and thereby the position x/60 inch (= distance from left leading edge) is determined. The print position 0 is identical with the left edge of the document.
Application examples Document processing 3: Currency abbreviation and amount Vertical position from top edge = 170/180 inch Absolute dot position = x/60 inch with x = 1 * 256 + 2 (First print character on print position 43) 4: Name Vertical position from top edge via line feed of 53/180 inch Absolute dot position as 2 Text "MR.
Document processing Application examples Program steps (annotated) 1. 2a. 2b. 258 Setting absolute vertical position referring to the bottom document edge Command: CSI n " p Parameter: n = 90 Remarks: The distance bottom edge of document/ bottom edge of OCR line = 90/180 inch = 12.7 mm was selected in order to have a sufficient distance to a possibly present black bar.
Application examples 3. 4. 5. Evaluating response to document width Command: CSI (n) " t Parameter: n = 1062 Remarks: Document width = 1062/180 inch = 150 mm (compare description of the document structure) Reaching horizontal print position for OCR printing Command: ESC $ (n) (m) = absolute dot position Parameters: n = 180, m = 0 Remarks: First print character on position 30 = 180/60 inch OCR print in amount field Print data: 6. 7. Document processing e. g.
Document processing 8a. 8b. Selecting LQ type font Command: ESC k (n) Parameter: n = 0 (Roman type font) Printing amount text Print data: 9. 10. Application examples "FOUR HUNDRED AND FIFTY---------" Reaching horizontal print position for currency abbreviation/amount = 24 mm Command: ESC $ (n) (m) Parameters: n = 2, m = 1 Remarks: First print character on position 43 = 258/60 inch Printing currency abbreviation/ amount Print data: "£ ---- 450,00" 11. Line feed 12.
Application examples 13. Document processing Printing name of receiver Print data: 14. 15. for example, "MR. SPECIMEN" Reaching horizontal print position for place name Command: ESC $ (n) (m) Parameters: n = 2, m = 1 (see also step 11) Printing place name Print data: 16. 17. 18.
Document processing Application examples Program (pseudo code) The corresponding numbering refers to the annotated program steps in the previous section.
Application examples Document processing BEGIN PRINT(char(27),"[90"p") PRINT(char(27),"["t") PRINT(char(27),"[60"p") GET(char(27),"[",char(n),""t") . . If necessary, evaluate the parameter n (document width in n/180 inch) . .
Document processing Application examples Result: 1: Result from OCR LINE 2: Result from TEXT PRINTING 264 T5023/5023+ - Programming Guide
Application examples Passbook processing with MSR Passbook processing with MSR This example illustrates programming for passbook processing with MSR. The passbook is to be positioned on the magnetic stripe with bottom reference. Then the magnetic stripe is read via the MSR device and the data (here line, account, balance) is transferred to the computer. After evaluation of the read data, the magnetic stripe is to be written with new MSR data and the passbook positioned on the next free posting line.
Passbook processing with MSR Application examples Passbook data 1: Passbook width 209 mm 2: Distance bottom edge of posting line 1/ top edge of passbook = 34 mm = 241/180 inch 3: Line spacing between the posting lines = 1/5 inch 4: Number of posting lines = 20 5: Five posting lines present 6: Printable area in a posting line = positions 25 to 86 (print positions of the printing unit for 10 cpi) print position 90 is identical with the right edge of the passbook. MSR processing is as per DIN.
Application examples Passbook processing with MSR Program steps (annotated) 1. Setting MSR parameters Command: CSI n1; n2; n3; n4; n5 ! r Parameters: n1 = 0 (no write repetitions = default value) n2 = 0 (no read repetitions = default value) n3 = 0 (write/read format = DIN) n4 = 99 (vertical distance from leading edge = 99/ 180 inch = 14 mm) n5 = 1 (bottom leading edge) Remarks: 2. 3. This parameter combination corresponds to the default setting of the document printer for MSR processing.
Passbook processing with MSR 4. 5. 268 Application examples Waiting for response ’read MSR’ and evaluation of the MSR data Response: CSI n1; n2; n3; n4 " r STX read data ETX Parameters: n1 = number of reading attempts n2 = reading threshold n3 = reading block number n4 = reading error (0 = without error) Remarks: When the execution of the command CSI " r is without error, the read data contains the value for the next free posting line (= 6, see step 7).
Application examples 6. 7. 8.
Passbook processing with MSR Application examples Program (pseudo code) The corresponding numbering refers to the annotated program steps in the previous section. . BEGIN CALL PROGRAM START ROUTINE CALL MSR CALL POSTING PRINT (char(12)) END BEGIN PROGRAM START ROUTINE PRINT(char(27),"[") PRINT("0;0;0;99;1!r") PRINT(char(27),"[1%t") END PROGRAM START ROUTINE BEGIN MSR PRINT(char(27),"["r") GET(char(27),"[") GET(char(n1,59,n2,59,n3,59,n4) GET(""r") GET(char(2)"... MSR data...", char(3)) . .
Application examples Passbook processing with MSR BEGIN POSTING PRINT(char(27),"[421!p") PRINT(char(27),"$",char(150,0)) . . Internal processing and editing of the print data . . PRINT("...Data in posting line...
Passbook processing with MSR 272 T5023/5023+ - Programming Guide Application examples
Loadable Firmware/Character Generators The firmware and character generators of the passbook and document printer are stored in a programmable memory with FLASH technology. The function for loading this memory is implemented by a resident program (bootstrap loader). The load function is activated either by control sequences in one of the printer emulations or by simultaneously pressing the key combination USER 2 and STOP when the printer is switched on.
Activating the Load Function Loadable Firmware/Character Genera- Activating the Load Function The activation of the load function is done via the printer emulation. The printer is switched to the load mode by entering a specific control sequence. This control sequence is identical for all emulations. ESC BEL L 27 1B 7 07 76 4C n 48-55 30-37 ASCII chars Decimal Hexadecimal Function: This command is used to exit the current emulation software. All data is deleted from the input buffers.
Loadable Firmware/Character Generators Load Functions: General Load Functions: General The firmware and character generators can be transferred to the passbook and document printer using the interface. Reasons for a transfer can be: – Initial operation (production). – Installation of new electronics (i.g. for service). – Loading a firmware update. – Loading a national character generator. The following functions are available in load mode: – Request module IDs. – Load character generator I.
Load Functions: General Loadable Firmware/Character Genera- Sequence of a Load Process The following figure illustrates the sequence of a load process. The order must be maintained.
Loadable Firmware/Character Generators Load Functions: General The load process is identical for all data to be loaded. A process begins with the request for the data ID using the escape sequence ESC I D. This indicates whether modules are loaded and which version is available. If the relevant module has not been loaded or if the versions do not match, the appropriate pre-command will be transferred in the second step. Then the appropriate module can be transferred.
Load Functions: General Loadable Firmware/Character Genera- Version ID: xxxx Update Update Update Release Basis Release Error handling Compatible modifications or updates First release First release Extension The passbook and document printer contains various data modules. The type of the relevant data module is identified by the file extension. The following table provided a description of the extensions and their meanings: Extension Meaning *.FNT *.MOD *.FRM *.
Loadable Firmware/Character Generators ESCAPE Sequences (Bootstrap ESCAPE Sequences (Bootstrap Loader) Switch-over to the Load Function ESC BEL L 27 1B 7 07 76 4C n 48-55 30-37 ASCII characters Decimal Hexadecimal Function: This command is used to exit the currently running emulation software. All data is deleted from the input buffer. The mechanical functions are stopped immediately. The load software is started and generates the acknowledgment ESC BEL L after 500ms min. for synchronization.
ESCAPE Sequences (Bootstrap Loader) Loadable Firmware/Character Ge- Exiting the Load Function ESC BEL E 27 1B 7 07 69 45 ASCII characters Decimal Hexadecimal Function: This command is used to exit the bootstrap loader, to test the electronics, and to start the loaded firmware. Note: The bootstrap loader is not exited unless a valid firmware and one of the character generators has been loaded.
Loadable Firmware/Character Generators ESCAPE Sequences (Bootstrap Request Module ID/Data ID ESC I D 27 1B 73 49 68 44 ASCII characters Decimal Hexadecimal Function: This command is used to request the data ID. All data modules loaded are reported.
ESCAPE Sequences (Bootstrap Loader) Loadable Firmware/Character GeStructure of the Data ID The response always begins with ESC I D: Length Contents Meaning 1 1 1 ESC I D ESCAPE Information Data ID Depending on the number of modules loaded, the ID then contains 1 to 4 entries. Each entry has a fixed length and ends with a colon, except for the last entry which ends with a semicolon.
Loadable Firmware/Character Generators ESCAPE Sequences (Bootstrap Examples Response if only the bootstrap loader is available ESC ID $MOD$ yymmdd rrvv BOOTPROM.FRM; Response if the bootstrap loader and the character generator have been loaded ESC ID $MOD$ yymmdd rrvv BOOTPROM.FRM: $MOD$ yymmdd rrvv CP15_437.FNT; Response if all data have been loaded ESC ID $MOD$ yymmdd rrvv BOOTPROM.FRM: $MOD$ yymmdd rrvv CP15_437.FNT: $MOD$ yymmdd rrvv 5023_STD.
Loading character generators Loadable Firmware/Character Genera- Loading character generators Indicate "Ready to load character generator" ESC F N T (n1) 27 1B 70 46 78 4E 84 54 n1 n1 (n2) n2 n2 (n3) n3 n3 (d) (00/01) (00/01) ASCII chars Decimal Hexadecimal Function: Description: This command is used to inform the printer that a new character generator should be loaded. All activities in the printer will be stopped, and all data will be deleted.
Loadable Firmware/Character Generators Loading character generators Loading the Character Generator $ 36 24 M 77 4D O 79 4F D 68 44 $ 36 24 ASCII chars Decimal Hexadecimal Function: $MOD$ is a part of the file and may not be transferred again before the data. Data is transferred after the character sequence $MOD$. It is not allowed to load other data than data with the file extension .FNT. A checksum is placed at the end of the file.
Loading the Firmware Loadable Firmware/Character Genera- Loading the Firmware Indicate ’Ready to load’ ESC M 77 27 1B 4D O 79 4F D 68 44 (n1) n1 n1 (n2) n2 n2 (n3) n3 n3 ASCII chars Decimal Hexadecimal Function: This command is used to inform the bootstrap loader that a new firmware should be loaded. All activities in the printer will be stopped, and old data will be deleted. Then the printer’s readiness to load is indicated to the host. The number of bytes to be loaded is also transferred.
Loadable Firmware/Character Generators Length of the Transfer Length of the Transfer Because the bootstrap loader receives binary data, an end character cannot be used to inform it when the transfer process is ended. For this reason, the length of the transferred is included in the call of the bootstrap loader. The length specification is used to determine how much memory must be deleted from the FLASH EPROM. The length of the data to be transferred is stored in the file after the file header.
Length of the Transfer Loadable Firmware/Character Genera- The header can be used to determine the overall number of bytes to be loaded, including the header itself. The file header and the checksum can be used to determine that a file is valid: Check sum calculation: Sum of all 16-bit words = 0 Acknowledgment of a successful load process: If the load process was completed successfully, the data ID is returned after 60s max. (typically after 15s): ESC ID $MOD$ yymmdd rrvv BOOTPROM.
Loadable Firmware/Character Generators Length of the Transfer Reading E-Journal Data ESC E L J 27 1B 69 45 77 4C 75 4A ASCII chars Decimal Hexadecimal Function: This command is used to inform the bootstrap loader that the data of the electronic journal function should be copied from the memory module to the electronics. This function is reserved for service calls when it is no longer possible to print data. The response has the following structure: Offset Length Contents Meaning 0 4 3 max.
Length of the Transfer 290 Loadable Firmware/Character Genera- T5023/5023+ - Programming Guide
Control of Asian Character Sets For passbook and document printers, the Asian character set is loaded via the system interface. This function is available only in device variants with a memory extension. In addition, the optional memory extension should be selected in the Service menu on the printer’s operating panel. The Asian character sets will not be available if these requirements are not fulfilled. Settings on the printer operating panel Memory extension Memory extension off Memory extension E.
Control of Asian Character Sets The following intending formats are currently implemented: GB 2312-80 VR China GB 5007 VR China GB 5199 VR China BIG5 Traditional Chinese (Hongkong and Taiwan) For character assignment see Appendix, section „Chinese Characters in the Passbook / Document Printer“. For character assignment see Appendix, section „Chinese Characters in the Passbook / Document Printer“. For character assignment see Appendix, section „Chinese Characters in the Passbook / Document Printer“.
Control of Asian Character Sets Example: Switch-over from 1-byte characters to 2-byte characters and vice versa: ESC [1$q /h B1 A2 Switch to 2-byte mode, character set GB2312-80 31 32 33 B1 B2 Character 1 1-byte character from the EPSON character set B2 31 Character 2 Because the character B2/31 does not exist in GB2312, the character B2 is ignored. The character 31 is recognized as a character from the EPSON character set.
Control of Asian Character Sets Pre-setting of the Character Set ESC [ n $ q CSI ESC 27 1B [ 91 5B n $ q n n n $ 36 24 q 113 71 Name ASCII chars Decimal Hexadecimal Parameter n: Value Font n=0 n=1 n=2 n=3 n = 4 .. 9 Epson fonts GB 2312-80 GB 5007 GB 5199 GB xxxx n = 10 n = 11 .. 100 n = 101 n = 102 ..
Specific Operating System Dependencies Windows NT Drivers The document printer is delivered with drivers for the operating systems Windows 95/98/NT/2000/XP. If the document printer is to be connected to a computer with the operating system Windows NT/2000/XP using a serial interface, the following special feature must be observed: i If one of these printer drivers has been installed, other applications can no longer directly address the serial interface assigned.
Windows NT Drivers 296 Specific Operating System Dependencies T5023/5023+ - Programming Guide
Appendix Command table Appendix Command table Command table for Epson ANSI emulation Command ASCII hex Function * BEL 07 Signal tone BS 08 Backspace of one character HT 09 Horizontal tabulation LF 0A Line feed VT 0B Vertical tabulation FF 0C Sheet ejection CR 0D Carriage return SO 0E Switching on elongated print for one line SI 0F Switching on condensed print DC 1 11 Printer online DC 2 12 Switching off condensed print DC 3 13 Printer offline DC 4 14 Switching off
Command table Appendix Command ASCII hex Function ESC % (n) 1B 25 n Switching on/ off the character set defined by the user ESC & (s) (n) (m) 1B 26 s n m Transferring the character definitions ESC * (s) (n) (m) 1B 2A s n m Selecting graphics mode ESC + (n) 1B 2B n Selecting n/360 inch line spacing ESC - (n) 1B 2D n Switching underlining on/ off ESC / (c) 1B 2F c Selecting a vertical tab channel ESC 0 1B 30 Selecting 1/8 inch line spacing ESC 2 1B 32 Selecting 1/6 inch line spacin
Appendix Command table Command ASCII hex Function ESC E 1B 45 Switching on bold print ESC F 1B 46 Switching off bold print ESC G 1B 47 Switching on double impact print ESC H 1B 48 Switching off double impact print ESC J (n) 1B 4A n Carrying out an n/180 inch line feed ESC K (n) (m) 1B 4B n m Switching on the graphics mode ’single density’ ESC L (n) (m) 1B 4C n m Switching on the graphics mode ’double density’ ESC M 1B 4D Selecting the character size 12 cpi (Elite) ESC N (n) 1B
Command table Appendix Command ASCII hex Function ESC [ n # q 1B 5B n 23 71 Selection of type fonts/ character sets ESC [ n $ p 1B 5B n 24 70 Paper feed of the document ESC [ n1 .. n5 ! r 1B 5B n1 .. n5 21 72 Parameter block MSR ESC [ " r 1B 5B 22 72 Reading a MSR track ESC [ # r STX .. ETX 1B 5B 23 72 02 ...
Appendix Command table Command ASCII hex Function ESC k (n) 1B 6B n Selecting the LQ type font ESC l (n) 1B 6C n Determining the left margin ESC p (n) 1B 70 n Switching proportional spacing on/off * ESC r (n) 1B 72 n Selecting the print colour * ESC s (n) 1B 73 n Switching half-rate printing on/off ESC t (n) 1B 74 n Selecting the character set ESC x (n) 1B 78 n Switching over the print quality (Draft/LQ) * = Non-executable commands If a command is non-executable (dependent on the
Command table Appendix Definition of barcode printing for T5023 Escape sequence The definition for barcode printing is: ESC [ 1B m ; h ; z ; n * r STX 5B 3X 3B 3X 3X 3B 3X 3X 3B 3X 2A 72 02 (data) ETX (data) 03 Prints barcode according to the characteristics defined by the following parameters. The ’;’ separates the parameters. The final code (’*’ ’r’) closes the parameter part. The barcode data is enclosed with STX (start of text) and ETX (end of text).
Appendix Command table Barcode zoom coeffizient The parameter ’z’ expresses the horizontal zoom coefficient in decimals. The following values are allowed: z 00-09 10-34 Values Ignored values Acceptable values (10 = basic width. 15 is 1.5 * basic width, 20 is double width, etc.) Human readable line The parameter ’n’ comprising one byte, enables or disables plain language printing of the barcode (’Human Readable Line’ - H.R.L.
Command table Appendix Loader commands Command ASCII hex Function ESC BEL L n ESC BEL E ESC I D 1B 07 4C n 1B 07 45 1B 49 44 Switching over to load function Leaving the load function Requesting data characteristic Ready to load character generator ESC F N T (n1) 1B 46 4E 54 n1 (n2) (n3) (d) n2 n3 d $ M O D $ (Daten) 24 4D 4F 44 24 ESC M O D (n1) (n2) (n3) 1B 4D 4F 44 n1 n2 n3 Character generator/firmware data transmitted Ready to load firmware E-Journal commands Command ASCII hex Function ESC
Appendix Character Sets Character Sets Font Code Table Font Type Font Sizes National Variants CP15_437.
Character Sets Appendix Font Code Table Font Type Font Sizes National Variants CP15_866.FNT Code Page 866 Latin / Cyrillic DQ, LQ Roman, LQ Sans Serif 10, 12, 15 cpi ----- CP15_869.FNT Eurobanking (limited) Code Page 869 Latin / Greek OCR-A / -B DQ, LQ Roman, LQ Sans Serif 10 cpi 10, 12, 15 cpi ----- CP15THAI.FNT Eurobanking (limited) Thailand character set with customer-specific/national assignment OCR-A / -B DQ, LQ Roman, LQ Sans Serif, Script 10 cpi 10, 12, 15 cpi ----- CP151250.
Appendix Character Sets Code Page 437 T5023/5023+ - Programming Guide 307
Character Sets Appendix ISO 8859-2 Latin No.
Appendix Character Sets ISO 8859-5 Cyrillic T5023/5023+ - Programming Guide 309
Character Sets Appendix ISO 8859-7 Greek 310 T5023/5023+ - Programming Guide
Appendix Character Sets ISO 8859-8 Hebrew T5023/5023+ - Programming Guide 311
Character Sets Appendix ISO 8859-9 Latin No.
Appendix Character Sets ISO 8859-15 T5023/5023+ - Programming Guide 313
Character Sets Appendix OCR-A 314 T5023/5023+ - Programming Guide
Appendix Character Sets OCR-B T5023/5023+ - Programming Guide 315
Character Sets Appendix Code Page ISO 2 316 T5023/5023+ - Programming Guide
Appendix Character Sets Code Page 775 Latin / Baltic T5023/5023+ - Programming Guide 317
Character Sets Appendix Code Page 850 Latin 1 318 T5023/5023+ - Programming Guide
Appendix Character Sets Code Page 852 Latin 2 T5023/5023+ - Programming Guide 319
Character Sets Appendix Code Page 855 320 T5023/5023+ - Programming Guide
Appendix Character Sets Code Page 857 Latin 5 T5023/5023+ - Programming Guide 321
Character Sets Appendix PC Code Page 858 322 T5023/5023+ - Programming Guide
Appendix Character Sets Code Page 860 (Portugal) For addresses 00h to 7Fh, see Code Page 437.
Character Sets Appendix Code Page 866 Latin/Cyrillic 324 T5023/5023+ - Programming Guide
Appendix Character Sets Code Page 869 Latin/Greek T5023/5023+ - Programming Guide 325
Character Sets Appendix Thailand Character Set (customer specific) # 550 ThaiRoman # 553 ThaiDQ # 560 ThaiScript The customer specific character set can only be controled with the font number and the respective ESC sequence (see the section “Selection of type fonts/ character sets” in the chapter “Additional commands”).
Appendix Character Sets 1250 Windows Latin 2 T5023/5023+ - Programming Guide 327
Character Sets Appendix 1251 Windows Cyrillic 328 T5023/5023+ - Programming Guide
Appendix Character Sets 1252 Windows Latin 1 T5023/5023+ - Programming Guide 329
Character Sets Appendix 1253 Windows Greek 330 T5023/5023+ - Programming Guide
Appendix Character Sets 1254 Windows Latin 5 T5023/5023+ - Programming Guide 331
Character Sets Appendix 1255 Windows Hebrew 332 T5023/5023+ - Programming Guide
Appendix Character Sets 1256 Windows Arabic T5023/5023+ - Programming Guide 333
Character Sets Appendix 1257 Windows Baltic Rim 334 T5023/5023+ - Programming Guide
Appendix Chinese Characters in the Passbook/ Chinese Characters in the Passbook/Document Printer Printer: One-byte mode ESC [ 0 $ q T5023/5023+ - Programming Guide 335
Chinese Characters in the Passbook/Document Printer Printer: Two-byte mode GB xxxx encoding ESC [ n $ q n = 1 ...
Appendix Chinese Characters in the Passbook/ BIG 5 encoding ESC [ n $ q n = 101 .....
Chinese Characters in the Passbook/Document Printer A2E9-A343 A344-A35B A35C-A373 A374-A3BA A3BB-A3BF A440-C67E C6A1-C8D4 C940-F9D5 Latin small letters Greek capital letters Greek small letters Zhuyin characters Zhuyin diacritic characters Hanzi (5401 characters - frequently used) Characters in circles and brackets, Hiragana, Katakana, Cyrillic characters, symbols, special characters Hanzi (7652 characters - less frequently used) Structure of the character generator The Asian font file has the following s
Appendix Chinese Characters in the Passbook/ File header Bytes Contents Name 0000 - 0004 0005 0006 - 000B 000C 000D - 0010 0011 0012 - 0019 001A 001B - 001D 001E 001f - 0021 $MOD$ blank yymmdd blank rrvv blank a....a . TBF blank a.a Identifier Separator Date Separator Release & version Separator File name Separator Extension Separator Length 0022 - 0023 xxxx Default font number 0024 - 002F blank Free T5023/5023+ - Programming Guide e.g. 960229 e.g. 1000 e.g.
Chinese Characters in the Passbook/Document Printer Appendix Font header Bytes Data type Name 0000 - 000F 0010 - 0011 0012 - 0015 ASCII int long z. B. FANG SONG z. B. FANG SONG = 0 0016 - 0019 001a - 001d 001e - 001f long long Font name Font number1 Pointer to start address First code Last code Empty No. of vertical pixels/char. width No. of horizontal pixel/char.
Appendix Chinese Characters in the Passbook/ Structure of the character generator The font file contains information about the individual characters in sequential order. 72 bytes are available to represent one character.
Chinese Characters in the Passbook/Document Printer Appendix GB 2312-80 / GB 5007 / GB 5199 The character set Guo Biao (GB) 2312-80 is a static 2-byte code for the People’s Republic of China. it contains a total of 6763 characters and forms the basis set for the simplified Chinese. In addition to the Chinese Characters the character set Guo Biao includes the Latin, Greek and Russian alphabet, Japanese and Korean characters, and symbols and line elements.
Appendix Chinese Characters in the Passbook/ Available Character Generators for the document printer Description CP15ASIA.TBF Rev. date 1001/28.06.00 Default font can be set on the operating panel Contents . Font Font No. GB2312 symbols GB5007 symbols GB5199 symbols GB....
Chinese Characters in the Passbook/Document Printer 344 T5023/5023+ - Programming Guide Appendix
Appendix IBM Emulations IBM Emulations IBM 4722 Emulation The passbook and document printer emulates the IBM 4722 printers model 1, 2, and 3. The functions of the printer model 3 are accessible only if a special protocol is used on the RS232 interface. The other modules can be operated without protocol and/or via the external interface. The control sequences for the IBM printer 4712 are ignored. General The selection of the model 3 emulation is done by setting the emulation type ’IBM 4722’.
IBM Emulations Appendix The last possible print line when printing lists (unformatted) varies according to the various printing units. Printer type Last print line before bottom paper edge T5023 / 4722 approx. 1 mm IBM 4722 approx. 6.5 mm IBM 9068 / 4722 approx. 5 mm Olivetti / 4722 Operation When the 4722 emulation is enabled, the STOP and EJECT keys have the same function as the STOP key of the 4722 printer. Exception: If an error occurs, the printer need not be switched of (see IBM4722).
Appendix IBM Emulations Variable initialisation parameters 4722 emulation: IBM4722 Switch - Electronic Board T5023/5023+ Setting IBM4722 Switch 1 Audible Alarm Not supported IBM4722 Switch 2 Zero Slash Not supported IBM4722 Switch 3 Automatic Line Feed Emulation menu LF (LF = LF) IBM4722 Switch 4 Reserved IBM4722 Switch 5 Character Set Character set 2 IBM4722 Switch 6 Automatic CR Emulation menu CR (CR = CR) IBM4722 Switch 7 Reserved Character set 2 IBM4722 Switch interface card SW 1..
IBM Emulations Appendix IBM Proprinter XL24 Emulation General The selection of the emulation is done using menu item Type ’Prop.XL24’. This emulation can be used with all interfaces. Emulation The function of loadable characters is not supported, due to different print head resolutions. The print attributes ’overscore’ and ’double height’ are not supported. Operation The operation and the emulation parameters are identical with the Epson ANSI emulation.
Appendix IBM Emulations Range of Commands for the ProprinterXL24 and 4722 Summary of the command sequences T5023 Interpreter for 4722 (IBM) ASCII Decimal Hex Function 4722 XL24 Default NULL BEL BS HAT LF 0 7 8 9 10 0 7 8 9 0A ignor Signal tone Backspace Horizontal tabulation Line feed X X X X X X X X X X VT FF 11 12 0B 0C Vertical tabulation Sheet ejection/page feed X X X X CR 13 0D Carriage Return X X SO 14 0E X X SI 15 0F X X Switched off DC1 17 11 DC2 18 12 DC3
IBM Emulations Appendix ASCII Decimal Hex Function 4722 XL24 ESC 0 27 48 1B 30 Select 1/8 line distance X X ESC 1 27 49 1B 31 Select 7/72 line distance X X ESC 2 27 50 1B 32 Select 1/6 variable line distance ESC A X X ESC 3 (n) 27 51 n 1B 33 n Select n/216 (n/180) line distance X X ESC 4 27 52 1B 34 Set Top of Form (EJECT X X ESC 5 (n) 27 53 1B 35 Set Auto LF Mode on CR - ON/OFF X X Operating panel ESC 6 27 54 1B 36 Character set 2 (Extended) X X On ESC 7
Appendix IBM Emulations ASCII Decimal Hex Function 4722 ESC N (n) 27 78 n 1B 4E n Ignore setting lower margin X ESC O 27 79 1B 4F Ignore deleting lower margin X ESC P n 27 80 1B 50 Proportional On Off X ESC Q (n) 27 81 n 1B 51 n Deselect Printer X ESC R 27 82 n 1B 52 n Reset all Tabstops (vert. and hor.
IBM Emulations Appendix ASCII Decimal Hex Function XL24 Default ESC SO 27 14 1B 0E Switching on elongated printing for one line X Switched off ESC SI 27 15 1B 0F Switching on condensed printing X Switched off ESC - (n) 27 45 n 1B 2D n Switching on/off underlining X Switched off ESC * (s)(n)(m) 27 42 s n m 1B 2A s n m ESC = 4722 Select graphic mode X Download X X (*2) X X (*2) ESC \ c1 c2 n..
Appendix Olivetti PR50 Emulation Olivetti PR50 Emulation General The selection of the emulation is done using the menu type ’Olivetti’. This emulation can be used with all interfaces. Emulation The function of loadable characters is not supported, due to different print head resolutions. The print attribute ’overscore’ is not supported. Initialization parameter All parameters that can be set in the relevant emulation menu are taken into consideration during the initialisation.
Olivetti PR50 Emulation ASC II ESC < ESC = ESC > ESC ? ESC H .. ESC I .. ESC J .. ESC L .. ESC M .. ESC O ESC Q .. ESC R .. ESC S 5 ESC S .. ESC T .. ESC U .. ESC W 0 ESC W 1 ESC X .. ESC Y D .. ESC Y E .. ESC Z ESC [ .. ESC \ ESC ] ESC ^ 0 ESC _ ESC ` .. ESC d ESC e ESC i ESC j ESC l ESC m .. ESC n ESC p .. ESC r x ESC r x ESC t .. ESC { ESC | A .. ESC | B .. DEL FS FS & FS . FS g FS k GS 354 Hex 1B 3C 1B 3D 1B 3E 1B 3F 1B 48 .. 1B 49 .. 1B 4A .. 1B 4C .. 1B 4D .. 1B 4F 1B 51 .. 1B 52 .. 1B 53 35 1B 53 .
Appendix Olivetti PR50 Emulation Character Sets for the Olivetti Emulation i The character set required from the Olivetti emulation are marked with a ’OL’ ending (e. g. ’CP1250OL.FNT’ or ’CP_437OL.FNT’). The character set required from the Olivetti emulation contains both character sets for the Epson-ANSI emulation and the following character sets required for the Olivetti emulation.
Paper Specifications Appendix Paper Specifications The document printer has a document print station which can process single documents, multi-copy documents (document sets) and passbooks. A magnetic stripe reader (MSR) can be installed as an option at the document print station. The document printer is operated with an automatic print head guidance system for printing passbooks and documents.
Appendix Paper Specifications b = width of the character pitch (e.g. 1/10" for 10 CPI) All dimensions shown in the illustration are in millimeter. For detailed information see the “Paper specifications” on the CD-ROM.
Paper Specifications 358 Appendix T5023/5023+ - Programming Guide
Appendix Error messages Error messages Status messages Status Description / Removal ONLINE NO_PAPER Online status, no paper inserted ONLINE PAPER Online status, paper drawn in DATA NO_PAPER STOP status, data in input buffer, no paper inserted DATA PAPER STOP status, data in input buffer, paper inserted STOP NO_PAPER STOP status, input buffer empty, no paper inserted STOP PAPER STOP status, input buffer empty, paper inserted LOAD PAPER Paper request by data in print buffer T5023/5023+ - Pr
Error messages Appendix Status messages (Bootstrap loader activated) Status LOAD NO PROGRAM NO_CHARCTER_ GENERATOR PROGRAMMING PROGRAMMING TIMEOUT TRANSM_ERROR PROG_ERR 360 Description Bootstrap loader activated Bootstrap loader activated, firmware missing Bootstrap loader activated, character generator misssing Memory area is programmed Timeout when loading data segments Data transmission error when loading data segments Programming error when loading memory chip T5023/5023+ - Programming Guide
Appendix Error messages Malfunctions i Some error messages contain numerical codes with additional information to the cause of error. This additional information is only for the service personnel and can be called up by pressing the VALID key . The service information will disappear after some time. Error Cause / Possible action PAPER LENGTH Document too short Service information: No./Meaning PAPER JAM Use a longer document Paper jam, paper blocked, paper can 00...
Error messages Error Appendix Cause / Possible action WRONG IF_TYPE Service information: No. / Meaning The Interface type set in the parameter menu cannot be activated Set another interface type: check whether the correct optional interface board is installed; check whether the optional interface board is correctly inserted.
Appendix Error FIRMWARE ERROR ELECTR ERROR (ELECTRONIC ERROR) Error messages Cause / Possible action Service information: No.
Error messages Error CARRIER ERROR DETECT ERROR HEAD HOT Appendix Cause / Possible action Service information: No.
Appendix Error messages Error Cause / Possible action POWERSUPPLY HOT The power supply is too hot TRANSP ERROR (TRANSPORT ERROR) FEEDER ERROR MICR ERROR MSR WRONG ORDER Rests between printing of the lines Document feed error Service information: No.
Error messages Appendix Error Cause / Possible action MSR ERROR Magnetic stripe reader hardware error Change unit 366 T5023/5023+ - Programming Guide Service information: No.
Appendix Description of the physical interface Description of the physical interface The physical interface of the document printer makes serial asynchronous data transmission possible. Optional the document printer can be retrofit with an Centronics interface. The following sections lists the performance characteristics of the interfaces. General The document printer comes standard with a serial asynchronous interface.
Description of the physical interface Appendix DTR and RTS are deactivated: 1. When the status changes from ONLINE to STOP (stop key pressed or printer error appears). 2. When the available input buffer area is less than 512 bytes. By the activated signal CTS the connected device signals to the printer to send data. Software handshake with XON/XOFF protocol In the XON/ XOFF protocol the printer signals to the connected device the readiness to receive data by sending an X-ON.
Appendix Description of the physical interface Interface data serial interface Signal level RS-232 Data format Baud Rate Data word length Stop bits Parity 2400, 4800, 9600, 19200 7/ 8 Bit 1/ 2 even/ odd/ none Parameter selection is performed via the operating panel.
Description of the physical interface Appendix Buffer control RS- 232 The document printer has a 8192 byte print buffer, whose size cannot be changed. If there are less than 512 bytes of buffer free no more data is accepted and the interface is disabled. Only when there are more than 1024 bytes available in memory, the printer is ready to receive data again. Depending on the interface, the line is controlled by the DTR/CTS hardware handshaking or by the XON/ XOFF software protocol.
Appendix Description of the physical interface Signal description and connector assignment RS- 232 interface Pin 05 SG – Signal Ground Data lines Pin 03 TD Transmitted Data Serial data output printer --> Host Pin 02 RD Received Data Serial data input printer <-- Host Control lines Pin 08 CTS – Clear To Send Entry In the DTR/Busy and XON/ XOFF protocol the ’ON’ status signals to the connected device (signal receiver=printer) that it is ready to receive data. Not used in the XON/ XOFF 2 protocol.
Description of the physical interface Pin 07 Appendix RTS – Request to Send Exit In the DTR/Busy protocol the ’ON’ status signals to the connected device (signal receiver=host) readiness to receive data. In the XON/ XOFF protocol DTR and RTS reflects back the operating readiness of the printer: – DTR/ RTS active: Online – DTR/RTS inactive: STOP (STOP key and operating interruption) or ERROR Pin 01 Printer switched on Exit The ’ON’ status informs the host system that the printer has been switched on.
Appendix Description of the physical interface Cable connection document printer - PC PinNo. Document printer 9-pin plug Cable Pin-No.
Description of the physical interface PinNo. Document printer 9-pin plug 8 CTS Clear to Send Entry <== The ’ON’ status signals the connected device (signal receiver) the readiness to receive data to (Not interpreted by the printer if the XON/ XOFF 2 protocol is selected.) 9 374 Cable Appendix Pin-No.
Appendix Description of the physical interface Interface data external Centronics interface With the parameter ’centronics’ of the interface menu the Centronics interface can be set to the ECP mode (centronics=ECP) or not (centronics=printer). If the parameter ’centronics’ is set to ’printer’ the Centronics interface can only be work in the compatibility mode.
Description of the physical interface Appendix Cable connection Pin-No. Host (1284-A) 25-pin D-SUB plug Pin-No.
Appendix Description of the physical interface Pin-No. Host (1284-A) 25-pin D-SUB plug Pin-No.
Description of the physical interface Appendix Signal description printer side (Centronics plug) in the compatibility mode and ECP-mode Pin-No.
Appendix Pin-No.
Description of the physical interface Appendix Description of the signals HostClk/nStrobe (Host driven) Compatibility Mode: Set active ’low’ to transfer data into printer´s input latch. Data is valid while nStrobe is low. ECP Mode: Used in a closed-loop handshake with PeriphAck to transfer data or address information from the host to the printer. Data 1 ... Data 8 Compatibility Mode: Forward channel data. ECP Mode: Host to the printer or printer to host address or data.
Appendix Description of the physical interface PeriphAck/Busy (Printer driven) Compatibility Mode: Driven ’high’ to indicate that the printer is not ready to receive data. ECP Mode: The printer uses this signal for flow control in the forward direction. PeriphAck also provides a ninth data bit used to determine whether command or data information is present on the data signals in the reverse direction.
Description of the physical interface Appendix XFlag/Select (Printer driven) Compatibility Mode: Set ’high’ to indicate that the printer is on-line. ECP Mode: Used by the printer to reply to the requested extensibility byte sent by the host during the negotiation phase. HostAck/nAutoFd (Host driven) Compatibility Mode: The interpretation of this signal varies from printer to printer. Set ’low’ by host to put some printers into auto-line feed mode.
Appendix Description of the physical interface nPeriphRequest / nFault (Printer driven) Compatibility Mode: Set ’low’ by the printer to indicate that an error has occoured. ECP Mode: The printer may drive this pin ’low’ to request communications with the host. The request is merely a ’hint’ to the host; the host has ultimate control over the transfer direction.
Description of the physical interface 384 T5023/5023+ - Programming Guide Appendix
Glossary ANSI ( American National Standards Institute) Standards institute in the USA, similar to the DIN institute in Germany. Antiqua fonts Type fonts with serifs, for example, Bookman, Garamond, Times. These fonts are especially suitable if large amounts of text are to remain easily legible. ASCII (American Standard Code for Information Interchange) This code is internationally standardized and also known in Germany as ISO 7bit code.
Glossary Font The complete character set of a type font in one size. Serial interface During serial data transfer each bit is transferred individually and consecutively. The serial interface is also known under the names V. 24 or RS-232-C. Advantages: possibility of checking correct transfer by means of a parity check of the received data word; also a considerably longer data cable than for the parallel interface can be used.
Index B Definition of a draft character 143 Definition of characters 133 Backspace 53 Definition of LQ characters 144 Basic character set 25, 126 DEL 54 Basic character table 25 Delete 54 BEL 120 Deleting a character 54 Bold print off 111 Deleting the bottom margin 70 Bold print ON 110 Deleting the MSB specification 48 BS 53 Design of a character 134 Determining 1/6 inch line spacing 59 Determining 1/8 inch line spacing 58 C Determining n/180 inch line spacing 60 Determining n/360 inch line spacing 63 CAN
Index ESC / (n) 73 ESC = 47 ESC > 46 ESC ? (n1) (m) 172 ESC 0 58 ESC 2 59 ESC 3 (n) 60 ESC 4 147 ESC 5 148 ESC A (n) 61 ESC a (n) 82 ESC b (n) (n1) (n2) .. NUL 72 ESC B ... NUL 70, 71 ESC D (n1) (n2) ...
Index Extended graphics character table 130 F FF 65 G Graphics 27 Graphics characters 25 Graphics mode/double density 169 Graphics mode/quadruple density 171 Graphics mode/single density 168 Graphics modes 159 H Horizontal positioning (absolute) 86 Horizontal positioning (relative) 88 Horizontal print control 75 Horizontal tabulation 85 HT 85 I Initializing the printer 42 Italic character 25 Italic characters 128 Italic print 147 Italic print OFF 148 L LF 56 Line feed 56 Line feed commands 55 T5023/50
Index M Mikrodruck 100 N National character set 127 National character sets 26 Non- executable commands 120 P Print modes 101 Print quality 92 Printable areas 181 Proportional spacing on/ off 97 R Reassigning graphics commands 172 Responses 176 S Select print quality 94 Selecting a vertical tab channel 73 Selecting the character size 10 cpi 98 Selecting the character size 12 cpi 99 Selecting the character size 15 cpi 100 Selecting the graphics mode 163 Selecting the LQ type font 96 Selecting the print
Index SO 105 Special character codes 51 Status and error messages 223 Superscript 22 Superscript/subscript OFF 116 Superscript/subscript ON 115 Switching on condensed print 102 Syntax of the character set commands 147 U Underlining 21 Underlining ON/OFF 114 Unidirectional printing 44 User defined characters 151 V Vertical print control 68 T5023/5023+ - Programming Guide 391
Index 392 T5023/5023+ - Programming Guide