You are on page 1of 282

Safety Precautions

PLC is the control center for the operation of machine. For your safety, please beware of the symbol notifying WARNING and CAUTION. These are safety precautions to remind you when youre performing transportation, installation, operation, examination of the PLC. Please perform these operations in accordance with these precautions for your own safety reason. WARNING Operate mistakenly may cause personnel injury or death. CAUTION Operate mistakenly may cause personnel injury or damage to mechanical system. symbol and MUST DO

Also please operate in accordance to instruction under MUST NOT symbol too.

(1) Precaution in installation


! CAUTION not install the device in environment disqualified according to instructions in manual or product catalog. High temperature, humidity, dusty, corrosive gas, vibration, shock may result in dangerous conditions like electrical shock and fire alarm. Please install the PLC in accordance to the instructions and precautions described in users manual to ensure appropriate installation and eliminate the possibility failing, malfunction and miss-function of PLC. Please keep the PLC module from dropping wire or conductive metal to avoid the possibility of resulting fire alarm, malfunction or miss-function.

(2) Precautions in wiring


MUST DO
Please wiring the system in accordance to electricity regulation and install type grounding accordingly. ! CAUTION Please wiring the system in accordance to the power ratings. Wiring without appropriate power rating may cause fire alarm. The wiring operation must be performed by qualified electrical engineer. The wiring operation must be carried out in accordance to electricity regulations. Any error in wiring may cause fire alarm, system malfunction, and electrical shock to personnel.

(3) Precautions in operation


! WARNING Do not touch any connection terminal when power is on to avoid electric shock. Please install safety system protective circuit including emergency stop circuit and external lockup circuit to prevent mechanical damage when PLC malfunction. !

CAUTION

Please initiate and stop PLC operation after reconfirming safety precautions. Mistaken operation may cause mechanical damage. Please beware of the sequence for power on. Mistaken operation may cause mechanical damage or other accident.

(4) Maintenance and examination


INHIBIT
Disassembly or modification of internal circuit in module is forbidden. Improper usage may cause conditions like fire alarm, system malfunction and erroneous operation. ! CAUTION Shut down power source before installing and dismantling module. Installing or dismantling module while power is ON may cause electric shock to personnel or system malfunction of PLC.

Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 Chapter 18 Appendix

Introduction Precautions System Architecture Component Function and Description Installation Wiring Memory Architecture of TP02 TP02 Operation Flowchart Instruction Description System Design ROM Operation The Use of High Speed Counter
The Use of Communication Port

The Use of MMI Port Analog Input / Output Module Trial Run Maintenance and Examination Specification

TP02

Contents
Chapter 1 Introduction............................................................................................1-1 Chapter 2 Precautions .....................................................................................2-1~2-2 Chapter 3 System Architecture .......................................................................3-1~3-4 3-1 Basic System Architecture ..............................................................................3-1 [1] System Architecture Diagram.......................................................................................................3-1 [2] Component List...............................................................................................................................3-2 [3] Example of System Architecture ...................................................................................................3-3 3-2 Communication Link System Architecture .......................................................3-4 [1] Computer Link.................................................................................................................................3-4 [2] Data Link..........................................................................................................................................3-4 [3] Remote I/O.......................................................................................................................................3-4 Chapter 4 Component Function and Description.........................................4-1~4-3 4-1 Base Module...................................................................................................4-1 4-2 Expansion Module...........................................................................................4-2 Chapter 5 Installation.......................................................................................5-1~5-3 5-1 Installation Environment ................................................................................5-1 5-2 Installation of Base Module/Expansion Module ...............................................5-1 [1] Direct Installation............................................................................................................................5-1 [2] DIN Rail Installation .......................................................................................................................5-2 5-3 Installation of Expansion Cable and Terminal Connector................................5-3 Chapter 6 Wiring.............................................................................................6-1~6-15 6-1 Precautions.....................................................................................................6-1 6-2 Wiring Power Source, FG Terminal and Stop Output Terminal.......................6-1 6-3 Wiring Input Terminal ....................................................................................6-2 [1] Base Module....................................................................................................................................6-2 [2] Expansion Module ..........................................................................................................................6-4 [3] Precautions for Connecting Input Terminal................................................................................6-5 6-4 Wiring Output Terminal...................................................................................6-7 [1] Base Module....................................................................................................................................6-7 [2] Expansion Module ..........................................................................................................................6-9 [3] Precautions for Connecting Output Terminal...........................................................................6-10 6-5 Solving Noise Problem..................................................................................6-12 [1] Grounding ......................................................................................................................................6-12 [2] Power Source Noise......................................................................................................................6-13 [3] Solving Thunderstroke problem.................................................................................................6-13 [4] Anti-Noise of Expansion Cable...................................................................................................6-14 [5] Anti-Noise of I/O Wiring.............................................................................................................6-14 Chapter 7 Memory Architecture of TP02........................................................7-1~7-7 7-1 Different Types of Memory..............................................................................7-1 7-2 Definition of Special Relay ..............................................................................7-2 7-3 System Memory ..............................................................................................7-5

Contents -1

Chapter 8 TP02 Operation Flowchart ...........................................................8-1~8-10 8-1 Operation Cycle..............................................................................................8-1 [1] Operation Flowchart .......................................................................................................................8-1 [2] Power On Processing ...................................................................................................................8-2 [3] Scan Cycle........................................................................................................................................8-3 8-2 Interrupt Function ...........................................................................................8-6 [1] Timer Interrupt Function................................................................................................................8-6 [2] High Speed Counter Interrupt Function......................................................................................8-7 8-3 Self-Diagnose .................................................................................................8-8 [1] Self-Diagnose ..................................................................................................................................8-8 [2] Stop Output Connection Point .....................................................................................................8-9 [3] Special Relay..................................................................................................................................8-10 [4] Error Code at Abnormality...........................................................................................................8-10 [5] Output ON/OFF Status Under Abnormality.............................................................................8-10 Chapter 9 Instruction Description................................................................9-1~9-75 9-1 Instruction List.................................................................................................9-1 [1] Basic Instruction.............................................................................................................................9-1 [2] Application Instruction (sorted by instruction code)...............................................................9-2 [3] Application Instruction (sorted by function).............................................................................9-7 9-2 Instruction Description ..................................................................................9-10 Chapter 10 System Design ..........................................................................10-1~10-3 10-1 Procedure of System Design ......................................................................10-1 10-2 Precautions of System Design ....................................................................10-2 10-3 Configuring Relay No..................................................................................10-3 Chapter 11 ROM Operation .........................................................................11-1~11-2 11-1 Regarding ROM Operation .........................................................................11-1 Chapter 12 The Use of High Speed Counter .........................................12-1~12-12 12-1 High Speed Counter ...................................................................................12-1 12-2 High Speed Counter Mode 1 (A/B/Z phase input signal x 1 set)..................12-2 12-3 High Speed Counter Mode 2 (A/B phase input signal x 1 set + single-phase pulse counter x 2 set)...................................................................................12-3 12-4 High Speed Counter Mode 3 (Single-phase pulse counter input x 4)..........12-4 12-5 High Speed Counter Mode 4 (Single-phase pulse counter with reset input x 2) ............................................................................................................................12-5 12-6 High Speed Counter Mode 5 (Single-phase pulse counter x 1 ) ................12-6 12-7 High Speed Counter Mode 6 (A/B phase input signal x 1) .........................12-7 12-8 Interrupt Processor Mode 1~4 ....................................................................12-8 Chapter 13 The Use of Communication Port ...........................................13-1~13-24 13-1 RS422 Communication Port........................................................................13-1 [1] The Function of Communication Port........................................................................................13-1 [2] Wiring.............................................................................................................................................13-1 [3] Setting of System Memory ..........................................................................................................13-2 [4] Communication Format ................................................................................................................13-2 13-2 Computer Link ............................................................................................13-3 [1] Communication Specification......................................................................................................13-3 [2] Wiring.............................................................................................................................................13-3 [3] Format Setup..................................................................................................................................13-4 [4] Command Description..................................................................................................................13-6
Contents -2

13-3 Data Link ..................................................................................................13-13 [1] Communication Specification....................................................................................................13-13 [2] Wiring...........................................................................................................................................13-14 [3] Setting of System Memory ........................................................................................................13-14 [4] Communication Flag...................................................................................................................13-14 [5] Communication Timing Sequence and The Time Required for Transmission...................13-16 13-4 Remote I/O................................................................................................13-19 [1] Communication Specification....................................................................................................13-19 [2] Wiring...........................................................................................................................................13-19 [3] Setting of System Memory ........................................................................................................13-20 [4] Communication Flag...................................................................................................................13-20 [5] Operation Status of Remote I/O Slave-Station.......................................................................13-22 [6] The Time Required for Communication Timing Sequence and Transmission...................13-23 Chapter 14 The Use of MMI Port.................................................................14-1~14-5 14-1 MMI Port......................................................................................................14-1 14-2 Computer Link Mode...................................................................................14-4 [1] Communication Specification......................................................................................................14-4 [2] Wiring.............................................................................................................................................14-4 [3] Setting of System Memory ..........................................................................................................14-5 [4] Communication Content ..............................................................................................................14-5 Chapter 15 Analog Input/Output Module ...................................................15-1~15-8 15-1 Outline ........................................................................................................15-1 15-2 General Specification for TP02-4AD, TP02-2DA ........................................15-2 [1] TP02-4AD, TP02-2DA Appearance ...........................................................................................15-2 [2] Outline Dimension Drawings ......................................................................................................15-2 [3] Wiring.............................................................................................................................................15-3 (1)TP02-4AD............................................................................................15-3 (2)TP02-2DA............................................................................................15-4 15-3 TP02-4AD Specification..............................................................................15-5 15-4 TP02-2DA Specification..............................................................................15-6 15-5 Setting of System Memory ..........................................................................15-7 15-6 Software Filter of TP02-4AD .......................................................................15-8 Chapter 16 Trial Run.....................................................................................16-1~16-2 16-1 Reconfirmation Before Trial Run ...............................................................16-1 16-2 Trial Run Procedure ...................................................................................16-2 Chapter 17 Maintenance and Examination................................................17-1~17-6 17-1 Periodical Examination................................................................................17-1 17-2 Troubleshooting..........................................................................................17-2 Chapter 18 Specification ...........................................................................18-1~18-15 18-1 General Specification..................................................................................18-1 18-2 Features .....................................................................................................18-2 18-3 Input/Output Specification...........................................................................18-3 18-4 Dimensions .................................................................................................18-4 Appendix................................................................................................ App.-1~App.-2 Appendix - 1 PU12 Operation Procedure .........................................................App.-1 Appendix - The Difference between TP02 and TP01 .......................................App.-2

Contents -3

Chapter 1 Introduction
The <TAIAN> TP02 is a compact size PLC with max. I/O points of 124 points. TP02 includes features as follows:

Feature 1 : 8 Base Modules and 7 Expansion Modules


Input Base Module port (DC) TP02-20MR TP02-20MT TP02-28MR TP02-28MT TP02-40MR TP02-40MT TP02-60MR TP02-60MT 12 points 12 points 16 points 16 points 24 points 24 points 36 points 36 points Output Output port port (Transistor (Relay) ) 8 points 8 points 12 points 12 points 16 points 16 points 24 points 24 points Program capacity Process speed of basic instruction Expansion capability ROM Real Halt Operat time output ion clock

1.5k words

1.63 - 1.38 us

No

No *

No

No

4k words

0.81 - 1.02 us

2 module, 104 points max. 2 module, 124 points max.

Yes

Yes

Yes

*All base modules include flash memory to preserve user program permanently.
Output Expansion Input port port Module (DC) (Transistor ) TP02-16EXD 16 points TP02-16EYR 16 points TP02-16EMR 8 points 8 points TP02-32EMR 16 points 16 points TP02-16EYT 16 points Output port (Relay) Analog Module TP02-4AD TP02-2DA Analog input Analog output Control resolution 12 bits 12 bits

x 4 points x 2 points

Feature 2 : Large Memory Capacity and Versatile Application Instructions


A standard TP02 is equipped with auxiliary relay for 2048 points and register for 3072 words. Together with its versatile application instructions including logical operation instructions, arithmetic operation instructions and comparison instructions, user can easily accomplish desired design and function.

Feature 3 : 3 Kinds of Communication Function (Standard Equipment)


The base module is equipped with 3 different kinds of communication capability. User can choose one of them to construct necessary communication network. (1) Computer link: With 1 host computer to control up to 99 TP02. (2) Data link: Using TP02 as Master-station to control up to 7 TP02. Each Slave-station could send and receive data for 12 bytes. (3) Remote I/O: Using TP02 as Master-station to control up to 4 TP02. Each Slave-station could be controlled up to 36 points of input and 24 points of output.

Feature 4 : MMI Port Capability of Computer Link


The communication port for connecting peripherals (MMI port) can be used to connect program writer (PU12), editor software (PC12), computer link, or touch-screen man-machine-interface (MMI). (refer to chapter 14 for details)
1-1

Feature 5 : Internal High Speed Counter Function


A high speed counter (high speed counter 6 mode, interrupt 4 mode) of max. frequency 10KHz is included. Makes it easier to acquire pulse input signal from encoder or other device. It could also improve the precision of control. (refer to chapter 12 for details)

Feature 6 : built-in flash memory(same function as EEPROM)


When TP02 is converted from program editing mode to execution mode, user program is automatically copied from RAM to flash memory for storage. In the mean time, battery will keep the data stored at Date register and RTC from missing after power shut off.

Feature7 : built-in RTC (perpetual calendar) function


TP02-40MR/TP02-40MT/TP02-60MT Series, RTC is listed as a standard function.

1-2

Chapter 2 Precautions
(1) Installation Site Do not install TP02 under these circumstances: Exposed to direct sunlight. Where temperature is not within 0~55. Relative humidity is not within 5~90 %. Where temperature changes rapidly and generating dewfall. Environment with flammable gas or corrosive gas. (2) Install emergency stop circuit. Please install system protective circuit. One halt output terminal is provided with TP02-40MR/40MT and TP02-60MR/60MT. The stop output terminal is not provided on TP02-20MR/TP02-28MR. Please set WS023 to 01. This setup will make all output of PLC turn to OFF when PLC in STOP mode or ERROR mode to protect connected machines and equipment's. (3) Grounding The FG terminal of TP02 is the grounding terminal. Please connect the type 3 grounding on the terminal (with grounding resistance < 100 ohm). Do not connect the grounding terminal to the common ground of other large power machine to keep TP02 from resurgent current. (4) Installation Tight up mounting screw when wiring. Loose contact may cause improper functioning. Connect the expansion cable for expansion module to the base module firmly into place. Loose contact may cause improper functioning. The expansion termination connector must be installed when using TP02-40MR/TP02-60MR. Do not block the ventilation holes of TP02 to avoid internal temperature rise affecting operation of TP02. TP02 must be installed vertically facing front. It is not to be installed horizontally or facing down.
Install vertically X Install horizontally

(5) Wiring Input/Output signal wires should not be wired in the same wiring channel or parallel with high voltage, large current lines of power circuit to avoid noise interference. (6) Static electricity In very dry weather, personnel may carry high level of static electricity. Do not contact TP02 directly to avoid static electricity damage to the component of TP02. (7) Cleaning Use clean soft cloth to wipe the surface. Do not apply any water or detergent to avoid deteriorating the color or chape of module. (8) Storage
2-1

The program backup battery is susceptible to high temperature or humidity. Do not store it in environment exposed to these condition.

2-2

(9) Over current protection The output port of TP02 base module and expansion module is not protected by internal fuse. To avoid over current caused by short-circuit damaging TP02, at least one fuse must be installed between the output common terminal and loads. Installing serially connected fuse between every output terminal and load is highly recommended. (Apply the fuse in accordance with the rate current if output terminal.)

A) Relay output

B) Transistor output/Relay output

2-3

Chapter 3 System Architecture


3-1 Basic System Architecture
[1] System Architecture Diagram
Base Module
TP02-20MR/TP02-28MR [TP02-20MT/TP02-28MT]
DC input 12/16 points Relay output 8/12 points [Transistor output 8/12 points] (inexpansible) DC input 24 points Relay output 16 points [Transistor output 16 points]

Expansion module
TP02-16EXD
DC input 16 points

TP02-16EYR [TP02-16EYT]
Relay output 16 points [Transistor output 16 points]

TP02-40MR[TP02-40MT]

Expansion cable
TP02-16EMR
DC input 8 points Relay output 8 points

