Plain English

Prints a DataMatrix code — a compact 2D barcode popular in manufacturing, electronics, and healthcare. It's smaller than QR for the same data, making it ideal for marking small items like electronic components or medicine vials.

When to use

For marking small items, direct part marking, and applications where space is very limited. Common in electronics, pharmaceutical, and aerospace industries.

Syntax

ESC+2D50,params,data

Parameters

ParameterDescription
sizeModule size in dots
colsNumber of columns (0=auto)
rowsNumber of rows (0=auto)
dataThe data to encode

Example

ESC+A
ESC+H0100
ESC+V0050
ESC+2D50,04,00,00,00,SN12345-ABC
ESC+Q1
ESC+Z

DataMatrix code encoding a serial number

Try it in the playground View all SBPL commands