Tally T5023+ Programming Manual

Multi-functional flat bed printer
Table of Contents

Advertisement

T5023/5023+
Programming Guide

Advertisement

Table of Contents
loading

Summary of Contents for Tally T5023+

  • Page 1 T5023/5023+ Programming Guide...
  • Page 2 "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 mod- el or design, are reserved. Delivery subject to availability; right of technical mod- ifications reserved."...
  • Page 3: Table Of Contents

    Contents Preface ... 1 Conventions ... 1 Abbreviations ... 2 Use of the manual ... 2 Contents of the manual ... 3 Short description of the document printer ... 7 Document printing point ... 7 Options... 8 Magnetic stripe reader (MSR)... 8 MICR...
  • Page 4 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 ... 42 Selecting unidirectional printing for one line... 44 Switching the unidirectional printing mode on/ off ... 44 Setting the MSB to 1 ...
  • Page 5 Contents Paper control ... 74 Horizontal print control ... 75 Setting the left margin ... 77 Setting the right margin ... 80 Setting the text alignment ... 82 Setting / deleting horizontal tabs ... 84 Horizontal tabulation ... 85 Horizontal positioning (absolute) ... 86 Horizontal positioning (relative) ...
  • Page 6 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 ... 147 Switching on italic print ... 147 Switching off italic print ... 148 Selecting the character set...
  • Page 7 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 ... 200 Mode switch- over for handling end of paper... 202 Dual station control ...
  • Page 8 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 ... 274 Load Functions: General ... 275 Sequence of a Load Process ... 276 Module Identification ...
  • Page 9 Contents ISO 8859-9 Latin No. 5 ... 312 ISO 8859-15... 313 OCR-A ... 314 OCR-B ... 315 Code Page ISO 2... 316 Code Page 775 Latin / Baltic ... 317 Code Page 850 Latin 1 ... 318 Code Page 852 Latin 2 ... 319 Code Page 855 ...
  • Page 10 Paper Specifications... 356 Reference Lines ... 356 Error messages ... 359 Status messages... 359 Status messages (Bootstrap loader activated) ... 360 Malfunctions ... 361 Description of the physical interface... 367 General ... 367 Handshaking protocols... 367 Interface data serial interface... 369 Interface data external Centronics interface ...
  • Page 11: Preface

    Preface This programming manual describes in the main the instruction set of the multi- functional 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.
  • Page 12: Abbreviations

    Abbreviations Abbreviations APA graphics MICR Use of the manual This manual describes printer programming for various document processing applications. All program examples in this manual are independent of programming langua- ges (pseudo code). Particulars for the conversion of pseudo code instructions into a programming language (special BASIC dialects, COBOL, C, etc.) will not be dealt with here.
  • Page 13: Contents Of The Manual

    Preface 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.
  • Page 14 Contents of the manual Chapter “Additional commands” This chapter explains special control commands for document processing or for processing ZeKoSa data. An important application area for the commands des- cribed here is the processing of passbooks. This also contains important infor- mation on processing documents using horizontal and vertical print positioning.
  • Page 15 Preface 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“...
  • Page 16 Contents of the manual Preface T5023/5023+ - Programming Guide...
  • Page 17: Short Description Of The Document Printer

    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 der (MICR) or a single sheet feeder as an option. Document printing point The term ’document’...
  • Page 18: Options

    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 rea- der (MSR device) for passbooks. This enables reading and updating from the magnetic stripe on passbooks depending on certain recording modes (DIN / IBM).
  • Page 19: System Interface

    Short description of the document printer System interface Data, which activates the functions of the printer is transferred through the sy- stem 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: –...
  • Page 20 System interface 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 appli- cations. Also this emulation can be used for the removal of the following printers: –...
  • Page 21: Application Areas

    Short description of the document printer 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: –...
  • Page 22 Application areas Short description of the document printer T5023/5023+ - Programming Guide...
  • Page 23: Programming Interface (General)

    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.
  • Page 24: Ascii Code

    Encryptions/Codes 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 hexadeci- mal 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 de- cimal 0 to decimal 255 (8- bit encryption).
  • Page 25 Programming interface (General) characters depending on the command I (= Intermediate Character) and F (= Final Character). The CSI sequences are used to control special docu- ment printer functions for document and MSR processing (see “document printer specifications” in this chapter and the chapter “Additional com- mands”).
  • Page 26: Activating The Document Printer Functions

    Encryptions/Codes 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.
  • Page 27: Print Effects

    Programming interface (General) 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.
  • Page 28: Fonts

    Print effects 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 cha- racter set ISO 8859 with the following versions are available for Letter Quality (LQ mode): –...
  • Page 29: Font Size / Character Density

    Programming interface (General) 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.
  • Page 30 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. Example: T5023/5023+ - Programming Guide...
  • Page 31: Highlighting Text

    Programming interface (General) Highlighting text The following print functions of the document printer can be influenced by corre- sponding 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.
  • Page 32 Print effects Programming interface (General) Superscript / subscript Footnotes, equation or special text designs are possible by switching superscript and subscript on and off. Example: T5023/5023+ - Programming Guide...
  • Page 33: Page Layout

    Programming interface (General) 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 ex- ample: – Setting and deleting horizontal and vertical tabs –...
  • Page 34 Print effects Programming interface (General) Example (Text adjustment): Example (line spacing) T5023/5023+ - Programming Guide...
  • Page 35: Character Tables

    Programming interface (General) 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, Ro- man, Sans Serif). This area is also called the ’basic character table’. The characters of the basic character table are encrypted in ASCII by the co- des hex 20 to hex 7F (decimal 32 to 127).
  • Page 36: National Character Sets

    Character tables National character sets By selecting a national character set, characters used in other languages are ad- ditionally 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 cha- racter table.
  • Page 37: Graphics

    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 me- mory of the document printer. It is possible to switch over at will between the normal character set and that defined by the user Graphics Via the document printer simple pictures and/ or diagrams can first be presented...
  • Page 38: Document Printer Specifications

    Document printer specifications 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.
  • Page 39: Document Printing

    Programming interface (General) Document printing For documents (DIN A4 sheets, standard forms) or passbooks the logical struc- ture of a document must be considered. Example (passbook constants) Page heading area (is not printed during a passbook transaction) Area with lines for logging deposits and withdrawals Last printable line Footer area (is not printed during a passbook transaction).
  • Page 40: Magnetic Stripe Processing

    Document printer specifications 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 en- crypted form. In what form the appropriate data is encrypted on a MSR magnetic stripe de- pends on the respective recording mode (DIN/IBM).
  • Page 41: Special Features Of The Document Processing

    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 docu- ment feeding mode must be considered. Insertion and ejection of documents In principle there are two possibilities for controlling the insertion and ejection of documents.
  • Page 42 Document printer specifications Programming interface (General) T5023/5023+ - Programming Guide...
  • Page 43: Standard Commands

    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 proces- sing or for processing MSR data are described in the chapter “Additional com- mands”.
  • Page 44: Coding Of Decimal Command Parameters

    Notes about command description Example of a formal command description (command syntax): 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. in the ESC sequences of the Epson- compatible commands must be transferred to the document printer in binary co- ded form and not as ASCII characters.
  • Page 45 Standard commands Example: Determining the document length at n inche 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). Parameter value of n must be encrypted binarily Note on which values the parameter n can have In contrast to the ESC sequences of the standard, character set and...
  • Page 46 Notes about command description Example: BEGIN PRINTLF("Print page with bottom margin") CALL LINE PRINT PRINT(char(27),"O") PRINTLF("Print page without bottom margin") CALL LINE PRINT 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:...
  • Page 47 Standard commands When defining subprograms, after BEGIN and END the subprogram name is specified (for example, BEGIN LINE PRINT ... END LINE PRINT). The instruction within REPEAT ... UNTIL (loop body) are executed until the abort criterion specified after UNTIL is fulfilled (for example, REPEAT ... UNTIL N = 6).
  • Page 48 Notes about command description The following values occur as arguments of PRINT and PRINTLF Argument "x" character (x) character (a, b,..., n) "text" A, B, C,..., N or counter, page, pass, etc. On ’x’: For example, C as printable character can be specified directly by means of ’C’ in the sequence ESC C NUL (n) or by means of char (67), whereby 67 is the decimal ASCII encryption of C.
  • Page 49 Standard commands Setting the document length (for example, 6 inches = ESC C NULL 6) PRINT( char(27,67,0,6)) PRINT( char(27),"C", char(0), char(6)) Initializing the printer after printing with line feed PRINT("text", char(10), char(27),"@") PRINT("text") PRINT(char( 10)) PRINT(char( 27),"@") PRINTLF("text") PRINT(char(27),"@") Printing variable values: SET counter = 0 REPEAT SET counter = counter + 1...
  • Page 50 Notes about command description Reaction to incorrect parameters or incorrect syntax Normally incorrect parameters n, n1, etc. are automatically replaced by the re- spective default value (for example, if the specified value range is exceeded). Commands with parameters which are within the specified value range, but inf- ringe on the set conditions, are ignored (for example, if horizontal absolute posi- tioning is attempted outside the possible print area).
  • Page 51: Controlling The Configuration Of The Printer

    Standard commands 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 @ Initializing the printer ESC < Selecting unidirectional printing for one line ESC U (n) Unidirectional printing mode on/ off one line...
  • Page 52: Initializing The Printer

    Controlling the configuration of the printer Initializing the printer Function: Via ESC @ the printer can be reset by the program to certain operating conditi- ons (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.
  • Page 53 Standard commands 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 (do- cument length, type font, character width, etc.) –...
  • Page 54: Selecting Unidirectional Printing For One Line

    Controlling the configuration of the printer Selecting unidirectional printing for one line < 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 Function: Normally printing is bidirectional (optimal printing path).
  • Page 55 Standard commands BEGIN PRINT(char(27),"U",char(0)) PRINTLF("bidirectional printing") PRINTLF("bidirectional printing") PRINTLF("bidirectional printing") PRINT(char(27),"U",char(1)) PRINTLF() PRINTLF("unidirectional printing") PRINTLF("unidirectional printing") PRINTLF("unidirectional printing") Result: Controlling the configuration of the printer T5023/5023+ - Programming Guide <-- bidirectional on <-- bidirectional off...
  • Page 56: Setting The Msb To 1

    Controlling the configuration of the printer Setting the MSB to 1 > Function: ESC > sets the most significant bit (MSB) of all incoming data to 1. Thus it is pos- sible 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 ta- ble range from hex 80 to hex FF).
  • Page 57: Setting The Msb To 0

    Standard commands Setting the MSB to 0 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 compu- ters which only transfer 7- bit data.
  • Page 58: Deleting The Msb Specification

    Controlling the configuration of the printer Deleting the MSB specification Function: ESC # cancels the MSB specification (deleting or setting the most significant bit) resulting from ESC = or ESC > An MSB specification resulting from ESC = or ESC > is also cancelled, when the printer is initialized with software (see ESC @).
  • Page 59: Printer Offline

    Standard commands Printer offline 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 Function: DC1 (device control 1) switches the printer back online after it has previously been switched offline by a DC3 code.
  • Page 60: Automatic Single Sheet Feeder On/Off

    Controlling the configuration of the printer Automatic single sheet feeder on/off ASC II Decimal Since the automatic single sheet feeder is not available for the document printer, all other parameters (n = R) are ignored except for one. Instead of ESC EM R (= sheet ejection) use the FF (Form Feed) com- mand to do without the ESC EM command altogether in an application.
  • Page 61: Special Character Codes

    Standard commands Special character codes In this chapter the following commands are described: Command Function Carriage Return Backspace of one character Deleting a character Canceling a line Carriage return Function: After CR (carriage return) the data contained in the buffer is printed and the print head is returned logically to the left edge.
  • Page 62 Special character codes Result: – CR without line feed – CR with line feed T5023/5023+ - Programming Guide Standard commands...
  • Page 63: Backspace Of One Character

    Standard commands Backspace of one character Function: After each BS character (backspace) the print head is moved logically one cha- racter 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 prin- ting.
  • Page 64: Deleting A Character

    Special character codes Deleting a character 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 Function: CAN (Cancel) cancels in the printing buffer the whole text of one print line prior to this code, but not the control codes.
  • Page 65: Line Feed Commands

    Standard 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 smal- lest unit for the line spacing is 1/ 180 inch. The corresponding line feed is carried out depending on the set line spacing: Command Function...
  • Page 66: Line Feed

    Line feed commands Line feed 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 – If after LF the logical bottom edge of the sheet is exceeded (depen- ding on the set document format), the document is ejected.
  • Page 67: Carrying Out An N/ 180 Inch Line Feed

    Standard commands Carrying out an n/ 180 inch line feed 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 ef- fect a carriage return (no CR with positioning of the print head at the beginning of the line).
  • Page 68: Determining 1/8 Inch Line Spacing

    Line feed commands Determining 1/8 inch line spacing 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 The line spacing set by ESC 0 is cancelled, if –...
  • Page 69: Determining 1/6 Inch Line Spacing

    Standard commands Determining 1/6 inch line spacing 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.
  • Page 70: Determining N/180 Inch Line Spacing

    Line feed commands Determining n/180 inch line spacing Function: ESC 3 (n) sets the line spacing to n/ 180 inch for the subsequent line feed com- mands. 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 line spacing...
  • Page 71: Determining N/60 Inch Line Spacing

    Standard commands Determining n/60 inch line spacing 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.
  • Page 72 Line feed commands Standard commands Result: T5023/5023+ - Programming Guide...
  • Page 73: Determining N/360 Inch Line Spacing

    Standard commands Determining n/360 inch line spacing Function: ESC + (n) sets the line spacing to n/ 360 inch for the subsequent line feed com- mands (LF). A value between 0 and 255 inclusive must be given for n. 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.
  • Page 74: Sheet Ejection Commands

    Sheet ejection commands Sheet ejection commands The length of a document can be set directly or indirectly and the document ejec- ted using the following commands: Command Function Sheet ejection ESC C (n) Determining the document length in lines ESC C NUL (n) Determining the document length in inches 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.
  • Page 75: Sheet Ejection

    Standard commands Sheet ejection Function: After FF all the data still contained in the printing buffer is printed and subse- quently the current document ejected. After the ejection the current logical position of the print line (distance between the upper edge of the document and the base line of the print line) is identical to the insertion position set via the operating panel (value between 10/ 60 and 80/ 60 inch) if print data is transmitted without a previous insertion command.
  • Page 76: Determining The Document Length At N Lines

    Sheet ejection commands Determining the document length at n lines Function: ESC C (n) sets the document length at n lines in the selected line spacing. A va- lue between 1 and 127 must be given for n. The actual physical document length is then determined by the respective current line spacing.
  • Page 77: Determining The Document Length At N Inches

    Standard commands Determining the document length at n inches 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.
  • Page 78: Vertical Print Control

    Vertical print control 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.
  • Page 79: Setting The Bottom Margin

    Standard commands Setting the bottom margin 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.
  • Page 80: Deleting The Bottom Margin

    Vertical print control – 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. –...
  • Page 81: Determining / Deleting Vertical Tabs (Channel 0)

    Standard commands Determining / deleting vertical tabs (channel 0) (n1) 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.
  • Page 82: Determining / Deleting Vertical Tabs For Any Channel

    Vertical print control Determining / deleting vertical tabs for any channel 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.
  • Page 83: Selecting A Vertical Tab Channel

    Standard commands Selecting a vertical tab channel Function: Via ESC / (c) a vertical tab channel c can be selected. The values 0 to 7 (= chan- nel 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.
  • Page 84: Paper Control

    Vertical print control Paper control 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 This command is only to be used if a single sheet feeder is installed. If the feeder is activated and no document has be fed by the operator, a document will be fed from the paper supply automatically when a print or line feed command is received.
  • Page 85: Horizontal Print Control

    Standard commands Horizontal print control This section describes the commands for setting horizontally arranged docu- ment 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 –...
  • Page 86 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).
  • Page 87: Setting The Left Margin

    Standard commands Setting the left margin 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.
  • Page 88 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 left margin is determined ac- cording to the character size 10 cpi. Subsequent alterations to the character size have no influence on the set margin.
  • Page 89 Standard commands Horizontal print control Result (reduced in size) Result (original size): T5023/5023+ - Programming Guide...
  • Page 90: Setting The Right Margin

    Horizontal print control Setting the right margin Function: ESC Q (n) influences the last horizontal print position, that is to say, a right mar- gin can be set. The right margin is determined by means of the value of n and the current valid character width.
  • Page 91 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 right margin is determined according to the character size 10 cpi. Subsequent alterations to the character size have no influence on the set margin.
  • Page 92: Setting The Text Alignment

    Horizontal print control Setting the text alignment Function: ESC a (n) sets the following text alignments depending on n (0 ... 3): – flush left : n = 0 (default value) – centered : n = 1 – flush right : n = 2 –...
  • Page 93 Standard commands – After switching on or initializing the printer (ESC @) the text align- ment 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).
  • Page 94: Setting / Deleting Horizontal Tabs

    Horizontal print control Setting / deleting horizontal tabs (n1) 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.
  • Page 95: Horizontal Tabulation

    Standard commands Horizontal tabulation 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. –...
  • Page 96: Horizontal Positioning (Absolute)

    Horizontal print control Horizontal positioning (absolute) 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)).
  • Page 97 Standard commands Horizontal print control Result (reduced in size): Result (Original size): T5023/5023+ - Programming Guide...
  • Page 98: Horizontal Positioning (Relative)

    Horizontal print control Horizontal positioning (relative) Function: Via ESC \ (n) (m) the print head is displaced horizontally to a position relative to the current print position. The position is calculated depending on the selected print quality (Draft or LQ) from the values n and m using the following formula: (m 256 + n) / 120 inch (Draft) (m 256 + n) / 180 inch (LQ) ESC \ (n) (m) is ignored if the specified position exceeds the right mar-...
  • Page 99 Standard commands Example: At the beginning the Draft print quality is set. BEGIN PRINT("Displacement") PRINT(char(27),"\",char(180,0)) PRINTLF("by 1.5 inches") PRINT(char(27),"x",char(1)) PRINT("Displacement") PRINT(char(27),"\",char(180,0)) PRINTLF("by 1 inch") Result: T5023/5023+ - Programming Guide Horizontal print control <-- LQ-mode...
  • Page 100: Determining The Character Spacing

    Horizontal print control Determining the character spacing Function: Using ESC SP (n) the normal distance between two print characters can be increased. The additional character spacing is calculated depending on the sel- ected 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.
  • Page 101 Standard commands Example: The character spacing is increased step- by- step. BEGIN SET N = 1 REPEAT SET N = N + 2 PRINT(char(27)," ",char(N)) PRINTLF("Spacing for n equal to ",N) UNTIL N = 9 Result: T5023/5023+ - Programming Guide Horizontal print control...
  • Page 102: Print Quality And Character Size

    Print quality and character size Print quality and character size This section describes the commands for setting the print quality and the character size. Command Function ESC x (n) Switching over the print quality (Draft/ LQ) ESC k (n) Selecting the LQ type font ESC p (n) Switching proportional spacing on/ off ESC P...
  • Page 103 Standard commands Width and height of character (example 'H' character): 10 cpi font width/ height LQ-Sans Serif 2.0/2.6 mm LQ-Roman 2.3/2.5 mm 1.8/2.5 mm With proportional spacing the different widths of the individual characters are ta- ken into consideration, for example, the character ’i’ is narrower than the charac- ter ’w’, i.
  • Page 104: Switching Print Quality (Draft/ Lq)

    Print quality and character size Switching print quality (Draft/ LQ) 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). –...
  • Page 105 Standard commands Example: The character spacing is increased step- by- step BEGIN PRINT(char(27),"x",char(0)) PRINTLF("print quality Draft") PRINT(char(27),"x",char(1)) PRINTLF("print quality LQ") Result: Print quality and character size T5023/5023+ - Programming Guide...
  • Page 106: Selecting The Lq Type Font

    Print quality and character size Selecting the LQ type font 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.
  • Page 107: Switching Proportional Spacing On/Off

    Standard commands Switching proportional spacing on/off 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’...
  • Page 108: Selecting The Character Size 10 Cpi (Pica)

    Print quality and character size Selecting the character size 10 cpi (Pica) 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.
  • Page 109: Selecting The Character Size 12 Cpi (Elite)

    Standard commands Selecting the character size 12 cpi (Elite) 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. – After switching on or initializing the printer, the character size is set to the value, which has been set in the emulation menu.
  • Page 110: Selecting The Character Size 15 Cpi

    Print quality and character size Selecting the character size 15 cpi 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. – After switching on or initializing the printer, the character size is set to the value, which has been set in the emulation menu.
  • Page 111: Print Modes

    Standard commands Print modes The use of different print modes (e. g., bold print, elongated print, underlining) ena- bles a document to be structured for optical effect. This section describes the com- mands for the selection of the print modes. Command Function Switch on condensed print...
  • Page 112: Switching On Condensed Print

    Print modes Switching on condensed print Function: SI switches condensed print on. The character size in condensed print is appro- ximately 40% smaller than in normal print. – The command SI has the same effect as the command ESC SI. –...
  • Page 113: Switching On Condensed Print

    Standard commands Switching on condensed print Function: ESC SI has the same effect as the command SI. ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide Print modes...
  • Page 114: Switching Off Condensed Print

    Print modes Switching off condensed print Function: DC2 switches the condensed print off, which was set using SI, ESC SI or ESC ! (n) or in the emulation menu. Example: BEGIN PRINT("normal",char(15),"condensed") PRINTLF(char(18),"normal") Result: ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide Standard commands...
  • Page 115: Switching On Elongated Print For One Line

    Standard commands Switching on elongated print for one line 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. –...
  • Page 116: Switching On Elongated Print For One Line

    Print modes Switching on elongated print for one line Function: ESC SO has the same effect as the command SO. ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide Standard commands...
  • Page 117: Switching Off Elongated Print

    Standard commands Switching off elongated print Function: DC4 switches off the elongated print set using SO or ESC SO (within the current print line). Elongated print switched on using ESC W (n) or ESC ! (n) is not swit- ched off by DC4. ASCII character Decimal Hexadecimal...
  • Page 118: Switching Elongated Print On/Off

    Print modes Switching elongated print on/off 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. Elongated print can be combined with condensed print and all the cha- racter sizes (10, 12, 15 cpi).
  • Page 119: Enable/Disable Double Character Height

    Standard commands Enable/Disable Double Character Height Function: All characters following this command are printed with double the normal height. Parameters: n = 0 deactivates the mode n = 1 activates the mode ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide Print modes...
  • Page 120: Switching On Bold Print

    Print modes Switching on bold print Function: ESC E switches bold print on. With bold print each dot of a print character is prin- ted twice. The second dot is printed slightly displaced to the right. – Bold print is switched off again using ESC F or ESC ! (n). –...
  • Page 121: Switching Off Bold Print

    Standard commands Switching off bold print Function: ESC F switches off the bold print set using ESC E or ESC ! (n). Example: BEGIN PRINT("normal",char(27),"E"," bold") PRINTLF(char(27),"F"," normal") Result: ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide Print modes...
  • Page 122: Switching On Double Impact Print

    Print modes Switching on double impact print Function: ESC G switches double impact print on. With double impact print each line is printed twice, the second time slightly displaced horizontally. – Double impact print is switched off again using ESC H or ESC ! (n). –...
  • Page 123: Switching Off Double Impact Print

    Standard commands Switching off double impact print Function: ESC H switches off the double impact print set using ESC G or ESC ! (n). Example: BEGIN PRINT("normal",char(27),"G"," double impact") PRINTLF(char(27),"H"," normal") Result: ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide Print modes...
  • Page 124: Switching Underlining On/Off

    Print modes Switching underlining on/off 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))
  • Page 125: Switching On Superscript/Subscript

    Standard commands Switching on superscript/subscript 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 che- mical formulas). – Switching on subscript After setting ESC S (1) all subsequent print characters are printed reduced to half the size and displaced downwards (for example, in mathematical or chemical formulas).
  • Page 126: Switching Off Superscript/Subscript

    Print modes Switching off superscript/subscript Function: ESC T switches off superscript or subscript of the print characters. ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide Standard commands...
  • Page 127: Selection Of Combined Print Mode

    Standard commands Selection of combined print mode Function: Using ESC ! (n) the following character sizes and print modes in any (valid) com- bination can be switched on or off (by specifying a value n between 0 and 255): – 10 cpi character size (Pica) –...
  • Page 128 Print modes – 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 –...
  • Page 129 Standard commands 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") Result (reduced in size): T5023/5023+ - Programming Guide Print modes...
  • Page 130: Non- Executable Commands

    Non- executable commands Non- executable commands This section describes the commands which cannot be executed by the docu- ment printer because of specific requirements. Such commands are ignored, therefore they do not cause an error. Command Function Signal tone ESC s (n) Switching half- rate printing on/ off ESC r (n) Selecting the print colour...
  • Page 131: Switching Half- Rate Printing On/Off

    Standard commands Switching half- rate printing on/off 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. Selecting the print colour Function: With a suitable printer by means of ESC r (n) a print colour can be selected de- pending on the n value (for example, 0 = black, 1 = red, 2 = blue).
  • Page 132 Non- executable commands Standard commands T5023/5023+ - Programming Guide...
  • Page 133: Character Set Commands

    Character set commands With the help of the following control commands, it is possible to change bet- ween the different character sets of the printer. Furthermore, your own charac- ters can be defined as dot patterns and stored in the memory of the printer. Command ESC % (n) ESC &...
  • Page 134: Character Set Selection

    Character set selection Character set selection The document printer prints characters as dot patterns. The data for the dot pat- terns 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 corre- sponding character according to the stored pattern.
  • Page 135 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).
  • Page 136 Character set selection 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. The lower control code table is occupied by control codes (hex 00 to 1F or decimal 0 to 31).
  • Page 137 Character set commands Country versions (national character sets) A total of twelve character codes of the basic character set (hex 23-24, 40, 5B- 60 and 7B- 7E) can be occupied with national special characters using the com- mand ESC R (n). Thirteen country versions are available: The country versions also apply for italic characters in the upper char- acter table.
  • Page 138 Character set selection Area with italic characters or graphics and special characters The italic character area for the italic character set lies in the upper character ta- ble. It contains all the basic characters in the currently selected print quality or LQ type font in italics.
  • Page 139 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. T5023/5023+ - Programming Guide...
  • Page 140 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 char- acter set can be addressed in the complete upper character table. T5023/5023+ - Programming Guide...
  • Page 141 Character set commands 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.
  • Page 142 Character set selection The following diagram explains the selection of the different character sets: – e 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.
  • Page 143: Definition Of Characters

    Character set commands Definition of characters Definition of characters For the definition of a new character the following steps are necessary: 1. Design of a character 2. Transferring the design to a dot grid 3. Encryption of the dot pattern into a number sequence 4.
  • Page 144 Definition of characters 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 charac- ters of the character set –...
  • Page 145 Character set commands 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: –...
  • Page 146 Definition of characters Character set commands Dot grid for LQ print quality: T5023/5023+ - Programming Guide...
  • Page 147 Character set commands 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. The following table contains the number of dots (columns) in a horizontal and vertical direction for the various character types: Print quality/ print mode...
  • Page 148 Definition of characters – On a dot grid, dots may not be set directly beside each other hori- zontally. 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.
  • Page 149 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 char- acter must be encrypted into a sequence of data bytes, i. e. into numbers be- tween 0 and 255.
  • Page 150 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. Example: T5023/5023+ - Programming Guide...
  • Page 151 Character set commands Transferring the number sequence to the printer When the complete dot pattern of a character is encrypted as a number se- quence, this number sequence is transferred to the printer (RAM) using the con- trol command ESC &. Subsequently the character can be printed as a character defined by the user.
  • Page 152 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 descrip- tion of ESC &...
  • Page 153 Character set commands 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).
  • Page 154 Definition of characters 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.
  • Page 155: Notes On The Use Of User Defined Characters

    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.
  • Page 156 Notes on the use of user defined characters 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 –...
  • Page 157: Syntax Of The Character Set Commands

    Character set commands 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 Function: Italic print is switched on using ESC 4.
  • Page 158: Switching Off Italic Print

    Switching on italic print Result: Switching off italic print Function: Italic print activated using ESC 4 is switched off again using ESC 5. In the upper character table, italic characters can be addressed even after entering ESC 5 (see ESC t (n)). ASCII character Decimal Hexadecimal...
  • Page 159: Selecting The Character Set

    Character set commands Selecting the character set Function: Using ESC t (n), one of the following character sets of the complete upper cha- racter table is selected: – Italic character set (n= 0) The upper character table contains the italic characters of the current cha- racter set (draft, LQ or defined by the user).
  • Page 160: Selecting A National Character Set

    Switching on italic print Selecting a national character set Function: Altogether twelve character codes of the basic character set (hex 23, 24, 40, 5B- 60 and 7B- 7E) can be occupied with national special characters using the com- mand ESC R (n). By means of a value between 0 and 12 for n, one of thirteen possible country versions is selected according to the following list: n = 0 : USA...
  • Page 161: Switching On/Off The Character Set Defined By The User

    Character set commands Switching on/off the character set defined by the user Function: Using ESC % (n) the character set defined by the user is switched on. Charac- ters 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.
  • Page 162: Switching On Extended Character Set

    Switching on italic print Switching on extended character set 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.
  • Page 163: Switching Off Extended Character Set

    Character set commands Switching off extended character set 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.
  • Page 164: Copying The Character Set Into The Ram

    Switching on italic print Copying the character set into the RAM Function: It is advisable to use this command when only a few characters of a resident cha- racter set are to be modified. Before the definition of a new character (using ESC &), any resident character set can be copied into the RAM of the printer using ESC : The desired resident character set, for example the draft standard character set or an LQ type font, is activated for this using the appropriate control command,...
  • Page 165: Transferring The Character Definition

    Character set commands Transferring the character definition & 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) ... The parameters have the following meaning: –...
  • Page 166 Switching on italic print Character set commands T5023/5023+ - Programming Guide...
  • Page 167: Graphics Commands

    Graphics commands The instruction set of the document printer contains commands for printing gra- phics, 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 cha- racter table) (see chapter “Character set commands”).
  • Page 168 – General notes on the command description can be found in the chapter “Standard commands” in the sections “Description com- ponents”, “Coding of decimal command parameters” and “Program examples”. – The document printer works in different graphics modes. A gra- phics mode is labelled by the number of print head needles addres- sed when printing, (8 needles or 24 needles) and by the horizontal dot spacing (60 –...
  • Page 169: Graphics Modes

    Graphics commands Graphics modes The graphics modes of the document printer are identified by the number of ver- tically 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: –...
  • Page 170: Mode Of Operation Of The Graphics Commands

    Mode of operation of the 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.
  • Page 171 Graphics commands Mode of operation of the graphics Example: T5023/5023+ - Programming Guide...
  • Page 172 Mode of operation of the graphics commands The total number of data bytes must be adhered to exactly. If too many data by- tes 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.
  • Page 173: Syntax Of The Graphics Commands

    Graphics commands Syntax of the graphics commands Selecting the graphics mode Function: Using ESC * (s) (n) (m) according to the value (s) one of the graphics modes is activated according to the following table: graphics mode single density double density double density, double rate quadruple density...
  • Page 174 Syntax of the 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 24- dot graphics mode three data bytes per dot column The section “Mode of operation of the graphics commands”...
  • Page 175 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 subrou- tines 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.
  • Page 176 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 T5023/5023+ - Programming Guide...
  • Page 177 Graphics commands Syntax of the graphics commands Result: T5023/5023+ - Programming Guide...
  • Page 178: Switching On The 'Single Density' Graphics Mode

    Syntax of the graphics commands Switching on the ’single density’ graphics mode 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.
  • Page 179: Switching On The 'Double Density' Graphics Mode

    Graphics commands Switching on the ’double density’ graphics mode 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.
  • Page 180: Switching On The 'Double Density And Double Rate' Graphics Mode

    Syntax of the graphics commands Switching on the ’double density and double rate’ graphics mode 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.
  • Page 181: Switching On The 'Quadruple Density' Graphics Mode

    Graphics commands Switching on the ’quadruple density’ graphics mode 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.
  • Page 182: Reassigning Graphics Commands

    Syntax of the graphics commands Reassigning graphics commands Function: One of the graphics modes of the document printer can be assigned to the gra- phics 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).
  • Page 183: Additional Commands (Printer)

    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. The description is divided into the following main sections: –...
  • Page 184: Structure Of The Additional Commands

    Structure of the additional commands Structure of the additional commands We begin with an explanation of the component parts used in the additional com- mands and responses. General Additional commands for controlling document and passbook processing and responses have, in general, the following syntactic structure: P1 ;...
  • Page 185 Additional commands (Printer) – 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 charac- ters (in contrast to the ESC sequences of the standard, character set and graphics commands for which numeric values are transmitted to the docu- ment printer in binary form).
  • Page 186: Transfer Of User Data

    Structure of the additional commands 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...ETX Meaning Start of text End of text Reaction to incorrect parameters Normally an additional command is ignored if non- decimal parameters or para- meters exceeding the specified value range are transferred.
  • Page 187 Additional commands (Printer) Structure of the additional commands Requested data responses The basic characteristics of requested data responses are that for each respon- se a requesting control command from the printer control was recognized (for example, request = read the MSR track, response = MSR data or error identifi- cation).
  • Page 188: Notes On The Command Description

    Structure of the additional commands Notes on the command description In the individual descriptions of the CSI commands the Pi parameters are repre- sented as follows: : one parameter n1; n2;n3 parameters (in this case 3) n1; ... ; n5 (0 - 9) Value range of a parameter from 0–...
  • Page 189: Important Notes On Document Processing

    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.
  • Page 190: Character Box

    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”).
  • Page 191 Additional commands (Printer) When printable areas are defined in this section, reference is always to the character box defined here. The capital letter ’H’, used in the rele- vant illustrations of printable areas, only serves as an example for all print characters.
  • Page 192: Horizontal Positioning

    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.
  • Page 193 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 iden- tical 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)”).
  • Page 194 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.).
  • Page 195: Vertical Positioning

    Additional commands (Printer) 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 posi- tion 0) is displaced to the right by the value n.
  • Page 196 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 (ab- solute vertical positioning from the upper edge of the form) and CSI n "...
  • Page 197 Additional commands (Printer) Important notes on document processing Absolute vertical positioning (bottom reference): 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).
  • Page 198 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 per- formance.
  • Page 199: Basic Commands For Document Processing

    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...
  • Page 200: Paper Feed Of The Document

    Basic commands for document processing Additional commands (Printer) Paper feed of the document 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.
  • Page 201: Selection Of Type Fonts/ Character Sets

    Additional commands (Printer) Basic commands for document processing Selection of type fonts/ character sets Parameter: n = type font or character set or font number (0 to 9999) The font number is fixed when developing a specific character set. Function: Using this command by means of a type font or character set number n, special character sets (fonts) can be selected which do not belong to the standard cha- racter sets of the Epson protocol.
  • Page 202 Basic commands for document processing Additional commands (Printer) – The character fonts for the document printer have the following standard op- tions: DQ area = LQ area = 1. Roman 2. Sans- Serif 3. OCR-A (OCR-A1 Eurobanking) 4. OCR-B (OCR-B1 Eurobanking) –...
  • Page 203 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 the- se fonts in the manner described in the chapter “Standard commands”.
  • Page 204: Absolute Vertical Positioning

    Basic commands for document processing Additional commands (Printer) Absolute vertical positioning Leading edge = upper edge of form Leading edge = lower edge of form Parameter: n = positioning in a vertical direction by n/180 inch (n = 1 to 9999) The permitted upper limit of the parameter value is specified by the set docu- ment height.
  • Page 205 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 com- mands, after transfer to the printer, are valid for effecting the output of the cha- racters still situated in the print buffer.
  • Page 206: Relative Vertical Positioning Backwards

    Basic commands for document processing Additional commands (Printer) Relative vertical positioning backwards 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 docu- ment height and the current line position.
  • Page 207: Requesting The Document Width

    Additional commands (Printer) Basic commands for document processing Requesting the document width Command: Response: n = document width of the current form in n/ 180 inch. Function: Via the control command CSI " t, the printer control transmits information to the program about the width of the document currently being processed.
  • Page 208: Document Edge Detection

    Basic commands for document processing Additional commands (Printer) Document edge detection Function: The document printer ignores this function. Name ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide...
  • Page 209: Activating Passbook Processing

    Additional commands (Printer) Basic commands for document processing Activating passbook processing Function: The document printer ignores this function. Name ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide...
  • Page 210: Specification Of The Horizontal Leading Edge

    Basic commands for document processing Additional commands (Printer) Specification of the horizontal leading edge Parameter: switch for the horizontal leading edge n = 0 : (flush left, default value) n = 1 : (flush right) Function: Via CSI n % t, the printer control is informed to which horizontal edge the sub- sequent print and read operations are to refer (also see section “Important notes on document processing”, subsection “Horizontal positioning”...
  • Page 211 Additional commands (Printer) Basic commands for document processing T5023/5023+ - Programming Guide...
  • Page 212: Mode Switch- Over For Handling End Of Paper

    Basic commands for document processing Additional commands (Printer) Mode switch- over for handling end of paper 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 LENGTH...
  • Page 213 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 operating manual) n = 1 : automatic error handling After an error the following actions are executed by the printing unit: –...
  • Page 214 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.
  • Page 215: Dual Station Control

    Additional commands (Printer) Basic commands for document processing Dual station control Parameter: Dual station control n = 0 : de-activated; default value n = 1 : activated n = 2 : activated n = 3 : activated n = 4 : activated Function: The ’Dual station control’...
  • Page 216: Switching On/Off Multi Part

    Basic commands for document processing Additional commands (Printer) Switching on/off Multi Part Encreasing the copying power 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.
  • Page 217: Controlling The Msr / Micr Functions

    Additional commands (Printer) 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 ma- gnetic stripe.
  • Page 218: Position And Measurements For Msr Magnetic Stripes

    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 specifica- tions in the appendix “Paper specification”. The position of a magnetic stripe on a passbook and the measurements of the magnetic stripe are fixed according to DIN 32744.
  • Page 219 Additional commands (Printer) Controlling the MSR / MICR functions Horizontal fold book T5023/5023+ - Programming Guide...
  • Page 220: Parameter Block Msr

    Controlling the MSR / MICR functions Parameter block MSR n1;...;n5 n1;...;n5 n1;...;n5 n1;...;n5 Parameter: n1 = number of write repetitions n2 = number of read repetitions n3 = identifier for the write/ read format (number of the recording format n4 = vertical distance from the form edge (0 to 9999 in the measuring unit 1/ 180 inch, thus n4/ 180 inch) n5 = leading edge for the vertical distance (0 = top, 1 = bottom).
  • Page 221 Additional commands (Printer) – Table for recording formats Depending on the recording formats, the user must transfer the following va- lues via CSI ... ! r, in order to be able to process the following recording mo- des: Format IBM 1 IBM 2 105 characters ISO 7811...
  • Page 222: Reading A Msr Track

    Controlling the MSR / MICR functions Reading a MSR track Command: Response: n1;...;n4 n1;...;n4 n1;...;n4 n1;...;n4 n1 = number of required reading attempts n2 = reading threshold n3 = horizontal reading block number n4 = reading error (0 = without error; > 0 = error) STX (02h) = start of the read data area Read data =...
  • Page 223 Additional commands (Printer) Function: The MSR track is read using the command CSI " r. The desired options are pre- set, if necessary, via the command ’MSR parameter block’ (CSI ... ! r) (number of reading attempts, recording mode, position of the magnetic stripe, etc.). Irre- spective of whether the reading attempt could be completed successfully, data for the program is transferred.
  • Page 224 Controlling the MSR / MICR functions – Depending on the recording format, the following user data can be read: Format IBM 1 IBM 2 105 characters ISO 7811 Max. number information characters T5023/5023+ - Programming Guide Additional commands (Printer) Information character range (hex) 30 to 39...
  • Page 225: Writing A Msr Track

    Additional commands (Printer) Writing a MSR track Response (acknowledgement of the write command): n1;n2 n1;n2 n1;n2 n1;n2 n1 = number of required writing attempts n2 = error in the read after write check (0 = no error, 1 = error) Function: The block of characters specified via CSI # r between STX and ETX is recorded on the magnetic stripe under the conditions set using the command ’MSR para-...
  • Page 226 Controlling the MSR / MICR functions After the execution of the command a acknowledgement CSI n1; n2 # r is produced, which can be evaluated in the ber of writing attempts and a message if an error has occured during control rea- ding.
  • Page 227: Deleting A Msr Track

    Additional commands (Printer) Deleting a MSR track Function: The vertical position on the magnetic stripe fixed at the transfer of the MSR pa- rameters (CSI ... ! r) is overwritten with ’ZERO’ characters (the MSR track is de- leted). The command triggers the output of characters still in the print buffer to the document printing point.
  • Page 228: The Micr Read Process

    Controlling the MSR / MICR functions 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), –...
  • Page 229 Additional commands (Printer) 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 (smal- ler 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.
  • Page 230 Controlling the MSR / MICR functions 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:...
  • Page 231: Activate Parameter Command Micr

    Additional commands (Printer) Activate parameter command MICR Parameter for MICR: n1 = 0 (no function, parameter is ignored) n2 = Number of reading repetitions (parameter is ignored) n3 = Identifier for reading format with: 10 = CMC7 11 = E13B n4 = maximum document width (in 1/180) inch adjustable: 496 to 1490 (70mm to 210mm) all other values activate the default value 725 (102mm)
  • Page 232: Reading Command Micr

    Controlling the MSR / MICR functions Reading command MICR Command: 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: n1;...;n4 n1;...;n4...
  • Page 233: Status And Error Messages

    Additional commands (Printer) 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 ESC [ n ! t...
  • Page 234: Notes On The Printer Status

    Status and error messages Notes on the printer status ONLINE This status exists after an error- free initializing operation. In this status the re- ceiving 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.
  • Page 235 Additional commands (Printer) 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: –...
  • Page 236: Setting Control Points/ Initiating The Control Cycle

    Status and error messages Setting control points/ initiating the control cycle Command Response (control point): Parameter: value freely definable by the application in the range 0 to 9999. Name ASCII character Decimal Hexadecimal Name ASCII character Decimal Hexadecimal T5023/5023+ - Programming Guide Additional commands (Printer)
  • Page 237 Additional commands (Printer) 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 para- meter value n that the application transferred in the request.
  • Page 238: Setting Control Point Ii

    Status and error messages Setting control point II Command: Response (control point): Parameter: value freely definable by the application in the range 0 to 9999. Function: The command CSI n ) t triggers the release of an acknowledgement signal to the processor interface if the last mechanical procedure was started in the prin- ting unit and no error has occurred at this point in time.
  • Page 239 Additional commands (Printer) 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.
  • Page 240: Global Printer Status

    Status and error messages Global printer status 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’...
  • Page 241: Special Printer Messages

    Additional commands (Printer) Special printer messages Command (requesting special printer messages): Response (requesting special printer messages): Parameter: ’Global Code’ (0 to 999) ’Special Code’ (0 to 999) " Name " ASCII character Decimal Hexadecimal " " T5023/5023+ - Programming Guide Status and error messages Name ASCII character...
  • Page 242 Status and error messages 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’...
  • Page 243: Printing Unit Parameters

    Additional commands (Printer) Printing unit parameters Command (requesting printing unit parameters): n = 0 Response without parameter n8 (printer type) n = 1 Response with parameter n8 (printer type) Response (printing unit parameters): n1;...;n9 n1;...;n9 n1;...;n9 n1;...;n9 Parameter: n1 = Printing station number 0: document station 1: journal station n2 = 4: document...
  • Page 244 Status and error messages n= 9 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. journal: n1 = Printer station number 0: document station 1: journal station...
  • Page 245: Electronic Journal Functions

    Additional commands (Printer) Electronic Journal Functions Change between Document and Journal Printing Parameter: n = 0 Document print (Default) n = 1 Electronic journal memory The parameter ’Journal memory’ is used to redirect all following print characters to a resident memory. All control sequences are ignored, except for line feeds. This command initializes the printout of all characters still located in the internal print buffer.
  • Page 246 Electronic Journal Functions 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. –...
  • Page 247: Application Examples

    Application examples This chapter demonstrates using detailed examples how the document printer is programmed for common application cases. In particular, the following application cases will be explained in separate sec- tions: – Text processing (printing on a blank form using different print attributes) –...
  • Page 248: Processing Of A Blank Form

    Processing of a blank form 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 com- mands 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.
  • Page 249: Type Area

    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. T5023/5023+ - Programming Guide...
  • Page 250 Processing of a blank form Document length First print position Last print position Position of processor ab- breviation Position of date First print line Reference line Start of text Greetings line 10: Name of sender = 72 lines with 1/ 6 inch line spacing = left margin (logical) = position 12 (10 cpi) right margin (logical) = 35...
  • Page 251: Print Effects

    Application examples Processing of a blank form Print effects T5023/5023+ - Programming Guide...
  • Page 252 Processing of a blank form 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: –...
  • Page 253: Program Steps (Annotated)

    Application examples Program steps (annotated) Switching on LQ mode Command: Parameter: Switching on proportional spacing Command: Parameter: Remarks: Setting line spacing Command: Remarks: Determining the document length Command: Parameter: Remarks: Determining the left margin Command: Parameter: ESC x (n) n = 1 (LQ mode) ESC p (n) n = 1 (proportional spacing on) With proportional spacing setting the charac-...
  • Page 254 Processing of a blank form Determining the right margin Command: Parameter: Remarks: Determining the vertical tabs Command: Parameters: Remarks: Deleting the default values for horizontal tabs Command: Remarks: Setting the horizontal tabs Command: Parameters: Remarks: ESC Q (n) n = 72 (position 72 with 10 cpi) The default value is 90.
  • Page 255 Application examples Vertical tabulation to the first address line Command: Printing address Remarks: Horizontal tabulation to the processor abbreviation Command: Printing processor abbreviation Remarks: Horizontal tabulation to the date Command: Printing date Vertical tabulation to the reference line Command: Setting italic print Command: Last address line (place) without line feed Printing without line feed...
  • Page 256 Processing of a blank form 18. Determining additional spacing between characters Command: Parameter: Remarks: Printing reference line Deleting additional spacing between the characters Command: Parameter: Switching off italic print Command: Vertical tabulation to start of text Command: Printing text from ’Dear Mr ...’ to ’... query about the type of’ Switching on bold print Command: Printing text ’connector for the RS- 232 interface’...
  • Page 257 Application examples Switching off bold print Command: Printing text to ’... 9- pin Cannon plug’ plus blank lines to sketch Selecting other LQ type Command: Parameter: Setting centred print format adjustment Command: Parameter: ’05 ... 01’ Printing Switching off proportional spacing Command: Parameter: Setting character size to 15 cpi...
  • Page 258 Processing of a blank form Printing lines with ’oo ... oo’ (5 times) and ’oo ... oo’ (4 times) Deleting additional spacing between characters Command: Parameter: Setting character size to 10 cpi again Command: Switching proportional spacing on again Command: Parameter: Printing from ’09 ...
  • Page 259 Application examples Vertical tabulation to the name of sender Command: Printing name of sender Document ejection Command: T5023/5023+ - Programming Guide Processing of a blank form...
  • Page 260: Program (Pseudo Code)

    Processing of a blank form Program (pseudo code) The corresponding numbering refers to the annotated program steps in the pre- vious section. BEGIN CALL PROGRAM START ROUTINE CALL LETTER HEAD CALL REFERENCE CALL INTRODUCTION CALL SKETCH CALL SENDER PRINT(char(12)) BEGIN PROGRAM START ROUTINE PRINT(char(27),"x",char(1)) PRINT(char(27),"p",char(1)) PRINT(char(27),"2")
  • Page 261 Application examples 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.99") END LETTER HEAD BEGIN REFERENCE PRINT(char(11)) PRINT(char(27),"4") PRINT(char(27)," ",char(12)) PRINT("RS-232-interface") PRINT(char(27)," ",char(0)) PRINT(char(27),"5") END REFERENCE T5023/5023+ - Programming Guide Processing of a blank form 10: VT (line 8) 12: HT (position 35) 14: HT (position 40)
  • Page 262 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.") PRINTLF( ) PRINTLF("For the RS-232 interface the printer has a 9-pin Cannon plug:") PRINTLF( )
  • Page 263 Application examples 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 ... 06") PRINTLF( ) PRINTLF("Pin numbering (plan view)") PRINT(char(27),"a",char(0)) PRINT(char(27),"k",char(0)) END SKETCH BEGIN SENDER PRINT(char(11)) PRINTLF("Yours sincerely") PRINTLF(char(11)) PRINTLF("(John Smith)") END SENDER T5023/5023+ - Programming Guide...
  • Page 264: Document Processing

    Document processing 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.
  • Page 265: Document Structure

    Application examples Document structure Distance bottom edge of document/ bottom edge of coding line = 8. 47 mm = 60/180 inch (DIN 66008) Distance left edge of document/ left edge of first OCR A character = 3/10 inch (DIN 66008) Distance top edge of document/ bottom edge of first text line = 24 mm = 170/180 inch Distance between the text lines = 7.
  • Page 266: Print Positions

    Document processing 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.
  • Page 267 Application examples 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) Name Vertical position from top edge via line feed of 53/180 inch Absolute dot position as 2 Text "MR.
  • Page 268: Program Steps (Annotated)

    Document processing Program steps (annotated) Setting absolute vertical position referring to the bottom document edge Command: Parameter: Remarks: 2a. Requesting document width (optional) Command: Remarks: 2b. Positioning on the coding line if document width measurement was used (optional). Command: Parameter: Remarks: CSI n "...
  • Page 269 Application examples Evaluating response to document width Command: Parameter: Remarks: Reaching horizontal print position for OCR printing Command: Parameters: Remarks: OCR print in amount field Print data: Setting absolute vertical position referring to the top document edge Command: Parameter: Remarks: Reaching horizontal print position for amount text Command: Parameters:...
  • Page 270 Document processing 8a. Selecting LQ type font Command: Parameter: 8b. Printing amount text Print data: Reaching horizontal print position for currency abbreviation/amount = 24 mm Command: Parameters: Remarks: 10. Printing currency abbreviation/ amount Print data: 11. Line feed Command: Parameter: Remarks: 12.
  • Page 271 Application examples 13. Printing name of receiver Print data: 14. Reaching horizontal print position for place name Command: Parameters: 15. Printing place name Print data: 16. Line feed Command: Parameter: 17. Reaching horizontal print position for date Command: Parameters: 18. Printing date Print data: 19.
  • Page 272: Program (Pseudo Code)

    Document processing Application examples Program (pseudo code) The corresponding numbering refers to the annotated program steps in the pre- vious section. T5023/5023+ - Programming Guide...
  • Page 273 Application examples 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) CALL OCR LINE CALL TEXT PRINTING PRINT(char(12)) BEGIN OCR LINE PRINT(char(27),"$",char(180,0)) PRINT("00000045000 ") END OCR LINE BEGIN TEXT PRINTING PRINT(char(27),"[170!p") PRINT(char(27),"$",char(60,0)) PRINT(char(27),"k",char(0)) PRINT("FOUR HUNDRED AND FIFTY ------------") PRINT(char(27),"$",char(2,1))
  • Page 274 Document processing Result: Result from OCR LINE Result from TEXT PRINTING T5023/5023+ - Programming Guide Application examples...
  • Page 275: Passbook Processing With Msr

    Application examples 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.
  • Page 276: Passbook Data

    Passbook processing with MSR Passbook data Passbook width 209 mm Distance bottom edge of posting line 1/ top edge of passbook = 34 mm = 241/180 inch Line spacing between the posting lines = 1/5 inch Number of posting lines = 20 Five posting lines present Printable area in a posting line = positions 25 to 86 (print positions of the printing unit for 10 cpi)
  • Page 277: Program Steps (Annotated)

    Application examples Program steps (annotated) Setting MSR parameters Command: Parameters: Remarks: Specifying the horizontal leading edge (logical) Command: Parameter: Remarks: Reading the magnetic stripe (MSR data) Command: Remarks: Passbook processing with MSR CSI n1; n2; n3; n4; n5 ! r n1 = 0 (no write repetitions = default value) n2 = 0...
  • Page 278 Passbook processing with MSR Waiting for response ’read MSR’ and evaluation of the MSR data Response: Parameters: Remarks: Note: Updating the magnetic stripe (MSR data) Command: Parameter: Remarks: CSI n1; n2; n3; n4 " r STX read data ETX n1 = number of reading attempts n2 = reading threshold...
  • Page 279 Application examples Setting absolute vertical position with reference to the top passbook edge (depending on the next free posting line) Command: Parameter: Remarks: Reaching horizontal print position for beginning of posting line Command: Parameter: Remarks: – Execution of transaction- relevant program steps (for example, mo- difying passbook file) –...
  • Page 280: Program (Pseudo Code)

    Passbook processing with MSR Program (pseudo code) The corresponding numbering refers to the annotated program steps in the pre- vious section. BEGIN CALL PROGRAM START ROUTINE CALL MSR CALL POSTING PRINT (char(12)) 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),"[")
  • Page 281 Application examples 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...") END POSTING Result: New passbook entry Passbook processing with MSR T5023/5023+ - Programming Guide 6: CSI n ! p 7: ESC $ (n) (m)
  • Page 282 Passbook processing with MSR Application examples T5023/5023+ - Programming Guide...
  • Page 283: Loadable Firmware/Character Generators

    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.
  • Page 284: Activating The Load Function

    Activating the Load Function 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. Function: This command is used to exit the current emulation software.
  • Page 285: Load Functions: General

    Loadable Firmware/Character Generators 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). –...
  • Page 286: Sequence Of A Load Process

    Load Functions: General Sequence of a Load Process The following figure illustrates the sequence of a load process. The order must be maintained. Host Switch to load function Request module identifier Check if new data has to be transferred, give corresponding loading commands and wait Transfer corresponding...
  • Page 287: Module Identification

    Loadable Firmware/Character Generators 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.
  • Page 288 Load Functions: General Version ID: x x x x Update Update Update Release Basis 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...
  • Page 289: Escape Sequences (Bootstrap Loader)

    Loadable Firmware/Character Generators ESCAPE Sequences (Bootstrap Loader) Switch-over to the Load Function 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.
  • Page 290: Exiting The Load Function

    ESCAPE Sequences (Bootstrap Loader) Loadable Firmware/Character Ge- Exiting the Load Function 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.
  • Page 291: Request Module Id/Data Id

    Loadable Firmware/Character Generators Request Module ID/Data ID Function: This command is used to request the data ID. All data modules loaded are reported. ESCAPE Sequences (Bootstrap T5023/5023+ - Programming Guide ASCII characters Decimal Hexadecimal...
  • Page 292 ESCAPE Sequences (Bootstrap Loader) Loadable Firmware/Character Ge- Structure of the Data ID The response always begins with ESC I D: Length Contents Meaning 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.
  • Page 293 Loadable Firmware/Character Generators 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:...
  • Page 294: Loading Character Generators

    Loading character generators Loading character generators Indicate "Ready to load character generator" 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.
  • Page 295: Loading The Character Generator

    Loadable Firmware/Character Generators Loading the Character Generator 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.
  • Page 296: Loading The Firmware

    Loading the Firmware Loading the Firmware Indicate ’Ready to load’ 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.
  • Page 297: Length Of The Transfer

    Loadable Firmware/Character Generators 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.
  • Page 298 Length of the Transfer 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...
  • Page 299: Reading E-Journal Data

    Loadable Firmware/Character Generators Reading E-Journal Data 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.
  • Page 300 Length of the Transfer Loadable Firmware/Character Genera- T5023/5023+ - Programming Guide...
  • Page 301: Control Of Asian Character Sets

    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.
  • Page 302 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) When a 2-byte character generator is available, this character generator is automatically enabled after power-on. After a default font number has been specified, the relevant character is set.
  • Page 303 Control of Asian Character Sets Example: Switch-over from 1-byte characters to 2-byte characters and vice versa: ESC [1$q Switch to 2-byte mode, character set GB2312-80 /h B1 A2 31 32 33 Character 1 1-byte character from the EPSON character set Attributes The attributes ’bold’, ’elongated print’, ’condensed print’...
  • Page 304: Pre-Setting Of The Character Set Esc

    Pre-setting of the Character Set ESC [ n $ q Parameter n: Value Font n = 0 Epson fonts n = 1 GB 2312-80 n = 2 GB 5007 n = 3 GB 5199 n = 4 .. 9 GB xxxx n = 10 FANG SONG GB2312- GB5007, GB5199 and...
  • Page 305: Specific Operating System Dependencies

    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: If one of these printer drivers has been installed, other applications can no longer directly address the serial interface assigned.
  • Page 306 Windows NT Drivers Specific Operating System Dependencies T5023/5023+ - Programming Guide...
  • Page 307: Appendix

    Appendix Appendix Command table Command table for Epson ANSI emulation Command ASCII hex * BEL DC 1 DC 2 DC 3 DC 4 ESC SO 1B 0E ESC SI 1B 0F ESC EM (n) 1B 19 n ESC SP (n) 1B 20 n ESC ! (n) 1B 21 n...
  • Page 308 Command table Command ASCII hex ESC % (n) 1B 25 n ESC & (s) (n) (m) 1B 26 s n m ESC * (s) (n) (m) 1B 2A s n m ESC + (n) 1B 2B n ESC - (n) 1B 2D n ESC / (c) 1B 2F c...
  • Page 309 Appendix Command ASCII hex ESC E 1B 45 ESC F 1B 46 ESC G 1B 47 ESC H 1B 48 ESC J (n) 1B 4A n ESC K (n) (m) 1B 4B n m ESC L (n) (m) 1B 4C n m ESC M 1B 4D ESC N (n)
  • Page 310 Command table Command ASCII hex ESC [ n # q 1B 5B n 23 71 ESC [ n $ p 1B 5B n 24 70 ESC [ n1 .. n5 ! r 1B 5B n1 .. n5 21 ESC [ " r 1B 5B 22 72 ESC [ # r STX ..
  • Page 311 Appendix Command ASCII hex ESC k (n) 1B 6B n ESC l (n) 1B 6C n ESC p (n) 1B 70 n * ESC r (n) 1B 72 n * ESC s (n) 1B 73 n ESC t (n) 1B 74 n ESC x (n) 1B 78 n Non-executable commands...
  • Page 312: Definition Of Barcode Printing For T5023

    Command table Definition of barcode printing for T5023 Escape sequence The definition for barcode printing is: ESC [ 5B 3X 3B 3X 3X 3B 3X 3X 3B 3X 2A 72 02 Prints barcode according to the characteristics defined by the following parame- ters.
  • Page 313 Appendix Barcode zoom coeffizient The parameter ’z’ expresses the horizontal zoom coefficient in decimals. The fol- lowing values are allowed: Values 00-09 Ignored values 10-34 Acceptable values (10 = basic width. 15 is 1.5 * basic width, 20 is double width, etc.) Human readable line The parameter ’n’...
  • Page 314: Loader Commands

    Command table Loader commands Command ASCII hex ESC BEL L n 1B 07 4C n ESC BEL E 1B 07 45 ESC I D 1B 49 44 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)
  • Page 315: Character Sets

    Appendix Character Sets Font Code Table CP15_437.FNT Code Page 437 Includes additional fonts ISO 8859 - 2/-5/-7/-8/-9 (compatible with HPR4905) Eurobanking (limited) CP15C437.FNT Code Page C437 for the Asian market (the dollar character was replaced by the Chinese character of currency) Includes additional fonts ISO 8859 - 2/-5/-7/-8/-9 (compatible with HPR4905)
  • Page 316: National Variants

    Character Sets Font Code Table CP15_866.FNT Code Page 866 Latin / Cyrillic Eurobanking (limited) CP15_869.FNT Code Page 869 Latin / Greek Eurobanking (limited) CP15THAI.FNT Thailand character set with customer-specific/national assignment Eurobanking (limited) CP151250.FNT Windows Code Page 1250 Latin 2 Eurobanking (limited) CP151251.FNT Windows Code Page 1251 Cyrillic...
  • Page 317: Code

    Appendix Character Sets Code Page 437 T5023/5023+ - Programming Guide...
  • Page 318: Iso 8859-2 Latin No. 2

    Character Sets Appendix ISO 8859-2 Latin No. 2 T5023/5023+ - Programming Guide...
  • Page 319: Iso 8859-5 Cyrillic

    Appendix Character Sets ISO 8859-5 Cyrillic T5023/5023+ - Programming Guide...
  • Page 320: Iso 8859-7 Greek

    Character Sets Appendix ISO 8859-7 Greek T5023/5023+ - Programming Guide...
  • Page 321: Iso 8859-8 Hebrew

    Appendix Character Sets ISO 8859-8 Hebrew T5023/5023+ - Programming Guide...
  • Page 322: Iso 8859-9 Latin No. 5

    Character Sets Appendix ISO 8859-9 Latin No. 5 T5023/5023+ - Programming Guide...
  • Page 323: Iso 8859-15

    Appendix Character Sets ISO 8859-15 T5023/5023+ - Programming Guide...
  • Page 324: Ocr-A

    Character Sets Appendix OCR-A T5023/5023+ - Programming Guide...
  • Page 325: Ocr-B

    Appendix Character Sets OCR-B T5023/5023+ - Programming Guide...
  • Page 326: Code Page Iso 2

    Character Sets Appendix Code Page ISO 2 T5023/5023+ - Programming Guide...
  • Page 327: Code Page 775 Latin / Baltic

    Appendix Character Sets Code Page 775 Latin / Baltic T5023/5023+ - Programming Guide...
  • Page 328: Code Page 850 Latin 1

    Character Sets Appendix Code Page 850 Latin 1 T5023/5023+ - Programming Guide...
  • Page 329: Code Page 852 Latin 2

    Appendix Character Sets Code Page 852 Latin 2 T5023/5023+ - Programming Guide...
  • Page 330: Code

    Character Sets Appendix Code Page 855 T5023/5023+ - Programming Guide...
  • Page 331: Code Page 857 Latin 5

    Appendix Character Sets Code Page 857 Latin 5 T5023/5023+ - Programming Guide...
  • Page 332: Pc Code

    Character Sets Appendix PC Code Page 858 T5023/5023+ - Programming Guide...
  • Page 333: Code Page 860 (Portugal)

    Appendix Character Sets Code Page 860 (Portugal) For addresses 00 to 7F , see Code Page 437. T5023/5023+ - Programming Guide...
  • Page 334: Code Page 866 Latin/Cyrillic

    Character Sets Appendix Code Page 866 Latin/Cyrillic T5023/5023+ - Programming Guide...
  • Page 335: Code Page 869 Latin/Greek

    Appendix Character Sets Code Page 869 Latin/Greek T5023/5023+ - Programming Guide...
  • Page 336: Thailand Character Set (Customer Specific)

    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/ cha- racter sets”...
  • Page 337: 1250 Windows Latin 2

    Appendix Character Sets 1250 Windows Latin 2 T5023/5023+ - Programming Guide...
  • Page 338: 1251 Windows Cyrillic

    Character Sets Appendix 1251 Windows Cyrillic T5023/5023+ - Programming Guide...
  • Page 339: 1252 Windows Latin 1

    Appendix Character Sets 1252 Windows Latin 1 T5023/5023+ - Programming Guide...
  • Page 340: 1253 Windows Greek

    Character Sets Appendix 1253 Windows Greek T5023/5023+ - Programming Guide...
  • Page 341: 1254 Windows Latin 5

    Appendix Character Sets 1254 Windows Latin 5 T5023/5023+ - Programming Guide...
  • Page 342: 1255 Windows Hebrew

    Character Sets Appendix 1255 Windows Hebrew T5023/5023+ - Programming Guide...
  • Page 343: 1256 Windows Arabic

    Appendix Character Sets 1256 Windows Arabic T5023/5023+ - Programming Guide...
  • Page 344: 1257 Windows Baltic Rim

    Character Sets Appendix 1257 Windows Baltic Rim T5023/5023+ - Programming Guide...
  • Page 345: Chinese Characters In The Passbook/Document Printer

    Appendix Chinese Characters in the Passbook/ Chinese Characters in the Passbook/Document Printer Printer: One-byte mode ESC [ 0 $ q T5023/5023+ - Programming Guide...
  • Page 346: Printer: Two-Byte Mode

    Chinese Characters in the Passbook/Document Printer Appendix Printer: Two-byte mode GB xxxx encoding ESC [ n $ q n = 1 ... 100 T5023/5023+ - Programming Guide...
  • Page 347 Appendix BIG 5 encoding ESC [ n $ q n = 101 ...200 A140-A24E Symbols A24F-A258 Various special characters A259-A261 Chinese characters A262-A2AE Graphic characters A2AF-A2B8 Arabian digits A2B9-A2C2 Roman digits A2C3-A2CE Hangzhou digits A2CF-A2E8 Latin capital letter Chinese Characters in the Passbook/ T5023/5023+ - Programming Guide...
  • Page 348 Chinese Characters in the Passbook/Document Printer A2E9-A343 Latin small letters A344-A35B Greek capital letters A35C-A373 Greek small letters A374-A3BA Zhuyin characters A3BB-A3BF Zhuyin diacritic characters A440-C67E Hanzi (5401 characters - frequently used) C6A1-C8D4 Characters in circles and brackets, Hiragana, Katakana, Cyrillic characters, symbols, special characters C940-F9D5 Hanzi (7652 characters - less frequently used)
  • Page 349 Appendix File header Bytes Contents 0000 - 0004 $MOD$ 0005 blank 0006 - 000B yymmdd 000C blank 000D - 0010 rrvv 0011 blank 0012 - 0019 a...a 001A 001B - 001D 001E blank 001f - 0021 0022 - 0023 xxxx 0024 - 002F blank Chinese Characters in the Passbook/...
  • Page 350 Chinese Characters in the Passbook/Document Printer Font header Bytes Data type Administration/ emulation parameter 0000 - 000F ASCII 0010 - 0011 0012 - 0015 long 0016 - 0019 long 001a - 001d long 001e - 001f Printer control parameter 0020 - 0021 0022 - 0023 0024 - 0025 0026 - 0027...
  • Page 351 Appendix 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. x x x x x x x x x Example: GBxxxx FANGSONG character B0/A1 Column information: 00 00 00, 00 00 00, 3f ff e0, 10 02 00, 10 02 00, 3f ff 80, 10 00 00, 00 00 00, 7f ff ff, 3f ff fe, 20 c0 80, 3f 31 c0, 78 1f 80, 20 00 00, 11 ff 80, 10 82 00, 10 82 08,...
  • Page 352: Font Number

    Chinese Characters in the Passbook/Document Printer 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.
  • Page 353: Available Character Generators For The Document Printer

    Appendix Available Character Generators for the document printer Description Rev. date Default font Contents Font GB2312 symbols GB5007 symbols GB5199 symbols GB... Simplified Chinese FANGSONG BIG5 Traditional Chinese Chinese Characters in the Passbook/ CP15ASIA.TBF 1001/28.06.00 can be set on the operating panel Font No.
  • Page 354 Chinese Characters in the Passbook/Document Printer Appendix T5023/5023+ - Programming Guide...
  • Page 355: Ibm Emulations

    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.
  • Page 356 IBM Emulations The last possible print line when printing lists (unformatted) varies according to the various printing units. Printer type T5023 / 4722 IBM 4722 IBM 9068 / 4722 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.
  • Page 357 Appendix Variable initialisation parameters 4722 emulation: IBM4722 Switch - Electronic Board IBM4722 Switch 1 Audible Alarm IBM4722 Switch 2 Zero Slash IBM4722 Switch 3 Automatic Line Feed Emulation menu LF (LF = LF) IBM4722 Switch 4 Reserved IBM4722 Switch 5 Character Set IBM4722 Switch 6 Automatic CR IBM4722 Switch 7 Reserved IBM4722 Switch interface card...
  • Page 358: Ibm Proprinter Xl24 Emulation

    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.
  • Page 359: Range Of Commands For The Proprinterxl24 And 4722

    Appendix Range of Commands for the ProprinterXL24 and 4722 Summary of the command sequences T5023 Interpreter for 4722 (IBM) ASCII Decimal Function NULL ignor Signal tone Backspace Horizontal tabulation Line feed Vertical tabulation Sheet ejection/page feed Carriage Return Switching on elongated printing for one line Switching on condensed printing...
  • Page 360 IBM Emulations ASCII Decimal ESC 0 27 48 ESC 1 27 49 ESC 2 27 50 ESC 3 (n) 27 51 n ESC 4 27 52 ESC 5 (n) 27 53 ESC 6 27 54 ESC 7 27 55 ESC : 27 58 ESC A (n) 27 65 n...
  • Page 361 Appendix ASCII Decimal ESC N (n) 27 78 n ESC O 27 79 ESC P n 27 80 ESC Q (n) 27 81 n ESC R 27 82 n ESC S (n) 27 83 n ESC T 27 84 ESC U (n) 27 85 ESC W (n) 27 87 n...
  • Page 362 IBM Emulations ASCII Decimal ESC SO 27 14 ESC SI 27 15 ESC - (n) 27 45 n ESC * (s)(n)(m) 27 42 s n m 1B 2A s n m ESC = ESC \ c1 c2 n..n 27 92 n n ESC BEL L 27 07 76 (*1) Printers with IBM 4722 emulation do not support this control code.
  • Page 363: Olivetti Pr50 Emulation

    Appendix 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’...
  • Page 364 Olivetti PR50 Emulation ASC II ESC < 1B 3C ESC = 1B 3D ESC > 1B 3E ESC ? 1B 3F ESC H .. 1B 48 .. ESC I .. 1B 49 .. ESC J .. 1B 4A .. ESC L .. 1B 4C ..
  • Page 365: Character Sets For The Olivetti Emulation

    Appendix Character Sets for the Olivetti Emulation 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.
  • Page 366: Paper Specifications

    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.
  • Page 367 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. T5023/5023+ - Programming Guide...
  • Page 368 Paper Specifications Appendix T5023/5023+ - Programming Guide...
  • Page 369: Error Messages

    Appendix Error messages Status messages Status ONLINE NO_PAPER ONLINE PAPER DATA NO_PAPER DATA PAPER STOP NO_PAPER STOP PAPER LOAD PAPER Description / Removal Online status, no paper inserted Online status, paper drawn in STOP status, data in input buffer, no paper inserted STOP status, data in input buffer, paper inserted STOP status, input buffer empty, no paper inserted STOP status, input buffer empty, paper inserted...
  • Page 370: Status Messages (Bootstrap Loader Activated)

    Error messages Status messages (Bootstrap loader activated) Status LOAD NO PROGRAM NO_CHARCTER_ GENERATOR PROGRAMMING PROGRAMMING TIMEOUT TRANSM_ERROR PROG_ERR Description Bootstrap loader activated Bootstrap loader activated, firmware missing Bootstrap loader activated, character generator miss- sing 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...
  • Page 371: Malfunctions

    Appendix Malfunctions 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...
  • Page 372 Error messages Error Cause / Possible action WRONG The Interface type set in the IF_TYPE parameter menu cannot be ac- tivated Set another interface type: check whether the correct op- tional interface board is instal- led; check whether the optional interface board is correctly in- serted.
  • Page 373 Appendix Error Cause / Possible action FIRMWARE Internal firmware error ERROR Check firmware release, if ne- cessary install new ELECTR ERROR Hardware error in the electro- (ELECTRONIC ER- ROR) T5023/5023+ - Programming Guide Error messages Service information: No. / Meaning IMT syntax error Internal ET syntax error ET AEQ MSG syntax...
  • Page 374 Error messages Error Cause / Possible action CARRIER Print head drive Hardware er- ERROR Check area around the platen for foreign bodies, Light rail dirty (clean), Carrier drive, drive belt, motor, plug, carrier motor, print head not plugged, Sensor in print head defect (change print head), print head cable not plugged or defect, Electronic defect...
  • Page 375 Appendix Error Cause / Possible action POWERSUPPLY The power supply is too hot Rests between printing of the lines TRANSP Document feed error ERROR Control motor blocked (platen, (TRANSPORT ER- guidance hook, MSR pressure, ROR) MICR pressure) Control motor not plugged, electronic defect FEEDER Feeder hardware error...
  • Page 376 Error messages Error Cause / Possible action Magnetic stripe reader hard- ERROR ware error Change unit T5023/5023+ - Programming Guide Appendix Service information: No. / Meaning General hardware error Head position MSR cle- aning function Too many writing repe- titions Control reading error Too many reading re- petitions...
  • Page 377: Description Of The Physical Interface

    Appendix 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 Cen- tronics interface. The following sections lists the performance characteristics of the interfaces. General The document printer comes standard with a serial asynchronous interface.
  • Page 378 Description of the physical interface DTR and RTS are deactivated: When the status changes from ONLINE to STOP (stop key pressed or printer error appears). 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.
  • Page 379: Interface Data Serial Interface

    Appendix Interface data serial interface Signal level RS-232 Data format Baud Rate Data word length Stop bits Parity Parameter selection is performed via the operating panel. Type of connector The interface of the document printer is equipped with a 9-pin Cannon plug Description of the physical interface 2400, 4800, 9600, 19200 7/ 8 Bit...
  • Page 380 Description of the physical interface Buffer control RS- 232 The document printer has a 8192 byte print buffer, whose size cannot be chan- ged. If there are less than 512 bytes of buffer free no more data is accepted and the interface is disabled.
  • Page 381 Appendix Signal description and connector assignment 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 –...
  • Page 382 Description of the physical interface Pin 07 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: –...
  • Page 383 Appendix Cable connection document printer - PC Pin- Document printer 9-pin plug Printer switched on (+12V) RD Received Data Serial data entry printer TD Transmitted Data Serial data exit printer DTR Data Terminal Ready exit In the DTR/Busy protocol the ’ON’ status signals the connected device (signal receiver) the readiness to receive...
  • Page 384 Description of the physical interface Pin- Document printer 9-pin plug 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.) Cable <==...
  • Page 385: Interface Data External Centronics Interface

    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.
  • Page 386 Description of the physical interface Cable connection Pin-No. Host Pin-No. Printer (1284-A) (1284-B) 25-pin 36-pin D-SUB plug Centronics plug 20, 21 22, 23 24, 25 26, 27 Signal description nStrobe Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 Data 7 Data 8...
  • Page 387 Appendix Pin-No. Host Pin-No. Printer (1284-A) (1284-B) 25-pin 36-pin D-SUB plug Centronics plug 15, 33-35 Description of the physical interface Signal description Signal Ground (nAutoFd, nSelectIn, nInit) Logic Ground Chassis Ground Peripherial Logic High (+5V) Not defined T5023/5023+ - Programming Guide...
  • Page 388 Description of the physical interface Signal description printer side (Centronics plug) in the compatibility mode and ECP-mode Pin-No. Source Host Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Printer Printer Printer Printer Host Printer ECP-Mode HostClk Data 1 (LSB) Data 2 Data 3 Data 4 Data 5...
  • Page 389 Appendix Pin-No. Source Host Printer Host Description of the physical interface ECP-Mode Signal Ground (Data 5) Signal Ground (Data 6) Signal Ground (Data 7) Signal Ground (Data 8) Signal Ground (PError, Select, nAck) Signal Ground (Busy, nFault) Signal Ground (nAutoFd, nSelectIn, nInit) nReverseRequest nPeriphRequest...
  • Page 390 Description of the physical interface Description of the signals HostClk/nStrobe Compatibility Mode: ECP Mode: Data 1 ... Data 8 Compatibility Mode: ECP Mode: PeriphClk/nAck Compatibility Mode: ECP Mode: Epson ANSI: (Host driven) Set active ’low’ to transfer data into latch. Data is valid while nStrobe is low. Used in a closed-loop handshake with PeriphAck to transfer data or address information from the host to the printer.
  • Page 391 Appendix PeriphAck/Busy Compatibility Mode: ECP Mode: Epson ANSI: nAckReverse/PError Compatibility Mode: ECP Mode: Epson ANSI: Centronics = ECP PError is set to status that means PError is activ Centronics = printer PError is set to error that means PError only set Description of the physical interface (Printer driven) Driven ’high’...
  • Page 392 Description of the physical interface XFlag/Select Compatibility Mode: ECP Mode: HostAck/nAutoFd Compatibility Mode: ECP Mode: Peripherial Logic High nReverseRequest / nInit Compatibility Mode: ECP Mode: (Printer driven) Set ’high’ to indicate that the printer is on-line. Used by the printer to reply to the requested extensibility byte sent by the host during the negotiation phase.
  • Page 393 Appendix nPeriphRequest / nFault Compatibility Mode: ECP Mode: Epson ANSI: 1284 Active / nSelectIn Compatibility Mode: ECP Mode: Description of the physical interface (Printer driven) Set ’low’ by the printer to indicate that an error has occoured. The printer may drive this pin ’low’ to request communications with the host.
  • Page 394 Description of the physical interface Appendix T5023/5023+ - Programming Guide...
  • Page 395: Glossary

    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 7-...
  • Page 396 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;...
  • Page 397: Index

    Index Backspace 53 Basic character set 25 Basic character table 25 BEL 120 Bold print off 111 Bold print ON 110 BS 53 CAN 54 Cancel 54 Cancelling a line 54 Carriage return 51 Carrying out an n/ 180 inch line feed 57 Character box 180 Character set commands 123 Character set selection 124...
  • Page 398 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) ..
  • Page 399 Index Extended graphics character table 130 FF 65 Graphics 27 Graphics characters 25 Graphics mode/double density 169 Graphics mode/quadruple density 171 Graphics mode/single density 168 Graphics modes 159 Horizontal positioning (absolute) 86 Horizontal positioning (relative) 88 Horizontal print control 75 Horizontal tabulation 85 HT 85 Initializing the printer 42...
  • Page 400 Index Mikrodruck 100 National character set 127 National character sets 26 Non- executable commands 120 Print modes 101 Print quality 92 Printable areas 181 Proportional spacing on/ off 97 Reassigning graphics commands 172 Responses 176 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...
  • Page 401 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 Underlining 21 Underlining ON/OFF 114 Unidirectional printing 44 User defined characters 151 Vertical print control 68 T5023/5023+ - Programming Guide...
  • Page 402 Index T5023/5023+ - Programming Guide...

This manual is also suitable for:

T5023

Table of Contents