Programming the LabelWriter Printer
To allow for longer distances to be specified, two 8-bit characters are used to specify the
value, by combining them into one 16-bit character. Though the calculations are all
performed within the printer itself, it is important to understand how the characters are
handled.
The decimal value of the first character that is sent (usually noted as n1) is multiplied by
256. The decimal value of the second character sent (usually noted as n2) is then added to
this.
The following illustration is a graphical representation of how this works.
To send a value under 256 to a command that takes the n1 n2 parameters, simply send the
first character with a 0 value. For values greater than 256 but less than 512, the first
parameter should be sent with a value of 1. For values greater than 512 but less than 768,
the first parameter should be set to 2, and so on.
Conversions
Converting from dots to inches using the n1 n2 parameters can seem a bit challenging at
first, but is really no more complex than multiplication and division. The table below lists
some common values and their relationship.
Inches Dots n1 n2
0.5 101 0 101
1.0 203 0 203
1.5 304 1 48
2.0 406 1 150
2.5 507 1 251
3.0 609 2 97
3.5 710 2 198
4.0 812 3 44
To convert from a value shown in the Dots column, convert the Dots value to binary, and
then convert the top eight bits to base 10 for n1 and the bottom eight bits to decimal for n2.
For example:
7