TP02-60MR[TP02-60MT]
DC input 36 points Relay output 24 points [Transistor output

Accessories of
expansion module (4 cm) TP-402EC (40 cm) TP02-32EMR

DC input 16 points Relay output 16 points

(NOTE 1) Expansion module can be installed up to 2 modules. (NOTE 2) TP-402EC can be used for only once in one PLC system.

Analog input/output module


Connection cable TP-202MC (2m)

TP02-4AD

TP02-2DA

Peripherals
Analog input 4 channels Analog output 2 channels

Converter (Software accessory) Computer (IBM-PC, WIN95)

Program writer PC12

Editorsoftware PC12

3-1

[2] Component List


ITEM Model Summary Power source 85 ~250 VAC 24 VDC input 12 points Relay output 8 points (Transistor output) 8 points Max. I/O points 20 points (inexpansible) Program capacity 1.5k words Power source 85 ~250 VAC 24 VDC input 16 points Relay output 12 points (Transistor output) 12 points Max. I/O points 28 points (inexpansible) Program capacity 1.5k words Power source 85 ~250 VAC 24 VDC input 24 points Relay output 16 points (Transistor output) 16 points Max. I/O points 104 points Program capacity 4k words Power source 85 ~250 VAC 24 VDC input 36 points Relay output 24 points (Transistor output) 24 points Max. I/O points 124 points Program capacity 4k words 24 VDC input 16 points Relay output 16 points Transistor output 16 points 24 VDC input 8 points Relay output 8 points 24 VDC input 16 points Relay output 16 points 4 channels 0 to 10 V Binary 12 bits 0 to 20 mA Binary 11 bits 2 channels Binary 12 bits 0 to 10 V Binary 11 bits 0 to 20 mA Connecting expansion module (40cm) Connecting base module and peripherals (2 m) Connecting cord from basic module to OP06 LCD display Instruction program writer (16 words x 4 rows) Liquid crystal display (LCD) with back lighting(20 words x 2 rows) For Windows 95 operating system Accessories Installation Manual 1

TP02-20MR (TP02-20MT)

Installation Manual

TP02-28MR (TP02-28MT) Base module

Installation Manual

TP02-40MR (TP02-40MT)

Installation Manual

TP02-60MR (TP02-60MT)

TP02-16EXD TP02-16EYR TP02-16EYT Expansion module TP02-16EMR TP02-32EMR Analog input module Analog output module Expansion cable Peripheral connection cable TP02-4AD TP02-2DA

Expansion cable (4 cm) Expansion cable (4 cm) Expansion cable (4 cm) Expansion cable (4 cm) Expansion cable (4 cm) Expansion cable (4 cm)

1 1 1 1 1 1

Expansion cable (4 cm)

TP-402EC TP-202MC TP-205MC PU12 OP05 OP06 PC12

Installation Manual

Program writer TMR/CNT switch Selector/setter Editor software

TP202MC 1/installation manual Installation manual Installation Manual 1 Converter 1

3-2

31/2 floppy disk RS232/RS422 converter TP-232CL Convert from RS422 interface to RS232 interface

3-3

[3] Example of System Architecture


System architecture TP02-20MR/20MT Input/ Output Input Output TP02-28MR/28MT Input Output TP02-40MR/40MT Input Output TP02-60MR/60MT Input Output TP02-40MR TP02-16EXD Input Output TP02-60MR TP02-16EYR Input Output
TP02-60MR TP02-16EMR

Base module 12 points 8 points 16 points 12 points 24 points 16 points 36 points 24 points 24 points 16 points 36 points 24 points 36 points 24 points 24 points 16 points 36 points 24 points 24 points 16 points 36 points 24 points 24 points 16 points 36 points 24 points

Expansion Expansion module 1 module 2 16 points 16 points 8 points 8 points 16 points 16 points 16 points 8 points 8 points 16 points 16 points 16 points 16 points 16 points 16 points 8 points 8 points 16 points 8 points 8 points 16 points 16 points 16 points 16 points

Total 12 points 8 points 16 points 12 points 24 points 16 points 36 points 24 points 40 points 16 points 36 points 40 points 44 points 32 points 40 points 32 points 60 points 32 points 32 points 40 points 60 points 48 points 56 points 48 points 68 points 56 points

Input Output

TP02-40MR TP02-32EMR

Input Output

TP02-60MR TP02-16EXD TP02-16EMR

Input Output

TP02-40MR TP02-16EMR TP02-16EYR

Input Output

TP02-60MR TP02-32EMR TP02-16EMR

Input Output

TP02-40MR TP02-32EMR TP02-32EMR

Input Output

TP02-60MR TP02-32EMR TP02-32EMR

Input Output
3-4

3-2 Communication Link System Architecture


[1] Computer Link

Host Computer

RS-232C/422 4-line converter

TP02 (Slave-Station001)

TP02 (Slave-Station002)

TP02 (Slave-Station099)

RS-232C

RS-232C/422 Converter

RS-422A
max. 1km max. 99 slave-stations

[2] Data Link

Up to 7 T P02 (Slave-station) can be connected to TP02 (master-station).


(Slave-stations can not exchange data to each other.)

Every Slave-station can send/receive 12 bytes of data.

[3] Remote I/O

Max. 60 I/O points for every slave-station (input 36 points, output 24 p oints). Slave-station inexpansible.

3-5

Chapter 4 Component Function and Description


4-1 Base Module
There are 8 kinds of TP02 base module, including TP-20MR/20MT, TP02-28MR/28MT, TP02-40MR/40MT, TP02-60MR/60MT.
TP02-20MR/TP02-20M TP02-28MR/TP02-28M TP02-40MR/TP02-40M TP02-60MR/TP02-60M MMI port cover With ROM cover insidee Terminal panel cover

With ROM cover insidee Name plate Expansion solt cover (Appearance when all covers is off.)
(4)24 VCD power source terminal (3) Input terminal
(orange)

(10) Input indicator


(green)

(16) ROM socket

(12) Power indicator


(green)

(13) RUN indicator (9) Expansion slot


17 (green)

(14) COMM indicator (8) MMI port (2) FG terminal


(red)

(15) ERR indicator


(orange)

(11) Output indicator (7) Communication port (1) Power source terminal (5) Output terminal(6) Halt output terminal (17) Termination connector (18) Rail guide

(1)Power source terminal 85 ~ 250 ACV power source input terminal (2)FG terminal Class 3 grounding terminal (3)Input terminal Connection terminal for input component Terminal 1 ~ 4 could be used as input of high speed counter (4)24 VDC power source terminal 24 VDC power source output terminal (TP02-20MR/20MT/TP02-28MR/28MT:0.3A, TP02-40MR/40MT/TP02-60MR/60MT:0.4A) (5)Output terminal Connection terminal for output component

(6)Halt output terminal (TP02-40MR/40MT/TP02-60MR/60MT) Set output relay to OFF status when TP02 stops. (7)Communication port Connection terminals to be used in computer link, data link, remote I/O mode. (8)MMI port Connection port for connecting peripheral connection cable (TP-202MC) for PU12 or computer link. (9)Expansion slot (OUT) (TP02-40MR/40MT/TP02-60MR/60MT) Connection port for connecting expansion cable (4 cm) or TP-402EC (40 cm) for expansion module. Install termination connector (17) into expansion slot if not use. expansion. Module.

4-1

(10)Input indicator (orange) Indicator lights at input component ON condition. (TP02-20MR/20MT: 12 indicators, TP02-28MR/28MT: 16indicators, TP02-40MR/40MT: 24 indicators, TP02-60MR/60MT: 36 indicators) (11)Output indicator (orange) Indicator lights at output component ON condition. (TP02-20MR/20MT: 8 indicators, TP02-28MR/28MT: 12 indicators, TP02-40MR/40MT: 16 indicators, TP02-60MR/60MT: 24 indicators) (12)Power indicator (green) Indicator lights when internal 5 VDC power supply of base module exists. (13) RUN indicator (green) Normal operation: lights Edit or stop: flashing Self-diagnose detected error: extinguished

(14)COMM indicator (green) Indicator lights at communication activated for computer link, data link or remote I/O. (15)ERR indicator (red) Indicator lights at error detected by self-diagnose condition. PLC stop operation. (PLC retain its operation at battery error.) (16)ROM socket Used in ROM operation to install EPROM or EEPROM. (17)Termination connector The expansion slot of last module must be installed with a termination connector. (18)Rail guide Used to guide the installation of TP02 on the DIN rail.

4-2 Expansion Module


There are 5 kinds of expansion module for TP02 including TP02-16EXD, TP02-16EYR, TP02-16EYT, TP02-16EMR, TP02-32EMR.
TP02-16EXD TP02-16EYR TP02-16EYT

Terminal panel cover

Terminal panel cover

Expansion slot cover Terminal panel cover Name plate

Expansion slot cover Terminal panel cover

Name plate

Expansion slot cover

Expansion slot cover

(Appearancnce when all covers is off.) (1)Input terminal

(Appearancnce when all covers is off.) (2) Onput terminal

(7) Connection mark

(5) Input indicator (orange)

(7) Connection mark

(5) Input indicator (orange)

(3) Expansion slot(IN)

(4) Expansion slot (OUT) (6) Output indicator (orange)

(3) Expansion slot(IN)

(4) Expansion slot (OUT) (6) Output indicator (orange)

Expansion cable (4 cm)

(8) Rail guide (2) Output terminal

Expansion cable (4 cm)

(8) Rail guide (2) Output terminal

Accessory

Accessory

4-2

TP02-16EMR
Terminal panel cover

TP02-32EMR
Terminal panel cover

Expansion slot cover Terminal panel cover Name plate

Expansion slot cover

Terminal panel cover

Name plate

Expansion slot cover (Appearancnce when all covers is off.) (1)Input terminal

Expansion slot cover (Appearance when all covers is off.) (1) Input terminal

(7) Connection mark

(5) Input indicator (orange)

(7) Connection mark

(orange) (5) Input indicstor (OUT) (4) Expansion slot

(3) Expansion slot(IN)

(4) Expansion slot (OUT) (6) Output indicator (orange) (8) Rail guide (2) Output terminal
(3) Expansion slot (IN)

(orange) (6) Output indicator (8) Rail guide

Expansion cable (4 cm)

Expansion cable (4 cm) (2) Output terminal

Accessory

Accessory

(1)Input terminal Connection terminal for input component (2)Output terminal Connection terminal for output component (3)Expansion slot (IN) Input slot for expansion cable connecting base module. When there are two expansion modules, connect the OUT slot of first module to the IN slot of second module. (4)Expansion slot (OUT) Further expansion from the first expansion module to the second expansion module. A termination connector must be installed (TP02-40MR/TP02-60MR) if no further expansion is required.

(5)Input indicator (orange) Indicator lights at input component ON condition. (TP02-32EMR: 16 indicators, TP02-16EMR: 8 indicators, TO02-16EXD: 16 indicators) (6)Output indicator (orange) Indicator lights at output relay ON condition. (TP02-32EMR: 16 indicators, TP02-16EMR: 8 indicators, TP02-16EYR/EYT: 16 indicators) (7)Connection mark Input/Output connection points address mark. (8)Rail guide Adjust the position of the rail guide to install or remove the TP02 to the mounting DIN rail.

4-3

Chapter 5 Installation
5-1 Installation Environment
TP02 installation site should avoid following occasions: Ambient temperature exceeding 0 ~ 55 . Relative humidity exceeding 5 ~ 90 % RH. Dusty, salty, iron powders place. Exposed to direct sunlight. Exposed to heavy vibration or possible shock. Exposed to corrosive, flammable, or ignescent gas. Exposed to volatile gas, detergent, ammonia gas, or electrolyte gas. Poor ventilation or near heating device.

5-2 Installation of Base Module/Expansion Module


To avoid possible interference, please install PLC in place away from any high voltage line, high voltage machine, power line, power machine, transmitter of radio device, large power switch, and surge possible location. Please install PLC vertically.
Install PLC vertically. Install PLC horizontally.

[1] Direct Installation


M4 screw longer than 15mm should be used to install PLC directly into the panel.
TP02-20MR/20MT, TP02-28MR/28MT, TP02-32EMR

Wiring duct

Wiring channel

TP02-20MR/20MT TP02-28MR/28MT TP02-32EMR

M4X15 screw

Wiring duct

[unit: mm]

5-1

TP02-40MR/40MT, TP02-60MR/60MT
Wiring duct

TP02-16EXD , TP02-16EYR/16EYT , TP02-16EMR


Wiring duct

TP02-40MR/40MT TP02-60MR/60MT
T T T

Wiring duct Wiring duct [unit: mm]

[unit: mm]

Installation of base module and expansion module when using accessorial expansion cable (4 cm).
10~30

[uin: mm]

TP02-20MR, etc.

TP02-16EXD, etc

20~40

[2] DIN Rail Installation

(rail)

Mounting clamp and 35mm width rail must be used to install PLC on the rail.
Installing PLC Dismounting PLC

2 Mounting plate Screwdriver First place the groove on the back of module on the upper edge of din rail, and then push the module down to lock up position. Finally press the mounting plate upward into module. 1 Pull mounting plate

Pull the mounting plate downward. Rotate the PLC module to dismount it.

Mount

DIN Rail Mounting clamp

5-2

Mounting clamp must be used to fasten PLC

5-3 Installation of Expansion Cable and Terminal Connector


Base module TP02-40MR/40MT, TP02-60MR/60MT can connect up to two expansion module. Please apply accessorial expansion cable (4 cm) or TP-402EC (40 cm) to connect expansion module. TP-402EC can be used only once in two expansion modules configuration. If TP02-40MR/40MT/TP02-60MR/60MT base module is not connected to expansion module, a termination connector must be installed. Otherwise, the termination connector should be installed in the last expansion module. Base module
Termination connector (Example 1) (NOTE:) The terminatioon connector is not required on TP02-20MR/20MT/TP02-28MR/28MT.

Base module

Expansion module 1

Expansion module 2 Termination connector

(Example 2)

Expansion cable (accessory: 4 cm) Base module Expansion module 1 Expansion module 2 Termination connector (Example 3) Expansion cable (TP02-402EC: 40 cm) (NOTE:)Do not place the expansion cable in the wiring duct.l

Installation of expansion cable Open the expansion cable connection socket cover. Remove the termination connector installed in the expansion socket (OUT) of base module (TP02-40MR/40MT/TP02-60MR/60M T). Install the expansion cable to the expansion socket (OUT). Install the other end of the expansion cable to the expansion socket (IN) of the expansion module. Install the termination connector to the expansion socket (OUT) of the expansion module. Replace the cover of expansion socket.
5-3

Expansion socket

Termination connector Expansion cable Expansion socket cover Prehension cord

(NOTE 1: ) Remove the expansion cable or termination connector from the expansion socket by the pretension cord. (NOTE 2: ) Be ware of the (IN), (OUT) feature of expansion socket. They must be connected in correct order.

5-4

Chapter 6 Wiring
6-1 Precautions
Avoid placing the wiring of input/output signal wire parallel to high voltage power line or power line. Placing them in the same wiring duct should also be avoided. It is recommended to apply M3 terminal on the TP02. Please apply terminals conforming CNS standard or equivalent. Apply torque 4~8 kgf-cm to tight up mounting screw. [Recommended terminal size]

Open the terminal panel cover to access the mounting seat of terminal. Recover the terminal panel cover after wiring.
Terminal panel cover at covered status Terminal panel cover at open status

Terminal panel cover at covered status

Terminal panel cover at open status

Terminal panel cover at open status

6-2 Wiring Power Source, FG Terminal and Halt Output Terminal


Please apply 1.25mm2 copper wire to be wiring material. Utilize the stop output terminal in accordance with the application of emergency stop circuit [refer to 10-2 Precautions of System Design].

6-1

The lower terminal panel of TP02-60MR/MT


AC-L PE 6 1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 HL1 T/R-

(Twisted pair) Class 3 grounding

AC85~264V

Halt output Utilize according to the application of emergency stop circuit.

(NOTE 1: ) TP02-20MR/20MT/TP02-28MR/28MT is not equipped with Halt output terminal.

6-2

6-3 Wiring Input Terminal


Input signal should be wired separately to the wires of power source, output, or power line. Please apply 0.75 ~ 1.25 mm2 copper wire and corresponding terminal for wiring.

[1] Base Module


The wiring on the upper terminal panel of each module.
TP02-20MR/20MT TP02-28MR/28MT No. of input Rated input voltage Input voltage range Rated input current Input ON level Input OFF level Response time OFFON ONOFF
Terminal X001~X004 Terminal X005~X012/ Terminal X005~X016

Terminal connection diagram

4 points DC12 / 24 V DC10 ~ 26.4 V 3.6mA TYP. (12V) 7.6mA TYP. (24V) 10V (3mA) max. 5V (1.5mA) min. 1ms max. 1ms max.

8 / 12 points 24 VDC 20 ~ 26.4 VDC 4.8 mA TYP. (24V) 20V (3.5mA) max. 8V (1.5mA) min. 10ms max. 10ms max.

Common system

1 common line for 16 points (no polarity) Capacity of internal 24 VDC 10% 300mA 24 VDC power supply TP02-40MR/40MT Terminal X001~X004 Terminal X005~X024 Terminal connection diagram No. of input 4 points 20 points Rated input voltage DC12 / 24 V 24 VDC Input voltage range DC10 ~ 26.4 V 20 ~ 26.4 VDC Rated input current 3.6mA TYP. (12V) 4.8 mA TYP. (24V) 7.6mA TYP. (24V) Input ON level 10V (3mA) max. 20V (3.5mA) max. Input OFF level 5V (1.5mA) mix. 8V (1.5mA) mix. Response time OFFON ONOFF 1ms max. 1ms max. 10ms max. 10ms max.

Common system

1 common line for 24 points (no polarity) Capacity of internal 24 VDC 10% 400mA 24 VDC power supply TP02-60MR/60MT Terminal X001~X004 Terminal X005~X036 Terminal connection diagram No. of input 4 points 32 points Rated input voltage DC12 / 24 V DC24 V Input voltage range DC10 ~ 26.4 V DC20 ~ 26.4 V Rated input current 3.6mA TYP. (12V) 4.8 mA TYP. (24V) 7.6mA TYP. (24V) Input ON level 10V (3mA) max. 20V (3.5mA) max. Input OFF level 5V (1.5mA) min. 8V (1.5mA) min. Response time OFFON ONOFF 1ms max. 1ms mix. 10ms max. 10ms mix.

Common system

1 common line for 36 points (no polarity) Capacity of internal 24 VDC 10% 400mA 24 VDC power supply

6-3

Using external power source: When the internal power source capacity (TP02-20MR/20MT: 300mA, TP02-40MR/40MT/TP02-60MR/60MT: 400mA) is not enough for your application, an external power supply could be utilized to provide necessary power source for input component.
Base module Internal 24 VDC power supply capacity 300mA 300mA 400mA 400mA

TP02-20MR TP02-28MR TP02-40MR TP02-60MR

Using 12 VDC power supply The rated voltage of terminal 1 ~ 4 (high speed counter input points) is 12/24 VDC. Please wiring external power supply according to following descriptions: Used with internal 24 VDC power supply Used with external 24/12 VDC power supply

NOTE: The (+) side of external 12 VDC power supply and internal 24 VDC power supply can be connected. While their (-) side must be separated indecently.

NOTE: The (+) side of 12 VDC, 24 VDC power supply can all be wired to COMA as their common point. While their (-) side must be separated indecently.

6-4

[2] Expansion Module


The wiring on the upper terminal panel of TP02-16EMR, TP02-32EMR and the upper and lower terminal panel of TP02-16EXD.
TP02-16EXD No. of input Rated input voltage Input voltage range Rated input current Input ON level Input OFF level Response time OFFON ONOFF Terminal 1~16 16 points DC24 V DC20 ~ 26.4 V 4.8 mA TYP. (24V) 20V (3.5mA) max. 8V (1.5mA) min. 10ms max. 10ms max. 1 common line for 8 points X 2 (no polarity) Terminal connection diagram Terminal connection diagram (Upper terminals) (Lower terminals)

Common system

TP02-16EMR

Terminal 1~8 No. of input 8 points Rated input voltage DC24 V Input voltage range DC20 ~ 26.4 V Rated input current 4.8 mA TYP. (24V) Input ON level 20V (3.5mA) max. Input OFF level 8V (1.5mA) min. Response time OFFON ONOFF 10ms max. 10ms max. 1 common line for 8 points (no polarity)

Common system

TP02-32EMR No. of input Rated input voltage Input voltage range Rated input current Input ON level Input OFF level Response time OFFON ONOFF

Terminal 1~16 16 points DC24 V DC20 ~ 26.4 V 4.8 mA TYP. (24V) 20V (3.5mA) max. 8V (1.5mA) min. 10ms max. 10ms max. 1 common line for 16 points (no polarity)

Terminal connection diagram (Terminals on the left side) side) (T erminals on the right

Common system

6-5

[3] Precautions for Connecting Input Terminal


(1) Input signal ON/OFF time - In order to ensure the correctness of input ON/OFF signal, the signal must conform following specification:
Module OFFON response time: t ON Module ONOFF response time: t OFF T OFF > t + t OFF

The time required for input device to switch to ON: T ON The time required for input device to switch to OFF: T OFF One scan time of PLC: t T ON > t + t ON

(2)

Precautions of various kinds of input component - following input components (Sensor/switch) DC input

In above listed examples including . . . . the drive current capacity of external output transistor must be exceeding the capacity of the transistor inside input module. The circuit of example can only be used in applications without common polarity DC input. Applying the circuit of example should be aware of the leakage current when the signal is at the OFF condition. (If the leakage current exceeds the OFF current of module, the OFF signal will not be recognized.)
6-6

The voltage output type input component in the example can not be used in DC input application.

6-7

(3) Current leakage of input component In the following example, there are current leakage when the signal is OFF. If the leakage current exceeds the OFF current of input module, the input port may not turn OFF or the Noise Margin of the input module may drop. Limit switch with LED indication (Reference)
Calculation of leakage current V-Vf iL = Rs+Rin V: Voltage of power supply VF: Voltage drop on the LED RS: Resistance of current limit RIN: Internal impedance of input module

Countermeasure: Refer to the circuit diagram of the solution eliminating the effect of leakage current. The resistance of resistor R should be conforming following equations:
iL =

( (

Rin R Rin R

)<Vin OFF ) 0.5

R<

Vin OFFRin Rin iL - Vin OFF

tolerance

The rated power required for Ble eder resistance is calculated as follows:

W>

V2 R

3
tolerance

iL : Leakage current VIN OFF : Input signal voltage level at OFF condition RIN: Internal resistance of input port V: Power supply voltage level

[Example]

The output power supply voltage of base module TP02-20MR is 24 VDC. Presume that the leakage current of the input device is 6mA.
iL = 6mA Vin OFF = 8V Rin = 5k V = 24V R< 85 568 242 0.9103 0.5 = 0.909 k, if R is 0.9 k then

W>

3 = 1.92W

A resistor with resistance 0.9Kohm and power capacity 2W should be applied as bleeder resistor.
6-8

6-4 Wiring Output Terminal


Please apply 0.75 ~ 1.25 mm2 copper wire and corresponding terminal for wiring. Please apply safety fuse on the common terminal of output circuit to ensure the safety of load.

[1]Base Module
The wiring on the lower terminal panel of each module. [Relay output: 8/12 points]
TP02-20MR/ TP02-28MR No. of output Max. output voltage Current range Rated min. load Response time OFFON ONOFF Terminal Y001~Y008/Y012 8 points/12 points 250 VAC/30 VDC 2A/1 point, 2A/1 common points 5 VDC 10mA 10ms max. 10ms max. 1 common line (-) for 8 points 1 (Y001~Y008) 1 common line (-) for 4 points 1 (Y009~Y012) Terminal connection diagram

Common system

[Relay output: 16 points]


TP02-40MR No. of output Max. output voltage Current range Rated min. load Response time OFFON ONOFF Terminal Y001~Y016 16 points 250 VAC/30 VDC 2A/1 point, 2A/1 common points 5 VDC 10mA 10ms max. 10ms max. 1 common line (-) for 1 points 4 (Y001~Y004) 1 common line (-) for 4 points 3 (Y005~Y016) Terminal connection diagram

Common system

[Relay output: 24 points]


TP02-60MR No. of output Max. output voltage Current range Rated min. load Response time OFFON ONOFF Terminal Y001~Y024 24 points 250 VAC/30 VDC 2A/1 point, 2A/1 common points 5 VDC 10mA 10ms max. 10ms max. 1 common line (-) for 1 points 4 (Y001~Y004) 1 common line (-) for 4 points 3 (Y005~Y016) 1 common line (-) for 8 points 1 (Y017~Y024) Terminal connection diagram

Common system

6-9

[Transistor output: 8/12 points]


TP02-20MT/28M T No. of output Rated load voltage Load voltage range Rated max. load current Response time OFFON ONOFF Terminal Y1 to Y8/Y12 8/12 points 5/12/24 VDC 4.5 to 27 VDC 0.3A/point 1.6A/8 points common (Y1 to Y8) 0.8A/4 points common (Y9 to Y12) 1ms max. (resistance load) 1ms max. (resistance load) 1 common line for 8 points 1 (Y1 to Y8) 1 common line for 4 points 1 (Y9 to Y12) Terminal connection diagram

Common system

[Transistor output: 16 points]


TP02-40MT No. of output Rated load voltage Load voltage range Rated max. load current Response time OFFON ONOFF Terminal Y1 to Y16 Terminal connection diagram 16 points 5/12/24 VDC 4.5 to 27 VDC 0.3A/point 0.8A/4 points common (Y5 to Y16) 1ms max. (resistance lo ad) 1ms max. (resistance load) 1 common line for 1 points 4 (Y1 to Y4) 1 common line for 4 points 3 (Y5 to Y16)

Common system

[Transistor output: 24 points]


TP02-60MT No. of output Rated load voltage Load voltage range Rated max. load current Response time OFFON ONOFF Terminal Y1 to Y24 Terminal connection diagram 24 points 5/12/24 VDC 4.5 to 27 VDC 0.3A/point 0.8A/4 points common (Y5 to Y16) 1.6A/8 points common (Y17 to Y24) 1ms max. (resistance load) 1ms max. (resistance load) 1 common line for 1 points 4 (Y1 to Y4) 1 common line for 4 points 3 (Y5 to Y16) 1 common line for 8 points 1 (Y17 to Y24)

Common system

6-8

[2] Expansion Module


The wiring on the lower terminal panel of TP02-16EMR, TP02-32EMR and the lower and upper terminal panel of TP02-16EYR/TP02-16EYT expansion module.
TP02-16EYR No. of output Max. output voltage Current range Rated min. load Response time OFFON ONOFF Terminal 1~8 X 2 16 points 250 VAC/30 VDC 2A/1 point, 2A/1 common points 5 VDC 10mA 10ms max. 10ms max. 1 common line (-) for 4 points X 4 Relay numbers are allocated from 0 to 16 from upper to lower rows of the terminal block. Terminal connection diagram (Upper terminal panel) (Lower terminal panel)

Common system

TP02-16EMR No. of output Max. output voltage Current range Rated min. load Response time OFFON ONOFF

Terminal 1~8 8 points 250 VAC/30 VDC 2A/1 point, 2A/1 common points 5 VDC 10mA 10ms max. 10ms max. 1 common line (-) for 4 points X 2

Terminal connection diagram

Common system

TP02-32EMR No. of output Max. output voltage Current range Rated min. load Response time OFFON ONOFF

Terminal 1~16 16 points 250 VAC/30 VDC 2A/1 point, 2A/1 common points 5 VDC 10mA 10ms max. 10ms max. 1 common line (-) for 4 points X 4

Terminal connection diagram (Left terminal)

(Right terminal)

Common system

Relay numbers are allocated from 0 to 16 from left to to right rows of the terminal block.

[Transistor output: 16 points]


TP02-16EYT No. of output Rated load voltage Load voltage range Rated max. load current Response time OFFON ONOFF Terminal Y1 to Y16 16 points 5/12/24 VDC 4.5 to 27 VDC 0.3A/point 0.8A/4 points common 1ms max. (resistance load) 1ms max. (resist ance load) 1 common line for 4 points X 4 Relay numbers are allocated from 0 to 16 from upper to lower rows of the terminal block. Terminal connection diagram (Upper terminal) (Lower terminal)

Common system

6-9

6-10

[3] Precautions for Connecting Output Terminal


(1) Surge current of indicator load When turning on an incandescent lamp, there is surge current 10 to 20 times bigger than normal current for several 10 ms. A bleeder resistor or current restraint resistor can be applied to reduce it. Shunt resistor (There will be some certain amount of current pertained under OFF condition and dimly illuminated the indicator lamp. Therefore, the resistance of R must be carefully selected.) Current restraint resistor (Indicator illumination will be reduced if the resistance of R to too large, determine the resistance value by the brightness needed when turning on the lamp.) (2) Surge voltage of inductive load Certain inductive load would generate a surge voltage return at ON/OFF transition. This is specifically true for relay output module (standard surge consumption circuit is not equipped). They may be seriously affected by the surge voltage. Please refer to following description regarding surge consumption circuit for different situation. Whe using AC power supply, a CR surge consumption circuit should be applied.

Dielectrical strength exceeding 250 VAC Use on 100 VAC (0.1u + 120 ohm) Use on 200 VAC (0.033u + 120 ohm)

When using DC power supply, a flying-wheel diode should be applied.

Peak reversing voltage (VR M ) must be tripled of the load voltage. Average rectification current (Io ) must exceeds the load current. Applying only capacitor C to consume surge voltage may cause severe damage to the contact of relay! (Do not apply this configuration.)

(Capacitor charging current at OFF condition too (Capacitor charging current at ON condition too large, it could meltdown the contact of relay.) large, it could meltdown the contact of relay.)
6-11

1(3) Driving underload. A semiconductor relay can be used as driving interface to drive underloaded machine.

(4) Life span of relay The life span of output relay varies with different loading condition.

2million times max.


200 100 70 50 30
AC120V COS =1 DC30V T=0

AC250V COS =1

10 7 5
DC30V T=7ms AC120V COS =0.4 AC250V COS =0.4

DC30V

T=40ms

DC30V T=60ms

0.1

0.3 0.5 0.7 1

2 3 4 5

Load current(A) NOTE 1: Above listed values are standard value. The ambient temperature will affect the life span of relay. NOTE 2: When used with DC load, the life span of relay would also be affected by the time constant of the connect load. T: time constant (T = R/L) (R, L value represent the resistance and inductance respectively.) Generally, for resistance load: T < 1ms for small Relay load: T = 7ms for large current inductance load: T=40ms (Applying surge consumption circuit may greatly increase the life span of relay. NOTE 3: When the load current is limited under 2A, the life span of general relay could last more than 100 thousand times.

6-12

6-5 Solving Noise Problem


The wiring connecting the PLC to external components will decide the effect from external noise to the PLC system. Solutions to solve noise problem are listed below.

[1] Grounding
PLC should be separately grounded. It is not to be grounded together with other heavy load (including inverter or motor).

Apply class 3 grounding for TP02. Apply grounding wire with diameter larger than 2mm2 and length less than 5m.
Solutio n

If the system can not be grounded separately, just connect the FG terminal of TP02 to the control box as shown in figure will do. Apply the connection wire as short as possible. If the control box has been grounded, it is not necessary to connect the grounding terminal of PLC to the control box as shown in (NOTE).
Solution 2

If TP02 is installed on the door side of control box, please wire the grounding as shown in following figure. (Apply grounding with wire diameter exceeding 2mm2 ,length below 50 cm.)

6-13

[2] Power Source Noise


The anti-noise capability of power supply module of TP02 is 1000Vp -p. If the noise from power source may be exceeding this range, a isolation transformer is required to isolate this noise. The isolation transformer should be able to absorb high frequency noise in 100KHz ~ 2MHz.
Isolation transformer

Isolation transformer should be installed at location as close to PLC as possible. Please apply
twisted wire to connect AC power source.

The capacity of isolation transformer should be exceeding the power consumption of PLC to more
than 20%. Otherwise, the voltage at the primary side of isolation transformer may exceeds its rated voltage that may cause potential safety problem. Control box Power Base consumptio module n TP02-20MR 30VA max. TP02-28MR 30VA max. TP02-40MR 55VA max. TP02-60MR 60VA max. A voltage tap is required on the secondary side of isolation transformer if a large capacity transformer is in use. When a severe noise problem is encountered, isolate the power source of each PLC and apply multiple isolation transformer may moderate the problem.

[3] Solving Thunderstroke problem


When the factory installing PLC is far away from other buildings, the installation of PLC must take thunderstroke problem into consideration. (Thunderstroke may induce surge voltage up to 4000KV.) A surge protector must be installed to reduce the high voltage and protect PLC. It is recommended to install a surge protector according to the equipment installed and power capacity. Please refer to following diagram for the installation of an outdoor 1.7KAV surge protector:

The special type 3 grounding (resistance less than 10ohm) must be installed seperately with PLC
grounding.

Please install a main circuit breaker before the surge absorber. Various kinds of surge absorber:
Commercial voltage Part number AC100V ERZ-A20PK251 Specification 250V10% 5000A (8/20 us)
6-14

Manufacturer Varistor voltage Matsushita Surge capacity Electric Co., LtD.

AC200V

ERZ-A20PK501

500V10% 5000A (8/20 us)

Varistor voltage Surge capacity

6-15

Applying underground pipeline may isolate the voltage induced from the air. (Under thunderbolt, the voltage induced from the air may be exceeding 24 VDC.) The pipeline should be buried underground in depth at least 60 cm.

Applying relay to input/output signal wire may isolate induced voltage and protect the PLC from damage.

[4] Anti-Noise of Expansion Cable


If a elector-magnetic switch is operating ON/OFF action near the PLC or expansion cable, it is possible to generate messy noise or high voltage and cause undesired effect to the PLC. Please install surge protector beside the elector-magnetic switch. The system expansion cable must not be placed into the same wiring duct with any other input/output signal or power line.

[5] Anti-Noise of I/O Wiring


(1) Please apply insulated twisted pair to be input signal line to prevent noise interference. Shielding wire of insulated twisted pair should be connected to the FG terminal of TP02 and then to the ground.

6-16

(2) Please refer to page 6-10 Precautions for connecting output terminals for information. Surge Absorber is not included in the output circuit of relay output module. Please apply
additional surge absorber in operation.

(3) Power lines should be arranged away from input/output signal line and communication wire to prevent noise interference. In case the signal connection distance of input/output wire is longer, input wires should be wired separately to the output wires to prevent noise interference.

Never wire the signal lines of PLC to the same wiring duct of any other power line.

6-17

Chapter 7 Memory Architecture of TP02


7-1 Different type of memory
TP02-20 TP02-28 TP02-40 TP02-60 Control Method Program storage & cycling execution + interrupt handling Program Capacity 1.5K words 4K words I/O point Qty. 20(12in/8out) 28(16in/12out) 40(24in/16out) 60(36in/24out) Max. I/O point Qty. 20 28 104 124 Input Coil X001~X384 tot. 384 points Output Coil Y001~Y384 tot. 384 points Aux. Coil C0001~C2048 tot. 2048 points Special Coil SC001~SC128 tot. 128 points Sequencer S0101~S0816 (corresponding V001~V008) Register V001~V256 tot. 256 points Counting System Incremental V0001~V0250:0.1~6553.5 sec. (250 sets) Timer Value V0251~V0256:0.01~655.35 sec. (6 sets) Counter Value 00000~65535 V0001~V1024 tot. 1024 words Aux. Register D0001~D2048 tot. 2048 words System Register WS000~WS128 tot. 128 words Constant Register WC001~WC912 tot. 912 words Text File FILE1~FILE130 (20 characters/text file) LB001~LB128 tot. 128 points LB111~BL114 to be used by High speed counter/Interrupt input Label (corresponding HSC1~HSC4/INC1~INC4) LB128 to be used by Interrupt timer Real time clock X O Real time clock V1018:sec., V1019:min., V1020:hr., V1021:day, V1022:week, V1023:month, V1024:year Register 4 points input to be used by High speed counter & Interrupt input (V1001~V1008) High Speed Input 1. High speed counter: 1 phase or 2 phase 10KHz (choose from 6 modes) 2. Interrupt input : 4 points (choose from 4 modes) Analog input: V961~V964 tot. 4 points (V965~V968 reserved for expansion in succeeding model) Analog I/O Register Analog output: V985~V986 tot. 2 points (V987~V1000 reserved for expansion in succeeding model) Timer/ Counter

7-1

7-2 Definition of Special RELAY


Relay No. SC001 SC002 SC003 SC004 SC005 SC006 SC007 SC008 SC009 SC010 SC011 SC012 SC013 SC014 SC015 SC016 SC017 SC018 SC019 SC020 SC021 SC022~ SC040 SC041 SC042 SC043 SC044 SC045 SC046 SC047 SC048 SC049 SC050~ SC054 SC055 SC056 SC057 Function Description HSC1 Enable bit HSC1 Reset bit HSC2 Enable bit HSC2 Reset bit HSC3 Enable bit HSC3 Reset bit HSC4 Enable bit HSC4 Reset bit Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved Control outputs of output module under execution state. ON: Enforce all outputs of output module to OFF. OFF: disabled Perpetual calendar timing operation OFF: Activated/ON: Stop timing Perpetual calendar 30 sec. correction. Perpetual calendar current time adjust ment. OFF: time monitor/ON: time adjustment Temperature offset enable bit Reserved Non-carry flag ON: Operation do not generate carry flag, output one pulse signal. Carry flag ON: Operation generate carry flag, output one pulse signal. Zero flag ON: Value become zero after operation, output one pulse signal. Error flag ON: Illegal operation Normally OFF contact 0.1 second clock 0.4 second clock 0.8 second clock 1 second clock Reserved ON: In Run state OFF: In program state ON: Password existed. Reserved
7-2

Remark SC001~SC032 are readable (STR, AND, OR) and writable (OUT) relay. SC033~SC128 are read-only relay. (STR, AND, OR)

SC058 SC059~ SC063 SC064

Initialize pulse Reserved PLC external enforced RUN mode activated Only one set of F-52 is allowed to be used in program Only one set of F-53 is allowed to be used in program

SC065

F-52 10KEY input key pressed indication relay

SC066

F-53 16KEY input 0~9 key pressed indication relay

SC067~ SC072

F-53 16KEY input A~F key pressed indication relay Only one set of F-55 is allowed to be used in program

SC073

F-55 DSW dip switch scan complete indication relay

SC074 SC075 SC076~ SC080 SC081 SC082 SC083 SC084 SC085 SC086 SC087 SC088 SC089 SC090 SC091 SC092 SC093 SC094 SC095 SC088~ SC104 SC105 SC106 SC107 SC108 SC109 SC110

F-58 RXD receive complete indication relay F-59 TXD transmit complete indication relay Reserved CPU malfunction Power Supply malfunction Memory abnormality Prior to Shutdown abnormality Input / Output Module malfunction Battery malfunction Communication abnormality CH1 status coil (4RD, 4TM module) OFF: normal ON: error (wire break, CH2 status coil (4RD, 4TM module) OFF: normal ON: error (wire break, CH3 status coil (4RD, 4TM module) OFF: normal ON: error (wire break, CH4 status coil (4RD, 4TM module) OFF: normal ON: error (wire break, CH5 status coil (4RD, 4TM module) OFF: normal ON: error (wire break, CH6 status coil (4RD, 4TM module) OFF: normal ON: error (wire break, CH7 status coil (4RD, 4TM module) OFF: normal ON: error (wire break, CH8 status coil (4RD, 4TM module) OFF: normal ON: error (wire break, Reserved Communication flag of data link or Remote I/O Communication flag of data link or Remote I/O Communication flag of data link or Remote I/O Communication flag of data link or Remote I/O Communication flag of data link or Remote I/O Communication flag of data link
7-3

) ) ) ) ) ) ) )

SC111 SC112 SC113~ SC128

Communication flag of data link Communication flag of data link Reserved

7-3 System Memory


Special Register (Entries marked * sign are for user setup, the others are for system status indication.) Register Function Description Remark WS001 current scan time. ( unit 1ms) WS002 current minimum scan time. ( unit 1ms) WS003 current maximum scan time.( unit 1ms) WS004 00=X inpvt normal,01=X inpvt no refresh WS005 Monitor the system memorys error address. Check only entries marking sign WS006 Location of invalid program instruction address,For example: WS006 = 00103 indicate error or invalid instruction address at LC:0103. WS007 Accumulated occurrence of power off or entering program mode. WS008 Current operating state of TP02 01: program state 02: Run state 03: Run state program being modified in AUX14 04: error encountered state WS009 Program check error code: 00: normal 01: missing or too many F-08 ENDS 02: Function(F-52,F-53,F-58,F-59)double Used 03: too many STR 04: not enough STR 05: MCR error(MCS not existed -Nest loop,MCR number>JCS) 06: JCS error(JCR not existed) 07: JCR error(JCS not existed -Nest loop, JCS number> JCS) 08: TMR/CNT repetitive use(include F-16,F-50) 09: FOR/NEXT missing counterpart 10: LABEL does not exist or too many LABEL 11: double out Accumulated occurrence of entering invalid password Not defined Not defined AUX11 (Monitor), storage address of internal code of first component AUX11 (Monitor), storage address of internal code of second component AUX11 (Monitor), storage address of internal code of third component AUX11 (Monitor), storage address of internal code of fourth
7-4

Correct invalid program instruction accordingly

WS010 WS011 WS012 WS013 WS014 WS015 WS016

Do not arbitrarily setup this entry. Do not arbitrarily setup this entry. Do not arbitrarily setup this entry. Do not arbitrarily

WS017

component CPU identification and version number For example: 0 2 4 1 0 (Decimal: representation) representing V1.0 representing TP02 /4k model

setup this entry

7-5

WS018

Xxxxx preserving range after power off For example: 1. 0000: do not preserve any after power off 2. 0001: preserve first BYTE after power off 3. 0406: preserve fourth to sixth BYTE after power off 4. 0A0D: preserve tenth to thirteenth BYTE after power off Yxxxx preserving range after power off Cxxxx preserving range after power off Define restriction over repetitively using coil 01: Do not restrict repetitively using coil. 00:Coil can not be used repetitively. Control value of timer/counter after power off. Applied to
V1~V256

above

mentioned are described in HEX number

WS019 WS020 WS021

WS022

01:Value of timer/counter remain unchanged after power off or program mode 00:Value of timer/counter value clear to 0after power off or program mode WS023
Control outputs of output module in program or error state. 01:Enforce all outputs of output module to OFF in program state. 00:Remain output states of output module under execution states in program state Control value of aux. Memory after power off. Applied to V257-V1024, D0001-D2048. 01:Value of aux. memory remain unchanged after power off or program mode 00:Value of aux. memory clear to 0 after power off or program mode

WS024

WS025~ Reserved WS040 WS041 MMI port communication specification setup 103 102 101 100 data stop bit parity baudrate 0: 1 bit 0: non 0: 19200 length 0: 7 bit 1: 2 bit 1: odd 1: 9600 1: 8 bit 2: even 2: 4800 3: 2400 4: 1200 5: 600 6: 300 7: 38400 WS042 MMI port station select 01~99 00 broadcast

for

example: data length 8 bit stop bit 1 bit parity odd baudrate 9600 please set WS041 to 01011 (in decimal)

when the communication address is set to 00, slave station will receive data without responding.

WS043

RS422 communication port function setup 0: Computer link 1: Data link 2: Remote I/O link
7-6

WS044

RS422 port communication specification setup A)Computer link 103 data length 0: 7 bit 1: 8 bit 102 stop bit 0: 1 bit 1: 2 bit 101 parity 0: non 1: odd 2: even 100 baudrate 0: 19200 1: 9600 2: 4800 3: 2400 4: 1200 5: 600 6: 300 7: 38400

note:

WS045

B)Data link/Remote I/O LINK 0: 76800 1: 38400 RS422 communication port station setup 01~99: Computer link 00: broadcast 00~07: Data link 00~04: Remote I/O

when WS043 = 0, the principle of setting WS044 is the same as setting WS041 when WS043 = 1 or 2, if WS044 = 0, the communication baudrate would be 76800 if WS044 = 1, the communication baudrate would be 38400

RS422 data link, remote I/O connected stations total 00~07: Data link 00~04: Remote I/O WS047 10ms timer interrupt setup(corresponding to LB128) 0: timer interrupt disable 1: timer interrupt enable WS048 reserved WS049 External enforced ON/OFF function 0: external enforced ON/OFF not allowed 1: external enforced ON allowed/ external enforced OFF not allowed (use X5 to input OFFON control, to enforce PLC enter RUN mode) 2: external enforced ON/OFF allowed (use X5 to enforce ON/ X6 to enforce OFF, both are ON differential operation) WS050~ PLC Self-Diagnostic error code storage address WS057 WS058 WS059 WS060 WS061 00: High speed counter current value preservation after power off. 01: High speed counter current value reset after power off. High speed counter setup mode. X001~X004 are normal input or Interrupt input function setup. 4 AD module operation mode 00: Disable A/D operation 01: 0~10V voltage input mode (0~4000) 02: 0~20mA current input mode (0~2000) 03: 4~20mA current input mode 1~5V voltage input mode (0~2000)

WS046

sequentially store error code in occurring order


7-7

1st 4 AD+ module operation mode 00: Disable A/D operation 01: 0~10V voltage input mode (0~4000) 02: 0~20mA current input mode (0~2000) 03: 4~20mA current input mode 1~5V voltage input mode (0~2000) 1st 4 RD module operation mode 00: Disable 4RD operation 01: -180~600 input mode (0~4000) st 1 4 TM module operation mode 00: Disable 4TM operation 01: J-type 0~700 input mode (0~4000) K-type 0~1000 input mode (0~4000) WS062 2 DA module operation mode 00: Disable D/A operation 01: 0~10V voltage input mode (0~4000) 02: 0~20mA current input mode (0~2000) 03: 4~20mA current input mode 1~5V voltage input mode (0~2000) 2 DA+ module operation mode 00: Disable D/A operation 01: -10~10V voltage input mode (0~4000) 02: 0~20mA current input mode (0~2000) 03: 4~20mA current input mode 1~5V voltage input mode (0~2000) A/D software filter operation mode 00: Disable software filter mode 01: Enable software filter mode. 02:Enable software filter mode 2 03:Enable software filter mode 3 2nd 4 AD+ module operation mode 00: Disable A/D operation 01: 0~10V voltage input mode (0~4000) 02: 0~20mA current input mode (0~2000) 03: 4~20mA current input mode 1~5V voltage input mode (0~2000) 2nd 4 RD module operation mode 00: Disable 4RD operation 01: -180~600 input mode (0~4000) nd 2 4 TM module operation mode 00: Disable 4TM operation 01: J-type 0~700 input mode (0~4000) K-type 0~1000 input mode (0~4000) Module and sensor type select 00: 4AD/4AD+ 01: 4RD(PT100,=0.00375) 02: 4TM(J-type) 03: 4TM(K-type) Module present value CH1 offset register(4RD, 4TM module)
7-8

WS063

WS064

WS065

WS066 WS067

WS068 WS069 WS070 WS071 WS072 WS073 WS074 WS075 WS075~ WS128

CH2 offset register(4RD, 4TM module) CH3 offset register(4RD, 4TM module) CH4 offset register(4RD, 4TM module) CH5 offset register(4RD, 4TM module) CH6 offset register(4RD, 4TM module) CH7 offset register(4RD, 4TM module) CH8 offset register(4RD, 4TM module) CH1 offset register(4RD, 4TM module) Reserved

7-9

Chapter 8 TP02 Operation Flowchart


8-1 Operation Cycle
[1] Operation Flowchart
Power ON
data memory initialization

Power ON process

hardware check user program transmitted from flash memory to RAM

RUN/STOP mode? RUN mode System memory check User program check Initialize data initiation Hardware check ROM

Stop mode

RAM transfer
Hardware check

Operation flag (SC0041 ~SC0044) rest Input/Output Process (I/O update) Remote I/O Process (when WS043=2) Auxiliary equipment, computer link interrupt process (MMI port, communication port) Data link process (when WS043=1) User program operation process High speed counter process (when WS059=01~06) Watchdog Timer reset

Scan cycle

Run/Stop mode? Run mode

Stop mode

8-1

[2] Power ON processing


(1) Initialize Data Memory Data Memory Input Connection Point Output Coil Internal Coil Special Coil Symbol X0001~X0384 Y0001~Y0384 C0001~C2048 SC001~SC128 1. Under power off or program state, status of special coil SC001~SC128 will be preserved. 2. Under power off state, preserving range of status of other coils could be setup via programming PU12(AUX12) or WS018, WS019, W020 setting. Setting WS022 will determine value of memory (V0001~V0256) is preserved or cleared to 00 under power off or program state. Timer/Counter Memory V0001~V0256 Setting WS022 to 0000: Value of memory (V0001~V0256) will be cleared to 00. Setting WS022 to 0001: Value of memory (V0001~V0256) will be preserved. V0257~V1024 Setting WS024 will determine value of memory is preserved or cleared to 00 under power off or program state. Setting WS024 to 0000: Value of memory will be cleared to 00. Setting WS024 to 0001: Value of memory will be preserved. System Register Constant Memory Text File WS001~WS128 WC001~WC512 File 001~File 130 Value of system memory will be preserved under power off state. Value of constant memory will be preserved under power off state. Value of text file will be preserved under power off state.

Auxiliary Memory D0001~D2048

(2) Hardware check TP02 diagnoses its own hardware, such as system ROM, I/O bus, and power supply (See 8-3 Self-diagnose) (3) ROM to RAM transfer All TP02 basic module can perform Flash memoryRAM operation, and moreover TP02-60MR/60MT, 40MR/40MT can perform external ROMRAM operation (See Chapter 11 : ROM Operation)

8-2

[3] Scan Cycle


The scanning cycle is started after switching power on and following the self-diagnostic procedures, and enter scan cycle. Scan cycle is started from the beginning of hardware check to the end of user program processing (execution of instruction before F00 END). Scan cycle is executed repeatedly. The time required to complete one scan cycle is called scan time. (1) Hardware Check TP02 hardware check, please refer to [8-3 Self-Diagnose] for result of self-diagnose. (2) Operation Flag (SC041~SC044) Reset The execution of operation instruction could affect the operation flag. The operation flag reset occurs prior to the execution of every scanning cycle. Please refer to information on operation instruction for the operation flag. (3) Input/Output Process The information exchange between the input relay and the data memory is called I/O refresh. The ON/OFF status of input relay is controlled by ON/OFF memory data. The ON/OFF status of output relay is controlled by the result of the CPU execution of user program updating output ON/OFF status. The output relay is then perform the output function according to ON/OFF status. (NOTE 1) During the first scanning cycle after [Power ON Process], data memory will perform the data update. Operation result of every scanning cycle thereafter will update the output information. (NOTE 2) Please carefully program the unused area of Input/Output relay as auxiliary relay, however we recommend not to use this area for future addition purpose of input/output devices. (4) Remote I/O Process When the communication port is used in remote I/O (system memory WS043 = 02), the remote I/O master station will use the I/O relay for data exchange with slave station. (5) Peripherals/Computer Connection Interrupt Process MMI port and peripherals (PU12, PC12, etc.) operate the data exchange between the computer and connected machines. Computer connection use the communication port (system memory WS043 = 00) to operate the data exchange between connected machines. (6) Data Connection Process When the communication port is used for data exchange (system memory WS043 = 01), terminal connected with the data link will operate the data exchange.

8-3

(7) User Program Operation Process Execute user program operation, starting from the beginning address to the F-00 END instruction. Operation results of STR, STR NOT, AND, AND NOT, OR, OR NOT, AND STR, OR STR are stored into buffer or stack register. Operation results of OUT, TMR, CNT and application instructions are stored into data memory. (8) High Speed Counter Process When using high speed counter (system memory WS059 = 01~06), special relay of high speed counter (SC001~SC008), special register (V1001~V1008) and hardware portion will execute the data exchange operation. (9) Watchdog Timer Process Watchdog timer will check the internal operation of CPU. If the result is normal, CPU will repeat the execution of scanning cycle. If the result indicate CPU abnormality, PLC will halt the operation. The interval of Watchdog Timer is 200ms, if the CPU has an error or enters limitless program loop, the CPU cannot reset the watchdog timer so it times up and stop operations. (10) Scanning Time The time required to perform the process starting from hardware check to the execution of F-00 END instruction is called the scan time. one scan time(T) = t1 + t2 + t3 + t4 + t5 constant processing time (hardware check, Watchdog Timer reset etc.) t1 = 560 (us) Input/Output processing time t2 = 120 + 8 x number of input points + 6 x number of output points (us) communication processing time data link t3 = 200 us remote I/O t3 = 1200 + 2600 x number of slave-stations us [at 76800 bits/s] t3 = 2400 + 5200 x number of slave-stations us [at 38400 bits/s] user program processing time (the time required to execute instruction starting from address0000 to the F-00 END instruction) peripherals, computer link interrupt processing time t5 = 100 us each

t1 = t2 = t3 =

t4 = t5 =

(NOTE 1) User program processing time is the time required to execute instruction starting from address 0000 to the F-00 END instruction. The time required to execute the NOP instruction is 0.6 s per NOP instruction at TP02-20MR(T) TP02-28MR(T) and 0.4 us per NOP instruction at TP02-40MR(T)/TP02-60MR(T). Therefore, appending the F-00 END instruction at the end of effective instruction will reduce the scan time.

8-4

nPLC Overall Response Time


The response time of basic and expansion module is represented as following program:

The below timing chart shows time from where external contact point X0001is converted until output relay (Y0001) changes in the above ladder program. (a) In case of shortest time (b) In case of longest time

ta: OFF ON response time of input port , tb: one scan time tc: OFF ON response time of output port

nON/OFF Time of Input Signal


The ON/OFF status of input connection point require more than one scan time to be stored securely to data memory.

