zpl.tools
Host status and queries

~HB - Battery Status

Sends the battery voltage, head voltage and battery temperature back to the host.

~HB asks the printer about its power supply. The printer replies with one line of text over its link, and prints nothing on a label. The guide states that only mobile printers answer, so a desktop or industrial printer has nothing to report.

Syntax

~HB

Support

Recognised, deliberately skippedparsed: none · state: none · rendered: none

Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.

Reports the battery voltage of a portable printer over the printer's link. This service has no battery and no link to answer on. 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

~HB takes no arguments.

Behavior

A real printer replies with <STX>bb.bb,hh.hh,bt<ETX><CR><LF>: the battery voltage and the head voltage, each to the nearest quarter of a volt, then the battery temperature in Celsius. This battery is the power-supply battery. The guide warns against confusion with the battery-backed RAM that ~JB covers.

A render request has no serial or network link, and no battery to measure. 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, so the label is identical in both engines.

Example

The text field is what makes the request return a page at all — a format whose only content is a query command produces no pages, so asking for the first one is a 404.

^XA
~HB
^FO50,50^A0N,40,40^FDBattery check^FS
^XZ

Open in viewer

  • ~HS Host Status ReturnSends three status strings describing the printer's current state back to the host.
  • ~HQ Host QuerySends one of ten named printer reports back to the host.
  • ~HI Host IdentificationSends the printer model, firmware version, resolution, memory size and detected options back to the host.