Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 13 of 16

PcOS Series 150 Receipt/Validation/Journal Printers Programmer's Guide, pages 121 to 130

Pages 121 to 130 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 121

Programmer's Guide

PcOS Series 150

Communications Parallel Port

Printer Buffer Size The Series 150 Printer has a configurable buffer size. It can be set from 256 bytes to 6144 bytes. This allows an application to control how far ahead of the printer it can get. The smaller the buffer is, the tighter the control will be. It is up to the application developer to select the optimal buffer size.

One-line mode The Series 150 Printer supports a one-line mode of operation. In this mode, the input buffer is set to 1024 bytes; however, the printer will go busy after every [CR] received. In this mode, the printer will stay busy after the [CR] is received and remain busy until the previous information is printed. Several features must be considered when using one-line mode. 1. 2.

3.

The printer only looks at [CR]’s. [LF] will cause the printer to print but will not set busy. If a [CR] character is received as part of another command, i.e, as part of graphics data, the printer will go busy after the [CR] is received, but will go ready after the [CR] is processed. By definition, one-line mode is slow. The printer will not allow the application to get ahead of the printer.

Parallel Port Inquire IEEE 1284 The Series 150 Printer supports the IEEE 1284 bidirectional parallel peripheral interface standard. This standard provides for a bidirectional link on the parallel port. The Series 150 Printer supports Modes 0 and 4 only. This provides a nibble mode reverse channel for printer identification and status inquire command. It is beyond the scope of this guide to describe the IEEE 1284 protocol. The complete specification is available from: The Institute of Electrical and Electronic Engineers, Inc. 345 East 47th Street New York, NY 10017, USA

Buffer The Series 150 Printer has a 256-byte buffer that contains information to be returned by the IEEE 1284 reverse link. Information is placed in this buffer in the same format as RS-232 serial information is returned. Inquire commands sent to the printer in IEEE 1284 mode will place responses to the commands in the IEEE 1284 reverse channel buffer. This buffer is then transmitted to the host when the host requests the reverse channel.

Mode 4 Mode 4 provides for the printer to return identification information to the host system. The Series 150 Printer returns: xx,yy (length of following data, 2 bytes with msb first) MANUFACTURER: Ithaca-Peripherals; COMMAND SET: IPCL; MODEL:150; COMMENT: Rev. x.xx; ACTIVE COMMAND SET: IPCL;

12/14/99

Rev G

Page 111

Page 122

Communications

PcOS Series 150

Programmer's Guide

Parallel Port When a Mode 4 request is made, the IEEE 1284 buffer is cleared before the ID is sent.

Page 112

Rev G

12/14/99

Page 123

Programmer's Guide

PcOS Series 150

Communications Parallel Port

Mode 0 Mode 0 provides a reverse channel for information from the printer. Normal responses to inquire (ENQ) commands will be placed in the IEEE 1284 reverse channel buffer. The Mode 0 reverse channel request will begin returning this information to the host. The host may terminate the transmission at any time. If the link is terminated between nibbles, the last nibble is retransmitted on the next request. If a complete byte is transmitted, it is deleted from the IEEE 1284 reverse channel buffer. There is an inquire command that will clear the reverse channel buffer before placing its response in the buffer. The IEEE 1284 buffer is limited to 256 characters. If the buffer is not emptied by reverse channel requests and data transfers, the buffer will overflow. The buffer is a first-in first-out (FIFO) buffer, and the last data placed in the buffer is lost. No attempt should be made to send normal data to the printer while the reverse channel is active. Any data sent to the printer in this mode will be lost and may terminate the reverse channel link.

Time-out IEEE 1284 specifies a time-out for various phases of the protocol. The Series 150 Printer treats these time-outs as minimums. The printer will time out at the specified time only if it is idle during the complete phase.

Active State The IEEE 1284 reverse channel may be activated at any time as long as the printer is not busy with data. This means that if the printer is off-line the reverse channel may be activated. If the printer is placed back on-line while the reverse channel is active, the printer will not exit the reverse channel mode.

