ZPLToolkit

^MN

Media TrackingPreview: not drawn

How the printer finds where one label ends and the next begins — and the usual cause of blank or drifting labels.

Syntax

^MNa,b

Parameters

ParameterDescription and accepted valuesIf omitted
aWhat to sense between labels: continuous, web (gap), mark, or auto-detect.N continuous, Y or W web sensing, M mark sensing, A auto-detect, V continuous with variable lengthPrinter setting
bOffset in dots from the black mark to the top of the label.0 to 65535 — black mark offset in dots0

How it works

^MN tells the printer what to look for between labels: a gap in the liner, a black mark on the back, or nothing at all for continuous stock. Its sensor then uses that to find the top of each label.

Get it wrong and the symptoms are dramatic. Continuous mode on gapped stock prints straight over the gaps, so every label drifts a little further down than the last. Web sensing on continuous stock makes the printer hunt for a gap that is not there and feed blank labels looking for it.

Auto-detect covers most cases, but a printer that has been given the wrong mode explicitly will keep using it — and it is worth setting deliberately on a fleet where the media does not change.

Example

ZPL
^XA
^MNY
^FO50,50^A0N,40^FDGap sensing^FS
^XZ

Rendering…

Web (gap) sensing, for standard die-cut label stock.
Open in the viewer

How the preview on this site handles it

Not drawn. Media tracking is about a sensor finding the edge of a physical label; the preview is given a label size directly and has nothing to sense. The format itself previews normally.

Common mistakes

  • Leaving it on continuous with gapped stock. Every label creeps further down the roll until the print runs off the edge.
  • Changing media without recalibrating. New stock with a different gap needs ~JC after the mode changes.
  • Trusting auto-detect on unusual media. Clear liners and pre-printed backs are exactly the cases it gets wrong.

See also