~HS - Host Status Return
Sends three status strings describing the printer's current state back to the host.
~HS asks whether the printer is ready, and is the most used command in this group.
The printer answers with three strings: the interface settings, the media and error
flags, and the memory options. Print-spooling software polls it to learn whether the
paper runs out, the head is up or the buffer is full.
Syntax
~HSSupport
Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.
Returns paper-out, pause, buffer and label-count flags over the printer's link. A render request has none of those states. 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
~HS takes no arguments.
Behavior
Each of the three replies starts with <STX> and ends with <ETX><CR><LF>, and
every field is positional:
- String 1 —
aaa,b,c,dddd,eee,f,g,h,iii,j,k,l. The communication settings come first, as a three-digit decimal encoding of eight bits. Then come the paper-out, pause, label length, formats in the receive buffer, buffer-full, diagnostic-mode and partial-format flags, an always-000unused field, and the corrupt-RAM and under- and over-temperature flags. - String 2 —
mmm,n,o,p,q,r,s,t,uuuuuuuu,v,www. The function settings come first, again bit-packed into three decimal digits. Then come head-up, ribbon-out, thermal transfer, print mode, print width mode, label-waiting, labels remaining in the batch, an always-1flag, and the count of graphics stored in memory. - String 3 —
xxxx,y: the password, and whether static RAM is installed.
Almost every one of those fields describes a physical condition. A render request has
no paper, no ribbon, no head and no receive buffer, so no correct value exists for any
of them, and no link carries them. 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.
The HTTP response replaces ~HS for a caller that needs to know whether a print job
succeeded:
- the status code states whether the service accepted the format
X-Total-Countstates how many pages it renderedX-Warningscarries the parser's diagnostics
Example
~HS draws nothing, so it needs a field alongside it to produce a page at all. ^XA~HS^XZ on its own generates no labels, and a request for the first page of that format is answered with a 404 rather than a blank image.
^XA
~HS
^FO50,50^A0N,40,40^FDStatus query^FS
^XZ
Related commands
~HQHost QuerySends one of ten named printer reports back to the host.~HIHost IdentificationSends the printer model, firmware version, resolution, memory size and detected options back to the host.^HHConfiguration Label ReturnSends the printer's configuration back to the host as text.~HUReturn ZebraNet Alert ConfigurationSends the printer's configured alert destinations back to the host.