zpl.tools
Memory and storage

^CM - Change Memory Letter Designation

Reassigns the drive letters `B:`, `E:`, `R:` and `A:` to different physical storage devices.

^CM renames the printer's storage devices. Each argument is the device a fixed letter reaches, in the letter order B, E, R, A. So ^CME,B,R,A makes the letter B: reach the E: device, and the letter E: reach the B: device. The command copies and moves nothing. The stored objects stay where they are, and only the letter that reaches them changes, for every later command that names one.

The guide's wording points the other way, at the new letter each device receives. The two readings agree on the guide's own example, which is its own inverse. They disagree on an asymmetric permutation, and there Labelary follows the reading above (measured 2026-08-19).

Syntax

^CMa,b,c,d,e

Support

Supportedparsed: full · state: full · rendered: full

Every documented parameter renders the same output Labelary produces.

The parser reads the four device letters and the renderer applies them. A ~DG, ^XG, ^ID or ^JB letter is resolved through the map this command maintains, so an object stored on R: is recalled as E: after ^CMB,R,E,A and is no longer reachable as R:. Two arguments naming the same device reset all four letters to their defaults, which a short form such as ^CMB,R also triggers because the omitted slots keep their own letters. We measured all of this against Labelary on 2026-08-19. The fifth M argument newer firmware documents is not read. — not pinned by a test

Labelary renders this command.

Parameters

aDevice the letter B reachesoptional · one of a set

The device the drive letter B: names after this command.

Default
B
Invalid value
enough to make the whole command be ignored. The guide is explicit. An argument out of specification makes the printer ignore the whole command. Two or more arguments naming the same letter reset all four designators to their defaults. Labelary resets and reports Device aliases were reset because multiple devices were mapped to the same alias, measured 2026-08-19. An omitted argument keeps its own letter before that test runs, so ^CMB,R collides on R and resets as well.
Test coverage
No documented value is exercised by a test (B, E, R, A, NONE). The invalid-value rule is pinned by 2 tests.
B
The B: device, historically a PCMCIA card
E
The E: device, internal flash memory
R
The R: device, volatile RAM
A
The A: device, a CompactFlash card
NONE
The device receives no letter and becomes unaddressable. The guide alone lists this value. Labelary's reference omits it — not honoured by zpl.tools
bDevice the letter E reachesoptional · one of a set

The device the drive letter E: names after this command.

Default
E
Invalid value
enough to make the whole command be ignored. The guide is explicit. An argument out of specification makes the printer ignore the whole command. Two or more arguments naming the same letter reset all four designators to their defaults. Labelary resets and reports Device aliases were reset because multiple devices were mapped to the same alias, measured 2026-08-19. An omitted argument keeps its own letter before that test runs, so ^CMB,R collides on R and resets as well.
Test coverage
No documented value is exercised by a test (B, E, R, A, NONE). The invalid-value rule is not pinned by a test.
B
The B: device, historically a PCMCIA card
E
The E: device, internal flash memory
R
The R: device, volatile RAM
A
The A: device, a CompactFlash card
NONE
The device receives no letter and becomes unaddressable. The guide alone lists this value. Labelary's reference omits it — not honoured by zpl.tools
cDevice the letter R reachesoptional · one of a set

The device the drive letter R: names after this command.

Default
R
Invalid value
enough to make the whole command be ignored. The guide is explicit. An argument out of specification makes the printer ignore the whole command. Two or more arguments naming the same letter reset all four designators to their defaults. Labelary resets and reports Device aliases were reset because multiple devices were mapped to the same alias, measured 2026-08-19. An omitted argument keeps its own letter before that test runs, so ^CMB,R collides on R and resets as well.
Test coverage
No documented value is exercised by a test (B, E, R, A, NONE). The invalid-value rule is pinned by 1 test.
B
The B: device, historically a PCMCIA card
E
The E: device, internal flash memory
R
The R: device, volatile RAM
A
The A: device, a CompactFlash card
NONE
The device receives no letter and becomes unaddressable. The guide alone lists this value. Labelary's reference omits it — not honoured by zpl.tools
dDevice the letter A reachesoptional · one of a set