Inquire Responses In general, inquire commands place two-byte responses in the IEEE 1284 reverse channel buffer. The two bytes are the same as the serial mode responses. In IEEE 1284 mode, the printer will remain busy until the inquire command is processed. This assures responses in real time. To get the response, the host must ask for it. It is possible for the host to make a number of requests and then get all the responses; however, the status returned will be valid at the time the request was made. It is possible for the dynamic response mode to be activated and the reverse channel opened. The reverse channel will then change from reverse idle to reverse data available as the status changes. The application must be careful in dynamic response mode that the dynamic responses are not left active when the reverse channel is closed. If this happens, the buffer will overflow. If there is data in the buffer when dynamic responses are activated, it will not be replaced by current status. If dynamic response is off and a clear buffer command is issued followed by activation of dynamic responses, the buffer will then contain fresh data. If the buffer clear command is issued after the dynamic response is activated, the buffer will be cleared and any unread responses will be lost.

12/14/99

Rev G

Page 113

Page 124

Communications

PcOS Series 150

Programmer's Guide

Parallel Port

Parallel Port Inquire (Non-IEEE 1284) All inquire commands require a response from the printer. The serial port is bidirectional; the non-IEEE 1284 parallel port is not. For this reason, the parallel, non-IEEE 1284 operation of inquire commands is different from serial and IEEE 1284 modes. In serial and IEEE 1284 operation, inquire commands are responded to by an acknowledged (ACK) or not acknowleged (NAK) sign and then the command ID on the return link. In non-IEEE 1284 parallel operation, there is no easy way to return complex information to the host. The paper error (PE) signal is driven in response to inquiries. If a true paper error is being signaled, the ERR line will also be driven. It is, therefore, possible to distinguish between a paper error and an inquire response. In parallel, non-IEEE 1284 mode, the printer will respond to the inquire before the parallel port sequence is complete. When the parallel port acknowledges the ID portion (the second byte) of the inquire sequence, the PE signal will be valid. The host must, however, remember what status request was made, as the printer has no way of signaling that information. In addition, the host must not interpret the PE signal as an error but as a response to an inquiry. The PE signal can be configured to respond in two ways. The first is static. The PE will remain valid until the next inquire is issued. It may also be configured to operate dynamically which means the PE signal will follow the status of the feature being tracked. In all cases, a true paper error is dynamic. True paper error status will not override any other status request. For example, if you want true paper error operation, it must be selected after all other dynamic status requests. To synchronize inquire commands with the operation of the paper error signal, the printer will remain busy after the second byte of an inquire command until the inquire command is processed. This typically takes about 100 microseconds.

Valid

PE DATA

ID

N e xt

STRO BE BUSY ACK

Figure 19 PE to ENQ request timing It should be noted that inquire commands are preprocessed (looked at and processed before they are buffered). They are still buffered. This means that the buffer could be filled with inquire commands if the printer is waiting for some other operation.

Page 114

Rev G

12/14/99

Page 125

Programmer's Guide

PcOS Series 150

Communications Parallel Port

Parallel Port Plug and Play Microsoft Windows implements Plug and Play (PnP) by doing an IEEE 1284 inquire during boot. The Series 150 Printer will respond to this inquire if IEEE 1284 is active. If the Windows PnP configuration flag is set in the printer, IEEE 1284 will be active for all parallel port modes. For example, Windows PnP in parallel mode forces IEEE 1284. For PnP to work, the host must have an IEEE 1284-compatible port adapter, and the cable used to connect to the printer must support all the interface signals. The PnP response follows. Device ID string: MFG: Ithaca-Periph.;CMD:M150CL,IPCL;CLS:PRINTER;MDL S150 PcOS;DES:IthacaPeripherals Series 150;REV:01.13;OPTS;$5xyz PnP ID: LPTENUM\Ithaca-Periph.S150_PcECB3 Device Description: Ithaca-Peripherals Series 150 Device Class: PRINTER The OPTS field is always as follows: OPTS;$5XYZ Where X is a model definition, X and Y are bit fields that designate the options attached to the printer. Y Bit 0 → Bit 1 → Bit 2 → Bit 3 → Bits 4-5 → Bits 6-7 →

