The text of a manual · part 8 of 15
PcOS Series 60 Multi-Station Slip Printers Programmer's Guide, pages 71 to 80
Pages 71 to 80 of 150
The original document is the PDF (1.6 MB). 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 PcOS Series 60
Page 71
Communications Overview
PcOS Series 60
Ithaca Peripherals Incorporated
Programmer's Guide
Cut the Receipt
[ESC]v WE SELL FOR LESS!![CR][LF] [ESC]W<0>[ESC]#0[CR][LF][ESC]H[ESC]F 2000[CR][LF] Ithaca, New York[CR][LF] (607)257-8901[CR][LF] ST# 2000 OP# 00067 TE# 021 TR#00035[CR][LF] KLEENEX FAM D04 QTY 1 1.68 J[CR][LF] RITZ D01 QTY 1 2.50 D[CR][LF] CHIPS D01 QTY 1 1.50 D[CR][LF] STORAGE BAG D04 QTY 1 1.50 J[CR][LF] SUB TOTAL 7.18[CR][LF] SALES TAX 1 .50[CR][LF] ------[CR][LF] TOTAL 7.68[CR][LF] CASH TEND 20.00[CR][LF] CHANGE DUE 12.23[CR][LF] [CR][LF] THANK YOU FOR SHOPPING WITH US[CR][LF] [CR][LF] {DATE:0} {TIME:0}[CR][LF]
[ESC]J<100>
Journal Print
Feed the receipt out from under the feed rolls. This requires that you know where the end of the receipt is. Then select the journal station. (Do not release the slip clamp.) Setup the journal print.
[ESC]g [ESC]#0 [SI][CR][LF] ST# 2000 OP# 00067 TE# 021 TR#00035[CR][LF] KLEENEX FAM D04 QTY 1 1.68 J[CR][LF] RITZ D01 QTY 1 2.50 D[CR][LF] CHIPS D01 QTY 1 1.50 D[CR][LF] STORAGE BAG D04 QTY 1 1.50 J[CR][LF] SUB TOTAL 7.18[CR][LF] SALES TAX 1 .50[CR][LF] TOTAL 7.68[CR][LF] CASH TEND 20.00[CR][LF] CHANGE DUE 12.23[CR][LF][CR][LF] [ESC]z Release the slip clamp. To provide even faster throughput, Dual Station operation is provided. Dual Station mode prints the receipt (or slip) at the same time as the journal. This requires that the journal paper be self printing. Dual Station is done by enabling the journal feed during the receipt print operation. In addition, because the journal is narrower than the receipt, the receipt print that is to be recorded must be centered on the journal. The journal print example to the right was printed in dual station mode. Note that the top and bottom line are overprinted. This is because all data printed on the receipt before the dual station mode was activated was also printed on the journal. This means that at least one line feed must be done on the journal (and receipt) before and after the journal print. The following control script was used to generate the dual station example. [ESC]f Select and load the receipt station ... Complete the non journal portion of the receipt. (607)257-8901[CR][LF]
Receipt Print
Page lxx
Rev C 7/8/2008
Page 72
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
Communications
Overview
Turn on dual station mode. Feed one line on both stations to feed past the over print on the journal. Proceed with the receipt setup. Do not use any print modes that will require reverse paper motion. Print the receipt and journal information. Make sure information to be on the journal is over the journal station. ST# 2000 OP# 00067 TE# 021 TR#00035[CR][LF] KLEENEX FAM D04 QTY 1 1.68 J[CR][LF] RITZ D01 QTY 1 2.50 D[CR][LF] CHIPS D01 QTY 1 1.50 D[CR][LF] STORAGE BAG D04 QTY 1 1.50 J[CR][LF] SUB TOTAL 7.18[CR][LF] SALES TAX 1 .50[CR][LF] TOTAL 7.68[CR][LF] CASH TEND 20.00[CR][LF] CHANGE DUE 12.23[CR][LF] [CR][LF] Feed one more line of receipt tape and journal paper. this will assure Journal Print the last line is not over-printed. [ESC]l<1> [CR][LF] [ESC]#0 [SI]
[ESC]l<0> Turn off dual station mode. THANK YOU FOR SHOPPING WITH US[CR][LF] [CR][LF] Finish the receipt. {DATE:0} {TIME:0}[CR][LF] [ESC]z Release the receipt.
Special Tricks. Rev C 7/8/2008
Page lxxi
Page 73
Communications Overview
PcOS Series 60
Ithaca Peripherals Incorporated
Programmer's Guide
How to make a coupon One very interesting trick is to make a coupon from the receipt tape. In effect what can be done is to load the receipt tape, feed out a portion of it, cut it, and then feed it far enough so it will fall out of the receipt paper path. It must not be fed out so far as to come out from under the feed rollers. When the receipt tape is no longer in the receipt paper path it can be treated as a slip. Several things that must be taken into account when treating a receipt as a slip. First the definition of normal print is 180° from the normal slip. When using rotated printing this must be considered. The set slip left margin command does not work in receipt mode, it should be set to 0. You may also reload the receipt as a slip. This will make the rotate print commands work like the slip. This can be done by selecting the slip station with [esc]h or [esc]j (Do not open the slip clamp). If you select the slip station, keep in mind that the receipt is loaded to the left of the slip stop. The first few characters of the slip station will not print on the receipt paper. To help locate print on a pre-printed receipt tape, the slip in sensor can be used to find a black mark on the receipt tape. The [ESC]k or feed to mark command will do this. After the feed to mark command the black mark is about 1.25 inches past the cutter. Note, however, that the cutter will not cut with the slip-in sensor over a black mark. Because the slip in sensor20 does not see any paper the knife will not operate. The pre-printed coupon tape should be fed forward until the cutter is at the coupon edge and then cut. The black mark must be more than 1.5 inches from the cut edge of the receipt coupon. After the receipt tape is cut, the [esc]e command will then feed the receipt forward until the cut end falls out of the receipt paper path. The receipt can then be reversed and feed back into the printer with a second [esc]e command and then loaded with a slip load command if desired. The receipt can then be processed as a slip. The receipt is not, however completely against the slip guide. This must be taken into account as the print is formatted. The following example will demonstrate coupon printing. The coupon could be completely printed by the printer, or as in this case, a preprinted21 receipt roll. We will print a ticket stub and then use rotated print to fill out the coupon. [esc]f Load the receipt coupon. NOTE: When the preprinted receipt is loaded it must be cut at the first coupon by hand. [esc]y<0> Disable ENQ commands. Print the ticket stub on the top of the coupon. [DC2][esc]0[esc]I<1>[esc]E[esc]G ITHACA PERIPHERALS INC.[CR][LF] [cr][lf] [esc]W<1> IPI-MART[CR][LF] [esc]F[SI] [cr][lf]
20The knife will not cut unless both the front and back sensors are covered.
there is no paper.
21This coupon was printed on a laser printer and is not a real coupon.
Page lxxii
Rev C 7/8/2008
Pre-printed Coupon
This prevents the knife from operating when
Page 74
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
Communications
Overview
WE SELL FOR LESS!![CR][LF] [esc]W<0>[esc]H[esc]F[esc]#0 [CR][LF] Ithaca, New York[CR][LF] Now that the title is complete the receipt mark can be found. Take care to not print past the marker. [esc]0 Set the line spacing [esc]k Find the mark [lf][lf][lf][lf] Adjust to the cut point. This can not be at the mark. The mark prevents the knife from activating. [esc]q This command synchronizes the input que with the forms control and prevents the knife from falsely thinking there is no receipt paper. [esc]v Cut the coupon [esc]e Move the coupon out of the receipt paper path. After this command the receipt is on the slip table and can be moved back into the printer. [esc]o Reverse the feed direction [esc]J<162> Position the coupon to the prize winner line start [esc]p<0> Set the left margin to 0 [esc]u<1><128><2><6><3><6><0> Position the lines on the pre-printed form [esc]r<3> Select rotated 270° mode. John Q. Public[cr] {date}[cr] Send the print data to the printer 50678[cr] [esc]r<0> End rotated print and have it printed [esc]n Set the feed direction, and deliver the coupon [esc]e Feed the form out 2 inches [esc]z Release the slip clamp [esc]u<0> Reset the line spacing for rotated print [esc]y<1> Re-enable the ENQ commands
Printing Graphics The Series 60 has a bit image graphics capability and a full PC compatible character graphics character set. The bit image format is similar to that used on other PC printers. There are three modes of operation, Single density, half speed double density, and full speed double density.
Rev C 7/8/2008
Page lxxiii
Page 75
Communications Overview
PcOS Series 60
Ithaca Peripherals Incorporated
Programmer's Guide
Single density is the fastest mode. It makes a single unidirectional 60 DPI print pass. The full speed double density makes two passes with a half dot offset. This mode is half the speed of single density print but will print at 120 DPI. Half speed double density is half the speed of full speed double density, however, the print quality is enhanced.
Character Graphics. Character graphics are created by joining individual characters together to produce a mosaic of characters that form a graphic image. The simplest method is to use the "*" (or any other character) to form an image. For example IPI might be formed as follows: *** * * * ***
**** * * *** * *
*** * * * ***
The Extended character set of the printer supports line graphic characters that can be combined to form windows and other shapes. For the shapes to join from line to line the line spacing must be set properly. All characters are in a 9 dot high character cell. The dots are 1/60 of an inch apart. Therefore, the line spacing should be 10/60 or 1/6 of an inch. The set fine line space command can be used to set this line spacing. If possible the spacing should be reduced slightly to overlap the rows. This prevents any white spacing form appearing between the lines. The following example illustrates the use of extended graphics characters. [ESC]h Select the slip station and load the form to the first line. [ESC]U<1> Select Unidirectional print for better alignment. [ESC]: Select 12 CPI. [ESC]3<34> Set line spacing for 0.157 inches. (slightly smaller than 1/6) <201> Send the line graphics characters to the printer. <205><205><205><205><205><205><205><205><205> <205><205><205><205><205><205><205><205><205> <205><205><205><205><205> <187>[cr][lf] <186>ITHACA PERIPHERALS INC.<186>[CR][LF] <186> <186>[CR][LF] <186> IPI-MART <186>[CR][LF] <186> <186>[CR][LF] <186> WE SELL FOR LESS!! <186>[CR][LF] <186> Ithaca, New York <186>[CR][LF] <200> <205><205><205><205><205><205><205><205><205> <205><205><205><205><205><205><205><205><205> <205><205><205><205><205> <188>[cr][lf] This finishes the line graphics. [ESC]U<0> Reenable bi-directional printing [ESC]0 Set standard 1/8 inch line spacing. [SI] Set 17 CPI. [CR][LF] Finish the form. ST# 2000 OP# 00067 TE# 021 TR#00035[CR][LF] KLEENEX FAM D04 QTY 1 1.68 J[CR][LF] RITZ D01 QTY 1 2.50 D[CR][LF] CHIPS D01 QTY 1 1.50 D[CR][LF] STORAGE BAG D04 QTY 1 1.50 J[CR][LF] SUB TOTAL 7.18[CR][LF] SALES TAX 1 .50[CR][LF] ------[CR][LF] TOTAL 7.68[CR][LF] CASH TEND 20.00[CR][LF]
Page lxxiv
Rev C 7/8/2008
Page 76
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
Communications
Overview
CHANGE DUE 12.23[CR][LF] [CR][LF] THANK YOU FOR SHOPPING WITH US[CR][LF] [CR][LF] {DATE:0} {TIME:0}[cr][lf] [ESC]z Open the slip clamp.
When printing line graphics the data path to the printer must be 8 bits. 7 Bit serial protocols will not access the extended characters. The extended characters require that the form be reverse fed. This means that printing line graphics on the receipt may be less than acceptable.
APA Graphics The printer is capable of APA22 graphics. To generate a graphics image by hand is time consuming and tedious. It is possible to use a graphic package to create a graphic image. The following procedure will help with setting things up. 1). Generate the graphic image in whatever program you wish. 2). Make sure the paper size you pick will fit on the printer station you intend to print on. If the paper size can not be set, print a portion of the page.
22APA - All Points Addressable.
Rev C 7/8/2008
Page lxxv
Page 77
Communications Overview
PcOS Series 60
Ithaca Peripherals Incorporated
Programmer's Guide
3). Print the graphic to a file using a "Generic IBM Graphics 9 pin" driver. The standard IBM resolutions are: 240 x 216, 120 x 72, and 60 x 72. The Series 60 printer supports all three resolutions. 120 x 72 gives good resolution with reasonable speed. 4). Print the graphic image to a file. 5). Edit the resulting file to remove any unwanted forms control and insert the Series 60 forms control. 6). Make the resulting file available to your application so that it will be sent to the printer when required. As with all graphics the data path to the printer must be 8 bits, 7 bit protocols will not work. The Quad density graphics resolution will give the best rendition of your graphic image however, this mode is very slow and prints very dark. The printer is setup to provide the best performance in normal operation. For this reason the quad density graphics should be limited. The APA graphic example on the left was done with the double density graphics. The graphic driver used made an approximation of the graphic image.
Receipt with APA Graphics
The procedure to produce the receipt format is a follows: [esc]f Select the Receipt station and load the paper. [esc]y<0> Disable ENQ processing [esc]U<1> Select uni-directional printing [lf] {graphic:logo.gph} Read the graphic file [esc]y<1> Re-enable ENQ processing [Esc]U<0> Reselect bi-directional printing [esc]0 Continue with normal print. [SI][CR][LF][esc]v ST# 2000 OP# 00067 TE# 021 TR#00035[CR][LF] KLEENEX FAM D04 QTY 1 1.68 J[CR][LF] RITZ D01 QTY 1 2.50 D[CR][LF] CHIPS D01 QTY 1 1.50 D[CR][LF] STORAGE BAG D04 QTY 1 1.50 J[CR][LF] SUB TOTAL 7.18[CR][LF] SALES TAX 1 .50[CR][LF] ------[CR][LF] TOTAL 7.68[CR][LF] CASH TEND 20.00[CR][LF] CHANGE DUE 12.23[CR][LF] [CR][LF] THANK YOU FOR SHOPPING WITH US[CR][LF][CR][LF] {DATE:0} {TIME:0}[cr][lf] [esc]z The first part of the graphic file is listed here in hex. This is a hex dump of the first 512 bytes of the logo.gph graphics file. 0100 0110 0120 0130 0140 0150 0160 0170 0180
Page lxxvi
0D 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20 1B 4C 8D 00 FF 7F 80 00-80 00 80 00 80 0F 80 0F 80 00 80 00 82 01 86 0D-82 02 80 00 80 0F 80 0F 80 02 80 03 82 01 80 00-80 01 80 03 80 02 80 03 80 01 80 00 80 00 81 01-82 00 82 01 82 01 80 00 81 00 83 00 82 00 83 00-81 00 80 00 80 00 80 00 80 00 80 00 80 00 80 00-80 00 80 00 80 00 80 00 80 00 80 00 80 00 80 00-80 00 80 00 80 00 80 00 80 00 80 00 80 00 80 00-80 00 80 00 80 00 80 00
Rev C 7/8/2008
. .L.............. ................ ................ ................ ................ ................ ................ ................
Page 78
Programmer's Guide 0190 01A0 01B0 01C0 01D0 01E0 01F0 0200 0210 0220 0230 0240 0250 0260 0270 0280 0290 02A0 02B0 02C0 02D0 02E0 02F0
PcOS Series 60
Ithaca Peripherals Incorporated
Communications
80 00 80 00 80 00 80 00-80 00 80 00 80 00 80 00 FF 0D 1B 4A 18 20 20 20-20 20 20 20 20 20 20 20 20 20 20 20 1B 4C 8D 00-FF FF 00 00 00 00 02 08 03 F8 03 F8 02 08 03 02-01 F1 08 F0 08 08 10 00 08 F0 08 F0 08 00 08 F0-08 F0 08 00 00 B0 08 B0 48 50 03 F0 0B F0 08 00-00 E0 10 E0 18 10 08 00 18 10 00 00 B2 09 B2 4B-50 00 F0 08 F0 08 00 00 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 00 02 01 02 03 00 00 00-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 00 00 00 00 FF 0D 1B 4A-18 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20-1B 4C 8D 00 FF FF 00 00 00 00 00 00 FE 00 FE 00-00 00 20 00 E0 20 C0 00 00 18 66 38 46 12 00 70-42 34 00 00 00 7E 00 7E 40 00 40 60 00 00 7E 00-7E 00 00 00 7F 00 7F 42 00 00 42 3C 66 18 00 00-00 FE 00 FE 40 00 00 7E 00 7E 00 00 00 18 66 38-46 12 00 70 42 34 00 00 00 7E 00 7E 40 00 40 60-00 00 26 48 26 08 02 14 6A 54 3E 00 00 00 FE 00-FE 00 00 76 62 10 08 50 6E 0E 00 00 00 00 00 00-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00-FF 0D 1B 4A 18 20 20 20 20 20 20 20 20 20 20 20-20 20 20 20 1B 4C 8D 00
Overview
................ ...J. .L.......... ................ ................ HP.............. .......KP....... ................ ................ ................ ................ .......J. .L...... .......... .. .. ..f8F..pB4...~.~ @.@`..~.~......B ..B<f.......@..~ .~....f8F..pB4.. .~.~@.@`..&H&... jT>........vb..P n............... ...........J. .L..
Communications Protocol and Print Buffers Overview The following figure illustrates the communications flow from host computer to printer and from printer to cash drawer.
Rev C 7/8/2008
Page lxxvii
Page 79
Communications
PcOS Series 60
Overview
Programmer's Guide
Ithaca Peripherals Incorporated
Typical POS System Host to printer link
Host Computer Printer
Host to Keypad Printer to Cash Drawer Cash Drawer
Keypad
For the Host to printer communications link the Series 60 printers support both serial and parallel communications ports as standard features. Selecting which port is active is part of the configuration process.23 The Serial port and parallel port both follow standards developed for the PC environment.
Host to Printer Link Data to printer
Host Computer Printer Status and Flow Control Back In most cases the host computer is capable of sending information to the printer much faster than the printer can print it. To prevent information from being lost a flow control mechanism is provided. This mechanism is called "flow control protocol". The goal of the flow control protocol is to exchange as much information as possible as fast as possible without losing any data.. The Series 60 supports three flow control protocols, two in serial mode and one in parallel. From the printers point of view there are four basic functions that are required of communications. All four are common to all three flow control protocols. There must be some type of communications driver, a status inquire procedure, a storage buffer, and a print control mechanism that is using the data. 1.
The communications port is either the serial port hardware or the parallel port hardware and the associated communications software driver.
2.
Some means for the host to bypass the buffer for status information. This is required because the buffer offsets the printer in time from the host. (The printer is generally behind the host)
23It is not possible to have the Serial and Parallel port active at the same time. The configuration process is described in the configuration section of this document.
Page lxxviii
Rev C 7/8/2008
Page 80
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
Communications
Overview
3.
The storage buffer is a software implemented, First In First Out (FIFO) circular buffer. It stores information in an asynchronous fashion where information can be placed in it at any rate and retrieved from it at any rate. However, the information order is not altered. Any buffer has a finite size and if information is put in faster than it is taken out, it will overflow. This overflow is what requires a flow control mechanism.
4.
The print control mechanism is the remainder of the printer hardware and control software. It interprets control codes, operates the control panel, the print head and the cash drawer interface.
The following figure illustrates the four basic parts of printer flow control.
Printer
Printer Communications Buffer Flow Communications Port Serial or Parallel Connection
Data
First in First Out Buffer Data
Data
Status
Print Control Print Head
Getting Full & Getting Empty Status Inquiry
The Communication port is either serial or parallel and is controlled by a software communications driver. This driver receives data and returns requested status. (The communications driver is a high priority interrupt driven software event.) As information is received from the host, data is taken from the communications port hardware by the driver and placed in the FIFO. When the FIFO input function finds that the buffer is getting full it notifies the communications driver to implement "flow control". Flow control will attempt to stop further information from being sent from the host. In addition to flow control, the communications driver is also responsible for identifying status requests from the host. Some received data is translated by the communications driver as status inquiries, in this case the series 60 printer uses [ENQ] commands. The driver then gets the ENQ from host, asks the print controller for the information and responds directly to the host. The print control software takes information from the FIFO (as it needs it and can use it). When FIFO output function finds that the FIFO is getting low it notifies the communications driver that the information flow can be resumed (if it was stopped) and allow more information to be placed in the FIFO. The series 60 printer has a 2000 character input buffer. This means that 2000 characters (or control codes) can be sent to the printer before it is interpreted and printed. In effect the host computer can get 2000 characters ahead of the printer. The fact that the information sent to the printer is stored and not acted upon immediately is of concern to ENQ commands. If the printer is asked to feed a form to the end and then an ENQ is sent to check for end of form, the printer may not have started the form movement until after the ENQ response. The wait que command can be used to make sure that the printer has done the command before the ENQ is sent.
Rev C 7/8/2008
Page lxxix