~JG - Graphing Sensor Calibration
Calibrates the sensors and then prints a diagnostic label graphing the readings.
~JG runs the same calibration as ~JC — the label length, and the media and ribbon
sensors — and then prints the result as a media sensor profile. It is the one command
in this category that prints a page of its own.
Syntax
~JGSupport
Every documented parameter renders the same output Labelary produces.
The only command here that prints its own output. The renderer prints the graph as a page ahead of the format carrying the command, wherever in the format it sits, and counts it in X-Total-Count. A second ~JG prints a second page, each format carrying one prints its own, and ^PQ replicates the label alone. Labelary has no sensors to read, so the graph is empty: five numbered rules, a zero line and one sentence. Only the label size reaches the drawing, setting how long the rules are and how far apart. A ^PW ahead of the ~JG centers the page in the print window and cuts the rest away. A ^POI ahead of it turns the page over. Either one after the ~JG leaves the page alone (measured 2026-08-16). Only ~JG is a command. — not pinned by a test
Labelary renders this command.
Parameters
~JG takes no arguments.
Behavior
~JG takes no arguments and belongs to no format. Measured against Labelary on
2026-08-16:
^XA~JG^FO100,100^A0N,60,60^FDCAL^FS^XZreturnsX-Total-Count: 2, and the graph comes first. A~JGafter the field keeps that order.~JGwith no format at all returns one page.- A second
~JGprints a second page, and each format carrying one prints its own.^PQreplicates the label alone.
Labelary has no sensors to read, so it rules an empty graph instead: five hairlines
numbered 100 down to 20, a heavy zero line along the bottom, and the sentence
Labelary. No sensors. No media. No problem. across the middle. The renderer prints
the same page. Only the label size reaches the drawing — the width sets how long the
rules are, the height how far apart — and no sensor command changes a dot. A ^PW
ahead of the ~JG centers the finished page in the print window and cuts the rest
away; a ^POI ahead of it turns the page over. Either one after the ~JG leaves the
page alone. ^JG is not a command and prints nothing.
Known issues
Tested behavior
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- Labelary prints the sensor profile as a page of its own, ahead of the format.
^XA~JG^FO100,100^A0N,60,60^FDCAL^FS^XZreturnsX-Total-Count: 2, the graph first, and a~JGafter the field keeps that order (measured 2026-08-16). The guide gives no page count, and no sensor stands behind the service, so the order and the empty graph are both Labelary's reading. The renderer follows it. — not pinned by a test
Example
A calibration graph requested ahead of a label. The graph is the first page:
~JG
^XA
^FO50,50^A0N,40,40^FDLabel on page two^FS
^XZ
Related commands
~JCSet Media Sensor CalibrationThis command runs a full calibration of both the label length and the sensor thresholds.^SSSet Media SensorsThis command overrides every media-sensor threshold and LED intensity by hand, without a calibration.^SISet Sensor IntensityThis command sets one media-sensor brightness or baseline value.~WCPrint Configuration LabelPrints a label listing the printer's current configuration.