CommandsNetwork
~HS - Host Status Return
Returns comprehensive printer status information to host
~HS - Host Status Return
Overview
The ~HS command returns comprehensive printer status information in three formatted data strings. Provides real-time status of communication settings, paper condition, buffer status, errors, and temperature for printer monitoring and management.
Syntax
~
Parameters
None
Description
- Returns three data strings with status info
- Each string enclosed in STX/ETX markers
- Includes paper, buffer, temperature status
- Communication and diagnostic information
- Processed immediately
Return Format
String 1:
<STX>aaa,b,c,dddd,eee,f,g,h,iii,j,k,l<ETX><CR><LF>String 1 Fields
| Field | Meaning | Range |
|---|---|---|
| aaa | Communication settings (decimal) | 000-999 |
| b | Paper out flag | 0=OK, 1=Out |
| c | Pause flag | 0=Running, 1=Paused |
| dddd | Label length in dots | 0-9999 |
| eee | Formats in buffer | 000-999 |
| f | Buffer full | 0=OK, 1=Full |
| g | Diagnostics mode | 0=Off, 1=On |
| h | Partial format | 0=No, 1=Yes |
| iii | Reserved | 000 |
| j | Corrupt RAM | 0=OK, 1=Bad |
| k | Under temperature | 0=OK, 1=Under |
| l | Over temperature | 0=OK, 1=Over |
Communication Settings Decoding
The aaa field is binary-encoded decimal:
- Baud rate
- Data bits
- Parity
- Stop bits
- Handshaking
Convert to binary for detailed decoding.
Examples
Request Status
~
Returns:
<STX>125,0,0,0812,0003,0,0,0,000,0,0,0<ETX><CR><LF>Interpretation:
- Communication: 125 (detailed settings)
- Paper: OK
- Pause: Running
- Label length: 812 dots (4 inches)
- Formats queued: 3
- Buffer: Not full
- Diagnostics: Off
- Partial format: None
- RAM: OK
- Temperature: Normal (both OK)
Error Condition
~HSReturns:
<STX>125,1,0,0812,0000,0,0,0,000,0,0,0<ETX><CR><LF>Shows paper out condition (b=1).
Status Flags
Paper Status (b)
- 0 = Paper OK
- 1 = Paper Out
Pause Status (c)
- 0 = Running/Ready
- 1 = Paused
Buffer Status (f)
- 0 = Space available
- 1 = Buffer full
Memory Status (j)
- 0 = RAM OK
- 1 = Configuration lost/corrupted
Temperature Status
- k = Under temperature (abnormally cold)
- l = Over temperature (abnormally hot)
Usage Scenarios
Monitor Printer State
Send: ~HS
Check: Paper status, buffer status, errors
Action: Respond to paper out, pause conditionsError Detection
1. Request ~HS
2. Check j (RAM), k (temp), l (temp) flags
3. Detect and log errors
4. Alert if corruption detectedQueue Management
~
Related Commands
~HI- Host Identification^HV- Host Verification~WC- Print Configuration Label