Programmer's Guide

PcOS Series 150

Control Codes

 

 

Printer Status Set/Inquire

Printer Status Set/Inquire

The Series 150 Printer is designed to be used as part of an automated system where the host computer makes every attempt to correct problems with the printer. In addition, the host application requires that it be able to obtain more information from the printer than is typical of normal computer printers. A normal computer printer does not have to deal with cash drawers or validation. As a result, the standard printer protocol must be extended to address the additional features of a POS printer.

The Series 150 Printer has defined a set of status inquiry commands that will allow a host to obtain information about the printer and devices connected to it. The method chosen to interact with the computer is designed to allow a reasonable approach to the host application. It will not always be possible for an existing application to use the inquire commands unless the communication drivers are available to the programmer.

All inquire commands require a response from the printer. For this reason, the parallel, non-IEEE 1284; IEEE 1284; and serial operation of inquire commands are different. In serial and parallel, IEEE 1284 modes, all inquire commands are responded to by an acknowledged (ACK) or not acknowledged (NAK) and then the command ID. In parallel non-IEEE 1284 operation, the paper error (PE) signal is driven as a response to an inquire.

Parallel, Non-IEEE 1284 Mode Inquire

There are several status inquiry commands and inquire control commands. The inquire character is treated differently from all other characters received by the printer. Under normal operating conditions, all information that is sent to the printer is received and placed in a holding buffer. The information stays in the holding buffer until the printer prints or interprets it.

The inquire command in non-IEEE 1284 mode presents a few problems for the printer to decode. In parallel mode, the inquire character is intercepted before it is placed in the print buffer. The next character is looked at to determine if it is a valid inquire command. If it is valid or a graphic, further input is then blocked by not removing the busy status. The buffer is then emptied by the printer during normal operation. If the inquire was false, the command decoder processes a command. If an inquire is found in the data stream at this time, input is unblocked and normal operation is resumed. The printer is unaffected by this unintended operation except that the buffer efficiency is reduced. If the inquire was real, the inquire is processed. This ensures that the response to the inquire is synchronized with the inquire request and that no false inquires are processed.

In parallel, non-IEEE 1284 operation, there is no easy way to return complex information to the host. For this reason, the paper error (PE) signal is used for inquire responses. The fault signal will not be asserted by inquire requests. If a true PE is being signaled, the fault line will also be driven. It is, therefore, possible to distinguish between a paper error and an inquire response.

In parallel mode, the printer will respond to the inquire before the parallel sequence is complete. In other words, when the parallel port acknowledges the ID part of the inquire sequence, the PE signal is valid. The host must, however, remember what status was requested 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 inquire. There are two ways in which inquire responses can be signaled. The PE can be static or dynamic. When a dynamic PE occurs, the inquiry is sent once, and the PE signal follows the requested status. If the PE remains static, the status will not change.

12/14/99

Rev G

Page 59

Page 69
Image 69
Star Micronics 150 manual Printer Status Set/Inquire, Parallel, Non-IEEE 1284 Mode Inquire