Star Micronics 150 User Manual

Page of 151
Programmer's Guide
PcOS Series 150
Communications
Serial Port
12/14/99
Rev G
Page 123
When XON/XOFF protocol is implemented, it is possible for the host to miss an XON or an
XOFF. To prevent this from causing a communication lockup, the printer will send an XOFF for
every character received after the high watermark is reached.
Whenever the printer detects that the serial data link is inactive, it will send out an XON. This
results in an XON being sent out about every two seconds.
When the printer is selected or deselected (with the SELECT key), an XON or XOFF will also be
sent. This happens even if the internal data buffer is past the high watermark
16
 and tells the host
that the SELECT key has been pressed. If the buffer is full and an XON is sent, the next
character sent by the host will cause an XOFF to be sent. The data that was sent by the host will
not be lost unless the 255-character pad buffer is depleted.
Printer Buffer Size
The Series 150 Printer has a configurable buffer size. It can be set from 256 bytes to 6144 bytes
(This does not include the 64-character high-speed buffer). This allows an application to control
how far ahead of the printer it can get before being asked to wait. The smaller the buffer is, the
tighter the control. 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] is received by the
printer. In this mode, the printer will stay busy after the [CR] is received and remain busy
until the previous information is printed. This mode is not recommended for serial operation
unless the application looks for the line terminator handshake. Several features must be
considered when using this mode.
1. The printer only looks at [CR]’s. [LF] will cause the printer to print but will not set
busy.
2. If a [CR] character is received as part of another command, i.e., as part of graphical
data, the printer will go busy after the [CR] is received and will go ready after the [CR]
is processed.
3. By definition, one-line mode is slow. The printer will not allow the application to get
ahead of it.
4. In serial mode, one-line mode is difficult to control. Because of the 64-character high-
speed FIFO buffer, the printer will not go busy immediately after the [CR] is sent. It may
take up to 25 milliseconds for the printer to process the [CR]. During this time, it is
possible for the application to send up to 48 bytes of data to the printer. When the [CR]
is found in the input stream, the busy status will be set. If the application continues to
send information, the input buffer will be overrun as it only has 16 bytes left. In
addition, the application will not truly be in one-line operation. The application must
wait for at least 100 milliseconds after a [CR] before looking for busy status or trying to
send more data.
5. In XON/XOFF mode, the printer is heavily burdened by the task of transmitting XOFF
characters while printing and receiving data. The application should be written to look
for the XOFF after every [CR]. The Series 150 Printer will lose data if too many
characters follow the XOFF.
                                                       
16
If the host sends more information, it will be responded to by an XOFF.