tON: OFF -> ON response time of input port tOFF: ON -> OFF response time of input port In case of , the external connection point is ON beyond the input processing period, so the data memory is OFF. At , the I/O cycle has updated data, so the data memory is ON. At , the external connection is OFF, but the response data in the logic side is still ON, so the data memory is still ON. To make the ON/OFF status of TP02 input signal securely representing actual ON/OFF status, the ON/OFF time of input signal must meet the following conditions: ON time of input signal > 1 scan cycle + (OFF -> ON response time of input port) OFF time of input signal > 1 scan cycle + (ON -> OFF response time of input port)
8-5

8-2

Interrupt Function

The interrupt function of TP02 can be divided into timing interrupt and high-speed counter interrupt (10 modes). The scan cycle pipeline high-speed processing when executing interrupt function.

[1] Timing Interrupt Function


The use of timing interrupt function will execute the sub-routine designated by the index (:F-42 LB128) in every 10 ms. The sub-routine will be executed until the sub-routine return point (:F-45), the system will then resume the execution of main program.

The interrupt function can be executed under PLC operation process and output/input process. Therefore, the time required to complete the interrupt program must be less than 10 ms. The timing interrupt function is setup by the value of system parameter WS047. n Example of Timer Interrupt

8-6

[2] Highspeed Counter Interrupt Function


Please refer to [Chapter 12 The Use of Highspeed Counter].

8-7

8-3 Self-Diagnose
The CPU in the TP02 PLC is constantly repeating Self-Diagnose. The result is indicated via malfunction indicator. Generated error code is stored in special relay and system memory. PLC LED indicator Outpu operati t on Power RUN Err (NOTE status (Green) (Green) (Red)
4) Halt

Item

Content

Err Code Special (decimal) relay WS050~ WS057 01 02 03

Normal

RUN Mode

Monitor/change mode

RUN

ON

ON

ON

OFF

STOP Mode STOP OFF (NOTE 5) Program mode System ROM abnormality RAM abnormality Flash memory/user ROM abnormality Memory User program error abnormality (NOTE 1) (instruction code check/parity check)
System memory abnormality(NOTE2)

ON

Blink

OFF

OFF

ON

SC083 04

STOP OFF

ON

05 Not fixed Not fixed OFF

Prior to User program Shutdown entered endless loop Abnormality (NOTE 6) Watchdog Timer CPU error abnormality Input / I/O Bus abnormality Output error Remote I/O Comm. error abnormality Battery error Battery voltage low Power source disconnected or Power error power source voltage low RUN ON ON

Error

Not fixed Not fixed ON

SC084 SC081 SC085 SC087 SC086

10 11 06 07 08
12 (NOTE 3)

ON

ON

STOP OFF

OFF

OFF

OFF

SC082

(NOTE 1) When program errors were detected, address of errors are is stored in WS006. (NOTE 2) When system memory errors were detected, address of errors are is stored in WS005. (NOTE 3) Switching on of power supply could generate error code 13. (except Prior to shutdown Abnormality or CPU error). (NOTE 4) TP02-20MR/TP02-28MR is not equipped with halt output point. (NOTE 5) Under STOP mode, the RUN indicator would be flashing and the ERR indicator would be extinguished (only battery error keeps lighting). (NOTE 6) Under user program endless loop error, status if the ERR indicator is uncertain. Power off and on again will enter error mode.
8-8

[1] Self-Diagnose
(1) System ROM abnormality: Verify system ROM at power on with Sum check . (2) RAM abnormality: Verify RAM read, write accessibility every scan cycle. (3) Using ROM abnormality: Operate using ROM, verify ROM Sum check when ROM -> RAM transfer or verify data in ROM and RAM after transfer. (4) User program abnormality (instruction code check): Verify syntax of program instruction code and parity check. (5) System memory abnormality: System memory setup error. Address of error is stored in WS005. Check this function when PLC under STOP mode. (6) Prior to shut down abnormality: Both erroneous use of F-43 jump instruction resulting endless loop and longer looping instruction (F-46/F-47) operation time longer than Watchdog Timer interval would stop system operation. Power must be turned off and then on again to enter program mode and modify program error. (7) WDT abnormality: CPU could self-diagnose watchdog timer times up. When self-diagnose detected CPU abnormality, the power must be turned off then on again or reload user program. If the Watchdog Timer still detected same problem, the TP02 CPU board must be replaced. (8) I/O Bus abnormality: I/O data bus and expansion set connection status verification. Abnormality detected when terminal connector is not connected. Perform verification every scanning cycle after power on. (9) Remote I/O abnormality: Verification of communication between slave-station when using remote I/O (WS043 = 2). (10) Battery Low: Error detected when battery voltage is under 2.5V. Perform verification every scan cycle. TP02 continue operation even after this error is detected. Following circuit must be used to signify battery low voltage situation and recommend replacement of battery.

(11) Power down or Low power: TP02 does not response to instantaneous power failure of less than 20ms, and continuous operation in case of PU12 is not connected. If the power down period is longer than specified protection, the CPU will stop operation and halt output will open. The PLC will resume operation after power on. Switching on power supply and every scanning cycle will be checked.

8-9

[2] Halt Output Connection Point


Halt output is at closed status during normal operation and open when abnormality detected by self-diagnose (relay output AC 250V, DC 30V, 1A). The Halt Output connection point is in open status when power off and normal stop. Please connect the emergency stop circuit to the TP02 Halt output connection point in order to emergency stop the system at PLC abnormality. (NOTE 1) TP02-20MR(T)/TP02-28MR(T) is not equipped with halt output connection point. (NOTE 2) Do not apply halt output connection point of remote slave-station.

[3] Special Relay


The special relays (SC081~SC088) are activated according to the result of self-diagnose. After the abnormality is removed, the special relay used by self-diagnose will remain ON until the first scan cycle, and after reset completed. In the special relays, the SC086 (Battery abnormality) can be programmed to alarm buzzer or warning light, others can be readout by peripherals like PU12 or computer links. The relay of SC082 (Power abnormality) remain ON until the first scan cycle after power on completed.

[4] Error Code


The error code is stored into system memory (WS050~WS057) according to the malfunction status detected by self-diagnose WS050~WS057 can retain 8 error codes. After the eighth codes, earliest code will be overwritten to store the new one. The error codes are still retained in system memory even after the abnormality is removed. Error codes must be cleared by peripherals like PU12 entering [00] to replace error codes. Repeated malfunction error code will be recorded only once in system memory.

[5] Output ON/OFF status under abnormality


When the PLC enter STOP mode or ERROR mode, the ON/OFF status of output relay is determined by the content setup in the special register WS023. the output relay may not be turned OFF when abnormality occur, the Halt output connection point of external connected PLC must be serial connected for protection (TP02-20MR(T)/TP02-28MR(T) is not equipped with halt output connection point) If WS023=0001, the output relay will be OFF. If WS023=0000, the output relay will retain previous ON/OFF status.
8-10

Chapter 9 Instruction Description


9-1 Instruction List
Process time (s) Basic Instruction Symbol Word Count Description
TP02-20MR(T) TP02-40MR(T) TP02-28MR(T) TP02-60MR(T)

[1] Basic Instruction Description


Refer to page:

Exec Not Exec Not ute Execute ute Execute starts at normally open contact and intermediate result is stored. starts at normally closed contact and intermediate result is stored AND logic AND NOT logic OR logic OR NOT logic AND with intermediate result OR with intermediate result Output operation result. No operation. TIMER 1. Input signal. 2. Reset signal. 3. Timer register. 4. Preset value. 5. Output signal. TIMER 1. Input signal. 3. Timer register. 4. Preset value. 5. Output signal. COUNTER 1. Input signal. 2. Reset signal. 3. Counter register. 4. Preset value. 5. Output signal. 1.83 1.02

STR

9-10

STR NOT AND AND NOT OR OR NOT AND STR OR STR OUT NOP

1 1 1 1 1 1 1 1 1

1.83 1.83 1.83 1.83 1.83 1.63 1.63 6.9 0.8

1.02 1.02 1.02 1.02 1.02 0.81 0.81 5.9 0.4

9-10 9-10 9-10 9-10 9-10 9-10 9-10 9-10 9-10

TMR

35.3

22.6

33.0

20.5

9-13

TMR

29.5

16.1

28.7

15.4

9-14

CNT

26.3

26.0

24.7

24.7

9-15

9-1

[2] Application Instruction Description (sorted by instruction code)


Applicat ion Instruct ion Process time (s) TP02-20MR(T TP02-40MR(T Refer ) ) TP02-28MR(T TP02-60MR(T to ) ) page: Exec Not Exec Not ute Execute ute Execute 18.0 10.3 6.2 10.3 6.2 14.3 14.0 14.1 11.1 13.9 13.9 16.0 8.2 3.4 8.2 3.4 12.2 12.3 12.1 0.4 19.8 19.8 12.0 12.1 8.2 11.9 11.9 9-17 9-18 9-18 9-19 9-19 9-22 9-23 9-24 9-24 9-26 9-26

Symbol

Description

F-00 F-01 F-02 F-03 F-04 F-05 F-06 F-07 F-08 F-09 F-09w

End of program. Set master control Reset master control Set jump control Reset jump control ON differential output pulse.

OFF differential output pulse. 14.5 Direct skip. End of direct skip. SWAP upper 4 bits with lower 4 bits. SWAP upper 8 bits with lower 8 bits. 8bits shift register 1: shift direction
ON:shift left OFF:shift right

15.0 0.8 21.1 21.5

F-10

2: input signal 3: shift clock 4: reset signal 16bits shift register 1: shift direction

28.0

22.8

26.1

20.9

9-27

F-10w

ON:shift left OFF:shift right

2: input signal 3: shift clock 4: reset signal 8bits data transfer 16bits data transfer
(S)(D) (S)(D)

28.0

22.8

26.1

20.9

9-27

F-11 F-11w F-11d F-12 F-12w

21.3 22.3 23.7 50.4 83.0

14.2 14.2 14.2 23.0 23.0

19.5 20.5 21.9 48.2 82.2

12.4 12.4 12.4 21.1 21.1

9-28 9-28 9-28 9-29 9-29

32bits data transfer


(S, S+1)(D, D+1)

8bits binary to BCD data (S)(D) conversion 16bits binary to BCD data (S) (D) conversion
9-2

F-12d

32bits binary to BCD data conversion


(S,S+1) (D,D+1)

118.2

23.0

116.0

21.1

9-29

9-3

Applicat ion Instruct ion

Symbol

Description

Process time (s) TP02-20MR(T TP02-40MR(T Refer ) ) TP02-28MR(T TP02-60MR(T to ) ) page: Exec Not Exec Not ute Execute ute Execute 47.2 55.2 65.2 48.2 56.6 65.0 20.0 26.8 32.1 21.2 21.2 21.2 21.2 21.2 21.2 12.3 12.3 12.3 44.6 51.4 60.6 45.0 51.8 60.2 19.8 23.8 28.8 18.4 18.4 18.4 18.3 18.3 18.3 9.6 9.6 9.6 9-30 9-30 9-30 9-31 9-31 9-31 9-32 9-32 9-32

F-13 F-13w F-13d F-14 F-14w F-14d F-15 F-15w F-15d

8bits data addition


(S1) + (S2)(D)

16bits data addition


(S1) + (S2)(D)

32bits data addition (S1, S1+1)


+ (S2, S2+1)(D, D+1)

8bits data subtraction


(S1) - (S2)(D)

16bits data subtraction


(S1) - (S2)(D)

32bits data subtraction (S1,


S1+1) - (S2, S2+1)(D, D+1)

8bits data comparison


(S1) v.s. (S2)

16bits data comparison


(S1) v.s. (S2)

32bits data comparison


(S1) v.s. (S2)

16bits Up/Down Counter 1: Counting direction


ON: Count Up/OFF: Count Down

F-16w

2: Input Signal 3: Reset 4: Register 5: Preset value 6: Output signal

30.5

24.8

26.0

22.9

9-33

F-17 F-17w F-17d F-18w F-18d F-19w F-19d

8bits BCD to binary data 45.0 (S)(D) conversion 16bits BCD to binary data 65.0 (S)(D) conversion 32bits BCD to binary data 88.0 conversion (S, S+1)(D, D+1) 16bits data multiplication 39.6
(S1) * (S2)(D, D+1)

29.4 29.4 29.4 21.1 21.1 21.1 21.1

42.6 63.2 84.1 35.0 33.2 34.8 18.7

21.3 21.3 21.3 18.2 18.2 18.1 18.1

9-34 9-34 9-34 9-35 9-35 9-36 9-36

32bits data multiplication


(S1,S1+1) * (S2,S2+1)(D,D+1)

40.1 39.2 41.2

16bits data division


(S1) / (S2) (D).(D+1)

32bits data division


(S1, S1+1) / (S2, S2+1) 9-4

(D,D+1).(D+2, D+3)

9-5

Applicat ion Instruct ion

Symbol

Description

Process time (s) TP02-20MR(T TP02-40MR(T Refer ) ) TP02-28MR(T TP02-60MR(T to ) ) page: Exec Not Exec Not ute Execute ute Execute 39.0 46.6 42.8 46.2 41.6 49.0 30.8 34.2 27.2 27.2 17.2 17.2 17.4 17.4 17.0 17.0 15.5 15.5 15.5 14.7 17.0 17.0 35.6 41.4 38.6 45.2 38.2 44.2 29.2 32.6 25.6 25.0 49.6 69.8 14.7 14.7 14.8 14.8 14.7 14.7 14.2 14.2 14.2 13.4 14.8 14.8 9-37 9-37 9-38 9-38 9-39 9-39 9-40 9-40 9-41 9-41 9-42 9-42

F-20 F-20w F-21 F-21w F-22 F-22w F-23 F-24 F-25w F-26w F-27 F-27w

8bits register logic AND


(S) AND (D)(D)

16bits register logic AND


(S) AND (D)(D)

8bits register logic OR


(S) OR (D)(D)

16bits register logic OR


(S) OR (D)(D)

8bits register logic XOR


(S) XOR (D)(D)

16bits register logic XOR (S) XOR (D)(D) Setup coil ON Setup coil OFF 16bits increment 16bits decrement

8bits 1 total counts transfer 54.8 16bits 1 total counts transfer 16bits index (MOVE TO )S. data transfer to the register designated by address D 78.6

F-30w

32.7

17.0

30.4

14.8

9-43

F-31w

16 bits index (MOVE FROM) 49.2 n-words data transfer


S1 Sn

16.2

40.6 25.3 +n3

14.1

9-44

F-32w

D1 Dn

36.6 +n3

29.5

23.9

9-45

F-33 F-33w

F-33 F-33w

OP12 text display (one line, not displaying register value) OP12 text display (two line, not displaying register value) OP12 text and digit display (one line, able to display register value) OP12 text and digit display (two line, able to display
9-6

24.0 24.0

20.0 20.0

22.7 22.7

22.1 22.1

9-46 9-46

30.9 30.9

21.9 21.9

28.7 28.7

19.9 19.9

9-47 9-47

F-34

register value) Change the rising edge trigger condition to level execution 0.8 condition

0.8

0.4

0.4

9-48

9-7

Applicat ion Instruct ion

Symbol

Description

Process time (s) TP02-20MR(T TP02-40MR(T Refer ) ) TP02-28MR(T TP02-60MR(T to ) ) page: Exec Not Exec Not ute Execute ute Execute 40.4 14.7 37.5 11.7 9-49

F-39

Decoder n=4 416 Decoder n=6 664 Decoder n=8 8256 Decoder Encoder n=4 164 Encoder n=6 646 Encoder n=8 2568 Encoder bit reversal Setup label Jump to label Call label subprogram Label subprogram return point Loop circuit begin Loop circuit end I/O REFRESH (8bits)

F-40

111.2

14.8

110.0

11.9

9-50

F-41 F-42 F-43 F-44 F-45 F-46 F-47 F-48 F-49 F-50w F-51 F-51w

6.2 0.8 23.4 48.6 17.1 46.0 14.0 121.0

6.2 2.2 15.9 17.1 33.2 7.0 1.5 1.5 41.6 14.4 13.4

3.1 0.4 19.5 43.0 15.2 37.8 13.1 118.0 122.1 93.0 91.8 44.0

3.1 1.1 13.1 15.2 26.9 6.0 0.8 0.8 38.7 12.4 12.4

9-51 9-52 9-53 9-55 9-55 9-56 9-56 9-57 9-57 9-58 9-59 9-59

I/O REFRESH (1bit) SPECIAL TIMER Designate n-th relay starting from D to be OFF

124.5 97.6 51.6

F-52

F-53

Designate n-th words register 45.8 starting from D reset to zero 10KEY input Input from 10key input connected to S~S+9, store 71.6 BCD code in (D, D+1), input key turn corresponding bit ON/OFF respectively 16KEY input Read 8 digit value from 129.2 16key(X, X+3~Y, Y+3) connected to I/O, and store
9-8

6.8

74.6

6.4

9-60

2.2

127.0

1.1

9-61

value in (D, D+1), pressing A~F key of 16key will turn corresponding special relay SC067~SC072 to ON

9-9

Applicat ion Instruct ion

Symbol

Description

Process time (s) TP02-20MR(T TP02-40MR(T Refer ) ) TP02-28MR(T TP02-60MR(T to ) ) page: Exec Not Exec Not ute Execute ute Execute 3.1 34.4 1.4 9-62

F-54

F-54w

F-54d

F-55 F-55w F-56

F-57w

MATRIX INPUT Transform Matrix input of 37.9 8in*4out to bit1~32 of D, D+1 MATRIX INPUT Transform Matrix input of 36.3 8in*6out to bit1~48 of D~D+2 MATRIX INPUT Transform Matrix input of 32.7 8in*8out to bit1~64 of D~D+3 BCD dip switch input (4bits * 36.9 1 switch) BCD dip switch input (4bits * 32.0 2 switch) 7 segment display module 18.4 output Reference-table comparison (verify if the data is within 187.2 the 16 set of upper/lower limit) MMI port input MMI port output Current time comparison set (designated relay ON) Current time comparison reset (designated relay OFF) Designate the n-th register starting from S to be converted to ASCII code and stored in the n-th register starting from D Designate the n-th register starting form S to be converted to HEX code and stored on the n-th register starting from D 10.2 9.4 12.5 12.5

3.1

32.7

1.4

9-62

3.1

29.1

1.4

9-62

9.5 9.5 2.0

32.5 29.8 14.9

7.8 7.8 1.0

9-63 9-63 9-64

2.0

177.0

1.0

9-65

F-58 F-59 F-60 F-61

10.2 9.4 3.1 3.1

7.5 7.4 9.2 9.2

7.5 7.4 1.5 1.5

9-66 9-67 9-68 9-68

F-62

29.7

2.0

11.3

1.0

9-69

F-63

51.2

2.0

12.2

1.0

9-69

9-10

[3] Application Instruction (sorted by function)


Category Data transfer instruction Instruct ion F-11 F-11w F-11d Page: 9-28 9-28 9-28 9-43 9-44 9-45 9-30 9-30 9-30 9-31 9-31 9-31 9-35 9-35 9-36 9-36 9-37 9-38 9-38 9-38 9-39 9-39 9-32 9-32 9-32 9-65 9-34 9-34 9-34 9-29 9-29 9-29 9-69 9-69 9-49 9-50 9-64 9-42 9-42
9-11

1 byte 1 word 2 word 1 word (MOVE Data transfer F-30w TO) between register 1 word (MOVE F-31w
FROM)

Arithmetical operation instruction

BIN addition

BIN subtraction

BIN multiplication

BIN division between register between register between register

ANL ORL XRL

Comparison instruction

Compare

n word 8bit + 8bit 16bit + 16bit 32bit + 32bit 8bit - 8bit 16bit - 16bit 32bit - 32bit 16bit * 16bit 32bit 32bit * 32bi 32bit 16bit / 16bit 16bit 32bit / 32bit 32bit 8bit 16bit 8bit 16bit 8bit 16bit 8bit 1 word 2 word 16 word 2 digit 8 bit 4 digit 16 bit 8 digit 32 bit 8bit 2 digit 16bit 4 digit 32bit 8 digit

F-32w F-13 F-13w F-13d F-14 F-14w F-14d F-18w F-18d F-19w F-19d F-20 F-20w F-21 F-21w F-22 F-22w F-15 F-15w F-15d F-57w F-17 F-17w F-17d F-12 F-12w F-12d

Logical operation instruction Conversion instruction

WNDW Compare BCDBIN conversion BINBCD conversion

HEXASIC n word F-62 conversion ASICHEX n word F-63 conversion 1-8 bit decoder F-39 1-256 bit encoder F-40 7 segment display module output F-56 8bit F-27 ON bit total count 16bit F-27w

Category SWAP instruction 8bit Exchange of data 16bit bit reversal Upper differential connection point Lower differential connection point Set relay ON Set relay OFF Designated relay OFF delay BIN UP/DOWN Counter BIN Addition Counter BIN Subtraction Counter Bi-directional shift register 1 word

Instruct Page: ion F-09 F-09w F-41 F-05 F-06 F-23 F-24 F-50 9-26 9-26 9-51 9-22 9-23 9-40 9-40 9-58

Timer instruction

BIT process instruction

Counter instruction

1word 1 word 1 word 8bit 16bit

F-16w F-25w F-26w F-10 F-10w

9-33 9-41 9-41 9-27 9-27 9-18 9-18 9-19 9-19 9-24 9-24 9-48 9-17 9-52 9-53 9-55 9-55 9-56 9-56 9-68 9-68 9-60 9-61 9-62 9-62 9-62 9-63 9-63
9-12

Shift Time Branch instruction Conditional instruction instructio instruction n Abstract instruction

MCS F-01 MCR F-02 JCS F-03 JCR F-04 SKIP F-07 ENDS F-08 SCLK F-34 END F-00 Setup pointer F-42 Jump to setup pointer F-43 Call subprogram F-44 Subprogram return point F-45 Loop circuit begin F-46 Loop circuit end F-47 Current time comparison F-60 (designated relay ON) Current time comparison F-61 (designated relay OFF) 2 word F-52 TEN KEY input 2 word F-53 HEX KEY input 8 in * 4 out F-54 MATRIX input 8 in * 6 out F-54w 8 in * 8 out F-54d BCD dip switch 4bits * 1 switch F-55 input 4bits * 2 switch F-55w

Category Able to display register value

Instruct Page: ion 9-47 3 word F-33

Abstract MMI instruction

OP05/OP06 Data display instruction

9-47 Able to display register value 3 word F-33w

Communicatio n instruction

MMI port input MMI port output I/O refresh data reset

n characters

F-58

9-66

n characters 1 byte 1 bit 1 bit 1 word

F-59 F-48 F-49 F-51 F-51w

9-67 9-57 9-57 9-59 9-59

Other instruction

9-13

9.2 Instruction Description


STR/STR NOT instruction (refer to Fig 9-1) STR/STR NOT instructions are primarily used at the beginning of the bus line of a complete set of circuitry or a branch circuitry. STR will assign an A connection point. STR NOT will assign B connection point, where NOT represent the reversal of operation.

Figure 9-1 OUT instruction (refer to Fig 9-1) OUT instruction is used at the end of a complete set of circuitry. It is equal to result of A/B connection points provided by a relay. They are used primarily to output signals to the external physical loads. (NOTE: System can not output special relay SC033~SC128 using OUT instruction.) AND / AND NOT instruction (refer to Fig 9-2) AND / AND NOT instructions are used for serially linking circuitry. AND instruction is used for A connection point. AND NOT instruction is used for B connection point.

Fig 9-2 OR / OR NOT instruction (refer to Fig 9-2) OR /OR NOT instructions are used for parallel linking circuitry. OR instruction is used for A connection point. OR NOT instruction is used for B connection point. AND STR instruction (refer to Fig 9-3) / OR STR instruction (refer to Fig 9-4) Two connection points that can not be connected serially of parallel is called regional circuitry. AND STR / OR STR instruction is used to connect two regional circuitry. Normally, when there is only one output, the number of STR/STR NOR instructions is equal to the sum of the number of AND STR/OR STR instructions and OUT (or TMR, CNT) Regional circutry instruction instructions.

Fig 9-3 Serially linked regional circuitry.


Regional

9-14

Fig 9-4 Parallel linked regional circuitry.

9-15

Notification of designing ladder graph


There are certain limitation designing PC ladder graph which is deferent from designing traditional relay circuitry. Specific care must be taken when designing PC ladder graph. Please refer to following examples: [Example 1] Traditional relay control panel circuitry need to be modified.

Placing X0002 connection before X0003 connection is prohibited


STR X0004 OR X0001 AND X0002 OUT Y0020 STR X0004 OR X0001 AND X0003

Modify

Modify

Modify

STR OR F-01 STR OUT STR OUT F-02 STR OR OUT STR AND OUT STR AND OUT

X0004 X0001 MCS X0002 Y0020 X0003 Y0021 MCR X0004 X0001 C0022 C0022 X0002 Y0020 C0022 X0003 Y0021

9-16

[Example 2] Relay panel bridge control circuitry need modification.

Modify

[Example 3] Relay panel one-way controlling diode D1

Modify

9-17

Timer (1)
The timing unit of V0001~V0250 timer register is 0.1 sec. The timing unit of V0251~V0256 timer register is 0.01 sec. When the input signal is ON, the value in timer register will be increased 1 unit every 0.1/0.01 sec. When the input signal is OFF, the value in timer register will remain unchanged untill the input signal turned back ON. The value in timer register will resume timing operation. When the reset signal is ON, the value in timer register will be cleared to zero. The timing range of timer is 0.1 sec to 6553.5 sec, or 0.01 sec to 655.35 sec. [Example]

Symbol Execute Operation Function

(1) When the input signal is ON, timer actived. When the input signal is OFF, timer stop. (2) When the reset signal is ON, register value cleared to zero. When the reset signal is OFF, timer operation is not affected. (3) Output signal: Output ON when the timer register value accumulated to preset value. Register Input Reset Operation Output value Clear register OFF ON =0 value, stop OFF Note: timer. 1. When V001~V256 is used as timer, < Preset counter, or UP/DOWN counter (F16), OFF OFF Stop timer OFF value they can not be used repeatedly. Such = Setup limit is not applied to other application. OFF OFF Stop timer ON value 2. The output of timer must be connected to relay to reflect its output status. Clear register 3. The special register WS022 can be used ON ON =0 value, stop OFF timer. to retain the timer register value under Increase 1 power off condition. < Preset 4. [In the example] The SET V90 value can ON OFF every 0.1 sec OFF value or 0.01 sec. be used to setup TMR V1 timing preset = Preset value under RUN mode. ON OFF Stop timer ON value Preset value On OFF = 0 ON to 0.

Execute Condition

Start timer when input signal (1) is ON.

Number Vnnnn Dnnnn nnnn constant V0001~V0256

Value range 0~65535 0~65535 0~65535

Register

Preset Value

9-18

Timer (2)
The timing unit of V0001~V0250 timer register is 0.1 sec. The timing unit of V0251~V0256 timer register is 0.01 sec. When the input signal is ON, the value in timer register will be increased 1 unit every 0.1/0.01 sec. When the input signal is OFF, the value in timer register will be cleared to 0 . The timing range of timer is 0.1 sec to 6553.5 sec, or 0.01 sec to 655.35 sec.
[Example] Symbol (1) Input signal: Activate timer operation when ON, stop timer when OFF. (2) Output signal: Output ON signal when the register value accumulated to preset value. Input Execute Operation Register Value =0 < Preset value = Preset value =0 Operation Output Function

OFF

ON ON ON

Clear timer register value. OFF Stop timer. Increase 1 every OFF 0.1 sec/0.01 sec. Stop Timer Clear preset value to 0. ON ON

Execute Condition

Activate when input signal (1) is ON.

Preset Value

NO. Vnnnn Dnnnn nnnn constant

Value Range 0~65535 0~65535 0~65535

Register

V0001~V0256

9-19

Counter
Every input signal transition from OFF to ON will increase the counter register value for 1 unit. When the register value reach the preset value, the output signal will be set to ON. The output signal remain ON untill reset signal set to ON and clear the register value to 0.
[Example] Symbol (1)Input Signal: Register increase 1 unit when input signal change from OFF to ON. Otherwise, the register value remain unchanged. (2)Reset Signal: Clear register value to 0 when reset signal is set to ON. Counting operation is not affected when reset signal is set to OFF. (3)Output Signal: Output signal is set to ON when the accumulated register value reach the setup value. Otherwise, output signal is set to OFF. Register Input Reset Operation Output Value Register value increase 1 unit every < Preset ON OFF time the OFF Value input is changed from OFF to ON. =Preset Stop ON OFF ON Value counting. Register OFF ON =0 value reset to OFF zero. Operation activated when input signal (1) is OFFON. Function

NOTE: The register value of CNT V2 in [Example 1] is fixed at 10. In order to change the counting value, please enter program mode to modify the counting value after machine is stopped.

Execute Operation

Execute Condition

NOTE: 1.When used as accumulator in Timer, Counter, or UP/DOWN Counter (F-16), the V001~V256 is not allowed to be used repeatedly. This limitation is not applied when they are used in other application instruction. 2.A relay must be connected to counter output to reflect its output status. 3.Timer register value can be setup by special register WS022, its value remain unchanged under power off condition. 4.The counting value of CNT V1 in [Example 2] can be setup via SET V91 in RUN mode condition.

NO.

Value Range

Preset Value

Vnnnn Dnnnn

0~65535

nnnn constant

0~65535

9-20

RUN mode condition. Register V0001~V0256 0~65535

9-21

Sequencer
Symbol of sequencer : or STR S STR NOT

Steps (0 - 16) Sequencer relay number (1-8) Sequencer relay contact NOTE: When the sequencer realy number =05 , the Sequencer relay correspond to V005, and so on.

When the value of V0002 is 3, the A contact S0203 is ON, and the output relay Y0001 will be set to ON.

Scanning Time

9-22

F-00 END Symbol

END Instruction

F-00 END

Execution Function Condition Example Program

The F-00 END instruction indicates the end of the program

Directly connected from bus line. F-00 instruction represent the termination of user program. The priority of F-00 END instruction is higher than others. It is still effective even when it is placed between F-03 (JCS) and F-04 (JCS). If the F-00 END instruction is placed between F-07 (SKIP) and F-08 (ENDS) instructions, or F-43 (JMP) and F-42 (LABL) instructions, the F-00 instruction is not executed if F-07 or F-43 is executed. F-00 instruction will be written into the last address of program memory after clearing memory. It is not necessary to specifically enter the END command except to reduce scan time or testing program. (1) Reduce scan time Scan time is the sum of the time required for program execution and I/O process. Program execution time is the time required to execute program starting from address 0000 to the execution of END instruction. The END instruction is written into the last address of program memory automatically after clearing program memory. As shown in figure, the END instruction is written into address 4000. The program memory that is not used by user program is filled with NOP no operation instruction (execution time 0.4 us STR X0010 STR X0010 every NOP instruction) . If the END instruction is written at address 0982 as shown in figure, OR significantly. C0011 OR C0011 the scan time will be reduced AND Y0012 AND Y0012 0000 0000 OUT C0020 OUT C0022 0001 0001 STR X0013 STR X0013 0002 0002 0003 0003 AND C0017 AND C0017 0004 0004 0980 0981 0982 0983 0984 3999 4000

OUT NOP NOP NOP NOP F-00

Y0027

0980 0981 0982 0983 0984

OUT F-00 NOP NOP

Y0027 END

END
3999 4000

NOP F-00

END

Remove the END instruction after test completed. NOTE 1: Insert END instruction as above mentioned might result in two F-00 END instruction in user program. Since the first END instruction is the only one effective END instruction. Please carefully examine the location of ENDF-00 instruction carefully before operation. END NOTE 2: The F-00 END instruction is not conditional, following circuit is not valid. C0034
9-23

F-01 MCS

F-02 MCR

Master Control Set / Reset

Execution Function Condition Example Program

Symbol Setup the beginning and end of a branch circuitry. Combined of them are equal to a conditional bus line. When the contact signal before F-01 instruction is ON , the bus line turn to be ON. Input signal ON, master loop begin.

F-01 MCS and F-02 MCR must be used in pair. They are feasible to be used when a section of circuitry is needed in several occasions. (1)Example of relay circuitry

(2)Not usin g MCS and MCR

(3)Using MCS and MCR

Every instruction after F-01 before F-02 is operated internally and ANDed with the status in A region. When the common circuitry is very complicated, or used in many places, using F-01/F-02 instruction can simplify program to a more applicable complexity. NOTE 1: F-01 MCS instruction can not be connected directly to OUT, TMR, CNT and application instructions.

9-24

F-03 JCS

F-04 JCR

Jumping Control Set/Reset

Symbol When the input condition of F-03 is ON, all instructions (except for END instruction) before F-04 will not be executed. Even if there are some instructions require to use data memory to store operation result, they are not allowed to change the content in data memory. That is, when the input condition of JCS is ON, the content of data memory remains unchanged. When the input signal is ON, the program between F-03 and F-04 will not be executed (except F-00 END instruction). Execution Condition Function

Example Program

Instruction STR X0010 F-03 JCS STR X0011 OUT Y0021 STR X0012 STR X0015 TMR V0001 00030 OUT C0001 STR C0015 F-13 ADD V0068 00001

9-25

NOTE 1: Please refer to following figure to see the dependency of the internal timing signal of timer and counter to the input signal (status change from OFF to ON) and F-03 JCS ON/OFF relationship.

The OFF ON status change in will activate operation, because the status of JCS is OFF. The OFF ON status change in will not activate operation, because the status of JCS is ON. The OFF ON status change in will not activate operation, because the status of JCS is ON. The status of JCS is changed from ON to OFF in period , but still the operation is not activated. This is because when JCS changed from OFF to ON in A the input signal was ON which is the same at the time JCS change from ON to OFF. Therefore, the status changes of input signal when the JCS is ON are not accepted. (5) Because the status of JCS is ON at period , The input status change from OFF ON will not activate operation. (6) When JCS status change from ON to OFF in period , system would activate operation. This is because when the JCS status changed from OFF to ON in B, input signal is OFF. The input signal changed from OFF to ON, and presented signal change at the time JCS change from ON to OFF. NOTE 2: When JCS status is ON, the instruction between F-03 JCS and F-04 JCR that could affect the operation flag will not be executed. NOTE 3: The F-00 END instruction between F-03 JCS and F-04 JCR will be executed regardless of the status ON/OFF of JCS. Program is then terminated and enter next scanning cycle. NOTE 4: F-03 JCS and F-04 JCR can be inserted between F-01 MCS and F-02 MCR.

(1) (2) (3) (4)

9-26

NOTE 5: The F-04 JCR is not conditional, following circuitry is no valid.

NOTE 6: Insert another JCS between JCS and JCR, both JCS will be ended at the same JCR.

9-27

F-05

ON differential output pulse

Executio n Func tion Condition

Symbol Generate a pulse with period of one scan time when the signal in front of F-05 instruction change from OFF to ON. Input signal change from OFF ON.
Generate a pulse with period of one scan time when the signal in front of F-05 instruction change from OFF to ON. NOTE 1: Different location of the F-05 instruction will produce various result.

Example Program
NOTE 2: NOTE 3:

