Skip to command documentation
Supportedbarcoderastersession scope
^BY

Bar Code Field Default

^BY configures bar Code Field Default. It applies to the printer session and subsequent formats and can change pixels in the rendered label.

Syntax
^BYw,r,h
w

Module width (in dots)

Sets module width (in dots). It can be omitted when the documented default is suitable.

Range
1–10
Required
No
Documented values2110

w variations

Compare values side by side; other parameters remain at representative defaults.

Side-by-side comparison3 variations

w = 2

Uses 2 for module width (in dots) while the other command values stay at representative defaults.

ZPLcaret-by-w-1.zpl
^XA
^PW640
^LL360
^BY2,2.5,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

w = 3

Uses 3 for module width (in dots) while the other command values stay at representative defaults.

ZPLcaret-by-w-2.zpl
^XA
^PW640
^LL360
^BY3,2.5,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

w = 4

Uses 4 for module width (in dots) while the other command values stay at representative defaults.

ZPLcaret-by-w-3.zpl
^XA
^PW640
^LL360
^BY4,2.5,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser
r

Wide bar to narrow bar width ratio

Sets wide bar to narrow bar width ratio. It can be omitted when the documented default is suitable.

Default
3
Range
2–3
Required
No
Documented values32.03.0

r variations

Compare values side by side; other parameters remain at representative defaults.

Side-by-side comparison3 variations

r = 2

Uses 2 for wide bar to narrow bar width ratio while the other command values stay at representative defaults.

ZPLcaret-by-r-1.zpl
^XA
^PW640
^LL360
^BY2,2,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

r = 2.5

Uses 2.5 for wide bar to narrow bar width ratio while the other command values stay at representative defaults.

ZPLcaret-by-r-2.zpl
^XA
^PW640
^LL360
^BY2,2.5,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

r = 3

Uses 3 for wide bar to narrow bar width ratio while the other command values stay at representative defaults.

ZPLcaret-by-r-3.zpl
^XA
^PW640
^LL360
^BY2,3,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser
h

Bar code height (in dots)

Sets bar code height (in dots). It can be omitted when the documented default is suitable.

Required
No
Documented values10

h variations

Compare values side by side; other parameters remain at representative defaults.

Side-by-side comparison3 variations

h = 60

Uses 60 for bar code height (in dots) while the other command values stay at representative defaults.

ZPLcaret-by-h-1.zpl
^XA
^PW640
^LL360
^BY2,2.5,60
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

h = 100

Uses 100 for bar code height (in dots) while the other command values stay at representative defaults.

ZPLcaret-by-h-2.zpl
^XA
^PW640
^LL360
^BY2,2.5,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

h = 140

Uses 140 for bar code height (in dots) while the other command values stay at representative defaults.

ZPLcaret-by-h-3.zpl
^XA
^PW640
^LL360
^BY2,2.5,140
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

Primary source

Official Zebra reference

Use the manufacturer reference for printer- and firmware-specific behavior beyond ZPLr’s pinned rendering profile.

Open Zebra documentation