The text of a manual · part 3 of 16
PcOS Series 150 Receipt/Validation/Journal Printers Programmer's Guide, pages 21 to 30
Pages 21 to 30 of 151
The original document is the PDF (746 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Ithaca Model 151, Ithaca Model 153 and Ithaca Model 152
Page 21
Programmer's Guide
PcOS Series 150
General Specifications
Validation - Top Insertion First line of print
4.25 inches (min) (107.95 mm)
2.85 inches (72.39 mm)
Last line of print
0.68 inch (17.15 mm) 2.34 inches (59.44 mm)
0.50 in (12.70 mm) 2.50 inches (min) (63.50 mm)
Figure 5 Validation print – top insertion
Validation - Left-side Insertion First line of print 0.50 inch (12.7 mm)
Last line of print
2.50 inches (min) (63.50 mm) 2.85 inches (72.39 mm)
2.34 inches (59.44 mm)
0.68 inch (17.15 mm)
6.00 inches (min) (152.40 mm)
Figure 6 Validation print – left-side insertion
Validation Forms Insertion Form insertion is from the top or the left side of the printer. Automatic form location is under software or firmware control. Character rotation under software control will allow check validation to appear right-side up when the check is removed.
12/14/99
Rev G
Page 11
Page 22
Control Codes Overview
PcOS Series 150
Programmer's Guide
Chapter 4: Control Codes Overview This programmer’s guide is designed to help users of the PcOS Series 150 Printer develop applications. The Series 150 Printer is a point-of-sale (POS) printer that has several features not normally found on general purpose printers. Because of these special features, the Series 150 Printer has distinct control codes. This manual documents the control codes with an emphasis on those codes that are unique to the Series 150 Printer. All PcOS Series 150 Printers have either a serial or parallel interface. Both interfaces provide the same printer control3 and use the same codes.
Nomenclature When describing control codes, there is often confusion as to whether the description is decimal, hexadecimal, or ASCII. To minimize the confusion, this manual will use the following nomenclature when describing control code sequences. [] encloses a control character. This is a single, 8-bit value as defined in the standard ASCII tables. An example would be [ESC], which would represent a 1BH or 27 decimal.
<> encloses an 8-bit value in decimal format. This value will be from 0 to 255. An example would be <2>, which would represent 02H or 2 decimal.
<n> indicates a variable parameter. <n> can have a value of from 0 to 255. The meaning of <n> is described and defined in the description of the command.
<n1> <n2> indicates that there are two parameters, <n1> and <n2>, where both can have values from 0 to 255.
<m1> <m2> is an IPCL parameter consisting of two digits where <m1> and <m2> are ASCII characters from 0 to 9. The values will be combined to form a value from 0 to 99. If <m3> is included, the parameter will be combined to form a value from 0 to 999. If two values are specified, there must be two bytes added to the IPCL code. In other words, if the command specifies <m1> <m2> and the desired value is 5, the value must be specified as 05.
x
(all other characters in control strings) represent ASCII characters. For example, [ESC] 1 would represent 1BH followed by 31H.
The CFG150 configuration and demonstration program4 uses the same nomenclature. Print examples shown in this manual are available for CFG150.
3 The serial and IEEE 1284 interfaces provide a few additional interface capabilities over the standard parallel interface. Both serial and IEEE 1284 interfaces provide a bidirectional data path. 4 CFG150 is available from Ithaca Peripherals. The program runs on IBM personal computers and compatibles.
Page 12
Rev G
12/14/99
Page 23
Programmer's Guide
PcOS Series 150
Control Codes Overview
In many cases, applications require that control sequences be specified in hexadecimal or decimal codes. In most cases, commands are specified in ASCII, hexadecimal, and decimal. The table in Appendix B lists ASCII, decimal, and hexadecimal equivalents.
Standard Emulation The standard control codes for the Series 150 Printer are extensions and subsets of the IBM emulation provided on other PcOS products. In all cases, an application designed for a Series 50 Printer with IBM code sets will function with a Series 150 printer. There are, however, more features in the Series 150 Printer that can be used for new applications.
IPCL Codes IPCL (Ithaca Printer Control Language) codes are designed to control a printer without using control characters, i.e., characters less than 20H. Only the standard emulation supports IPCL. Not all commands are supported by IPCL codes. For those commands that are, the IPCL code is listed. In rare cases, an IPCL code will interfere with the text that is to be printed. The IPCL translator can be disabled with an [ESC] y <4> command.
EPOS Emulation ESC/POS5 is referred to here as EPOS. The Series 150 Printer supports an EPOS emulation with extensions. The emulation is designed to allow the Series 150 Printer to be used with applications that are designed for Seiko Epson printers. It is intended that the standard emulation be used for new applications. Not all of the features of Series 150 Printers are supported by EPOS. This manual will include the EPOS code equivalent for features of the Series 150 Printer that are supported by EPOS. When EPOS commands are significantly different from the standard emulation, an independent EPOS description is provided.
Microline Emulation The standard control codes for the Series 150 Printer are extensions and subsets of the Microline emulation provided on other PcOS products. In all cases, an application designed for a Series 50 Printer with Microline 150 Printer that can be used for new applications.
Star Emulation The standard control codes for the Series 150 Printer are extensions and subsets of the Star emulation provided on other PcOS products. In all cases, an application designed for a Series 50 Printer with Star code sets will function with a Series 150 Printer. There are, however, more features in the Series 150 Printer that can be used for new applications.
5 ESC/POS is a registered trademark of the Seiko Epson Corporation.
12/14/99
Rev G
Page 13
Page 24
Control Codes Overview
PcOS Series 150
Programmer's Guide
NCR2567 Emulation The standard control codes for the Series 150 Printer are extensions and subsets of the NCR2567 emulation provided on other PcOS products. In all cases, an application designed for a Series 50 Printer with NCR2567 code sets will function with a Series 150 Printer. There are, however, more features in the Series 150 Printer that can be used for new applications.
Telpar Emulation The standard control codes for the Series 150 Printer are extensions and subsets of the Telpar emulation provided on other PcOS products. In all cases, an application designed for a Series 50 Printer with Telpar code sets will function with a Series 150 Printer. There are, however, more features in the Series 150 Printer that can be used for new applications.
Application Development To aid in application development and help the programmer understand the Series 150 Printer, this manual is broken down into two major sections. The first section is a detailed description of each of the commands. The second section is an explanation of how the printer works. It explains the internal print buffer, the communications link, and how the host computer and printer interact.
Tables and Charts Throughout this guide, there are charts and tables that list commands and features. In most cases, the charts cross reference the page that describes the command. Commands are grouped by function and can at times be hard to find. To minimize the time it takes to find commands, there are two code summary charts in the following section, one ordered by code and one by function.
Page 14
Rev G
12/14/99
Page 25
Programmer's Guide
PcOS Series 150
Control Codes Print/Paper Motion
Chaper 5: Printer Control Codes Print/Paper Motion Low-level Paper Motion Control Function ASCII Hexadecimal Decimal IPCL EPOS
Carriage return [CR] 0DH <13> &%CR 0DH
Description
This command prints the contents of the print buffer (if any) and resets the next character print position to the left margin. A line feed is not performed unless autofeed was active. The left margin is defined by the current print station, the print rotation direction, and the left margin command. Note: In single-line mode, the [CR] is used to terminate all lines. The printer will go busy6 after the [CR] is received. The printer will not be ready to accept data again until the previous data has printed.
6
Function ASCII Hexadecimal Decimal IPCL EPOS
Line feed [LF] 0AH <10> &%LF 0AH
Description
This command prints the contents of the buffer (if any) and advances the paper one line at the current default line spacing. The next character print position is not reset to the left margin unless auto-CR is active.
In one-line mode, the parallel port busy signal will occur as a result of receiving the [CR]. In serial mode, the busy indication will be delayed until the [CR] is processed by the input software. Data sent to the printer after the [CR] will not be lost unless the printer is power cycled.
12/14/99
Rev G
Page 15
Page 26
Control Codes
PcOS Series 150
Programmer's Guide
Horizontal Motion
Horizontal Motion Control There are several commands that can control the horizontal position of characters. Many applications use space control to position fields. However, there is the ability to control character position with horizontal tab stops. This is done by using the horizontal tab [HT] to move to those tab stops. Function ASCII Hexadecimal Decimal IPCL EPOS
Horizontal tab [HT] 09H <9> &%HT [HT]
Description
This command inserts spaces in the print buffer up to the next tab stop. The default tab locations are every 8 spaces.
Function ASCII Hexadecimal Decimal IPCL EPOS
Back space [BS] 08H <8> &%BS [BS]
Description
This command prints the data in the print buffer and shifts the current horizontal position by one character width to the left. If the current position is at the left margin, the [BS] is ignored.
Function ASCII Hexadecimal Decimal IPCL EPOS
Set horizontal tab stops [ESC] D <n1> <n2> <n3> ... <ni> 0 1BH 44H <n1> <n2> <n3> ... <ni> 00H <27> <68> <n1> <n2> <n3> ... <ni> <0> none [ESC] D <n1> <n2> <n3> ... <ni> 0
Description
This command sets tab stops at the character columns specified by <n>. The end of the setting is specified by a <0>. All previously set tabs will be cleared by this command. There is no restore-defaults procedure other than to respecify the tabs. The power up default is every 8 spaces, i.e., 9, 17, 25, etc. Column sizes are in accordance with the current character pitch. Setting tabs that are beyond the station width is possible. A [CR] will be inserted if the tab is used. Printing will begin at the home position.
Page 16
Rev G
12/14/99
Page 27
Programmer's Guide
PcOS Series 150
Control Codes Horizontal Motion
Function ASCII Hexadecimal Decimal IPCL EPOS
Reset horizontal and vertical tab stops [ESC] R 1BH 52H <27> <82> &%HV none
Description
This command resets horizontal and vertical tab stops to power up configuration. The power up horizontal default is every 8 spaces, i.e., 9, 17, 25, etc. The vertical default is every line.
Function ASCII Hexadecimal Decimal IPCL EPOS
Set justification [ESC] a <n> 1BH 61H <n> <27> <97> <n> &%JL, &%JC, &%JR [ESC] a <n>
Description
This command sets the horizontal justification.
Where <n>
0 = left justified 1 = center justified 2 = right justified
&%JL &%JC &%JR
The print format can be right, center, or left justified. The value of <n> specifies the justification. The power on default is left justified. Note: Lines that have mixed size characters cannot be centered. For example, a line with mixed single- and double-high cannot be centered. If a line of print is to be double-high and centered, the change to single-high must be done after the line terminator for the double-high line. Example: [ESC] W <3> Centered [ESC] W <0> [CR] will not print correctly because the printer assumes that more data will follow the [ESC] W <0>. This should be [ESC] W <3> Centered [CR] [ESC] W <0>. Note: Several line graphic characters stress the printer. If the printer is to print a very dark area, it will do it in steps. The stepping operation only works in left justified mode. In general, this will not cause a problem because the printer will print several black blocks in a row before the stepping program is activated. Autocenter and line graphics should be avoided because of character alignment. Note: Justify commands do not affect graphics.
12/14/99
Rev G
Page 17
Page 28
Control Codes
PcOS Series 150
Programmer's Guide
Vertical Motion
Vertical Motion Control Function
Fine line feed
ASCII Hexadecimal Decimal IPCL EPOS
[ESC] J <n> 1BH 4AH <n> <27> <74> <n> &%FM <m1> <m2> <m3> [ESC] J <n>
Description
This command prints the contents of the buffer (if any) and performs a line feed of n/216 inch. This command does not change the default line spacing value. The next character print position is reset to the left margin. EPOS Note: In EPOS mode, this command performs line feeds in n/144-inch increments. Example of Fine Line Feed[CR] [ESC]J<54> This line is 1/4" below the first.[CR][LF] This line is spaced at the default 1/8".[CR][LF]
Figure 7 Example of fine line feed of
Figure 8 Data sent to printer for fine line feed
Function ASCII Hexadecimal Decimal IPCL EPOS
Set variable line space in n/216 inch [ESC] 3 <n> 1BH 33H <n> <27> <51> <n> &%SV <m1> <m2> <m3> [ESC] 3 <n>
Description
This command sets the default line spacing in n/216 inch. Set n = 1 to 255. This command takes effect immediately and sets the line feed spacing used by [LF] to values other than 1/8 or 7/72 inch. EPOS Note: Line spacing of n/144 is used.
Function ASCII Hexadecimal Decimal IPCL EPOS
Set line space to 27/216 inch [ESC] 0 1BH 30H <27> <48> &%ST [ESC] 2
Description
This command sets the text default line spacing to 1/8 or 27/216 inch which is the standard eight lines per inch line spacing at initial power up. EPOS Note: In EPOS mode, this command sets 1/6-inch spacing or 6 lines per inch.
Page 18
Rev G
12/14/99
Page 29
Programmer's Guide
PcOS Series 150
Control Codes Vertical Motion
Function ASCII Hexadecimal Decimal IPCL EPOS
Set line space 21/216 or 7/72 inch [ESC] 1 1BH 31H <27> <49> &%SG none
Description
This command sets the default line spacing to 21/216 inch. This line spacing is for all-points-addressable (APA) graphics printing.
Function ASCII Hexadecimal Decimal IPCL EPOS
Set variable line space n/72 inch [ESC] A <n> 1BH 41H <n> <27> <65> <n> none none
Description
This command sets default line spacing to n/72. Set n = 1 to 85. This line spacing does not take effect until enabled by the [ESC] 2 command. This command is provided to maintain backward compatibility with the Series 50, OKIDATA, IBM, and other printers. It can also be used to print on preprinted forms.
Function ASCII Hexadecimal Decimal IPCL EPOS
Enable [ESC] A <n> line spacing [ESC] 2 1BH 32H <27> <50> none none
Description
[ESC] 2 enables [ESC] A <n> line spacing. This is a companion to the [ESC] A <n> command and puts the specified line spacing into effect. It will remain in effect until another line spacing command is issued.
Function ASCII Hexadecimal Decimal IPCL EPOS
Feed <n> lines at current spacing [ESC] d <n> 1BH 64H <n> <27> <100> <n> &%FL <m1> <m2> [ESC] d
Description
This command prints the contents of the buffer (if any) and performs <n> line feeds at the current line spacing. This command does not change the default line spacing value. The next character print position is reset to the left margin. Note: The IPCL command will print from 00 to 99 lines. For example, if you wish to feed 12 lines, the IPCL command would be &%FL12.
12/14/99
Rev G
Page 19
Page 30
Control Codes
PcOS Series 150
Programmer's Guide
Vertical Motion Function ASCII Hexadecimal Decimal IPCL EPOS
Vertical tab [VT] 0BH <11> &%VT (VT)
Description
The printer sets a line counter to the top of the form whenever a station is selected. By setting vertical tab stops, various form positions can be reached with a [VT] operation.
Function ASCII Hexadecimal Decimal IPCL EPOS
Set vertical tab stops [ESC] B <n1> <n2> <n3> ... <ni> 0 1BH 42H <n1> <n2> <n3> ... <ni> 00H <27> <66> <n1> <n2> <n3> ... <ni> <0> none [ESC] B <n1> <n2> <n3> ... <ni> 0
Description
This command sets tab stops at line positions specified by <n>. The end of the setting is specified by a <0>. All previously set tabs will be cleared by this command. There can be a total of 64 tab stops specified by this command. The power on default is a tab stop at 1-inch intervals.
Function ASCII Hexadecimal Decimal IPCL EPOS
Form feed [FF] 0CH <12> &%FF none
Description
This command performs a form feed to the top of the form.
Function ASCII Hexadecimal Decimal IPCL EPOS
Set top of form [ESC] 4 1BH 34H <27> <52> &%TF [ESC] L
Description
This command sets the top of form to the current position.
Page 20
Rev G
12/14/99