Programmer's Guide
POSjet
®
1500
Port Protocols and
Connection Specifics
Nov-07
Rev M
Page 261
Print Buffer Flow
The following chart illustrates how the communications driver acquires data from the serial port and places it in the
buffer using Ready/Busy or XON/XOFF flow control.
Flow Chart 1 Serial Buffer Operation
The top of the chart shows that 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 inquire, it is responded to and placed in the buffer. If not, the
data is placed in the buffer without response. 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
checked by looking to see if it has passed a high watermark. If the buffer has, the communication driver is notified,
and it resets DTR to indicate to the host that no more data should be sent. This chart also illustrates how the print
control software takes data from the buffer and controls flow. At the top of the chart, the print control software asks
for data. If there is no data in the buffer, a “no data flag” is returned. The print software must then wait for data. If
there is data in the buffer, it is read, and the pointers are updated. The buffer is then checked to see how much
information is left. If the buffer is below a low watermark (about 100 bytes left), the communication driver is
notified, and DTR is reasserted.
When XON/XOFF flow control is used, the flow is similar to DTR flow except that DTR is not used and
XON/XOFF control characters are transmitted back to the host on the serial link. The XON/XOFF advantage is that
only three wires are required to interconnect to a printer. The disadvantage is that a serial-port receiver driver must
be written for the host.
Wait for data from the
host.
Place data in the print
buffer.
Is the
buffer full?
Clear the DTR signal or
transmit XOFF.
Update the buffer
pointers.
Is the buffer
past the high
watermark?
No
Yes
No
Yes
Summary of Contents for POSJET 1500
Page 1: ...PROGRAMMER S GUIDE POSjet 1500 PN 20 03398 Rev M Nov 2007...
Page 14: ......