^BYBar 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.
A representative output
This compact example is selected because the visible result clearly demonstrates ^BY.
Recommended rendered sample
Uses ^BY in a compact label where its visible effect is easy to inspect.
^XA
^PW520
^LL210
^BY3,2,100
^FO45,28^BCN,100,Y,N,N^FDABC123^FS
^XZwModule width (in dots)
Sets module width (in dots). It can be omitted when the documented default is suitable.
- Range
1–10- Required
- No
2110w variations
Compare values side by side; other parameters remain at representative defaults.
w = 2
Uses 2 for module width (in dots) while the other command values stay at representative defaults.
^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
^XZw = 3
Uses 3 for module width (in dots) while the other command values stay at representative defaults.
^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
^XZw = 4
Uses 4 for module width (in dots) while the other command values stay at representative defaults.
^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
^XZrWide 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
32.03.0r variations
Compare values side by side; other parameters remain at representative defaults.
r = 2
Uses 2 for wide bar to narrow bar width ratio while the other command values stay at representative defaults.
^XA
^PW640
^LL360
^BY2,2,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZr = 2.5
Uses 2.5 for wide bar to narrow bar width ratio while the other command values stay at representative defaults.
^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
^XZr = 3
Uses 3 for wide bar to narrow bar width ratio while the other command values stay at representative defaults.
^XA
^PW640
^LL360
^BY2,3,100
^FO100,65^BCN,,Y,N,N^FDABC123^FS
^FO28,318^A0N,22,22^FDCaret BY parameter example^FS
^XZhBar code height (in dots)
Sets bar code height (in dots). It can be omitted when the documented default is suitable.
- Required
- No
10h variations
Compare values side by side; other parameters remain at representative defaults.
h = 60
Uses 60 for bar code height (in dots) while the other command values stay at representative defaults.
^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
^XZh = 100
Uses 100 for bar code height (in dots) while the other command values stay at representative defaults.
^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
^XZh = 140
Uses 140 for bar code height (in dots) while the other command values stay at representative defaults.
^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
^XZPrimary source
Official Zebra reference
Use the manufacturer reference for printer- and firmware-specific behavior beyond ZPLr’s pinned rendering profile.