Bar Code Commands
^BY - Change Narrow Bar Width
Sets default width and ratio for bar codes
^BY - Change Narrow Bar Width
Overview
The ^BY command sets the default narrow bar width and the ratio between narrow and wide bars for all subsequent barcode commands.
Syntax
^BYw,r,h
Parameters
- w = Narrow bar width in dots (module width)
- r = Wide:narrow ratio
- Typical: 2.0-4.0
- 2.0 = 1D codes with 2:1 ratio
- 3.0 = 1D codes with 3:1 ratio
- h = Default bar code height in dots
Description
- Affects all subsequent barcode commands
- Controls barcode size and proportions
- Applied until changed or format ends
- Impacts barcode readability
Usage Notes
- Set once at beginning for consistency
- Affects width and height of all following barcodes
- Typical narrow width: 2-4 dots
- Ratio determines bar thickness variation
- Persists through format
Example
^XA ^BY2,3,50 ^FO50,50 ^BCN,100,Y,N,N ^FDCode 128 with defaults^FS ^FO50,160 ^BCN,100,Y,N,N ^FDAnotherCode128^FS ^XZ
Module Width Reference
| Width | Density | Print Quality |
|---|---|---|
| 1-2 | Very High | Higher resolution needed |
| 2-3 | High | Good for small items |
| 3-4 | Medium | Standard (recommended) |
| 4-6 | Low | Large items/distance |
Ratio Reference
| Ratio | Type | Usage |
|---|---|---|
| 2.0 | Narrow bars | Small labels |
| 2.5 | Standard | Most applications |
| 3.0 | Wide bars | Large items |
| 4.0 | Very wide | Long distance |
Common Configurations
^BY2,3,50 # Small, ^BY3,2.5,60 # Standard barcode ^BY4,3,80 # Large barcode
Related Commands
^BC- Code 128^B3- Code 39^BQ- QR Code^BX- Data Matrix