User manual

APOS Premium Printer Series User Manual Page 92 /136 Reference: FDE 3107312 Issue A
M
OVING DATA THROUGH THE BUFFER
Applications should not let the buffer fill up with Real Time commands when the printer is busy at the
communication interface. A busy condition can be determined by bit 3 of the response to GS ENQ or GS
EOT 1 or DLE EOT 1. Other responses to GS EOT n or DLE EOT n can determine the reason for a
particular busy condition.
Although the printer responds to Real Time commands when it is busy, it will place them into the buffer
behind any other data there, and flush them out in the order in which they were received.
When the printer is busy due simply to buffer full (that is, it can’t print data as fast as it can receive it), then
data continues to be processed out of the buffer at approximately print speed and the Real Time commands
will eventually get flushed out.
When the printer is busy due to an error condition, then data stops being processed of the buffer until the
condition clears one way or another. In either case, but more quickly in the case of an error condition, the
buffer can fill with Real Time commands.
When the DLE sequences are being used, the last byte stored when the buffer fills up could be the DLE
code, with no room for the subsequent EOT or ENQ. When this lone DLE byte is finally processed out of
the buffer it will be interpreted as a Clear Printer command.
Similarly, when the GS sequences are being used, the last byte stored when the buffer fills up could be the
GS code, with no room for the subsequent EOT or ETX or ENQ. When this lone GS byte is finally
processed out of the buffer it will use the next byte, whatever it is, as the second byte in its GS sequence.
To guard against this situation, the application must determine the cause of a busy condition and take
appropriate action or pace the Real Time commands to avoid filling the buffer. There is a minimum of 256
bytes available in the printer’s buffer when it goes busy.
B
USY LINE AND FAULT CONDITIONS
If the printer is in error condition (cover is open, paper is exhausted…), the printer will still accept data,
respond to the batch mode status commands (ESC v and ESC u) and not go busy until it actually tries to
execute a print command. Then it will stay busy and stop processing data out of the receive buffer until the
condition clears. It will respond to the Real Time commands as described below.
R
EAL TIME RECOVERY FROM FAULT
This command will select the recovery mode when the printer detects a fault condition. Any fault condition
that prevents the printer from any printing function requires one of these commands to allow printing to
resume.
DLE Sequence
ASCII
DLE ENQ n
Hexadecimal 10 05 n
Decimal
16 5 n
Operand
n = recovery mode
Limit
Decimal:
1 n 2
Hex:
01 n 02
“DLE ENQ” OPERAND DEFINITION