^BK ANSI Codabar Bar Code
Prints an ANSI Codabar barcode (also called NW-7) of digits and a few control characters, with a chosen start and stop character.
^BKo,e,h,f,g,k,l
^BK parameters
| Parameter | Meaning | Accepted values | Default |
|---|---|---|---|
oorientationp. 118 |
Direction in which the barcode is rotated. |
|
The current |
echeck digitp. 118 |
Check digit setting; the guide gives only a fixed value and no description of its effect. The guide lists N as a fixed value, not as a choice. |
|
N
|
hbar code height (in dots)p. 118 |
Height of the bars in dots. |
|
The height set by |
fprint interpretation linep. 118 |
Whether the human-readable text of the data is printed with the barcode. |
|
Y
|
gprint interpretation line above codep. 118 |
Whether the interpretation line is printed above the barcode instead of below it. The printed value list shows Y twice (as 'Y = no' and 'Y = yes'); the first is read as N. |
|
N
|
kdesignates a start characterp. 118 |
The character the code starts with. |
|
A
|
ldesignates stop characterp. 119 |
The character the code stops with. |
|
A
|
^BK notes and gotchas
-
Interaction
Field data is limited by
p. 190^FDto 3072 bytes and cannot contain the command prefix characters ^ and ~ directly. -
Note
The guide names uses such as libraries, the medical industry and overnight package delivery companies. It lists the other names of the code as USD-4, NW-7 and 2 of 7, and says it was first developed for retail price labeling.
p. 118 -
Note
Each character is made of seven elements, four bars and three spaces. The code has two character sets, numeric and control (start and stop) characters. The illustration on page 119 shows the digits 0 to 9, the control characters - : . $ / +, and the start/stop characters A, B, C and D.
pp. 118, 119 -
Note
The print ratio can be 2.0:1 to 3.0:1, so the ratio from
pp. 118, 148, 1588^BYapplies. The field data is limited to the width of the label, or its length if rotated. -
Note
In the guide's example the field data holds only digits, with A as both start and stop character, and the printed interpretation line in the illustration shows A before and after the digits. The entry text does not say whether the start and stop characters are written in the field data.
p. 119 -
Guide issue
The g parameter's value list is printed 'Y = no, Y = yes'. Both entries show Y; the record reads the first as N, as in the other barcode commands, and keeps the default N.
p. 118
^BK example
^XA ^FO40,40^BKN,N,80,Y,N,C,D^FD40291^FS ^XZ
An ANSI Codabar barcode of the digits 40291, not rotated and 80 dots high, interpretation line below the code, with C as the start character and D as the stop character. The e parameter takes its only value, N.
Guides that use ^BK
BarcoderX is a .NET SDK for thermal labels and barcodes. See the barcode types it covers.
Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 118, 119, 148, 190, 201, 1587, 1588.
Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.
ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.