Number of contacts of F-05 instruction is not limited. The F-05 instruction can be used to detect OFF ON status change, and generate a pulse with period of one scan time.

In the figure above, although X0010 turn from OFF ON when C0011 is ON, the differential signal is not produced because of the AND operation using AND STR instruction with C0012.

9-28

F-06

OFF differential output pulse

Execution Function Condition Example Program

Symbol Generate a pulse of 1 scan time when the signal in front of F-06 instruction change from ON --> OFF. Input signal change from ON OFF.
Generate a pulse of 1 scanning time when the signal in front of F-06 instruction change from ON OFF. NOTE 1: The F-06 instruction could be activated sometimes at system power on. If X0001 is OFF when the system first power on, Y0021 will be ON. NOTE 2: F-06 is used to detect ON OFF status change and generate one pulse of one scan time. In this example, although C0101 change from ON to OFF when C0102 is OFF, the differential signal is not generated because of the AND operation using AND STR instruction with C0103.

9-29

F-07 SKIP Symbol

F-08 ENDS

Direct Skip Program/End of Skip Program

When the input status of F-07 is ON, all instructions before F-08 (including F-00) will be skipped in order to reduce scanning time required. Even if the operation result of instructions need to be stored into data memory, the contents of memory remain unchanged. The operation of F-07 is similar to F-03. The same example is used to describe this instruction. The difference between the two instruction is that F-03 sees all instruction before F-04 as NOP while F-07 skip all instruction before F-08 directly. Input signal is ON.

Example Program

Execution Condition

Function

9-30

NOTE 1: F-08 is not conditional, following circuitry is not valid.

NOTE 2: F-07 and F-08 must be used in pair. Which means one F-08 instruction must not be used with more than one F-07 instruction. F-07 and F-08 can be used in multiple level.

Erroneous STR X0001 F-07 SKIP STR C0001 OUT Y0001 STR X0002 F-07 SKIP STR C0002 OUT Y0002 F-08 ENDS STR C0003 OUT Y0003

NOTE 3: The program on the left side can not be executed. It must be modified to be the program on the right side.

9-31

F-09 SWAP

F-09w SWAP

Swap upper 4 bits with lower 4 bits. Swap upper 8 bits with lower 8 bits.
Program Example

Symbol

Swap higher 4 bits with lower 4 bits of data in D. Swap higher 8 bits with lower 8 bits of data in D. Lower byte in D high nibble low nibble

Operation

Function

Higher byte in D Lower byte in D

Application range Xxxxx (Xxxxx + 7) D Yxxxx (Yxxxx + 7) Cxxxx (Cxxxx + 7) Vnnnn Dnnnn Execution Condition Yxxxx (Yxxxx + 15) Xxxxx (Xxxxx + 15) Cxxxx (Cxxxx + 15) Vnnnn Dnnnn

Input signal OFF ON

Execution Result

Operation result stored back to D, higher byte not affected.

Operation result stored back to D. Flag Not changed.

9-32

F-10 SFR

F-10w SFR

8 bits 16 bits Bi-directional Shift Register Program Example


When the shift signal C0001 changes from OFF ON, shift data in direction assigned by X0012 as follows:

Symbol Shift 8 bits data in D high or low bit according to direction signal. Shift 16 bits data in D high or low bit according to direction signal. Function

When direction signal is ON When direction signal is OFF


Operation

When direction signal is ON When direction signal is OFF

When the shift signal C001 change from OFF ON, shift data in direction assigned by X012 as follows:

Application range

Yxxxx (Yxxxx + 7) Xxxxx (Xxxxx + 7) D Cxxxx (Cxxxx + 7) Vnnnn Dnnnn

Yxxxx ( Yxxxx + 15) Xxxxx ( Xxxxx + 15) Cxxxx ( Cxxxx + 15) Vnnnn Dnnnn

Execution Result

Execution Condition

Input Signal OFF ON

*When the reset signal is OFF, the result of shift operation is stored in D. D *When the reset signal is ON, all data bits cleared to OFF. Reset Signal OFF ON SC041 0 or 1 0 SC042 0 or 1 0 SC043 0 or 1 0 SC044 0 0
9-33

NOTE: Data bits in D are all 0 Zero flag SC043 ON Data bits in D shifted out Carry flag SC042 ON Data bits in D is not shifted out No Carry flag SC041 ON When the D reset signal ON, all flag clear to OFF

Flag

F-11 XFER

F-11w XFER

F-11d XFER

8 bits 16 bits 32 bits data Transfer

Program Example

Symbol

When C0004 change from OFF ON, low byte of content in V0090 is transferred to lower byte of V0071.

Function Operati on

Transfer data in S (1 byte) to D. Transfer data in S (1 word) to D. Transfer data in S (2 word) to D. (S) lower byte (D) lower byte (S) (D) (S+1), (S) (D, D + 1)

Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) n: =7, =15, =31 Cxxxx ( Cxxxx + n) When C0004 change from OFF ON, WCnnn low byte the content in V0090 is transferred to Cnnnn word V0071. double word S Dnnnn Application Range

nnnnn(constant) 0~65535

Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) n: =7, =15, =31 D Cxxxx ( Cxxxx + n) When C0004 change from OFF ON, low byte content in (V0090, V0091) is transferred Cnnnn word to (V0071, V0072). Dnnnn double word Execution Condition Execution Result S Flag Input Signal OFF ON

Unchanged, Unchanged, Unchanged D low byte S low byte; higher byte D unchanged Content in S, S, S+1 D, D+1 Unchanged

9-34

F-12 BCD

F-12w BCD

F-12d BCD

8 bits 16 bits 32 bits BIN BCD Conversion


Program Example

Symbol Operation Function

When C0004 OFF ON, convert V0070 low byte (assuming it is binary data) to Convert binary data in S (1 byte) to BCD code BCD code and then transfer to

and then transfer to D. Convert binary data in S (1 word) to BCD code then transfer to D. Convert binary data in S (2 word) to BCD code and then transfer to D. Low byte in (S) BCD conversion low byte in
(D)

(S) BCD conversion (D) (S, S + 1) BCD conversion (D, D+1) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) n: =7, =15, =31 Cxxxx ( Cxxxx + n) Vnnnn low byte, word, double word Dnnnn nnnnn(constant) 0~65535 Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) n: =7, =15, =31 Cxxxx ( Cxxxx + n) Vnnnn word Dnnnn low byte, word, double

Application Range

When C0004 OFF ON, convert data in V0070 to BCD and then transfer to V0067.

Execution Condition

Input Signal OFF ON

When C0004 OFF ON, convert data in (V0070, V0071) to BCD and then transfer to (V0068, V0069).

S Unchanged, Unchanged, Unchanged S low byte convert to BCD code D low byte D high byte remain unchanged. S convert to BCD code D Result SC041 SC042 SC043 SC044 (S) low byte is 1 not BCD code Unchanged (S) low byte is 0 BCD code (S) is not BCD 1 code Unchanged (S) is BCD 0 code Flag

Execution Result

9-35

(S, S+1) is not BCD code Unchanged (S, S+1) is BCD code

1 0

9-36

F-13 ADD

F-13w ADD

F-13d ADD

8 bits 16 bits 32 bits Addition (BIN)


Program Example
Description : Addition operation S1 + S2 D, operation result store in low byte for byte operation, operation result store in double word for double word operation. Example 1: PU12 LCD display (before operation)
F-13_ADD D0010 D0020 D0030 00000 00010 00255

Symbol

PU12 LCD display (after operation)


F-13_ADD D0010 00009 D0020 00010 D0030 00255

8 bits data addition 16 bits data addition 32 bits data addition


(S1) low byte + (S2) low byte (D) low byte

Operation

Functio n

(S1) + (S2) (D) (S1, S1+1) + (S2, S2+1) (D, D+1) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) =7, =15, =31 n:

Example 2: PU12 LCD display (before operation)

PU12 LCD display (after operation)

F-13_ADD D0010 0000000000 D0020

F-13_ADD D0010 1234567999 D0020

Application Range

S1 S2 Cxxxx ( Cxxxx + n) Vnnnn low byte, word, double word Dnnnn 0~65535 S2 nnnnn(constant) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) =7, =15, =31 n:

double word use decimal number to display content in double word, BCD conversion is not required. Description : 32 bits decimal operation and display are provided for mathematical operation ( , , , ) and comparison. BCD conversion is not required. If operation result need to be converted to BCD code or ASCI code for output to peripherals, conversion can be done by F-12 BCD or F-62 ASCI conversion instruction. Description : Continuous addit ion instruction converting to double length operation mode is not provided in TP02. If word operation result is exceeding maximum range, the (F-13d ADD) (double word) should be used.

D Cxxxx ( Cxxxx + n) Vnnnn low byte, word, double word Dnnnn Execution Condition Execution Result Input Signal OFF ON

S1 Unchanged S2 Unchanged S1 low byte + S2 low byte D low D byte S1 + S2 D (S1, S1+1) + (S2, S2+1) (D, D+1) Operation Result 0 0 0 Flag

SC041 0
9-37

SC042 0

SC043 1

SC044 0

1-255 >255

1-65535 >65535

1-4294967295 1 >4294967295 0

0 1

0 0

0 0

9-38

F-14 SUB

F-14w SUB

F-14d SUB

8 bits 16 bits 32 bits Subtraction (BIN)


Program Example
Description : The subtraction operation S1 - S2 D will store the operation result in low byte at byte operation. It will store the operation result in double word at double word operation. Example 1:

Symbol

PU12 LCD display (before execution)

PU12 LCD display (after execution)

8 bits data subtraction 16 bits data subtraction 32 bits data subtraction (S1) low byte - (S2) low byte (D) low
byte

Operation

Functio n

F-14_SUB D0010 00000 D0020 00038 D0030 00039

F-14_SUB D0010 00001 D0020 00038 D0030 00039

SC042 = 1 when the operation result is a negative value. Example 2: PU12 LCD display display (before execution) PU12 LCD

(S1) - (S2) (D) (S1, S1+1) - (S2, S2+1) (D, D+1) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) =7, =15, =31 n:

F-14d_SUB
D0010 0000000000 D0020 0007934008

F-14d_SUB
D0010 0001834006 D0020 0007934008

(after execution)

Application Range

S1 , S2 Cxxxx ( Cxxxx + n) Vnnnn low byte, word, double


word

Dnnnn S2 nnnnn(constant) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) =7, =15, =31

0~65535
double word uses decimal number to display content. BCD conversion is not required. Description : 32 bits decimal operation and display are provided for mathematical operation ( , , , ) and comparison. BCD conversion is not required. If operation result need to be converted to BCD code or ASCI code for output to peripherals, conversion can be done by F-12 BCD or F-62 ASCI conversion instruction. Description : Continuous addition instruction convertin g to double length operation mode is not provided in TP02. If word operation result is exceeding maximum range, the F-14d SUB (double word) should be used.

n:

D Cxxxx ( Cxxxx + n) Vnnnn low byte, word, double


word

Dnnnn Execution Condition Execution Result Input Signal OFF ON

S1 Unchanged S2 Unchanged S1 low byte - S2 low byte D low byte D S1 - S2 D (S1, S1+1) - (S2, S2+1) (D, D+1) l a Operation Result

SC041
9-32

SC042

SC043

SC044

0 1-255 negative value

0 1-65535 negative value

0 negative value

1-4294967295 1

0 0 1

1 0 0

0 0 0

9-33

F-15 CMP

F-15w CMP

F-15d CMP

8 bits 16 bits 32 bits Register Value Comparison


Program Example
Description :Compare S1 with S2. Byte operation compare low byte only. Double word operation compare (S1, S1+1) double word. Description :As long as input signal is ON, comparison will be performed every scan cycle. Description : When used with differential instruction, thexecution condition can be set asOFF ON.

Symbol Function

8 bits data comparison 16 bits data comparison 32 bits data comparison compare (S1) low byte value with (S2) low byte value compare (S1) value with (S2) value compare (S1, S1+1) value (32 bits) with (S2, S2+1) value Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) =7, =15, =31 n:
Description : Continuous comparison instruction converting to double length operation mode is not pro vided in TP02. If word operation result is exceeding maximum range, the F-15d CMP (double word) should be used. Description : Use the operation flag to determine the comparison result.

Application Range

Operation

S1 , S2 Cxxxx ( Cxxxx + n) Vnnnn low byte, word, double


word

Dnnnn S2 nnnnn(constant) 0~65535

Execution Condition Execution Result

Input Signal ON

S1 Unchanged S2 Unchanged Operation Result (S1) low byte = (S2) low byte (S1) low byte > (S2) low byte (S1) low byte < (S2) low byte SC041 SC042 SC043 SC044 0 1 0 0 0 1 1 0 0 0 0 0

Flag

(S1) = (S2) (S1, S1+1) = (S2, S2+1) (S1) > (S2) (S1, S1+1) > (S2, S2+1) (S1) < (S2) (S1, S1+1) < (S2, S2+1)

9-34

F-16w U/D CNT

16 bits UP/DOWN Counter


Program Example

Functio n Operation Application Range

Symbol Count UP or DOWN according to direction signal when the reset signal is OFF. *Direction signal ON makes the counter counts UP. Direction signal OFF makes the counter counts DOWN. *In count up mode, when the value in D is equal to value in S, the output signal setup to ON. When the reset signal is ON, the value in D is cleared to 0. *In count down mode, when the value in D is 0, the output signal setup to ON. When the reset signal is ON, the value in S is stored into D.

Vnnnn Dnnnn

nnnn (constant) D V0001-V0256

0~65535

Execution Condition

When reset signal is OFF, count UP/DOWN every time the count signal changes from OFF ON.

NOTE 1: V0001~V0256 are not allowed to be used repeatedly when theyre used as accumulator of TMR, CNT or U/D CNT. This limitation is not applied to other instructions. NOTE 2: A relay must be connected behind the U/D CNT to reflect its output status. NOTE 3: Special register WS022 can be used to setup the D value status pres ervation after power off.

Execution Result

S Unchanged D Counting operation result Flag Unchanged

9-35

F-17 BIN

F-17w BIN

F-17d BIN

8 bits 16 bits 32 bits BCD BIN Conversion


Program Example

Instruction

Symbol

STR C0004 F-17F

When C0004 change from OFF ON, BIN convert low byte of V0070 (as BCD) to BIN and then transfer to V0068. V0068

Function

Convert data in S (1 byte) to BIN format and then transfer to D. Convert data in S (16 bits) to BIN format and then transfer to D. Convert data in (S, S+1) (32 bits) to BIN format and then transfer to (D, D+1) (S) low byte BIN conversion (D) low
byte When C0004 change from OFF ON, convert data in V0070 to BIN and then transfer to V0068.
Instruction STR C0004 F-17w BIN V0068 V0070

Operation

(S) BIN conversion (D) (S, S+1) BIN conversion (D, D+1) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) =7, =15, =31 n:

Instruction STR C0004 F-17d BIN V0068 V0070

Application Range

S Cxxxx ( Cxxxx + n) Vnnnn low byte, word, double


word

Dnnnn nnnnn(constant) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) =7, =15, =31 D Cxxxx ( Cxxxx + n) Vnnnn
word

0~65535 n:

When C0004 change from OFF ON, convert data in (V0070, V0071) to BIN and then transfer to (V0068, V0069).

low byte, word, double

Dnnnn Execution Condition Execution Result S Input Signal OFF ON Unchanged

low byte operation result; high byte unchanged D operation result operation result l a Operation Result
9-36

SC041 SC042 SC043 SC044

(S) > 9999 invalid (S) > 99, invalid BCD code BCD code (S) <= 99, valid BCD (S) <= 9999 valid code BCD code

(S) > 99999999,


invalid BCD code (S) <= 99999999, valid BCD code Unchanged

1 0

9-37

F-18w MUL
Symbol

F-18d MUL

16 bits 32 bits Data Multiplication (BIN)

Program Example

Instruction STR

Multiply data in register D0020 and D0030. Store operation result into (D0101, D0100).

X001 F-18w MUL D0100

Multiply content in (S1) and (S2). Operation result is stored into (D, D+1). Multiply content in (S1, S1+1) and (S2, S2+1). Operation result is stored into (D~D+1). (S1) * (S2) (D, D+1)

Operatio n

Function

(S1, S1+1) * (S2, S2+1) (D~D+1)


Instruction STR

Application Range

S1, Vnnnn S2 Dnnnn

word, double word

X001

Multiply data in register D0030 F-18d MUL D0100 and D0031. Store operation result D0020 into (D0101, D0100).
D0030

S2 nnnnn(constant)

0~65535

Vnnnn Dnnnn

word, double word

Execution Condition

Input Signal OFF ON

S1 Unchanged Execution Result S2 Unchanged D Multiplication Result 32 bits limited under 32 bits Operation result (D, D+1) <= 4294967295 (D, D+1) > 4294967295

NOTE: 32 bits * 32bits operation result is limited under 32 bits. If the result is larger than the range of 32 bits data, there is no other instruction to perform such operation. TP02 will generate an operation value too large error message (SC044 = 1).

Flag

SC041 Unchanged

SC042

SC043

SC044 0 1

9-38

F-19w DIV

F-19d DIV

16 bits 32 bits Data Division (BIN)

Program Example

Instruction

Symbol

STR

X001 D0100 D0020 D0030

Content in (S1) is divided by content in (S2). Quotient of operation is stored into (D) and the remainder is stored into (D+1). Content in (S1, S1+1) is divided by content in (S2, S2+1). Quotient of operation is stored into (D, D+1) and the remainder is stored into (D+2, D+3). (S1) / (S2) (D+1) (S1, S1+1) / (S2, S2+1) (D,D+1) (D+2, D+3)

Data in D0020 is divided by data in D0030. Resulted quotient is stored in D0100 and the remainder of operation is stored in D0101.

F-19w DIV

Function

Operatio n

Application Range

S1, Vnnnn S2 Dnnnn

word, double word


Data in register (D0100, D0020) is divided by data in (D0031, D0030). Result of operation is stored in D0101 and D0100.

Instruction STR X001 D0100 D0020 D0030

F-19d DIV

S2 nnnnn(constant)

0~65535

Vnnnn Dnnnn

word, double word

Execution Condition Execution Result

Input Signal OFF ON

S1 Unchanged S2 Unchanged

D Division Result

Operation result (S2)0 (S2, S2+1)0 (S2) = 0 (S2, S2+1) = 0

Flag

SC041 Unchanged

SC042

SC043

SC044 0 1

9-39

F-20 ANL

F-20w ANL

8 bits 16 bits AND Operation Between Registers


Program Example

Symbol Function

Execute AND operation for value (byte) in S and D. Result store in D. Execute AND operation for value in S and D. Result store in D. (S) low byte AND (D) low byte (D) low byte (S) AND (D) (D) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) n: =7, =15 Cxxxx ( Cxxxx + n) Vnnnn Dnnnn low byte word 0~65535

When C001 change from OFFON,

Application Range

Operati on S

nnnnn(constant) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) D Cxxxx ( Cxxxx + n) Vnnnn Dnnnn

n: =7, =15

low byte word


When C001 change from OFF ON

Execution Condition Execution Result Flag

Input Signal OFF ON

S: Unchanged D: low byte : operation result, high byte: unchanged S: Unchanged D: Operation result

Unchanged

Symbol
True Table Symbol

A 0 1 0 1

B 0 0 1 1
9-40

C 0 0 0 1

9-41

F-21 ORL
Symbol

F-21w ORL

8 bits 16 bits OR Operation Between Registers

Program Example

Instructions

STR F-21 When C001 change from OFF ON,

C001 ORL V0070 V0080

Execute OR operation for value (byte) in S and D. Execute OR operation for value in S and D. Result store in D. (S) low byte OR (D) low byte (D) low byte (S) OR (D) (D) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) n: =7, =15 Cxxxx ( Cxxxx + n) Vnnnn Dnnnn low byte word 0~65535

Application Range

Operati on S

Function

nnnnn(constant) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) D Cxxxx ( Cxxxx + n) Vnnnn Dnnnn

n: =7, =15
Instructions STR C0001 F-21w When C001 change from OFF ON ORL V0070 V0080

low byte word

Execution Condition Execution Result Flag

Input Signal OFF ON

S: Unchanged D: low byte : operation result, high byte: unchanged S: Unchanged D: Operation result Unchanged

True Table

Symbol

A 0 1 0 1

B 0 0 1 1

C 0 1 1 1

9-42

F-22 XRL
Symbol

F-22w XRL

8 bits 16 bits XOR Operation Between Registers

Program Example

Execute XOR operation for value (byte) in S and D. Execute XOR operation for content in S and D. Result of operation is stored in D. (S) low byte XOR (D) low byte (D) low byte (S) XOR (D) (D) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) n: =7, =15 Cxxxx ( Cxxxx + n) Vnnnn Dnnnn low byte word 0~65535

Function

When C001 change from OFF ON,

Application Range

Operati on S

nnnnn(constant) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) D Cxxxx ( Cxxxx + n) Vnnnn Dnnnn

n: =7, =15

low byte word

When C001 change from OFF ON,

Execution Condition Execution Result Flag

Input Signal OFF ON

S: Unchanged D: low byte : operation result, high byte: unchanged S: Unchanged D: Operation result

Unchanged

True Table

Symbol

A 0 1 0 1

B 0 0 1 1

C 0 1 1 0
9-43

9-44

F-23 SET
Sy mb ol

Setup Output / Internal Coil ON

Program Example Set value of (D) to ON (set D coil to ON)


Equivalent circuit

Execution Executio n Operand Func Result Conditio D tion Flag n

Yxxxx Cxxxx

Input Signal OFFON

D ON Unchanged

F-24 RST
Sy mb ol

Setup Output / Internal Coil OFF

Program Example

Fun ction

Set value of (D) to OFF Yxxxx Cxxxx

Equivalent circuit

Execution Execution Result Condition Flag D

Operan dD

Input Signal OFFON

OFF Unchanged

9-45

F-25w INC Oper Func Symbol ation tion

16 Bits Increment

Program Example

Value of D add 1. Result store in D. (D) + 1(D)


Yxxxx ( Yxxxx + 15) Xxxxx ( Xxxxx + 15)

When C001 change from OFF ON, value of V070 add 1. Result store in V070.

Application Range

D Cxxxx ( Cxxxx + 15)


Vnnnn Dnnnn

Execution Execution Result Condition Flag

Input Signal OFF ON

NOTE: V0003 add 1 every 3 sec., because of the triggering signal of SC046.

D Value of D add 1. Unchanged

F-26w DEC
Oper Funct Symbol ation ion

16 Bits decrement

Program Example

Value of (D) minus 1. Result is stored in (D). (D) - 1 (D) Yxxxx ( Yxxxx + 15) Xxxxx ( Xxxxx + 15)
V0002 minus 1 every 3 sec., because of the triggering signal of SC046.

Application Range

D Cxxxx ( Cxxxx + 15) Vnnnn Dnnnn Input Signal OFF ON

Executio n Result Flag

Execution Condition

D Value of D minus 1 Unchanged


9-46

F-27 BITS
Symbol

F-27w BITS

8 bits 16 bits 1 Total Counts


Program Example

Total counts of 1 in (S) low byte is sent to (D) low byte. Total counts of 1 in (S) is sent to (D). (S) low byte, 1 SUM (D) low byte (S) 1 SUM (D) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) n: =7, =15 Cxxxx ( Cxxxx + n) Vnnnn Dnnnn low byte word 0~65535

Function

When input signal C001 is ON, total counts of value in V080 low byte will be sent to V070 low byte. Value in V080 remains unchanged. V080 low byte

Application Range

Opera tion S

nnnnn(constant) Yxxxx ( Yxxxx + n) Xxxxx ( Xxxxx + n) D Cxxxx ( Cxxxx + n) Vnnnn Dnnnn

n: =7, =15

low byte word

Execution Condition

When input signal C0001 is ON, total counts of value in V080 will be sent to V070. The value in V080 remains unchanged.

Input Signal OFF ON

Execution Result

S Unchanged, Unchanged (low byte): Operation Result; (high D byte): Unchanged Operation Result Flag Unchanged

9-47

F-30w IDXT
Symb ol

Indexed Address Transfer (MOVE TO)

Program Example

Transfer the data in S to the register designated by the address indirectly indexed via the value in D. (only bit 0~bit 13 effective in D) S@D Yxxxx ( Yxxxx + 15) Xxxxx ( Xxxxx + 15) Cxxxx ( Cxxxx + 15) Vnnnn Dnnnn nnnnn(constant) Yxxxx ( Yxxxx + 15) Xxxxx ( Xxxxx + 15) D Cxxxx ( Cxxxx + 15) Vnnnn Dnnnn 0~65535

Function

Assume: D0001 = 55, V0002 = 600 When C0001 OFF ON, value in V0002 will be transfered to V0055. Values in D0001 and V0002 remain unchanged.

Execution Result Flag

Executio n Conditio n

Application Range

Oper ation S

Input Signal OFF ON

S Unchanged D Unchanged @D Value in S Unchanged

9-48

F-31w IDXF
Symb ol

Indexed Address Transfer (MOVE FROM)

Program Example

Oper Function ation

Value in register that designated by indirectly indexed address in S will be transferred to register D. (only bit 0~bit Assume: V0032 = 00, V0005 = 1025 13 of the value in S is effective) When C0001 change from OFF ON, the value in @SD Yxxxx ( Yxxxx + 15) Xxxxx ( Xxxxx + 15) Cxxxx ( Cxxxx + 15) Vnnnn Dnnnn nnnnn(constant) Yxxxx ( Yxxxx + 15) 0~65535
D0001 will be transferred to V0032 while the value in V0005 remains unchanged.

Application Range

Xxxxx ( Xxxxx + 15) D Cxxxx ( Cxxxx + 15) Vnnnn Dnnnn

Execution Condition Execution Result Flag D

TR signal OFFON

S Unchanged Value from the indirectly address designated by value in S. Unchanged

9-49

F-32w nTRF
Symbol

n-word Data Transfer


Program Example

Function Operation

n words of data transfer

(S)

(D) (Dn 1)
Before Execution :

(Sn 1)

D Vnnnn Dnnnn Application Range

WCnnn S Vnnnn Dnnnn

After Execution:

n V,D, nnnn=0~1024 Execution Condition

Input Signal OFFON

Execution Result

Result D+n-1 <= Dmax

SC041 SC042 SC043 SC044 NOTE: n must be less than 1024 When the Dxxx exceeded specified standard value, operation will generate error message and stop this instruction.

Flag

0 Unchanged

D+n -1> Dmax

9-50

F-33 TEXT

F-33w TEXT

8bits/ 16bits Easy MMI Text Display (can display register value)
Program Example

Symbol

Display text on the LCD display of OP12 (1 line). Display text on the LCD display of OP12 (2 line). (1): file no. (2): Memory to be displayed by S.

Function

Assume V0001 = 00001 (File 01), V0002 = 01202, and WC513 to WC532 was setup to the value of text to be displayed.

When C0001 change from OFFON, following text will be displayed on screen:

Operation

(1): file no. (2): Memory to be displayed by S.