The device the drive letter A: names after this command.

Default
A
Invalid value
enough to make the whole command be ignored. The guide is explicit. An argument out of specification makes the printer ignore the whole command. Two or more arguments naming the same letter reset all four designators to their defaults. Labelary resets and reports Device aliases were reset because multiple devices were mapped to the same alias, measured 2026-08-19. An omitted argument keeps its own letter before that test runs, so ^CMB,R collides on R and resets as well.
Test coverage
No documented value is exercised by a test (B, E, R, A, NONE). The invalid-value rule is not pinned by a test.
B
The B: device, historically a PCMCIA card
E
The E: device, internal flash memory
R
The R: device, volatile RAM
A
The A: device, a CompactFlash card
NONE
The device receives no letter and becomes unaddressable. The guide alone lists this value. Labelary's reference omits it — not honoured by zpl.tools
eMultiple-device flagoptional · one of a setnot honoured by zpl.tools

Set to M to let E: map to more than one device.

Default
absent, so E: maps to a single device
Invalid value
not documented, and we have not measured it. The guide does not state what any value except M does, and the parser discards the argument.
Test coverage
No documented value is exercised by a test (M).
M
E: maps to more than one device

Behavior

The command reassigns the four letters as a set, and the set must stay a permutation. When two or more arguments name the same device, the guide states that all four designators take their default values. The command does not partly apply. Labelary resets and reports Device aliases were reset because multiple devices were mapped to the same alias. An omitted argument keeps its own letter before that test runs, so the short ^CMB,R collides on R and resets as well.

The new mapping applies to every later command that names a memory location: ~DG, ^XG, ^ID, ^JB, ^TO and ^CW. It takes effect from the next command onwards, so a format must send ^CM before the recall it affects, and it survives ^XZ into the formats that follow.

On a printer the mapping lives in RAM, and the guide recommends ^JUS after ^CM to write it to EEPROM. Without that write, the next power cycle loses it. The distinction does not arise against a rendering service, because nothing survives the request either way.

The renderer keys its object store by the device letter, the object name and the extension together, so a remap changes which object a later recall finds, as it does on Labelary. The fifth M argument that newer firmware documents is not read.

Tested behavior

Differences from the specification

Labelary against the ZPL II guide

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

  • Labelary documents a fifth argument, the M multiple-device flag. The 2006 guide's format line is ^CMa,b,c,d. That format line has no fifth argument. Labelary follows newer firmware. The guide does not follow that firmware. — not pinned by a test
  • The guide lists NONE among the accepted values for each of the four letters. Labelary's reference lists only B, E, R and A. We measured this on 2026-07-30. ^CMNONE,E,R,A left B: reachable on Labelary. Labelary either does not implement NONE or made the whole command invalid. — not pinned by a test
  • The guide reads ^CMa,b,c,d as the new alias each device receives, in the order B:, E:, R:, A:. Labelary reads it the other way round: parameter a names the device the letter B reaches from then on, b the device E reaches, and so on. The two readings agree on the guide's own example ^CMB,R,E,A, which is its own inverse. We measured this on 2026-08-19 with two asymmetric permutations. Under ^CMR,B,E,A, a graphic stored on R: is recalled as B:, which is Labelary's reading; the guide's reading would recall it as E:. We follow Labelary. — pinned by test_cm_command

Example

Store a graphic on R:, give the R: device the letter E:, then recall it under the new letter. Both formats belong in one request, because the object store only lives as long as the request does:

^XA
~DGR:TEST.GRF,32,2,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
^XZ
^XA
^CMB,R,E,A
^FO50,50^XGE:TEST.GRF,4,4^FS
^FO200,50^A0N,40,40^FDremapped^FS
^XZ

Open in viewer