Programming
42
TTPM3 Printer/Encoder–Technical Manual
0705
4.6.8 Magnetic encoding- and decoding-related commands
Track number and type of encoding (ISO standard or hexadecimal bit-by-bit) is
determined by the encoding command used as specified below:
ENCODING
Syntax
<command><message>
↵
!M 12345
↵
Encodes 12345 on track 2
Track
Encoding
method
Commands
Encoding Reading Characters
ISO
!J
!D 1
79 ASCII alpha
Track 1
210 bpi
Binary
!B 1
!O 1
480 bits (120 hex)
ISO
!M
!D
2
37 ASCII digits
Track 2
75 bpi
Binary
!B
2
!O
2
200 bits (50 hex)
ISO
!I
!D 3
117 ASCII digits
Track 3
210 bpi
Binary
!B 3
!O 3
480 bits (120 hex)
NOTE!
— With HiCo encoding, only one track at a time can be used for encoding or
reading. In this case, code first track with | or $ in the magnetic string to return
the ticket to active position after coding, then reset the printer with !C, and
code the other track and print the ticket.
!B
21 42
Hex
33 66
Decimal
Encode Binary data
Encodes binary data to the specified track
The bit order specified with parameters 19 to 21
When using binary data you are in total control over the encoded data. Data is sent to the
printer as hex nibbles. You have to specify leading synchronization zeroes, start sentinel
and stop sentinel yourself.
– Leading zeroes are used by the readers to determine swiping speed. The first
7 mm of the tickets should contain leading zeroes.
– The start sentinel identifies the beginning of data.
– The stop sentinel identifies the end of data.
– Trailing zeroes are used as leading zeroes if the ticket is swiped backwards.
These are added automatically by the printer, so
do not
add those to the string.
Example:
!B 1 000000000000000FF1234567890ABCDEF99<CR><LF>
In the above example we have 15 leading zeroes, FF as a start sentinel and 99 as stop
sentinel.