HP PCL/PJL reference - Printer Job Language Technical Reference Manual
11-10 Programming Tips for Using PJL EN
Jobs That Monitor Printing Status
The following example enables unsolicited printer status using the
USTATUS DEVICE command. After unsolicited device status is
enabled, the printer automatically sends a status response whenever
the printer's status changes.
<ESC>%-12345X@PJL <CR><LF>
@PJL ECHO Acme #17 8-28-92 5:39:02.9 <CR><LF>
@PJL COMMENT Turn on unsolicited device
~status <CR><LF>
@PJL USTATUS DEVICE = ON <CR><LF>
<ESC>%-12345X