zpl.tools
Media and sensors

^MF - Media Feed

Chooses what the printer does with the media when it powers up and when the printhead is closed.

^MF sets two persistent printer settings: what the media does at power-up, and what it does after the printhead closes and the error that opened it clears. Neither moment falls inside a print job, so the command describes the printer state before the label arrives rather than the label.

Syntax

^MFp,h

Support

Recognised, deliberately skippedparsed: full · 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.

The parser stores this command as MfCommand, and nothing reads it. Both arguments are inert: they describe what the motor and the media sensor do before any format, which cannot reach the image. The parser reads it, so the renderer reports no unsupported-command warning, unlike the unparsed media commands below. — not pinned by a test

Labelary renders this command.

Parameters

pPower-up actionoptional · one of a setnot honoured by zpl.tools

What the printer does with the media at the next power-up.

Default
C
Invalid value
not possible — any value is accepted. The parser stores the argument as a free string, does not check it against the five letters, and reports no diagnostic. Nothing reads the result.
Test coverage
No documented value is exercised by a test (F, C, L, N, S).
F
Feed media to the first inter-label mark
C
Recalibrate the media sensor (default)
L
Reset the label length
N
Do nothing
S
Perform a short calibration
hHead-close actionoptional · one of a setnot honoured by zpl.tools

What the printer does with the media when the printhead closes.

Default
C
Invalid value
not possible — any value is accepted. As with p, the parser stores this argument unvalidated, and nothing reads it.
Test coverage
No documented value is exercised by a test (F, C, L, N, S).
F
Feed media to the first inter-label mark
C
Recalibrate the media sensor (default)
L
Reset the label length
N
Do nothing
S
Perform a short calibration

Behavior

Both arguments name a feed action rather than a distance. C runs the same calibration as ~JC, and L measures the label length as ~JL does.

N is the one value with a consequence worth a statement. It tells the printer to assume that the media did not move since the power went off or the head opened. If someone changed the roll in the meantime, the first label prints in the wrong place, because nothing re-established the position of the label break.

The setting outlives the format. Follow it with ^JU to save it to the printer's non-volatile memory. Otherwise the next power cycle loses it, and that is the moment it governs.

The parser reads both arguments and then discards them, so nothing in the returned page depends on them, and the renderer rejects no value.

Differences from the specification

Labelary against the ZPL II guide

Where Labelary — our compatibility target — behaves differently from the printed specification.

  • The guide (45541L-004, page 224) accepts only F, C, L and N for both arguments. Labelary documents a fifth value, S, for a short calibration, which the 2006 edition does not. — not pinned by a test
  • The guide gives the default for both arguments as platform-dependent. Labelary documents C for both. — not pinned by a test

zpl.tools against the ZPL II guide

Where our renderer behaves differently from the specification.

  • The parser puts both arguments into MfCommand, and nothing reads them. It accepts any letter, even one outside F, C, L, N, S, with no diagnostic. — not pinned by a test

Example

A media-feed setting in front of an ordinary label.

^XA
^MFN,C
^FO50,50^A0N,40,40^FDShipment 4417^FS
^XZ

Open in viewer

  • ^MM Print ModeThis command selects what happens to a label after the print: tear-off, peel-off, rewind, cut or applicator.
  • ^MN Media TrackingThis command tells the printer whether the stock is continuous, or has a gap, web or black mark between labels.
  • ^MT Media TypeThis command declares whether the stock is direct thermal or needs a ribbon.
  • ~JL Set Label LengthThis command makes the printer feed media to measure the label length.
  • ^JS Sensor SelectThis command selects the reflective media sensor or the transmissive media sensor.