zpl.tools
Memory and storage

^JB - Initialize Flash Memory

Reformats one flash storage device, discarding every graphic, font and format stored on it.

^JB reformats one of the printer's flash devices. It is not a delete: it takes no object name and keeps nothing, so everything on the named device goes. ^ID removes a single object. ~JB shares the mnemonic and is a different command: it takes no argument and always targets B:.

Syntax

^JBa

Support

Supportedparsed: full · state: full · rendered: full

Every documented parameter renders the same output Labelary produces.

The renderer erases every object held on the named device, at the point the command stands rather than at ^XZ. The device argument is a letter and is resolved through ^CM. Only A, B and E are accepted, so ^JBR erases nothing even when the letter R names a flash device, and the letter is case-sensitive. A value longer than one character is trimmed to its first, which then erases. Measured against Labelary on 2026-08-19. — not pinned by a test

Labelary renders this command.

Parameters

aDevicerequired · one of a set

Which flash device to reformat.

Invalid value
enough to make the whole command be ignored. The guide only says that the format must name a device. Measured against Labelary on 2026-08-19: a bare ^JB answers Command was ignored because device was not specified, a letter outside A, B and E answers Device 'Z' is not a valid flash memory device (A/B/E), and a value of more than one character answers Value 'EB' is too long and was trimmed to one character before erasing the device its first character names. A rejected letter erases nothing and selects no device by default.
Test coverage
Values exercised: E. Not exercised: A, B. The invalid-value rule is pinned by 2 tests.
A
CompactFlash card
B
PCMCIA card
E
Internal flash memory

Behavior

The erase covers only the device that the letter names. Labelary removed a graphic stored on E: for ^JBE, and left one stored on B: untouched (measured 2026-08-19). A letter outside A, B and E erases nothing and is reported as Device 'Z' is not a valid flash memory device (A/B/E). The letter is case-sensitive, so ^JBe is rejected as well. No letter at all erases nothing either, and is reported as Command was ignored because device was not specified. A value longer than one character is trimmed to its first, reported as Value 'EB' is too long and was trimmed to one character, and the trimmed letter then erases. The guide says only that the format must name a device.

The erase happens where the command stands, not at ^XZ. In one format, a recall written before the ^JBE still draws and a recall written after it draws nothing.

After a ^CM remap, ^JB follows the new letters like every other command that names a memory location. It formats the device the letter now points at.

On a printer the reformat takes several minutes. The printer can stop its response during that time, and an operator must not power-cycle it. ^JB is therefore a maintenance command rather than part of a print job.

The store is per request in any case. An object that ~DG downloads is gone when the request ends, whether or not a command reformats the device.

Differences from the specification

Example

Three formats in one request: store a graphic on E:, reformat E:, then try to recall it:

^XA
~DGE:TEST.GRF,32,2,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
^XZ
^XA
^JBE
^XZ
^XA
^FO50,50^XGE:TEST.GRF,4,4^FS
^FO200,50^A0N,40,40^FDafter JB^FS
^XZ

Open in viewer