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
0
       fixed to 0
1
1
       fixed to 1
2
0
       cash-drawer signal is LOW
1
       cash-drawer signal is HIGH
3
0
       online
1
       offline
4
1
       fixed to 1
5,6
-
       reserved
7
0
       fixed to 0

                                                                                                      n=2:  offline cause status

StusBuf[0]
Bit
0/1
Status
0
0
       fixed to 0
1
1
       fixed to 1
2
0
       cover is closed
1
       cover is opened
3
0
       feed key is not pressed
1
       feed key is pressed down
4
1
       fixed to 1
5
0
       printer is not halted by paper end
1
       printer is halted by paper end
6
0
       no error occurred
1
       error occurred
7
0
       fixed to 0

                                                                                                      n=3:  error cause status

StusBuf[0]
Bit
0/1
Status
0
0
  fixed to 0
1
1
  fixed to 1
2
-
  undefined
3
0
  cutter is normal
1
  cutter error occurred
4
1
  fixed to 1
5
0
  no unrecoverable error
1
  unrecoverable error occurred
6
0
  no automatically recoverable error
1
  automatically recoverable error occurred
7
0
  fixed to 0

                                                                                                      n=4:  roll paper sensor status

StusBuf[0]
Bit
0/1
Status
0
0
  fixed to 0
1
1
  fixed to 1
2,3
0
  paper near-end sensor: paper adequate
1
  paper near-end sensor: paper near end
4
1
  fixed to 1
5,6
0
  paper end sensor: paper present
1
  paper end sensor: out of paper
7
0
  fixed to 0

 

Reference


DLE EOT n --- transmit real-time status command

Return Values


1 --- SUCCESS
0 --- FAILED



© 2012 SPRT . All rights reserved.