~HQ - Host Query
Sends one of ten named printer reports back to the host.
~HQ is the umbrella query command: one mnemonic, and ten reports chosen by a
two-letter name. The reports cover:
- error and warning state;
- the odometer;
- printhead life and test results;
- maintenance thresholds;
- the serial number;
- the hardware address;
- the plug-and-play identification string;
- USB details.
Each one is a fact about a device, and each one returns over the link, not onto the label.
Syntax
~HQqSupport
Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.
Returns odometer, error, serial-number and printhead reports over the printer's link. All of them describe hardware, and none affects a rendered label. The renderer does not parse this command. It reports IGNORED_COMMAND at info severity, which does not reach X-Warnings. Labelary is also silent, so the rendered label is identical in both engines. — not pinned by a test
Labelary renders this command.
Parameters
qQueryrequired · one of a setWhich report to return. Each one describes the printer rather than the label.
- Invalid value
- not documented, and we have not measured it. The renderer does not parse this command, so no one measured an unrecognized query name. The reference states no default; an omitted query has nothing to select.
- Test coverage
- No documented value is exercised by a test (ES, HA, JT, MA, MI, OD, PH, PP, SN, UI).
ES- Error status
HA- Hardware address
JT- Printhead test results
MA- Maintenance alert settings
MI- Maintenance information
OD- Odometer
PH- Printhead life history
PP- Plug and play string
SN- Serial number
UI- USB information
Behavior
~HQ is newer than the 2006 edition of the ZPL II Programming Guide and does not
appear in it, so the query names above come from Labelary's command reference.
Neither source documents their reply layouts, so this page states nothing about them.
A render request has no device behind it: no odometer, no printhead, no serial number
and no USB. The renderer ignores the command, and the page is unchanged. It reports
IGNORED_COMMAND at info severity, which does not reach X-Warnings. Labelary is
also silent. Of the ten reports, only ES has a counterpart here: the response
diagnostics report problems with a format, not with hardware.
Example
An error-status query and a label in one format. The query does nothing; the field is what produces the page.
^XA
~HQES
^FO50,50^A0N,40,40^FDError status^FS
^XZ
Related commands
~HSHost Status ReturnSends three status strings describing the printer's current state back to the host.~HIHost IdentificationSends the printer model, firmware version, resolution, memory size and detected options back to the host.~HDHead DiagnosticSends a power-supply and head-temperature report back to the host.^HZDisplay Description InformationSends printer status, configuration or object descriptions back to the host as XML.