HP PCL/PJL reference - Printer Job Language Technical Reference Manual

EN Programming Tips for Using PJL 11-23
When processing a job, I/O switching paces off all I/O interfaces
except for the one which is providing the current print job. However, it
is possible for an application to get a few bytes of data into the
inactive I/O interface before the printer paces off that I/O interface. If
the application times out while trying to send the initial UEL command
after one or more bytes of the command are sent, but before the
entire UEL command is sent, then the application can proceed using
one of the following choices: 1) continue attempting to send the data
to the printer, 2) remember how much of the initial UEL command has
been sent to the printer and attempt to send the rest of the command
at a later time, or 3) stop trying to send the command, making sure
the next command the application sends to the printer is the UEL
command. This is done so the parser inside the printer properly
recognizes all commands following the previously sent partial UEL
command. The printer will properly recognize the UEL command,
even if the
command appears after a partial UEL command.
For example, assume the initial query is:
<ESC>%-12345X@PJL ECHO 08/27/92 09:53:46.5
~033288925
If the printer only accepts "<ESC>%-12", and if the application later
sends:
<ESC>%-12345X@PJL ECHO 08/27/92 09:57:46.5
~6202323802 <LF>
The printer accepts the query and responds with:
@PJL ECHO 08/27/92 09:57:46.5 6202323802<LF>
<FF>
One of the conditions I/O-switching printers use to determine when to
switch to another I/O interface is the idle time of the I/O interface
supplying the current print job. Idle time is defined as the time elapsed
since the I/O interface received the last data byte. If the application
queries the printer and waits for a response, it is possible for I/O
interface idle time to exceed the set timeout value (the TIMEOUT
environment variable). When the printer detects the current I/O
interface timed out, the printer allows I/O switching and treats any
data received over the I/O interface as unrelated to the data
previously received over that interface.