Control Codes
| [ENQ] <15> |
| Inquire printer state | ||
| ASCII | [ENQ] <15> |
| ||
| Hexadecimal | 05H 0FH |
| ||
| Decimal | <5> <15> |
| ||
| Function | The [ENQ] <15> command returns the current printer state | |||
| Note: |
| [ENQ] <17> also returns the current printer state, but it should not be used | ||
| as it conflicts with XON/XOFF flow control. | ||||
| Response | [ACK] <15> <n> <r1> <r2>… | |||
| Where: |
|
|
| |
<15> |
| is the echo of the command ID. | |||
| <n> | is the number of return bytes + 40 (28H) | |||
|
|
| (to prevent confusion with XON/XOFF). | ||
| <r1>: | bit 0 = 1 always |
| ||
|
|
| bit 1 = Cover is closed. | ||
|
|
| bit 2 = Receipt paper is out. | ||
|
|
| bit 3 = 0 |
| |
|
|
| bit 4 = 1 | Printer is waiting in an error mode. | |
|
|
|
| Use [ENQ]<22> to identify the specific error | |
|
|
|
| and [ENQ]<10> to recover | |
|
|
| bit 5 = 0 |
| |
|
|
| bit 6 = 1 always |
| |
|
|
| bit 7 = 0 always |
| |
| <r2>: | bit 0 - 5 = 0 always |
| ||
|
|
| bit 6 = 1 always |
|
bit 7 = 0 always
Note: For this status request to function, the "Buffer Full Only"
[ENQ] <20> | Inquire all printer status | |
ASCII | [ENQ] <20> | |
Hexadecimal | 05H 14H | |
Decimal | <5> <20> | |
Function | The [ENQ] <20> command returns all status flags | |
Response | [ACK] <20> <n> <r1> <r2>… | |
Where: |
|
|
<20> | is the echo of command ID. | |
<n> | is the number of return bytes + 40 | |
|
| (28H) (to prevent confusion with XON/XOFF). |
<r1>: | bit 0 = 0 |
bit 1 = 0
bit 2 = Receipt paper is out. bit 3 = Ticket in transport
bit 4 = Receipt paper error occurred. (low or out) bit 5 = 0
Page 166 |
|
|
|