DPL Command Reference
All 25 Datamax Programming Language commands — grouped by category with syntax, parameters, and examples.
System Commands
<STX>LSupportedBegins a label formatting block. All label commands and format records must appear between <STX>L and the terminating E command. Think of it as opening a new document — everything you draw goes inside this block.
<STX>cSupportedSets the label length in dots for continuous media. This tells the printer how far to feed between labels when no gap or mark sensor is used. At 203 DPI, 203 dots equals roughly 1 inch.
<STX>mSupportedSwitches the printer to metric mode. Subsequent dimension commands that accept units will interpret values in millimetres rather than inches.
<STX>nSupportedSwitches the printer to imperial mode. Subsequent dimension commands will interpret values in inches. This is the default mode on most Datamax printers.
<STX>ESupportedPrints the specified number of copies of the last stored label format. This lets you reprint without resending the entire label data.
<STX>GSupportedReprints the last label that was sent to the printer. A quick way to get another copy without resending data.
<STX>FSupportedAdvances the media to the next label position without printing. The printer uses gap or mark detection to find the next label boundary.
<STX>SSupportedSets the print speed. The value is a single character representing the speed level: A (slowest) through F or higher depending on the printer model. Slower speeds generally produce better print quality.
<STX>ZUnsupportedPrints a configuration label showing the current printer settings, firmware version, memory status, and other diagnostic information.
Label Commands
DSupportedSets the width and height multiplier for the dot size of subsequent format records. D11 is the default (1x1). D22 doubles both dimensions. This affects all format records that follow until changed.
HSupportedSets the printhead heat level (darkness/density). Values range from 00 to 30, where higher values produce darker output. Start around 07-10 and adjust based on print quality and barcode scan results.
PSupportedSets the print speed within a label block. This overrides the system-level speed setting for the current label. Values are single characters from A to F.
QSupportedSets the number of copies to print for the current label. The value is a 4-digit zero-padded number. Q0001 prints one copy; Q0100 prints one hundred.
CSupportedSets a horizontal (column) offset in dots for the entire label. All format record column positions are shifted by this amount. Use it to adjust horizontal alignment without changing every format record.
RSupportedSets a vertical (row) offset in dots for the entire label. All format record row positions are shifted by this amount. Use it to adjust vertical alignment without changing every format record.
MUnsupportedSets the mirror mode for the label. M0 disables mirroring (default), M1 enables horizontal mirroring. Used when labels are applied to the inside of transparent packaging and read from the outside.
ESupportedEnds the label formatting block and triggers printing. This is the closing counterpart to <STX>L. When the printer encounters E, it prints the label using the quantity set by Q and exits label mode.
Text
Barcodes
Barcode A (Code 39)SupportedA barcode format record using Code 39 symbology. The format is the same 15-byte header as text, but the font/type field is set to A for Code 39. Code 39 supports uppercase letters, digits, and symbols (- . $ / + % space).
Barcode E (Code 128)SupportedA barcode format record using Code 128 symbology. Code 128 is the most versatile 1D barcode, supporting the full ASCII character set. It produces compact barcodes and is widely used in shipping and logistics.
Barcode F (EAN-13)SupportedA barcode format record using EAN-13 symbology. EAN-13 is the standard barcode for retail products worldwide (the 13-digit number under the barcode on most products). Data must be exactly 12 digits; the check digit is calculated automatically.
Graphics
Line (X...L/l)SupportedDraws a horizontal or vertical line on the label. Use the X type field with L (horizontal) or l (vertical) as the first byte of the data field. The SSS field sets the line length and the data field starts with L or l followed by the line width in dots.
Box (X...B/b)SupportedDraws a rectangular box (outline) on the label. Use the X type field with B (box with specified width and height) as the first byte of the data. The data encodes the box width, height, and line thickness.
Configuration
<STX>KUnsupportedSets various printer configuration options. The character after K selects the specific setting. Common subcommands include Kf (label format), Kc (continuous length), Km (metric), etc.
<STX>OUnsupportedSets hardware options and peripheral settings. Subcommands control cutter, peel mode, present distance, and other optional accessories.
Try these commands live
The DPL Playground lets you write DPL and see labels render in real time — with syntax highlighting, autocomplete, and the full command reference built in.