Swecoin TTPM3 Technical Manual

Publ. No.: 104860, Ed. AX, May 28, 2007
TTPM3 Printer/Encoder
Technical Manual
2
Acknowledgments
Adobe and Acrobat are trademarks of Adobe Systems Incorporated
Windows is a trademark of Microsoft Corporation
This is a publication of Swecoin AB Box 322, SE-192 30 SOLLENTUNA, Sweden
Phone +46 8 623 45 60
Fax +46 8 594 709 89
E-mail techsupport@swecoin.se sales@swecoin.se
Web site http://www.swecoin.se
© Swecoin AB 2005, 2006
All rights reserved. Reproduction in whole or in parts is prohibited without written consent of the copyright owner. We have taken great care to ensure that the information in this manual is correct and complete. However, if you discover any errors or omissions, or if you wish to make suggestions for improvements, you are welcome to send your comments to us. Swecoin AB disclaims any liability resulting from the use of this information and reserves the right to make changes without notice.
Edition AX, May 2007
Printed in Sweden
Introduction
0705 TTPM3 Printer/Encoder–Technical Manual 3
CONTENTS
1 Introduction...................................................................................................................5
1.1 Document printing ...........................................................................................5
1.2 Magnetic encoding ..........................................................................................5
1.3 Document handling .........................................................................................5
2 Installation.....................................................................................................................6
2.1 Installing a desktop printer ..............................................................................7
2.2 Installing an OEM printer mechanism ...........................................................10
3 Operation.....................................................................................................................12
3.1 Operator controls...........................................................................................12
3.2 Paper loading ................................................................................................12
3.3 Paper jam removal ........................................................................................14
3.4 Self test mode/ticket repeat mode.................................................................15
3.5 Error handling................................................................................................15
3.6 Single-ticket handling ....................................................................................16
4 Programming ..............................................................................................................20
4.1 Syntax............................................................................................................20
4.2 Initialization after power OFF ........................................................................20
4.3 Printing and encoding capability overview ....................................................21
4.4 How the commands are described................................................................24
4.5 Summary of commands ................................................................................25
4.6 Command Reference ....................................................................................27
5 Ticket Examples..........................................................................................................52
Text attributes..........................................................................................................55
6 Default parameter settings ........................................................................................56
6.1 How the parameters are described...............................................................56
6.2 Summary of parameter settings ....................................................................57
6.3 Parameter Reference....................................................................................59
7 Error codes and Status reporting .............................................................................65
7.1 Status ............................................................................................................65
7.2 Security additions..........................................................................................65
7.3 Errors.............................................................................................................66
7.4 Extended acknowledgement .........................................................................67
8 Maintenance ................................................................................................................68
8.1 Fault finding...................................................................................................68
8.2 Cleaning the print head .................................................................................69
Introduction
4 TTPM3 Printer/Encoder–Technical Manual 0705
8.3 Firmware........................................................................................................69
9 Specifications .............................................................................................................70
9.1 Interface description......................................................................................70
9.2 Document stock.............................................................................................71
9.3 Firmware........................................................................................................76
10 Index.............................................................................................................................78
REGISTER NOW!
If you wish to stay informed of product changes, manual updates etc., you are welcome to subscribe to our bulletin service.
To register as a subscriber, either visit our web site http://www.swecoin.se to fill in your subscription request, or send e-mail to bulletins@swecoin.se. Enter the text Subscribe bulletins as the subject. Do not enter any text in the message area.
Registration date (for your own records):
REVISION HISTORY
Edition AX: Not yet issued working copy for Edition A
Introduction
0705 TTPM3 Printer/Encoder–Technical Manual 5
1 INTRODUCTION
This document describes installation and operation of TTPM3 Ticket Printer/Encoder, which creates credit-card-wide tickets with magnetic encoding and thermal printing.
1.1 Document printing
TTPM3 uses the direct thermal printing technique and can print the entire surface of the ticket with text, bar codes, or graphics, or any combination hereof. Text block position and orientation is software programmable as is the character size.
The data sent to the printer is converted to a ticket image which is stored in the unit until an ”All Clear” software command is sent, or the power is turned off/on.
1.2 Magnetic encoding
Three magnetic tracks can be encoded: Either with standard low coercivity recording, or optional “household-magnet proof” high coercivity recording.
ISO track version
1
: ISO track 1 at 210 BPI
ISO track 2 at 75 BPI (Bits-Per-Inch) ISO track 3 at 210 BPI
Center track version: 7 mm wide center track at 75 or 210 BPI
The TTPM3 can be used for encoding on one, two, or three tracks simultaneously.
Read-after-write is automatically performed.
You can also enter an already encoded ticket into the TTPM3 and read the magnetic stripe and output the data to the host computer.
See also “Magnetic encoding- and decoding-related commands” on page 42.
1.3 Document handling
TTPM3 printer has two rear inputs for ticket stock. Both can take continuous ticket stock like fanfold or roll ticket material. You can configure the printer so that one is used for continuous stock and the other is used for handfed tickets.
There is an optional front load mechanism that makes it possible to load single tickets through the ticket exit. This replaces the upper ticket entry at the rear of the printer. In addition to this, the front load has a wastebasket function for redirecting used or invalid tickets to a wastebasket, thus preventing useless tickets being presented to the customer.
You can select to partially eject the ticket so that the customer takes it from the frontload mechanism, or fully eject the ticket so that it falls into a tray. You can also select that a ticket should be redirected to a wastebasket as described above.
1
Encoding in ISO standard format, or in hexadecimal format (bit-by-bit), is software selectable.
Installation
6 TTPM3 Printer/Encoder–Technical Manual 0705
2 INSTALLATION
The TTPM3 comes as desktop printer, or as an OEM printer mechanism for kiosk applications.
Input 1 (lower)
Input 2 (upper)
Interface connector
Power switch
Power inlet (24V)
Ticket output
Control panel
Figure 1. Desktop printer
Control panel
Input 1 (lower)
Input 2 (upper)
Interface connector
Ticket output
Printhead-open lever
Power inlet (24V)
Figure 2. OEM printer mechanism
Installation
0705 TTPM3 Printer/Encoder–Technical Manual 7
2.1 Installing a desktop printer
1. Connect the cable from the power supply to the connector at the back of the printer.
2. Connect the power supply to a line outlet with safety ground. The ground potential should be the same as for the host computer. If ground potentials differ, use a short distance modem between the computer and the printer.
3. Connect a serial cable between the COM port of the host computer and the serial input of the TTPM3 printer. For pin assignment, see page 70.
4. Turn on the printer. The blue and green indicators should light up.
5. Press the front button. The green indicator starts flashing and the yellow indicator lights up, indicating “Out of Paper”.
6. Turn the tickets so that the magnetic stripe is on the left side facing downwards, as seen from the front of the printer.
7. Insert tickets in the lower document entry. The printer feeds the tickets forward and cuts and ejects one ticket.
The printer is ready for use.
2.1.1 Network option
If the printer is equipped with a network card only network interface should be used.
1. Open the cover
2. Insert the network cable in the hole at the rear of the cover.
3. Connect the cable to the TCP/IP connector at the rear of the network card.
4. Take out the configuration ticket that sits in the holster on the side of the network card.
5. Start a web browser and enter the IP address printed on the configuration card, for example http://192.168.0.52
Installation
8 TTPM3 Printer/Encoder–Technical Manual 0705
6. Now the server in the TTPM shows. Here you can set new address and print a new configuration card:
7. If you have problem finding the TTPM from your PC, please check that the PC uses the same third digit in the IP number as the printer does, for example: 192.168.0.52. If this digit differs, please temporarily change it to the same third digit as on the configuration card. Then connect to the printer and give the printer a new IP address that works in your network environment.
NOTE! – The serial connector on the back of the printer is used by the network card, so
you cannot run both interfaces at once.
2.1.2 Testing
If you want to test the printer through the network you can use the SwcSockTerm.exe utility program that allows you to send command scripts and binary files to the printer.
Installation
0705 TTPM3 Printer/Encoder–Technical Manual 9
2.1.3 Output tray or nozzle?
The output nozzle is used if the operator only prints one ticket at a time and should take the ticket from the printer.
The output tray collects the printed and coded tickets in a neat stack. Use the tray if you intend to print many tickets at a time.
1. If an output nozzle is fitted, press it out from behind and remove it
2. Loosen the two screws in the front a couple of turns
3. Hook the tray onto the screws and tighten them
4. Press tray downwards so it is securely fastened
SW97105 R3
Fit output nozzle
Hook tray onto Screws and tighten
OR
Figure 3. Installing an output tray or nozzle
Installation
10 TTPM3 Printer/Encoder–Technical Manual 0705
2.2 Installing an OEM printer mechanism
The TTPM3 OEM printer mechanism should be installed in some kind of enclosure such as a self-service kiosk.
Preventing ESD and earth currents from affecting the printer operation requires proper connection of the printer chassis to protective earth through a mounting platform or through a separate earth conductor.
Trouble free printer operation also requires the printer’s optical sensors to be shielded from ambient light.
Additional space is required for paper stock and handling. Consider mounting the printer on a movable platform so that the printer can be maintained outside the printer enclosure.
Figure 4. Dimension drawing for printer mechanism. All measurements are in mm
Installation
0705 TTPM3 Printer/Encoder–Technical Manual 11
With Swecoin power supplies, just connect the cable from the power supply to J5.
If you use another type of power supply unit, 24 V cables are available from Swecoin AB, order No. 01370-000.
Should you make cables of your own, connect the voltages according to the following illustration. Note that protective ground and minus output should
not
be interconnected in the power supply. At the printer end of the cable, use an AMP Mate-N-Lok connector housing and two contact-sockets:
Housing: AMP No. 350777-1
GND
+24 V
Socket: AMP No. 350689-1
Figure 5. Power connection
Mode
Idle
150 mA
Standard text printing
2 A average
Peak current
6 A
Table 1. Current consumption
NOTE! – The 24 V ground, as well as the chassis of the printer, must be connected to
ground potential (safety ground).
After fastening the printer, proceed with the installation instructions for desktop printer on page 6.
Operation
12 TTPM3 Printer/Encoder–Technical Manual 0705
3 OPERATION
3.1 Operator controls
On/Off
Error
Out of Tickets
Ready
Clear Jam
Eject Ticket
Feed Ticket
!
Green indicator
Fixed:
Blinking:
Flickering:
Temporarily OFF:
Printer ready.
Insert ticket.
Receiving data.
Commands are executed.
Yellow Indicator
Fixed: Out of paper.
Blinking:
Print command received, but out of paper.
Red indicator
Error, turn OFF and ON the printer to clear.
Feed pushbutton
1.Cuts and ejects a ticket .
2. Press and hold at power ON to enter self test mode. Press again to encode and print one ticket. The printout shows current firmware version. Turn printer OFF and ON to exit self test mode.
Eject pushbutton
1. Ejects any document in the selected ticket track. (Same as when an !E command is received.)
2. Press and hold at power ON to run cleaning card through printer.
Clear pushbutton
Press and hold at power ON to turn on paper jam clearing mode. Press front button to advance ticket forward and middle button to retract ticket backwards. Turn printer OFF and ON to exit paper jam clearing mode.
Keyboard
1
2
Blue indicator
Lights when power is ON
Power ON/OFF button
Switches on or off the TTPM3
Figure 6. Indicators and pushbuttons
3.2 Paper loading
The yellow indicator indicates paper out.
Press the center button to eject remaining tickets if you want to replace paper stock before paper is out.
Operation
0705 TTPM3 Printer/Encoder–Technical Manual 13
3.2.1 Loading through rear document entries
Insert the ticket stock into the desired document entry. When the ticket is detected by the input sensor it will be pulled into the active position. Consecutive ticket stock is usually loaded in the lower document entry, and single tickets in the upper document entry.
If the printer is configured for two consecutive entries, you may also use fanfold tickets in the upper document entry.
Upper document entry
SW97113R2
Lower document entry
Magnetic stripe
Figure 7. Position of the magnetic stripe when loading paper
3.2.2 Paper stock positioning
The ticket stock should be oriented with the magnetic stripe down to the left as seen from the front of the TTPM3. It is good practice to place the pile of fanfold tickets at a distance of at least one ticket length behind, and straight out from the printer.
SW97116R2
90°
Figure 8. Positioning the ticket stock
Operation
14 TTPM3 Printer/Encoder–Technical Manual 0705
3.2.3 Loading through front document entry (optional)
An
!L3
command must be sent to the printer to prepare it for front loading. When this command has been received and the input sensor detects a ticket being inserted into the document exit, it will be pulled into the active position of the upper rear document entry. For the magnetic stripe to be readable, the ticket must be inserted with the stripe facing down to the left, as seen from the front of the printer.
Magnetic stripe
FL
Figure 9. Position of the magnetic stripe at front load
3.3 Paper jam removal
Open the cover to locate and remove the ticket that is stuck in the mechanism. Use the following procedure:
3.3.1 Select paper jam clearing mode
1. Power OFF.
2. Push and hold the “Clear Jam” pushbutton while turning ON the power. The red
indicator shows a steady light to indicate paper jam clearing mode.
3.3.2 Tickets stuck in input module
Press and hold the “Eject Ticket” push button to feed the ticket towards the rear of the unit.
3.3.3 Tickets stuck in output module
Press and hold the “Feed Ticket” push button to feed the ticket towards the front of the unit.
3.3.4 Exit paper jam clearing mode
Power OFF and back ON again, the TTPM2 is operational but any ticket information previously sent to the unit is lost.
You can also power OFF the printer and turn the feed rolls manually to remove the blocking ticket.
Operation
0705 TTPM3 Printer/Encoder–Technical Manual 15
3.4 Self test mode/ticket repeat mode
3.4.1 Self test
1. Press and hold the front pushbutton at power ON to enter self-test mode.
2. Press again to encode and print one ticket. The printout shows current firmware
version.
3. Turn printer OFF and ON to exit self-test mode.
3.4.2 Repeat fixed print
1. Start self-test mode as described above.
2. Download the ticket data to the printer, and print one ticket. The data must only
contain fixed text, fixed encoding data, and graphics.
3. Press the front button once and an exact copy of the first ticket will be printed. This will
be repeated each time that the front button is pressed.
4. Turn printer OFF and ON to return to normal operation.
NOTE! — Do not hold the front button depressed!
Doing so will result in erroneously cut tickets often resulting in paper jam.
NOTE! — Repeating fixed print only works on printers where the auto clear function is
OFF. Auto clear is enabled / disabled with a parameter setting.
3.5 Error handling
The blue and green indicators lights up at power ON. If they fail to light up, switch the TTPM3 OFF and ON again. If the indicators are still OFF, check your power connection both in the TTPM3 and in the wall outlet. Also check your main power supply fuse.
3.5.1 TTPM3 start-up
The TTPM3 has Flash memory where the firmware and parameter settings are stored. All print field definitions are stored in RAM and disappears when the printer power is switched OFF.
POWER FAILURE CLEANUP
If “Clear ticket path at startup” is enabled (parameter 8), TTPM3 tries to find out if a ticket is in the ticket path at any other location than at the top of form position at power ON. If it finds a ticket, it destroys the magnetic encoding, prints VOID on it and outputs the ticket. If the printer is equipped with a front load 3 unit, the ticket is redirected to the waste bin.
START-UP SYNCHRONIZATION
To enable the TTPM3 to synchronize itself to the incoming data after power up, either after a usual power ON, or after a power failure, the printer has to receive either a !C command that it will execute, or a !P command that it will ignore.
Operation
16 TTPM3 Printer/Encoder–Technical Manual 0705
Using the !C command to initiate the TTPM3 clears all data that has previously been stored. To avoid having data cleared, the !P command can be used, for example, to retain document data stored in the TTPM3 prior to a power failure or power OFF.
NOTE! – Please remember that the TTPM3 has to receive either the !C or !P command,
after power up. All other commands and data will be ignored until !C or !P has been received.
3.5.2 Normal operation
Different error types can show up during processing. The most common is that the TTPM3 is out of paper. All errors encountered by the printer, and requiring operator assistance, are indicated with a signal from an indicator on top of the printer. The operator then has to follow a specific procedure depending on the type of error that caused the stop. The procedures are as follows:
• Yellow indicator lights up
Indicates “No paper” in the selected paper entry. Insert new paper supply or new ­single ticket. The document will be automatically loaded to active position.
• Yellow indicator ON and green indicator ON or flashing.
No paper in the selected paper entry. Data string and print command have been received. Insert paper into the selected paper entry.
• Red indicator lights up
Indicates unsuccessful read-after-write. The TTPM3 makes a second attempt to encode and read the ticket. During that attempt the red indicator will go out. For each unsuccessful attempt, the red indicator lights up again. If a single-ticket operation is in progress, the red indicator stays ON until a new ticket is inserted and successfully processed. Also refer to the previously described procedures regarding the yellow and green indicators.
• Red indicator is ON
If the Red indicator stays ON, even though ticket stock is present in the selected entry station, this indicates that the paper path in the TTPM3 has been blocked. Follow the description on the next page to remove blockage.
NOTE! – No data is lost in the process of detecting and acting on errors as long as the
printer is not switched OFF.
3.6 Single-ticket handling
3.6.1 Overview
The TTPM3 comes with one of two different single-ticket handling systems: upper rear entry load (standard), and front load (optional). In both cases, the upper document entry of the printer is used for the single-tickets.
This means that single-ticket processing restricts the use of fanfold ticket stock to the lower entry.
Operation
0705 TTPM3 Printer/Encoder–Technical Manual 17
Active position, upper track
Standby position, upper track
Active position, lower track
Input module
Standby position, lower track
Write headRead headWaste bin ticket exit
Magnetic encoder/decoder
Printer
Front load ticket entry/exit
Cutter
SW9710 4A
REAR
FRONT
Figure 10. Active and standby ticket position
PREVIOUSLY ENCODED TICKETS
One use of the single ticket handling is to process a ticket several times. For example, if you issue a return train ticket (Stockholm to Oslo and back to Stockholm) you can add print, and re-encode the magnetic stripe when the first part of the journey is made.
1. Use the applicable decode-command to read the previously encoded ticket
information.
2. The data is transmitted to the host computer, and the ticket is positioned in the active
position of the upper entry, ready for a new encoding and printing.
3. Printing and encoding is affected using the same commands as for processing a ticket
from a fan-fold ticket stock, and the ticket is ejected to the customer.
TIP!
To avoid printing on top of the existing print of a previously used ticket:
Include information in the magnetically encoded string, about which area of the ticket
has already been used for printing
Read the magnetic stripe and let the host computer position new text on free spaces
of the ticket.
Update the magnetic stripe with correct information about used areas if the ticket
should be used further.
3.6.2 Inserting a single ticket
In the standard TTPM3, inserting a single-ticket into the upper rear document entry, will trigger the single ticket loading process.
In front load printers, the application program must issue the command !L3 to trigger the single ticket loading. The yellow indicator on the printer will blink to indicate that the application program wants the operator to insert a single ticket. When a ticket is inserted, the loading process starts. To speed up ticket handling, the magnetic code of track two is
Operation
18 TTPM3 Printer/Encoder–Technical Manual 0705
read and placed in memory when loading the ticket from the front load option. !D will read track two data from memory without having to move the ticket.
The single ticket loading process will retract the fanfold ticket stock in the lower document entry to a standby position, and position the single ticket in the active position of the upper entry.
The subsequent command string automatically processes the operation on the single­ticket form.
3.6.3 Read and decode
The following read (and decode) commands apply for the single ticket in active position:
!DA
Reads and decodes all three tracks and sends the data separated by CR LF.
!D1 !D2 !D3
Read and decode the track indicated by the digit. With front load option, track 2 (or center track) is read and the data stored in memory when the ticket is entered through the front entry.
!D2
only reads the data from memory without moving the
ticket.
The read string is decoded and scanned for an end character (?). If found, the string is sent to the host computer in ASCII format. The start character is not included, but the stop character (?) and the checksum are transmitted. If no number is found, or if it does not comply with the ISO standard, a NAK+A is transmitted.
!O1 !O2 !O3
Read data from track 2 (or center track) and transmit data to host. No decoding takes place in the TTPM3. A one is transmitted as ASCII 1, and a zero as ASCII 0.
After reading the stripe, the ticket is automatically returned to active position waiting for either an eject-command for a command sequence for printing or encoding (or both) followed by
!P
for processing of that command string.
3.6.4 Encode and print
1. Encode a new or modified string on the magnetic stripe. Use any of the magnetic
encoding commands
!I, !J, !M
, or
!K #, !N, !K
depending on what tracks are
available in your printer, and what encoding you want. See page 42.
2. Format the new print using the
!F
command described on page 35.
3. Encode and print the ticket with the
!P
command.
The ticket will be ejected to the operator when correctly encoded and printed. In case of unsuccessful encoding, the single ticket is cancelled
1
and a new single-ticket form has to
be inserted into the applicable document entry. A blinking yellow indicator prompts this.
1
The number of encoding retries, as well as the text to be printed on cancelled tickets, can be set with the !F M command. See page 40. Cancelled tickets can be redirected to the optional front load waste bin by inserting an } or @ character in the string to be encoded on the stripe, see page 44.
Operation
0705 TTPM3 Printer/Encoder–Technical Manual 19
3.6.5 Ejecting the ticket
If you want to eject the ticket without modifying the encoding or adding new print after reading the magnetic stripe, use an applicable eject command:
!E
Ejects the ticket through the upper rear document entry.
!L4
Ejects the ticket through the front entry.
!L5
Ejects the ticket to the waste bin of the TTPM3 Front Load 3.
Programming
20 TTPM3 Printer/Encoder–Technical Manual 0705
4 PROGRAMMING
4.1 Syntax
A command string always starts with an exclamation mark (ASCII 33 or HEX 21)
serving as command identifier. The exclamation mark must be at the first position of the line, that is, directly after a CR LF. Otherwise it will not be recognizes as command identifier.
The characters immediately following the “!” (21H) form the actual command to the
printer. The command consists of 1–3 characters and is followed, when applicable, by a sub command, formatting commands, and data separated by space characters as shown in Figure 11.
Carriage Return and Line Feed end each command.
Command identifier
Command (1 to 3 characters)
Sub command Formatting commands
separated by spaces
Data enclosed in
quotation marks
Space character (ASCII 32 or HEX 20)
Only used with some commands
Graphical data starts directly without any quotation mark
and ends after the specified number of bytes
New line = CR LF
(ASCII 13 10
or HEX 0D 0A)
SW97119
1
1
1
2
2
1
Figure 11. Command syntax
4.2 Initialization after power OFF
To initialize the printer after power ON you just send a clear command (!C) and the printer is ready for use.
NOTE! – If no clear command has been received, the first !P after power ON initializes
the printer. No ticket is produced from the data sent before this !P.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 21
4.3 Printing and encoding capability overview
4.3.1 Text
It is possible to print text in four fonts, in four orientations, and in 16 different sizes.
4.3.2 Graphics
Bitmap graphics, such as logotypes, prints in the size and orientation in which they where downloaded. Graphics print on all following tickets until a “Clear all” command is received, so you only have to download graphics once.
Remember, when creating graphics for the TTPM3 printer, that the pixels are not square, but has a height/width ratio of 1.32:1 in normal mode and
0.88:1 in high resolution mode.
4.3.3 Bar codes
Bar code data fed to the printer are converted to an EAN13, EAN 128, Code39, Code 128, and code 2-of-5 interleaved bar code. The bar code prints on all subsequent tickets until a ”Clear all” command is received, or until new bar code data with the same coordinates and type is received.
4.3.4 Magnetic codes
Messages can be magnetically encoded on a stripe at the back of the ticket. The message can be between 37 and 107 characters long depending on the coding standard and density you select.
Figure 12. Font examples
Programming
22 TTPM3 Printer/Encoder–Technical Manual 0705
4.3.5 Positioning data on the ticket
Items to be printed are positioned by defining the X and Y coordinate of the upper left corner, and the orientation.
Print can overlap other print. You can for instance print text on top of graphics.
4.3.6 Triggering a printout
Putting text, graphics, bar and magnetic codes on the ticket as described above only builds an image of the ticket in the printer memory. To actually print something on a ticket, you must send a print command:
!P
Every received ”!P CR LF” prints one ticket. (If the printer is configured for dual consecutive entries, you must also send a select document entry command, see page
32.)
4.3.7 Command acknowledgment
Ticket issuing is automatically acknowledged by the TTPM3 by sending an ACK (06h) to the host computer after a successful read-after-write of the encoded magnetic information.
If no encoding command and data are sent to the TTPM3, the ACK is still sent (read­after-write verifies that no data is encoded).
Some other commands are also acknowledged; see “Error Codes and Status reporting” on page 65.
NOTE! – ACK/NAK must be enabled through parameter n5, see page 60.
SW95026A
X1
Y1
FEED
DIRECTION
X384
86 mm:Y500 (Y700 in high res mode)
110 mm: Y650 (Y900 in high res mode)
Printable width 51.07mm
North orientation at X=1, Y=1
East oriented text at X=384, Y=1
Frame
Figure 13. Coordinates on the ticket
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 23
4.3.8 Additional commands
In addition to the command that specifies the print, there are a number of other commands used for functions such as:
Clearing of the TTPM3 buffer
Selection of document entry
Decoding of documents
Generation of status requests
All applicable commands are listed in the following pages. Detailed descriptions of the software commands are given with syntax explanations as well as commented examples.
4.3.9 Ticket memory
The TTPM3 printer has 128k of RAM. This memory is used as input buffer and storage for the ticket image before being printed out. The memory is cleared at power off.
In normal resolution mode, the ticket image is 384x512 pixels for an 86 mm ticket, and 384x656 pixels for a 110mm ticket.
In high resolution mode, the ticket image is 384x727 pixels for an 86 mm ticket, and 384x935 pixels for a 110mm ticket.
NOTE! – Make sure not to print data outside this area when you use the !F command.
If you do, you write in parts of the memory that are used for other functions in the printer, and the result is totally unpredictable.
Programming
24 TTPM3 Printer/Encoder–Technical Manual 0705
4.4 How the commands are described
!B 1
21 42 20 31 Hex
Dec
Encode Binary Data on Track 1
Mnemonic
Hex representation of command
Decimal representation of command
Purpose of command
4.4.1 Mnemonic
Mnemonic is the popular command name that should be easy to remember.
4.4.2 Hex
Give the command in hex representation
4.4.3 Decimal
Give the command in decimal representation
4.4.4 Values
n1, n2, etc. represents values that you set with the commands. What you should enter here depends on what you want the command to do.
4.4.5 Examples
Command examples are formatted in
Courier
and typed in the same way as used in the
Swecoin TTP editor:
!P<CR><LF>
Where
<CR>
means the carriage return character 13 decimal (hex D). Numbers between
less-than and greater-than characters, for example
<001><019>
, means 1 and 19 decimal. When the numbers indicate a hex value, h is appended to the number (
<01h><13h>
).
EXAMPLE:
<065>, <65d>
,
<41h>
and A are four different ways of expressing the character A.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 25
4.5 Summary of commands
4.5.1 System commands
!C
Clear all 27
!C 1
Clear retract counter 30
!C A
Clear all and enable extended acknowledgement 22
!F A
Feed- acceleration and speed 31
!P
Encode and print document 27
!P @
Encode and print document, and eject it in wastebasket (FL3 printers) 27
!P E
Encode and print document, and eject it to tray (for FL3 printers) 27
!U
Firmware version query 29
!S
Status request 28
!S L
Status request, paper low
!S R
Power has been off? 29
ENQ
Status request immediate 30
CAN
General reset, equivalent to power OFF/ON (takes 20 s to execute)
!Q
Writes a transaction string to non-volatile memory 28
!V
Reads the transaction string written by !Q
29
!W
Reads thermal print progress indicator 29
!X
Set resolution 29
!Y
Read ticket counter 30
!Y 1
Read retract counter 30
!Z
Burn time 30
4.5.2 Document entry commands
!A
Sets ticket length for roll ticket without black marks or gaps 32
!E
Ejects document through the upper rear document entry
(for example after decoding) 32
!L 1
Selects lower rear document entry, and waits if paper is out
(for units with dual consecutive entries
1
) 32
!L 2
Selects upper rear document entry , and waits if paper is out
(for units with dual consecutive entries
1
) 32
!L 3
Loads document through front entry 32
!L 4
Ejects document through front entry 33
!L 5
Transports document to waste bin (only for printers with front load 2 and 3) 33
!L 6
Reads a ticket from frontload and immediately ejects ticket
!L 17
Selects lower rear document entry and signals if paper is out 34
!L 18
Selects upper rear document entry and signals if paper is out 34
!T
Sets timeout for retract function 34
1
!L1, !L2, !L17 or !L18 must be selected when configured for dual document entries
Programming
26 TTPM3 Printer/Encoder–Technical Manual 0705
4.5.3 Print-data commands1
!F T
Print text 35
!F G
Print graphics 36
!F C
Print bar code 38
!F M
Specifies No. of retries + cancellation text to be printed if encoding fails 40
!F L
Print logotype ?
4.5.4 Magnetic encoding/decoding commands
!B 1
Encode data in Hex format on track 1 42
!B 2
Encode data in Hex format on track 2 (or center track) 42
!B 3
Encode data in Hex format on track 3 42
!N
Same as !B 2, for compatibility with TTPM22
!N+
Same as !N but reverses the bit order
!K
Same as !B 3, for compatibility with TTPM2
!K+
Same as !K but reverses the bit order
!O 1
Reads data in Hex format from track 1 (or center track) 43
!O 2
Reads data in Hex format from track 2 (or center track) 43
!O 3
Reads data in Hex format from track 3 (or center track) 43
!J
Encode data in ISO format on track 1 43
!M
Encode data in ISO format on track 2 (or center track) 43
!I
Encode data in ISO format on track 3 43
!D A
Reads and decodes data in ISO format from track 1, 2, and 3 43
!D 1
Reads and decodes data in ISO format from track 1 43
!D 2
Reads and decodes data in ISO format from track 2 (or center track) 43
!D 3
Reads and decodes data in ISO format from track 3 43
!D
Same as !D 2, for compatibility with TTPM2
4.5.5 Storage commands
!H P n1 n2
Set parameter value 48
!H S
Store current parameter values 48
!S P n1
Parameter value enquiry 49
!H F
Load Firmware 49
!H C
Load Font 50
!H C E
Erase all Fonts 50
!H L
Load Logotype ?
!H L E
Erase all Logotypes ?
1
See note about Ticket memory on page 23.
2
Grayed commands are obsolete, or not yet implemented (firmware version 5.12)
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 27
4.6 Command Reference
The commands in this section are grouped after what they do, and these groups are sorted in a theoretical usage sequence. It starts with commands for setting up the printer — through document entry commands — text-and-graphics commands — encoding / reading commands. Then we end with storage commands that handle the flash memory of the printer.
4.6.1 System commands
!C
21 43 n1 Hex
33 67 n1 decimal
Clear all
This command takes no parameter. All definitions are cleared. Stored layout is erased. Subsequent
!C
’s are ignored.
The
!C
command is also used to initialize TTPM3 after a power ON.
Auto-clear can be used to clear the memory between tickets instead of using
!C
. Auto-
clear executes faster than
!C
. When auto-clear is enabled any !C commands in the received data will be ignored, apart from when initiating the printer. Use parameter 57 to enable/disable auto-clear.
!CA
, adding an A to the !C command enables extended acknowledgement.
!C1
, adding the digit 1 to the !C command clears the wastebasket counter. See
!Y1
.
!P
21 50 Hex 33 80 Decimal
Print
This command triggers both the encoding, printing, cutting and ejecting of a ticket.
Printing follows a successful encoding. The magnetic code and print information, as well as cut and eject behavior, must first be defined using the applicable commands.
If
!P
is received before a clear all command after power ON, the !P will initiate the printer
without printing a ticket. This means that all data received prior to the
!P
will be
discarded.
If !P is received and the printer is out of paper, it will give error code NAK P and discard the received data.
EJECT TO WASTE BASKET
Adding an @ character (
!P@
) makes the printer eject the completed ticket into wastebasket (FL3 printers). One use for this can be to make status printouts that are not intended for the customer.
ENCODING RETRIES
Adding a single digit after the !P makes it possible to set the maximum number of encoding retries for one ticket. The number given is the number of additional tries i.e.
Programming
28 TTPM3 Printer/Encoder–Technical Manual 0705
!P 1
means one normal attempt plus one retry. Default is 1, which is the value used if no
digit is present.
EJECT FULLY
Adding an E (
!PE
) makes the printer eject the ticket fully so that it can fall down into a
tray (for FL3 printers) Digits and @, or digits and E can be mixed on the same line, for example
!P5@
makes
five encoding retries, and ejects the ticket into the wastebasket.
!Q
21 51 n1...n15 Hex 33 81 n1...n15 Decimal
Write transaction string
!Q
writes a string with up to 15 ASCII characters to a non-volatile buffer memory in the
printer.
Example:
!Q asdfgh <CR><LF>
After the ticket has been correctly encoded / printed, the string is copied to a non-volatile buffer. This buffer can be read by the !V-command.
The transaction string is committed at the precise point where a useable ticket has been produced. The only way to reset a transaction string is to successfully print another useable ticket that was initiated with
!Q
.
!S
21 53 Hex 33 83 Decimal
Status request
The TTPM3 responds by sending two bytes to the host computer. Byte 1 indicates the status of the various TTPM3 sensors according to the following table. Byte 2 reports the temperature of the thermal print head and is only used internally in the TTPM3.
Bit Function Sensor Value ”1” Value ”0”
0 Lower rear document entry J6 Paper present No paper 1 Upper rear document entry J7 Paper present No paper 2 Top-of-form J8 Paper present No paper 3 Cutter position J9 Paper present No paper 4 After cutter position J10 Paper present No paper 5 Cutter J21 Cutter home Cutter not home
1
6 Print head – OK Error 7 Front Load Sensor J11 Paper present No paper
See also:
ENQ
1
On CD200 versions with “card level low” sensor, this bit indicates low card level. (printer version 02441-002, 5600-A0015)
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 29
!S D
21 53 20 44 Hex 33 83 32 68 Decimal
Status request, DIP-switch settings 1
The TTPM3 responds with one byte containing 1 bit for each switch. 1 = on, 0 = off.
Bit 7 6 5 4 3 2 1 0
Dip switch No: 8 7 6 5 4 3 2 1
!S R
21 53 20 52 Hex 33 83 32 82 Decimal
Power has been off?
!S R answers with one byte a 1 (31h) if the power has been off since the last time you asked or a 0 (30h) if the power has been on since the last check. A hardware reset does not activate the bit. It requires a genuine power off to be set to 1.
!U
21 55 Hex 33 85 Decimal
Firmware version query
The TTPM3 responds by sending the following string:
30906_480 TTPM3 Ticket Printer/Encoder
Where 30906 is the firmware number for a standard TTPM3, and 480 is the firmware revision, in this case 4.80.
!V
21 56 Hex 33 86 Decimal
Read transaction string
Reads the string stored by !Q from the memory in the printer.
!W
21 57 Hex 33 87 Decimal
Read thermal print progress indicator
Reads a value indicating the number of bytes actually printed on the ticket (both blank and non blank). The number consists of 4 hexadecimal digits and should normally be equal to 5BE0. A lower number together with the absence of the 03H indicates that the last ticket was not fully printed and a decision may be taken whether the system should reissue the ticket or alert the supervisor.
This is a safety feature to minimize the risk of valid tickets being duplicated without attention from the system, by turning off the power at a certain point.
!X
21 58 Hex 33 88 Decimal
Set resolution
This command sets the resolution of the print. This only affects the resolution in the transport direction of the ticket.
0=normal resolution, (5.7dots/mm).
1=high resolution (8.5 dots/mm).
1
This is for compatibility with older TTPM’s. They had a DIP-switch on the control board instead of a parameter memory.
Programming
30 TTPM3 Printer/Encoder–Technical Manual 0705
!Y
21 59 Hex 33 89 Decimal
Read ticket counter
This command reads out the value of the internal ticket counter from the control board. This counter starts from 0 when the printer is new and is incremented by one fore each completed !P sequence.
The result is sent as 12 decimal digits + CR + LF
!Y 1
21 59 31 Hex 33 89 49 Decimal
Read retract counter
Reads out the internal retract counter. This counter is incremented by one for each ticket that is retracted and thrown in the wastebasket.
To reset the counter to zero, send the command
!C1
The result is sent as 12 decimal digits + CR + LF
NOTE! – Retract function is only available on printers with
waste bin option (part of front load FL3 and FL4).
!Z
21 5A Hex 33 90 Decimal
Set burn time
The burn time controls the print density. It is used to set the heating so that it is adequate for the thermal paper used as ticket material. Set it to the lowest burn time that gives acceptable print quality.
Example:
!Z 20 <CR><LF>
sets burn time 640 µs
The burn time setting is stored in the non-volatile memory.
Power off/on reset returns the setting to default value.
CAUTION! – A longer burn time put more load on the printhead, so do not
use a longer burn time than required for a clearly legible print. Settings over 27 are not recommended.
ENQ
05 Hex 05 Decimal
Status request, immediate
The TTPM3 responds by sending the same 1 byte response to the host computer as is sent as byte 1 in response to the !S command. The ENQ command is effected immediately after receipt, whereas the !S command is effected in sequence when received.
Setting Burn time Print density
16 512µs
Test
Lightest print
17 544µs
Test
18 576µs
Test
19 608µs
Test
20 640µs Test
Default
21 672µs
Test
22 704µs
Test
23 736µs
Test
24 768µs
Test
25 800µs
Test
26 832µs
Test
27 864µs
Test
28 896µs
Test
29 928µs
Test
30 960µs
Test
31 992µs
Test
Darkest print
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 31
!F A N
21 46 20 41 Hex 33 70 32 65 Decimal
Feed- acceleration and speed
TTPM3 has two feed motors, one for encoding and one for printing. This command sets the start-frequency and the top speed of each motor.
NOTE1! – This command should not be used! Suitable speed is selected by Swecoin
and set as default parameters in the firmware. The speed setting has to reflect the motors fitted in the printer and the mechanical buildup of the printer. A single unit may be tunable to a higher speed but it is not certain that the settings work on the next printer.
NOTE2! – Power off/on will set the values to factory default.
Syntax for defining and downloading graphics data is as follows:
!F A N <start freq> <top speed> <motor> 1 1 1_”remark”
!F Command to load print-parameter information.
A Indicates acceleration and speed mode.
N Print orientation. This is ignored in acceleration and speed mode.
Orientation is always North (N). The printer requires the N to be inserted.
<start freq> Start frequency. Set the base frequency from where the acceleration
starts. A value of 30 indicates a start frequency of 300 Hz.
Top speed Top speed is the frequency at which the acceleration stops. A value of
450 sets top speed to 4500 Hz.
motor “1” selects encoding motor, while “2” selects print motor
1 Not used. Must be set to 1.
1 Not used. Must be set to 1.
1 Not used for graphics printing. Must be set to 1.
space One space has to follow the "1" before the graphics data.
Remark Here you can enter a remark describing the setting you just did. It will
not be printed.
Example:
!C<CR><LF> !F A N 30 250 1 1 1 1 "Encode speed (full-step)"<CR><LF> !F A N 30 190 2 1 1 1 "Print speed (half-step)"<CR><LF> !P<CR><LF>
Programming
32 TTPM3 Printer/Encoder–Technical Manual 0705
4.6.2 Document-entry related commands
!A
21 41 Hex 33 65 Decimal
Set ticket length for roll paper
This command sets the ticket length if paper without gaps or black marks is used. One step is 0.67mm.
!A 127 sets up a credit car sized ticket length.
!A 0 turns off the function and reverts to gapped ticket stock. This is the default setting.
The mechanics of TTPM3 works with ticket lengths between 54 and 120 mm.
!E
21 45 Hex 33 69 Decimal
Eject through rear document entry
This command ejects, through the rear document entry, any document positioned in the active position for encoding (or after decoding). See page 16 for definition of active/ standby ticket position.
!L 1
21 4C 31 Hex 33 76 49 Decimal
Select lower rear document entry
Selects lower rear document-entry and feed the leading document, in the consecutive supply entry, to active position. If, in the preceding operation, the upper rear document entry has been engaged, the document in that entry is retracted from the active position.
NOTE! — When set up as a dual document entry printer, a “select rear
entry” command (!L1, !L2, !L17 or !L18) must precede the print command (!P). An ACK character is returned if the command was successful.
If no paper is present, the yellow indicator lights up and the printer waits until the operator insert new paper stock.
Note that ACK/NAK signaling must be enabled (DIP switch no. 6)
See alternative command !L17.
!L 2
21 4C 32 Hex 33 76 50 Decimal
Select upper rear document entry
Same function as !L1, but selects upper rear document entry.
See alternative command !L18.
!L 3
21 4C 33 Hex 33 76 51 Decimal
Load document from front entry (front load printers only)
This command lifts the print head for a specified time, to permit document insertion through the TTPM3 front document entry/exit. At the same time, any document in active position is retracted. The document inserted in the front document input/exit is loaded into
the printer and placed in active position in the upper entry, see page 16 for entry definition.
To speed up ticket handling, the magnetic code is read and placed in memory when loading the ticket.
!D1, !D2
, and
!D3
will read data from memory without having to move
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 33
the ticket. Issuing a second read command will move the tickets over the read head and back to make a new read from the ticket.
On error, the TTPM3 sends the following error codes to the host computer:
Error code Error
NAK+B No document is inserted within 60 seconds. Command !L3 is abandoned.
NAK+C A document is inserted and immediately retracted.
NAK+D A document is inserted, but the TTPM3 is blocked (paper jam)
NAK+E Paper jam in the input feeder during an !L3 command.
A front loaded document resting in active position can be processed using one of the following alternatives:
Using the appropriate decode command
!D1, !D2, !D3
or
!O1, !O2, !O3
.
Using print parameter format command !F and applicable encoding command !I, !J, !K,
!M or !N, followed by print command !P.
Document related commands !E, !L4 and !L5.
!L 4
21 4C 34 Hex 33 76 52 Decimal
Eject document through front document entry (only already cut ticket)
A document positioned in the active position is ejected through the front document entry, without encoding or printing.
Compare with the
!E
command that ejects the document through the upper rear
document entry.
!L 5
21 4C 35 Hex 33 76 53 Decimal
Eject document into waste bin (only printers w. waste bin)
Only for printers with front load 3 (with waste bin):
This command transports the ticket from active position to the waste bin. The same function can be obtained for cancelled tickets if character ”@” or a “}” is inserted into the string of data to be encoded.
!L 6
21 4C 36 Hex 33 76 54 Decimal
Read ticket from front load
Only for printers with front load:
Reads the ticket from the front load and immediately ejects it back out without transporting the ticket to the active position. This command can be used to read tickets in a printer that is configured for two consecutive tracks (where the normal !L3 command would push out the ticket from the upper entry to make place for the ticket from the frontload).
Programming
34 TTPM3 Printer/Encoder–Technical Manual 0705
!L 17
21 4C 31 37 Hex
33 76 49 55 Decimal
Select lower rear document entry and signal if paper is out
(only dual entry printers)
Same function as !L1, but when ticket loading fails the printer sends an error code (NAK + '1') instead of waiting for paper to be loaded. It is then up to the system to determine if paper should be loaded from the upper document entry instead.
!L 18
21 4C 31 38 Hex
33 76 49 56 Decimal
Select upper rear document entry and signal if paper is out
(only dual entry printers)
Same function as
!L2
, but when ticket loading fails the printer sends an error code (NAK + '1'). It is then up to the system to determine if paper should be loaded from the lower document entry instead.
!T
21 54 n1...n2 Hex 33 84 n1...n2 Decimal
Sets timeout for retract function (only printers w. waste bin)
!T@nn
nn is the delay in seconds
When a ticket is left in the output of the front load after the timeout nn has expired, NAK F is sent to the host controller to indicate that the ticket hasn't been picked up.
If the customer takes the ticket before the timeout elapses, the printer sends a Bel (07H) character.
@ Expands the signaling: If you have a Front load with waste basket function, the printer retracts the uncollected ticket and ejects it into the wastebasket exit.
NOTE1! – The !T command should be sent after the !P (print) command
NOTE2! – DIP-switch 6 must be ON for status replies to be sent.
EXAMPLE:
!P
!T @20
Retracts the ticket and sends NAK F if it has not been taken within 20 seconds
4.6.3 Print related commands
INTRODUCTION
!F
is the general command for formatting the ticket print.
!F<type> <data>
The parameters are used as follows:
!F Indicates that this is the start of a print field definition
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 35
<type> Specifies the type of the field
T =
T
ext
G =
G
raphics
M =
M
agnetic encoding failure, ticket cancellation (See page 40)
C = Bar
C
ode
<data> Depends on the type of field specified. See the following pages.
4.6.4 Text printing
!F T
21 46 20 54 20 n1...n8 Hex 33 70 32 84 32 n1...n8 Decimal
Format text for printing
!F T <orientation> <xpos> <ypos> 1 <height> <width> <font> <"text">
The parameters are used as follows:
!F Indicates that this is the start of a print field definition
T Indicates text mode
<orientation> Specifies the way in which the text is to be oriented. This can be either
N(orth), E(ast), S(outh) or W(est). This terminology is described in detail in the examples given in this document. Specific fonts may be limited to one orientation only, see <font> below.
<xpos> <ypos> Specifies starting position for the text on the ticket. That is, the
distance in pixels from the upper left corner of the printable area to the upper left-hand pixel of the bounding box of the first character to be printed. Note that the resolution is 7.52 pixels/mm on the X-axis and
5.7 pixels/mm on the Y-axis.
<fixed pitch> No. of pixels from the start of one character to the start of the next.
Range 6 to 16. A value below 6 sets the default pitch.
NOTE! – Only used for font 1. Must be set to 1 for all other fonts.
<height> <width> Specifies the height and width expansion of characters to be printed.
The height range is 1–16 times the default value. The width range is 1–16 for fonts 1 and 4, and 1–3 for fonts 2 and 3. See font samples on page 21.
<font> Selects the font (text appearance). Fonts 1, 2, 3, and 4 apply. Font 2
and 3 can only be North oriented. Fonts 1 and 4 can be set to any orientation. Font 4 is a proportional character font. See font samples on page 21. Font appearance may differ from the font samples if you have custom firmware in your printer.
NOTE! – The space to the following character is included
in the matrix of the character, and that the pixels are not square at normal resolution.
<"text"> Text to be printed enclosed in quotes (" ").
Example of a command for text: !F T N 150 150 1 1 1 1 "Text"
Programming
36 TTPM3 Printer/Encoder–Technical Manual 0705
4.6.5 Graphics printing
!F G
21 46 20 47 20 n1...n8 Hex 33 70 32 71 32 n1...n8 Decimal
Format graphics for printing
TTPM3 can print bit map graphics. Graphic images are stored in the fixed memory area and will therefore be repeated on every ticket until the next !C command is received.
Remember, when creating graphics for the TTPM3 printer, that the pixels are not square but have a height/width ratio of 1.32:1 or 0.88:1 depending on resolution setting.
Syntax for defining and downloading graphics data is as follows:
!F G <orientation> <xpos> <ypos> 1 <height> <width> 1_<Graphic_data>
!F Command to load print-parameter information.
G Indicates graphics mode.
<orientation> Print orientation. This is ignored in graphics mode. Orientation is
always North (N). The printer requires the N to be inserted.
xpos Horisontal starting position in pixels for the upper left-hand corner of
the graphics block. Position will automatically be rounded off to be divisible by 8 as a graphic block has to start at the first bit in a byte.
ypos Vertical starting position in pixels for the upper left corner of the
graphics block.
1 Not used for graphics printing. Must be set to 1.
height Height in pixel lines of the graphic block. The length of the ticket
determines maximum height. For an 86 mm ticket the maximum height is approximately 500 pixel-lines.
width Width
in bytes
of the graphic block. Maximum width is 48
bytes
.
1 Not used for graphics printing. Must be set to 1.
space One space has to follow the "1" before the graphics data.
Graphic_data This is a block of bit mapped graphics data. The block is stored in the
printer starting at <xpos>, <ypos>. The numbers of bytes specified by <width> are stored in one pixel line. The <ypos> is then incremented and the next line is stored. This is repeated <height> number of times. It is up to the user to send the correct number of bytes to the printer, that is, <height> × <width>, as the printer will scan the input character stream for the correct number of bytes.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 37
000 00001
0011000
1
0 11 11001
111 1110
1
0 11 1100
1
0011000
1
000 00001
1122335566778
4
4
1.
Create
pixel
graphics
2.
Add empty
vertical lines
to get full bytes
3.
Convert pixels
to bits
Black pixel=1
White pixel=0
4.
Covert bits
to bytes
SW9712 3
1286432 842
1
16
1 byte
!F G N 140 140 1 17 1 10H 38H 7CH FEH 7CH 38H 10H
10 H
10 H
38 H
38 H
7C H
7C H
FE H
Figure 14. Converting graphics to TTPM3 format. Note that the appearance on your screen depends on the editor you use to write your program.
A file for downloading and printing the above graphics will look like this, in Windows Notepad:
!C
!C
!F G N 140 140 1 7 1 1 •8|þ|8• !C
!C
!L1
!P
A utility program called Swecoin TTPM editor can help you convert Windows bitmap images (BMP-files) to TTPM graphics format. You can download the TTPM editor free of charge from the Swecoin Internet web site at http://www.swecoin.se
.
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.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 39
type Selects type of bar code. The following types are available:
Value 1 = EAN13 (partly implemented, no check sum) Value 2 = Code 2-of-5 interleaved Value 8 = EAN 128 Value 9 = Code 128 Value 11 = Code 39
space A space (blank) has to be inserted between the type parameter and the
data string.
bar code data This is a block of data to be converted by the TTPM3 and printed in bar
code form in accordance with the parameters identified. For available characters and data string formats, please refer to the specific type of bar code.
The following command string produces the ticket illustrated to the left below:
!C
!L1
!F C N 12 102 1 4 3 1 "1234567890128"
!P
SW97103A
X
Y
FAST
SLOWER
but more
reliable
Feed
direction
If dots are missing the bar code will still be readable
Figure 15. EAN13 bar code. Use east or west oriented bar codes wherever possible, to guarantee readability.
Code 39 example
!F C N 100 230 6 2 2 11 "12345"
Code 128 example
!F C N 100 320 1 5 2 9 "abc123"
Code 2-of-5 example
!F C N 100 410 5 2 2 2 "123456"
NOTE! – Code 2-of-5 must have an even number of digits.
Programming
40 TTPM3 Printer/Encoder–Technical Manual 0705
4.6.7 Canceling a ticket
!F M
21 46 20 4D 20 n1...n8 Hex 33 70 32 77 32 n1...n8 Decimal
Format print on cancelled ticket
The TTPM3 can cancel a ticket after an unsuccessful magnetic encoding. The feature relates to the read-after-write function
1
. When the <message> has been encoded, the TTPM3 reads and compares the magnetically encoded message with the original <message> string. If the comparison is negative, a second attempt to encode/read the same ticket is done. If also this attempt is negative, the ticket is cancelled. The magnetic stripe is erased and stripes are printed across the ticket (see figure below).
By default the TTPM3 attempts to encode three tickets. The desired number of attempts, as well as the text used to indicate the cancellation, is programmable through a subcommand to the !F command as follows:
!F M <orientation> <xpos> <ypos> <attempts> <height> <width> <font> <”text”>
All parameters must be specified.
The syntax is identical to !F T with the exception of the parameters <”text”> and <attempts>.
Text
must be a text string.
Attempts
are the number of tickets the TTPM3 should attempt to encode. If <attempts> is set to 1, the TTPM3 will make only one attempt (plus the automatic second attempt on the same ticket) to encode the ticket. If this fails, <text> will be superimposed on the ticket that is now being printed.
Setting <attempts> = 2 results is one striped ticket (first unsuccessful attempt) and the superimposed text for the second unsuccessfully attempted ticket and so on.
Ir is also possible to set how many times the printer should try to verify each ticket by adding a single digit after the !P command. This is described in the !P command description.
All parameters in this command are stored in memory and remain in effect until overwritten or the power is interrupted.
The following command string produces the tickets illustrated below at 2 unsuccessful encoding attempts:
!F M N 20 200 2 8 8 1 "VOID"
1
Inserting an asterisk (*) in the data string to be encoded disables the read after write feature, see page 44.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 41
Figure 16. Indication of 1st and 2nd unsuccessful read-after-write
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.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 43
15 leading zero nibbles give 15 x 4 bits = 60 bits at 210 bits/inch = 7.2 mm. FF as start sentinel encode 11111111 which is easy to detect. 99 as stop sentinel encode 10011001, equally easy to detect.
!J
21 4A Hex 33 74 Decimal
Encode ISO data, track 1
This command encodes upper case ASCII text and digits to track 1 of the ticket.
NOTE! – The space character is a valid encode on track 1, so remember that if
you insert a space character after !J, it will be encoded on the stripe.
See page 46 for a list of the characters that can be encoded.
!M
21 4D Hex 33 77 Decimal
Encode ISO data, track 2
This command encodes ASCII digits to track 2 of the ticket.
!I
21 49 Hex 33 73 Decimal
Encode ISO data, track 3
This command encodes ASCII digits to track 3 of the ticket.
!D
21 44 Hex 33 68 Decimal
Reads and decodes ISO data
!D 1
Reads and decodes ISO track 1 and transmits the data to the host computer.
!D 2
Same as !D1 but reads and decodes ISO track 2 (or center track)
!D 3
Same as !D1 but reads and decodes ISO track 3
!D A
Reads and decodes all three ISO tracks
The ticket is taken from active position, and after reading, the ticket returns to active position.
!O
21 4F Hex 33 79 Decimal
Reads binary data
!O 1
Reads and transmits bit-by-bit data, from ISO track position 1, to the host
computer. No decoding takes place in the TTPM3. A one is transmitted as ASCII 1, and a zero as ASCII 0.
!O 2
Same as !O1 but reads and decodes ISO track 2 (or center track)
!O 3
Same as !O1 but reads and decodes ISO track 3 (or center track)
The ticket is taken from active position, and after reading, the ticket returns to active position.
Programming
44 TTPM3 Printer/Encoder–Technical Manual 0705
4.6.9 Additional encoding information
CHECKSUM
To ensure correct reception of the message to be magnetically encoded, a checksum can be appended to the data by the host computer. This checksum will then be compared by the TTPM3 before encoding which guarantees that the magnetic code data is correctly received.
1. Calculate the checksum as the modulo 2 sum (consecutive XOR) of the ASCII data
bytes sent in the !M command. The checksum must have bit 7 set to 1 to distinguish it from ordinary data.
2. Append the checksum at the end of the !M data string when encoding ISO data at
track 2 (or center track).
3. When the message has been received, the TTPM3 calculates the checksum and
compares it to the checksum appended to the message. If they are identical, an ACK is returned, otherwise a NAK followed by the checksum calculated by the TTPM3 will be returned.
The checksum is never encoded on the magnetic stripe; it is only intended to secure data transmission. The ISO format itself automatically adds a check digit to the magnetic code.
READING AND DECODING
MAGNETIC ENCODING ATTRIBUTES
The magnetic encoding data strings can be given attributes that govern versions of the standard encode/read-after-write routines and cancellation functions.
The following attributes, inserted anywhere in the applicable data strings, will cause the following functional deviations from default standards:
NOTE – The attributes in parenthesis only work for the !M command
{ (or *) Cancels the read-after-write function. The ticket is encoded and directly
transported forwards for separation (if applicable) and subsequent printing according to the !F command data without prior read-after-write.
| (or $) Encodes the ticket, performs read-after-write, but does not transport the ticket
for printing. Instead, the ticket is backed into the active position without being cut, waiting for the command to proceed, for instance, for a decode operation.
} (or @) Expands the read-after-write operation. If this is successful, the ticket is
processed in accordance with standard routines, that is, it is separated and printed. If the read-after-write operation is unsuccessful in the programmed number of attempts, the ticket is transported forwards, and the waste bin of the front load mechanism is activated (only printers with front load & waste bin option). The ticket is dropped into a waste bin.
|} ($@) Combining the characters | and } results in normal behavior if the encoding was
successful. If an error occurs then the ticket is transported back to the start position and NAK + ‘E’ is sent.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 45
~
Encodes the ticket, performs read-after-write, and cuts the ticket. The ticket
stops after the cutter (where the after cutter sensor still can see the ticket). Here it waits for print data and !P command before proceeding to be printed and ejected to the customer Apart from print data and !P, only the following commands are allowed. !L3, !L4, and !L5. !L5 "Eject document into waste bin" will throw away the ticket from the waiting position into the waste bin without erasing the data to avoid that the ticket material in the upper track is being pushed out.
(minus sign) Disables encoding on magnetic retries. If magnetic retries occur it
is almost certain that it is the read-after-write fails due to interference. If encoding is disabled on the retry, the interference level is drastically reduced and the possibility of a successful reading increases. This is especially useful for HiCo tickets.
MAGNETIC ENCODING RETRIES
See ”Canceling a ticket” on page 40.
ENCODING TWO TRACKS ON A HICO TICKET:
!C
!M 1234567890123456789012345678901234567 |
!P
!C
!J ON TRACK 1 YOU CAN ENCODE UP TO 79 ASCII ALPHANUMERICAL CHARACTERS AND DIGITS
F T N 50 140 1 1 1 3 "HiCo Test"
!P
The| character in the string makes the ticket return to active position after encoding this track
Programming
46 TTPM3 Printer/Encoder–Technical Manual 0705
4.6.10 What can you encode?
TRACK 1 ISO ENCODING
ASCII Character Parity Magcode
32 Space 1 000000 33 ! 0 000001
Character not defined in Standards
34 " 0 000010
Character not defined in Standards
35 # 1 000011 36 $ 0 000100 37 % 1 000101 Start Character (Start Sentinel) 38 & 1 000110
Character not defined in Standards
39 ' 0 000111
Character not defined in Standards
40 ( 0 001000 41 ) 1 001001 42 * 1 001010
Character not defined in Standards
43 + 0 001011
Character not defined in Standards
44 , 1 001100
Character not defined in Standards
45 - 0 001101 46 . 0 001110 47 / 1 001111 48 0 0 010000 49 1 1 010001 50 2 1 010010 51 3 0 010011 52 4 1 010100 53 5 0 010101 54 6 0 010110 55 7 1 010111 56 8 1 011000 57 9 0 011001 58 : 0 011010
Character not defined in Standards
59 ; 1 011011
Character not defined in Standards
60 < 0 011100
Character not defined in Standards
61 = 1 011101 62 > 1 011110
Character not defined in Standards
63 ? 0 011111 Stop Character (End Sentinel) 64 @ 0 100000
Character not defined in Standards
65 A 1 100001 66 B 1 100010 67 C 0 100011 68 D 1 100100 69 E 0 100101 70 F 0 100110 71 G 1 100111 72 H 1 101000 73 I 0 101001 74 J 0 101010 75 K 1 101011 76 L 0 101100 77 M 1 101101 78 N 1 101110 79 O 0 101111 80 P 1 110000 81 Q 0 110001
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 47
ASCII Character Parity Magcode
82 R 0 110010 83 S 1 110011 84 T 0 110100 85 U 1 110101 86 V 1 110110 87 W 0 110111 88 X 0 111000 89 Y 1 111001 90 Z 1 111010 91 [ 0 111011
Character not defined in Standards
92 \ 1 111100
Character not defined in Standards
93 ] 0 111101
Character not defined in Standards
94 ^ 0 111110 Field Separator 95 _ 1 111111
Character not defined in Standards
Mag Code = the six LSB of (ASCII value - 32), parity bit is added by printer.
TRACK 2&3 ISO ENCODING
ASCII Character Parity Magcode
48 0 1 0000 49 1 0 0001 50 2 0 0010 51 3 1 0011 52 4 0 0100 53 5 1 0101 54 6 1 0110 55 7 0 0111 56 8 0 1000 57 9 1 1001 58 : 1 1010 Account Separator (Track 3 only) 59 ; 0 1011 Start Character (Start Sentinel) 60 < 1 1100 61 = 0 1101 Field Separator 62 > 0 1110 63 ? 1 1111 Stop Character (End Sentinel)
Mag Code = the four LSB of (ASCII value - 48), parity bit is added by printer.
Sending
!M 12345
to the printer results in encoding of 00000;12345?000000
This results in:
0000000000000000000000001011000100100011010001011111
on the stripe.
Programming
48 TTPM3 Printer/Encoder–Technical Manual 0705
4.6.11 Storage commands
!H P n1 n2
21 48 20 50 20 n1...n2 hex 33 72 32 80 32 n1...n2 decimal
Set Parameter Value
A number of bytes in the flash PROM hold various parameter values called
default
parameters
. One or several of them can be overridden temporarily with this command.
n1 Parameter number as decimal digit(s)
n2 Parameter value
A space must separate the parameter number and the parameter value
See “Default parameter settings” on page 25.
The permanently stored parameters will be used again after a printer-reset command or at power ON.
The temporary values can, however, be stored in the flash PROM as permanent values with command
!H S
.
EXAMPLE:
!H P 1 11<CR><LF>
sets parameter 1 (baudrate) to 115200 bps.
!H S
21 48 20 53 Hex 33 72 32 83 decimal
Store current Parameter Values
Stores the current setting of all parameter values in the setting memory. These parameters are then used as default parameters. Storing takes approximately 4 seconds. The printer activates the cutter to indicate that storing is complete.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 49
!S P n1 n2
21 53 20 50 20 n1 Hex 33 83 32 80 32 n1 Decimal
Parameter-setting data Enquiry
This command requests information about the setting of parameter n1. The reply is the parameter value stored in flash PROM or any parameter value temporarily set by other commands.
n1 Parameter number to start from, as decimal digit(s)
n2 Number of parameters to read out
The parameter names are listed on page 59.
EXAMPLE:
!S P 1 1<CR><LF>
Recalls the setting of parameter 1 (baudrate)
!S P 1 4<CR><LF>
Recalls the setting of parameter 1 to 4
!S P<CR><LF>
Recalls the setting of all parameters
!S P 0 1<CR><LF>
Parameter number 0 reflects the No. of parameters stored in the
printer. So If you send
!S P 0 1
to the printer and get a 14 as
reply you know that there are 14 parameters that you can read out.
– Parameter number 255 contains a checksum calculated as the sum of all parameters
from parameter 1 to the parameter number given by parameter 0.
!H F
21 48 20 53 Hex 33 72 32 83 decimal
Load firmware
A utility program for loading firmware is available on the Swecoin web site (The TTP Editor). If you want to make remote upgrading of firmware possible though your ticketing system you should implement the
!H F
command.
EXAMPLE:
!C<CR><LF>
Prepares the printer for incoming data
!H F<CR><LF>
Tells the printer that the binary to come is a firmware file
Delay 100 ms Here you should have a delay of 100 ms before sending the firmware file
to the printer port.
Binary file Firmware file with the version you intend to upgrade to.
After burning the new firmware into the Flash PROM, the printer will make a reset.
Programming
50 TTPM3 Printer/Encoder–Technical Manual 0705
!H C
21 48 20 43 Hex 33 72 32 67 decimal
Load character set (font)
Loads and stores an SWF-font into the flash prom of the TTPM3. A character set loaded gets the next free character set number. So character sets must be loaded in the order that you want them.
A utility program for loading character sets is available on the Swecoin web site (the TTP Editor). If you want to make remote upgrading of fonts possible though your ticketing system you should implement the
!H C
command.
EXAMPLE:
!C<CR><LF>
Prepares the printer for incoming data
!H C<CR><LF>
Tells the printer that the binary to come is a character set file
Delay 100 ms Here you should have a delay of 100 ms before sending the font file to
the printer port.
Binary file SWF font file with the font you intend to load.
After burning the new character set into the Flash PROM, the printer will make a reset.
!H C E
21 48 20 43 Hex 33 72 32 67 decimal
Erase all character sets (fonts)
You cannot delete a single font from the printer but must delete all fonts and then load the fonts you want again.
The Swecoin TTP Editor can be used to erase fonts. If you want to make remote deleting of fonts possible though your ticketing system you should implement the
!H C E
command.
EXAMPLE:
!C<CR><LF>
Prepares the printer for incoming data
!H C E<CR><LF>
Erases all character set from the printer
After erasing the character sets, the printer will make a reset.
Programming
0705 TTPM3 Printer/Encoder–Technical Manual 51
4.6.12 Font loading
The printer can store fonts in its flash PROM. The fonts are given font numbers when they are loaded into the printer. The first font is assigned number 0 and the next font 1 etc. up to font 3.
The memory available for font storage is printed on the self test ticket. The number of fonts that fit depends on the size of the font files.
You cannot erase a single font, but must erase all four fonts with
!H C E
, then reload the
fonts you wanted to keep.
Utility software for generation of SWF-font files and loading/erasing fonts is available on the Swecoin web site. If you need to load fonts in a non-Windows environment, use the
!H C
command.
The time required for processing the font data that is loaded is typically 15–20 seconds per font, excluding transfer time. During this time, any data sent to the printer will be lost.
NOTE! — The font processing ends with a reset.
CAUTION! — Loading to the flash PROM will erase the RAM completely since the
RAM is used during the loading process. Any print data residing in RAM will thus be lost.
4.6.13 Logotypes
Logotypes can be stored in the flash PROM of the printer and printed on demand. The memory available for logotype storage is printed on the self test ticket. The number of logotypes that fit depends on the size of the font files.
You position and print a logotype with the command
!F L
.
LOADING
Windows software that converts black and white BMP bitmap files to logotypes and load them into the printer is available on the Swecoin web site. If you need to load logotypes in a non-Windows environment, use the
!H L
command.
The time required by the printer to process logotype data, excluding transfer time from the PC, is typically 15 to 20 seconds, per logotype. During this time, any data sent to the printer will be lost.
ERASING
All logotypes are erased with the
!H L E
command.
CAUTION! — Loading to the flash PROM will erase the RAM completely since the
RAM is used during the loading process. Any print data residing in RAM will thus be lost.
Ticket Examples
52 TTPM3 Printer/Encoder–Technical Manual 0705
5 TICKET EXAMPLES
The command language will be explained in detail with the following examples.
NOTE! – These examples work with a TTPM3 set up for single-entry. If your printer is
set up for dual entries you must insert an entry selection command, !L1 or !L2, on a separate line before the !P command.
Assume that you want to print a document with the following layout and the number 123456789 to be encoded on ISO track 2 (or center track).
Figure 17. Printout example
To achieve this, the following data have to be sent to the printer:
!C !C !F T N 150 20 1 2 2 1 "TTPM" !F T N 110 70 1 1 1 1 "Printer/Encoder" !M 123456789 !P
Ticket Examples
0705 TTPM3 Printer/Encoder–Technical Manual 53
This command sequence will now be fully explained:
!C
Clears all previously sent definitions.
!F T N 150 20 1 2 2 1 "TTPM"
Defines a print field starting at X coordinate 150, (pixel pos. 150), Y coordinate 20 (pixel pos. 20), with characters of double height and double width, font 1. X-axis resolution is 7.52 pixels/mm (0.133 mm/pixel), Y-axis resolution is 5.7 pixels/mm (0.175 mm/pixel)
!F T N 110 70 1 1 1 1 "Printer/Encoder"
Defines a print field at X pos. 110, Y pos. 70 with standard size characters, font 1.
!M 123456789
Defines data to be encoded in ISO defined format on ISO track 2 (or center track) magnetic stripe as "123456789". Reads the encoded string, compares with the input (read-after-write)
NOTE! – For ISO encoding, start, stop and check digits, as well as
synchronization zeroes are automatically added by the TTPM3.
!P
Encodes and prints the document
The "!F" definitions are now stored in the printer. If another document with the same text and layout shall be printed but with another magnetic data string then only the following commands need be sent to the printer:
!M 987654321 !P
This sequence will encode a ticket with a different number on the magnetic
stripe but will produce a print picture with the same text and layout as the previous one.
NOTE! – If data shall be encoded on track 1 or 3, use the applicable command !J or !K to precede the data. The same Encoding/Read-after-Write routine applies as for track 2 (or center track) encoding.
Multiple tracks can be encoded in the same operation unless the printer uses HiCo tickets.
!J <message> and !K <message> for encoding track 1 or 3 shall precede the !M <message> and !N<message> for simultaneous encoding/read-after-write of message data on tracks 2 and 1/3.
NOTE! – X position range is 0–380 (at North orientation) Y position range is 0–470 for 86 mm tickets (at North orientation)
Ticket Examples
54 TTPM3 Printer/Encoder–Technical Manual 0705
We have so far been printing text oriented in the North direction. The printer is capable of printing in four directions.
NOTE! – Fonts 2 and 3 can only be printed in North orientation.
The following example prints text oriented in all four directions:
!C !C !F T N 120 190 1 1 1 1 "Prints" N = North !F T E 190 250 1 1 1 1 ”In" E = East !F T S 170 350 1 1 1 1 "Four" S = South !F T W 120 330 1 1 1 1 "Directions" W = West !P
Figure 18. Printout example
Ticket Examples
0705 TTPM3 Printer/Encoder–Technical Manual 55
Text attributes
TTPM3 does not handle word processor-like text attributes. You can reverse text, and you can make bold text according to the procedure described below. Bold and reversed cannot be combined.
5.1.1 Printing Bold text
Bold text is created by repeating the text you want bold, but with new coordinates:
!C
!C
!F T E 370 087 10 02 01 1 "This text is normal"
!F T E 309 087 10 02 01 1 "This text is bold"
!F T E 309 088 10 02 01 1 "This text is bold"
!P
You can increase the "boldness" by changing the coordinates more than one pixel, or by repeating the text more times with a shift also in the vertical direction.
5.1.2 Reversed text
If an R character is appended to the font selection digit (no space between), the text is reversed.
!C
!C
!F T E 100 110 1 02 02 1R "Reversed text"
!F T E 200 110 1 02 02 1 "Normal text"
!P
NOTE 1! – Only print single words in reverse. Reversing a complete line may reset
the printer due to the high current consumption when printing all black.
NOTE 2! – Reversed text work with fonts 1, 2, and 4.
Default parameter settings
56 TTPM3 Printer/Encoder–Technical Manual 0705
6 DEFAULT PARAMETER SETTINGS
Some of the printer settings can be stored in non volatile memory so that they will be used also after power OFF.
Each parameter has a parameter number (n) used when setting the parameter with the command
!H P n v
.
Most parameter settings must be stored before being effective. Do this by setting them up and then send
!H S
to store all settings in the non volatile memory.
NOTE 1! – If you try to set a parameter to an invalid value, the parameter
will be set to the nearest valid value below, except for the baud rate value which will return to the default value 115200 bps.
6.1 How the parameters are described
20 Default
16 Min
5
31 Max
Burn Time
Parameter number
Default value
Range
Description
SW 02001B
6.1.1 Default value
The default values indicated are "factory default settings" you get by following the procedure on the next page. These are not necessarily the settings that your printer was originally delivered with because many printers have customized settings when delivered.
6.1.2 Examples
Command examples are formatted in
Courier
and typed in the same way as used in the
Swecoin TTP editor:
!H P 1 11<CR><LF>
Where
<CR>
means the carriage return character 12 decimal (hex 0C). Numbers
between less-than and greater-than characters, for example
<001><015>
, means 1 and
15 decimal (hex 1 and 13).
Default parameter settings
0705 TTPM3 Printer/Encoder–Technical Manual 57
6.2 Summary of parameter settings
Parameter Description Default Page
1
Baud rate 11 (115200 Baud) 59
2
Flow control 2 (Hardware) 59
3
Printer type 2 (Two Consecutive) 59
4
Network Enable 0 (disabled) 60
5
Burn time 20 60
6
ACK/NAK + error code 1 (enabled) 60
7
Clear memory after print 0 (disabled) 60
8
Clear ticket path at startup 1 (enabled) 60
9
Mag-stripe verification read. 0 (Verify all) 61
10
Encode start speed 30 61
11
Encode full speed 450 61
12
Print start speed 100 62
13
Print full speed 400 62
14
Print Resolution 0 (Normal = 5.7dots/mm) 62
15
Encoding retries 3 62
16
Encoding attempts, No. of tickets 3 63
17
Beak feed length 50 mm 63
18
Feed to cut 22 63
19
Bit order for !B 1 command 1 63
20
Bit order for !B 2 command 1 63
21
Bit order for !B 3 command 1 63
31
Character sent after print 0 (disabled) 63
32
Long ticket length 94 64
33
Top margin short ticket 10 64
34
Fix ticket length 123 64
35
Feed after black mark in black mark mode 196 64
36
character pitch for font 1 12 64
37
Paper out behaviour 1 (keep data) 64
38
Steps after which the print motor is started for long tickets
280
39
Feed to cut long tickets 27
NOTE! – When the printer is set up the way you like it to be, you send:
!H S
, and all settings will be stored.
Default parameter settings
58 TTPM3 Printer/Encoder–Technical Manual 0705
6.2.1 Restore factory default
MANUALLY
1. Switch off the power
2. Hold the three front pushbuttons pressed while switching on the power
3. When the printer has started, release the buttons
4. Press and hold the Clear Jam button for 3 seconds
Now the printer will return to default settings above, or if the printer is customized, the settings agreed on with that customer.
REMOTE
The printer returns to factory default settings if you send:
!H P 0 0<CR><LF> !H S<CR><LF> Power OFF/ON
Default parameter settings
0705 TTPM3 Printer/Encoder–Technical Manual 59
6.3 Parameter Reference
96 Default 11 Min
1
96 Max
Baud rate
Stores the communication speed on the serial interface.
!H P 1 12
1200 bps
!H P 1 24
2400 bps
!H P 1 48
4800 bps
!H P 1 96
9600 bps
!H P 1 19
19200 bps
!H P 1 38
38400 bps
!H P 1 57
57600 bps
!H P 1 11
115200 bps
!H P 1 23
230400 bps, not recommended
!H P 1 46
460800 bps, not recommended
NOTE 1! – If you set an invalid value, the baud rate will return to 115200 bps.
NOTE 2! – The new baud rate will not be valid until after the parameters are stored
with the
!H S
command
2 Default
1 Min
2
2 Max
Flow-control
Select what handshaking to use on the serial interface.
!H P 2 1
Xon / Xoff 1
!H P 2 2
Hardware
2 Default
1 Min
3
2 Max
Printer type
Select what handshaking to use on the serial interface.
!H P 3 1
Standard (One consecutive [lower entry] + handfed-tickets [upper entry])
!H P 3 2
DCT (Dual Consecutive entries)
!H P 3 3
Card dispenser
!H P 3 4
Fixed length, see parameter 34
!H P 3 5
Black mark mode, see parameter 36
NOTE! – Must not be set to DCT when front loading is used!
1
DO NOT USE. If you send any type of binary data like graphics data, status requests etc. Xon / Xoff only work when plain text
is sent unidirectional to
the printer. Graphics and status replies may well contain the Xon (11h) and Xoff (13h) characters and
will obstruct the communication.
Default parameter settings
60 TTPM3 Printer/Encoder–Technical Manual 0705
0 Default
0 Min
4
1 Max
Network enable
Enables / Disables extra handshaking used by TCP/IP option
!H P 4 0
Network disabled
!H P 4 1
Network enabled
20 Default
16 Min
5
31 Max
Burn time
A long burn time gives darker print. On insensitive paper types you may have to increase the burn time to get an acceptable print quality.
!H P 5 27
Sets burn time 27
CAUTION! – A longer burn time put more load on the printhead, so do not
use a longer burn time than required for a clearly legible print. Settings over 27 are not recommended.
1 Default
0 Min
6
1 Max
ACK/NAK + error code
For the host computer to get status back from the printer, ACK/NAK must be enabled.
!H P 6 0
Silent
!H P 6 1
Enabled
0 Default
0 Min
7
1 Max
Clear memory after print
When enabled the memory is cleared after each print so that no extra copies of a printout can be made.
!H P 7 1
Enables auto clear after print
1 Default
0 Min
8
1 Max
Clear ticket path at startup
When enabled the printer looks for tickets in the printer at power on and voids any ticket found.
!H P 8 1
Enables auto clear at startup
Default parameter settings
0705 TTPM3 Printer/Encoder–Technical Manual 61
0 Default
0 Min
9
1 Max
Verify encoding
When enabled the data encoded to the selected tracks are verified by the printer before the ticket is issued.
Tracks: 123 You enable verification of a track by setting the bit for that track to 1.
!H P 9 111
Enables Verification of tracks 1, 2, and 3
!H P 9 110
Enables Verification of tracks 1 and 2
!H P 9 011
Enables Verification of tracks 2 and 3
!H P 9 010
Enables Verification of track 2
!H P 9 000
Disables verification of all tracks
NOTE! – Always disable verification on the tracks not covered by the magnetic stripe on the tickets used in the application. For example if you only use track 2, set P9 to 010. This controls the self test of the printer. If erroneously set, all self test tickets may be voided.
30 Default
0 Min
10
999 Max
Encoding start speed
Sets the speed at which the stepper motor starts to accelerate. Normally you never have to change this setting.
10=100 steps/s …
30=300 steps/second
300 steps/s gives 30 mm/s
!H P 10 40
Sets 400 steps/second
NOTE! — Some settings result in printer chassis resonance causing increased noise
and deteriorated print quality
450 Default
1 Min
11
999 Max
Encoding full speed
1=1000 steps/s …
450=4500 steps/second
1000 steps/s gives 100 mm/s
!H P 11 400
Sets 4000 steps/second
NOTE1! — Some settings result in printer chassis resonance causing increased noise
and deteriorated print quality
NOTE2! — When long tickets are used the encoding speed must be reduced to 350
Default parameter settings
62 TTPM3 Printer/Encoder–Technical Manual 0705
100 Default
0 Min
12
999 Max
Print start speed
Sets the speed at which the stepper motor starts to accelerate. Normally you never have to change this setting.
10=100 steps/s …
160=1600 steps/second
With normal resolution, 1000 steps/s gives 50 mm/s
!H P 12 100
Sets 1000 steps/second
NOTE! — Some settings result in printer chassis resonance causing increased noise
and deteriorated print quality
400 Default
0 Min
13
999 Max
Print full speed
The print speed together with burn time is used to set print quality. Experiment with these settings to get the most readable bar-codes and text on your ticket material.
1=1000 half-steps/s …
16=1600 half-steps/second
With normal resolution, 2000 half-steps/s gives 100 mm/s
!H P 13 300
Sets 3000 half-steps/second
NOTE1! — Some settings result in printer chassis resonance causing increased noise
and deteriorated print quality
NOTE2! — When long tickets are used the encoding speed must be reduced to 300
400 Default
0 Min
14
999 Max
Print resolution
This command sets the resolution of the print. This only affects the resolution in the transport direction of the ticket.
!H P 14 0
normal resolution, (5.7dots/mm).
!H P 14 1
high resolution (8.5 dots/mm).
3 Default
0 Min
15
10 Max
Encoding retries
Sets how many times a ticket should be encoded/verified before being erased and voided when the verification fails.
!H P 15 5
Makes five encoding attempts per ticket before giving up and erasing and voiding the ticket.
NOTE!
See also
!P
Default parameter settings
0705 TTPM3 Printer/Encoder–Technical Manual 63
3 Default
0 Min
16
10 Max
Encoding attemps, No. of tickets
Attempts
are the number of tickets the TTPM3 should attempt to encode when verification fails. If set to 1, one ticket is encoded and if verification fails the stripe is erased, VOID printer on the ticket and an error code sent to the system.
!H P 16 2
Two tickets will be used before giving up.
NOTE! — See also
!F M
50 Default
1 Min
17
250 Max
Beak feed length
Determines how far the ticket should be fed out after the last pixel line is printed.
22 Default
1 Min
18
50 Max
Cut position (Short tickets)
Determines how far the ticket should be fed from when the sensor before the cutter sees the trailing edge, and the ticket is being cut. One step is 0.4 mm.
1 Default
0 Min
19
1 Max
Bit order for !B 1
1 means normal bit order, and 0 means reversed bit order for binary encoding of track 1 using the
!B 1
command.
Normal means that a hex nibble 01h is encoded as 0001 (seen from the edge of the ticket that enters first when feeding in a ticket from the rear entries). Reversed means that the same nibble is encoded as 1000.
!H P 19 0
Reverses the bit order on track 1.
1 Default
0 Min
20
1 Max
Bit order for !B 2
1 means normal bit order, and 0 means reversed bit order for binary encoding of track 2 using the
!B 2
command.
1 Default
0 Min
21
1 Max
Bit order for !B 3
1 means normal bit order, and 0 means reversed bit order for binary encoding of track 3 using the
!B 3
command.
0 Default
32 Min
31
255 Max
Character sent after print
An ASCII character can be returned to the host after a completed ticket generation.
!H P 31 3
The character 03h (ETX) will be sent by TTPM when the last pixel line of the ticket has been printed.
Default parameter settings
64 TTPM3 Printer/Encoder–Technical Manual 0705
94 Default
0 Min
32
255 Max
Long ticket length
This parameter adjusts the transition between short and long ticket.
CAUTION! — Do not change unless you are told by Swecoin Technical Support to do so.
10 Default
0 Min
33
255 Max
Top Margin, short ticket
The start of print is measured from the rear edge of the ticket and this parameter can be used to adjust the start of print.
123 Default
32 Min
34
255 Max
Fixed ticket length
Length of ticket in fixed length mode. Fix length means that there is no gaps or black marks to control cut. The printer counts steps from the leading edge of the ticket and cuts when fed to the setting of this parameter.
196 Default
32 Min
35
255 Max
Feed after black mark in black mark mode
The printer counts steps from the middle of the black mark, and cuts when fed to the setting of this parameter.
12 Default
1 Min
36
16 Max
Character pitch for font 1
This parameter is used if the width parameter in the !F command is set to 1.
NOTE! — See also
!F T
1 Default
0 Min
37
1 Max
Paper out behaviour
The printer sends NAK P when a !P is received and the printer is out of paper. This parameter decides what the printer should do with ticket data when out of paper.
!H P 37 0
The printer discards all data until paper is loaded.
!H P 37 1
The printer waits for paper to be loaded and then print the ticket from memory
280 Default
0 Min
38
400 Max
Steps after which the print motor is started for long tickets
If long tickets are used, the print motor must start before the ticket is cut. This parameter sets when to start the print motor. One step is 0.4 mm.
27 Default
0 Min
39
100 Max
Cut position (Long tickets)
Determines how far the ticket should be fed from when the TOF sensor sees the trailing edge, and the ticket is being cut. One step is 0.4 mm.
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.
68
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.
Error codes and Status reporting
66 TTPM3 Printer/Encoder–Technical Manual 0705
usable ticket. In such case you should not issue a new ticket unless you get the
NAK
G
that shows that the almost ready ticket has been voided.
5. A critical error status message informs the host computer if something happens in the printer that requires the operator to power it off.
7.3 Errors
TTPM3 reports error conditions in the form of error codes. An error condition is reported as a
NAK
(15H) followed by a one-character error code. The error codes have been
defined, starting with ASCII character "1" (31H) according to the following table:
"1" No paper in the entry path selected with
!L1, !L2, !L17
, or
!L18
.
"2" Paper jam when executing
!L1, !L2, !L17
, or
!L18
. "3" Reserved. "4" Cutter error. No full cut performed. Cutter blade returned to home position by
reversing the cutter motor. "5" Cutter error. Cutter blade not returned to home position. "6" Cutter error. Cutter blade not moving. If this error code is received
immediately after power ON, it indicates that something is wrong with the
+24V supply. "7" Paper jam when executing the !P command. "8" Magnetic encoding on track 2 (or center track) failed. "9" Magnetic encoding on track 1 or 3 failed. "A" Not possible to read magnetic information with
!D, !D1, !D2
, or
!D3
commands. ”B” No document inserted within time limit following an
!L3
command (front
load). ”C” Document inserted (front load) but immediately retracted. ”D” Document inserted through front load is blocked. ”E” Document blocked in the front load input feeder during an
!L3
command. Also used when combining the characters | and } in a hex magnetic string to get normal behavior if the encoding was successful. If an error occurs then the ticket is transported back to the start position and
NAK E
is sent.
“G” Document found in the ticket path during power on has been erased, VOID-
printed and ejected.
“P” If
!P
is sent to the printer and paper is out, it replies with
NAK P
and
discards data.
"X" Critical error. This is issued when the printer must be turned off, error
condition cleared, then turned off again.
NOTE! – For TTPM3 to send ACK, or NAK + error codes, the DIP-switch 6 on the
TTPM3 control board must be set to ON. Position OFF places the unit in a silent mode preventing these codes from being transmitted to the host computer.
Error codes and Status reporting
0705 TTPM3 Printer/Encoder–Technical Manual 67
7.4 Extended acknowledgement
It is possible to extend the acknowledgement procedure so that most commands are acknowledged by the printer.
To enable the function you have to the send the command:
!CA
A ticket should therefore always start with the commands:
!C
!CA
The extended acknowledgement is a command number appended to the ACK. The command number is a 1 byte hexadecimal number according to the following table.
Command Acknowledgement When?
Normal Extended
!P 06h 06h 80h
06h 02h
After a successful magnetic encoding. After printing.
!C 06h 04h
After clear memory
!F 06h 05h
After formatting data in memory
!L 06h 08h
After successful track load / eject operation
!L 17 06h 06h 08h
When the lower input contains ticket stock
!L 18 06h 06h 08h
When the upper input contains ticket stock
!L 3 06h 06h 08h
When a ticket has successfully been loaded from the front to the upper input track.
!L 4 06h 06h 08h
When successful eject through front entry
!E 06h 09h
After successful eject through rear entry
!Q 06h 14h
After transaction string is written in memory
!Z 06h 18h
After burn time is changed
!X 06h 19h
After changed resolution
The following is a simple example:
Sent to printer Acknowledgement
!C 06h 04h !C A 06h 04h !F T E 309 014 10 03 02 1 "TEST TICKET WITH FULL" 06h 05h !F T E 259 024 10 03 02 1 "75 BPI TRACK 2 STRING" 06h 05h !M 1234567890123456789012345678901234567 06h 80h !P 06h 02h
Maintenance
68 TTPM3 Printer/Encoder–Technical Manual 0705
8 MAINTENANCE
8.1 Fault finding
In connection with service of the printer it is good practice to remove paper dust and lint from the paper path, cutter and sensor areas. Paper dust, when accumulated, may interfere with printer functions such as optical sensors.
To avoid smudging the paper, do not apply oil on the cutting knife.
Symptom Suggested actions
Nothing is printed when you press the feed button in self-test mode, but the document is transported, cut and ejected.
Check that the paper roll is turned the correct way with
thermal sensitive layer facing up.
Check that the paper used meets the paper
Check that the printhead cable is fully inserted into the
connectors at each end.
Paper jam
Check cutter-home sensor.
Printer does not work at all
Check that the printhead is closed.
Check that power is supplied to the printer.
Check the function of the paper-out sensor.
Self-test prints OK, but the printer works strangely in normal operation.
Check that both ends of the interface cable are
properly connected.
Application program might be incorrect. Contact system
manager.
No cutting
Check that the connector for the cutting motor is fully
seated on the control board.
Bad cutting (uneven top and bottom document edges).
Switch OFF printer and remove any obstructing paper
particles in cutter and presenter modules.
Inconsistent cutter operation
Check/clean cutter-home sensor.
Paper is fed straight through the printer. Paper does not loop.
Check/clean presenter sensor.
Check setting of parameter p9.
Missing print or irregular spots.
Paper may be too humid. Let it adapt to ambient
temperature and humidity for approximately 24 hours before use.
The paper used might not meet the paper specification.
White longitudinal lines in the printout.
Faulty print head, replace.
Faint print.
The paper used might not meet the paper specification.
Clean print head with ethyl or isopropyl alcohol.
Adjust print contrast, see page 60.
Strange characters or graphics printed, or any kind of strange printer behavior.
Might be caused by erroneous data sent from the host.
Check validity of transferred data.
Table 2. Faultfinding
Maintenance
0705 TTPM3 Printer/Encoder–Technical Manual 69
8.2 Cleaning the print head
The print head can be cleaned without removal.
1. Open the printhead.
2. Clean the heat elements with a cotton swab immersed in ethyl or isopropyl alcohol.
8.3 Firmware
The firmware is stored in flash-PROM on the control board. A replacement control board may not contain the same firmware version that you are currently using, so if you replace control board for some reason, upgrade it to the firmware version you want to use.
8.3.1 Loading
Firmware is loaded through the serial port of the TTPM3.
Fetch the firmware from the Swecoin web site http://www.swecoin.se
. There you will also find the TTP Editor (Windows™ software) you use for loading the firmware into the printer.
1. Start the TTP Editor and select settings, Printer type TTPM3, and set the Comm settings to the port etc. that you use.
2. Select Settings, Debug Window, and click on “Text”.
3. Move the debug window so it does not cover the TTP editor. (The debug window will show status during program loading and must be open)
4. Select Advanced TTP features, and firmware load, and follow the instructions on the screen.
NOTE! — The connector that must be short circuited with a jumper during program
loading is located close to the power connector. If you have a desktop version of the TTPM3, a hole in the bottom of the cover gives access for the jumper.
Specifications
70 TTPM3 Printer/Encoder–Technical Manual 0705
9 SPECIFICATIONS
9.1 Interface description
The TTPM3 communicates through an RS232 serial interface.
9.1.1 Setup options
Baud: 2 400, 4 800, 9 600, 19 200, 38 400, 57 600, and
115 200
bits/s
Flow control: None, Xon / Xoff, or
Hardware
Data bits: 8 (fixed) Stop bits: 1 (fixed) Parity:
None
, Odd, or Even
Default settings: 115200 bits/s, 8-bits, No parity, 1 stop bit, and hardware flow control.
See also: Default parameter settings on page 25
9.1.2 Communications protocol
The protocol is 8 data bits, 1 stop bit, and no parity. Handshaking is DIP-switch­selectable, either or RTS/CTS or XON/XOFF (parameter n4).
Recommendation – Use RTS/CTS hardware handshake (parameter n4=2) and
ACK/NAK + error code enabled (parameter n5=0)
9.1.3 Communications cable
Use a 9-pin serial cable to connect the TTPM3 printer to the host computer.
Such a cable is available from Swecoin. Part number 10825-000. The cable is 1.5 m long with 9-pole D-sub connectors at both ends (PC and TTPM3).
Printer
PC
Female
594837261
Female
594837261
2RxDRxD2 3TxDTxD3
9RIRI9
6DSRDSR6
8CTSCTS8
4DTRDTR4
7RTSRTS7
1DCDDCD1
5GNDGND5
Serial Cable 10825-000
Figure 3. Serial connector pin assignment
NOTE! — This cable is not connected as a standard null-modem cable.
So we recommend you to use the original cable from Swecoin or manufacture a cable according to the above drawing. If you use a null-modem cable, you will lose data in the transfer to the printer.
Specification subject to changes without notice.
Specifications
0705 TTPM3 Printer/Encoder–Technical Manual 71
9.2 Document stock
The TTPM3 printers are produced and calibrated for, and tested with the customer’s ticket stock. To ensure accurate ticket issuing, we do require 100 tickets of the customer ticket stock for each ordered printer.
9.2.1 Ticket base material
Type of paper Ricoh 150UT 240µ, Mitsubishi TF 2475, and Tyco Sharkskin
are recommended. See www.swecoin.se
for current
recommendation.
Material Paper, 100 % chemical pulp, no ground wood permitted
Triplex
1
laminate2
Plastic (polypropylene Sharkskin
TM
)
Stiffness 18–36 g/cm (in grain direction)
Thickness Paper and laminate: 0.18–0.40
3
mm, 170–210 g/m²
Plastic (polypropylene Sharkskin
TM
): 0.18–0.25 mm
Factory setting: Set to the customer’s tickets. A minimum of 100
tickets per printer ordered must be sent to Swecoin when ordering printers.
Curl Deviation from flatness < 0.6 mm across the length, width, or
diagonal of the ticket
9.2.2 Coating and preprint
Thermal coating Shall meet or exceed the ANSI 3.11 specification
Smoothness: Max. 75 Sheffield units
Properties: Same as fax grade 3
Top coating The thermo-sensitive surface of the document stock can be
provided with a protective UV or moisture proofing top coating
Preprint Tickets can be preprinted on one, or both sides.
Ink for thermo-sensitive side: Laser printer approved ink with­ out whiteners
Ink for magnetic stripe side: Offset ink
CAUTION! – Never use abrasive inks as they reduce the life of the thermal print head.
1
Triplex is manufactured from three paper stocks. The middle is usually recycled paper, and the top and bottom are different papers.
2
Laminate with plastic core may destroy the printhead! DO NOT USE.
The perforation of the tickets may leave parts of the plastic core protruding through the surface of the ticket. These plastic tongues may scratch the printhead, and also build up static electricity discharging through the printhead. This
may seriously limit the printhead life.
If plastic laminate still is used, care must be taken in the manufacturing process to avoid the plastic protrusion, and the printer must be life-tested with the intended stock before taken into use.
3
0.18-0.32 mm for Frontload 1 and Frontload 2 versions of the printer
Specifications
72 TTPM3 Printer/Encoder–Technical Manual 0705
Thermal-print to preprint alignment
Tolerances in the printer, and in the ticket stock itself, can
cause misalignment between the preprint of the ticket stock and the thermal print. The ticket guides in the printer are set at
54.3 mm. Narrower guides would cause paper jam when the relative humidity changes the ticket width. A ticket width of 54.0 ± 0.2 mm gives a maximum misalignment of 0.55 mm (54.3 + 0.05 – (53.3 – 0.2)).
HINT! – Avoid designing tickets that require close alignment between preprint and
thermal print.
9.2.3 Magnetic media
Magnetic stripe Side stripe positioned according to ISO 7811/2
Center stripe (option)
Magnetic media Full tape, transfer tape or slurry
CAUTION! – In case of slurry, care must be taken to avoid excess slurry material and
abrasive particles that may cause unduly high degree of wear on the magnetic recording and read heads in the TTPM3
Coercivity Adjustable between 300 and 3500 Oersted
Factory set to: LoCo: 300 Oersted
HiCo: 2750 Oersted (option)
Non-standard coercivity setting available on request
If a ticket is perforated, for stub separation for example, the perforation shall not infringe on the magnetic track to prevent interference with magnetically encoded data.
Track 1 Track 2 Track 3
Center Track
Track widths:
Tracks 1, 2, and 3: 3.1 mm Center track: 7 mm
 
