Programmingthe LabelWriter Printer
To allow for longer distances to be specified, two 8-bi t charactersare used to spe cifyt he
value, by combini ng them into o ne 16-bit character. Thou gh the calculat ions are all
performed within the printer itself, it is impo rtant to understand how th e characters are
handled.
The decimal value of the first character that is sent (usually noted a sn1 ) is multiplied b y
256. The decimal v alue of the secon d character sent (usually noted as n2) is then added to
this.
The following illustration is a graphical representation of how this wo rks.
To send a value under 256 t o 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 l essth an 768,
the first parameter should b e set to 2, and so on.
Conversions
Converting from dots to inches using t he n1 n2 parameters can seem a bit challenging at
first,b ut is really no more complex than multi plication and div ision. The table below list s
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 show n in the Dots col umn, convert the Dots v alue to binary, and
then convert th e top eight bits to base 1 0 for n1 and the b ottom eight b its to decimal for n 2.
For example:
7