Star Micronics TCP300 Programmer's Manual
Star Micronics TCP300 Programmer's Manual

Star Micronics TCP300 Programmer's Manual

Tcp300 series
Hide thumbs Also See for TCP300:

Advertisement

TCP300 Series
Programmer's Manual
Third Edition: August 7, 2003
Star Micronics Co., Ltd.
Special Products Operating Division

Advertisement

Table of Contents
loading

Summary of Contents for Star Micronics TCP300

  • Page 1 TCP300 Series Programmer’s Manual Third Edition: August 7, 2003 Star Micronics Co., Ltd. Special Products Operating Division...
  • Page 2: Table Of Contents

    Error displays ......................71 Loading Setting Cards....................72 Self-test Operation ..................... 72 Trademark acknowledgments TCP300: Star Micronics Co., Ltd. Notice • All rights reserved. Reproduction of any part of this manual in any form whatsoever, without STAR’s express permission is forbidden.
  • Page 3: Application

    APPLICATION This manual describes the commands relating to the TCP300 and TCM300 series visual card reader/writer. PRECAUTIONS FOR PROGRAMMING AND FOR HANDLING • The volatile memory writing life is approximately one million times. The expected life will be reached by frequent use, which can cause problems in the operation of the visual card reader/writer.
  • Page 4: Specifications

    SPECIFICATIONS Communication Procedures This device communicates with its host using block transmissions that can request a resend. When communications are started from the host, the host will transmit a command block to the reader/writer. When the reader/writer receives the command block, it will respond with either of the characters of ACK (normal), NAK (resend request) or DLE (reject).
  • Page 5 Resend Sequence Host Reader/writer Command sent Command received NAK received NAK sent Command resent Command received ACK received ACK sent Command processed Response received Response sent NAK sent NAK received Response received Response resent ACK sent ACK received DLE Sequence Host Reader/writer Command sent...
  • Page 8: Command And Response Transfer Formats

    Command and Response Transfer Formats Command Transfer Formats Commands Data String Response Transfer Format Commands Status Data String Data string must be within 1024 bytes. BCC is an exclusive logic sum from the command to ETX. Transmission Control Characters The following shows the transmission control character codes and functions. Character Code Function...
  • Page 9: Retrying And Verifying

    Retrying and Verifying The visual card reader/writer will retry to read or to write to a card when it fails to read or write data to the magnetic stripe. (This is when a retry count is set.) When the set number of failures to read or to write is reached, reading or writing is canceled. The device rereads the magnetic stripe after writing thereto.
  • Page 10: Commands And Status Lists

    Commands and Status Lists Command List Code Content of Command Model Class First track read command Second track read command 300/310 Third track read command First track read (Status with no card) command Second track read (Status with no card) command 300/310 Third track read (Status with no card) command First track buffer read command...
  • Page 11 Other commands Model setting command Media setting Model Details 300: 1 Track magnetic head model (TCP300**) 310: 3 Track magnetic head model (TCP310**) FROM 2 Model: Model has optional second FROM mounted on main PCB. Ask our sales staff or our sales representative for details when purchasing.
  • Page 12 Status List The following shows the content of status. Everything other than code 20h is notified as an error. Error notification codes may change or be added to without prior notice. Undefined statuses are reserved for the system. Code Status Content Rank Normal No target card (only when using a no card status command)
  • Page 13: Command Details

    The starting symbol in the magnetic stripe automatically determine what format to use to read the card. Note that this command cannot be used with on models with one magnetic stripe (TCP300). Details of Operation If a card is idling in the machine, this will read the magnetic stripe on the idling card.
  • Page 14 • 6-bit format conforming to ISO 7811/2 first track • 4-bit format conforming to ISO 7811/2 second and third tracks Note that this command can be used with on models with one magnetic stripe (TCP300). See the first track read command for details on other descriptions and operations.
  • Page 15 The starting symbol in the magnetic stripe automatically determine what format to use to read the card. Note that this command cannot be used with on models with one magnetic stripe (TCP300). Details of Operation If a card is idling in the machine, this will read the magnetic stripe on the idling card.
  • Page 16 • 4-bit format conforming to ISO 7811/2 second and third tracks Note that this command can be used with models with one magnetic stripe (TCP300). See the first track read (status with no card) command for details on other descriptions and...
  • Page 17 • 4-bit format conforming to ISO 7811/2 second and third tracks This command cannot be used with on models with one magnetic stripe (TCP300). See the first track read (status with no card) command for details on other descriptions and...
  • Page 18 • 4-bit format conforming to ISO 7811/2 second and third tracks See the second track read command for details. Note that this command can be used with on models with one magnetic stripe (TCP300). Command Transfer Formats Response Transfer Formats...
  • Page 19 The starting and ending symbols, LRC and parity bit on the magnetic stripe are all automatically applied. A reject response is issued when an error is detected in the write data. Note that this command can be used with on models with one magnetic stripe (TCP300). Command Transfer Formats...
  • Page 20 The starting and ending symbols, LRC and parity bit on the magnetic stripe are all automatically applied. A reject response is issued when an error is detected in the write data. This command cannot be used with on models with one magnetic stripe (TCP300). Command Transfer Formats...
  • Page 21 (14) ISO type second track data setting command (Model: TCP300/310) This command sets the second track write data. The magnetic format of the write data corresponds to the following formats, but the format that is set abides by the content of the preset memory switches. See Model Setting Commands (91h) for details.
  • Page 22 ‘6': Enable magnetic writing to tracks 2 and 3 ‘7': Enable magnetic writing to tracks 1, 2 and 3 Only parameter 2 is enabled with a 1-track model (TCP300**) for the number of tracks of magnetic stripes. If a card is not inserted after this command is issued, or to cancel the command, issue the card insertion wait status cancel command (54h).
  • Page 23 Enable magnetic writing to tracks 2 and 3 ‘7': Enable magnetic writing to tracks 1, 2 and 3 Only parameter 2 is enabled with a 1-track model (TCP300**) for the number of tracks of magnetic stripes. Command Transfer Formats Write track specification...
  • Page 24: Print And Erase Commands

    Print and Erase Commands The speed to write and erase switches according to the ambient environment and card media. To perform a timeout, set the timeout value according to the environment of use. Print expansion buffer clear command This command clears the print expansion buffer. Image data is expanded in the print expansion buffer by the character (including external characters) by the print character data setting command (41h), and the internal image data expansion command (42h).
  • Page 25 Print character data setting command This command expands character data to be printed (including external fonts) in the print expansion buffer. The print data string is composed of the print control header string and the print text data string. The print control header string is composed of the card arrangement direction parameter, the X coordinate specification parameter string, the Y coordinate specification parameter string, and a comma for separating each parameter.
  • Page 26 Print control header string and print text data description example VISUAL CARD1.COMMUNICATION (&H41, “2,0,23, STAR Micronics (Corp.)”, 0, FALSE ); This expands “STAR Micronics (Corp.)” by additional writing to a vertical card at the (X coordinate and Y coordinate) = (0, 23).
  • Page 27 Text data string • Print text Print text prints 1-byte characters (single byte characters) (prints two byte characters even with 1 byte data when ANK characters are specified as two byte characters with the ESC control statement) and two byte Chinese characters (Japanese specifications: Shift JIS code; Taiwanese specifications BIG5;...
  • Page 28 • ESC I This expands a specified 16 dot 2-byte external characters font in the print expansion buffer memory. ESC ‘I’ next parameter range: ‘0’ to ‘F’ 1 digit configuration ESC “I0” ESC “I1” ESC “I9” ESC “IA” ESC “IE” ESC “IF”...
  • Page 29 • ESC M/m Sets the dot spaces between lines ESC ‘M’/”m” next parameter range: “0” to “F” 1 digit configuration • ESC X/x Sets the X coordinate to expand characters. ESC ‘X’/’x’ next parameter range: For vertical cards: “000”’ to “319” 3 digit configuration For horizontal cards: “000”...
  • Page 30 • ESC B/b Specifies the line width of ANK characters. ESC ‘B’/”b” next parameter range: ‘0’ to ‘2’ 1 digit configuration ESC “B0” Specifies normal narrow gothic fonts. ESC “B1” Specifies enhanced gothic fonts. ESC “B2” Specifies double-enhanced gothic fonts. •...
  • Page 31 Internal image data 1 expand command (Contact our sales representative for destination country.) This command expands images specified by an expansion image number from among the image data stored in the reader/writer flash ROM1. Image data is that which is expanded to the ROM1 image area. If within a capacity range, this is data of a BMP file (bit map file) on a Windows system, that stores up to 2000 files.
  • Page 32 • Expansion image specification number parameter Data count can be set to a maximum of 2000 files, so specify with characters from ‘0’ to “1999.” However, a reject response is issued if an image data that corresponds to the reader/writer flash ROM1 cannot be found.
  • Page 33 Composed of 80 byte data over the entire vertical area. LSB specifies the upper side bits; MSB specifies the lower side bits. In the example below, this is “3A.” Bit 0 ‘3’ (33h) Bit 1 Bit 2 Bit 3 Bit 4 ‘A’...
  • Page 34 • Expansion starting Y address parameter Specifies whether to expand the registered image Y address to the rasterized image register buffer. Becomes 0 when omitted. Specify in bytes (8 dot units). When making minute adjustments to the image print position in the Y direction, adjust the top and bottom margins on the image data.
  • Page 35 Y Coordinate Repeat Count *1 *1: The following equation is for the number of times to repeat the command (when the image data count is an integer magnification of the data length). Repeat count = X direction dot count/(image data count/data length)
  • Page 36 Two-byte external character font register command This command registers 24 dot or 16 dot two-byte fonts to the external character buffer to the volatile memory as external fonts. Along with sizes, 16 fonts can be registered. Reregistering set fonts overwrites the existing ones. Command Transfer Formats Font size ‘,’...
  • Page 37 Example Setting A B C D E F G H I J K L M N O P Q R S T U V W X Data “0,” Font number “001000001000081020101010” A to D string “20000840380400FE0000FF01” E to H string “80FF0380FF03C0FF07DEFFF7”...
  • Page 38 Single-byte external character font register command This command registers 24 dot or 16 dot single-byte fonts to the external character buffer of the volatile memory as external fonts. Along with sizes, 16 fonts can be registered. Command Transfer Formats Font size ‘,’...
  • Page 39 Erase + print discharge command This command prints while executing the erase operation on the print surface. If there is a card idling in the device, it executes the erase + print operations. If there is no targeted card, it will wait until one is inserted into the device, then perform the erase + print operations.
  • Page 40 (10) Print discharge command This command prints only to the print surface. If there is a card idling in the device, it prints to the card. If there is no targeted card, it will wait until one is inserted into the device, then starts printing. After printing, the device will either discharge the card according to the discharge method specification parameter or it will stop while idling and hold the card.
  • Page 41 (11) Erase discharge command This command erases the print surface. If there is a card idling in the device, it erases to the card. If there is no targeted card, it will wait until one is inserted into the device, then starts erasing. After erasing, the device will either discharge the card according to the discharge method specification parameter or it will stop while idling and hold the card.
  • Page 42 Command Transfer Formats Data ‘,’ Data arrangement ‘,’ Data arrangement arrangement X coordinate Y coordinate specification ‘,’ Expansion ‘,’ Expansion starting ‘,’ Expansion ending image specification number Response Transfer Format Status Parameter Explanation • Data arrangement specification parameter To specify whether to use the internal vertically or horizontally, select ‘0’ to ‘3.’ '0': Vertical card + overwrite '1':...
  • Page 43 • Expansion starting dot specification parameter The expansion starting dot is the BMP file height that corresponds from ‘0,’ minus 1. When it is not less than the expansion ending dot specification parameter, an error will occur. • Expansion ending dot specification parameter The expansion ending dot is the BMP file height that corresponds from ‘0,’...
  • Page 44 Notes: BMP files that can be registered: Using Microsoft Windows Paintbrush program canvas colors and sizes (Attributes): Must not exceed 320 for width and height simultaneously Must not exceed 480 for width and height Units are pixels . Color is black and white.
  • Page 45 Notes: To print a progress bar, the print results will vary depending on the arrangement of the card. The following shows the expansion direction and actual printing results. Po r t ra i t P r in t Landscape P r in t (0 , 0) X ax is (0 , 0)
  • Page 46 (13) BMP file registering command to internal image data 2 (EU/UK/US) (Contact our sales representative for destination country.) This command registers BMP files to the internal flash memory ROM2 image data area on the reader/writer. A maximum of 16 images can be registered. Command Transfer Formats Register image...
  • Page 47 (Space Page)
  • Page 48 Example Image Sample Contents of File...
  • Page 49 Example of Data Transmission to Flash 2 Data is separated for transmission because BMP images are large. A ‘+’ mark is necessary to indicate that the command continues into a second packet, and beyond. First Packet "0,424D1E1D0000000000003E00000028000000CB000000080100000100010000000000E01C0000C 40E0000C40E00000000000000000000FFFFFF00000000000000000000000000000007FFFFFF0000 000000000000000000000000000000000000000000001FFFFFFFC000000000000000000000000000 000000000000000000017FFFFFFFFFE000000000000000000000000000000000000000000001FF80 FFFFFFFC00000000000000000000000000000000000000000FFFFC10801FFFFFC00000000000000 0000000000000000000000007FFFFF8442420FFFFFF800000000000000000000000000000000001F FFFFFE2000100017FFFC000000000000000000000000000000001FFFFFFFF801244121007FFFC0...
  • Page 50: Card Commands

    Card Commands Card discharge command This command discharges a card. If there is a card in the device, this will discharge that card. The card follows the discharge method specification parameter and is either discharged to a position where it can be reused, or completely discharged. Cards that are discharged to the reuse position and cards completely discharged are both set to await being removed, and are not process targeted cards.
  • Page 51 Cannot be used with case accessory parts. Reject response is issued. Card front side idle command This command transports and waits cards to the idling position on the front side. Regardless of whether the card in the device is waiting to be removed or is a process targeted card, it is transported to the idling position on the front side of the device and is idled there.
  • Page 52 Card insertion wait status cancel command This command cancels the card insertion wait status. The state in which the device waits for a card to be inserted to the inlet, by the execution of the magnetic stripe read command, magnetic stripe write command, the erase + print command, the erase command or the card front/rear idle command is called the card insertion wait state, but this command cancels the card insertion wait state.
  • Page 53 Card ticketing command (mechanism part) This command uses the ticketing device to issue a card ticket, then waits. If a card is idling, the reject response is issued. Also, if a card waiting for removal is at the inlet, the device waits for that card to be removed, and then starts the ticketing operation after its removal.
  • Page 54: Information And Display Commands

    Information and Display Commands Status request command This command gets the status of the four card sensors in the device and the cover open sensor. The following shows the sensor status string for each character composed of six characters. Command Transfer Formats Response Transfer Formats Status Sensor status data string...
  • Page 55 Command Transfer Formats Response Transfer Formats Status information The following shows the response block ROM information data string. TCP300 1.00 X 1. Series name (Six characters: Mechanism part and TCP) 2. Specifications code (Two characters) 3. Blank 4. Fixed at V 5.
  • Page 56 Parameter Explanation • Control data string parameter The control data string is fixed to three bytes (to five bytes when there is a comma (,)). The contents are outlined below. Data String Contents First byte Buzzer setting data Second byte LED color setting data Third byte LED operation setting data...
  • Page 57 Print count request command This command requests the number printings, as a reference. The print count data string is 10 digits long. When the power is cut, the transport count less than 10 times is rounded down. Command Transfer Formats Data String ETX Response Transfer Formats Status...
  • Page 58: Cleaning Command

    Cleaning Command Cleaning button enable/disable command This command enables and disables the cleaning button on the front panel. The setting is saved in the non-volatile memory. Command Transfer Formats Enable/disable parameter ETX Response Transfer Formats Status Parameter Explanation • Enable/disable parameter ‘0’: Disables the panel cleaning button.
  • Page 59 Command Transfer Formats Response Transfer Formats Status...
  • Page 60: Other Commands

    Other Commands Reset command This command resets the device. The reset command is a priority command that resets the device even when another command is being executed. When the reset command is received while executing another command, the device quits the execution of that command. Command Transfer Formats Response Transfer Formats Status...
  • Page 61 Type and Parameter List (Types are set alphabetic characters and parameter are set by numerical values) Contents Type Parameters Function Initial Value USB Serial Number ‘U’ ‘u’ ‘0’ to ‘127’ Serial number for USB ‘0’ interface Serial port baud rate ‘B’...
  • Page 62 Various setting commands This command sets each of the default settings. The setting is stored internally with the non-volatile memory, even when the power is cut. When the power is turned on again, the stored contents are handled as the default parameters. Important There is a limit to the number of times the non-volatile memory can be used.
  • Page 63 Setting Type and Parameter List (Types are set alphabetic characters and parameter are set by numerical values) Contents Type Parameters Function Initial Value ANK fonts sizes ‘0’ Two-byte font specification ‘J’/‘j’ ‘1’ ‘1’ Single-byte font specification 24/16 dot font types ‘0’...
  • Page 64 • 24/16 dot font type specifications This command sets the US and EU destined AN characters 24/16 dot fonts. Settings using the ESC sequence (ESC, F/f) in the print text data string are enabled only in the command, but settings using this command function as default settings. STX, 91h, ‘F’/‘f’, 24/16 font setting parameter, ETX, BCC 24/16 font setting parameter ‘0’:...
  • Page 65 ‘7’: Enables magnetic writing to track 1, 2 and 3. The ex-factory default setting is for ‘2,’ to enable magnetic writing to track 2. • Card arrangement direction setting This command sets the direction for card arrangement. In the print character data setting command (41h), the settings made using this command are enabled for the card arrangement direction if the card arrangement direction and data arrangement coordinate printing control header string are not set.
  • Page 66 • Magnetic stripe write retry count setting This command sets the number of times the device will retry to write to the magnetic stripe. STX, 91h, ‘W’/‘w’, magnetic stripe write retry count setting, ETX, BCC Magnetic write retry count setting parameters ‘0’: No retry ‘1’:...
  • Page 67 STX, 91h, ‘D’, two-byte character gap dot space setting, ETX, BCC Two-byte character gap dot space setting parameters ‘0’: Sets the two-byte character gap dot space setting to 0. ‘1’: Sets the two-byte character gap dot space setting to 1. ‘9’: Sets the two-byte character gap dot space setting to 9.
  • Page 68 • Line gap dot space setting This command sets the line gap dot space. Settings using the ESC sequence (ESC, M/m) in the print text data string are enabled only in the command, but settings using this command function as default settings. STX, 91h, ‘M’/’m’, line gap dot space setting, ETX, BCC Line gap dot space setting parameters ‘0’:...
  • Page 69 ‘8’: Sets the transport speed to 255 mm/s. ‘9’: Sets the transport speed to 285 mm/s. ‘A’: Sets the transport speed to 315 mm/s. ‘B’: Sets the transport speed to 345 mm/s. ‘C’: Sets the transport speed to 375 mm/s. ‘D’: Sets the transport speed to 405 mm/s.
  • Page 70 ‘33’ : Sets track 3 to ISO781 1/2 third track recording method. The ex-factory default setting for track 2 is ’22.’ The following shows settings for a version (TCP300) having one track of a magnetic head. ‘20’ : Sets track 2 to JISX6302 recording method.
  • Page 71 Specify a value for the media code expressed in hexadecimal. ‘0’ to ‘3F’ can be specified for media codes, including those for conventional extensions. Refer to the TCP300 series media specifications manual for details relating to the media codes for use.
  • Page 72: Materials

    MATERIALS Switching Firmware Use the following steps to switch the firmware of the device. Install the flash memory loading program into your PC. Copy the firmware to any folder. Turn off the power to the device, then mount either the serial, USB or LAN interface. Turn the device’s DIP switch #1 and #2 to OFF (the right side).
  • Page 73: Error Displays

    Error displays A self-diagnosis test is performed when the LED light sequentially at power on. A self-diagnosis test is performed only, without lighting the LED when recovering from a transport path open state, when the reset command is executed. The result of the test is displayed by the LED and buzzer. Test Results Display Remarks...
  • Page 74: Loading Setting Cards

    Loading Setting Cards The setting card loading operation is performed by turning on the power while holding down the cleaning switch. When the setting card is then inserted, the information on the card changes the operating mode of the device. If the changes are successful, success is printed at the bottom of the card.

This manual is also suitable for:

Tcp310

Table of Contents