Transport direction
Ticket viewed from bottom (magnetic stripe side)
7.06 mm
10.36 mm
13.92 mm
Figure 19. Position of the magnetic stripe.
Specifications
0705 TTPM3 Printer/Encoder–Technical Manual 73
9.2.4 Ticket dimensions and perforation
NOTE! — ISO No. 7810 says that “all points on the edges of the card in the finished
state, except for the rounded corners, shall fall between two concentric, similarly aligned rectangles which are dimensioned as follows:
- Outer rectangle: width 85.72 mm, height 54.03 mm
- Inner rectangle: width 85.47 mm, height 53.92 mm”
Remember these measurements when ordering tickets to be sure that they work in any
ISO 7810 compliant equipment.
Stock format Fanfold1 gapped or non-gapped consecutive form tickets. Sheet-cut (single) tickets for manual or dispenser loading. Perforation cut direction Perforation and cutting of ticket material must be done from the
thermally sensitive side of the paper.
TTPM3 accepted sizes:
- Ticket width 54 mm ±0.2 mm
2
- Ticket length 85.6 ± 0.25 mm, or 110 -150 mm
- Corner radius 3.18 mm ± 0.30 mm (0.125" ± 0,012") (preferably without minus tolerance). Care should be taken to avoid misalignment between the rounded corners and the straight edges of the card. The corner radius is for optical detection of top-of form.
Card edges Edge burrs normal to the card face shall not exceed 0.08 mm
(0.003”) above the card surface.
1
On request, versions for roll paper can be built. Requires testing with customer paper.
2
When the width of the ticket exceeds 54.10 mm, machine reading problems may occur.
Specifications
74 TTPM3 Printer/Encoder–Technical Manual 0705
Gapped tickets Two bridges according to Figure 20.
2 mm
R 3,18mm
L ± 0.25
54 ± 0.2 mm
38 mm
L= 85.6 (standard as per ISO 7810) L= 110 – 150(customer special)
6 ±0.5
8 ±0.5
Figure 20. Gapped tickets
Non-gapped tickets Equal distance between tabs according to Figure 21.
R 3.18mm
L ± 0.25
54 ± 0.2 mm
L= 85.6 (standard as per ISO 7810) L= 110 – 150(customer special)
Tabs
Figure 21. Non gapped tickets (for printers with burst separator)
Specifications
0705 TTPM3 Printer/Encoder–Technical Manual 75
2 mm
R 3.18mm
L ± 0.25
54 ± 0.2 mm
38 mm
L= 85.6 (standard as per ISO 7810) L= 110 – 150(customer special)
8 ± 0.5 mm
Figure 22. Alternative non-gapped ticket profile.
Perforation for stub Placed at the trailing end of the ticket
Min. 85.6 mm
Transport direction
Ticket viewed from bottom (magnetic stripe side)
6 mm
Perforation not allowed within this 6 mm wide area
Figure 23. Stub perforation to create a tear-off tab.
TICKETS WITH 45° CUT CORNERS
Some applications are using tickets with cut corners without radius. These tickets are not within the specifications for use in the TTPM3 printer series. The effect will be that the ticket detection point moves about 1.3 mm, not only causing incorrect cut but also erroneous placement of the magnetic code.
The coding starts 1.3 mm too early resulting in synchronization zeroes being lost in the beginning of the ticket. On units configured for center track, the ticket should be readable in both directions. If synchronization is lost, the tickets will be readable if inserted one way, but not the other way around.
A solution to this problem is using HEX code for the magnetic message instead of ISO code. Thus you can compensate for the lost synchronization zeroes by adding additional
Specifications
76 TTPM3 Printer/Encoder–Technical Manual 0705
synchronization zeroes in the beginning of the message. However, note that HEX encoded tickets are normally not readable in standard ISO-card readers.
Ticket
movement
mm specified radius
mm trigger point movement with cut corners
1.3
3.18
SW97115
Figure 24. Ticket position is erroneously detected with 45° corners
9.3 Firmware
The firmware is stored in flash-PROM on the control board. A replacement control board may not contain the same firmware version that you are currently using, so if you replace control board for some reason, upgrade it to the firmware version you want to use.
Fetch the firmware from the Swecoin web site http://www.swecoin.se
. Instructions how to
load firmware using the Swecoin TTP Editor are bundled with the firmware.
Should you whish to integrate firmware loading into your own system, please read the “89c420 User Guide” available for download from www.maxim-ic.com
.
9.3.1 Firmware versions
FW Version TTPM2 TTPM3
Standard version, 3 track magnetic module - 30953-XXX
Standard version, 2 track magnetic module 00906-XXX 30906-XXX
Standard version with POWER ON CLEAR 00946-XXX
16
Hebrew 01661-XXX 31661-XXX
FL
and
2 inputs 01741-XXX
1
Cyrillic 01751-XXX 31751-XXX
No cutter 01785-XXX 31785-XXX
161BPI Track 2 only 01789-XXX 31789-XXX
105BPI track 2 only 01790-XXX 31790-XXX
No encoding 01794-XXX 31794-XXX
No black mark and no gap 01805-XXX 31805-XXX
16
Selected with parameters in standard firmware
Specifications
0705 TTPM3 Printer/Encoder–Technical Manual 77
9.3.2 Firmware history
Functions and features are being added from time to time affecting the firmware in the TTPM3. The following table lists the changes of general interest.
FW revision Change
4.60 First firmware version released to a customer
Index
78 TTPM3 Printer/Encoder–Technical Manual 0705
10 INDEX
A
ACK/NAK.... 22, 32, 64, 65
B
Bar-code................. 21, 38
Baud rate...................... 58
BMP-files...................... 37
Bold text .......................54
Burn time................ 59, 60
Buttons .........................12
Byte-counter ................. 64
C
Carriage Return............ 20
Center track..................73
Center track tickets....... 74
Checksum ....................44
Cleaning the printhead .68
Coating and preprint..... 70
Code 39........................ 39
Coercivity...................... 71
COM port........................ 7
Command
acknowledgment....... 22
Command syntax .........20
Commands
Document entry
related ..................25
Magnetic
encoding/decoding26, 42
Print related........ 26, 34
Summary.................. 25
System related .........25
Communications cable .69 Communications
protocol..................... 69
Converting graphics ..... 37
Corner radius................
Se
Critical error..................65
Current consumption11, 61
Cutter error ................... 65
D
Data bits .......................69
Decimal ........................24
Decimal codes.............. 56
Decoding ......................43
Default parameters....... 55
Default settings
Serial interface .........69
store .........................48
Document
Dimensions............... 71
Examples.................. 51
Front entry................ 14
Rear entry................. 13
Stock ........................70
Document-entry
commands................ 25
E
EAN13.......................... 39
Eject document
Into waste bin........... 33
Via front document
entry ..................... 33
Encoding attributes ...... 44
Error codes................... 65
Error handling............... 15
F
Fault finding.................. 67
Firmware
loading ............... 68, 75
Firmware history........... 75
Flow-control............ 58, 59
Font.............................. 35
Fonts
loading ..................... 50
Format
Graphics printing ...... 25
Print field type, size,
position, orientation34
Text printing35, 36, 38, 40
Front load..................... 17
Full tape ....................... 71
G
Gapped tickets ............. 72
Graphics....................... 21
Converting to TTPM2
format................... 37
Data ......................... 36
Ground ........................... 7
H
Hardware handshaking 58
Hex............................... 24
Hex codes .................... 56
Hico.............................. 71
I
Indicators...................... 12
Initialize
Command........... 16, 20
Installation...................... 6
Interface description..... 69
Inversed text
See Reversed text
L
Laminate ...................... 70
Line Feed ..................... 20
Load document from
front entry................. 32
Loading firmware.......... 68
Loco ............................. 71
Logotypes..................... 50
Lower document entry.. 13
M
Magnetic codes.............21
Magnetic encoding
Attributes...................44
Commands .........26, 42
Failiure ......................65
Retries ......................45
Magnetic media.............71
Magnetic stripe..............71
Orientation ................13
Maintenance .................67
Memory.........................23
Mnemonic .....................24
Moisture proofing
coating ......................70
N
n1, n2, etc. ....................24
NAK 1 ...........................65
NAK 2 ...........................65
NAK 4 ...........................65
NAK 5 ...........................65
NAK 6 ...........................65
NAK 7 ...........................65
NAK 8 ...........................65
NAK 9 ...........................65
NAK A ...........................65
NAK B ...........................65
NAK C...........................65
NAK D...........................65
NAK E ...........................65
NAK G...........................65
NAK X ...........................65
No document inserted...65
No paper .......................65
Noise, excessive.....60, 61
Non gapped tickets .......73
Nonvolatile RAM .....23, 64
O
Operation ......................15
Orientation ....................35
Output tray ......................9
P
Paper ............................70
Loading .....................12
Out indication............12
Paper jam ...............14, 65
Parameters ...................55
reset to default ..........57
set.............................48
store..........................48
Parity.............................69
Perforation ....................72
Pin assignment
Serial port .................69
Plastic ...........................70
Positioning data ............22
Power connection .........11
Index
0705 TTPM3 Printer/Encoder–Technical Manual 79
Power failure ................15
Power up ...................... 15
Preprint......................... 70
Print.............................. 30
Commands ............... 34
Format parameter
commands............ 26
Speed....................... 38
Print speed ....... 60, 61, 62
Printer mechanism ....... 10
Printing
Capability.................. 21
Printout
Triggering .................22
Programming................ 56
Progress indicator25, 29, 30, 31, 32, 33, 34, 35, 36, 38, 40, 42, 43, 64
Pushbuttons .................12
R
RAM .............................23
Read-after-write
Cancel ......................44
Reading and decoding.. 43
Reversed text............... 54
RTS/CTS...................... 69
S
Select document entry
Lower rear32, 33, 34, 35, 36, 38, 40 Lower rear, and signal
paper out.............. 34
Single-ticket handling ... 16
Slurry............................ 71
Specifications ............... 69
Start-up ........................ 15
Start-up synchronization15
Status request.............. 29
Stock format................. 71
Stop bit......................... 69
Store parameters ......... 48
Summary of commands 25
Syntax .................... 20, 27
System commands....... 25
T
Text .............................. 21
Text attributes ...............54
Ticket base material......70
Ticket dimensions .........71
Tickets with 45° cut
corners......................74
Top coating ...................70
Transfer tape ................71
TTPM editor ..................37
U
Upper document entry ..13
UV coating ....................70
W
Windows ...................2, 68
Windows bitmap............37
X
Xon / Xoff......................58
XON/XOFF ...................69
Loading...