zpl.tools
Bar Code Commands

^BX - Data Matrix Bar Code

Creates Data Matrix 2D barcode

^BX - Data Matrix Bar Code

Overview

The ^BX command creates a Data Matrix barcode, a 2D matrix code similar to QR codes but with a rectangular format and different error correction approach.

Syntax

^BXo,h,s,c,r,f,e

Parameters

  • o = Orientation
    • N = Normal (0°)
    • R = Rotated 90° clockwise
    • I = Inverted 180°
    • B = Bottom up (270°)
  • h = Height of individual module (dots)
  • s = Quality level
    • 0-200 (higher = better quality)
  • c = Columns (width)
  • r = Rows (height)
  • f = Format ID
    • 0-3 (encoding format)
  • e = Escape sequence character (optional)

Description

  • 2D matrix barcode format
  • Rectangular shape (can be very small)
  • High data density
  • Excellent for small labels
  • Used in aerospace and manufacturing

Usage Notes

  • More compact than QR codes
  • Height parameter sets module size
  • Quality level affects error correction
  • Can store up to 3,116 bytes
  • Popular in industrial applications

Example

^XA ^FO50,50 ^BXN,5,200 ^FD123456789012^FS ^XZ

Module Size Reference

HeightSizeUsage
2-3Very smallDense labels
4-6SmallStandard
8-10MediumLarge items
12+LargeDistant scanning

Quality Levels

LevelError CorrectionUsage
0-50LowClean environments
51-100MediumStandard conditions
101-200HighHarsh/dirty environments

Common Applications

  • Aerospace parts tracking
  • Pharmaceutical serialization
  • Small object labeling
  • Compact inventory codes
  • Package tracking

Compared to QR Code

FeatureData MatrixQR Code
ShapeRectangularSquare
DensityHigherGood
SizeSmallerLarger
Error CorrectionReed-SolomonHamming/RS
IndustryIndustrialConsumer
  • ^BQ - QR Code
  • ^BC - Code 128
  • ^BY - Change Narrow Bar Width

See Also