CAUTION: When values of WCxxx are not decimal value 35(#), 01202 will not be displayed. If you want to display the value 01202, value of Wcxxx must be set to decimal value 35(#). There must be five WCxxx value to be set to decimal value 35(#).

Application Range

S Vnnnn D Vnnnn

low byte word low byte word

Assume V0001 = 00001 (File 01), V0002 = 01234, and WC513 to WC552 was setup to the value of text to be displayed. When C0001 change from OFFON, following text will be displayed on screen:

Execution Condition

Input Signal OFF ON

Execution Result

(File) (S) File N (S)

Content displayed on OP12. Content displayed on OP12. Content displayed on OP12. Content displayed on OP12.

CAUTION: When values of WCxxx are not decimal value 35(#), 01234 will not be displayed. If you want to display the value 01234, value of Wcxxx must be set to decimal value 35(#). There must be five WCxxx value to be set to decimal value 35(#).

Result Flag (File N) <= 130 (File N) <= 129

SC041

SC042 Unchanged

SC043

SC044 0

9-51

File N) > 130

(File N) > 129

9-52

F-34 SCLK

SCAN CYCLE ON Execution

Program Example Symbol Execution Execution Result Function Condition Flag Convert OFF ON. Execution condition to ON level condition.

When input signal is ON.

Unchanged.

NOTE: The initialize pulse at power on of SC058 is ON in first SCAN TIME. It is OFF in second SCAN TIME. Therefore, F-25w INC instruction does n ot detect the OFF ON execution condition. Please insert the F-34 SCLK instruction before the F-25w INC instruction to execution the increment operation at the first SCAN TIME.

-F34-SCLK condition will be reset by STR/STR NOT instruction,

9-49

F-39 DCOD
Symbol

1~8 Bits Decoder

Program Example

Function Operation Application Range

Decode n bits of designated register S and store into register D. When n = 0, execute instruction, but discard the result. When n = 4, execute 416 Decoder operation. When n = 8, execute 8256 Decoder operation

Yxxxx(Yxxxx+255) Cxxxx(Cxxxx+255) D Vnnnn(Vnnnn+15) Dnnnn(Dnnnn+15)

Xxxxx(Xxxxx+7) Yxxxx(Yxxxx+7) S Cxxxx(Cxxxx+7) Vnnnn(low byte) Dnnnn(low byte)

Data in X0001~X0004 is decoded and stored into 16 bits register starting from C0001.

n 1~8 Execution Condition Execution Result D Flag

Input Signal OFFON

S Unchanged Content in S is decoded as 2n bits and store into D. Unchanged

9-50

F-40 ECOD

1~256 Bits Encoder

Program Example Symbol Function Application Range Operation Encode data in designated register S to 2n bits and store into register D. When n = 0, the instruction is executed but discard its result. When n = 4, execute 164 Encoder. When n = 6, execute 64 6 Encoder. When n = 8, execute 2568 Encoder. Yxxxx(Yxxxx+7) Cxxxx(Cxxxx+7) D Vnnnn(low byte) Dnnnn(low byte) Xxxxx(Xxxxx+255) Yxxxx(Yxxxx+255) S Cxxxx(Cxxxx+255) Vnnnn(Vnnnn+15) Dnnnn(Dnnnn+15)

n 1~8 Execution Condition

Highest bits in C0001~C0006 are encoded and stored into lower 4 bits of D0001.

Input Signal OFFON

Execution Result

S Unchanged Content in S is Encoded to n bits and stored into D. Unchanged S=0 S=0

D Flag

9-51

F-41 INV
Symbol

Signal Inversion

Function Program Example

Inverse ON/OFF signal and then transfer the result (ONOFF, OFFON).

When both contact X0001 and C0001 are ON, Y0001 is OFF.

Following two circuitry are equivalent and generate the same result.

Following two circuitry will generate different result. Do not apply this structure when using
F-41 instruction.

9-52

F-42 LABL

Assign Label

Symbol

Assign label, Labels include: Function

F-43 (JMP) Jump address. F-44 (CALL) Call address. 10 ms System timer interrupt jump address. High speed counter interrupt jump address. External interrupt input jump address.

LB001~LB110: LB111~LB114: LB115~LB127: LB128

used by F-43, F-44. used by HSC, INT mode. used by F-43, F-44. : used by 10ms system timer interrupt. Instructions

Applicatio n Range

STR OR OUT F-00 F-42 STR F-11w

Program Example

STR AND OUT F-45

X0001 X0002 C0400 END LB002 C0400 XFER D0002 V0001 X0003 C0400 C0401 RET

F-42 is a pointer for jump instruction or sub-program. It is usually programmed into location after F-00 END. In above mentioned example, if there is not any program that call or jump into LABEL behind F-00 END instruction, instruction in LABEL will not be executed. NOTE: Assigned label number can not be used repeatedly.

9-53

F-43 JMP

Jump to Assigned Label

Function Applicati on Range

Symbol Jump to address designated F-42 assigned label and continue program execution. LB001~LB128 Executio n Condition Input Signal ON

When contact X0001 is ON, F -43 execute jump to LB100. Program will jump to address 2005 and continue execution. When contact X0001 is OFF (do not execute jump to LB100) and contact X0002 is ON, execute jump to LB0005, program continue execution starting from address 0005. Program Exam ple

Executing F-43 jump instruction may skip some part of user program and reduce required
scanning time.

There can be more than one F-43 jump instruction jump into the same F-42 label. Executing jump instruction could skip F-00 END instruction. Jump instruction F-43 must be used with corresponding F-42 assign label instruction. If the instruction at the F-42 assigned address is not required to be executed when OFFON,
please insert F-34 SCLK at the beginning of the program. (refer to the program listed next page).

9-54

(Program 1)

(Program 2)

In the program 1 listed above, the F-11 instruction will not be executed after jump into the labeled program . This is because the jump instruction require C0001 to be changed from OFF ON when the accumulator in CPU would have treat C0001 as ON. C0001 must be changed from OFF ON again for F-11 to be executed. When C0001 change from OFF ON for the first time, CPU will execute the jump in ON execution cycle (jump to F-43 LB0100). Since the C0001 change from OFF ON execution condition does not exist in next execution cycle, C0001 have to be OFF and then ON again for the F-11 instruction to be executed. While the C0001 change to OFF will disable the jump, the F-11 instruction will never be executed. In program 2, when C0001 is ON, CPU will be forced by F-34 SCLK instruction to execute instruction after designated label. Therefore, program 2 F-34 SCLK must be used for F-11 instruction to be executed.

Program Example

9-55

F-44 CALL

F-45 RET

Call Label Subprogram/ Subprogram Return Point

Symbol F-44 instruction call the designated subprogram starting from the assigned F-42 label. The execution of subprogram will be continued until the F-45 subprogram return point instruction. Execution of instructions following the F-44 call instruction will be resumed after returning from subprogram. (Used to execute repeated program to save program memory capacity.) Application Range Function LB001~LB128 Executio n Condition Input Signal change from OFF ON to call subprogram.

9-56

Program Example

In the example listed above, when X0001 change from OFFON, program will jump to F-42 LB001 and execute instructions that follows until the F-45 instruction. When the F-45 instruction is executed, program will be returned to execute the next instruction after F-44 and the instructions that follows. Following instructions can not be placed in subprogram: TMR, CNT, F-00, F-01/F-02, F-03/F-04, F-05/F-06, F-46/F-47. Main program should be written before subprogram. There must be a F-00 END instruction between main program and sub-program. There must be one F-45 return instruction in sub-program. Alike F-43 JMP example, please using F-34 SCLK to insert in sub-program force OFFON execution condition to be ON level condition.

9-57

F-46 FOR

F-47 NEXT

Assign Repetition Loop Begin/End

Function Application Range Program Example n

Symbol Repeat program between F-46 and F-47 for n times. 1~256 Executio n Condition Input Signal change from OFFON

F-46/F-47 instructions must be used in pair. Following instructions can not be used in circuitry:
(TMR, CNT, F-00, F-01/F-02, F-03/F-04, F-05/F-06,F-33, F-43, F-46/F-47) There must not be nested repetition loop within existing loop. There must not be F-46/F-47 pair between F-46/F-47 instruction pair. Be aware that the scan time could be extended executing the repetition loop. Therefore, the program within the loop circuitry should be as simple as possible. When X0001 change from OFF ON, F-25w instruction will be executed for 4 times. (D0001 increase for 4 time because of the execution of F-25w.) Instruction in circuitry must not use the same contact with F-46 instruction.

9-58

F-48 10RF
Symbol

I/O Update (1 byte)


Program Example

Function Operation Application Range of D Execution Condition After Execution Input Output Flag

1 byte data update of the designated input port or output port. Input port D Output port D Xxxxx (Xxxxx+7) Yxxxx (Yxxxx+7) Input Signal ON Data memory update Output status update Unchanged When input condition C0001 is ON, 1 byte data of X0001~X0008 update immediately.

F-49 10RB
Symbol

I/O Update (1 bit)


Program Example

Function Operation Application Range of D Execution Condition After Execution Input Output Flag

Update data of designate input or output point. Input port D Output port D Xxxxx Yxxxx Input Signal ON Data memory update Output statue update Unchanged When C0001 is ON, Y0005 update data immediately.

9-59

F-50w STMR
Symbol

Special Timer
Program Example

Define the 4-th relay contact from D to use Timer T for time base to perform Delayed ON/Delayed OFF and ONE-SHOT operations.

Function D Application Range Execution Result Execution Condition T

Yxxxx Cxxxx

T V1~V256

Dxxxx n Vxxxx nnnn constant 0~65535 Y0001 set to ON when X0001 is ON. When X0001 changes to OFF, Y0001 turn OFF after delayed 5 sec. Y0002 set to ON when X0001 is OFF. Y0002 remains ON for 5 sec. and then changes back to OFF. Y0003 set to ON when X0001 is ON. Y0003 remains ON for 5 D perform Delayed OFF operation sec. And then changes back to OFF. D +1 perform (ONOFF) ONE SHOT Y0004 changes to ON after X0001 has been ON for 5 sec. operation If X0001 is in ON status for less than 5 sec., the Y0004 ON D D+2 perform (OFFON) ONE SHOT signal will be reset by X0001 OFF operation. operation D+3 perform Delayed ON operation. TR Signal OFFON/ONOFF

V0001~V0250: 100ms Timer V0251~V0256: 10ms Timer

n Unchanged Flag

NOTE2: Timer number assigned to be Timer purpose should not be used duplicated in program.

Unchanged

9-60

F-51 ZRST

F-51w ZRST

Relay/ Register Reset Zone


Program Example

Symbol Function

Reset relay to OFF, starting from D to D+n. Reset register to zero, starting from D to D+n.
Set Y0001~Y0036 to be cleared to OFF at the first scan cycle of TP02 RUN mode.

Yxxxx Cxxxx D Application Range Yxxxx(Yxxxx+7) Cxxxx(Cxxxx+7) Dnnnn Vnnnn

Dnnnn Vnnnn n nnnn constant:1~256 Dnnnn Vnnnn nnnn constant:1~256


set 256 registers starting from D0001 to be cleared to zero at the first scan cycle.

Executio n Condition Execution Result Flag

Input Signal OFFON

DD+n relays to OFF

DD+n registers to 0

Unchanged

9-61

F-52 TENK

10 KEY Input
Program Example

Symbol Read input value from 10KEY connected to input points S~S+9. Maximum input value is 8 digits. Store the BCD code of input value to (D1,D1+1). D2 register corresponding bit will turn ON/OFF respectively. Function

The program listed above assign ten input to be connected with 10 push button representing 0~9.

D1 Application Range

Vnnnn Dnnnn

Yxxxx D2 Cxxxx

10KEY input

The relay corresponding 10KEY input remains ON before next input.

Xxxxx
Special relay SC065 corresponding 10 KEY special relay. Set to ON if push button depressed.

Executio n Condition

Input Signal ON lower four BCD code D high four BCD code D+1
Before execution

D0002 2 4 7 7 4 7 7 6 7 7 6 6 7 6 6 3 6 6 3 3

D0001 6 3 3 1 3 3 1 0 3 1 0 9

D1

D2 The bit corresponding D2 set to ON Execution Result


Result D1 is not BCD code.
SC041 SC042 SC043 SC044

Flag

Unchanged
D1 is a BCD code.

NOTE: This instruction can be used only once in entire program.

9-62

F-53 HEXK

16 KEY Input
Program Example

Symbol Scan 16KEY (X, X+3 ~ Y, Y+3) connected at I/O port and read 8 bits value. Put the value into (D, D+1). Special relay SC067~SC072 will set to ON for one pulse when corresponding A~F key on 16 KEY is depressed. Function D Application Range Execution Result Executio n Condition Vnnnn Dnnnn X Xxxxx Y Yxxxx Input Signal ON Lower 4 BCD code D Higher 4 BCD codeD+1 When key 0~9 is depressed, corresponding special relay SC066 D will be set to ON. When key A~F is depressed, corresponding special relay SC067~SC072 will be set to ON.
NOTE: This instruction can be used in program only once.

Flag

Unchanged

9-63

F-54 MTRX

F-54w

F-54d

MTRX

MTRX

Matrix Scan Input


Program Example

Symbol

Instructions
STR NOT SC045 MTRX C0001 X0001 Y0001

F-54

Operation of converting 8in x 4 out Matrix input to bit 1~32 of D~D+1 Operation of converting 8in x 6 out Matrix input to bit 1~48 of D~D+2 Operation of converting 8in x 8 out Matrix input to bit 1~64 of D~D+3

0.1A50V

Function

Yxxxx(Yxxxx+n) D Cxxxx(Cxxxx+n) Application Range

n=31 n=47 n=63


Output scan

X Xxxxx(Xxxxx+7) Yxxxx(Yxxxx+3) Y Yxxxx(Yxxxx+5) Yxxxx(Yxxxx+7)

Execution Condition Execution Result

Input Signal ON

The corresponding points of D Output/Input scan are stored into register from DD+n.

This instruction can be used only once in program. The MATRIX input scan is performed once every SCAN TIME. Please be aware that if the SCAN TIME is longer the key press update speed would be slower. max:(8 scanning cycle refresh once.)

9-64

SCAN TIME. Please be aware that if the SCAN TIME is longer the key press update speed would be slower. 0.1A50V max:(8 scanning cycle refresh once.) Flag Unchanged If two or more keys are depressed at the same time, they will all be scanned and recognized as ON.
Output scanthe switch must equip with DIODE Please confirm protection.

9-65

F-55 DSW

F-55w

DSW

BCD DIP Switch Input


Program Example

Symbol Function D Applic ation Range

4 input points, 4 output points. This instruction can read a 4 bits dip switch setup and set the value in register D. 4 input points, 8 output points. BCD This instruction can read two 4 dip switch bits dip switch setup and set the value in register (D, D+1)

Dnnnn Vnnnn

X Xxxxx(Xxxxx+3)

Scan Output

Y Execution Condition Execution Result

Yxxxx(Yxxxx+3) Yxxxx(Yxxxx+7)

Input Signal ON

4 bits BCD code store into D lower 4 bits BCD code store into D D higher 4 bits BCD code store into NOTE: 4 scanning cycle is required to complete the input of dip switch scan. Please apply dip switch completion flag D+1 SC073 and F-11 XFER to transfer the input value to another register. Result SC041 SC042 SC043 SC044 This instruction can be used in program for once only. Flag
Input is not a BCD code

Please confirm the Dip switch must with diode protection. Unchanged 1

9-66

Input is a BCD code

9-67

F-56 SEGO
Symbol

7 Segment Display Module Scan


Program Example

Deliver the value in D to Latch module of 7 segment display in BCD code format. Scan sequentially to complete updating data.

Function D Application Range

Vnnnn Dnnnn Content of D0001 in BCD code will be sent to corresponding 7 segment display module. Ynnnn (Ynnnn~Ynnnn+3 send out BCD value) (Ynnnn+4~Ynnnn+7 sent out contact for scanning 7 segment display)

n N: 1~4 Execution Condition Execution Result Flag

Input Signal ON

D Unchanged

NOTE: Frequency of scanning BCD module is related to SCAN TIME. The longer the SCAN TIME, the longer refresh time needed to complete 4 word sets. If two words is required to be displayed, please apply Yxxxx(Yxxxx+3) send out BCD code two F-56 instructions. Y Yxxxx+4(Yxxxx+11) send out scan pulse

Unchanged

9-68

F-57w BCMP
Symbol

16 Sets Upper/Lower Limit Comparison


Program Example

Compare S1 with data in 16 sets comparison list starting from S2. If value in S1 is smaller than upper limit and larger than lower limit, the corresponding bit in D will be set to ON, conversely the corresponding bit in D will be set to OFF. Function D Application Range Yxxxx(Yxxxx+15) Cxxxx(Cxxxx+15) *NOTE: If lower limit > upper limit, the result of comparison will set the corresponding relay to OFF. S1 Vnnnn Dnnnn Vnnnn Dnnnn S2 Execution Condition D Execution Result Flag Input Signal ON Comparison results are stored into corresponding bits. S1 Unchanged S2 Unchanged Unchanged

9-69

F-58 RXD
Symbol

Communication Port Input

Program Example Example: The standards of receiving data is as follows: data length:8 bits, stop bit:2 bits, parity: even parity, Baudrate:9600 The assembled data are 20 data bytes without Use the TP02 MMI PORT for communication ending code. They are stored into the memory to read input data. The communication space starting from address D0001 and the address parameters are setup by MMI port D0020 is the ending address of data. communication setup value in WS041. When Step: Set the WS041 = 01121 executing this program, please put the Please put the PG_COM of MMI PORT to PGCOM point of MMI PORT in short-circuit be short-circuit with GND. to the GND. Design program (Content in D designate the starting address to store input data. Every word of storage space store only 1 byte of data.)

Function

Vnnnn D Dnnnn

Application Range

External data input format

Vnnnn C Dnnnn (low byte) Internal data receiving (HEX CODE)

n 0 or 1

(When n=0, the content in C is the ending code assigned by communication.) (When n=1, the content in C is the data length of the communication.)

Execution Condition Execution Result D

When input signal is OFFON, receiving data is allowed, when input signal is OFF, then reset SC074 Store input data (D~D+nnnn), After data was received, the SC074 is ON. NOTE: When the data in sequence is more the buffer setup to receive them, exceeding portion will be stored starting over from the (D0001) again. If the ending code is set for communication, when the ending code is not received, new data will be stored starting over from the beginning again.

C Unchanged

n Unchanged

9-70

Unchanged

communication, when the ending code is not received, new data will be stored starting over from the beginning again. This instruction can be used only once in user program.

Flag

9-71

F-59 TXD
Symbol

Communication Port Output


Program Example Example: If the data to be sent is in following specification: Data length:7 bits, Stop bit:1 bit, Parity: Odd, Baudrate:2400

Ending Code: CR Use the TP02 MMI PORT to perform The data to be sent are stored starting from D0001 communication and output data. The to D0010. communication parameter is as setup in the Procedure: MMI port communication standard (WS041). Set WS041 = 00013 Please short-circuit the PG-COM point of Please connect the PG_COM point of MMI MMI PORT to the GND. port to short-circuit with GND. Program Design: (D is the starting address of data to output. Only low byte of data in each word of register is sent.)

Function

Vnnnn D Dnnnn WCnnnn Application Range

The data to be sent (in HEX CODE) is as follows:

Vnnnn C Dnnnn (low byte) 0 or 1 n

(When n = 0, the content in C is the ending code of communication instruction.) (When n = 1, the content in C is the data length of communication.)

Data frame to be sent:

Execution Condition

Input Signal change from OFFON. When input signal is OFF, then reset SC075 NOTE: When the input signal change from OFF ON, this function will be executed for once. If part of the data previously setup is not completely, this instruction will not be executed. If the ending code is not set (n=0), maximum length of data to be sent would be 256 bytes. This instruction can be used for only once in user program.

Unchanged, After data was received the D SC075 is ON. Execution Result

C Unchanged

n Unchanged

Flag

Unchanged

9-72

F-60 TSET

F-61 TRST

Current Time Comparison (Set Relay ON/OFF)


Program Example

Symbol Function

Compare n1, n1 to the time of perpetual calendar. When they are equal, SET RESET the relay designated by D.

When the time of real time clock is equal to 11:30, C0001 would be set to ON. (If there is no any other instruction to reset C0001, its status would be kept ON.

D Application Range

Yxxxx Cxxxx

n1 00~23 (Hour)

n2 00~59 (Minute) When the time of real time clock is equal to 12:00, C0001 would be set to OFF. Execution Condition Input Signal ON NOTE: The designated Relay is still susceptible to other OUT or operation instructions.

Execution Result

If n1=content in V1020 and n2=content in V1019, set D to ON. D If n1=content in V1020 and n2=content in V1019, set D to OFF. Flag

Unchanged

9-73

F-62

F-63 HEX

ASCII Code Conversion HEX Code Conversion of DATA


Program Example

Symbol Function

Convert HEX (0~F) data to ASCII code. Convert ASCII code to HEX (0~F) data Data not within the legal range of conversion Before Execution 0(H30)~9(H39), A(H41)~F(H46) will not be converted.

Vnnnn D Dnnnn

After Execution low byte

Application Range

Vnnnn S Dnnnn WCnnn

NOT: High byte dont care. low byte (b0~`b7)

Vnnnn Dnnnn n nnnn Execution Condition

low byte constant(1~256) Before Execution

Input Signal ON

Execution Result

Convert n WORDS of data starting from S to After Execution ASCII code and store them into D~D+n. Convert n WORDS of data starting from S to HEX code and store them into D~D+n.

NOTE: High byte dont care.

Flag

Unchanged

9-74

F-34 SCLK

SCAN CYCLE ON Execution

Program Example Symbol Execution Execution Result Function Condition Flag Convert OFF ON. Execution condition to ON level condition.

When input signal is ON.

Unchanged.

NOTE: The initialize pulse at power on of SC058 is ON in first SCAN TIME. It is OFF in second SCAN TIME. Therefore, F-25w INC instruction does not detect the OFF ON execution condition. Please insert the F-34 SCLK instruction before the F-25w INC instruction to execution the increment operation at the first SCAN TIM E.

-F34-SCLK condition will be reset by STR/STR NOT instruction,

9-75

F-39 DCOD
Symbol

1~8 Bits Decoder

Program Example

Function

Decode n bits of designated register S and store into register D. When n = 0, execute instruction, but discard the result. When n = 4, execute 416 Decoder operation. When n = 8, execute 8256 Decoder operation

Instructions

Operation Application Range

Yxxxx(Yxxxx+255) Cxxxx(Cxxxx+255) D Vnnnn(Vnnnn+15) Dnnnn(Dnnnn+15)

Xxxxx(Xxxxx+7) Yxxxx(Yxxxx+7) S Cxxxx(Cxxxx+7) Vnnnn(low byte) Dnnnn(low byte)


Data in X0001~X0004 is decoded and stored into 16 bits register starting from C0001.

n 1~8 Execution Condition Execution Result D Flag

Input Signal OFFON

S Unchanged Content in S is decoded as 2n bits and store into D. Unchanged

9-76

F-40 ECOD

1~256 Bits Encoder

Program Example Symbol

Function

Encode data in designated register S to 2n bits and store into register D. When n = 0, the instruction is executed but discard its result. When n = 4, execute 164 Encoder. When n = 6, execute 64 6 Encoder. When n = 8, execute 2568 Encoder.

Instruction ECOD ECOD ECOD

Application Range

Operation

Yxxxx(Yxxxx+7) Cxxxx(Cxxxx+7) D Vnnnn(low byte) Dnnnn(low byte)

Xxxxx(Xxxxx+255) Yxxxx(Yxxxx+255) S Cxxxx(Cxxxx+255) Vnnnn(Vnnnn+15) Dnnnn(Dnnnn+15)

n 1~8 Execution Condition Highest bits in C0001~C0006 are encoded and stored into lower 4 bits of D0001.

Input Signal OFFON

Execution Result

S Unchanged Content in S is Encoded to n bits and stored into D. Unchanged

D Flag

9-77

F-41 INV
Symbol

Signal Inversion

Function

Inverse ON/OFF signal and then transfer the result (ONOFF, OFFON).

When both contact X0001 and C0001 are ON, Y0001 is OFF.
INV

Following two circuitry are equivalent and generate the same result.

Program Example

Following two circuitry will generate different result. Do not apply this structure when using
F-41 instruction.

9-78

F-42 LABL

Assign Label

Symbol

Assign label, Labels include: Function

F-43 (JMP) Jump address. F-44 (CALL) Call address. 10 ms System timer interrupt jump address. High speed counter interrupt jump address. External interrupt input jump address.

LB001~LB110: LB111~LB114: LB115~LB127: LB128

used by F-43, F-44. used by HSC, INT mode. used by F-43, F-44. : used by 10ms system timer interrupt. Instructions

Applicatio n Range

F-45 RET

STR OR OUT F-00 F-42 STR F-11w

Program Example

STR AND OUT F-45

X0001 X0002 C0400 END LB002 C0400 XFER D0002 V0001 X0003 C0400 C0401 RET

F-42 is a pointer for jump instruction or sub-program. It is usually programmed into location after F-00 END. In above mentioned example, if there is not any program that call or jump into LABEL behind F-00 END instruction, instruction in LABEL will not be executed. NOTE: Assigned label number can not be used repeatedly.

9-79

F-43 JMP

Jump to Assigned Label

Function Applicati on Range

Symbol Jump to address designated F-42 assigned label and continue program execution. LB001~LB128 Executio n Condition Input Signal ON

Address Instruction When contact X0001 is ON, F -43 execute jump to LB100. Program will jump to address 2005 and continue execution. When contact X0001 is OFF (do not execute jump to LB100) and contact X0002 is ON, execute jump to LB0005, program continue execution starting from address 0005. Program Example

Executing F-43 jump instruction may skip some part of user program and reduce required
scanning time.

There can be more than one F-43 jump instruction jump into the same F-42 label. Executing jump instruction could skip F-00 END instruction. Jump instruction F-43 must be used with corresponding F-42 assign label instruction. If the instruction at the F-42 assigned address is not required to be executed when OFFON,
please insert F-34 SCLK at the beginning of the program. (refer to the program listed next page).

9-80

9-81

(Program 1)

(Program 2)

F-42

LB100

In the program 1 listed above, the F-11 instruction will not be executed after jump into the labeled program . This is because the jump instruction require C0001 to be changed from OFF ON when the accumulator in CPU would have treat C0001 as ON. C0001 must be changed from OFF ON again for F-11 to be executed. When C0001 change from OFF ON for the first time, CPU will execute the jump in ON execution cycle (jump to F-43 LB0100). Since the C0001 change from OFF ON execution condition does not exist in next execution cycle, C0001 have to be OFF and then ON again for the F-11 instruction to be executed. While the C0001 change to OFF will disable the jump, the F-11 instruction will never be executed. In program 2, when C0001 is ON, CPU will be forced by F-34 SCLK instruction to execute instruction after designated label. Therefore, program 2 F-34 SCLK must be used for F-11 instruction to be executed.

Program Example

9-82

F-44 CALL

F-45 RET

Call Label Subprogram/ Subprogram Return Point

Symbol F-44 instruction call the designated subprogram starting from the assigned F-42 label. The execution of subprogram will be continued until the F-45 subprogram return point instruction. Execution of instructions following the F-44 call instruction will be resumed after returning from subprogram. (Used to execute repeated program to save program memory capacity.) Application Range Function LB001~LB128 Executio n Condition Input Signal change from OFF ON to call subprogram.

9-83

Main Program Sub Program Instructions

Program Example

LB001

In the example listed above, when X0001 change from OFFON, program will jump to F-42 LB001 and execute instructions that follows until the F-45 instruction. When the F-45 instruction is executed, program will be returned to execute the next instruction after F-44 and the instructions that follows. Following instructions can not be placed in subprogram: TMR, CNT, F-00, F-01/F-02, F-03/F-04, F-05/F-06, F-46/F-47. Main program should be written before subprogram. There must be a F-00 END instruction between main program and sub-program. There must be one F-45 return instruction in sub-program. Alike F-43 JMP example, please using F-34 SCLK to insert in sub-program force OFFON execution condition to be ON level condition.

9-84

F-46 FOR
n

F-47 NEXT

Assign Repetition Loop Begin/End

Function Application Range Program Example n

Symbol Executio n Condition

Repeat program between F-46 and F-47 for n times.

1~256

Input Signal change from OFFON

Instructions F-46/F-47 instructions must be used in pair. Following instructions can not be used in circuitry: (TMR, CNT, F-00, F-01/F-02, F-03/F-04, F-05/F-06,F-33, F-43, F-46/F-47) There must not be nested repetition loop within existing loop. There must not be F-46/F-47 pair between F-46/F-47 instruction pair. Be aware that the scan time could be extended executing the repetition loop. Therefore, the program within the loop circuitry should be as simple as possible. When X0001 change from OFF ON, F-25w instruction will be executed for 4 times. (D0001 increase for 4 time because of the execution of F-25w.) Instruction in circuitry must not use the same contact with F-46 instruction.

9-85

F-48 10RF
Symbol

I/O Update (1 byte)


Program Example Instructions

Function Operation Application Range of D Execution Condition After Execution Input Output Flag

1 byte data update of the designated input port or output port. Input port D Output port D Xxxxx (Xxxxx+7) Yxxxx (Yxxxx+7) Input Signal ON Data memory update Output status update Unchanged

F-48

When input condition C0001 is ON, 1 byte data of X0001~X0008 update immediately.

F-49 10RB
Symbol

I/O Update (1 bit)


Program Example
IORB

Function Operation Application Range of D Execution Condition Input After Execution Output Flag

Update data of designate input or output point. Input port D Output port D Xxxxx Yxxxx Input Signal ON Data memory update Output statue update Unchanged
IOR Y0005

Y0005 Instructions

IORB Y0005

When C0001 is ON, Y0005 update data immediately.

9-86

F-50w STMR
Symbol

Special Timer
Program Example

Define the 4-th relay contact from D to use Timer T for time base to perform Delayed ON/Delayed OFF and ONE-SHOT operations.

Function

5sec 5sec 5sec 5sec 5sec 5sec

D Application Range

Yxxxx Cxxxx

Instructions

T V1~V256

Dxxxx n Vxxxx nnnn constant 0~65535 Execution Condition Execution Result TR Signal OFFON/ONOFF

Y0001 set to ON when X0001 is ON. When X0001 changes to OFF, Y0001 turn OFF after delayed 5 sec. Y0002 set to ON when X0001 is OFF. Y0002 remains ON for D perform Delayed OFF operation 5 sec. and then changes back to OFF. D +1 perform (ONOFF) ONE SHOT Y0003 set to ON when X0001 is ON. Y0003 remains ON for 5 operation sec. And then changes back to OFF. D D+2 perform (OFFON) ONE SHOT Y0004 changes to ON after X0001 has been ON for 5 sec. operation If X0001 is in ON status for less than 5 sec., the Y0004 ON D+3 perform Delayed ON operation. signal will be reset by X0001 OFF operation. NOTE: Timer number assigned to be Timer purpose sould not be used duplicated in program. T V0001~V0250: 100ms Timer V0251~V0256: 10ms Timer

n Unchanged Flag

Unchanged

9-87

F-51 ZRST

F-51w ZRST

Relay/ Register Reset Zone


Program Example Instructions

Symbol Function

Reset relay to OFF, starting from D to D+n. Reset register to zero, starting from D to D+n.
Set Y0001~Y0036 to be cleared to OFF at the first scan cycle of TP02 RUN mode.

Yxxxx Cxxxx D Application Range Yxxxx(Yxxxx+7) Cxxxx(Cxxxx+7) Dnnnn Vnnnn

Instructions

Dnnnn Vnnnn n nnnn constant:1~256 Dnnnn Vnnnn nnnn constant:1~256


set 256 registers starting from D0001 to be cleared to zero at the first scan cycle.

Executio n Condition Execution Result Flag

Input Signal OFFON

DD+n relays to OFF

DD+n registers to 0

Unchanged

9-88

F-52 TENK

10 KEY Input
Program Example

Symbol

Instructions

Read input value from 10KEY connected to input points S~S+9. Maximum input value is 8 digits. Store the BCD code of input value to (D1,D1+1). D2 register corresponding bit will turn ON/OFF respectively.

Function

The program listed above assign ten input to be connected with 10 push button representing 0~9.

D1 Application Range

Vnnnn Dnnnn

Yxxxx D2 Cxxxx

10KEY input

The relay corresponding 10KEY input remains ON before next input.

Xxxxx
Special relay SC065 corresponding 10 KEY special relay. Set to ON if push button depressed.

Executio n Condition

Input Signal ON
Before execution

D1

lower four BCD code D high four BCD code D+1

D2 The bit corresponding D2 set to ON Execution Result


Result D1 is not BCD code.
SC041 SC042 SC043 SC044

Flag

Unchanged
D1 is a BCD code.

NOTE: This instruction can be used only once in entire program.

9-89

F-53 HEXK

16 KEY Input
Program Example

Symbol

F-53
Instru ctions

Scan 16KEY (X, X+3 ~ Y, Y+3) connected at I/O port and read 8 bits value. Put the value into (D, D+1). Special relay SC067~SC072 will set to ON for one pulse when corresponding A~F key on 16 KEY is depressed.

Function D Application Range Execution Result Executio n Condition Flag

Vnnnn Dnnnn

X Xxxxx

Y Yxxxx

Input Signal ON

Lower 4 BCD code D Higher 4 BCD codeD+1 When key 0~9 is depressed, corresponding special relay SC066 D will be set to ON. When key A~F is depressed, corresponding special relay SC067~SC072 will be set to ON.

Unchanged
NOTE: This instruction can be used in program only once.

9-90

F-54 MTRX

F-54w

F-54d

MTRX

MTRX

Matrix Scan Input


Program Example

Symbol

Instructions Operation of converting 8in x 4 out Matrix input to bit 1~32 of D~D+1 Operation of converting 8in x 6 out Matrix input to bit 1~48 of D~D+2 Operation of converting 8in x 8 out Matrix input to bit 1~64 of D~D+3

Function

Yxxxx(Yxxxx+n) D Cxxxx(Cxxxx+n) Application Range

n=31 n=47 n=63

X Xxxxx(Xxxxx+7) Yxxxx(Yxxxx+3) Y Yxxxx(Yxxxx+5) Yxxxx(Yxxxx+7)

Execution Condition Execution Result

Input Signal ON

The corresponding points of D Output/Input scan are stored into register from DD+n.

This instruction can be used only once in program. The MATRIX input scan is performed once every SCAN TIME. Please be aware that if the SCAN TIME is

9-91

SCAN TIME. Please be aware that if the SCAN TIME is longer the key press update speed would be slower. max:(8 scanning cycle refresh once.) Flag Unchanged If two or more keys are depressed at the same time, they will all be scanned and recognized as ON. Please confirm the switch must equip with DIODE protection.

9-92

F-55 DSW

F-55w

DSW

BCD DIP Switch Input


Program Example

Symbol

Instructions

4 input points, 4 output points. This instruction can read a 4 bits dip switch setup and set the value in register D. 4 input points, 8 output points. This instruction can read two 4 bits dip switch setup and set the value in register (D, D+1) BCD dip switch

Function D Application Range

Dnnnn Vnnnn

X Xxxxx(Xxxxx+3)

Y Execution Condition

Yxxxx(Yxxxx+3) Yxxxx(Yxxxx+7)

Scan Output

Input Signal ON

Execution Result

4 bits BCD code store into D lower 4 bits BCD code store into D D higher 4 bits BCD code store into D+1 NOTE: 4 scanning cycle is required to complete the input of dip switch scan. Please apply dip switch completion flag SC073 and F-11 XFER to transfer the input value to another register.

Result

SC041 SC042 SC043 SC044

Flag

Input is not a BCD code

Unchanged

9-93

Input is a BCD code

This instruction can be used in program for once only. Please confirm the Dip switch must with diode protection.

9-94

F-56 SEGO
Symbol

7 Segment Display Module Scan


Program Example 0004 Instructions

Deliver the value in D to Latch module of 7 segment display in BCD code format. Scan sequentially to complete updating data.

Function D Application Range

Vnnnn Dnnnn

Ynnnn Y

Content of D0001 in BCD code will be sent to corresponding (Ynnnn~Ynnnn+3 send 7 segment display module. out BCD value) (Ynnnn+4~Ynnnn+7 sent out contact for scanning 7 segment display)

n N: 1~4 Execution Condition Execution Result Flag

Input Signal ON

D Unchanged NOTE: Frequency of scanning BCD module is related to SCAN TIME. The longer the SCAN TIME, the longer Yxxxx(Yxxxx+3) send out BCD code refresh time needed to complete 4 word sets. Y Yxxxx+4(Yxxxx+11) send out scan If two words is required to be displayed, please apply pulse two F-56 instructions.

Unchanged

9-95

F-57w BCMP
Symbol

16 Sets Upper/Lower Limit Comparison


Program Example

Instructions Compare S1 with data in 16 sets comparison list starting from S2. If value in S1 is smaller than upper limit and larger than lower limit, the corresponding bit in D will be set to ON, conversely the corresponding bit in D will be set to OFF.

Function D Application Range Yxxxx(Yxxxx+15) Cxxxx(Cxxxx+15) *NOTE: If lower limit > upper limit, the result of comparison will set the corresponding relay to OFF. S1 Vnnnn Dnnnn Vnnnn Dnnnn S2 Execution Condition D Execution Result Flag Input Signal ON Comparison results are stored into corresponding bits. S1 Unchanged S2 Unchanged Unchanged

9-96

F-58 RXD
Symbol

Communication Port Input

Program Example Example: The standards of receiving data is as follows: data length:8 bits, stop bit:2 bits, parity: even parity, Baudrate:9600 The assembled data are 20 data bytes without Use the TP02 MMI PORT for communication ending code. They are stored into the memory to read input data. The communication space starting from address D0001 and the address parameters are setup by MMI port D0020 is the ending address of data. communication setup value in WS041. When Step: Set the WS041 = 01121 executing this program, please put the Please put the PG_COM of MMI PORT to PGCOM point of MMI PORT in short-circuit be short-circuit with GND. to the GND. Design program (Content in D designate the starting address to store input data. Every word of storage space store only 1 byte of data.) X0001 SC074

Function

Vnnnn D Dnnnn

External data input format

Application Range

ASCII Vnnnn C Dnnnn (low byte)

Internal data receiving (HEX CODE)

n 0 or 1

(When n=0, the content in C is the ending code assigned by communication.) (When n=1, the content in C is the data length of the communication.)

20 bytes 20registers

Execution Condition Execution Result D

When input signal is OFFON, receiving data is allowed, when input signal is OFF, then reset SC074 Store input data (D~D+nnnn), After data was received, the SC074 is ON. NOTE: When the data in sequence is more the buffer setup to receive them, exceeding portion will be stored starting over from the (D0001) again. If the ending code is set for communication, when the ending code is not received, new data will be stored starting over from the beginning again.

C Unchanged

n Unchanged

9-97

Unchanged

communication, when the ending code is not received, new data will be stored starting over from the beginning again. This instruction can be used only once in user program.

Flag

9-98

F-59 TXD
Symbol

Communication Port Output


Program Example Example: If the data to be sent is in following specification: Data length:7 bits, Stop bit:1 bit, Parity: Odd, Baudrate:2400

Ending Code: CR Use the TP02 MMI PORT to perform The data to be sent are stored starting from D0001 communication and output data. The to D0010. communication parameter is as setup in the Procedure: MMI port communication standard (WS041). Set WS041 = 00013 Please short-circuit the PG-COM point of Please connect the PG_COM point of MMI MMI PORT to the GND. port to short-circuit with GND. Program Design: (D is the starting address of data to output. Only low byte of data in each word of register is sent.)

Function

Vnnnn D Dnnnn WCnnnn Application Range

The data to be sent (in HEX CODE) is as follows:

Vnnnn C Dnnnn (low byte) 0 or 1 n Data frame to be sent:

6 bytes

(When n = 0, the content in C is the ending code of communication instruction.) (When n = 1, the content in C is the data length of communication.)

S T X 1 2 3 4 C R

Execution Condition

Input Signal change from OFFON. When input signal is OFF, then reset SC075

D Execution Result

Unchanged, After data was received the SC075 is ON.

C Unchanged

NOTE: When the input signal change from OFF ON, this function will be executed for once. If part of the data previously setup is not completely, this instruction will not be executed. If the ending code is not set (n=0), maximum length of data to be sent would be 256 bytes. This instruction can be used for only once in user program.

n Unchanged

Flag

Unchanged

9-99

F-60 TSET

F-61 TRST

Current Time Comparison (Set Relay ON/OFF)


Program Example

Symbol

Instructions

Compare n1, n1 to the time of perpetual calendar. When they are equal, SET RESET the relay designated by D.

Function

When the time of real time clock is equal to 11:30, C0001 would be set to ON. (If there is no any other instruction to reset C0001, its status would be kept ON.

D Application Range

Yxxxx Cxxxx

Instructions

n1 00~23 (Hour)

n2 00~59 (Minute) When the time of real time clock is equal to 12:00, C0001 would be set to OFF. Execution Condition Input Signal ON NOTE: The designated Relay is still susceptible to other OUT or operation instructions.

Execution Result

If n1=content in V1020 and n2=content in V1019, set D to ON. D If n1=content in V1020 and n2=content in V1019, set D to OFF. Flag

Unchanged

9-100

F-62 ACSII

F-63 HEX

ASCII Code Conversion HEX Code Conversion of DATA


Program Example

Symbol

Instructions

Convert HEX (0~F) data to ASCII code. Convert ASCII code to HEX (0~F) data Data not within the legal range of conversion Before Execution 0(H30)~9(H39), A(H41)~F(H46) will not be converted.

Function

Vnnnn D Dnnnn

After Execution low byte

Application Range

Vnnnn S Dnnnn WCnnn

NOT: High byte dont care. low byte (b0~`b7)

Instructions Vnnnn Dnnnn n nnnn constant(1~256) Before Execution Input Signal ON low byte

Execution Condition Execution Result

Convert n WORDS of data starting from S to After Execution ASCII code and store them into D~D+n. Convert n WORDS of data starting from S to HEX code and store them into D~D+n.

NOTE: High byte dont care.

Flag

Unchanged

9-101

F-64 RTD

F-65 TMC

RTD Value Conversion TMC Value Conversion


Program Example

Symbol

Instructions

Function

Convert RTD value to (n=0)/ (n=1). Convert TMC value to (n=0)/ (n=1).

Before Execution

Vnnnn D Dnnnn

After Execution low byte

Application Range

S V0961V0968 Instructions

(when n=0,convert the value to ) n 0 or 1 (when n=1,convert the value to ) Before Execution Execution Condition

Input Signal ON After Execution

Execution Result

Convert the RTD data from S to/ and store it into D. Convert the TMC data from S to / and store it into D.

Flag

Unchanged

9-102

Chapter 10 System Design


10-1 Procedure of System Design
The procedure of designing system is similar to designing traditional control panel. Please refer to following example of TP02 system design : Star

System design

Select appropriate base module and expansion module

Operation flowchart planning

Address arrangement

Reconfirming operation Of individual device

Program design

Wiring input/output Machine to TP02

Input program

Troubleshooting

Program modification

NG Trial run OK Program storage


Stored in diskette, hard disk, or ROM

Operation

10-1

10-2 Precautions of System Design


The principle of PLC is different from traditional relay panel control circuit. PLC use periodical cycling control (serial) while relay panel apply parallel control circuit. Therefore, the effect of certain abnormality would affect part of the circuit on the relay panel but may stop the entire PLC system. It is recommended to install additional protective circuit as follows to construct a secure safety system and ensure the safety of machine and personnel. Emergency stop circuit Protection circuit Operation circuit of high voltage component Besides, because PLC apply the control in periodical cycle, therefore, the response of operation must be taken into consideration.

Input port and output port indicators are installed before the emergency stop circuit to indicate the stop condition of equipment. When the TP02 enter stop condition, the output status of TP02 is determined by the setup in the special register WS023. WS023=01 All output OFF WS023=00 All output remain at the same status before stopping machine Emergency stop circuit 1)TP02-40MR(T)/TP02-60MR(T) Connect emergency stop circuit to the Halt-output terminal. (relay output 250 VAC / 30 VDC 1A) 2)TP02-20MR(T)/TP02-28MR(T) Connect a contact point that is always OFF to the emergency stop circuit. Set the special register WS023=01.
MS2 MS1

