^MU Set Units of Measurement

Label geometry and units ZPL caret command

Chooses whether following values are read as dots, inches or millimeters, and can convert a format made for one density to another.

Format ^MUa,b,c

^MU parameters

Parameters of ^MU
ParameterMeaningAccepted valuesDefault
aunitsp. 312

The unit used to read the dimension and position values that follow.

The unit works field by field: once a mode is set, it carries over from field to field until a new mode is sent.
  • Ddots
  • Iinches
  • Mmillimeters
D
bformat base in dots per inchp. 312

The density, in dots per inch, that the format was written for. Used together with c to convert the format.

The guide's reset examples use matching b and c values: 600 as b, and 150 and 200 as c, all of which are outside the lists printed for these two parameters (see the notes below).
  • 150150 dots per inch
  • 200200 dots per inch
  • 300300 dots per inch

A value must be entered or the command is ignored.

cdesired dots-per-inch conversionp. 312

The density, in dots per inch, to convert the format to.

  • 300300 dots per inch
  • 600600 dots per inch

A value must be entered or the command is ignored.

^MU notes and gotchas

  • Interaction

    In the guide's example on an 8 dots/mm printer, one box is drawn with dot values, with millimeter values and with inch values. The ^FO position and the ^GB width, height and thickness are all written in the selected unit, and the millimeter and inch examples use decimal numbers.

    p. 312
  • Note

    Besides changing units, the command allows printing at a lower resolution: a 600 dpi printer can print at 300, 200 and 150 dpi, and a 300 dpi printer can print at 150 dpi.

    p. 312
  • Note

    The guide's conversion examples are ^MUd,150,300 and ^MUd,150,600 (a 150 dpi format to 300 and 600 dpi) and ^MUd,200,600 (a 200 dpi format to 600 dpi), each with the base in dots.

    p. 312
  • Note

    To turn the conversion off, send the same value for b and c. The guide lists ^MUd,150,150, ^MUd,200,200, ^MUd,300,300 and ^MUd,600,600.

    pp. 312, 313
  • Note

    The guide says ^MU should appear at the beginning of the label format to be proper ZPL II.

    p. 313
Where the guide contradicts itself (4)
  • Guide issue

    The b and c parameters say a value must be entered or the command is ignored, yet the guide's own unit examples (^MUd, ^MUm, ^MUi) send only a. The guide does not reconcile the two; this record reports both statements and does not choose.

    p. 312
  • Guide issue

    The value list for a prints D, I and M in capitals, while every example in the entry writes the unit in lower case (^MUd, ^MUm, ^MUi). The guide does not say whether the case matters.

    p. 312
  • Guide issue

    The accepted lists are 150, 200 and 300 for b and 300 and 600 for c, but the reset examples on pages 312 and 313 use ^MUd,150,150 and ^MUd,200,200 (c outside its list) and ^MUd,600,600 (b outside its list).

    pp. 312, 313
  • Guide issue

    The example calls an 8 dots/mm printer a 203 dot/inch printer, while the b parameter accepts 200, not 203, and the page's introduction speaks in round dpi values. The guide does not say which b value matches an 8 dots/mm printhead. Density is therefore stated in dots per mm here; the dpi wording also differs on pages 49 (200 dpi), 210 and 294.

    pp. 49, 210, 294, 312

^MU example

example.zplZPL
^XA
^MUM
^FO10,10^GB60,20,2^FS
^FO10,40^GB60,20,2^FS
^XZ

Switches to millimeters. Both boxes then start 10 mm from the left, one 10 mm down and one 40 mm down, and each is 60 mm wide, 20 mm high with a 2 mm border. The unit stays in effect for the second box without being repeated.

Guides that use ^MU

BarcoderX is a .NET SDK for thermal labels and barcodes. See how it prints and exports labels.

Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 49, 201, 210, 269, 294, 312, 313.

Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.

ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.