Error codes and Status reporting
0705
TTPM3 Printer/Encoder–Technical Manual
65
7
ERROR CODES AND STATUS REPORTING
The host computer uses the TTPM3 status reporting to determine if the print cycle has
been completed or not. If not, error codes help determine what went wrong.
7.1 Status
When executing the print command
!P
, the printer confirms that the magnetic code is has
been written and verified by sending an ”
ACK
” (06H) to the host. This indicates that the
ticket in almost ready and should just pass the printhead and be outputted to the
customer. You can extend the acknowledge procedure to send acknowledge for other
things than magnetic encoding. See command
!C A
.
If you select a character by setting parameter 31, that character will be sent when the
when the print cycle is completed, which is when the ticket leaves the printhead. At this
stage you can be reasonably certain that the ticket has been correctly issued, and you
can proceed with the next ticket.
You can at any time
1
read the sensors in the printer with the “
ENQ
” (05H), and
!S
commands. See page 30.
7.2 Security additions
Status reporting is used as a security measure to ensure that no manipulation has
occurred that makes it possible to issue more tickets than intended.
1. If “Auto Clear at Startup” is enabled (parameter 8) the printer it looks for any
unfinished ticket, voids it, and then issues an
NAK G
error code to inform about this.
2. If “Character sent after print” is selected (parameter 31) the printer issues that
character, for example
ETX
(03H), to tell that the print cycle has been completed.
3. A transaction string can be appended to the ticket data using the
!Q
command. The
string is stored in nonvolatile memory when the 03H is issued. This string can be read
by the
!V
command, but there is no way to change the string other than issuing a
new ticket.
4. During printing, a byte-counter is incremented and stored in the RAM. The counter
starts at zero, and when the ticket is ready the counter has reached 5BE0h, which is
23520.
Dividing the byte counter value by the number of pixels on a line (384) gives the
current pixel line. When the ticket is completed, we have printed
61.25
384
23520
=
bytes of pixel lines in the y-direction. 61.25 x 8 = 490 pixel lines. You have 5.7 pixel
lines/mm.
6
8
5.7
490
=
mm which is one ticket length.
Should a power failure occur, before the counter reaches the full value (5BE0h) you
can analyze the counter value to see if the ticket was as ready enough to pass as a
1
After a power off, the printer must first receive a !C or !P before answering status queries.