^BX — Data Matrix Bar Code (ECC 200)
Plain English
A 2D barcode that looks like a small square grid of dots — compact, error-correcting, scannable from any rotation. The modern Data Matrix standard (ECC 200) — what GS1 recommends for healthcare and regulated industries. Supports **structured append** (one logical payload split across up to 16 linked symbols) for very long data, and **fixed sizing** via `c`/`r` for layouts where the symbol must hit a specific footprint. (Note: `^BD` is UPS MaxiCode, a different barcode type — not an older Data Matrix.)
When to use
When you need a 2D barcode but space is limited — small component labels, PCB boards, medical devices, GS1 traceability. Set `c` and `r` together for fixed-size symbols (e.g. 18×18) when the label slot is rigid; leave both 0 for the printer to size automatically. Use structured append when the payload exceeds a single ECC 200 symbol's capacity.
Syntax
^BXo,h,s,c,r,f,g,a
Parameters
| Parameter | Description |
|---|---|
o | Orientation: N, R, I, B |
h | Dimensional height of individual symbol elements (1-dot floor) |
s | Quality level: 0, 50, 80, 100, 140, 200 (200 = ECC 200, recommended) |
c | Columns to encode: 9-49 (odd values for ECC 0-140, even for ECC 200). 0 = auto. |
r | Rows to encode: 9-49 (odd values for ECC 0-140, even for ECC 200). 0 = auto. |
f | Format ID: 1-6 (varies content type — controls ASCII subset and compaction) |
g | Escape sequence control character (single ASCII character, default ~) |
a | Aspect ratio: 1 (square, default) or 2 (rectangular) |
Example
^XA ^FO50,50^BXN,6,200,18,18^FD01034531200000111719112510ABCD1234^FS ^XZ
GS1 Data Matrix forced to 18×18 ECC 200 for a fixed label footprint. Drop `c`/`r` (or set both to 0) for auto-sizing.