Programming for the Epic 950 Epic 950 OEM Integration Manual
Page 58 Rev G 95-05245
16-bit Character Parameters
The maximum value a single 8-bit character can represent is 255. Some commands,
though, can take values that are greater than 255. The set horizontal starting position
command (ESC X), for example, specifies a distance (in dots) that the next text object
will print from the left margin. Because a dot is only 1/8 of a millimeter, a value of 255
would place the object only a little over 31 mm from the left margin. 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 done within the
Epic 950 Printer, it is important to understand how the characters are handled.
For two specified 8-bit parameter values n1 and n2, the resulting 16-bit value is
computed as follows:
Value = (n1 * 256) + n2
In other words, the decimal value of the first character that is sent (n1) is multiplied by
256, and then the decimal value of the second character sent (n2) is then added to this.
To send a value under 256 to a command that takes the n1 and n2 parameters, simply
send the first character with a 0 value. For values greater than 255 but less than 512, the
first parameter should be sent with a value of 1. For values greater than 511 but less
than 768, the first parameter should be set to 2, and so on.
Conversions
The table below lists some common values and their relationship for converting from
dots to inches using the n1 n2 parameters.
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
Table 8. Conversion from Dots to Inches