16-Bit Character Parameters; Conversions; Table 8. Conversion From Dots To Inches - Ithaca Epic 950 Integration Manual

Table of Contents

Advertisement

Programming for the Epic 950

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:
In other words, the dec imal 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
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0

Table 8. Conversion from Dots to Inches

Page 58
Value = (n1 * 256) + n2
Dots
101
203
304
406
507
609
710
812
Rev G
Epic 950 OEM Integration Manual
n1
0
0
1
1
1
2
2
3
n2
101
203
48
150
251
97
198
44
95-05245

Advertisement

Table of Contents
loading

Table of Contents