X Bit 0 → Bit 1 → Bit 2 → Bit 3 → Bits 4-5 → Bits 6-7 →

Alternate print zone Undefined Undefined 0 1 0

Slip capability Knife module attached MICR module attached 0 1 0

The REV filed is the revision of the software installed in the printer.

12/14/99

Rev G

Page 115

Page 126

Communications

PcOS Series 150

Programmer's Guide

Parallel Port

Parallel Port Connector The parallel printer interface is a 25-pin D-shell connector. The pin out is such that the printer will interface to a standard personal computer parallel printer interface with a one to one cable. The INIT\ (initialize) printer input acts as a hardware reset to the printer. This signal must be inactive (high) for about four seconds before the printer will respond to information input. The paper error signal is asserted by the printer whenever the journal paper is exhausted and an attempt is made to print on the journal. The paper error signal is also asserted in response to inquire (ENQ) commands in parallel, non-IEEE 1284 mode. The ERR\ signal is asserted if a head jam occurs or if the paper error signal is asserted for a true paper error. Note: The AUTOFD (auto feed, Pin 14) and SLIN (Select input, Pin 17) signals are not used by the Series 150 Printer in parallel, non-IEEE 1284 mode. Pin 1 Pin 2-9 Pin 10 Pin 11 Pin 12 Pin 13 Pin 14 Pin 15 Pin 16 Pin 17 Pin 18-25

STROBE D0 - D7 ACK\ BUSY PE SLCT AUTOFD ERR\ INIT\ SLIN GND

Clock data to printer Data Printer accepted cata Printer is busy Paper out/status Printer selected Auto feed paper Printer error Initialize the printer Select printer Ground

Host to Printer Host to Printer Printer to Host Printer to Host Printer to Host Printer to Host Host to Printer Printer to Host Host to Printer Host to Printer

Table 13 Parallel port pin-outs

Signal Levels Voltage levels Logic levels Logic 1 Driver Receiver Logic 0 Driver Receiver Driver

0 V and +5 V (nominal)

+2.4 V to +5 V +2.0 V to +5 V 0 V to +0.4 V 0 V to +0.8 V +2.4 V to +5 V

Current requirements Logic 1 Logic 0

Source 0.25 ma at +2.4 V Sink 16 ma

Line termination Data and control Strobe

3.3 K ohm to +5 V 1.2 K ohm to +5 V

Page 116

Rev G

12/14/99

Page 127

Programmer's Guide

PcOS Series 150

Communications Serial Port

Serial Port Serial Port Features The serial port features are as follows: Baud rates Bit patterns Flow control

300, 600, 1200, 2400, 4800, 9600, 19.2K 8-bit, no parity; 8-bit odd; 8-bit even; 7-bit no parity; 7-bit odd; 7-bit even DTR and XON/XOFF

Table 14 Serial bit rates It should be noted that the 7-bit, no parity is in fact an 8-bit format. The implementation of the hardware UART in the Intel 8051 family will not allow a true 7-bit, no parity format. If the host provides a true 7-bit, no parity format, it must be configured with two stop bits. The Series 150 Printer has a 64-character high-speed buffer before the main system buffer. This high-speed buffer allows the printer to operate at high serial data rates while printing. Because no data is evaluated in this buffer, the printer will have a delayed response to inquire requests and [CR]’s in one-line operation. This has a significant effect on one-line mode operation.

Serial Port Pin-out Not connected

Input

Pin 1

DCD

Data carrier detect Receive data Transmit data Data terminal ready

Used in printer Output to host Ready and/or flow control signal to host

Input Output Output

Pin 2 Pin 3 Pin 4

RX TX DTR

Disable printer control from host Ready and/or flow control signal to host Flow control from host *Strapable 12 V or DTR

Input

Pin 5 Pin 6

GND DSR

Signal ground Data set ready

Output

Pin 7

