Programming
38
TTPM3 Printer/Encoder–Technical Manual
0705
4.6.6 Printing
bar
codes
!F C
21 46 20 43 20 n1...n8
Hex
33 70 32 67 32 n1...n8 Decimal
Format bar code for printing
Bar code printing can be used as ticket data carrier instead of, or in addition to, magnetic
encoding.
NOTE!
– To produce sharp code bars, the TTPM3 printer automatically reduces
the print speed by approx. 50% when printing tickets with east and
west oriented bar codes. This speed reduction is only valid for bar
widths 1 and 2. Wider bar codes are printed at full speed.
Bar code data is treated as fixed data. You can however replace a bar code by overlaying
the previous data with new bar code data on the same X- and Y-coordinates. This way you
avoid deleting the complete ticket with a reset (!C) when you want to update the bar code.
The syntax for defining and downloading of bar code data is as follows:
!F C <orientation> <xpos> <ypos> <bar 1> <height> <bar 2> <type>_ <”bar code data”>
!F
Command to load print parameter information
C
Indicates bar code mode
<orientation> Indicates print orientation. Can be north (N), east (E), south (S), or west
(W).
xpos
Starting position (pixel) for the upper, left-hand corner of the first code bar
in the string. Automatically rounded off to be divisible by 8, (first bit in a
byte).
ypos
Starting position (pixel) for the upper, left-hand corner of the first code bar
Bar 1
Width in pixels of both black and white bars, range 1–16.
For EAN13 and EAN/Code 128 the value must be set to 1.
For Code 39 and Code 2-of-5 this sets the
wide bars
.
height
Code bar height in pixels
Value
1 = 16 pixels =
2. 7 mm
2 =
32 pixels =
5.3 mm
3 =
48 pixels =
etc.
4 =
64 pixels =
5 = 80 pixels =
…
16 = 256 pixels =
42.7 mm
Bar 2
Width in pixels of both black and white bars, range 1–16.
For EAN13 and EAN/Code 128 the wide/narrow ration is fixed and this sets
the width of the entire code.
For Code 39 and Code 2-of-5 this sets the
narrow bars
.