Inter-lock circuit Connect to external inter-lock circuit to prevent reverse operation causing damage to machine or personnel injury.

10-2

10-3 Configuring Relay No.


Relay No. of input relay starts from X0001. Relay No. of output relay starts from Y0001. Assigned sequentially to each input or output points. The assignment of relay number is as follows including max. system configuration. Input, output address Base module Expansion module (at Base module max. configuration) TP02-20MR(T) Input address X0001~X0012 1 Inexpansible Output address TP02-28MR(T) Y0001~Y0008 Inexpansible Inexpansible Inexpansible X0025~X0056 Y0017~Y0048 X0041~X0072 Y0025~Y0056

Input address X0001~X0016 Output address Y0001~Y0012 2

TP02-40MR(T)

Input address X0001~X0024 Output address Y0001~Y0016

TP02-60MR(T)

Input address X0001~X0036 3 Output address Y0001~Y0024

1 TP02-20MR, input address X0013~X0016 is not equipped with physical device, these could be used as auxiliary relay. 2 TP02-28MR, input address X0013~X0016 is not equipped with physical device, these could be used as auxiliary relay. 3 TP02-60MR, input address X0037~X0040 is not equipped with physical device, these could be used as auxiliary relay. Address no. assignment example

Input, output address System configuration


TP02-40MR TP02-16EYR

Base module
Input address X0001~X0024 Output address

Expansion module (1)

Expansion module (2)

Y0001~Y0016 Y0017~Y0032

Base module TP02-60MR TP02-16EDX

Expansion module (1) TP02-16EMR

Input address X0001~X0036 X0041~X0056 X0057~X0064 Output address

Base module Expansion module (2) TP02-60MR TP02-32EMR

Expansion module (1) TP02-16EMR

Y0001~Y0024

Y0025~Y0032

Input address X0001~X0036 X0041~X0056 X0057~X0064 Output address

Base module Expansion module (2) TP02-60MR TP02-32EMR

Expansion module (1) TP02-32EMR

Y0001~Y0024 Y0025~Y0040 Y0041~Y0048

Input address X0001~X0036 X0041~X0056 X0057~X0072 Output address

Base module Expansion module (2)

Expansion module (1)

Y0001~Y0024 Y0025~Y0040 Y0041~Y0056

10-3

Chapter 11 ROM Operation


