6F3B0253
PROGRAMMABLE CONTROLLER
PROSEC T1- 16S
USER???S MANUAL
??? Basic Hardware and Function ???
TOSHIBA CORPORATION
6F3B0253
Important Information
Misuse of this equipment can result in property damage or human injury. Because controlled system applications vary widely, you should satisfy yourself as to the acceptability of this equipment for your intended purpose.
In no event will Toshiba Corporation be responsible or liable for either indirect
or consequential damage or injury that may result from the use of this equipment.
No patent liability is assumed by Toshiba Corporation with respect to use of information, illustrations, circuits, equipment or examples of application in this publication.
Toshiba Corporation reserves the right to make changes and improvements to this publication and/or related products at any time without notice. No obligation shall be incurred other than as noted in this publication.
This publication is copyrighted and contains proprietary material. No part of this book may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means ??? electrical, mechanical, photocopying, recording, or otherwise ??? without obtaining prior written permission from Toshiba Corporation.
?? TOSHIBA Corporation 2001. All rights reserved
IBM is a registered trademark of International Business Machines Corporation.
Publication number:
1st edition April 2001, 2nd edition November 2001
6F3B0253
CE Marking
The Programmable Controller PROSEC
The contents of the conformity are shown below.
(1)Included Handy Programmer THP911A*S.
(2)Included each type of associated input/output unit in a typical configuration.
(3)Product must be installed in accordance with manufacturers instructions
Basic Hardware and Function 1
6F3B0253
The Programmable Controller PROSEC
Important Notice : 1. THIS EQUIPMENT IS SUITABLE FOR USE IN CLASS I,
DIVISION 2, GROUPS A, B, C, D OR
LOCATIONS ONLY.
2.WARNING - EXPLOSION HAZARD - SUBSTITUTION OF
COMPONENTS MAY IMPAIR SUITABILITY FOR CLASS I, DIVISION 2.
3.WARNING - EXPLOSION HAZARD - DO NOT DISCONNECT
EQUIPMENT UNLESS POWER HAS BEEN SWITCHED OFF
OR THE AREA IS KNOWN TO BE
2
6F3B0253
Safety Precautions
This manual is prepared for users of Toshiba???s Programmable Controller
Read this manual thoroughly before using the
General Information
1.The
2.The
3.In installation, wiring, operation and maintenance of the
If this product is handled or operated improperly, electrical shock, fire or damage to this product could result.
4.This manual has been written for users who are familiar with Programmable Controllers and industrial control equipment. Contact Toshiba if you have any questions about this manual.
5.Sample programs and circuits described in this manual are provided for explaining the operations and applications of the
Hazard Classifications
In this manual, the following two hazard classifications are used to explain the safety precautions.
!WARNING
!CAUTION
Indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury.
Indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury. It may also be used to alert against unsafe practices.
Even a precaution is classified as CAUTION, it may cause serious results depending on the situation. Observe all the safety precautions described on this manual.
Basic Hardware and Function 3
6F3B0253
Safety Precautions
Installation:
!CAUTION
1.Excess temperature, humidity, vibration, shocks, or dusty and corrosive gas environment can cause electrical shock, fire or malfunction. Install and use the T1- 16S and related equipment in the environment described in this manual.
2.Improper installation directions or insufficient installation can cause fire or the units to drop. Install the
3.Turn off power before installing or removing any units, modules, racks, terminal blocks or battery. Failure to do so can cause electrical shock or damage to the T1- 16S and related equipment.
4.Entering wire scraps or other foreign debris into to the
5.Turn off power immediately if the
Wiring:
!CAUTION
1.Turn off power before wiring to minimize the risk of electrical shock.
2.Exposed conductive parts of wire can cause electrical shock. Use
3.Operation without grounding may cause electrical shock or malfunction. Connect the ground terminal on the
4.Applying excess power voltage to the
5.Improper wiring can cause fire, electrical shock or malfunction. Observe local regulations on wiring and grounding.
4
6F3B0253
Safety Precautions
Operation:
!WARNING
1.Configure emergency stop and safety interlocking circuits outside the
!CAUTION
2.Operate the
3.When you attempt to perform force outputs, RUN/HALT controls, etc. during operation, carefully check for safety.
4.Turn on power to the
5.Do not use any modules of the
6.Do not modify the
7.Configure the external circuit so that the external 24 Vdc power required for transistor output circuits and power to the loads are switched on/off simultaneously. Also, turn off power to the loads before turning off power to the
8.Install fuses appropriate to the load current in the external circuits for the outputs. Failure to do so can cause fire in case of load
9.Check for proper connections on wires, connectors and modules. Insufficient contact can cause malfunction or damage to the
Basic Hardware and Function 5
6F3B0253
Safety Precautions
Maintenance:
!CAUTION
1.Turn off power before removing or replacing units, modules, terminal blocks or wires. Failure to do so can cause electrical shock or damage to the
2.When you remove both input and output terminal blocks with wires for maintenance purpose, pay attention to prevent inserting them upside down.
3.Touch a grounded metal part to discharge the static electricity on your body before touching the equipment.
4.Otherwise, charged static electricity on your body can cause malfunction or failure.
5.Do not disassemble the
6.Perform daily checks, periodical checks and cleaning to maintain the system in normal condition and to prevent unnecessary troubles.
7.Check by referring ???Troubleshooting??? section of this manual when operating improperly. Contact Toshiba for repairing if the
8.The contact reliability of the output relays will reduce if the switching exceeds the specified life. Replace the unit or module if exceeded.
9.The battery used in
10.Replace battery with CR2032 only. Use of another battery may present a risk of fire or explosion.
11.Dispose of used battery promptly. Keep away from children. Do not disassemble and do not dispose of in fire.
6
6F3B0253
Safety Precautions
Safety Label
The safety label as shown on the right is attached to the power terminal of the
Remove the mount paper before wiring.
Peel off the label from the mount paper and stick it near the power terminals where it can be readily seen.
! CAUTION
Do not touch terminals while power on.
Hazardous voltage can shock, burn or cause death. Do not touch terminals while power on.
Read related manual thoroughly for safety. Stick this seal on unit or near unit.
Take off this sheet before wiring.
Contact Toshiba if the label is damaged.
Basic Hardware and Function 7
6F3B0253
About This Manual
About This Manual
This manual has been prepared for
This manual introduces the
The
Inside This Manual
This manual consists of 10 main sections and an appendix.
Section 1 outlines the
Related Manuals
The following related manuals are available for
8
6F3B0253
About This Manual
Terminology
The following is a list of abbreviations and acronyms used in this manual.
Basic Hardware and Function 9
10
12
6F3B0253
Section 1
System Configuration
1.1Introducing the
1.2Features, 16
1.3System configuration, 19
1.4I/O expansion, 20
1.5Components, 21
1.6Computer link system, 27
1.7
1.8
1.9Peripheral tools, 33
Basic Hardware and Function 13
6F3B0253
1. System Configuration
1.1 Introducing the
The
The figure below shows the T1 Series
I/O points:
The T1 Series are available in five models,
The
14
6F3B0253
1. System Configuration
Memory capacity:
Program memory capacity of the T1 is 2 k steps. And that of the T1S is 8 k steps. Whole the program and a part of data registers are stored in
Control functions:
In addition to the basic relay ladder functions, the T1/T1S provides functions such as data operations, arithmetic operations, various functions, etc. Furthermore, its high- speed counter functions, pulse output functions and data communication functions allow its application to a wide scope of control systems.
Construction:
The
Series compatibility:
Programming instructions are upward compatible in the
Basic Hardware and Function 15
6F3B0253
1. System Configuration
1.2 Features
I/O module support:
The
By using the 16 points I/O module, the
Two
Two analog setting adjusters are provided on the
High speed processing:
Sophisticated machine control applications require high speed data manipulations. The
The
High performance software:
The
The
This function is an important feature for OEMs, because it can eliminate the need for changing the battery every few years.
(Optional battery is also available to
16
6F3B0253
1. System Configuration
Pulse output / PWM output:
One point of variable frequency pulses (max. 5 kHz) or variable duty pulses can be output. These functions can be used to drive a stepping motor or to simulate an analog output. (DC input type only)
The
The parity setting of the programmer port can be selected either odd or none. The none parity mode is provided especially for telephone modem connection. Using modems, remote programming/monitoring is available.
By connecting the
Sampling trace function:
The sampling trace is the function to collect the user specified data every user specified timing (minimum every scan), and to display the collected data on the programmer screen in time chart and/or trend graph format. This function is useful for checking the input signals changing.
Password protection:
By registering your passwords, four levels of protection is available according to the security levels required for your application.
Level 4: Reading/writing program and writing data are prohibited
Level 3: Reading/writing program are prohibited
Level 2: Writing program is prohibited
Level 1: No protection (changing passwords is available only in this level)
Two points of
Each model of the
Basic Hardware and Function 17
6F3B0253
1. System Configuration
DIN rail mounting:
The
When the
The
The
???Computer link mode:
???Data link mode: Two PLCs (any combination of T1S, T2E or T2N) can be directly linked together. This direct link is inexpensive, easily configured and requires no special programming.
???Free ASCII mode: User defined ASCII messages can be transmitted and received through this port. A terminal, printer,
???Inverter connection mode: This mode is specially provided to communicate with Toshiba Inverters (ASDs)
18
6F3B0253
1. System Configuration
1.3 System configuration
The following figure shows the
RS485 (Standard type only)
I/O modules
Computer link function
MMI/SCADA system
8 modules max.
Basic Hardware and Function 19
6F3B0253
1. System Configuration
1.4 I/O expansion
The
Available I/O modules
Up to 8 I/O modules
NOTE (1) The 5Vdc power to the I/O modules is supplied from the main unit. The main unit can supply maximum 1.5A of the 5Vdc power to the I/O modules. Check
the current consumption of each I/O module used. Refer to section 2.1.
(2)The connecting order of the I/O modules is not restricted except TOSLINE- F10 remote station FR112M. When the FR112M is used, it must be the right end module.
(3)If more than 8 I/O modules are connected, the
20
6F3B0253
1. System Configuration
1.5 Components
1.5.1Basic unit
The
Link terminals (Enhanced model only)
Programmer
port cover
Battery holder cover
Power supply and input/output terminals
Operation status LEDs
I/O status LEDs (Low side)
Mounting hole
Expantion
connector
I/O status LEDs (High side)
Basic Hardware and Function 21
6F3B0253
1. System Configuration
??? Behind the programmer port cover
Programmer port connector
Analog setting adjusters (V0 and V1)
Mode control switch (HALT / RUN)
Battery holder Battery type: CR2032
(Optional)
A tab for battery eject
Power supply terminals:
Connect the power cable and grounding wire. The terminal screw size is M3. See sections 4.4 and 4.5 for wiring.
Input terminals:
Connect input signal wires. The terminal screw size is M3. See section 2.4 for details.
Output terminals:
Connect output signal wires. The terminal screw size is M3. See section 2.4 for details.
22
6F3B0253
Operation status LEDs:
Indicates the operation status of the
FLT
RUN
PWR
Mode control switch:
Controls the operation modes of the
6F3B0253
1. System Configuration
Analog setting adjusters:
Two analog setting adjusters are provided. The V0 value is stored in SW30 and the V1 value is stored in SW31. The converted value range is 0 to 1000. Refer to section 8.5 for details of the analog setting function.
Programmer port connector:
Used to connect the programmer cable. The interface is
Expansion connector:
Used to connect the I/O module.
Used to connect a computer (SCADA system), operator interface unit, other
Mounting holes:
Used to fix the
DIN rail bracket:
The DIN rail bracket is provided at the rear for mounting the
24
6F3B0253
1. System Configuration
1.5.2I/O modules
The
The following 10 types of the I/O modules are available.
For specification details of the I/O modules, refer to the separate manual
Basic Hardware and Function 25
6F3B0253
1.System Configuration
1.5.3Options
The following optional items are available.
26
6F3B0253
1. System Configuration
1.6 Programmer port function
The interface of the
The computer link is a data communication function between computer or operator interface unit and the
By using the
Basic Hardware and Function 27
6F3B0253
1. System Configuration
1.7
The
By using this communication port, one of the following four communication modes is available, computer link mode, data link mode, free ASCII mode, and Inverter connection mode.
For details of these functions, refer to the separate manual
NOTE
28
6F3B0253
1. System Configuration
Computer link mode
By using this mode, all the
Master Computer
Max. 32
Data link mode
Two PLCs (any combination of
Basic Hardware and Function 29
6F3B0253
1. System Configuration
Free ASCII mode
The free ASCII mode is used to connect between the
By using this mode, the
???
??? ID system
??? Weigh scale
??? Power meter
??? Printer
??? Others
30
6F3B0253
1. System Configuration
Free ASCII mode
The
Using this mode, the
???Monitoring ??? Operating frequency and Terminal status
???Control ??? Run/Stop/Jog, Forward/Reverse, Frequency reference, etc.
???Parameter read/write
???Broadcast command
RS485 adapter
Basic Hardware and Function 31
6F3B0253
1.System Configuration
1.8
Module ??? ??? for details of the
(2) Refer to the separate
Typical data link configuration
The figure below shows the typical data link configuration.
Master computer
T2E
(master)
(remote)
RI/O: remote I/O
Operator interface units
32
6F3B0253
1. System Configuration
1.9 Peripheral tools
The following peripheral tools are available for the
The
???
???Group programming ??? part program development by multiple designers and
merging them into a complete program ??? enhance the software productivity.
???Powerful monitoring, I/O force and data set functions fully support your program debugging.
???Documentation of programs with commentary makes your maintenance work easy.
???Remote monitoring/programming via modem (radio/phone) is possible.
The table below shows the
*1) The
???The program size setting is only available as 2 k. It is set to 4 k mode in the
???Some of the added instructions (MAVE, DFL, HTOA, ATOH) may not be edited/monitored. (depending on the version)
NOTE
The connection cable for the
Connection cable for
Connection cable for T2/T3 ??? . Type: CJ905, 5 m length
Basic Hardware and Function 33
6F3B0253
1. System Configuration
The HP911A is a
The HP911A has the following features.
???The HP911A supports ladder diagram programming of
???
???Two display modes are available,
-Normal: 5 lines and 12 columns
-Zoom: Full device description
???
???Backlit LCD display allows operation in dim light.
There are two types of the Handy Programmer (HP911) depending on the cable included with.
The
???The program size setting is only available as 2 k. It is set to 4 k mode in the T1- 16S.
???Some of the added instructions (MAVE, DFL, HTOA, ATOH) cannot be edited/monitored.
NOTE
A 2 m connection cable for the
HP911A. The cable for the T2/T3 is available separately. (Type: CJ902, 2 m length)
34
6F3B0253
1. System Configuration
Program Storage Module (RM102)
The program storage module (RM102) is an external memory for storing the
Because the RM102 has an EEPROM,
The
When two or more
Basic Hardware and Function 35
6F3B0253
36
6F3B0253
Section 2
Specifications
2.1General specifications, 38
2.2Functional specifications, 40
2.3I/O specifications, 42
2.4External dimensions, 46
Basic Hardware and Function 37
6F3B0253
2.Specifications
2.1General specifications
NOTE
(1) 24Vdc service power output is not provided on the DC power supply type.
(2) The maximum output current of the 5Vdc is 1.5A. However there is the following restrictions, depending on the conditions.
38
Basic Hardware and Function 39
6F3B0253
2.Specifications
2.2Functional specifications
NOTE
(1)The user program stored in the EEPROM is transferred to the RAM when power is turned on. Therefore, if the program is modified, it is necessary to issue the EEPROM Write command from the programming tool. Otherwise, the modified program is
(2)The data of RAM and calendar IC are backed up by
(3)When the optional battery is used, replace the battery periodically with referring to the table below.
40
6F3B0253
2. Specifications
Functional specifications (cont???d)
(2)
(3)Pulse output and PWM output cannot be used simultaneously.
Basic Hardware and Function 41
6F3B0253
2.Specifications
2.3I/O specifications
???Input specifications
*1: User can change the input ON/OFF delay time of the DC input.
The setting range is 0 to 15ms. (Default value = 10ms) Refer to section 8.2.
42
6F3B0253
2. Specifications
???Input signal connections
DC IN
Service power 24Vdc
24Vdc
24Vdc input
NOTE The 24Vdc service power output is not provided on the DC power supply type.
Basic Hardware and Function 43
6F3B0253
2.Specifications
???Output specifications
*1: The switching life of the relay output is as follows. 20 million times or more (mechanical)
100 thousand times or more (electrical, at maximum rated voltage and current)
44
6F3B0253
2. Specifications
???Output signal connections
Service power 24Vdc
PS 240Vac/24Vdc (max.)
Basic Hardware and Function 45
6F3B0253
2.Specifications
2.4External dimensions
???
[mm]
???I/O module
[mm]
46
6F3B0253
Section 3
I/O Application Precautions
3.1Application precautions for input signals, 48
3.2Application precautions for output signals, 50
Basic Hardware and Function 47
6F3B0253
3.I/O Application Precautions
3.1Application precautions for input signals
(1)Minimum ON/OFF time of the input signal
The following conditions guarantee correct reading of the ON/OFF state of the input signal:
Input ON time: ON delay time + the time for one scan
Input OFF time: OFF delay time + the time for one scan
The ON and OFF times of the input signals must be longer than these intervals.
(2)Increasing the contact current
The reliability of some contacts cannot be guaranteed by the specified input current. In this case, install an external bleeder resistor to increase the contact current.
Bleeder resistor
(3)Connecting transistor output device
An example of connecting a transistor output device to
48
6F3B0253
3. I/O Application Precautions
(4)Countermeasures against leakage current
When a switch with an LED or sensor is used, the input sometimes cannot recognize that the switch is off due to the current leakage. In this case, install a bleeder resistor to reduce input impedance.
LE
Bleeder resistor
T1 input
C circuit
Select a bleeder resistor according to the following criteria:
(a)The voltage between the input terminals must be lower than the OFF voltage when the sensor is switched off.
(b)The current must be within the allowable range when the sensor is switched on.
(c)Calculate the wattage of the bleeder resistor by multiplying the current when the sensor is switched on times three.
Basic Hardware and Function 49
6F3B0253
3.I/O Application Precautions
3.2Application precautions for output signals
Failure to do so may cause unexpected behavior of the loads.
2. Configure the external circuit so that the external 24Vdc power required for the transistor output circuits and power to the loads are switched on/off simultaneously. Also, turn off power to the loads before turning off power to the
3. Install fuses appropriate to the load current in the external circuits for the outputs. Failure to do so can cause fire in case of load
(1) 2 points of
The leading 2 points of output (Y020 and Y021) are
These
Note that the specifications of the
(2) Switching life of output relays
Expected relay life is more than 100,000 electrical cycles at rated maximum voltage and current, and more than 20 million mechanical cycles. The expected contact life (electrical cycles) is shown on the table below.
50
6F3B0253
3. I/O Application Precautions
(3)
The output circuit of the
Load T1
output Load
PS Fuse appropriate to
the common current
(4)Output surge protection
Where an inductive load is connected to the output, a relatively high energy transient voltage will be generated when the relay turns OFF. To prevent the problems caused by this surge, install a surge absorber in parallel to the inductive load.
Surge absorber:
???Flywheel diode (for DC output)
Inverse withstand voltage: At least three times that of the power supply
Forward current: Larger than the load current
???Varistor (for AC output)
The voltage rating is 1.2 times the maximum (peak) voltage of the power supply
???CR snubber (for DC or AC output)
R: 0.5 to 1??? per volt coil voltage
C: 0.5 to 1??? F per ampere of coil current
Basic Hardware and Function 51
6F3B0253
52
6F3B0253
Section 4
Installation and Wiring
4.1Environmental conditions, 54
4.2Installing the unit, 55
4.3Wiring terminals, 57
4.4Grounding, 58
4.5Power supply wiring, 59
4.6I/O wiring, 61
Basic Hardware and Function 53
6F3B0253
4.Installation and Wiring
4.1Environmental conditions
Excess temperature, humidity, vibration, shocks, or dusty and corrosive ! CAUTION gas environment can cause electrical shock, fire or malfunction.
Install and use the
Do not install the
??? Where the ambient temperature drops below 0?? C or exceeds 55?? C.
???Where the relative humidity drops below 20% or exceeds 90%.
???Where there is condensation due to sudden temperature changes.
???In locations subject to vibration that exceeds tolerance.
???In locations subject to shock that exceeds tolerance.
???Where there are corrosive or flammable gases.
???In locations subject to dust, machining debris or other particles.
???In locations exposed to direct sunlight.
Observe the following precautions when installing enclosures in which the
???Provide the maximum possible distance from
???If installing the enclosures in the vicinity of
???When sharing the channel base with other panels, check for leakage current from the other panels or equipment.
54
6F3B0253
4. Installation and Wiring
4.2 Installing the unit
1. Improper installation directions or insufficient installation can cause ! CAUTION fire or the units to drop. Install the
accordance with the instructions described in this section.
2.Turn off power before installing or removing any units, modules, racks or terminal blocks. Failure to do so can cause electrical shock or damage to the
3.Entering wire scraps or other foreign debris into to the
NOTE The
Installation precautions:
???Because the
???Do not install the unit directly above equipment that generates a large amount of heat, such as a heater, transformer, or
???Do not install the unit within 200mm of
???Allow at least 70mm on all sides of the unit for ventilation.
???For safely during maintenance and operation, install the unit as far as possible from
???If
???Be sure to install the unit vertically with keeping the power terminals downside. Do not install the unit horizontally or
???Use M4 size screws to mount the
Mount the
Basic Hardware and Function 55
6F3B0253
4. Installation and Wiring
Dimensions for screw mounting:
56
6F3B0253
4. Installation and Wiring
4.3 Wiring terminals
! CAUTION
1. Turn off power before wiring to minimize the risk of electrical shock.
2.Exposed conductive parts of wire can cause electrical shock. Use
3.Turn off power before removing or replacing units, modules, terminal blocks or wires. Failure to do so can cause electrical shock or damage to the
The terminal screw size of the
NOTE
For input and output signal connections, refer to sections 2.4 and 3.
TXA RXA RXB
TXB TRM SG
MDR16SS
TXA RXA RXB
TXB TRM SG
MDR16SSD
NOTE
(1) NC stands for ???no connect???. Do not use the NC terminals for wire relaying or branching.
(2) For the connections of the
The applicable wire size is 0.3mm2 (22 AWG) to 1.25mm2 (16 AWG). The table below shows the recommended wire size.
Basic Hardware and Function 57
6F3B0253
4.Installation and Wiring
4.4Grounding
!CAUTION 1. Turn off power before wiring to minimize the risk of electrical shock.
2.Operation without grounding may cause electrical shock or malfunction. Connect the ground terminal on the
The optimum method for grounding electronic equipment is to ground it separately from other
Although the
Check the grounding against the following criteria.
1.The
2.Equalize the ground potentials when the expansion rack or unit is connected. Ground the
3.Do not connect the ground of the
4.Do not use a ground that has unstable impedance, such as painted screws, or ground subject to vibration.
The grounding marked terminal (see below) is provided on the
In case of the expansion rack is connected to the
Mounting panel
System ground
???1.25mm2 (16 AWG) wire should be used to connect the
???100??? or less to ground is required.
58
6F3B0253
4. Installation and Wiring
4.5 Power supply wiring
! CAUTION
1. Turn off power before wiring to minimize the risk of electrical shock.
2.Applying excess power voltage to the
Wire the power source to the
Power source
??? Power conditions:
???1.25mm2 (16 AWG)
???The power cable should be separated from other cables.
Basic Hardware and Function 59
6F3B0253
4. Installation and Wiring
Connections of the power supply terminals are shown below.
???AC power supply type
100 to 240Vac
Grounding
???DC power supply type
+
24Vdc
-
Grounding
60
6F3B0253
4. Installation and Wiring
4.6 I/O wiring
! CAUTION 1. Turn off power before wiring to minimize the risk of electrical shock.
2.Exposed conductive parts of wire can cause electrical shock. Use
3.Turn off power before removing or replacing units, modules, terminal blocks or wires. Failure to do so can cause electrical shock or damage to the
???Refer to sections 2.4 and 3 for instructions on how to properly wire the I/O terminals.
???0.75mm2 (18 AWG) to 0.3mm2 (22 AWG) wires are recommended for I/O signals.
???Separate the I/O signal cables from
???If expansion rack or unit is used, separate the expansion cable from the power and I/O signal cables by or unit at least 50mm.
???It is recommended to separate the input signal cables from output signal cables.
Basic Hardware and Function 61
6F3B0253
62
6F3B0253
Section 5
Operating System Overview
5.1Operation modes, 64
5.2About the
5.3Scanning, 69
Basic Hardware and Function 63
6F3B0253
5. Operating System Overview
5.1 Operation modes
The
RUN: The RUN mode is a normal
In this mode, the
Program changes and EEPROM write are possible while the
HALT: The HALT mode is a programming mode.
In this mode, user program execution is stopped and all outputs are switched off.
Program loading into the
For the standard T1, program changes and EEPROM write are possible only when the T1 is in the HALT mode.
ERROR: The ERROR mode is a shutdown mode as a result of
The
To exit from the ERROR mode, execute the Error Reset command from the programming tool, or cycle power off and then on again.
HOLD: The HOLD mode is provided mainly for checking the external I/O signals. In this mode, user program execution is stopped, with input and output updating is executed. It is therefore possible to suspend program execution while holding the output state. Moreover, a desired output state can be established by setting any data by using the programming tool.
Deferent from the normal RUN mode, the
64
6F3B0253
5. Operating System Overview
The operation modes are switched by the mode control switch provided on the
The mode transition conditions are shown below.
ERROR
n Mode control switch is in R (RUN) side. o Mode control switch is in H (HALT) side.
pMode control switch is turned to H (HALT) side, or HALT command is issued from the programming tool.
qMode control switch is turned to R (RUN) side, or RUN command is issued from the programming tool.
r Force RUN
t HOLD Cancel command is issued from the programming tool. u Error Reset command is issued from the programming tool.
(dotted line) Error is detected by
NOTE
The commands from the programming tool are available when the mode control switch is in R (RUN) side.
Basic Hardware and Function 65
6F3B0253
5. Operating System Overview
5.2 About the
The
The table below shows the contents stored in the
The user program and the data stored in the EEPROM are transferred to the RAM when power is turned on. Subsequent program execution is done based on the RAM contents. Program editing is also performed on the RAM contents.
Therefore, if the program is modified, it is necessary to issue the EEPROM Write command from the programming tool. Otherwise, the modified program is over- written by original EEPROM contents when the power is turned off and on again.
66
cExecuted when power is turned on (it is called initial load) or EEPROM Read command is issued from the programming tool. The EEPROM Read is possible only in the HALT mode.
dExecuted when EEPROM Write command is issued from the programming tool. It is possible in either HALT or RUN mode. (See Note)
Basic Hardware and Function 67
6F3B0253
5. Operating System Overview
Special register SW55 is used to specify the number of Data registers to be stored in the EEPROM. The allowable setting value is 0 to 2048.
The table below shows the correspondence between the SW55 value and Data registers saved in the EEPROM.
When the EEPROM Write command is executed, the
At the initial load or the EEPROM Read command is executed, the
NOTE
(1)The EEPROM has the life limit for writing. It is 100,000 times. Pay attention not to exceed the limit. If the number of execution of EEPROM Write command exceeds 100,000 times, EEPROM alarm flag (S007) comes ON.
(2)Even in RUN mode, the EEPROM Write command can be executed. However, in this case, only the user program is written into the EEPROM. (D register data and setting information are not saved.)
(3)The data in the EEPROM can also be read or written by using the program instruction (FUN236 XFER instruction).
(4)When the EEPROM writing is executed by the XFER instruction in the user program,
68
6F3B0253
5. Operating System Overview
5.3 Scanning
The flowchart below shows the basic internal operations performed by the
Scan cycle
Basic Hardware and Function 69
6F3B0253
5. Operating System Overview
Hardware check:
Performs checking and initialization of the system ROM, the system RAM and the peripheral LSIs.
Initial load:
Transfers the user program and user data from the EEPROM to the RAM. (Refer to section 5.2)
Register/device initialization:
Initializes registers and devices as shown below.
NOTE
(1)When the data stored in the EEPROM (Data registers) are used, these registers should be specified as retentive. Otherwise, these data are transferred from EEPROM to RAM, but then cleared to 0 at the initialization.
(2)The data in the retentive registers are stored in RAM and backed up by
The
(3)The retentive registers can be set by the programming tool for RW, T, C and D registers. The registers from address 0 to the designated address for each type are set as retentive registers. Refer to the separate manual for the programming tool for setting the retentive registers.
(4)The input force and the forced coil are functions for program debugging. For details, refer to section 6.7.
70
6F3B0253
5. Operating System Overview
Checks the proper operation of the
Mode control:
Checks the mode control switch status and the mode control request commands from the programming tool.
The scan mode ??? floating scan or
NOTE
The floating scan:
When one scan is finished, immediately starts the next scan. The scan time is shortest, but may vary depending on the program execution status.
The
The scan operation is started every
Scan time (50 ms fixed)
(idling)
Scan time (50 ms fixed)
(idling)
Program check:
At the beginning of the RUN mode, the user program is compiled and its validity is checked.
I/O update:
Reads the external input signals into the external input devices/registers (X/XW), and sends the data of the external output devices/registers (Y/YW) to the external output circuits. Then the outputs (relays, etc.) changes the states and latches until the next I/O update timing.
The states of the forced input devices are not updated by this operation.
Timer update:
Updates the timer registers which are activated in the user program, and the timing devices (S040 to S047).
Basic Hardware and Function 71
6F3B0253
5. Operating System Overview
User program execution:
Executes the programmed instructions from the beginning to the END instruction. This is the essential function of the
In this section, only the main program execution is mentioned. For other program types, such as timer interrupt, etc., refer to section 6.5.
Peripheral support:
Supports the communications with the programming tool or external devices connected by the computer link function. The time for this operation is limited within approx. 2 ms in the floating scan mode, and within allowable idling time in the fixed- time scan mode.
If the special relay S158 is set to ON, the peripheral support priority mode is selected. In the peripheral support priority mode, the peripheral support time is not limited. As the result, the communication response is improved although the scan time becomes long at the time.
72
6F3B0253
Section 6
Programming Information
6.1Devices and registers, 74
6.2Index modification, 86
6.3
6.4I/O allocation, 89
6.5
6.6User program configuration, 92
6.7Programming language, 98
6.8Program execution sequence, 99
6.9
6.10Password protection, 103
Basic Hardware and Function 73
6F3B0253
6. Programming Information
6.1 Devices and registers
The
Devices are used to store the ON/OFF information of contacts and coils, and registers are used to store
Devices are divided into six types:
XExternal input devices
YExternal output devices
RAuxiliary relay devices
SSpecial devices
T.Timer devices
C. Counter devices
Registers are divided into eight types:
CCounter registers
DData registers
I, J, K Index registers
Device and register numbers
X devices share the same memory area as XW registers. Device X004, for example, represents the number 4 bit in the XW00 register.
X004
Thus, "X004 is ON" means that bit number 4 of XW00 is 1.
Y, R, and S devices work in a similar manner.
74
6F3B0253
6. Programming Information
Addressing devices
A device number of X, Y, R and S devices consist of a register number and bit position as follows.
X 00 4
Represents bit position 0 to F in the register.
Decimal number representing the register containing the corresponding device.
Represents the type of device. (X, Y, R, or S)
As for the timer (T.) and the counter (C.) devices, a device number is expressed as follows.
T. 12
Corresponding register number. (decimal number)
Represents the type of device. (T. or C.)
Dot (.) is used to identify as device.
Addressing registers
A register number except the index registers is expressed as follows.
XW 01
Register number. (decimal number)
Represents the type of register. (XW, YW, RW, SW, T, C or D)
The index registers (I, J and K) do not have the number.
J
I, J, or K
Basic Hardware and Function 75
6F3B0253
6. Programming Information
Available address range
Upper 16bits Lower 16bits
In this manual, a
For example, D0101???D0100.
76
6F3B0253
6. Programming Information
External input devices (X)
These devices (X) indicate the ON/OFF states of external input signals through the input circuits. External input devices can be used many times in a program.
External output devices (Y)
The external output devices (Y) store the ON/OFF signals that drive the external devices through the output circuits. They can be used for coils in a program.
External input registers (XW)
These (XW) are
External output registers (YW)
These
Auxiliary relay devices and registers (R/RW)
The auxiliary relay devices (R) are used to store intermediate results of sequences. The auxiliary relay registers (RW) are used to store temporary results of function instructions. The data in R/RW cannot be output directly to the output circuits. It is necessary to move the data to Y/YW.
It is possible to make these registers retentive so that they retain data in the event of a power failure. See section 5.3.
Timer devices and registers (T./T)
The timer registers (T) are used for storing the elapsed time of timer instructions, the
0.01 s base timers and 0.1 s base timers are provided.
The timer devices (T.) work as the output of the timer instructions.
It is possible to specify the T registers as retentive to retain their data in the event of a power failure. See section 5.3.
Basic Hardware and Function 77
6F3B0253
6. Programming Information
Counter devices and registers (C./C)
The counter registers (C) are used for storing the count value of the counter (CNT) and the
The counter devices (C.) work as the output of the counter instructions.
It is possible to specify the C registers as retentive to retain their data in the event of a power failure. See section 5.3.
Data registers (D)
Functionally the data registers (D) are the same as auxiliary relay registers (RW) except that the D registers cannot be used as devices.
A part of the data registers are saved in the
The range of the data registers saved in the EEPROM can be specified by SW55. See section 5.2.
It is possible to specify the D registers as retentive to retain their data in the event of a power failure. See section 5.3.
Index registers (I, J, and K)
These index registers are used for indirect addressing for a register.
For example, if the value of I is 100 in the following register expression, it designates D0100. For details, refer to section 6.2.
I
D0000 D0100 if I=100
78
6F3B0253
6. Programming Information
Special devices and registers (S/SW)
The special devices (S) and special registers (SW) are used for special purposes. See list below.
(2)Devices marked as (down) are set in the ERROR mode. Therefore these devices cannot be used in the user program.
(3)Devices marked as (alarm) are set in the normal operation mode. These devices can be used in the user program.
Basic Hardware and Function 79
6F3B0253
6. Programming Information
(2)Devices marked as (down) are set in the ERROR mode. Therefore these devices cannot be used in the user program.
80
6F3B0253
(2)Devices marked as (down) are set in the ERROR mode. Therefore these devices cannot be used in the user program.
Basic Hardware and Function 81
NOTE
(1) Devices marked as (down) are set in the ERROR mode. Therefore these devices cannot be used in the user program.
(2) CF, ERF and devices marked as (alarm) can be reset by the user program.
82
6F3B0253
6. Programming Information
(2)Devices marked as (down) are set in the ERROR mode. Therefore these devices cannot be used in the user program.
Basic Hardware and Function 83
6F3B0253
6. Programming Information
84
NOTE
(1) For details of SW54, refer to section 1.5.1.
(2) For details of SW55, refer to section 5.2.
(3) For details of SW56 through SW58, refer to the Communication function manual.
Basic Hardware and Function 85
6F3B0253
6. Programming Information
6.2 Index modification
When registers are used as operands of instructions, the method of directly designating the register address as shown in Example 1) below is called ???direct addressing???.
As opposed to this, the method of indirectly designating the register by combination with the contents of the index register (I, J, or K) as shown in Example 2) below is called ???indirect addressing???. In particular, in this case, since the address is modified using an index register, this is called ???index modification???.
Example 1)
??? [ RW10 MOV D1000 ]???
Data transfer instruction
Transfer data of RW10 to D1000
Example 2)
IJ
??? [ RW10 MOV D0000 ]???
Data transfer instruction (with index modification) Transfer data of RW(10 + I) to D(0000 + J)
(If I = 3 and J = 200, the data of RW13 is transferred to D0200)
There are 3 types of index register, I, J and K. Each type processes
There is no special instruction for substituting values in these index registers. These are designated as destination of data transfer instructions, etc.
NOTE
(1)The index modification is available for RW, T, C and D registers.
(2)If index registers are used as a
86
6F3B0253
6. Programming Information
The followings are examples of index modifications.
I
RW10
J
D0201???D0200
When I = 0, it designates RW10. When I = 1, it designates RW11. When I =
When J = 0, it designates D0201???D0200. When J = 1, it designates D0202???D0201. When J = 2, it designates D0203???D0202. When J =
! CAUTION Be careful that the registers do not exceed the address range by the index modification. The address range is not checked by the
NOTE
Substitutions of values into index registers and index modifications can be used any times in a program. Normally, the program will be easier to see if a value substitution into an index register is positioned immediately before the index modification.
Basic Hardware and Function 87
6F3B0253
6. Programming Information
6.3
The
These data are stored in the special registers SW07 to SW13 by
Program example:
In the following circuit, output Y030 turns ON for 1 minute at every Sunday 6 pm.
(H0018)
Clock/calendar back up:
The clock/calendar continues updating even while the power to the
As shown in the table, it is recommended to use the optional battery when the real- time clock/calendar function is used.
In the
Setting the clock/calendar:
To set the clock/calendar data, the following 2 ways are available. In both cases, the week data is automatically calculated.
(1)Setting the clock/calendar data on the system information screen of the programming tool.
(2)Using the Calendar Set instruction (CLND) in the user program.
88
6F3B0253
6. Programming Information
6.4 I/O allocation
The external input signals are allocated to the external input devices/registers (X/XW). The external output signals are allocated to the external output devices/registers (Y/YW).
The register numbers of the external input and output registers are consecutive. Thus one register number can be assigned for either input or output.
As for the
X000
Any operations for the I/O allocation are not required if only the T1
However, if the I/O modules are used with the
Basic Hardware and Function 89
6F3B0253
6. Programming Information
Internally, the
The contents of the I/O allocation table are as follows.
PU slot must be blank
Slot 0 is for basic unit (XW00, XW01, YW02 and YW03 are assigned internally)
Slots 1 to 7 of unit 0 are not used (must be blank)
These slots are for I/O modules
The
When the
NOTE
(1)Unit base address setting function is not supported by the
(2)When the
90
6F3B0253
6. Programming Information
6.5
The program capacity of the
That is, the
In the 4 k mode,
To set the
Basic Hardware and Function 91
6F3B0253
6. Programming Information
6.6 User program configuration
A group of instructions for achieving the
A ???step??? is the minimum unit, which composes an instruction. Number of steps required for one instruction is depending on the type of instruction. Refer to section 7.1.
The figure below shows the
RAM
System information
Data registers mentioned in section 5.2
Other registers/ devices
NOTE
For conditions of transfer between RAM and EEPROM, see section 5.2.
92
6F3B0253
6. Programming Information
System information
System information is the area which stores execution control parameters. The following contents are included in the system information.
(1)Machine parameters (hardware type, memory type)
(2)User program information (program ID, system comments, number of steps used)
(3)Passwords
(4)Retentive register area information
(5)T1S program memory mode, 4 k steps or 8 k steps
(6)Execution control parameters (scan mode, timer interrupt interval)
(7)Station number setting for programmer port (T1), or
(8)I/O allocation table
(9)Input force table
The system information is stored in the
User program
The
The user program is stored by each program types as shown in the following diagram, and is managed by units called blocks in each program types.
User program configuration (Program types)
Main program
Timer interrupt
I/O interrupt #1
I/O interrupt #2
I/O interrupt #3
I/O interrupt #4
Program type internal configuration (Blocks)
Block 1
Block 2
Block 10
Block N
(N = max. 256)
Block 1
Subroutine
Basic Hardware and Function 93
6F3B0253
6. Programming Information
In the user program, the main program is the core. The scan operation explained in section 5.3 is for the main program. The operation of other program types are explained in the following sections.
The following 8 program types are supported by the
(1)Main program
(2)
(3)Timer interrupt program
(4)I/O interrupt program #1
(5)I/O interrupt program #2
(6)I/O interrupt program #3
(7)I/O interrupt program #4
(8)Subroutine
The blocks are just separators of the program, and have no effect on the program execution. However, by dividing the user program into some blocks, the program becomes easy to understand. The block numbers need not be consecutive.
In each program type and block, there is no limit of program capacity. The only limit is the total capacity.
6.6.1 Main program
The main program is the core of the user program. It is executed once in each scan.
Time
In the above figure,
Mode means the mode control operation I/O means the I/O update processing Timer means the timer up date processing
Main program means the main program execution
the
The end of the main program is recognized by the END instruction.
Although instructions may be present after the END instruction, these portions will not be executed.
94
6F3B0253
6. Programming Information
6.6.2
If the
Therefore, the
The figure below shows the first scan operation.
Time
The end of the
6.6.3Timer interrupt program
The timer interrupt is the highest priority task. It is executed cyclically with a user specified interval, with suspending other operation.
The interrupt interval is set in the system information. (5 to 1000 ms, 5 ms units)
Scan
Time
The end of the timer interrupt is recognized by the IRET instruction.
Basic Hardware and Function 95
6F3B0253
6.Programming Information
6.6.4I/O interrupt programs
The I/O interrupt program is also the highest priority task. It is executed immediately when the interrupt factor is generated, with suspending other operation.
The following 4 types I/O interrupt programs are supported in the T1/T1S.
(1)I/O interrupt #1
The I/O interrupt #1 is used with the high speed counter function. When the count value reaches the preset value, etc., the I/O interrupt #1 is activated immediately with suspending other operation. The end of the I/O interrupt #1 is recognized by the IRET instruction. For detailed information, refer to section 8.3.
(2)I/O interrupt #2
The I/O interrupt #2 is also used with the high speed counter function. Refer to section 8.3 for details.
(3)I/O interrupt #3
The I/O interrupt #3 is used with the interrupt input function. When the state of the interrupt input is changed from OFF to ON (or ON to OFF), the I/O interrupt #3 is activated immediately with suspending other operation. The end of the I/O interrupt #3 is also recognized by the IRET instruction. For detailed information, refer to section 8.4.
(4)I/O interrupt #4
The I/O interrupt #4 is also used with the interrupt input function. Refer to section 8.4 for details.
If an interrupt factor is generated while other interrupt program is executing (including the timer interrupt), the interrupt factor is held. Then it will be activated after finishing the other interrupt program execution.
If two or more interrupt factors are generated at the same time, the priority is as follows.
Timer > I/O #1 > I/O #2 > I/O #3 > I/O #4
96
6F3B0253
6. Programming Information
6.6.5Subroutines
In the program type ???Subroutine???, The following number of subroutines can be programmed.
The
The subroutine is not a independent program. It is called from other program types (main program,
One subroutine is started with the SUBR instruction, and ended by the RET instruction.
It is necessary to assign a subroutine number to the SUBR instruction. The available subroutine numbers are 0 to 255.
??? [ SUBR (000) ]???
Subroutine number
The RET instruction has no subroutine number.
The instruction that calls a registered subroutine is the CALL instruction. The CALL instruction has the subroutine number to be called.
??? [ CALL N.000 ]???
Subroutine number
NOTE
(1)Multiple subroutines can be programmed in a block. However, one subroutine in one block is recommended.
(2)From the inside of a subroutine, other subroutines can be called (nesting). Its allowable level is up to 3 levels.
Basic Hardware and Function 97
6F3B0253
6. Programming Information
6.7 Programming language
The programming language of the
Ladder diagram is a language, which composes program using relay symbols as a base in an image similar to a
The ladder diagram program is constructed by units called ???rung???. A rung is defined as one network which is connected each other.
1
2
3
The rung numbers are a series of numbers (decimal number) starting from 1, and cannot be skipped. There is no limit to the number of rungs.
The size of any one rung is limited to 11 lines ??? 12 columns.
A example of a ladder diagram program is shown below.
When X005 is ON or the data of D0100 is greater than 200, Y027 comes ON. Y027 stays ON even if X005 is OFF and the data of D0100 is 200 or less. Y027 will come OFF when X006 comes ON.
98
6F3B0253
6. Programming Information
6.8 Program execution sequence
The instructions execution sequence is shown below.
(1) They are executed in the sequence from block 1 through the final block, which contains the END instruction (or IRET in an interrupt program).
(2) They are executed in the sequence from rung 1 through the final rung in a block (or the END instruction).
(3) They are executed according to the following rules in any one rung.
The instructions execution sequence in which function instructions are included also follows the above rules. However, for program execution control instructions, such as jumps (JCS), loops
Basic Hardware and Function 99
6F3B0253
6. Programming Information
6.9
The following
NOTE
Refer to section 6.5 for 4 k/8 k mode.
Force function
Two types of force functions are available, input force and coil force.
The input force is used to disable the external input signals. When an external input device is designated as forced input, the ON/OFF state of the device can be changed manually by using the data setting function of the programming tool, regardless of the corresponding external signal state. The input force designation is available for the external input devices (X).
The coil force is used to disable the coil instruction. When a coil instruction on the program is designated as forced coil, the ON/OFF state of the coil device can be changed manually by using the data setting function of the programming tool, regardless of the coil circuit execution status.
On the programming tool, the forced input and forced coil are expressed as follows.
NOTE
If EEPROM write operation is executed with remaining the force designation, the force designation is also saved into the
100
6F3B0253
6. Programming Information
Sampling trace function
The sampling trace function collects the status of specified devices or register at every specified sampling timing. The collected data can be displayed on the programmer
This function is useful for program debugging and troubleshooting.
The collected data is stored in the
The buffer works as a ring buffer, and latest collected data can be displayed.
The sampling start/stop condition (arm condition) and the collection timing (trigger condition) can be specified by status changing of devices.
For detailed key operations for arm/trigger conditions setting on the
Basic Hardware and Function 101
6F3B0253
6. Programming Information
Timer/counter preset value (constant data) changing
The preset value (constant data) of timer or counter instruction can be changed in on- line (during RUN) by using the programming tool.
Function instruction constant operand changing
The constant operand of function instruction can be changed in
Device changing
The device of contact or coil instruction can be changed in
When the T1S???s memory mode is 4 k mode, the program can be changed using normal edit mode. (rung by rung)
In the
END, MCS, MCR, JCS, JCR, FOR, NEXT, CALL, SUBR, RET, IRET
NOTE
The above
The EEPROM write is possible in
During this operation, the
102
6F3B0253
6. Programming Information
6.10 Password protection
The
There are four levels of protection. Accordingly, three levels of passwords can be registered to control the protection levels.
These passwords are stored in the
The outline of the protection levels are shown below. For details, refer to the manual for the programming tool.
When the level 1, 2 and 3 passwords are registered, the
NOTE
When you use the password function, do not forget the level 1 password. Otherwise, you cannot change/release the registered passwords.
Basic Hardware and Function 103
6F3B0253
104
6F3B0253
Section 7
Instructions
7.1List of instructions, 106
7.2Instruction specifications, 116
Basic Hardware and Function 105
6F3B0253
7.Instructions
7.1List of instructions
The
The tables listing these instructions are provided as a quick reference. (Note: In the following table, italic character means operand, i.e. register, device or constant value.)
Basic ladder instructions
106
6F3B0253
7. Instructions
Basic ladder instructions (continued)
Data transfer instructions
Basic Hardware and Function 107
6F3B0253
7. Instructions
Arithmetic operations
108
6F3B0253
7. Instructions
Logical operations
Shift operations
Basic Hardware and Function 109
6F3B0253
7. Instructions
Rotate operations
Compare instructions
110
6F3B0253
7. Instructions
Compare instructions (continued)
Special data processing
Basic Hardware and Function 111
6F3B0253
7. Instructions
Program control instructions
RAS
112
6F3B0253
7. Instructions
Functions
Basic Hardware and Function 113
6F3B0253
7. Instructions
Conversion instructions
114
6F3B0253
7. Instructions
Special I/O instructions
*1: Direct I/O instruction is effective only for the basic unit inputs/outputs.
*2: The expanded data transfer (XFER) instruction supports some special functions. It also supports the communication function. The execution speed shown in the above table is for the EEPROM read/write function. When the Inverter connection mode is selected, the execution speed of this instruction is typically 150 ??? s (max. 500 ??? s).
Basic Hardware and Function 115
6F3B0253
7.Instructions
7.2Instruction specifications
The following pages in this section describe the detailed specifications of each instruction. On each page, the following items are explained.
Expression
Shows the operands required for the instruction as italic characters.
Function
Explains the functions of the instruction with referring the operands shown on the Expression box.
Execution condition
Shows the execution condition of the instruction and the instruction output status.
Operand
Shows available register, device or constant value for each operand. For constant operand, available value range is described. If the constant column is just marked (??? ), it means normal value range
Whether index modification for a register operand is usable or not is also shown for each operand.
Example
Explains the operation of the instruction by using a typical example.
Note
Explains supplementary information, limitations, etc. for the instruction.
116
6F3B0253
7. Instructions
NO contact
Expression
A
Input Output
Function
NO (normally open) contact of device A.
When the input is ON and the device A is ON, the output is turned ON.
Execution condition
Operand
Example
Coil Y022 comes ON when the devices X000 and R001 are both ON.
X000
R001
Y022
Basic Hardware and Function 117
6F3B0253
7. Instructions
NC contact
Expression
A
Input Output
Function
NC (normally closed) contact of device A.
When the input is ON and the device A is OFF, the output is turned ON.
Execution condition
Operand
Example
Coil Y022 comes ON when the devices X000 and R001 are both OFF.
X000
R001
Y022
118
6F3B0253
7. Instructions
Transitional contact (Rising edge)
Expression
Input Output
Function
When the input at last scan is OFF and the input at this scan is ON, the output is turned ON. This instruction is used to detect the input changing from OFF to ON.
Execution condition
Operand
No operand is required.
Example
Coil Y022 comes ON for only 1 scan when the device X000 comes ON.
X000
Y022
1 scan time 1 scan time
Note
??? In case of T1, the maximum usable number in a program is 512. ( and total)
???In case of T1S, the maximum usable number in a program is 2048.
Basic Hardware and Function 119
6F3B0253
7. Instructions
Transitional contact (Falling edge)
Expression
Input Output
Function
When the input at last scan is ON and the input at this scan is OFF, the output is turned ON. This instruction is used to detect the input changing from ON to OFF.
Execution condition
Operand
No operand is required.
Example
Coil Y022 comes ON for only 1 scan when the device X000 comes OFF.
X000
Y022
1 scan time1 scan time
Note
??? In case of T1, the maximum usable number in a program is 512. ( and total)
???In case of T1S, the maximum usable number in a program is 2048.
120
6F3B0253
7. Instructions
Expression
A
Input ( )
Function
Relay coil of device A.
When the input is ON, the device A is set to ON.
Execution condition
Operand
Example
Coil Y025 comes ON when the devices X000 is ON.
X000
Y025
Basic Hardware and Function 121
6F3B0253
7. Instructions
Forced coil
Expression
A
Input
Function
Regardless of the input sate the state of device A is retained.
Execution condition
Operand
Example
Device Y025 retains the preceding state regardless of the devices X000 state.
X000
Y025
Note
???The forced coil is a debugging function. The state of a forced coil device can be set ON or OFF by the programming tool.
122
6F3B0253
7. Instructions
I Inverter
Expression
Input I Output
Function
When the input is OFF, the output is turned ON, and when the input is ON, the output is turned OFF.
This instruction inverts the link state.
Execution condition
Operand
No operand is required.
Example
Y022 comes ON when X000 is OFF, and Y022 comes OFF when X000 is ON.
X000
Y022
Basic Hardware and Function 123
6F3B0253
7. Instructions
( I ) Invert coil
Expression
A
Input ( I )
Function
When the input is OFF, the device A is set to ON, and when the input is ON, the device A is set to OFF. This instruction inverts the input state and store it in the deviceA.
Execution condition
Operand
Example
Y025 comes ON when X000 is OFF, and Y025 comes OFF when X000 is ON.
X000
Y025
124
6F3B0253
7. Instructions
P Positive pulse contact
Expression
A
Input P Output
Function
When the input is ON and the device A is changed from OFF to ON (OFF at last scan and ON at this scan), the output is turned ON.
This instruction is used to detect the device changing from OFF to ON.
Execution condition
Operand
Example
R100 comes ON for only 1 scan when X000 is ON and X003 changes to ON.
X000
X003
R100
1 scan time 1 scan time
Note
???The maximum usable number in a program is 2048.
Basic Hardware and Function 125
6F3B0253
7. Instructions
N Negative pulse contact
Expression
A
Input N Output
Function
When the input is ON and the device A is changed from ON to OFF (ON at last scan and OFF at this scan), the output is turned ON.
This instruction is used to detect the device changing from ON to OFF.
Execution condition
Operand
Example
R100 comes ON for only 1 scan when X000 is ON and X003 changes to OFF.
X000
X003
R100
1 scan time 1 scan time
Note
???The maximum usable number in a program is 2048.
126
6F3B0253
7. Instructions
( P ) Positive pulse coil
Expression
A
Input ( P )
Function
When the input is changed form OFF to ON, the device A is set to ON for 1 scan time. This instruction is used to detect the input changing from OFF to ON.
Execution condition
Operand
Example
R101 comes ON for only 1 scan when X000 is changed from OFF to ON.
X000
R100
Note
???The maximum usable number in a program is 2048.
Basic Hardware and Function 127
6F3B0253
7. Instructions
( N ) Negative pulse coil
Expression
A
Input ( N )
Function
When the input is changed form ON to OFF, the device A is set to ON for 1 scan time. This instruction is used to detect the input changing from ON to OFF.
Execution condition
Operand
Example
R101 comes ON for only 1 scan when X000 is changed from ON to OFF.
X000
R100
1 scan time 1 scan time
Note
???The maximum usable number in a program is 2048.
128
6F3B0253
7. Instructions
TON ON delay timer
Expression
Input ??? [ A TON B ]??? Output
Function
When the input is changed from OFF to ON, timer updating for the timer register B is started. The elapsed time is stored in B. When the specified time by A has elapsed after the input came ON, the output and the timer device corresponding to B is turned ON. (Timer updating is stopped)
When the input is changed from ON to OFF, B is cleared to 0, and the output and the timer device are turned OFF.
The available data range for operand A is 0 to 32767.
Execution condition
Operand
Example
Y021 (and the timer device T.000) is turned ON 2 seconds after X000 came ON.
X000
Presetvalue
T000
T.000
Y021
Preset time (2s) Less than preset time
Note
???Time is set in 10 ms units for;
T1: T000 to T031 (0 to 327.67 s)
T1S: T000 to T063 (0 to 327.67 s)
???Time is set in 100 ms units for; T1: T032 to T063 (0 to 3276.7 s) T1S: T064 to T255 (0 to 3276.7 s)
???Multiple timer instructions (TON, TOF or SS) with the same timer register are not allowed.
Basic Hardware and Function 129
6F3B0253
7. Instructions
TOF OFF delay timer
Expression
Input ??? [ A TOF B ]??? Output
Function
When the input is changed from OFF to ON, the output and the timer device corresponding to the timer register B are set to ON. When the input is changed from ON to OFF, timer updating for B is started. The elapsed time is stored in B. When the specified time by A has elapsed after the input came OFF, the output and the timer device are turned OFF. (Timer updating is stopped)
The available data range for operand A is 0 to 32767.
Execution condition
Operand
Example
Y021 (and the timer device T.002) is turned OFF 1 second after X000 came OFF.
X000
Preset value T002
T.002
Y021
Preset time (1 s) Less than preset time
Note
???Time is set in 10 ms units for;
T1: T000 to T031 (0 to 327.67 s)
T1S: T000 to T063 (0 to 327.67 s)
???Time is set in 100 ms units for; T1: T032 to T063 (0 to 3276.7 s) T1S: T064 to T255 (0 to 3276.7 s)
???Multiple timer instructions (TON, TOF or SS) with the same timer register are not allowed.
130
6F3B0253
7. Instructions
SS Single shot timer
Expression
Input ??? [ A SS B ]??? Output
Function
When the input is changed from OFF to ON, the output and the timer device corresponding to the timer register B are set to ON, and timer updating for B is started. The elapsed time is stored in B. When the specified time by A has elapsed after the input came ON, the output and the timer device are turned OFF. (Timer updating is stopped)
The available data range for operand A is 0 to 32767.
Execution condition
Operand
Example
Y021 (and the timer device T.003) is turned OFF 1 second after X000 came ON.
X000
Preset value T003
T.003
Y021
Note
???Time is set in 10 ms units for;
T1: T000 to T031 (0 to 327.67 s)
T1S: T000 to T063 (0 to 327.67 s)
???Time is set in 100 ms units for; T1: T032 to T063 (0 to 3276.7 s) T1S: T064 to T255 (0 to 3276.7 s)
???Multiple timer instructions (TON, TOF or SS) with the same timer register are not allowed.
Basic Hardware and Function 131
6F3B0253
7. Instructions
Function
While the enable input is ON, this instruction counts the number of the count input changes from OFF to ON. The count value is stored in the counter register B. When the count value reaches the set value A, the output and the counter device corresponding to B are turned ON. When the enable input comes OFF, B is cleared to 0 and the output and the counter device are turned OFF.
The available data range for operand A is 0 to 65535.
Execution condition
Operand
Example
X001
X002
C.010
Y021
Note
???No transitional contact is required for the count input. The count input rising edge is detected by this instruction.
???For the count input, direct linking to a
connecting point is not allowed. In this case, insert a dummy contact (always ON = S04F, etc.) just before the input.
Refer to Note of Shift register FUN 074.
???Multiple counter instructions (CNT) with
132
6F3B0253
7. Instructions
Function
When the MCS input is ON, ordinary operation is performed. When the MCS input is OFF, the state of left power rail between MCS and MCR is turned OFF.
Execution condition
Operand
No operand is required.
Example
When X000 is OFF, Y021 and Y022 are turned OFF regardless of the states of X001 and X002.
Equivalent circuit
X000
Note
Basic Hardware and Function 133
6F3B0253
7. Instructions
Function
When the JCS input is ON, instructions between JCS and JCR are skipped (not executed). When the JCS input is OFF, ordinary operation is performed.
Execution condition
Operand
No operand is required.
Example
When X000 is ON, the rung 2 circuit is skipped, therefore Y021 is not changed its state regardless of the X001 state. When X000 is OFF, Y021 is controlled by the X001 state.
Note
???JCS and JCR must be used as a pair.
???Nesting is not allowed.
134
6F3B0253
7. Instructions
END End
Expression
[ END ]
Function
Indicates the end of main program or
Execution condition
Operand
No operand is required.
Example
Note
???For debugging purpose, 2 or more END instructions can be written in a program.
???Instructions after END instruction are not executed. Those steps are, however, counted as used steps.
Basic Hardware and Function 135
6F3B0253
7. Instructions
FUN 018 MOV Data transfer
Expression
Input ??? [ A MOV B ]??? Output
Function
When the input is ON, the data of A is stored in B.
Execution condition
Operand
Example 1 (constant to register)
When R010 is ON, a constant data (12345) is stored in D0100 and the output is turned ON.
Example 2 (register to register)
When X005 is ON, the data of SW30 is stored in RW45 and the output is turned ON. If SW30 is 500, the data 500 is stored in RW45.
Example 3 (index modification)
When R050 is changed from OFF to ON, the data of RW08 is stored in the index register I and the data of D(0000+I) is stored in YW10. If RW08 is 300, the data of D0300 is stored in YW10.
136
6F3B0253
7. Instructions
FUN 019 DMOV
Expression
Input ??? [ A+1???A MOV B+1???B ]??? Output
Function
When the input is ON, the
Execution condition
Operand
Example
When R011 is ON, a
Basic Hardware and Function 137
6F3B0253
7. Instructions
FUN 020 NOT Invert transfer
Expression
Input ??? [ A NOT B ]??? Output
Function
When the input is ON, the
Execution condition
Operand
Example
When R010 is ON, the
F E D C B A 9 8 7 6 5 4 3 2 1 0
RW30 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1
4 3 2 1
F E D C B A 9 8 7 6 5 4 3 2 1 0
D0200 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0
B C D E
138
6F3B0253
7. Instructions
FUN 022 XCHG Data exchange
Expression
Input ??? [ A XCHG B ]??? Output
Function
When the input is ON, the data of A and the data of B is exchanged.
Execution condition
Operand
Example
When R005 is ON, the data of RW23 and D0100 is exchanged. If the original data of RW23 is 23456 and that of D0100 is 291, the operation result is as follows.
Basic Hardware and Function 139
6F3B0253
7. Instructions
FUN 024 TINZ Table initialize
Expression
Input ??? [ A TINZ (n) B ]??? Output
Function
When the input is ON, the data of A is stored in n registers starting with B.
The allowable range of the table size n is 1 to 1024 words.
Execution condition
Operand
Example
When R010 is ON, a constant data (0) is stored in 100 registers starting with D0200 (D0200 to D0299) and the output is turned ON.
140
6F3B0253
7. Instructions
FUN 025 TMOV Table transfer
Expression
Input ??? [ A TMOV (n) B ]??? Output
Function
When the input is ON, the data of n registers starting with A are transferred to n registers starting with B in a block. The allowable range of the table size n is 1 to 1024 words.
Execution condition
Operand
Example
When R010 is ON, the data of D0500 to D0509 (10 registers) are block transferred to D1000 to D1009, and the output is turned ON.
Note
???The source and destination tables can be overlapped.
Basic Hardware and Function 141
6F3B0253
7. Instructions
FUN 026 TNOT Table invert transfer
Expression
Input ??? [ A TNOT (n) B ]??? Output
Function
When the input is ON, the data of n registers starting with A are
Execution condition
Operand
Example
When R010 is ON, the data of D0600 to D0604 (5 registers) are
Note
???The source and destination tables can be overlapped.
142
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are added, and the result is stored in C. If the result is greater than 32767, the upper limit value 32767 is stored in C, and the output is turned ON. If the result is smaller than
Execution condition
Operand
Example
When R005 is ON, the data of D0100 and the constant data 1000 is added, and the result is stored in D0110.
If the data of D0100 is 12345, the result 13345 is stored in D0110, and R010 is turned OFF.
D0100 12345
Constant 1000
If the data of D0100 is 32700, the result exceeds the limit value, therefore 32767 is stored in D0110, and R010 is turned ON.
Basic Hardware and Function 143
6F3B0253
7. Instructions
Function
When the input is ON, the data of B is subtracted from the data of A, and the result is stored in C. If the result is greater than 32767, the upper limit value 32767 is stored in C, and the output is turned ON. If the result is smaller than
Execution condition
Operand
Example
When R005 is ON, the constant data 2500 is subtracted from the data of D0200, and the result is stored in RW50.
If the data of D0200 is 15000, the result 12500 is stored in RW50, and R010 is turned OFF.
D0200 15000
Constant 2500
If the data of D0200 is
144
6F3B0253
7. Instructions
Function
When the input is ON, the data of A is multiplied by the data of B, and the result is stored in
Execution condition
Operand
Example
When R005 is ON, the data of D0050 is multiplied by the data of RW05, and the result is stored in
If the data of D0050 is 1500 and the data of RW05 is 20, the result 30000 is stored in D0101???D0100.
Basic Hardware and Function 145
6F3B0253
7. Instructions
Function
When the input is ON, the data of A is divided by the data of B, and the quotient is stored in C and the remainder in C+1.
Execution condition
Operand
Example
When R005 is ON, the data of RW22 is divided by the constant data 325, and the quotient is stored in RW27 and the remainder is stored in RW28.
If the data of RW22 is 2894, the quotient 8 is stored in RW27 and the remainder 294 is stored in RW28.
Note
???If divisor (operand B) is 0, ERF (instruction error flag = S051) is set to ON.
The ERF (S051) can be reset to OFF by user program, e.g. [ RST S051 ] .
???If the index register K is used as operand C, the remainder is ignored.
???If operand A is
C+1.
146
6F3B0253
7. Instructions
Function
When the input is ON, the
If the result is greater than 2147483647, the upper limit value 2147483647 is stored in C+1???C, and the output is turned ON. If the result is smaller than
Execution condition
Operand
Example
When R005 is ON, the data of D0011???D0010 and the constant data 100000 is added, and the result is stored in D0101???D0100.
If the data of D0011???D0010 is 300000, the result 400000 is stored in D0101???D0100, and R010 is turned OFF. (No overflow/underflow)
D0011???D0010 300000
Constant 100000
Basic Hardware and Function 147
6F3B0253
7. Instructions
Function
When the input is ON, the
If the result is greater than 2147483647, the upper limit value 2147483647 is stored in C+1???C, and the output is turned ON. If the result is smaller than
Execution condition
Operand
Example
When R005 is ON, the
If the data of D0101???D0100 is 1580000 and the data of RW25???RW24 is 80000, the result 1500000 is stored in D0103???D0102, and R010 is turned OFF. (No overflow/underflow)
D0101???D0100 1580000
RW25???RW24 80000
148
6F3B0253
7. Instructions
Function
When the input is ON, the data of A, B and the carry flag (CF = S050) are added, and the result is stored in C. If carry is occurred in the operation, the carry flag is set to ON. If the result is greater than 32767 or smaller than
This instruction is used to perform unsigned addition or
Execution condition
Operand
Example
When R013 is ON, the data of
If the data of D0101???D0100 is 12345678 and RW21???RW20 is 54322, the result 12400000 is stored in D0201???D0200.
D0101???D0100 12345678
RW21???RW20 54322
Basic Hardware and Function 149
6F3B0253
7. Instructions
Function
When the input is ON, the data of B and the carry flag (CF = S050) are subtracted from A, and the result is stored in C. If borrow is occurred in the operation, the carry flag is set to ON. If the result is greater than 32767 or smaller than
This instruction is used to perform unsigned subtraction or
Execution condition
Operand
Example
When R013 is ON, the data of
If the data of D0201???D0200 is 12345678 and RW23???RW22 is 12340000, the result 5678 is stored in D0211???D0210.
D0201???D0200 12345678
RW23???RW22 12340000
150
6F3B0253
7. Instructions
Function
When the input is ON, the unsigned data of A and B are multiplied, and the result is stored in
Execution condition
Operand
Example
When R010 is ON, the data of D0050 is multiplied by the data of RW05, and the result is stored in
If the data of D0050 is 52500 and the data of RW05 is 30, the result 1575000 is stored in D0101???D0100.
D0050 52500
RW05 30
Note
???This instruction handles the register data as unsigned integer.
Basic Hardware and Function 151
6F3B0253
7. Instructions
Function
When the input is ON, the unsigned data of A is divided by the unsigned data of B, and the quotient is stored in C and the remainder in C+1.
The data range of A and B is 0 to 65535 (unsigned
Execution condition
Operand
Example
When R010 is ON, the data of D0030 is divided by the constant data 300, and the quotient is stored in D0050 and the remainder is stored in D0051.
If the data of D0030 is 54321, the quotient 181 is stored in D0050 and the remainder 21 is stored in D0051.
Note
???If divisor (operand B) is 0, ERF (instruction error flag = S051) is set to ON. The ERF (S051) can be reset to OFF by user program, e.g. ??? [ RST S051 ]??? .
???If the index register K is used as operand C, the remainder is ignored.
???This instruction handles the register data as unsigned integer.
152
6F3B0253
7. Instructions
Function
When the input is ON, the
If the quotient is greater than 65535 (overflow), the limit value 65535 is stored in C, 0 is stored in C+1, and the instruction error flag (ERF = S051) is set to ON.
Execution condition
Operand
Example
When R010 is ON, the
If the data of D0201???D0200 is 332257, the quotient 83 is stored in D1000 and the remainder 257 is stored in D1001.
Note
???If divisor (operand B) is 0, ERF (instruction error flag = S051) is set to ON. The ERF (S051) can be reset to OFF by user program, e.g. ??? [ RST S051 ]??? .
???This instruction handles the register data as unsigned integer.
Basic Hardware and Function 153
6F3B0253
7. Instructions
Expression
Input ??? [ +1 A ]??? Output
Function
When the input is ON, the data of A is increased by 1 and stored in A.
Execution condition
Operand
Example
At the rising edge of X004 changes from OFF to ON, the data of D0050 is increased by 1 and stored in D0050.
If the data of D0050 is 750 before the execution, it will be 751 after the execution.
Note
???There is no limit value for this instruction. When the data of operand A is 32767 before the execution, it will be
154
6F3B0253
7. Instructions
Expression
Input ??? [
Function
When the input is ON, the data of A is decreased by 1 and stored in A.
Execution condition
Operand
Example
At the rising edge of X005 changes from OFF to ON, the data of D0050 is decreased by 1 and stored in D0050.
If the data of D0050 is 1022 before the execution, it will be 1021 after the execution.
Note
???There is no limit value for this instruction. When the data of operand A is
Basic Hardware and Function 155
6F3B0253
7. Instructions
Function
When the input is ON, this instruction finds logical AND of A and B, and stores the result in C.
Execution condition
Operand
Example
When R012 is ON, logical AND operation is executed for the data of RW12 and the constant data HFF00, and the result is stored in D0030.
If the data of RW12 is H3456, the result H3400 is stored in D0030.
D0030 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0
156
6F3B0253
7. Instructions
Function
When the input is ON, this instruction finds logical OR of A and B, and stores the result in C.
Execution condition
Operand
Example
When R012 is ON, logical OR operation is executed for the data of RW13 and RW20, and the result is stored in D0031.
If the data of RW13 is H5678 and RW20 is H4321, the result H5779 is stored in D0031.
Basic Hardware and Function 157
6F3B0253
7. Instructions
Function
When the input is ON, this instruction finds exclusive OR ofA and B, and stores the result in C.
Execution condition
Operand
Example
When R012 is ON, exclusive OR operation is executed for the data of D1000 and D0300, and the result is stored in D1000.
If the data of D1000 is H5678 and D0300 is H4321, the result H1559 is stored in D1000.
158
6F3B0253
7. Instructions
Function
When the input is ON, this instruction calculates the average value of the latest n scan???s register A data, and stores it in C. The allowable range of n is 1 to 64.
This instruction is useful for filtering the analog input signal.
The latest n scan???s data of A are stored in n registers starting with B, and C+1 are used as pointer.
Execution condition
Operand
Example
The latest 5 scan???s data of XW04 is stored in D0900 to D0904 (5 registers), and the average value of them is calculated and stored in D0010.
D0011 is used as internal work data.
Basic Hardware and Function 159
6F3B0253
7. Instructions
Function
When the input is ON, this instruction calculates the following formula to perform digital filtering for input data A by filter constant by B, and stores the result in C.
yn is output data to be stored in C
This instruction is useful for filtering the analog input signal. C+1 is used for internal work data.
Execution condition
Operand
Example
The filtered data of XW04 is stored in D0110. (D0111 is used for internal work data)
160
6F3B0253
7. Instructions
FUN 062 HTOA Hex to ASCII conversion
Expression
Input ??? [ A HTOA (n) B ]??? Output
Function
When the input is ON, the hexadecimal data of n registers starting with A is converted into ASCII characters and stored in B and after. The uppermost digit of source A is stored in lower byte of destination B, and followed in this order. The allowable range of n is 1 to 32.
Execution condition
Operand
Example
When R010 is ON, 4 words data of D0100 to D0103 are converted into ASCII characters, and stored in 8 words registers starting with D0200.
Note
???If index register (I, J or K) is used for the operand A, only n = 1 is allowed. Otherwise, boundary error will occur.
Basic Hardware and Function 161
6F3B0253
7. Instructions
FUN 063 ATOH ASCII to Hex conversion
Expression
Input ??? [ A ATOH (n) B ]??? Output
Function
When the input is ON, the ASCII characters stored in n registers starting with A is converted into hexadecimal data and stored in B and after. The lower byte of source A is stored as uppermost digit of destination B, and followed in this order. The allowable ASCII character in the source table is ???0??? (H30) to ???9??? (H39) and ???A??? (H41) to ???F??? (H46). The allowablenger of n is 1 to 64.
Execution condition
Operand
Example
When R011 is ON, the ASCII characters stored in 8 words of D0300 to D0307 are converted into hexadecimal data, and stored in 4 words registers starting with RW040.
Note
???If index register (I, J or K) is used for the operand A, only n = 1 is allowed.
???If n is odd number, lower 2 digits of the last converted data will not be fixed, Use even for n.
162
6F3B0253
7. Instructions
FUN 064 TEST Bit test
Expression
Input ??? [ A TEST B ]??? Output
Function
When the input is ON, this instruction finds logical AND of A and B. Then if the result is not 0, sets the output to ON.
Execution condition
Operand
Example
Logical AND operation is executed for the data of RW07 and the constant data H0FFF, and if the result is not 0, R00A is turned ON. (R00A is turned ON when any device from R070 to R07B is ON.)
If the data of RW07 is H4008, R00A is turned ON.
Basic Hardware and Function 163
6F3B0253
7. Instructions
FUN 068 SHR1 1 bit shift right
Expression
Input ??? [ SHR1 A ]??? Output
Function
When the input is ON, the data of register A is shifted 1 bit to the right (LSB direction). 0 is stored in the left most bit (MSB). The pushed out bit state is stored in the carry flag (CF = S050). After the operation, if the right most bit (LSB) is ON, the output is turned ON.
Execution condition
Operand
Example
When X007 is changed from OFF to ON, the data of RW15 is shifted 1 bit to the right.
The figure below shows an operation example.
164
6F3B0253
7. Instructions
FUN 069 SHL1 1 bit shift left
Expression
Input ??? [ SHL1 A ]??? Output
Function
When the input is ON, the data of register A is shifted 1 bit to the left (MSB direction). 0 is stored in the right most bit (LSB). The pushed out bit state is stored in the carry flag (CF = S050). After the operation, if the left most bit (MSB) is ON, the output is turned ON.
Execution condition
Operand
Example
When X008 is changed from OFF to ON, the data of RW15 is shifted 1 bit to the left. The figure below shows an operation example.
Basic Hardware and Function 165
6F3B0253
7. Instructions
Function
When the input is ON, the data of register A is shifted n bits to the right (LSB direction) including the carry flag (CF = S050), and stored in B. 0 is stored in upper n bits. After the operation, if the right most bit (LSB) is ON, the output is turned ON.
Execution condition
Operand
Example
When X007 is changed from OFF to ON, the data of RW18 is shifted 5 bits to the right and the result is stored in RW20.
The figure below shows an operation example.
(MSB)(LSB)
F E D C B A 9 8 7 6 5 4 3 2 1 0
RW18 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 0
CF RW20 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 (Result)
166
6F3B0253
7. Instructions
Function
When the input is ON, the data of register A is shifted n bits to the left (MSB direction) including the carry flag (CF = S050), and stored in B. 0 is stored in lower n bits. After the operation, if the left most bit (MSB) is ON, the output is turned ON.
Execution condition
Operand
Example
When X008 is changed from OFF to ON, the data of RW18 is shifted 3 bits to the left and the result is stored in RW20.
The figure below shows an operation example.
Basic Hardware and Function 167
6F3B0253
7. Instructions
Function
While the enable input is ON, this instruction shifts the data of the bit table, size n starting with A, 1 bit to the left (upper address direction) when the shift input is ON. The state of the data input is stored in A. The pushed out bit state is stored in the carry flag (CF = S050).
When the enable input is OFF, all bits in the table and the carry flag are reset to OFF.
Execution condition
Operand
Example
32 devices starting with R100 (R100 to R11F) is specified as a shift register.
When R010 is OFF, the data of the shift register is reset to 0. (R100 to R11F are reset to OFF) The carry flag (CF = S050) is also reset to OFF.
While R010 is ON, the data of the shift register is shifted 1 bit to the upper address direction when X009 is changed from OFF to ON. At the same time, the state of X008 is stored in the leading bit (R100).
The output (R011) indicates the state of the last bit (R11F).
168
6F3B0253
7. Instructions
The figure below shows an operation example. (When X009 is changed from OFF to ON)
R011 is turned OFF
Note
???When the shift input is ON, the shift operation is performed every scan. Use a transitional contact for the shift input to detect the state changing.
???For the data input and the shift input, direct linking to a connecting point is not allowed. In this case, insert a dummy contact (always ON special device = S04F, etc.) just before the input.
Basic Hardware and Function 169
6F3B0253
7. Instructions
Function
While the enable input (E) is ON, this instruction shifts the data of the bit table, size n starting with A, 1 bit when the shift input (S) is ON. The shift direction is determined by the state of the direction input (L).
When L is OFF, the direction is right (lower address direction). When L is ON, the direction is left (upper address direction).
The state of the data input (D) is stored in the highest bit if right shift, and stored in the lowest bit A if left shift. The pushed out bit state is stored in the carry flag (CF = S050).
When the enable input (E) is OFF, all bits in the table and the carry flag are reset to OFF.
Execution condition
Operand
Example
170
6F3B0253
7. Instructions
9 devices starting with R200 (R200 to R208) is specified as a shift register.
When R010 is OFF, the data of the shift register is reset to 0. (R200 to R208 are reset to OFF) The carry flag (CF = S050) is also reset to OFF.
While R010 is ON the following operation is enabled.
???When X00A is ON (shift left), the data of the shift register is shifted 1 bit to the upper address direction when X009 is changed from OFF to ON. At the same time, the state of X008 is stored in the leading bit (R200). The output (R012) indicates the state of the highest bit (R208).
???When X00A is OFF (shift right), the data of the shift register is shifted 1 bit to the lower address direction when X009 is changed from OFF to ON. At the same time, the state of X008 is stored in the highest bit (R208). The output (R012) indicates the state of the lowest bit (R200).
The figure below shows an operation example.
(When X00A is ON and X009 is changed from OFF to ON)
R012 is turned ON
Note
???When the shift input is ON, the shift operation is performed every scan. Use a transitional contact for the shift input to detect the state changing.
???For the data input, the shift input and the enable input, direct linking to a connecting point is not allowed. In this case, insert a dummy contact (always ON special device = S04F, etc.) just before the input. Refer to Note of Shift register FUN 074.
Basic Hardware and Function 171
6F3B0253
7. Instructions
FUN 078 RTR1 1 bit rotate right
Expression
Input ??? [ RTR1 A ]??? Output
Function
When the input is ON, the data of register A is rotated 1 bit to the right (LSB direction). The pushed out bit state is stored in the left most bit (MSB) and in the carry flag (CF = S050). After the operation, if the right most bit (LSB) is ON, the output is turned ON.
Execution condition
Operand
Example
When X007 is changed from OFF to ON, the data of RW15 is rotated 1 bit to the right.
The figure below shows an operation example.
(MSB)(LSB)
F E D C B A 9 8 7 6 5 4 3 2 1 0
RW15 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0
CF RW15 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 (Result)
R001 is turned ON
172
6F3B0253
7. Instructions
FUN 079 RTL1 1 bit rotate left
Expression
Input ??? [ RTL1 A ]??? Output
Function
When the input is ON, the data of register A is rotated 1 bit to the left (MSB direction). The pushed out bit state is stored in the right most bit (LSB) and in the carry flag (CF = S050). After the operation, if the left most bit (MSB) is ON, the output is turned ON.
Execution condition
Operand
Example
When X008 is changed from OFF to ON, the data of RW15 is rotated 1 bit to the left. The figure below shows an operation example.
R002 is turned ON
Basic Hardware and Function 173
6F3B0253
7. Instructions
Function
When the input is ON, the data of register A is rotated n bits to the right (LSB direction), and stored in B. After the operation, if the right most bit (LSB) is ON, the output is turned ON.
Execution condition
Operand
Example
When X007 is changed from OFF to ON, the data of RW18 is rotated 5 bits to the right and the result is stored in RW20.
The figure below shows an operation example.
???
(MSB)(LSB)
F E D C B A 9 8 7 6 5 4 3 2 1 0
RW18 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 0
CF RW20 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 (Result)
174
6F3B0253
7. Instructions
Function
When the input is ON, the data of register A is rotated n bits to the left (MSB direction), and stored in B. After the operation, if the left most bit (MSB) is ON, the output is turned ON.
Execution condition
Operand
Example
When X008 is changed from OFF to ON, the data of RW18 is rotated 3 bits to the left and the result is stored in RW20.
The figure below shows an operation example.
???
Basic Hardware and Function 175
6F3B0253
7. Instructions
Function
When the input is ON, the data of the register which is designated by B in the table, size n starting with A, is transferred to C.
Execution condition
Operand
Example
When R010 is ON, the register data which is designated by RW30 is read from the table D0500 to D0509 (10 registers size), and stored in D0005.
If the data of RW30 is 7, D0507 data is transferred to D0005.
Note
???If the pointer data designates outside the table (10 or more in the above example), the transfer is not executed and the output comes ON.
???The table must be within the effective range of the register address.
176
6F3B0253
7. Instructions
Function
When the input is ON, the data of A is transferred to the register which is designated byB in the table, size n starting with C.
Execution condition
Operand
Example
When R011 is ON, the data of XW04 is transferred to the register which is designated by RW30 in the table D0500 to D0509 (10 registers size).
If the data of RW30 is 8, XW04 data is transferred to D0508.
Note
???If the pointer data designates outside the table (10 or more in the above example), the transfer is not executed and the output comes ON.
???The table must be within the effective range of the register address.
Basic Hardware and Function 177
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is greater than B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the constant data 2500, and if the data of D0125 is greater than 2500, R020 is turned ON.
If the data of D0125 is 3000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is
Note
???This instruction deals with the data as signed integer
178
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is greater than or equal to B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the data of D0020, and if the data of D0125 is greater than or equal to the data of D0020, R020 is turned ON.
If the data of D0125 is 3000 and that of D0020 is 3000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is
Note
???This instruction deals with the data as signed integer
Basic Hardware and Function 179
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is equal to B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the data of D0030, and if the data of D0125 is equal to the data of D0030, R020 is turned ON.
If the data of D0125 is 3000 and that of D0020 is 3000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is
Note
???This instruction deals with the data as signed integer
180
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is not equal to B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the constant data 0, and if the data of D0125 is not 0, R020 is turned ON.
If the data of D0125 is 10, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is 0, the comparison result is false. Consequently, R020 is turned OFF.
Note
???This instruction deals with the data as signed integer
Basic Hardware and Function 181
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is less than B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the data of D0040, and if the data of D0125 is less than the data of D0040, R020 is turned ON.
If the data of D0125 is 10 and that of D0040 is 15, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is 0 and that of D0040 is
Note
???This instruction deals with the data as signed integer
182
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is less than or equal to B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the constant data
If the data of D0125 is
If the data of D0125 is 0, the comparison result is false. Consequently, R020 is turned OFF.
Note
???This instruction deals with the data as signed integer
Basic Hardware and Function 183
6F3B0253
7. Instructions
Expression
Input ??? [ A+1???A D> B+1???B ]??? Output
Function
When the input is ON, the
Execution condition
Operand
Example
When R010 is ON, the data of D0101???D0100 is compared with the constant data 200000, and if the data of D0101???D0100 is greater than 200000, R014 is turned ON.
If the data of D0101???D0100 is 250000, the comparison result is true. Consequently, R014 is turned ON.
If the data of D0101???D0100 is
Note
???This instruction deals with the data as
184
6F3B0253
7. Instructions
Function
When the input is ON, the
Execution condition
Operand
Example
When R010 is ON, the
If the data of D0101???D0100 is 250000 and D0251???D0250 is 200000, R014 is turned ON.
If the data of D0101???D0100 is
Note
???This instruction deals with the data as
Basic Hardware and Function 185
6F3B0253
7. Instructions
Expression
Input ??? [ A+1???A D= B+1???B ]??? Output
Function
When the input is ON, the
Execution condition
Operand
Example
When R010 is ON, the
If the data of D0101???D0100 is 250000 and D0251???D0250 is 250000, R014 is turned ON.
If the data of D0101???D0100 is
Note
???This instruction deals with the data as
186
6F3B0253
7. Instructions
Function
When the input is ON, the
Execution condition
Operand
Example
When R010 is ON, the
If the data of D0101???D0100 is 250000 and D0251???D0250 is 200000, R014 is turned ON.
If the data of D0101???D0100 is
Note
???This instruction deals with the data as
Basic Hardware and Function 187
6F3B0253
7. Instructions
Expression
Input ??? [ A+1???A D< B+1???B ]??? Output
Function
When the input is ON, the
Execution condition
Operand
Example
When R010 is ON, the data of D0101???D0100 is compared with the constant data 427780, and if the data of D0101???D0100 is less than 427780, R014 is turned ON.
If the data of D0101???D0100 is 250000, R014 is turned ON.
If the data of D0101???D0100 is 430000, R014 is turned OFF.
Note
???This instruction deals with the data as
188
6F3B0253
7. Instructions
Function
When the input is ON, the
Execution condition
Operand
Example
When R010 is ON, the data of D0101???D0100 is compared with the constant data 0, and if the data of D0101???D0100 is less than or equal to 0, R014 is turned ON.
If the data of D0101???D0100 is
If the data of D0101???D0100 is 10000, R014 is turned OFF.
Note
???This instruction deals with the data as
Basic Hardware and Function 189
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is greater than B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the constant data 40000, and if the data of D0125 is greater than 40000, R020 is turned ON.
If the data of D0125 is 52000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is 21000, the comparison result is false. Consequently, R020 is turned OFF.
Note
???This instruction deals with the data as unsigned integer (0 to 65535).
190
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is greater than or equal to B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the data of D0020, and if the data of D0125 is greater than or equal to the data of D0020, R020 is turned ON.
If the data of D0125 is 40000 and that of D0020 is 40000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is 15000 and that of D0020 is 20000, the comparison result is false. Consequently, R020 is turned OFF.
Note
???This instruction deals with the data as unsigned integer (0 to 65535).
Basic Hardware and Function 191
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is equal to B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the data of D0030, and if the data of D0125 is equal to the data of D0030, R020 is turned ON.
If the data of D0125 is 35000 and that of D0020 is 35000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is 1500 and that of D0020 is 4000, the comparison result is false. Consequently, R020 is turned OFF.
Note
???This instruction deals with the data as unsigned integer (0 to 65535).
192
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is not equal to B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the constant data 0, and if the data of D0125 is not 0, R020 is turned ON.
If the data of D0125 is 41000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is 0, the comparison result is false. Consequently, R020 is turned OFF.
Note
???This instruction deals with the data as unsigned integer (0 to 65535).
Basic Hardware and Function 193
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is less than B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the data of D0040, and if the data of D0125 is less than the data of D0040, R020 is turned ON.
If the data of D0125 is 43000 and that of D0040 is 45000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is 50000 and that of D0040 is 50000, the comparison result is false. Consequently, R020 is turned OFF.
Note
???This instruction deals with the data as unsigned integer (0 to 65535).
194
6F3B0253
7. Instructions
Function
When the input is ON, the data of A and the data of B are compared, and if A is less than or equal to B, the output is turned ON.
Execution condition
Operand
Example
When R00C is ON, the data of D0125 is compared with the constant data 35000, and if the data of D0125 is less than or equal to 35000, R020 is turned ON.
If the data of D0125 is 35000, the comparison result is true. Consequently, R020 is turned ON.
If the data of D0125 is 0, the comparison result is false. Consequently, R020 is turned OFF.
Note
???This instruction deals with the data as unsigned integer (0 to 65535).
Basic Hardware and Function 195
6F3B0253
7. Instructions
Expression
Input ??? [ SET A ]??? Output
Function
When the input is ON, the device A is set to ON if A is a device, or the data HFFFF is stored in the register A if A is a register.
Execution condition
Operand
Example 1 (device set)
When R010 is ON, R025 is set to ON. The state of R025 is remained even if R010 comes OFF.
Example 2 (register set)
When R010 is ON, the data HFFFF is stored in RW20. (R200 to R20F are set to ON) The state of RW20 is remained even if R010 comes OFF.
196
6F3B0253
7. Instructions
Expression
Input ??? [ RST A ]??? Output
Function
When the input is ON, the device A is reset to OFF ifA is a device, or the data 0 is stored in the register A if A is a register.
Execution condition
Operand
Example 1 (device reset)
When R011 is ON, R005 is reset to OFF. The state of R025 is remained even if R011 comes OFF.
Example 2 (register reset)
When R011 is ON, the data 0 is stored in RW20. (R200 to R20F are reset to OFF) The state of RW20 is remained even if R011 comes OFF.
Basic Hardware and Function 197
6F3B0253
7. Instructions
FUN 118 SETC Set carry
Expression
Input ??? [ SETC ]??? Output
Function
When the input is ON, the carry flag (CF = S050) is set to ON.
Execution condition
Operand
No operand is required.
Example
When R011 is changed from OFF to ON, the carry flag S050 is set to ON.
198
6F3B0253
7. Instructions
FUN 119 RSTC Reset carry
Expression
Input ??? [ RSTC ]??? Output
Function
When the input is ON, the carry flag (CF = S050) is reset to OFF.
Execution condition
Operand
No operand is required.
Example
When R010 is changed from OFF to ON, the carry flag S050 is reset to OFF.
Basic Hardware and Function 199
6F3B0253
7. Instructions
FUN 146 STOT Step sequence output
Expression
Input ??? [ STOT A ]??????
Function
When the input is ON, the device A is set to ON and the devices of STIN instructions on the same rung are reset to OFF.
Execution condition
Operand
Example
See example on STIN (FUN 145) instruction.
Note
???The STIZ, STIN and STOT instructions are used together to configure the step sequence.
???Two or more STOT instructions can be placed on one rung to perform simultaneous sequences.
???Two or more STIN instructions can be placed on one rung in parallel or in series to perform loop or convergence of sequences. (Max. 11 STIN instructions on one rung)
???To perform the conditional branch (sequence selection), separate the rungs as follows. This limitation is applied to T1 version 1.00 only.
214
6F3B0253
7. Instructions
Function
When the input is ON, the following operation is executed. (Upper limit for A by B) If A ??? B, then C = A.
If A > B, then C = B.
Execution condition
Operand
Example
When R030 is ON, the upper limit operation is executed for the data of RW018 by the data of D1200, and the result is stored in RW021.
C
(RW021) Upper limit B (D1200)
A (RW018)
When RW018 is 3000 and D1200 is 4000, 3000 is stored in RW021 and R0040 is OFF. When RW018 is 4500 and D1200 is 4000, the limit value 4000 is stored in RW021 and R0040 is ON.
Note
???This instruction deals with the data as signed integer
224
6F3B0253
7. Instructions
Function
When the input is ON, the following operation is executed. (Lower limit for A by B) If A ??? B, then C = A.
If A < B, then C = B.
Execution condition
Operand
Example
When R031 is ON, the lower limit operation is executed for the data of RW019 by the data of D1220, and the result is stored in RW022.
C
(RW022)
A (RW019)
Lower limit B (D1220)
When RW019 is
Note
???This instruction deals with the data as signed integer
Basic Hardware and Function 225
TOSHIBA CORPORATION
Industrial Equipment Department
Tokyo
Tel: