Print job status query, Querying the printer – Datamax-O'Neil microFlash 2te Quick Reference Programming Guide User Manual
Page 49
Querying the Printer
45
Datamax-O’Neil Quick Reference Programming
Print Job Status Query
Print Job Status Query
Query Format
ESC{Sn?}
Reply Format
{ST!
E
:x;N:x;S:x;
L
:x;
P
:x;J:x;
R
:x;
B
:x}
Function
Verifies data delivered to the printer was printed without any
mechanical errors such as a head jam or an out of paper
condition. n indicates the level of error reporting. The end of
the print job is indicated by the Esc e command. n is defined
as follows:
bit 0 =Determines auto report status at the end of the job
(when last line/form feed before ESC e is complete).
bit 1 = Determines status if paper was out during printing.
bit 2 = Determines status if there was a printhead jam during
printing.
bit 3 = Determines status when paper is loaded after a paper
out condition and the red button is pressed during printing.
bit 4 = Determines if printer times out during printing.
bit 5 = Determines if forward/reverse buttons were pressed
during printing.
bit 6 = Cancels timeout. Printer always stays on (timeout set
to 9999) but does not write to Flash.
bit 7 = Reserved.
Note 1: If all zeroes are specified for n, any active status
messages set by an ESC s n command without an ESC e
command are cancelled.
Note 2: Cancelled timeouts are not written to Flash;
therefore, the timeout returns to defaults if the printer is off
or if the power is disconnected.
Note 3: Timeouts can also be cancelled using the ESC t
command. ESC s 0 or ESC e will not reinstate a timeout
cancelled using the ESC t command.
Reply Example
{ST!E:N;S:I;L:D;P:P;J:N;R:40;B:O}
Reply Example
Explanation
ST! - Reply to a print job status query.
E:
N; - There are no syntax/language errors.
S:I; - The printer is idle.
L:
D; - The paper release lever is down, ready to print.
P:
P; - Paper is present.
J:N; - There is no head jam.
R:
62; - 62K bytes remain in the input buffer.
B:
O; - Acceptable battery voltage and temperature.