RTS

Request to send

Input

Pin 8

CTS

Clear to send

Output

Pin 9

SSD

Secondary data

Not used Commands/data to print Return data Printer ready to receive data (follows buffer)

Not used in standard printer (configurable) Printer ready to receive data (follows buffer) Not used in standard printer (configurable) Not used in standard printer (provides power to peripheral)

Table 15 Serial port pin-outs Because both the host and the printer are DTE's (Data Terminal Equipment), they use the same serial port pin-outs. If the cable that is used to connect the host to the printer is a pin-to-pin interconnect, it will not work. For this reason, a null modem or turn-around cable must be used to interconnect the host and the printer.

Signal levels The serial interface meets EIA RS-232 requirements. Logic 1 -15 V to -3 V: mark = off Logic 0 +3 V to +15 V: space = on

12/14/99

Rev G

Page 117

Page 128

Communications

PcOS Series 150

Programmer's Guide

Serial Port

Serial Port Protocol The serial port supports two flow control standards, XON/XOFF and Ready/Busy (sometimes called DTR or hardware handshake.) When Ready/Busy flow control is selected, the printer can be configured to use DTR, RTS, or both for flow control. If only DTR is selected for flow control, RTS will indicate that the printer has faulted. The following discussions will assume the DTR is being used for flow control. The Ready/Busy protocol generally uses the DTR signal to indicate to the host computer that the printer is not ready to accept data. The host should stop sending data to the printer as soon as possible. Because the host may not notice the DTR signal until it has transmitted several bytes of data to the printer, the printer will continue to except up to 25515 bytes of data after it indicates that it is not ready. The figure below illustrates how the Ready/Busy protocol works.

Serial Port Flow Control Using DTR Communications

Printer control software port Serial data in

Data

Serial data out

Inquire response

(Not used for flow control)

High speed FIFO proc. Data

Print buffer

Data

ENQ response

Clear

DTR DTR

ENQ Data

Buffer filling up

Set

RTS

256 - 6K

Buffer emptying Select key

RTS -> Request to send

DTR -> Data terminal ready

Figure 20 Serial port flow control using DTR

15The buffer always signals it is full before it overflows. The size of the reserve depends on the buffer size selected. It is always at least 255 bytes.

Page 118

Rev G

12/14/99

Page 129

Programmer's Guide

PcOS Series 150

Communications Serial Port

Serial Port Flow Control XON/XOFF Communications

Printer control software port Serial data in Serial data out

Data Inquire commands Send XOFF

High ENQ speed Data Proc. FIFO

Data

RTS (Not used for flow control)

Data

ENQ response Buffer filling up

DTR

Print buffer

Send XON

Buffer emptying

Send

Select key

256 - 6K

XON or XOFF

RTS -> Request to send

DTR -> Data terminal ready

Figure 21 Serial port flow control XON/XOFF

12/14/99

Rev G

Page 119

Page 130

Communications

PcOS Series 150

Programmer's Guide

Serial Port

Print Buffer Flow The following flow chart illustrates the communication driver getting data from the serial port and placing the data in the buffer using Ready/Busy or XON/XOFF flow control.

Wait for data from the host in high speed FIFO buffer.

Place data in print buffer.

Is the buffer full?

Yes

Update buffer pointers.

Is the buffer past the high watermark?

Yes

Clear the DTR signal or transmit XOFF.

No DTR - Data Terminal Ready

Figure 22 Serial buffer operation

At the top of the flow chart, the driver is waiting for data. When data is received from the host, the printer checks to see if it is an inquire command. If the data is an inquiry, it is responded to and placed in the buffer. If not, the data is placed directly into the buffer. The buffer is then checked to see if it is full before the internal pointer is incremented. If it is not full, the pointer is incremented in preparation for the next data byte. The buffer is then checked to see if it is getting full by checking the amount of information in the buffer to see if it has passed a high watermark. If it has, the communication driver is notified, and it resets data terminal ready (DTR) to indicate to the host that no more data should be sent.

Page 120

Rev G

12/14/99