11-1 Regarding ROM Operation
ROM operation can be used on TP02 series (All model in TP02 series has built-in flash memory. TP02-40MR(T)/TP02-60MR(T) also provide ROM socket as another operation option.) ROM (EPROM, EEPROM) can be used to store user program and system memory. TP02 will be able to execute user program after these data is transferred from ROM to RAM. Data stored in ROM will not disappear even if power is turned to OFF so that the user program is preserved. Applying ROM operation can be very convenient when it is necessary to modify program without using auxiliary device (like PU12). (For example, when the machine is installed on remote site without the presence of maintenance personnel, it is possible to modify user program simply by replacing ROM.

[1] Various kinds of ROM


There are various kinds of ROM as listed in following table: (ROM shall be prepared by user.)
ROM type EPROM Specification 27C512 Access time: 200ns max. Package: DIP 28pin 28C256 max. Access time: 200ns NM27C512Q-20 (by National) M27C512-29F1 (by SGS) AT28C256-20 (by ATMEL) HN58C256P-20 (by HITACHI)

EEPROM

Package: DIP 28 pin (with 64 byte page write capability)

[2] Configuration of ROM operation system

A: PU12 B: TP02 C: TP02 D: TP02

Internal ROM PACK Internal ROM PACK (TP02-40MR(T)/TP02-60MR(T) only) Flash memory (TP02 series all model built in) Internally used RAM

[3]Content stored in ROM


User program System memory WS001~WS128
11-1

Constant register
WC001~WC912

File 1~File 130 ROM ID CODE PASSWORD

11-2

[4] ROM RAM transfer / RAM ROM transfer


1. ROMRAM
ROM data storage space TP02-ROM PACK PU12 ROM PACK TP02 build-in flash memory ROM RAM transfer rule Power ON Instructed by PU12 (AUX4) Execute Execute Not execute Execute Execute Instruction not provided RAM ROM transfer rule STOP RUN Instructed by PU12 (AUX3) Not execute Execute Not execute Execute Execute Instruction not provided

2. RAMROM
ROM data storage space TP02-ROM PACK PU12 ROM PACK TP02 build-in flash memory

NOTE : 1. At power ON, flash memoryRAM transfer will be executed. If the TP02 ROM PACK also exist, then ROM PACKRAM operation will be executed. (The priority of ROM PACK > flash memory) 2. Execution of ROMRAM transfer will be performed after checksum verification. 3. When TP02 changes to RUN MODE will automatically execute RAM flash memory transfer.

11-2 Use of RTC (perpetual calendar) function


Memory Content (initial value) Address V1018 Minute V1019 Minute V1020 Hour RTCs time and date V1021 Day (to be set) V1022 Week V1023 Month V1024 year SC018 Stop/start control bit SC019 30 second calibration control bit SC020 Write lock/release control bit function With decimal code/digit display (TP02-40MR/60/MR) (this function disabled as battery removed) V1022: represent from Sunday to Saturday by 00-06 respectively When SC018 on, RTCs function is stopped When SC019 on, time running can be adjusted. During adjustment, the second reading is returned to 00 when it falls between 00-29, and is advanced to 00 with 1 minute carry to the minute reading when it falls between 10-59. When SC020 on, the values at V1018 to V1024 written onto by the program will be updated.

11-3

Chapter 12 The Use of High Speed Counter


12-1 High Speed Counter
TP02, X1, X2, X3 and X4, these four input points can be used as A. High Speed Counter and B. Interrupt Input. High speed counter operate in six different operation mode. Interrupt input operate in four different operation mode. Various operation mode provide flexible application options. A.HSC MODE
Mode1 WS059 WS060 Counter No. Current Value Comparison Value Enable Relay Reset Relay LABLE UP(A) DN(B) CLR(Z) MK 1 X Mode 2 2 X Mode 3 3 X HSC3 HSC1 HSC2 HSC3 Mode 4 4 X HSC4 HSC1 HSC2 Mode Mode 5 6 5 6 NOTE1 NOTE2 HSC1 HSC1

HSC1 HSC1 HSC2

V1001 V1001 V1003 V1005 V1001 V1003 V1005 V1007 V1001 V1003 V1001 V1001 V1002 V1002 V1004 V1006 V1002 V1004 V1006 V1008 V1002 V1004 V1002 V1002 SC001 SC001 SC003 SC005 SC002 SC003 SC005 SC007 SC001 SC003 SC001 SC001 SC002 LB111 X1 X2 X3 X4 SC002 SC004 SC006 SC002 SC004 SC006 SC008 SC002 SC004 SC002 LB111 LB112 LB113 LB111 LB112 LB113 LB114 LB111 LB112 LB111 X1 X3 X4 X1 X2 X3 X4 X1 X3 X1 X2 X2 X4 SC002 LB111 X1 X2

X: dont care NOTE 1: X0002~X0004 can be selected to be used as normal input points or interrupt point. WS060=1, X1=HSC1, X2, X3, X4 normal input points WS060=2, X1=HSC1, X2=INT2, X3, X4 normal input points WS060=3, X1=HSC1, X2=INT2, X3=INT3, X4 normal input points WS060=4, X1=HSC1, X2=INT2, X3=INT3, X4=INT4 NOTE 2:X0003~X0004 can be selected to be used as normal input points or interrupt point. WS060=1, X1=HSC1, X2, X3, X4 normal input points WS060=2, X1=HSC1, X2=INT2, X3, X4 normal input points WS060=3, X1=HSC1, X2=INT2, X3=INT3, X4 normal input points WS060=4, X1=HSC1, X2=INT2, X3=INT3, X4=INT4 NOTE 3: Contact points providing UP/DN are A/B phase signal input point. The others are single-phase Up counter. NOTE 4: If WS058 = 0, current value will be the data before power off. If WS058 = 1, current will be reset to 0 at power on. NOTE 5: When the reset relay is used to reset current value, it is performed only once in a SCAN CYCLE. When the CLR(Z) is used to reset current value, it is performed immediately when external signal change from OFF ON. NOTE 6: When interrupt input (X0001~`X0004) change from OFF ON, system will perform and execute LABLE subprogram. B.INT MODE
WS059=0 Mode1 Mode 2 WS060= 1 2 Interrupt No. INT1 INT1 INT2 Mode 3 3 INT1 INT2
12-1

INT3

Mode 4 4 INT1 INT2

INT3

INT4

Interrupt Input point LABEL

X1 LB111

X1 LB111

X2 LB112

X1 LB111

X2 LB112

X3 LB113

X1 LB111

X2 LB112

X3 LB113

X3 LB112

12-2

12-2 1

High Speed Counter Mode 1 (A/B/Z phase input signal x set)

Mode 1 operate for one dual-phase 90 degrees phase-shift input signal. There are one counter available. Maximum input frequency is 10kHz, counting range 0~65535 (16 bit BIN counter). Please set the system memory WS059 to 00001 to select mode 1. Input phase-A from input terminal (X0002), input phase-B from input terminal (X0001), input phase -Z from input terminal (X0003), input MK (origin position)from input terminal (X0004). Begin counting operation when the counting enable relay (SC001) is ON. When accumulated value (V1001) is equal to the comparison value (V1002), the sub-program (LB111) will be executed. Both external input and internal reset relay can activate counter reset operation. Reset activated by external signal (Z phase signal or MK signal): When MK is set to ON and Z phase signal is changed from OFF ON, hardware interrupt will activate the reset operation. Reset activated by internal relay (reset relay SC002): When the reset relay change from OFFON, current value (V1001) will be reset to 0 before the input/output process of every scan cycle.

12-3

12-3

High Speed Counter Mode 2 (A/B phase input signal 1 set + single-phase pulse counter 2 set)

Mode 2 operates for one A/B-phase input signal and two single-phase count-up pulse input signal. Maximum input frequency is 10KHz, counting range 0~65535 (16bit BIN counter). Please set the system memory WS059 to 00002 to select mode 2. Connect first group phase-A signal from input terminal (X0002), first group phase-B signal from input terminal (X0001), second group single phase signal from input terminal (X0003), third group single-phase signal from input terminal (X0004). The counter enable relay of first group counter is (SC001). The counter enable relay of second group counter is (SC003). The counter enable relay of third group counter is (SC005). When the enable relay is set to ON, corresponding counter will start counting operation. The current value register of first group counter is (V1001). The current value register of second group counter is (V1003). The current value register of third group counter is (V1005). When the counting accumulated value is equal to comparison value (V1001V1002, V1003V1004, V1005V1006), the corresponding sub-program (LB111, LB112, LB113) for that counting group will be executed. The external signal reset function is not available in mode 2 operation. The reset operation must be activated via internal relay (SC002, SC004, SC006). When the reset relay change from OFFON, the current value of counters will be cleared to 0 before the input/output process of every scan cycle.

12-4

12-4

High Speed Counter Mode 3 (Single-phase pulse counter input x 4)

Mode 3 operate for four single-phase count-up pulse signal. Maximum input frequency is 10kHz, counting range 0 ~ 65535 (16 bit BIN counter) Please set the system memory WS059 to 00003 to select mode 3. Connect four input signals to X0001 ~X0004 respectively. The counter enable relay of counter 1 is (SC001). The counter enable relay of counter 2 is (SC003). The counter enable relay of counter 3 is (SC005). The counter enable relay of counter 4 is (SC007). When the enable relay is set to ON, the corresponding counter will start counting operation. The current value register of counter 1 is (V1001). The current value register of counter 2 is (V1003). The current value register of counter 3 is (V1005). The current value register of counter 4 is (V1007). When the counting accumulated value is equal to comparison value (V1001V1002, V1003V1004, V1005V1006, V1007V1008), the corresponding sub-program (LB111, LB112, LB113, LB114) for that counting group will be executed. The external signal reset function is not available in mode 3 operation. The reset operation must be activated via internal relay (SC002, SC004, SC006, SC008). When the reset relay change from OFFON, the current value of counter will be cleared to 0 before the input/output process of every scanning cycle.

12-5

12-5

High Speed Counter Mode 4 (Single-phase pulse counter with reset input x 2)

Mode 4 operate for single-phase count-up pulse signal + external reset signal input x 2. Maximum input frequency is 10kHz, counting range 0~65535 (16bit BIN counter). Please set the system memory WS059 to 0004 to select mode 4. Connect first pulse input signal to input terminal (X0001), first reset signal to input terminal (X0002). Connect second pulse input signal to input terminal (X0003), second reset signal to input terminal (X0004). When counter 1 enable relay (SC001) or counter 2 enable relay (SC003) is set to ON, corresponding counter will be enabled and start counting. The current value register of counter 1 is (V1001). The current value register of counter 2 is (V1003). When the counter accumulated value is equal to comparison value (V1001V1002, V1003V1004), the corresponding sub-program (LB111, LB112) will be executed. When the external reset signal of mode 4 counter (X0002, X0004) change from OFF ON, it will be reset via hardware interrupt. When the internal reset relay (SC002, SC004) change from OFFON, the current value (V1001, V1003) will be cleared to 0 before input/output process in every scan cycle.

12-6

12-6

High Speed Counter Mode 5 (Single-phase pulse counter x1)

Mode 5 operate for single-phase count-up counter x 1, the other three X0002~X0004 input points could be setup as normal input points or interrupt input connection points. The maximum input frequency of counter is 10kHz, counting range 0~65535 (16bit BIN counter). Please set the system memory WS059 to 0005 to select mode 5. If it is necessary to setup interrupt points, please set the WS060 to 0002~0004. Connect the single-phase input pulse to input terminal (X0001). If the interrupt is set, external interrupt signal could be connected to X0002, X0003, X0004. The operation of single-phase counter is the same as that of High speed counter mode 3. The operation of interrupt points is the same as that of interrupt mode of mode 4. When the interrupt signal change from OFFON, enabled interrupt will jump to interrupt pointer and execute program.

12-7

12-7

High Speed Counter Mode 6 (A/B phase input signal x 1)

Mode 6 operate for A/B phase pulse signal input x 1, the other two X0003 ~X0004 input points could be setup as normal input connection points or interrupt input connection point. The maximum input frequency of counter is 10kHz, counting range 0~65535 (16bit BIN counter). Please set the system memory WS059 to 00006 to select mode 6. If it is necessary to setup interrupt point, please set WS060 to be 00003~00004. Connect the first dual-phase counting signal A to input terminal (X0002), the second B-phase signal to input terminal (X0001). If interrupt is set, use X0003 and X0004 to connect external interrupt signal. Operation of dual-phase counter is the same as that of High speed counter mode 2. Operation of interrupt points is the same as that of interrupt mode of mode 3. When the interrupt signal change from OFFON, enabled interrupt will jump to interrupt pointer and execute program.

12-8

12-8

Interrupt Point Processor Mode 1~4

The interrupt processor could be set in 4 different mode. Selected mode depends on setup in WS060 register. The connection points that is not setup to be interrupt processor will be handled as normal input connection point. Interrupt operation will be activated at OFFON rising edge of triggerring pulse for hardware processing. To avoid miss-activation of interrupt, please make certain that the input device is free from bouncing signal. If another interrupt occurs when previous interrupt has jump into corresponding LABEL and executing interrupt process, the interrupt busy condition will be detected. New interrupt signal will be rejected. (The time between two interrupt signal must be more than the time required to execute the program in between LABEL and RET instruction of interrupt program.)

12-9

Example of A/B Phase Pulse Signal Timing Chart


Count-Up Counter

Execute LB111 sub-program

Donut-Down Counter

Example of Single-phase Pulse Signal Timing Chart

12-10

12-11

Example of Connecting Encoder Circuitry High Speed Counter can be connected to be a open-collector output type encoder or voltage output type encoder. High Speed Counter can not be connected to be a differential output type encoder. [Example 1] open-collector type encoder

[Example 2]

Voltage -Output type encoder (sink)

[Example 3]

Voltage Output type encoder (source)

12-12

CAUTION Do not apply the connection wire of HLS too long. In case a longer distance of connection is required, please apply a relay to relay electric signal. Please apply isolated twisted-pair as connecting wire to improve anti-noise capability. Do not apply the connecting wire in the wiring chase together with output line of motor or control wire of other PLC. Or, apply the connecting wire parallel with other wire.

When the HLS input is using external power supply, please install the terminal seat inside control panel and keep away from I/O control wire of PLC. Please install a surge protector parallel connected to HLS connection point. (This is because the HLS is installed at the machine side and its wiring distance is longer. When it is not connected and the connection point is open, the wire will act like an antenna that is susceptible to interference of noise.)

The value of C and R could extend the response time of HLS. Please be carefully arrange the mechanical relative potion between HLS and Z -phase.

Please connect the shield of HLS signal to the FG terminal of PLC Base Set or to the grounding terminal of control panel.

12-13

CAUTION When the signal of encoder overlap with noise, the counting operation could be interfered and cause error in the current value of counter. Please carefully arrange the wiring of encoder. The power line of motor and the signal wire of encoder must not be wired within the same pipeline. Motor Encoder
Wired within the same pipeline.

Motor

Separate wiring pipeline. Encoder

Starting from the control box of machine to the encoder, the output line of motor and the signal wire of encoder must not be wired within the same pipeline. They must not be wired within the same pipeline. If the output line of motor is parallel to the signal line of encoder in the control box, please put them into separate wiring slot. Do not place the wiring of encoder to anywhere near the machine that is generating noise. Do not apply relaying terminal seat if possible. Stay away from any terminal seat that is generating noise.

Other I/O wiring Distance more than 15 cm

Encoder side Encoder signal wire

PLC Base Set side

Connect the shieding wire to the relaying terminal too. Distance less than 15 cm

Do not apply the DC power of encoder to any other component (except the HLS). Do not connect the GND of the DC power of encoder to any other power supply. Connect the shielding wire of encoder to the FG terminal of PLC base set of to the grounding terminal of the control panel.

12-14

Chapter 13 The Use of Communication Port


13-1 RS422 Communication Port
[1] The Function of Communication Port
The communication port of TP02 can be configured to performed following functions: computer link, data link, remote I/O. The function of communication port is selected by setting the value of WS043. WS043 00(H) 01(H) 02(H) Communication Mode Computer Link mode Data Link Mode Remote I/O Mode

(1) Computer Link Mode TP02 can communicate with host computer or MMI in this mode. (TP02 can accept command from host computer and response to host computer.) TP02 can still perform communication function even in STOP mode or error mode. (except for communication function error.) (2) Data Link Mode TP02 (master station) can buildup dateline communication with TP02 (slave station). (non-program communication.) Even when there is a station of TP02 slave stations is not connected or entered error state, the TP02 (master station) can still communicate with the other slave stations. (3) Remote I/O Mode TP02 (master station) can operate remote I/O communication with TP02 (slave station). If there is a station of the slave stations not connected or entered error state, the TP02 (master station) will stop operation and stop communication with all slave station.

[2] Wiring Method


The communication port of TP02 is the L1, L2, SHLD terminal on the base set. (Lower terminal side of TP20-60MR)
AC-L PE 6 1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 HL1 T/R-

Insulating Tape
(NOTE 1)

Grounding class 3 Twisted Wire (NOTE 2)

The insulated twisted pair must be used as communication wire. Recommendation: S-IREV-SB2 X 0.5 (HITACHI) (NOTE 1) The FG terminal is not connected internally with SHLD terminal. (NOTE 2) The inoculated wire is 0.5 mm2 twisted wire. Exposed under 30 mm to be connected to terminal seat.
13-1

[3] System Memory Setup


Setup the system memory as follows to use the communication port in computer link mode:
RS422 WS043 Communication Port 00000: Computer-link mode Function Selection WS044 RS422 Communication Port Specification Setup Decimal Code: 103 data length 0: 7 bit 1: 8 bit 102 stop bit 0: 1 bit 1: 1 bit 101 parity 0: none parity 1: odd 2: even 100 Baudrate 0: 19200 1: 9600 2: 4800 3: 2400 4:1200 5: 600 6: 300 7:38400

WS045 Slave-Station No.

0001~0099 (in decimal number), 0000 represent all receiving addresses. (NOTE) Communication mode and station number are [example of Computer-link sticker] #001 setup by system memory. It is recommended to put the setup onto a label and stick the label outside the case of machine for identification. When TP02 receive the command from the host computer, TP02 will execute the process required base on the command and transmit response back to the host computer. If any abnormality occurs in the process of command, TP02 will send error response back to host computer. Command (host computer TP02)

[4] Communication Format

Response (TP02 host computer)

Error response when any error status occurs.

13-2

13-3

13-2 Computer Link


[1] Communication Specification
The host computer can be connected and communicate with 99 TP02 stations at most. Host computer can be used for operation monitor, data collection, command operation, change setup, etc.

TP02 (Slave-Station001)

TP02 (Slave-Station002)

TP02 (Slave-Station099)

RS-232C
RS-232C/422 Converter (Z-101HE)

RS-422A
Max. total length: 1km 99 stations at most

Item Communication Standard Baudrate Data Format

Specification EIA RS-422A standard, start-stop synchronous system 38400, 19200, 9600, 4800, 2400, 1200, 600, 300 bit/s start bit: 1 bit data length: 7, 8 bits parity: 1 bit (odd, even, none) stop bit: 1, 2 bits ASCII Character set parity check and sum check 99 stations at most insulated twisted pair, total length 1km, 2 lines type

Using Character Error Check Connection Stations Connection Wire

[2] Wiring Method

(NOTE 1) Please connect the SHLD terminal to type 3 grounding. Noise interference could cause error if not connected. (NOTE 2) Do not connect over 3 branches on communication wires.

[3] Format Setup


13-4

(1) Identification Symbol


ASCII Character ? # % CR ASCII Code 3A (H) 3F(H) 23(H) 25(H) 0D(H) Description Begin (representing the beginning of a command or response message) representing command representing response (in normal condition) representing error response ending symbol (representing the end of a command or response message)

(2) AD(H), AD(L) : slave -station number - ASCII character 00~99 (in decimal number) In a command, the slave-station number 01~99 of TP02 is controlled by host computer. In a response, the slave-station number 01~99 of TP02 is sent back to host computer. For the writing command like SCS (set/reset of relay), WRV (writing register value), if the slave-station number is set to 00 all slave-stations will be setup at the same time. The slave-station number 00 is called broadcast address. Instructions that can be used with broadcast address are listed in command description. When the broadcast address in used in Command, Response will not be sent back to host computer. TP02 will not execute and respond to a globally addressed for the instructions that is not comply with broadcast address function available. (3) RI: Response Time ASC II Character 0~F (H) The time setup required from the execution of command from host computer to send response back to host computer. Please setup the response time conforming the process capability of host computer.
RI(H) Response Time 0 0 1 10 2 20 3 30 RI(H) Response Time RI(H) Response Time 4 40 8 80 5 50 9 90 6 60 A 100 7 70 B 200 RI(H) Response Time C 300 D 400 E 500 F 600

The actual response time in application would be the above listed setup plus the waiting time for PLC scan cycle. (Example) Monitor the relay Y0001 of slave-station 1 (scan time 10 ms, response time 40 ms)

(NOTE 1) Selecting appropriate response time might be a problem when actually designing system. There is not a ideal formula to satisfy the most appropriate response time. It could be different on various model and type of host computer. Programming method would affect the appropriate response time setup too. It is recommended to setup a longer response time and gradually reduce it to a appropriate value. (NOTE 2) There are certain limitation on the number of bytes to be processed for some instructions. The model of host computer will pose certain limit on the buffer of communication. Therefore, please be careful about the numbers of bytes to be
13-5

processed.

13-6

(4) SC(H), SC(L): Checksum code In order to increase the reliability of transmission, the parity check capability and the checksum error detection capability are both included in the data transmitted. Content of Checksum is as follows: Add up the total of data in ASCII code format starting from the slave-station number to the last byte of command or response (before the checksum). Convert the checksum code (2 digit, in hex format) into 8 bit data, add into the result of . If the total is 00(H) (not considering high byte), then transmitted data carries correct information. If the total is not 00(H), then transmitted data carries faulty information. Example) set the relay Y0001 of slave-station 2 (1:set, 0:reset) Command to be sent by host computer (response time 50ms)

Therefore, the command would be as follows:

When the command is received, PC02 will send back the response as follows:

When the host computer received the response, it will add up the ASCII code of the message starting from the slave-station number till the last byte of returning response. And then add up the checksum with the result. If the lower two bits of the sum is 00(H) (200(H)), then the content of response is free from any error.

If it is not necessary to perform checksum error detection, you can setup the SC(H), SC(L) in the command line to @(40(H)). It will keep the TP02 from verifying of checksum of communication message. While TP02 will continue to generate checksum in the response, the host computer will ignore these checksum messages.

13-7

[4] Command Description


(1)Various Type of Command Function Monitor coil status Monitor register value Read Boolean program Set coil status Write register value Write Boolean program PLC status read STOP RUN Real time clock Password function ROM operation PLC all memory clear Control Command command code MCR MRV RBP SCS WRV WBP PSR STP RUN RTC PAS ROM CLR broadcast function not available not available not available available (ID=0) available (ID=0) available (ID=0) not available available (ID=0) available (ID=0) not available not available not available available (ID=0) RUN operation no limit no limit no limit no limit no limit inhibit no limit no limit no limit no limit no limit inhibit inhibit

Write-i n

Read-o ut

(2) EC(H), EC(L): Error Code When there is any error occurs, TP02 will send back following codes indicating error response. EC(H), EC(L) Content 01 Frame error 02 RUN mode, can not write program 03 Sumcheck error 04 Range over 05 Can not read/write EEPROM 06 Password exist, can not operate NOTE: In following conditions, TP02 will not execute any process or send back any response. 1)When the slave-station number of command does not match the setup value in WS045. 2)When there is not any character like :, ?, or CR. Please check out the time-out error on the computer side of master station to handle these error situation.

13-8

MCR Function Command

monitor coil status monitor ON/OFF state of the designated relay

Response Relay number X0001-X0384 Y0001-Y0384 C0001-C2048 SC001-SC128 DATA = 0 , OFF = 1 , ON Monitor the status of the auxiliary relay C0001 of slave-station 01 (response time 50ms).

Data Application Example

Command Response

MRV Function Communication Format Command

monitor register value Read out current value of register up to 100words

Response V0001-V1024 X0001-X0368 D0001-D2048 Y0001-Y0368 WS001-WS128 C0001-C1008 WC001-WC912 F0001-F0130(file001~file130) WN(H), WN(L) : word number (00-99) 00 represent 100 words. Word 1 word n : 0123 . F023 (Hexadecimal) 01 (high byte) 23 (low byte) Monitor data register D0001/D0002 of slave-station 01 (response time 50ms)

Register number

Data

Application Example

Command Response

13-9

RBP Function Communication Format Command

Read Boolean program Read out contents of the program up to 100 steps, the content is machine language , not format of Boolean program. (STR X0001)

Response

Address number 0000 - 4000(TP02-40MR/TP02-60MR) 0000 - 1500(TP02-20MR/TP02-28MR) Data SN(H), SN(L) : step number (00-99), 00 represent 100 steps. WORD n : consist of 6 bytes : 5E1509 .20C10F 5E (high byte) 15 (low byte) 09 (external byte) Readout the program memory 0000~0002 of slave-station 01 (response time 50ms) Command Response

Application Example

SCS Function Communication Format Command

set coil status set/reset the coil relay.

Response V0001-V1024 D0001-D2048 WS001-WS128 WC001-WC912 F0001-F0130(file001~file130) WN(H), WN(L) : word number (00-99) 00 represent 100 words. Word 1 word n : 0123 . F023(Hexadecimal) 01 (hogh byte) 23 (low byte) Set the output relay of slave-station to ON (response time 50ms). Command Response

Relay number

Data

Application Example

13-10

WRV Function Communication Format Command

write register value Write input data to register up to 100 words

Response V0001-V1024 X0001-X0368 D0001-D2048 Y0001-Y0368 WS001-WS128 C0001-C1008 WC001-WC912 F0001-F0130(file001~file130) WN(H), WN(L) : word number(00-99), 00 represent 100 words. Set the data register D0001 of slave-station to 03FF. Command Response

Register number

Data Application Example

WBP
Function Communication Format Command

write Boolean program Write instruction in the program assigned from ADDR NO Up to 100 steps, the content is machine language, not format of Boolean program (STR X0001)

Response 0000-4000 SN(H), SN(L) : step number (00 - 99) 00 represent 100 steps. Word 1 word n : 0123 .. F023 01 (high byte) 23 (low byte) Write program into program memory 0000~0002 of slave-station 01.

ADDR number Data

Application Example

Command Response

13-11

PSR
Function Communication Format Command

PLC status read Read out current mode of PLC status

Response SAT : 1 2 0 STOP MODE RUN MODE ERROR MODE

Data

Application Example

Readout the operation status of slave-station 01. Command Response

STP Function Communication Format Command

PLC stop Stop PLC operation

Response set slave-station 01 to STOP MODE Command Response

Application Example

RUN Function Communication Format Command

PLC run Start PLC operation

Response set slave-station 01 to RUN MODE

Application Example

Command Response

13-12

RTC Function Communication Format Command

Real time clock operation Real time clock operation in TP02-60MR/40MR (TP02-28MR/20MR not available)

Response OP : 0RTC stop 1RTC run 230second offset correction 3write data to V1018 - V1024 will update to RTC (before write to RTC data, issue this command first )

Data

Application Example

Adjust the RTC PJOP 30 sec. of slave-station 01. Command Response

PAS Function Communication Format Command

Password operation Password operation(test/set new password)

Response Can only try error password 20 times, if over 20 times PLC will lock the system until all memory clear (when lock system, program memory can not be read) Byte 1.Byte 8 : 00000001~99999999 (Range of password input) CON = T : test with current's password (If the Byte1~Byte8 is correct, then reset the password mode) W : write new password (after test password , password must be write again to set into password mode) DATA = 0 , OK = 1, NG Input password of slave-station 01.

Data

Application Example

Command Response

13-13

ROM Function Communication Format Command

ROM operation ROM operation(RAMROM or ROM RAM)

Response OP : . Command Response 0RAM to EEPROM data transfer operation 1EEPROM to RAM data transfer operation

Data Application Example

CLR Function Communication Format Command

All memory clear Initialize all memory data (program, data memory, not include system register WSxxx)

Response Write program into program memory 0000~0002 of slave-station 01.

Application Example

Command Response

13-14

13-3 Data Link


[1] Communication Specification
In data-link mode, the TP02 master-station can be connected to and communicate with 7 TP02 slave-station at most. Master-station slave-station1 slave-station2 slave-station7

WS043=0001(decimal) WS045=0000(decimal) WS046=0007(decimal)

WS043=0001(decimal) WS045=0001(decimal)

WS043=0001(decimal) WS045=0001(decimal)

WS043=0001(decimal) WS045=0007(decimal)

The configuration of data link area for master-station and slave-station is as follows:
master-station Transmission Transmission Receive Receive Transmission Transmission Receive Receive Transmission Transmission Receive Receive Transmission Transmission Receive Receive Transmission Transmission Receive Receive Transmission Transmission Receive Receive Transmission Transmission Receive Receive slave-station 7 slave-station6 slave-station 5 slave-station 4 slave-station 3 slave-station 2 slave-station 1 C1601~C1632 V0901~V0904 C1663~C1664 V0905~V0908 C1665~C1696 V0909~V0912 C1697~C1728 V0913~V0916 C0929~C1760 V0917~V0920 C1761~C1792 V0921~V0924 C1793~C1824 V0925~V0928 C1825~C1856 V0929~V0932 C1857~C1888 V0933~V0936 C1889~C1920 V0937~V0940 C1921~C1952 V0941~V0944 C1953~C1984 V0945~V0948 C1985~C2016 V0949~V0952 C2017~C2048 V0953~V0956 slave-station 1 C1601~C1632 V0901~V0904 C1633~C1664 V0905~V0908

slave-station 2 C1601~C1632 V0901~V0904 C1633~C1664 V0905~V0908

slave-station 7 C1601~C1632 V0901~V0904 C1633~C1664 V0905~V0908

Communication Speed Transmission Speed Connected slave-stations Connected area Data length of each slave-station data-link Transmission line

Specification EIA RS-422 standard 76800 - 38400 bits/s 7 slave-stations at most master-station: C1601~1048/V940~V996 slave-station: C1601~C1664/V901~V908 master-stationslave-station: 12 bytes slave-stationmaster-station: 12 bytes insulated twisted pair, common line connection, 2 line type total length 500m(76800 bits/s), 1km(38400 bits/s)

13-15

[2] Wiring Method

(NOTE 1)

Please apply type 3 grounding to the SHLD terminal, noise interference could cause error without it. (NOTE 2) Connect the wiring branches in less than three branches.

[3] Setup System Memory


When using data-link mode, setup the system memory of master-station and slave-stations as follows: (1)System memory of master-station WS043 Communication Mode 0001: data-link mode (NOTE 1) WS044 Transmission Speed 0000:76800 bit/s, 0001:38400 bit/s WS045 Station setup 0000 WS046 Number of 0001~0007 Slave-Stations (2)System Memory of Slave -Station WS043 Communication Mode 0001(H): data-link mode (NOTE 1) WS044 Transmission Speed 0000:76800 bit/s, 0001:38400 bit/s WS045 Station setup 0001~0007 (NOTE 1) To exit from data-link communication, please set the WS043 = 0000 (computer-link mode). (NOTE 2) Please apply sequential number starting from 0001 to be the station number of slave-stations. [example of sticker] data-link (NOTE 3) The communication mode and station ID is setup #001 via the system memory. It is recommended to put these information onto a label and stick it to the exterior of machine case.

[4] Communication Flag


The communication status of master station and slave-stations could be verified by checking the communication flag. (1)Communication Flag of master-station (2)Communication Flag of slave-station
Communication Flag Content All slave-station communication normal: ON Communication Flag Content Normally communicate with master station: ON

SC105 SC106 SC107 SC108

SC105 SC106 SC107 SC108

Slave-station 1 communication normal: ON Slave-station 2 communication normal: ON Slave-station 3 communication normal: ON

Not used: OFF Not used: OFF Not used: OFF

13-16

SC109 SC110 SC111 SC112

Slave-station 4 communication normal: ON Slave-station 5 communication normal: ON Slave-station 6 communication normal: ON Slave-station 7 communication normal: ON

SC109 SC111 SC112 SC112

Not used: OFF Not used: OFF Not used: OFF Not used: OFF

13-17

[Example of Communication Flag]


Master Station Slave Station1 Slave Station2 Slave Station3

WS043=0001 WS045=0000 WS046=0003

WS043=0001 WS045=0001

WS043=0001 WS045=0002

WS043=0001 WS045=0003

1) Normal communication condition (master-station communicate with all slave-station normally) Master Station SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112 Slave Station1 SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112 Slave Station2 SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112 Slave Station3 SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

*Not used 2) Master-station error condition (Power OFF, Not connected, STOP mode, module error) Master Station
SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

Slave Station1
SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

Slave Station2
SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

Slave Station3
SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

*Not used 3) Slave-station 1 error condition (Power OFF, Not connected, STOP mode, module error) Master Station
SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

Slave Station1
SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

Slave Station2
SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

Slave Station3
SC105 SC106 SC107 SC108 SC109 SC110 SC111 SC112

*Not used (NOTE) When error occurs on slave-station 1 (power-off, not connected, STOP mode, module error), the master station will keep on communication with other slave-stations. When the slave-station resume its operation, master station will build up the communication with slave-station 1 again.
13-18

[5] Communication Timing Sequence and The Time Required for


Transmission
(1) The communication timing sequence of master-station The communication for master-station and slave-stations is not synchronous with the scanning cycle of master-station. The master station will perform the linked data exchange and update the communication flag at the scan cycle after the communication completed. This process will increase the scan time of master-station for about 0.2 ms.

If there is any error on the communication between master-station and slave-station, master-station will not exchange data via data-link with the faulty slave-station. The communication flag of the faulty slave-station is set to OFF. The master-station will continue communication normally with the other slave-stations. Possible cause of error includes: Sumcheck error Slave-station in STOP mode or ERROR mode. Slave-station not connected or connection broken. When the master-station is in STOP mode or ERROR mode, it will not communicate with any slave-station. (2) The communication timing sequence of slave -station The communication of slave-station with master-station is not synchronous with the scan cycle of slave-station. The slave-station perform the linked data exchange and update the communication flag in the scan cycle after the communication completed. This process would increase the scan time of slave-station for about 0.2ms.

When an error occurs in the communication between slave-station and master-station, the slave-station will stop the data-exchange of linked data and set the communication flag to OFF. Possible cause of error includes: Sumcheck error Slave-station in STOP mode or ERROR mode.
13-19

Master-station in STOP mode or ERROR mode. Slave-station not connected or connection broken.

13-20

(3) The time required to complete transmission In data-link mode, the time T required for the master-station to complete communication with all slave-station can be devised as follows (not spend the SCAN TIME of master-station) :
Number of Slave-Station 1 2 3 4 5 6 7 5.0ms 10.0ms 15.0ms 20.0ms 25.0ms 30.0ms 35.0ms 78600 bit/s (WS044=0000) 10.0ms 20.0ms 30.0ms 40.0ms 50.0ms 60.0ms 70.0ms 38400 bit/s (WS044=0001)

5.0 Number of Slave-Station [ms]

10.0 Number of Slave-Station [ms]

(4) Communication Delay Time When receiving data in data-link mode, the delay of data transmission would be as follows: a) Master-station Slave-station communication

T1 T2 T3 T4

delay of input port the time required for PLC to detect the input status (max. 1 SCAN TIME) operation time on the transmission side PLC (master-station) (1 SCAN TIME) the time required to complete the transmission of operation result (max. [1 communication scan time + 1 SCAN TIME]) T 5 : the time required for the receiving side (slave-station) to write received data into PLC data memory. (max. 1 SCAN TIME) T 6 : operation time on the receiving side. (slave-station) (1 SCAN TIME) T 7 : output port delay Delay Time = T1 + T2 + T3 + T4 + T5 + T6 + T7

: : : :

13-21

b) Slave-station Slave-station (Slave-stationMaster-stationSlave-station) communication

T1 : T2 : T3 : T4 : T5 : T6 : T7 : T8 : T9 : T 10 :

Input delay the time required for PLC to detect the input status (max. 1 SACN TIME) operation time on the slave-station 01 (1 SCAN TIME) the time required for slave-station 01 to complete the transmission of operation result (max. [1 communication scan time + 1 SCAN TIME]) the required for master-station to write received data into PLC data memory (max. 1 SCAN TIME) operation time on the master-station (1 SCAN TIME) the time required for master-station to complete the transmission of operation result (max. [1 communication scan time + 1 SCAN TIME]) the time required for the slave-station 2 to write received data into PLC data memory (max. 1 SCAN TIME) operation time on the slave-station 02 (1 SCAN TIME) output port delay

Delay Time = T1 + T2 + T3 + T4 + T5 + T6 + T7 + T8 + T9 + T10

13-22

13-4 Remote I/O


[1] Communication Specification
In remote I/O mode, the TP02 (master station) could be connected to communicate with 4 TP02 (slave-station) at most.
master-station slave-station1 slave-station4 slave-station2 slave-station3

WS043=0002 WS045=0000 WS046=0004

WS043=0002 WS045=0001

WS043=0002 WS045=0002

WS043=0002 WS043=0003

WS043=0002 WS045=0004

(NOTE) Only TP02 Base Set can be used as remote slave-station. The TP02 Expansion Set can not be used as remote slave-station. The configuration for the remote I/O area on the master-station is as follows:
Master-Station Slave-St Input X201~X236 ation1 Output Y201~Y224 Slave-St Input X241~X276 ation2 Output Y241~Y264 Slave-St Input X281~X316 ation3 Output Y281~Y304 Slave-St Input X321~X356 ation4 Output Y321~Y344 Slave-Station1 X001~X036 Y001~Y024 Slave-Station2 X001~X036 Y001~Y024 Slave-Station3 X001~X036 Y001~Y024 Slave-Station4 X001~X036 Y001~Y024

Specification Communicatio EIA RS422 Standard n Standard Baud Rate 76800, 38400 bits/s Connected 4 slave at most Slave-Stations Remote I/O Slave-Station 1 Input: 36 points (X201~X236) Output: 24 points (Y201~Y224) Area Slave-Station 2 Input: 36 points (X241~X276) Output: 24 points (Y241~Y264) (Configured on Slave-Station 3 Input: 36 points (X281~X316) Output: 24 points (Y281~Y304) Master-Station Slave-Station 4 Input: 36 points (X321~X356) Output: 24 points (Y321~Y344) ) Transmission Insulated twisted pair, common line connection, 2-line type Line total length 500m (76800 bits/s) or 1km (38400 bits/s)

13-23

[2] Wiring Method

calss

(NOTE 1)

Please apply class 3 grounding to the SHLD terminal, noise interference could cause error without it. (NOTE 2) Connect the wiring branches in less than three branches.

[3] Setup System Memory


When using remote I/O-link mode, setup the system memory of master-station and slave-stations as follows: (1)System memory of master-station WS043 Communication Mode 02: Remote I/O mode (NOTE1) WS044 Transmission Speed 00: 76800 bit/s, 01: 38400 bit/s WS045 Station setup 001~004 WS046 Number of 000 Slave-Stations (2)System Memory of Slave -Station WS043 Communication Mode 02: Remote I/O (NOTE 2) WS044 Transmission Speed 00: 76800 bits/s, 01: 38400 bits /s WS045 Station setup 001~004 Output Status at 0001: Set all output of slave-station to OFF WS023 0000: All output of slave station remain at the status before Slave-Station Error
error.

(NOTE 1) To exit from remote I/O-link communication, please set the WS043 = 0000 (computer-link mode). (NOTE 2) Please apply sequential number starting from 0001 to be the station number of slave-stations. [example of sticker] (NOTE 3) The communication mode and station ID is setup via the system memory. It is recommended to put these information onto a label and stick it to the exterior of machine case.

Remote I/O #001

[4] Communication Flag


The communication status of master station and slave-stations could be verified by checking the communication flag.
Communication Flag Content All slave-station communication normal: ON Slave-station 1 communication normal: ON

SC105 SC106

13-24

SC107 SC108 SC109

Slave-station 2 communication normal: ON Slave-station 3 communication normal: ON Slave-station 4 communication normal: ON

13-25

[Example of Communication Flag]


Master Station Slave Station1 Slave Station2 Slave Station3

WS043=0002 WS045=0000 WS046=0003

WS043=0002 WS045=0001

WS043=0002 WS045=0002

WS043=0002 WS045=0003

1) Normal communication condition (master-station communicate with all slave-station normally)


Master Station

SC105 SC106 SC107 SC108 SC109

ON ON ON ON OFF*

*Not used

2) Master-station error condition (Power OFF, Not connected, STOP mode, module error)
Master Station

SC105 SC106 SC107 SC108 SC109

OFF OFF OFF OFF OFF*

*Not used

3) Slave-station 1 error condition (Power OFF, Not connected, module error)


Master Station

SC105 SC106 SC107 SC108 SC109

OFF OFF ON ON OFF*

*Not used

(NOTE) When the slave-station 1 error occurs (power off, not connected, module error), the master-station will stop operation immediately and stop communication with all slave-station. When the slave-station 1 recovered from the error, the master station will resume the operation and resume communication with all slave-station.

13-26

[5] Operation status of remote I/O slave-station


The status of remote I/O under normal/error conditions is as listed in following table:
Master-s Halt tation SC023 = 01 SC023= 00 output WS050 POWER RUN ERR COMM (Setup of (Setup of (NOTE1 error (GREEN) (GREEN) (RED) (GREEN) slave-station slave-station ) code ) ) (DEC) ON ON OFF Blink
CLOSED

Indicator

Status of output port

System Status

Normal

Master-station in
operation

(monitor, modify mode) Master-station in STOP mode (program mode) Master-station error

(ON)

ON

OFF

ON

OFF

OFF

Retained

OPEN (OFF)

ON

OFF

ON

OFF

OFF

Retained

Codes OPEN other (OFF) than 07, 08

Slave-station not connected Error Slave-station error (NOTE 2) (except battery error) Slave-station battery error

ON

OFF

ON

OFF

OFF

Retained

OPEN (OFF)

07

ON

OFF

ON

OFF

OFF

Retained

OPEN (OFF)

07

ON

ON

ON

Blink

CLOSED

(ON)

Slave-station power off

OFF

OFF

OFF

OFF

OFF

OFF

OPEN (OFF)

07

(NOTE 1) TP02-20MR/TP02-28MR is not equipped with halt output terminal. (NOTE 2) Status caused by CPU error and input/output error is different from the status listed in above table. (NOTE 3) When an error occurs on the slave-station, the error code is stored into the system memory of slave-station at WS050~WS057 after switched on the power of slave-station. The error code of slave-station is the same as master-station. Please refer to 8-3 Self-Diagnose. CAUTION When the system memory of TP02 is set as WS043 = 0002(D) and WS0450000, the TP02 would become a remote I/O slave-station. A remote I/O slave-station can only operate for updating I/O status and setup the system memory. Please do not apply the halt output terminal of slave-station. Please modify the WS043 to 0000 in case of change remote I/O slave mode into normal operation mode, slave remote I/O can not accept RUN(AUX1), STOP (AUX2) command from program writer (PU12).
13-27

[6] Communication timing sequence and the time required to transmission


(1) Communication timing sequence The communication of master-station to slave-station, the data exchange of remote I/O and the update of communication flag are synchronous with the scan cycle of master station. These process (1 communication period) will increase the SCAN TIME of master-station.

When an error occurs on the communication between the master station and slave-station, the remote I/O communication and PLC operation will be stopped and enter error mode. Besides, all communication flag of master-station and slave-station are set to OFF. Possible cause of error is as follows: sumcheck error slave-station in STOP mode or ERROR mode slave-station not connected or connection wire broken When the master-station is in STOP mode or ERROR mode, it will not communic ate with any slave-station.

(2) The time required for transmission In remote I/O mode, the time T (the communication period, this period will be included in the master station SCAN TIME) required for master-station to complete the communication with all slave-stations is as follows : Number of 78600bit/s 38400bit/s Slave-Station (WS044=0000) (WS044=0001)
s

1 2 3 4

3.8ms 6.4ms 9.0ms 11.6ms

1.2 + 2.6 x number of slave-stations [ms]

7.6ms 12.8ms 18.0ms 23.2ms

2.4 + 5.2 x number of slave-stations [ms]

13-28

(3) Communication delay time When the remote I/O is receiving data, following delay will happen:

T1 : Input port delay (OFFON response time) T2 : Master-station data memory write time (max. 1 scan time) T3 : Operation time (max. 1 scan time) T4 : The time required to output the operation result to output port, (max. 1 scan time) T5 : Output port delay (OFFON response time)

13-29

Chapter 14 The Use of MMI Port


14-1 MMI Port
There are two different mode of operation for MMI port of TP02. That is the PG mode and the computer link mode. It is required to setup the MMI port to computer link mode to use Function F-58 RXD and F-59 TXD. MMI port selection is determined by voltage level on the PG/COM of MMI port.
PG/COM signal High (open) Low (close) Mode PG mode Computer link mode MMI port Pin no. 1 2 3 4 5 6 7 8 9 Signal nomenclature 5V(Vcc) RX TX PG/COM GND 5V(Vcc) /RX /TX GND

(1) PG mode Connecting auxiliary device like PU12, to perform program write operation and monitor of TP02. The proprietary connection cable (TP-202MC) must be used to connect the auxiliary device to MMI port.
Computer Program writer TP02 TP-232PG Converter

TP02

TP-202MC

TP-202MC Editor software PC12

PU12

(2) Computer link mode TP02 can be connected to host computer or LCD touch screen MMI (Use computer link protocol).(TP02 can receive and respond command from computer.) TP02 can perform communication function even in STOP mode or ERROR mode. (unless the communication function failed itself.) The computer link function of MMI port is the same as the computer link function of communication port. Both of them can be connected to 99 TP02 slave station. Functions of MMI port can be used together with RS422 port functions (computer link, data link, remote I/O) of communication at the same time. The MMI port is required to be in computer link mode for TP02 to execute F58-RXD and F59-TXD function.
Host computer Converter LCD touch screen (Easy build-in protocol by MMI supplier) TP02

TP02

RS-232C/422Converter

14-1

14-2

(3)Connection of auxiliary device The connection cable (TP02-202MC) of PG must be used to connect auxiliary device to the MMI port of the TP02 basic module. Program writer (PU12 )

(TP-202MC) PU12 TP02 Basic module

Edit software (PC12)

IBM-PC
Win95 operating system

TP-232PG
Converter

(TP-202MC)

TP02 Basic module PC12

Procedures of connecting PG connection cable (TP-202MC) to TP02 Open the MMI port cover on the basic module. Connect the 9 pin connector of the TP-202MC to the MMI port on basic module. Apply the screws on connector to mount it on the TP02 MMI port. Communication specification of PG mode ITEM Specification Communication EIA RS-422A specification Transmission 19200 bit/s speed

MMI port

MMI port cover

Connector mounting screw

PG connection cable (TP-202MC)

14-3

(4) Specification of PG connection cable (TP-202MC) 1) Exterior diagram

D-SUB 9 pin Connector Female

D-SUB 9 pin Connector Male


Connector mounting screw

TO auxiliarty device

TP-02 side To MMI port

2m

2) Connection diagram PU12 OP02 On the RS422 side D-SUP 9 Pin (Male) Signal Pin nomenclature assignment RX 2 /RX 7 TX 3 /TX 8 GND 5 GND 1 5V 9 5V 6 GND 4 (Pin 4 is not connected) On the auxiliary side link Copper mesh Chasis

TP02 On the MMI port side D-SUP 9 Pin (Male) Signal Pin nomenclature assignment RX 2 /RX 7 TX 3 /TX 8 GND 5 5V 1 GND 9 5V 6 PG/COM 4 (Pin 4 is not connected in PG mode) (Pin4 connect to Pin5 in computer Chasis mode) Insulation wire (AWG28) PANTONE LOOL GRAY 2C

14-4

14-2 Computer Link Mode


[1] Communication Specification
TP02 can be connected to 1 host computer or 1 LCD touch screen.
Host computer Converter LCD touch screen (Under development)

TP02
RS-232C/422 Converter (z-101he)

TP02

RS-422A Max. 1km

RS-422A Max. 1km

Item Communication specification Transmission speed Data format

Specification EIA RS422, start-stop Synchronous system 38400, 19200, 9600, 4800, 2400, 1200, 600, 300 bit /s Start bit: 1 bit Data length: 7 or 8 bits Parity: 1 bit (Odd, Even, or None) Stop bit: 1 bit ASSCII code Parity check and checksum 99 stations Insulated twisted pair, with total length 1 km, 4 wire type. TP02 MMI port
Pin assignment Signal nomenclature

Character Error check No. of TP02 Transmission line

[2] Wiring
(1) When using RS-232C/422 converter
1 2 7 3 8 4 5 6 9
Pin assignment

5V(Vcc) RX /RX TX /TX PG/COM GND 5V(Vcc) GND


Signal nomenclature

14-5

1 2 3 4 5 6 7 8 9

RD TD GND

[3] Setting of System Memory


Following system memory should be setup as listed to use computer link mode.
WS041 MMI port communication 103 102 Data length Stop bit 0: 7 bit 0: 1 bit 1: 8 bit 1: 2 bit specification 101 Parity 0: none 1: Odd 2: Even setup For example: 100 To set up: Transmission speed parity odd 0: 19200 data length : 8 bit 1: 9600 stop bit: 1 bit 2: 4800 Transmission speed 3: 2400 9600 4: 1200 Please setup the WS041 5: 600 decimal code to be 6: 300 01011. 7: 38400 W hen the communication address is set to 00, slave-stations can only receive data they will not respond these informations.

WS042

MMI port station No. setup 01~99 00 broadcast

[4] Communication Content


Same as the communication port when using (RS422 T/R+, T/R-) communication port. Please refer to the instruction description on chapter 9.

14-6

Chapter 15 Analog Input / Output module


15-1 Outline
TP02-4AD , TP02-4AD+ , TP02-4RD, TP02-4TM ,TP02-2DA&TP02-2DA+ are Special expansion unit of TP02 series. [TP02-4AD] Analog input unit 4ch 12bit Voltage or Current Accessories : Instruction manual, Expansion Cable (4cm) [TP02-4AD+] Analog input unit 4ch up to 2 module expandable 12bit Voltage or Current Accessories : Instruction manual, Expansion Cable (4cm) [TP02-4RD] Analog input unit 4ch 12bit Voltage Accessories : Instruction manual, Expansion Cable (4cm) [TP02-4TM] Analog input unit 4ch 12bit Voltage Accessories : Instruction manual, Expansion Cable (4cm) [TP02-2DA] Analog output unit 2ch 12bit Voltage or Current Accessories: Instruction manual, expansion cable (4cm) [TP02-2DA+] Analog output unit 2ch 12bit Voltage and Current and 2ch Voltage Accessories: Instruction manual, expansion cable (4cm) System configuration Basic unit of TP02 (40MR/MT, 60MR/MT) can connect the special expansion unit (TP02-4AD , 4AD + , 4RD, 4TM, 2DA, 2DA+) as below. Special expansion unit is connected as each one unit. (4AD 1, or 4AD +1, or 4RD1, or 4TM1 and 2DA1,or 2DA+1) Max basic system is 2 digital expansion units TP02-4AD(or 4AD +, 4RD, 4TM) 1 + TP02-2DA(or 2DA+, 4AD +, 4RD, 4TM) 1. Basic unit + TP02-4AD, or 4AD+ , or4RD, or 4TM Loop back connector Basic unit + TP02-2DA,or 2DA+

Basic unit + Module 1: TP02-4AD(or 4AD+, 4RD, 4TM) + Module 2: TP02-2DA(or 2DA+, 4AD+, 4RD, 4TM)

15-1

[Maximum basic system]


Basic unit (60MR) TP02-32EMR, TP02-4AD(4AD+ ,4RD,4TM) ,TP02-2DA(2DA+) TP02-4AD+ ,4RD,4TM

15-2

15-2 General Specifications for TP02-4AD(4AD +,4RD,4TM), TP02-2DA(2DA+)


Items Storage temperature Ambient temperature Ambient humidity Vibration resistance Shock resistance External lines External wire grounding system Installation Size (WHD) Weight Grounding Accessories Applicable standard [1] [TP02-4AD appearance] TP02-4AD/4AD +/4RD/4TM TP02-2DA/2DA+ -25~70 0~55 5~90 % RH (non-condensing) IEC 68-2-6 or equivalent 0.15mm(10 to 58H) 1G (58 to 150Hz) (2hours in each X,Y and Z axis) IEC 68-2-27 or equivalent 15G(3 times in each X,Y and Z axis) Terminal block connection system (M37mm self-lockup screw) Connect to terminal block (M37mm self lockup) Applied with crimp-style terminal Direct installation or using DIN rail (34mm rail width) 64mm90mm76mm Approx. 195 g Approx. 180 g Class-3 Grounding Instruction manual1, Expansion cable (4cm)1 Non [TP02-2DA appearance]

15-3

[TP02-4AD + appearance]

[TP02-2DA + appearance]

[TP02-4RD appearance]

[TP02-4TM appearance]

[2] Outline dimension drawings (TP02-4AD,4AD +,4RD,4TM,2DA,2DA + in common)

15-4

[3] Wiring (1) Separate signal lines and power line of the module from high voltage lines and power lines as far as possible. Do not run signal lines and power lines in parallel with high voltage or power lines. (2) M3 terminal screws are applied for either of terminal screws. Use crimp-style terminals equiva lent to JIS standard 1.25-3, and securely fix with tightening torque 4to 8kgf-cm. (3) Use the shielded twisted pair when wiring to the each terminal. (1) TP02-4AD,4AD +
CH1

terminal
CH2 V2 C2 I2 CH3 V3 C3 I3 CH4 V4 C4 I4 V1 C1 I1

Content
Voltage input terminal for inputting voltage signal at VC section Common grounded point Current input terminal for inputting current signal at IC section with short circuit to V and I terminals

24V V1 C1 V2 C2 0V I1 SHLD I2 SHLD V3 C3 V4 C4 I3 SHLD I4 SHLD

SHLD

SHLD

SHLD

SHLD Please connect shielded terminal (as an integral part inside shield) to the FG of external case

24V 0V

24VCD power supply input terminal of positive polarity 24VDC power supply input terminal of negative polarity

15-5

(2) TP02-4RD 24V A1 B1 A2 B2 b2 0V b1 A3 B3 A4 B4 b3 b4 terminal


CH1 A1 B1 b1 CH2 A2 B2 b2 24V 0V CH3 A3 B3 b3 CH4 A4 B4 b4 Thermal terminal A Thermal terminal B Thermal terminal b 24VCD power supply input terminal of positive polarity 24VDC power supply input terminal of sensor (Pt100) signal input sensor (Pt100) signal input

Content
sensor (Pt100) signal in put

15-6

(3) TP02-4TM 24V TC1- TC1+ TC2- TC2+ 0V TC3- TC3+ TC3- TC3+ b3 b4 terminal
CH1 TC1+ TC1 CH2 TC2+ TC2 CH3 TC3+ TC3 CH4 input termal TC4 - Thermal sensor (J,K-type) minus signal input termal 24V 0V 24VCD power supply input terminal of positiv e polarity 24VDC power supply input terminal of negative polarity

Content

TC4+ Thermal sensor (J,K-type) postive signal

Notes h Keep the wire from the shield as short as possible (30mm or less). h Connect shield line to SHLD terminal and Flame ground (FG) using twisted wire of apx. 1.25mm2 via SHLD terminal. h Use this module dedicated constant-voltage supply or 24VDC power supply of basic module for the 24VDC input power supply.
15-7

h Short the I terminal and V terminal for current input.

15-8

(4)TP02-2DA
V1 C1 I1

terminal CH1 CH2 V2 C2 I2 SHLD 24V 0V section Common grounded point

Content

24V V1 C1 V2 C2 0V I1 SHLD I2 SHLD

Voltage output terminal for outputting voltage signal at VC

Current output terminal for outputting current signal at IC section with short circuit to V and I terminals Please connect shielded terminal (as an integral part inside shield) to the FG of external case 24VCD power supply input terminal of positive polarity 24VDC power supply input terminal of negative polarity

SHLD

15-9

(5)TP02-2DA +
V1

terminal CH1 CH2 V2 C2/C4 V2 section C1/C3 V1 Common grounded point

Content

Voltage output terminal for outputting voltage signal at VC

24V V1 C1 V2 C2 0V I1 SHLD I2 SHLD

Voltage output terminal for outputting voltage signal at VC section(-10V +10V)(V1,V2 and V1 ,V2 cant use simultaneous)

V1 C3 V2 C4 SHLD SHLD

I1 SHLD

I2 SHLD 24V 0V

Current output terminal for outputting current signal at IC section with short circuit to V and I terminals Please connect shielded terminal (as an integral part inside shield) to the FG of external case 24VCD power supply input terminal of positive polarity 24VDC power supply input terminal of negative polarity

15-10

Notes h Keep the wire from the shield as short as possible (30mm or less). h Connect shield line to SHLD terminal and flame ground (FG) using twisted wire of apx. 1.25mm2 via SHLD terminal. h Use this module dedicated constant-voltage supply or 24VDC power supply of basic module for the 24VDC input power supply. h If the input impedance of the external device is high, the effect of AC induction becomes larger for voltage inputs. In this case, connect a load resistor of about 1k ohm across the input terminals of the external device. h The maximum load resistance of the current output is 500 ohm. If the sum of the input resistance of the external device and the line resistance exceeds 500 ohm, the linear accuracy of the output current deteriorates. h If the 0V terminals of external devices are connected, a circuit will form through the outputs for CH1 and CH2. If the external devices are affected as a result, either provide a commercially available isolating amplifier for one channel.

15-11

15-3. TP02-4AD/4AD+ Specification


Items Input channel Analog input range Specifications 4channel Voltage 0V~10V *Input resistance 30k or 1V~5V *Input resistance 250 Current 0mA ~ 20mA or 4mA~20mA 12bit binary value (0V~10V) 11bit binary value (1V~5V, 0mA ~ 20mA, 4mA~20mA) Voltage 0000 (0V) ~ 4000 (10V) or 0000 (1V)~2000(5V) Current 0000 (0mA) ~ 2000 (20mA) or 0000 (4mA)~2000(20mA) Voltage 2.5mV Current 10A Voltage 0.5% or less(full scale at 25) Current 1% or less(full scale at 0~55) 1 scan time / 4ch LED (5V power LED: Green) 24VDC10% (Consumption current 100mA Max) By photo coupler 10M or more with 500V DC(between output terminal and secondary
circuit )

Digital output

Resolution Overall accuracy A/D conversion speed Operation indicator External power supply Insulation system Insulation resistance Dielectric strength

500V AC for one minute (between output terminal and secondary circuit)

4AD (or 1st 4AD+) Data memory (switch=1) CH Data memory address CH1 V961 CH2 V962 CH3 V963 CH4 V964 2nd 4AD+ Data memory (switch=2) CH Data memory address CH4 V965 CH5 V966 CH6 V967 CH7 V968

15-12

15-4. TP02-4RD Specification


Items Input channel Sensor type Specifications 4 channel / 1 set RTD;=0.00385;2 or 3 wires

Temperature input range -180600(30330) (Pt100) 12bit binary value (-180600) Digital output 03504000(-180600) Resolution Overall accuracy A/D conversion speed Operation indicator External power supply Insulation system Insulation resistance Dielectric strength 12 bits 0.5% FSR (01200) 1 scan time / 4ch LED (5V power LED: Green) 24V DC(80mA) By photo coupler 10M or more with 500V DC(between output terminal and secondary
circuit )

500V AC for one minute (between output terminal and secondary circuit)

1st 4RD Data memory (switch=1) CH Data memory address CH1 V961 CH2 V962 CH3 V963 CH4 V964 2nd 4RD Data memory (switch=2) CH Data memory address CH5 V965 CH6 V966 CH7 V967 CH8 V968

15-13

15-5. TP02-4TM Specification


Items Input channel Sensor type Specifications 4 channel / 1 set Thermocouple J-type /K-type 0700 01000 12bit binary value (0700) 12bit binary value (01200) 00004000 00004000

Temperature input range J-type Digital output K-type J-type K-type J-type K-type Resolution Overall accuracy A/D conversion speed Operation indicator External power supply Insulation system Insulation resistance Dielectric strength

12 bits 0.5% FSR (01200) 1 scan time / 4ch LED (5V power LED: Green) 24V DC(80mA) By photo coupler 10M or more with 500V DC(between output terminal and secondary
circuit )

500V AC for one minute (between output terminal and secondary circuit)

1st 4TM Data memory CH Data memory address CH1 V961 CH2 V962 CH3 V963 CH4 V964 2nd 4TM Data memory CH Data memory address CH5 V965 CH6 V966 CH7 V967 CH8 V968

15-14

15-6. TP02-2DA Specification


Items Input channel Analog output range Specifications 2 channel *External resistance 500or more Voltage 0V~10V or 1V~5V *External resistance 500or less Current 0mA ~ 20mA or 4mA~20mA 12bit binary value (0V~10V) 11bit binary value (1V~5V, 0mA ~ 20mA, 4mA~20mA) Voltage 0000 (0V) ~ 4000 (10V) or 0000 (4mA)~2000(20mA) Current 0000 (0V) ~ 2000 (20mA) or 0000 (4mA)~2000(20mA) Voltage 2.5mV Current 10A Voltage 0.5% or less(full scale at 25) Current 1% or less(full scale at 0~55) 1scan time / 4ch LED (5V power LED: Green) 24VDC10% (Consumption current 200mA Max) By photo coupler 10M or more with 500V DC(between output terminal and secondary
circuit )

Digital output

Resolution Overall accuracy A/D conversion speed Operation indicator External power supply Insulation system Insulation resistance Dielectric strength

500V AC for one minute (between output terminal and secondary circuit)

Data memory CH Data memory address CH1 V985 CH2 V986

15-15

15-7. TP02-2DA+ Specification


Items Input channel Analog output range Specifications 2 channel *External resistance 500or more Voltage -10V~10V or 1V~5V *External resistance 500or less Current 0mA ~ 20mA or 4mA~20mA 12bit binary value (-10V~10V) 11bit binary value (1V~5V, 0mA ~ 20mA, 4mA~20mA) Voltage V1,V2: 0000 (0V) ~ 4000 (10V) or 0000 (1V)~2000(5V) V1,V2 : 0000 (-10V) ~ 4000 (10V) Current Resolution Overall accuracy A/D conversion speed Operation indicator External power supply Insulation system Insulation resistance Dielectric strength 0000 (0mA) ~ 2000 (20mA) or 0000 (4mA)~2000(20mA) Voltage 5mV Current 10A Voltage 0.5% or less(full scale at 25) Current 1% or less(full scale at 0~55) 1scan time / 4ch LED (5V power LED: Green) 24VDC10% (Consumption current 200mA Max) By photo coupler 10M or more with 500V DC(between output terminal and secondary
circuit )

Digital output

500V AC for one minute (between output terminal and secondary circuit)

Data memory CH Data memory address CH1 V985 CH2 V986

15-16

15-8. Setting of system memory


System memory WS061 TP02-4AD Module Operation mode Stetting 00 = A/D module no operation Initial 00 01 = 010V Voltage input mode (0-4000) 02 = 020mA Current input mode (0-2000) 03 = 420mA Current input mode 15V Voltage input mode (0-2000) st 1 TP02-4AD+ Module 00 = A/D module no operation Operation mode 01 = 010V Voltage input mode (04000) 02 = 020mA Current input mode (02000) 03 = 420mA Current input mode 15V Voltage input mode (0-2000) st 1 TP02-4RD Module 00 = 4RD module no operation Operation mode 01 = -180600 input mode (0-4000) 1st TP02-4TM Module 00 = 4TM module no operation Operation mode 01 J-type 0700 input mode (0-4000) K-type 01200 input mode (0-4000) 00 = D/A module no operation 01 = 010V Voltage output mode (0-4000) 02 = 020mA Current output mode (0-2000) 03 = 420mA Current output mode 1-5V Voltage output mode (0-2000) 00 = D/A module no operation 01 = V1,V2: 010V Voltage output mode (0-4000) V1,V2 : -1010V Voltage output mode (0-4000) Caution: (V1,V2) and (V1 ,V2 ) cant use simultaneous 02 = 020mA Current output mode (0-2000) 03 = 420mA Current output mode V1,V2: 15V Voltage output mode (0-2000) V1 ,V2 :useless 00 = Software filter no active 01~02 = Software filter mode 1~mode 2
15-17

WS062 TP02-2DA Module

00

Operation mode

TP02-2DA+ Module Operation mode

WS063 TP02-4AD Software

00

filter

WS064 2nd TP02-4AD+ Module 00 = A/D module no operation

00

Operation mode

2nd TP02-4RD Module Operation mode

01 = 010V Voltage input mode (04000) 02 = 020mA Current input mode (02000) 03 = 420mA Current input mode 15V Voltage input mode (0-2000) 00 = 4RD module no operation

01 = -180600 input mode (0-4000) 2nd TP02-4TM Module 00 = 4TM module no operation Operation mode 01 J-type 0700 input mode (0-4000) K-type 01200 input mode (0-4000) [0-10V voltage input/output mode] [1-5V voltage input/output mode]

(00)

(02)

[0-20mA Current input/output mode]

[4-20mA Current input/output mode]

(01)

[-10V~+10V voltage output mode]

(03)

Data Value
4095 215 0 214 0 213 0 212 0 211 1 210 1 29 1 28 1
15-18

27 1

26 1

25 1

24 1

23 1

22 1

21 1

20 1

4094 2048 2047 0001 0000

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

1 1 0 0 0

1 0 1 0 0

1 0 1 0 0

1 0 1 0 0

1 0 1 0 0

1 0 1 0 0

1 0 1 0 0

1 0 1 0 0

1 0 1 0 0

1 0 1 0 0

1 0 1 0 0

0 0 1 1 0

15-19

15-9 Software filter of TP02-4AD,4AD +,4RD,4TM


Mode1: (When WS063 is set to 0001) ex.Software filter means as below.
1 2 3 4 5 6 7 8 9 10 11

Data memory Refresh timing

[Example] 1 = 161, 2 = 120, 3 = 154, 4 = 160, 5 = 190, 6 = 195, 7 = 110, 8 = 121, 9 = 150, 10 = 198, 11 = 199 Refresh data = (161+154+160)/3=158filter (1,2,3,4,5) *Max data (190) & min data(120) are canceled Refresh data = (154=160=190)/3=168filter(2,3,4,5,6) *Max data(195) & min data(120) are canceled Refresh data = (154+160+190)/3=168filter(3,4,5,6,7) * Max data (195)& min data(110)are canceled M M Refresh data = (121+150+198)/3 = 156filter(7,8,9,10,11) * Max data(199) & min data (110) are canceled Mode2: (When WS063 is set to 0002) Average the 4 average values of mode 1 (++++)/5

15-20

Chapter 16 Trial Run


16-1 Check points prior to trial run
When installing and wiring are completed, check the following points, prior to supplying power to the TP02.
l l

1 Check installation condition

Is the TP02 installed on vertical surface of a control panel? Whether each module is fixed securely? Whether the wiring is correct? Whether the screws in the terminal block are not loose? Whether the cable size is correct? Are the power lines twisted? Do not input/output lines run parallel or close to high voltage or high current lines? Are output lines equipped with protection fuses? Are shielded twisted pair cables used for communication lines?

l l l

Check power lines, input/output lines, and communication lines

l l l l

l l

3 Check expansion cables and


termination connectors

l l

Is number of expansion cables (number of expansion modules) used appropriate? Is more than two TP-402EC (40 cm cable) not used? Is a termination connector installed on the end expansion module? Are cables and connectors securely installed? Whether class-3 grounding is correctly grounded? Whether the grounding is not co-grounded with a high voltage board?

Check the connection of the grounding line.

5 Check the voltage of the power


supply source.

Whether source voltage is within rated voltage(85 to 250 VAC)

6 Check the operation condition


of the halt output circuit.

Whether source voltage is within rated voltage properly with sequence in outside PC?

END

16-1

16-2 Operation method for trial run


Operate the TP02 according to the following process after precautions for operation is checked.

Check installation condition

Connect a hand-held programmer PU12 or the like.

Supply power

Check whether the POWER lamp is ON.

All initialize

Clear system memory, program memory, and data memory by all initialize functions.

Set system memory

SET the 7-3 System memory.

5 Check the wiring to I/O port

Check the input port wiring using the display of the input indication lamp or the monitoring function of the support tool. Check the output port wiring by forcing the switch set/reset of the output relay in the support tool. Write program using a hand-held programmer PU12 or the like. If a program is stored in a multipurpose programmer PC12 or the like, transfer this program onto the TP02. Confirm whether the RUN lamp is ON. Check PC motion.

Programming

Run trial operation

l l

Revise the program

Revise the program, if it is not correct.

Save the program


l

Write the program in a floppy disk or a ROM. Make sure to indicates model name of PC, program capacity, facility name, and date on recorded program. Print out the program using a printer.

END

16-2

Chapter 17 Maintenance and Examination


17-1 Periodical Examination
Please refer to following listings for periodical examination of TP02 to ensure that it would operate properly and safely. General item
Check up item Ambient temperature Ambient humidity Gas Vibration Check up Within specified range (When installed in control panel, the temperature inside control panel would be the ambient temperature.) Criterion 0 ~ 55 5 ~ 90 % RH None corrosive gas None Remark No dewfall

Shock Bas ic module


Check up Measure the input voltage of power Power soure voltage source on the terminal block to see if it is within specified range. Provided 24 VDC Measure the output voltage of power power supply supply on the terminal block to see if voltage it is within specified range. Measure the voltage of power supply Input port power for input port on the terminal block to supply see if it is within specified range. Output port power supply Basic module error indication Measure the voltage of power supply for output port on the terminal block to see if it is within specified range. Examine the ERR- error light. Check to see if the basic module mounted properly. Check to see if there is any loose screw on the terminal block. Check to see the expansion cable, termination connector are secured on the expansion module. Check up item

None
Criterion 85 ~ 250 VAC Remark

24 VDC 10 % 10 ~ 26.4 VDC 20 ~ 26.4 VDC 250 VAC max. 30 VDC max. Extinguished None None Secured Not required on TP02-20MR/MT TP02-28MR/MT Terminal
X0001~X0004

Terminal X0005~

Installation

Expansion module
Check up item Input port power supply Output port power supply

Check up
Check to see if the voltage provided to input port is within specified range. Check to see if the voltage provided to output port is within specified range. Check to see if the expansion module mounted properly. Check to see if there is any loose screw on the terminal block. Check to see if the expansion cable and termination connector are secured on the expansion module.
17-1

Criterion
20 ~ 26.4 VDC 250 VAC max. 30 VDC max. None None Secured

Remark
TP02-16EXD TP02-16EMR TP02-32EMR TP02-16EYR TP02-16EMR TP02-32EMR

Installation

Other

Compare the program stored in the ROM (EPROM, EEPROM) or diskette (FD) with the one in operation.

17-2

17-2 Troubleshooting
When there is any error condition, please reconfirm the status of indication (RUN, ERR) and then perform the troubleshooting procedure according to following listings.

[1] Status of LED


RUN ERR Remark Troubleshooting procedure 1 Troubleshooting procedure 2 Troubleshooting procedure 3 Troubleshooting procedure 4 Troubleshooting procedure 5 Troubleshooting procedure 1 Extinguished Illuminated Error detected by self-diagnose Extinguished Extinguished Power OFF Flashing Extinguished STOP mode Error not detected by self-diagnose (input related) Error not detected by self-diagnose (output related)

Illuminated Extinguis hed

Illuminated Illuminated Other

[2] Presumptions of troubleshooting procedure


The troubleshooting procedure is designed to isolate and solve problem that occurs under normal operation. (replacement of defective module and necessary repair that follows.) Therefore, following conditions are not included: Instant temporary error caused by noise interference or other reason. (Not-consistent) Problem caused by faulty program (user application).

[3] Preparation for troubleshooting


1. Backup the program memory and system memory When the CPU mainboard faulty, it is possible that current operating program can not be stored from PLC to auxiliary storage device or the content of storage may be corrupted. Therefore, please keep the latest version of operating program and system memory on backup diskette. Even when applying ROM operation, please backup necessary data by diskette anyway. 2. Preparation of auxiliary device Prepare program writer to load and store program. 3. Preparation of spare part Prepare necessary replacement for faulty module. 4. Setup table of system memory and I/O relay assignment listings Please prepare System memory setup table and I/O relay assignment listing for convenience when performing troubleshooting.

17-3

[4] Troubleshooting procedure


Troubleshooting procedure - 1

Use program writer TU12 to monitor system memory WS050 <<Operation of PU12>>
Value of WS050 (decimal ) 01 08 02 11 03 04

Content

Solution

System ROM error Battery error RAM error Watchdog timer error User ROM error User program error (Instruction code check)

Power OFF/ON, NGReplace basic module Power OFF/ON, NGAll memory initialized. Reload program, system memory, NGReplace basic module Power OFF/ON, NGAll memory initialized. Reload program, system memory, rewrite ROM, NGReplace basic module Power OFF/ON, NGReconfirmation of user program error address WS006, rewrite program, NGAll memory initialized, program, system memory reload, NGreplace basic module. (NOTE 1) If there is any syntax error on user program (for example: repeated usage of OUT instruction), it would be considered as user program error and stop the operation of PLC. Please utilize the program writer to verify the syntax of program after program loaded into PLC. <<operation of PU12>> (write mode)

(NOTE 2) If a instruction or operation memory that does not exist is loaded when a function limited operand (refer to chapter 9) is used, it will be treated as user program error in operation and stop the operation of PLC. Please watch out. 10 Prior to shutdown program error (Endless-loop program check) System memory error Power OFF/ON, NGreconfirmation of endless-loop program or required operation time too long (more than 200ms), NGall memory initialized, program and system memory reload, NGreplace basic module Power OFF/ON, NGreconfirmation and modification of error system memory address WS005, NG ll memory initialized, program and system memory reload, NGreplace basic module (NOTE 1) When the setup value of system memory is out of range, it will be treated as system memory error and stop the operation of PLC. Power OFF/ON, NGreconfirmation of termination connector and expansion cable, NGreplace termination connector or expansion cable, NGreplace basic module, NGreplace basic module

05

06

I/O bus error

17-4

Value of WS050 (D)

Content

Solution

07

Communication When WS043=2 (remote I/O) error Power OFF/ON, NGreconfirmation of the wiring status to the child-station which communication flag is OFF, NGreplace the child-station which communication flag is OFF, NGreplace basic module When ES0432 Power OFF/ON, NGall memory initialized, reload program and system memory, NG replace basic module

Other code

Power OFF/ON, NGall memory initialized, reload program and system memory, NGreplace basic module (NOTE 1) Power error (error code 12) is written into memory at power on, it is not error condition. Power OFF/ON, NGreplace basic module

TP02 can not communicate with program writer (showing PC TO PP TIME OUT)
Troubleshooting procedure - 2

Reconfirm the Power indicator

POWER indicator illuminated N

Y Replace basic module

Reconfirm voltage reading of the power source on the terminals of basic module.

85 ~ 250 VAC

Y
Replace basic module

N
Reconfirm external wiring or replace external power supply, etc.

Troubleshooting procedure - 3
Utilize program writer to enter RUN mode (in monitor or modify mode)

Entered RUN mode

Repair

17-5

To troubleshooting

17-6

Troubleshooting procedure - 4

This procedure is designed for input signal error that can not be detected by CPU self-diagnose. Error example All input points of specific basic module/expansion module can not be set to ON. Specific input point can not be set to ON. In the input signals of the same basic module/expansion module, some input signals may be affecting other input signals. Solution Erroneous input signal Measure the voltage between related input point and common point using a tester. When the voltage of power supply is connected to terminals ON When the voltage of power supply is not connected to terminals OFF Reconfirm the status of indicators of basic module/expansion module. Connect the program writer and monitor and reconfirm the ON/OFF status of related data memory (input relay).

Condition of ==

Other condition

Reconfirm power supply and external wiring OK Replace basic module/ expansion module

Replace basic module/ expansion module

[Input signal flowchart]

17-7

Troubleshooting procedure - 5

This procedure is designed for output signal error that can not be detected by CPU self-diagnose. Error example All output points of specific basic module/expansion module can not be set to ON. (It is usually because of the fuse connected on the power supply is burnt down.) Specific input point can not be set to ON or OFF. In the output signals of the same basic module/expansion module, some output signals may be affecting other output signals. Solution Erroneous input signal Connect the program writer and monitor and reconfirm the ON/OFF status of related data memory (output relay). Reconfirm the status of indicators of basic module/expansion module. Measure the voltage between related output point and common point on the basic/expansion module using a tester. When the voltage between terminals is output ON voltage (app. 1 V or lower) ON When the voltage between terminals is the load power supply voltageOFF (NOTE 1) When the load power supply is OFF or the wiring of load is broken, even though the output status may be normal while there is still a error condition in system.

Condition of ==

Condition of =

Other condition

Connected load malfunction

Reconfirm the power supply and external wirings.

Replace basic module/ expansion module

OK Replace basic module/ expansion module

[Output signal flowchart]

17-8

Chapter 18 Specification
18-1 General Specification
Item Power Source
Temporary Power Interruption Durability

TP02-20MR/MT

TP02-28MR/MT

TP02-40MR/MT

TP02-60MR/MT

AC85~250V, 47~63Hz Temporary power off within 20ms without external supplemental device will not affect normal operation of machine. DC500V, more than 10M (between AC input and FG terminal)

Insulation Resistance Insulation High-Voltage Sustention Noise Sustention Storage Temperature Operation Environment and Temperature Vibration Sustention Shock Sustention Power Consumption Power Supply Capacity External Wiring Method Mounting Method Weight Grounding

AC1500, 50/60 Hz for 1 min. (between AC input and FG terminal) 1000Vp-p 1us (between power line and FG terminal) -25~70 0~55, 5~90(without dewfall), environment without corrosive gas IEC 68-2-6 standard, 0.15mm(10~58Hz)(on X, Y, Z axis for 2 hrs. each) IEC 68-2-6 standard 15G (on Z, Y, Z, axis for 3 times each) 30VA DC24V10, 300mA 55VA 60VA

DC24V10, 400mA

M3 7mm terminal seat, appropriate for CNS standard or equivalent Direct mounting or DIN rail (35mm) mounting 570g/540g 580g/550g 900g/820g 930g/850g

Type 3 Grounding (resistance less than 100 )

18-1

18-2 Features
Item Program System Control System Basic Instruction Process Speed Instruction Type Program Capacity ROM Memory Program Backup Battery Capacity Base Set Input/Output Points Max. Input/Output Points Input relay Output relay Auxiliary relay Data Memory TP02-20MR/MT TP02-28MR/MT TP02-40MR/MT TP02-60MR/MT Storaging programming system Common usage of cycling operation and interrupt process system

1.63~1.83us
Basic: 13 instructions, Application:56 instructions 1.5K words (RAM) flash memory

0.81~1.02us Basic: 13 instructions, Application: 58 instructions 4K words (RAM) flash memory or EPROM(27C512), EEPROM(28C256)

lithium battery for user memory backup, life-span for 10 yrs. 12/8 points 16/12 points 24/16 points 36/24 points

12/8 points (20 16/12 points (28 56/40 points (104 68/56 points (124 points) points) points) points) 384 points (X0001~X0384) 384 points (Y0001~Y0384) 2048 points (C0001~C2048) Total as 256 points (V0001~V0256) Timer setup for time 0.1~6553.5 sec. (V0001~V0250) 250 points Timer, Counter 0.01~655.35 sec. (V0251~V0256) 6 points Counter setup 1~65535 Current value register of timer, counter: 256 words (V0001~V0256) Register 3072 word [V0001~V1024, D0001~D2048] System Memory 128 words [WS001~WS128] Single-phase input or dual-phase 90 degrees phase-shift signal input (6 modes) High Speed Counter maximum counting frequency: 10KHz, counting range: 0~65535 (High speed counter use input points X0001~X0004 as input connection points.) External Interrupt external interrupt input (4 mode) (input points X0001~X0004) Points 10 ms timing interrupt (LB128 is the interrupt function pointer of 10 ms timing Interrupt Function interrupt) Password Function 8 digit password setup Real-time Clock None Equipped Function Stop output 1 point (relay output, AC 250V/DC30V 1A) OFF at error or stop, ON at normal connection point at None operation error Expansion Function None 2 expansion set at most 1) computer link: 38400/19200/9600/4800/2400/1200/600/300 bps, max. 99 station, max. Communication Port length 1km. (terminal seat 2-line 2) data-link: 76800/38400bps, max. 7 slave-stations, 24 byte slave-station, max. length type connection 500m/1km 3) remote I/O: 76800/38400, max. 7 slave-stations, 60 points/slave-station, max. length point) 500m. MMI Port (Dsub-9P 1) PG mode: Capable of connecting programming unit PU12 or editor software PC12. connector) 2) Computer link: 38400~300 bps, 1:1 computer connection, max. length 1km.
18-2

18-3 Input/Output Specification


(1) TP02-20MR (DC input:12 points, Relay output : 8 points)
Terminal X0001~X0004 Input points 4 points Input voltage rating DC 12/24 V Input voltage range DC 10~26.4 V Input current rating Input impedance ON voltage (current) level OFF voltage (current) level Respon OFFON se time ONOFF Input indicator Insulation Input
3.6 mA TYP. (12V) 7.6 mA TYP. (24V)

Terminal X0005~X0012 8 points DC 24 V DC 20~26.4 V


4.8 mA TYP. (24V)

Circuitry

3.2 KTYP. 10V(3mA) max 5V (1.5mA) min

5KTYP. 20V(3.5mA) max 8V (1.5mA) min

Less than 1ms Less than 10ms Less than 1ms Less than 10ms LED illuminate when ON. Photo-Coupler DC500V, more than 10M (input Insulation impedance side and secondary side circuitry) Insulation voltage AC500V, 1min (input side and sustention secondary side circuitry) 16 points with the same common Common terminal terminal (without parity) Terminal Y0001~Y0008 Circuitry Output points 8 points Output method relay Max. voltage AC250V/DC30V Current range 2A/1point, 2A/1 common points Min. loading DC5V 10mA Mechanical 20 million times 1) resistive loading:100 thousand times Operati on life 2) inductive loading:AC250V, 05A Electrical span (cos=0.4) 200 thousand times 3) inductive loading:DC30V, 0.5A (T=7ms) 200 thousand times Respon OFFON se time ONOFF Output indicator Insulation Insulation impedance insulation voltage sustention Less than 10ms Less than 10ms LED illuminate when ON relay insulation DC500V, more than 10M , (output terminal and secondary side circuitry) AC1500V, 1 min., (output terminal and secondary side circuitry)

Output

18-3

common terminal

8 points - 1 common terminal x 1 (Y0001~Y0008)

18-4

(2) TP0 2-20MT (DC input : 12 points, transistor output : 8 points) Terminal Terminal Circuit diagram
X1 to X4 No. of input 4 points Rated input voltage 12/24 VDC Input voltage range 10 to 26.4 VDC Rated input current
3.6 mA TYP. (12V) 7.6 mA TYP. (24V)

X5 to X12 8 points 24 VDC 20 to 26.4 VDC


4.8 mA TYP. (24V)

Input impedance 3.2 kohm TYP. 5 kohm TYP. Input ON level 10V (3mA) max 20V(3.5mA) max Input OFF level 5V (1.5mA) min 8V (1.5mA) min 10ms max Response OFFON 1ms max time ONOFF 1ms max 10ms max Operation indication LED lights at ON condition. Insulation system By photo coupler 500VDC, 10 Mohm min. Insulation resistance (between input terminal and secondary circuit) 500VAC for 1 minute Dielectrical strength (between input terminal and secondary circuit) 1 common line for 16 points (no Common system polarity) Terminal Y10 to Y8 Circuit diagram NO. of output 8 points NPN transistor output (sink Output system output) Rated load voltage 5/12/24 VDC Load voltage range 4.5 to 27 VDC Rated max. load 0.3A/1 point current 1.6A/8 points common (Y1 to Y8) Leak current at OFF 0.2mA max. Voltage breakdown 1.2V max. at ON Surge killer Zener diode OFF ON 1ms max. (resistance load) Response time ONOFF 1ms max. (resistance load) Output indicator LED lights at ON condition Insulation By photo coupler 500 VDC, 10 Mohm min. Insulation (between output terminal and impedance secondary circuit) 500 VAC for 1 minute Dielectrical strength (between output terminal and secondary circuit) 1 common line(-) for 8 points(Y1 Common system to Y8)
18-5

Output

Input

(3) TP02-28MR (DC input:16points, Relay output: 12 points)


Terminal X0001~X0004 Input points 4 points Input voltage rating DC 12/24 V Input voltage range DC 10~26.4 V Input current rating Input impedance Input
3.6 mA TYP. (12V) 7.6 mA TYP. (24V)

Terminal X0005~X0016 12points DC 24 V DC 20~26.4 V


4.8 mA TYP. (24V)

Circuitry

3.2 KTYP.

5KTYP.

ON voltage (current) 10V (3mA) max 20V(3.5mA) max level OFF voltage 5V (1.5mA) min 8V (1.5mA) min (current) level Less than 10ms Response OFFON Less than 1ms time ONOFF Less than 1ms Less than 10ms Input indicator LED illuminate when ON. Insulation Photo-Coupler DC500V, more than 10M (input Insulation impedance side and secondary side circuitry) Insulation voltage AC500V, 1min (input side and sustention secondary side circuitry) 16 points with the same common Common terminal terminal (without parity) Terminal Y0001~Y00012 Circuitry Output points 12 points Output method relay Max. voltage AC250V/DC30V Current range 2A/1point, 2A/1 common points Min. loading DC5V 10mA Mechanical 20 million times 1) resistive loading:100 thousand times Operati on life 2) inductive loading:AC250V, 05A Electrical span (cos=0.4) 200 thousand times 3) inductive loading:DC30V, 0.5A (T=7ms) 200 thousand times Respon OFFON se time ONOFF Output indicator Insulation Insulation impedance insulation voltage sustention Less than 10ms Less than 10ms LED illuminate when ON relay insulation DC500V, more than 10M , (output terminal and secondary side circuitry) AC1500V, 1 min., (output terminal and secondary side circuitry)

Output

18-6

common terminal

8 points - 1 common terminal x 1 (Y0001~Y0008) 4 points - common terminal x 1 (Y0009~Y00012)

18-7

(4) TP02-28MT (DC input : 16 points, transistor output : 12 points) Terminal Terminal Circuit diagram
X1 to X4 No. of input 4 points Rated input voltage 12/24 VDC Input voltage range 10 to 26.4 VDC Rated input current
3.6 mA TYP. (12V) 7.6 mA TYP. (24V)

X5 to X16 12 points 24 VDC 20 to 26.4 VDC


4.8 mA TYP. (24V)

Input impedance 3.2 kohm TYP. 5 kohm TYP. Input ON level 10V (3mA) max 20V(3.5mA) max Input OFF level 5V (1.5mA) min 8V (1.5mA) min 10ms max Response OFFON 1ms max time ONOFF 1ms max 10ms max Operation indication LED lights at ON condition. Insulation system By photo coupler 500VDC, 10 Mohm min. Insulation resistance (between input terminal and secondary circuit) 500VAC for 1 minute Dielectrical strength (between input terminal and secondary circuit) 1 common line for 16 points (no Common system polarity) Terminal Y1 to Y12 Circuit diagram NO. of output 12 points NPN transistor output (sink Output system output) Rated load voltage 5/12/24 VDC Load voltage range 4.5 to 27 VDC 0.3A/1 point Rated max. load 1.6A/8 points common (Y1 to Y8) current 0.8A/4 points common(Y9 to Y12) Leak current at OFF 0.2mA max. Voltage breakdown 1.2V max. at ON Surge killer Zener diode Response OFFON 1ms max. (resistance load) time ONOFF 1ms max. (resistance load) Output indicator LED lights at ON condition Insulation system By photo coupler 500 VDC, 10 Mohm min. Insulation system (between output terminal and secondary circuit) 500 VAC for 1 minute Dielectrical strength (between output terminal and secondary circuit)

Output

Input

18-8

Common system

1 common line(-) for 8 points(Y1 to Y8) 1common line(-) for 4 points(Y9 to Y12)

18-9

(5) TP02-40MR (DC input : 24po ints, Relay output : 16points)


Terminal X0001~X0004 Input points 4 points Input voltage rating DC 12/24 V Input voltage range DC 10~26.4 V Input current rating Input impedance ON voltage (current) level OFF voltage (current) level Respon OFFON se time ONOFF Input indicator Insulation Input
3.6 mA TYP . (12V) 7.6 mA TYP. (24V)

Terminal X0005~X0024 20 points DC 24 V DC 20~26.4 V


4.8 mA TYP. (24V)

Circuitry

3.2 KTYP.

5KTYP.

10V (3mA) max. 20V(3.5mA) max 5V (1.5mA) min. 8V (1.5mA) min.

Less than 1ms Less than 10ms Less than 1ms Less than 10ms LED illuminate when ON. Photo-Coupler DC500V, more than 10M (input Insulation impedance side and secondary side circuitry) Insulation voltage AC500V, 1min (input side and sustention secondary side circuitry) 24 points with the same common Common terminal terminal (without parity) Terminal Y0001~Y00016 Circuitry Output points 16 points Output method relay Max. voltage AC250V/DC30V Current range 2A/1point, 2A/1 common points Min. loading DC5V 10mA Mechanical 20 million times 1) resistive loading:100 thousand times Operati on life 2) inductive loading:AC250V, 05A Electrical span (cos=0.4) 200 thousand times 3) inductive loading:DC30V, 0.5A (T=7ms) 200 thousand times Respon OFFON se time ONOFF Output indicator Insulation Insulation impedance insulation voltage sustention Less than 10ms Less than 10ms LED illuminate when ON relay insulation DC500V, more than 10M , (output terminal and secondary side circuitry) AC1500V, 1 min., (output terminal and secondary side circuitry)

Output

18-10

common terminal

1 points - 1 common terminal x 4 Y0001~Y0004 4 points - common terminal x 3 Y005~Y0016

18-11

(6) TP02-40MT (DC input : 24 points, transistor output : 16 points) Terminal Terminal Circuit diagram
X1 to X4 No. of input 4 points Rated input voltage 12/24 VDC Input voltage range 10 to 26.4 VDC Rated input current
3.6 mA TYP. (12V) 7.6 mA TYP. (24V)

X5 to X24 20 points 24 VDC 20 to 26.4 VDC


4.8 mA TYP. (24V)

Input impedance 3.2 kohm TYP. 5 kohm TYP. Input ON level 10V (3mA) max 20V(3.5mA) max Input OFF level 5V (1.5mA) min 8V (1.5mA) min 10ms max Response OFFON 1ms max time ONOFF 1ms max 10ms max Operation indication LED lights at ON condition. Insulation system By photo coupler 500VDC, 10 Mohm min. Insulation resistance (between input terminal and secondary circuit) 500VAC for 1 minute Dielectrical strength (between input terminal and secondary circuit) 1 common line for 16 points (no Common system polarity) Terminal Y1 to Y16 Circuit diagram NO. of output 16 points NPN transistor output (sink Output system output) Rated load voltage 5/12/24 VDC Load voltage range 4.5 to 27 VDC Rated max. load 0.3A/1 point current 0.8A/4 points common(Y5 to Y16) Leak current at OFF 0.2mA max. Voltage breakdown 1.2V max. at ON Surge killer Zener diode Response OFFON 1ms max. (resistance load) time ONOFF 1ms max. (resistance load) Output indicator LED lights at ON condition Insulation system By photo coupler 500 VDC, 10 Mohm min. Insulation system (between output terminal and secondary circuit) 500 VAC for 1 minute Dielectrical strength (between output terminal and secondary circuit)

Output

Input

18-12

Common system

1 common line(-) for 1 point (Y10 to Y1 to Y9) 1common line(-) for 4 points (Y5 to Y16)

18-13

(7) TP02-60MR (DC input : 36 points, Relay output : 24 po ints)


Terminal X0001~X0004 Input points 4 points Input voltage rating DC 12/24 V Input voltage range DC 10~26.4 V Input current rating Input impedance ON voltage (current) level OFF voltage (current) level Respon OFFON se time ONOFF Input indicator Insulation Input
3.6 mA TYP. (12V) 7.6 mA TYP. (24V)

Terminal X0005~X0036 32 points DC 24 V DC 20~26.4 V


4.8 mA TYP. (24V)

Circuitry

3.2 KTYP.

5KTYP.

10V (3mA) max 20V(3.5mA) max 5V (1.5mA) min 8V (1.5mA) min

1ms max 10ms max 1ms max 10ms max LED illuminate when ON. Photo-Coupler DC500V, more than 10M (input Insulation impedance side and secondary side circuitry) Insulation voltage AC500V, 1min (input side and sustention secondary side circuitry) 36 points with the same common Common terminal terminal (without parity) Terminal Y0001~Y00024 Circuitry Output points 24 points Output method relay Max. voltage AC250V/DC30V Current range 2A/1point, 2A/1 common points Min. loading DC5V 10mA Mechanical 20 million times 1) resistive loading:100 thousand times Operati on life 2) inductive loading:AC250V, 05A Electrical span (cos=0.4) 200 thousand times 3) inductive loading:DC30V, 0.5A (T=7ms) 200 thousand times Respon OFFON se time ONOFF Output indicator Insulation Insulation impedance insulation voltage sustention Less than 10ms Less than 10ms LED illuminate when ON relay insulation DC500V, more than 10M , (output terminal and secondary side circuitry) AC1500V, 1 min., (output terminal and secondary side circuitry)

Output

18-14

common terminal

1 point - 1 common terminal (Y0001~Y0004) 4 points - common terminal x 1 (Y0005~Y00016) 8 points - 1 common terminal x 1 (Y0017~Y0024)

18-15

(8) TP02-60MT (DC input : 36 points, transistor output : 24 points) Terminal Terminal Circuit diagram
X1 to X4 No. of input 4 points Rated input voltage 12/24 VDC Input voltage range 10 to 26.4 VDC Rated input current
3.6 mA TYP. (12V) 7.6 mA TYP. (24V)

X5 to X36 32 points 24 VDC 20 to 26.4 VDC


4.8 mA TYP. (24V)

Input impedance 3.2 kohm TYP. 5 kohm TYP. Input ON level 10V (3mA) max 20V(3.5mA) max Input OFF level 5V (1.5mA) min 8V (1.5mA) min 10ms max Response OFFON 1ms max time ONOFF 1ms max 10ms max Operation indication LED lights at ON condition. Insulation system By photo coupler 500VDC, 10 Mohm min. Insulation resistance (between input terminal and secondary circuit) 500VAC for 1 minute Dielectrical strength (between input terminal and secondary circuit) 1 common line for 36 points (no Common system polarity) Terminal Y10 to Y24 Circuit diagram NO. of output 24 points NPN transistor output (sink Output system output) Rated load voltage 5/12/24 VDC Load voltage range 4.5 to 27 VDC 0.3A/1 point common (Y0001~Y0004) Rated max. load 0.8A/4 points common current (Y0005~Y0006) 1.6A/8 points common (Y0017~Y0024) Leak current at OFF 0.2mA max. Voltage breakdown 1.2V max. at ON Surge killer Zener diode Response OFFON 1ms max. (resistance load) time ONOFF 1ms max. (resistance load) Output indicator LED lights at ON condition Insulation system By photo coupler 500 VDC, 10 Mohm min. Insulation system (between output terminal and secondary circuit)

Output

Input

18-16

500 VAC for 1 minute Dielectrical strength (between output terminal and secondary circuit) 1 common line(-) for 1 point 4 Common system 1common line(-) for 4 points 3 1common line(-) for 8 points 1

18-17

(9) TP02-16EXD (DC input : 16 points)


Terminal X0001~00082 Input points Input voltage rating Input voltage range Input current rating Input impedance ON voltage (current) level OFF voltage (current) level Respon OFFON se time ONOFF Input indicator Insulation Insulation impedance Insulation voltage sustention Common terminal 16 points DC 24 V DC 20~26.4 V
4.8 mA TYP. (24V)

Circuitry

5KTYP. 20V (3.5mA) max 8V (1.5mA) min 10ms max 10ms max LED illuminate when ON. Photo-Coupler DC500V, more than 10M (input side and secondary side circuitry) AC500V, 1min (input side and secondary side circuitry) 8 points with the same common terminal (without parity)

Input

Weight 160g Accessory Expansion line (4cm) x 1 (10) TP02-16EYR (Relay output : 16 points)
Terminal X0001~00082 Output points Output method Max. voltage Current range Min. loading Mechanical Operati on life Electrical span 16 points relay AC250V/DC30V 2A/1point, 2A/1 common points DC5V 10mA 20 million times 1) resistive loading:100 thousand times 2) inductive loading:AC250V, 05A (cos=0.4) 200 thousand times 3) inductive loading:DC30V, 0.5A (T=7ms) 200 thousand times 10ms max 10ms max LED illuminate when ON relay insulation DC500V, more than 10M , (output terminal and secondary side circuitry) AC1500V, 1 min., (output terminal and secondary side circuitry) 4 points - 1 common terminal4

Circuitry

Output

Respon OFFON se time ONOFF Output indicator Insulation Insulation impedance insulation voltage sustention common terminal

Weight

220g
18-18

Accessory

Expansion line (4 cm)1

18-19

(11) TP02-16EYT (Transistor output : 16 points) Terminal 0 to 8 2 Circuit diagram


16 points NPN transistor output (sink Output system output) Rated load voltage 5/12/24 VDC Load voltage range 4.5 to 27 VDC Rated max. load current Output port
0.3A/1 point 0.8A/4 points common

No. of input

Leak current at OFF 0.2mA max. Voltage break down at ON 1.2V max. Surge killer Zener diode Response OFFON 1ms max. (resistance load) time ONOFF 1ms max. (resistance load) Operation indication LED lights at ON condition Insulation system By photo coupler 500 VDC, 10 Mohm min. Insulation resistance (between output terminal and secondary circutit) 500 VAC for 1 minute Dielectrical strength (between output terminal and secondary circuit) Common system 1 common line(-) for 4 points 4 Weight 230g Accessories Expansion cable (4 cm) 1

18-20

(12) TP02-16EMR (DC input : 8 points, Relay output : 8 points)


Terminal X0001~00082 Input points Input voltage rating Input voltage range Input current rating Input impedance ON voltage (current) level OFF voltage (current) level Respon OFFON se time ONOFF Input indicator Insulation 8 points DC 24 V DC 20~26.4 V
4.8 mA TYP. (24V)

Circuitry

5KTYP. 20V (3.5mA) max 8V (1.5mA) min

Input Output

10ms max 10ms max LED illuminate when ON. Photo-Coupler DC500V, more than 10M (input Insulation impedance side and secondary side circuitry) Insulation voltage AC500V, 1min (input side and sustention secondary side circuitry) 8 points with the same common Common terminal terminal (without parity) Terminal X0001~0008 Circuitry Output points 8 points Output method relay Max. voltage AC250V/DC30V Current range 2A/1point, 2A/1 common points Min. loading DC5V 10mA Mechanical 20 million times 1) resistive loading:100 thousand times Operati on life 2) inductive loading:AC250V, 05A Electrical span (cos=0.4) 200 thousand times 3) inductive loading:DC30V, 0.5A (T=7ms) 200 thousand times Respon OFFON se time ONOFF Output indicator Insulation Insulation impedance insulation voltage sustention common terminal 10ms max 10ms max LED illuminate when ON relay insulation DC500V, more than 10M , (output terminal and secondary side circuitry) AC1500V, 1 min., (output terminal and secondary side circuitry) 4 points - 1 common terminal2

Weight Accessory

190g Expansion line (4 cm)1

18-21

(13) TP02-32EMR (DC input : 16 points, Relay output : 16 points)


Terminal X0001~00082 Input points Input voltage rating Input voltage range Input current rating Input impedance ON voltage (current) level OFF voltage (current) level Respon OFFON se time ONOFF Input indicator Insulation 16 points DC 24 V DC 20~26.4 V
4.8 mA TYP. (24V)

Circuitry

5KTYP. 20V (3.5mA) max 8V (1.5mA) min

Input Output

10ms max 10ms max LED illuminate when ON. Photo-Coupler DC500V, more than 10M (input Insulation impedance side and secondary side circuitry) Insulation voltage AC500V, 1min (input side and sustention secondary side circuitry) 16 points with the same common Common terminal terminal (without parity) Terminal X0001~00082 Circuitry Output points 16 points Output method relay Max. voltage AC250V/DC30V Current range 2A/1point, 2A/1 common points Min. loading DC5V 10mA Mechanical 20 million times 1) resistive loading:100 thousand times Operati on life 2) inductive loading:AC250V, 05A Electrical span (cos=0.4) 200 thousand times 3) inductive loading:DC30V, 0.5A (T=7ms) 200 thousand times Respon OFFON se time ONOFF Output indicator Insulation Insulation impedance insulation voltage sustention common terminal 10ms max 10ms max LED illuminate when ON relay insulation DC500V, more than 10M , (output terminal and secondary side circuitry) AC1500V, 1 min., (output terminal and secondary side circuitry) 4 points - 1 common terminal4

Weight Accessory

320g Expansion line (4 cm)1

18-22

18-4 Dimensions

(1)TP02-20MR(T)/TP02-28MR(T) ConnectingTP-202MC
MMI cover TP-202MC

8 9

100 110

76 ?u150

76 100

(2)TP02-40MR(T)/TP02-60MR(T) Connccting TW-12MC


MMI cover TP-202MC

8 9

170 180

76 124 ?u150

76

(1)TP02-16EXD,TP02-16EYR,TP02-16EMR TP02-16YET.

(2)TP02-32EMR

8 9

54 64

76

100 110

8 9

76

18-23

You might also like