|
ASCII_GetPrinterStatus |
Get the status of printer, each status is represented by one-byte of data.
LONG ASCII_GetPrinterStatus(
byte[] StusBuf,
int n
);
Parameters
StusBuf[0] returned status of printer
n specify the type of returned status (1 ≤ n ≤ 4)
n=1: printer status
StusBuf[0] Bit 0/1 Status 0 0fixed to 0 1 1fixed to 1 2 0cash-drawer signal is LOW 1cash-drawer signal is HIGH 3 0online 1offline 4 1fixed to 1 5,6 -reserved 7 0fixed to 0 n=2: offline cause status
StusBuf[0] Bit 0/1 Status 0 0fixed to 0 1 1fixed to 1 2 0cover is closed 1cover is opened 3 0feed key is not pressed 1feed key is pressed down 4 1fixed to 1 5 0printer is not halted by paper end 1printer is halted by paper end 6 0no error occurred 1error occurred 7 0fixed to 0 n=3: error cause status
StusBuf[0] Bit 0/1 Status 0 0fixed to 0 1 1fixed to 1 2 -undefined 3 0cutter is normal 1cutter error occurred 4 1fixed to 1 5 0no unrecoverable error 1unrecoverable error occurred 6 0no automatically recoverable error 1automatically recoverable error occurred 7 0fixed to 0 n=4: roll paper sensor status
StusBuf[0] Bit 0/1 Status 0 0fixed to 0 1 1fixed to 1 2,3 0paper near-end sensor: paper adequate 1paper near-end sensor: paper near end 4 1fixed to 1 5,6 0paper end sensor: paper present 1paper end sensor: out of paper 7 0fixed to 0
Reference
DLE EOT n --- transmit real-time status command
Return Values
1 --- SUCCESS
0 --- FAILED
© 2012 SPRT . All rights reserved.