background image

 

 

Error codes and Status reporting 

0705 

TTPM3 Printer/Encoder–Technical Manual 

65 

ERROR CODES AND STATUS REPORTING 

The host computer uses the TTPM3 status reporting to determine if the print cycle has 
been completed or not. If not, error codes help determine what went wrong.  

7.1 Status 

When executing the print command 

!P

, the printer confirms that the magnetic code is has 

been written and verified by sending an ”

ACK

” (06H) to the host. This indicates that the 

ticket in almost ready and should just pass the printhead and be outputted to the 
customer. You can extend the acknowledge procedure to send acknowledge for other 
things than magnetic encoding. See command 

!C A

If you select a character by setting parameter 31, that character will be sent when the 
when the print cycle is completed, which is when the ticket leaves the printhead. At this 
stage you can be reasonably certain that the ticket has been correctly issued, and you 
can proceed with the next ticket.  

You can at any time

1

 read the sensors in the printer with the “

ENQ

” (05H), and 

!S

 

commands. See page 30. 

7.2  Security additions  

Status reporting is used as a security measure to ensure that no manipulation has 
occurred that makes it possible to issue more tickets than intended. 

1.  If  “Auto Clear at Startup” is enabled (parameter 8) the printer it looks for any 

unfinished ticket, voids it, and then issues an 

NAK G

 error code to inform about this.

 

 

2.  If “Character sent after print” is selected (parameter 31) the printer issues that 

character, for example 

ETX

 (03H), to tell that the print cycle has been completed. 

3.  A transaction string can be appended to the ticket data using the 

!Q

 command. The 

string is stored in nonvolatile memory when the 03H is issued. This string can be read 
by the 

!V

 command, but there is no way to change the string other than issuing a 

new ticket. 

4.   During printing, a byte-counter is incremented and stored in the RAM. The counter 

starts at zero, and when the ticket is ready the counter has reached 5BE0h, which is 
23520.  
Dividing the byte counter value by the number of pixels on a line (384) gives the 
current pixel line. When the ticket is completed, we have printed 

61.25

384

23520

=

 

bytes of pixel lines in the y-direction. 61.25 x 8 = 490 pixel lines. You have 5.7 pixel 
lines/mm. 

6

8

5.7

490

=

 mm which is one ticket length.  

Should a power failure occur, before the counter reaches the full value (5BE0h) you 
can analyze the counter value to see if the ticket was as ready enough to pass as a 

                                                      

1

 After a power off, the printer must first receive a !C or !P before answering status queries. 

Summary of Contents for TTPM3

Page 1: ...Publ No 104860 Ed AX May 28 2007 TTPM3 Printer Encoder Technical Manual...

Page 2: ...05 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 cor...

Page 3: ...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 co...

Page 4: ...anges 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 m...

Page 5: ...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 com...

Page 6: ...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 low...

Page 7: ...n 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 fr...

Page 8: ...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...

Page 9: ...rinted 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 th...

Page 10: ...roper 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...

Page 11: ...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...

Page 12: ...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...

Page 13: ...rinter 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 t...

Page 14: ...val 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...

Page 15: ...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 che...

Page 16: ...o 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 TTPM...

Page 17: ...ng 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 exi...

Page 18: ...s 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 tr...

Page 19: ...ject 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...

Page 20: ...pace 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 q...

Page 21: ...ics 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 c...

Page 22: ...r 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 t...

Page 23: ...ell 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 p...

Page 24: ...n 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 a...

Page 25: ...solution 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 thro...

Page 26: ...rmat 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...

Page 27: ...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 t...

Page 28: ...t 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 Deci...

Page 29: ...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 actuall...

Page 30: ...ting 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 setti...

Page 31: ...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 al...

Page 32: ...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...

Page 33: ...cimal 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...

Page 34: ...4 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...

Page 35: ...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 th...

Page 36: ...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 th...

Page 37: ...e F G N 140 140 1 1 7 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 u...

Page 38: ...wnloading of bar code data is as follows FC orientation xpos ypos bar1 height bar2 type _ barcodedata F Command to load print parameter information C Indicates bar code mode orientation Indicates prin...

Page 39: ...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...

Page 40: ...ll 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 att...

Page 41: ...Programming 0705 TTPM3 Printer Encoder Technical Manual 41 Figure 16 Indication of 1st and 2nd unsuccessful read after write...

Page 42: ...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...

Page 43: ...l 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 th...

Page 44: ...n 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 f...

Page 45: ...e 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 in...

Page 46: ...00 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...

Page 47: ...ag 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...

Page 48: ...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...

Page 49: ...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...

Page 50: ...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 lo...

Page 51: ...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 Logotyp...

Page 52: ...er 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 num...

Page 53: ...tomatically 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 mag...

Page 54: ...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...

Page 55: ...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...

Page 56: ...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...

Page 57: ...int 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...

Page 58: ...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...

Page 59: ...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...

Page 60: ...n 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...

Page 61: ...pplication 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 star...

Page 62: ...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 chas...

Page 63: ...p 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 i...

Page 64: ...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...

Page 65: ...d 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 co...

Page 66: ...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 info...

Page 67: ...r 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 upp...

Page 68: ...ly 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 cutt...

Page 69: ...e 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 se...

Page 70: ...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 i...

Page 71: ...pecification 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 t...

Page 72: ...o 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 un...

Page 73: ...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 accepte...

Page 74: ...4 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...

Page 75: ...t 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 inco...

Page 76: ...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...

Page 77: ...anual 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 Chang...

Page 78: ...y 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 Graphi...

Page 79: ...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 syn...

Reviews: