Star Micronics TSP200 Programmer's Manual

Thermal Printer
TSP200 Series
Programmer’s Manual

TABLE OF CONTENTS

1. OUTLINE..............................................................................................1
2. MEMORY SWITCH AND DIP SWITCH ...........................................2
2-1. Memory Switch............................................................................2
2-2. DIP Switch ...................................................................................2
3-1. LED..............................................................................................4
3-2. Switches .......................................................................................4
3-3. Switch Operation (Combined Switch Operation) ........................4
4. SERIAL INTERFACE ..........................................................................5
4-1. Interface Specifications................................................................5
4-2. Interface Circuit ...........................................................................6
4-2-1. RS-232C Interface .............................................................6
4-3. Connectors and Signal Names .....................................................7
4-3-1. RS-232C Interface .............................................................7
4-4. Interface Connections ..................................................................9
4-5. Data Protocol..............................................................................10
4-5-1. DTR mode .......................................................................10
4-5-2. X-ON/X-OFF mode.........................................................12
5. PARALLEL INTERFACE.................................................................. 13
5-1. Interface Specifications.............................................................. 13
5-2. Interface Timing.........................................................................13
5-3. Connectors and Signal Names ...................................................14
6. PERIPHERAL UNIT DRIVE CIRCUIT ............................................16
7. ERRORS..............................................................................................19
7-1. Automatic Recovery (Power Lamp: Flashing;
On-Line Lamp: On)....................................................................19
7-2. Recoverable Errors (Power Lamp: Flashing;
On-Line Lamp: Off) ...................................................................19
7-3. Fatal Error (Power Lamp: Flashing;
On-Line Lamp: Flashing)...........................................................20
7-4. Type of buzzer sound (only Star mode) P: 50ms Pi: 100ms......20
8. CONTROL CODES/STAR MODE .................................................... 21
8-1. Star Mode Command Summary.................................................21
8-2. Command Specification .............................................................25
9. CONTROL CODES/ESC/POS MODE ..............................................57
10. CHARACTER CODE TABLES .......................................................59
11. AUTOMATIC CUTTER...................................................................73

1. OUTLINE

The TSP200 series is ideal for printing text, bar code and graphics.
The TSP200 series has the following features:
1. extremely quiet and fast printing (maximum 50 mm/sec.) using the direct line thermal printing method
2. support many bar code types (UPC-A, UPC-E, JAN/EAN-8, JAN/EAN-13, CODE 39, IFT 2 OF 5, CODE 128, CODE 93, NW-7)
3. dual interfaces (RS232C, Parallel)
4. memory switches that enable wide selection of printer default settings
The printer has two different software modes which can be selected using the DIP switch. (Factory setting: Star Mode)
Star Mode: DIP switch 1-7 ON This mode is compatible with Star Receipt printers, such as the SP300 and SP200
series.
ESC/POS Mode: DIP switch 1-7 OFF This mode is compatible with the printers supporting ESC/POS command.
ESC/POS is a trademark of Seiko Epson Corporation.
For improvement purposes, the descriptions and specifications in this manual are subject to change without notice.
– 1 –

2. MEMORY SWITCH AND DIP SWITCH

Functional settings are made using the printer’s EEPROM memory switches and the DIP switches.

2-1. Memory Switch

Each memory switch is a 16-bit word stored in EEPROM. The printer is shipped with the factory setting which is made in accordance with its product type. For the detailed functions and the settings of the Memory switches, please refer to “Chapter 8”. The factory settings are shown in the table below.
Memory switch TSP212 TSP242
#0 0000 0000 #1 0000 0000 #2 0000 0100 #3 0000 0000 #4 0000 0000

2-2. DIP Switch

Be sure to turn off the power of the printer before changing the setting of the DIP switches.
Power off
DIP switch
ON
OFF
DIP switch 1
8141
DIP switch 2
DIP switch array
– 2 –
DIP switch #1 The factory settings of DIP switch 1 are all on.
Switch Contents ON OFF
1-1 Baud Rate 1-2 1-3 Data Length 8 bit 7 bit 1-4 Parity Check Disabled Enabled 1-5 Parity Selection Odd Even 1-6 Handshake DTR XON/XOFF 1-7 Operating Mode Star ESC/POS 1-8 Interface RS232C Parallel
Baud Rate 1-1 1-2
2400BPS OFF OFF 4800BPS ON OFF 9600BPS ON ON 19200BPS OFF ON
DIP Switch #2 Factory settings: 2-1 and 2-2 are on; 2-3 and 2-4 are off.
Switch Contents ON OFF
2-1 Print Density 2-2 2-3 Serial I/F No. 6 Pin Reset Signal Enabled Disabled 2-4 Serial I/F No. 8 Pin Reset Signal Enabled Disabled
Print Density 2-1 2-2
Light OFF OFF Standard ON ON Somewhat Heavy ON OFF Heavy OFF ON
– 3 –

3. DISPLAY PANEL AND FUNCTIONS

3-1. LED

LED Function POWER Lights up when the printer is turned on.
Blinks when an error occurs (Refer to 7. ERRORS.)
ON LINE Lights up when the printer is on line; goes off when the printer
is off line or error occurs (Refer to 7. ERRORS.)

3-2. Switches

Switch Function ON LINE Switches between on line and off line
FEED Feeds the paper while pressed

3-3. Switch Operation (Combined Switch Operation)

1) <SELF PRINTING> FEED + POWER ON (Turn the power on while holding the FEED switch depressed.) Self-printing will be performed. VER. NO., Memory switch settings, DIP switch settings and character order will be printed out.
2) <Hexadecimal dump mode> ON LINE + POWER ON (Turn the power on while holding the ON LINE switch depressed.) Each of the signals sent from the computer to the printer will be printed out in hexadecimal code. This function allows you to check if a control code sent to the printer by the program being used is correct or not. The last line is not printed if its data is less than one full line. However, if the ON LINE switch is pressed to set the off line mode, the last line will be printed. To turn off the mode, it is necessary to turn off the printer completely.
– 4 –

4. SERIAL INTERFACE

4-1. Interface Specifications

Transmission type.................Asynchronous serial interface
Baud rate (bps) .....................2400, 4800, 9600, or 19200
(Selected by DIP switch)
Word format
Start bit: ......................1
Data bits: ....................7 or 8 (Selected by DIP switch)
Parity: .........................Odd, Even, or None
(Selected by DIP switch)
Stop bit: ......................1
Signal polarities
RS-232C .....................Mark = Logic “1” (–3V to –15V)
Space = Logic “0” (+3V to +15V)
Handshaking .........................DTR or XON/XOFF mode (Selected by DIP
switch)
Mark [1]
b0 b1 b2 b3 b4 b5 b6 (b7)
SERIAL
Space [0]
ABCD
A: Start bit B: Data bits C: Vertical parity bit D: Stop bit
– 5 –

4-2. Interface Circuit

4-2-1. RS-232C Interface
SERIAL
Input (RXD, DSR)
Printer Host computer
Output (DTR, FAULT, TXD, RTS)
Printer Host computer
75188 or equivalent
– 6 –

4-3. Connectors and Signal Names

51
9
6
4-3-1.RS-232C Interface
Pin No. 1 FG Frame ground 2 RXD IN Receiving data 3 TXD OUT Transmission data 4 DTR OUT ESC/POS mode
Signal name
Direction
1) DTR/DSR communication mode Indicates if printer is busy or not.
Space: Printer ready
Mark: Printer busy The conditions for busy will vary according to the memory switch settings.
Printer Status
1. From when the power is turned on or I/F reset until communication possible
2. Test printing
3. Cover open
4. Paper feed by paper feed switch
5. Stop due to no paper
6. During waiting for switch input in macro execution
7. Other errors
8. Receiving buffer full
SERIAL
Function
Memory SW #4-4
10
BUSY BUSY
BUSY BUSY
– – – BUSY – – – BUSY
– – – BUSY – – – BUSY
– – – BUSY
BUSY BUSY
2) XON/XOFF Communication mode Indicates when printer can receive data from host. This is space, except for the following.
1. After reset until communication possible.
2. During test printing.
– 7 –
SERIAL
Pin No.
Signal name
Direction
Function
Star mode
Data terminal ready signal. When the printer is ready to receive data, this
signal changes to “SPACE”. 5 SG Signal ground 6 DSR IN Signal line that indicates whether the host can
receive data
Space: Host can receive data
Mark : Host cannot receive data Does not confirm the status of this signal in XON/ XOFF communication or STAR mode. This signal line can be used as an external reset signal by setting the DIP switches. A pulse width of 1 ms or more mark state activates reset.
7 RTS OUT Same as DTR signal. 8 INIT IN This signal line can be used as an external reset
signal by setting the DIP switches. A pulse width of 1 ms or more space state activates reset.
9 FAULT OUT In the Star mode, the printer will enter the mark
state during the following errors: no paper, head up, cutter error. In ESC/POS mode, this is normally space.
– 8 –

4-4. Interface Connections

Refer to the host computer’s interface specifications for details of how to connect the interface. The following illustrations show typical connection configura­tions.
[RS-232C]
Printer side IBM PC side (25 pin)
F-GND RXD TXD DTR S-GND
RTS INIT FAULT
F-GND RXD TXD DTR S-GND
RTS INIT FAULT
1 2 3 4 5 6DSR 7 8 9
Printer side IBM PC side (9 pin)
1 2 3 4 5 6DSR 7 8 9
20
SERIAL
F-GND
1
TXD
2
RXD
3
RTS
4
CTS
5
DSR
6
S-GND
7
DCD
8
DTR
DCD
1
RXD
2
TXD
3
DTR
4
S-GND
5
DSR
6
RTS
7 8
CTS
– 9 –

4-5. Data Protocol

4-5-1. DTR mode

SERIAL
This mode is accessed when the DIP switch 1-6 is set to ON. Signals are controlled using the DTR line as a BUSY flag.
RXD
DTR
Printing
Power ON
Data Data Data
Buffer full Buffer empty
Immediately after power on (provided that no error occurs), the printer sets DTR to “SPACE” to indicate that it is ready to receive data. When the host detects that DTR is in “SPACE” condition, it begins sending text data over the RXD line.
When the printer’s remaining buffer space falls to *256 bytes or less, the printer sets DTR to “MARK.” The host responds by halting the data transfer. However, note that the printer remains capable of receiving data until the buffer becomes full.
Available buffer space increases as the printer prints the buffered data. When the printer has cleared all but the last *256 bytes of data, it sets DTR back to “SPACE” to indicate that it is ready to receive more data.
Data buffer full Nearly full
*256 bytes
remaining
DTR “MARK”
* 16 bytes when the buffer size is set to 45 bytes
– 10 –
Nearly empty Empty
*256 bytes
DTR “SPACE”
Error Condition Upon detecting an error, the printer immediately sets DTR to “MARK” and goes
offline. If the error was caused by a paper-out condition, you can clear it by loading new paper and then pressing the ON LINE switch (Star mode) or closing the cover (ESC/POS mode).
When paper is out
RXD
OFF LINE ON LINE
DTR
Printing
SERIAL
PAPER OUT signal
Power ON
Paper out
Press the ON LINE switch after loading paper (Star mode).
– 11 –

4-5-2. X-ON/X-OFF mode

This mode is accessed when DIP switch 1-6 is set to OFF.
SERIAL
X–OFF
X–ON X–OFF X–OFF X–ON X–OFF X–OFF
TXD
X–OFF
X–ON
RXD
Printing
PAPER OUT
signal
ON LINE
indicator
ON
OFF Power ON Load paper and press
Data Data Data
Paper out
the ON LINE switch (Star mode).
Immediately after power on (provided that no error occurs), the printer informs the host that it is ready to receive data by outputting the X-ON signal (control code DC1; value = 11H) over the TXD line. If necessary the printer repeats the signal every three seconds until the host begins sending text data over the RXD line.
When the printer’s remaining buffer space falls to *256 bytes or less, the printer begins to output X-OFF signals (DC3, value = 13H) over the TXD line. The host responds by halting the data transfer. Note that the printer remains capable of receiving data until the buffer becomes full.
Available buffer space increases as the printer prints the buffered data. When the printer has cleared all but the last *256 bytes of data, it again outputs the X-ON signal.
Data buffer full Nearly full
*256 bytes remaining
Printer outputs X-OFF.
Nearly empty Empty
*256 bytes
Pinter outputs X-ON.
* 16 bytes when the buffer size is set to 45 bytes
– 12 –

5. PARALLEL INTERFACE

5-1. Interface Specifications

Interface: Conforms with Centronics parallel interface standard Data transfer speed: 1000 ~ 5000 CPS Synchronization: External strobe pulse Handshaking: Using ACK and BUSY Logic level: TTL-level compatible

5-2. Interface Timing

A C K
DATA
STROBE
BUSY
PARALLEL
Approx. 9ms
TTT
T: At least 0.5ms
– 13 –
Signal Name Sample Circuit
4.7k
DATA 1
~
W
74LS-equivalent
DATA 8
Input
PARALLEL
STROBE
BUSY
Output
ACK

5-3. Connectors and Signal Names

(18) (1)
(36) (19)
(Printer Side)
1kW
1.8kW
100W
1000pF
74LS-equivalent
74LS-equivalent
Conforms to Amphenol connector 57-30360
Figure 5-1. Parallel Interface Connector
– 14 –
Pin no Signal name 1 STROBE IN Strobe pulse for data read. Usually HIGH;
Direction
Function
goes LOW to trigger data read.
2-9 DATA 1~8 IN Parallel data lines for eight-bit data. HIGH
is “1”; LOW is “0”.
10 ACK OUT Printer outputs this pulse for approxi-
mately 9µs to indicate that data read is completed. Printer becomes ready to receive new data at the moment the ACK pulse ends.
11 BUSY OUT DC-level signal indicating printer’s cur-
rent status. LOW indicates that printer is ready to receive the next data; HIGH indicates that printer is unable to receive.
12 PAPER OUT OUT DC-level signal indicating whether printer
has paper. The signal stays LOW while paper is present; it goes HIGH to indicate that paper has run out.
13 SELECTED OUT DC-level signal; stays HIGH while printer is
online. 14-15 N/C Not used 16 SIGNAL GND Signal ground 17 18 +5V Outputs +5V (Max. 50mA) 19-30 TWISTED Return pins for various signals. Each pin is
31 RESET IN LOW level causes printer to reset its control
32 ERROR OUT Goes LOW to indicate that printer is unable to
33 EXT GND Ground terminal for external connection 34-35 N/C Not used 36 Fixed “HIGH” at printer side
CHASSIS GND
PAIR RETURN
Printer-frame ground
connected to the corresponding signal line by
twisted pair line.
circuitry and return to its initial state.
print.
PARALLEL
– 15 –

6. PERIPHERAL UNIT DRIVE CIRCUIT

A drive circuit for driving peripheral units (such as cash drawers) is featured on the main logic board of this printer. A modular connector for driving peripheral units is featured on the output side on the drive circuit. When using this circuit, connect the cable for the peripheral unit. (Cables must be prepared by the user.)
Use cables which meet the following specifications.
1. Use the modular plug as shown in Figure 6-1.
2. Separate ground wire is required for Europe only.
3. If the printer is to be used in Europe, the noise filter should be attached to the cable, as shown in Figure 6-2.
CAUTION: DO NOT connect any other plug to the peripheral unit connector.
Modular plug MOLEX 90075-0007, AMP641337 or JAPAN BURNDY B-66-4
16
Shield
Wire lead
Separated Ground wire connected to shield (Europe only).
Figure 6-1. Cable specifications for peripheral unit.
– 16 –
Fastener
One loop
Ferrite core
Screw M3×4
Separate ground wire
Peripheral unit drive circuit connector
Figure 6-2. Separate ground wire and noise filter are required for Europe.
– 17 –
Drive circuit
The recommended drive circuit is shown.
[Drive output 24V, max. 1.0 A]
F.G
M-GND
M-GND
TR3
TR1
TR2
+5V
+24V
R2
D1
7824
D2
R1
1 2
3 4
5
6
With shield
L1
L2
Peripheral unit 2
Frame ground
Peripheral unit 1
R3
4.7k 1/4W
Compulsion switch
NOTES:
1. Peripheral units #1 and #2 cannot be driven simultaneously. When driving a device continuously, do not use drive duty above 20%.
2. Compulsion switch status is available as status data.
3. Resistance for coils L1 and L2 is not less than 24 ohms.
4. Absolute maximum ratings for diodes D1 and D2 (at Ta=25˚C): Average rectified current Io = 1A Maximum forward surge current (60Hz,1-cycle sine wave) I
FSM=40A
5. Absolute maximum rating for transistors TR1 and TR2 (at Ta = 25˚C): Collector current Ic = 2A
– 18 –

7. ERRORS

The various types of errors can be identified by the buzzer’s sound and the lit LEDs. Buzzer: The circled numbers refer to “7-4. Type of buzzer sound”.
7-1. Automatic Recovery (Power Lamp: Flashing; On-Line
Lamp: On)
Error Description
Abnormal head temperature
7-2. Recoverable Errors (Power Lamp: Flashing; On-Line
Lamp: Off)
Error Description
No paper
Power Lamp Flashing Pattern Recovery Conditions
Approx. 1 Sec Approx. 1 Sec
Power Lamp Flashing Pattern Recovery Conditions
Approx. 1 Sec Approx. 1 Sec
Automatic recovery after head temperature lowers
upper: Star mode lower: ESC/POS mode
Insert paper and press on-line
2
switch. Insert paper and close cover.
Head up
Paper near end of roll
Cover is open
Error during paper cutting
Approx. 2 Sec Approx. 2 Sec
Approx.
Approx.
500 ms
500 ms
Approx. 125 msApprox. 125 ms
Approx. 250 msApprox. 250 ms
– 19 –
Lower head and press on-line
3
switch. Lower head and close cover.
Press on-line switch and printing
4
will continue. Both lamps light when printing and power lamp flashes and on-line lamp lights when on line.
Same as no paper Close cover and press on-line
5
switch. Close cover.
If the blade is at the home position,
6
press the on-line switch for printing to continue. If the blade is not at the home position, it is not a recover­able error.
Command
7-3. Fatal Error (Power Lamp: Flashing; On-Line Lamp:
Flashing)
The unit will have to be repaired.
7-4. Type of buzzer sound (only Star mode) P: 50ms Pi: 100ms
1 Online, Offline P 2 No Paper PPPP PPPP 3 Head Up PiPiPi 4 Near End PP PP 5 Cover Open PPPP 6 Cutter Error Pi PPP PPiPiP PPPPPi PiPiPiPiPi PiPiPiPiPi 7 Buzzer by command Pi
– 20 –
Loading...
+ 56 hidden pages