Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation
Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation
Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
6F3B0253<br />
UM-TS01∗∗∗-E031<br />
PROGRAMMABLE CONTROLLER<br />
<strong>PROSEC</strong> <strong>T1</strong>- <strong>16S</strong><br />
USER’S MANUAL<br />
− Basic Hardware and Function −<br />
TOSHIBA CORPORATION<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Important Information<br />
Misuse of this equipment can result in property damage or human injury.<br />
Because controlled system applications vary widely, you should satisfy yourself<br />
as to the acceptability of this equipment for your intended purpose.<br />
In no event will <strong>Toshiba</strong> Corporation be responsible or liable for either indirect<br />
or consequential damage or injury that may result from the use of this equipment.<br />
No patent liability is assumed by <strong>Toshiba</strong> Corporation with respect to use of<br />
information, illustrations, circuits, equipment or examples of application in this<br />
publication.<br />
<strong>Toshiba</strong> Corporation reserves the right to make changes and improvements to this<br />
publication and/or related products at any time without notice. No obligation shall be<br />
incurred other than as noted in this publication.<br />
This publication is copyrighted and contains proprietary material. No part of this book<br />
may be reproduced, stored in a retrieval system, or transmitted, in any form or by any<br />
means ⎯ electrical, mechanical, photocopying, recording, or otherwise ⎯ without<br />
obtaining prior written permission from <strong>Toshiba</strong> Corporation.<br />
© TOSHIBA Corporation 2001. All rights reserved<br />
IBM is a registered trademark of International Business Machines Corporation.<br />
MS-DOS and Windows are registered trademarks of Microsoft Corporation.<br />
Publication number: UM-TS01∗∗∗-E031<br />
1st edition April 2001, 2nd edition November 2001<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
CE Marking<br />
6F3B0253<br />
The Programmable Controller <strong>PROSEC</strong> <strong>T1</strong>-<strong>16S</strong> (hereafter called <strong>T1</strong>-<strong>16S</strong>) complies with the<br />
requirements of the EMC Directive 89/336/EEC and Low Voltage Directive 72/23/EEC under the<br />
condition of use according to the instructions described in this manual.<br />
The contents of the conformity are shown below.<br />
Application of EMC : 89/336/EEC (as amended by 91/263/EEC and 92/31/EEC)<br />
Council Directive LVD : 72/23/EEC (as amended by 93/68/EEC)<br />
Manufacture’s Name : <strong>Toshiba</strong> Corporation,<br />
Fuchu Operations-Social Infrastructure Systems<br />
Address : 1, <strong>Toshiba</strong>-Cho<br />
Fuchu-shi<br />
TOKYO 183-8511<br />
Japan<br />
declares, that the product<br />
Product Name : Programmable Controller , <strong>T1</strong>-<strong>16S</strong><br />
Model Number : TDR1<strong>16S</strong>6S, TDR1<strong>16S</strong>6C<br />
TDR1<strong>16S</strong>3S, TDR1<strong>16S</strong>3C<br />
conforms to the following Product Specifications:<br />
EMC<br />
Radiated Interference : EN 55011 Group 1 Class A<br />
Mains Interference : EN 55011 Group 1 Class A<br />
Radiated Susceptibility : ENV50140<br />
Conducted RFI Susceptibility : ENV50141, IEC100-4-6.<br />
Electrostatic Discharge : IEC1000-4-2<br />
Electrical Fast Transient : IEC1000-4-4<br />
LVD : EN61131-2:1995 3.10 Dielectric Properties<br />
4. Mechanical Requirements<br />
Supplementary information :<br />
(1) Included Handy Programmer THP911A*S.<br />
(2) Included each type of associated input/output unit in a typical configuration.<br />
(3) Product must be installed in accordance with manufacturers instructions<br />
Basic Hardware and Function 1<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
2 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
UL/c-UL Listing<br />
6F3B0253<br />
The Programmable Controller <strong>PROSEC</strong> <strong>T1</strong>-<strong>16S</strong> (hereafter called <strong>T1</strong>-<strong>16S</strong>) is UL/c-UL listed as<br />
shown below.<br />
UL and c-UL Listing<br />
File Number : E95637<br />
Product Name : Programmable Controller , <strong>T1</strong>-<strong>16S</strong><br />
Product Covered : Main Unit<br />
TDR1<strong>16S</strong>6S, TDR1<strong>16S</strong>6C,<br />
TDR1<strong>16S</strong>3S, TDR1<strong>16S</strong>3C<br />
I/O module<br />
TDI116M*S, TDD116M*S, TDO116M*S,<br />
TAD121M*S, TAD131M*S, TDA121M*S, TDA131M*S,<br />
TFR112M*S<br />
Peripherals<br />
TRM102**S, TCU111**S, THP911A*S<br />
UL and c-UL Listing For Use in Hazardous Locations<br />
File Number : E184034<br />
Product Name : Programmable Controller , <strong>T1</strong>-<strong>16S</strong><br />
Product Covered : Main Unit<br />
TDR1<strong>16S</strong>6S, TDR1<strong>16S</strong>6C<br />
Locations Class : Class I, Division 2, Groups A, B, C, D<br />
Important Notice : 1. THIS EQUIPMENT IS SUITABLE FOR USE IN CLASS I,<br />
DIVISION 2, GROUPS A, B, C, D OR NON-HAZARDOUS<br />
LOCATIONS ONLY.<br />
2. WARNING - EXPLOSION HAZARD - SUBSTITUTION OF<br />
COMPONENTS MAY IMPAIR SUITABILITY FOR CLASS I,<br />
DIVISION 2.<br />
3. WARNING - EXPLOSION HAZARD - DO NOT DISCONNECT<br />
EQUIPMENT UNLESS POWER HAS BEEN SWITCHED OFF<br />
OR THE AREA IS KNOWN TO BE NON-HAZARDOUS.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Safety Precautions<br />
This manual is prepared for users of <strong>Toshiba</strong>’s Programmable Controller <strong>T1</strong>-<strong>16S</strong>.<br />
Read this manual thoroughly before using the <strong>T1</strong>-<strong>16S</strong>. Also, keep this manual and related<br />
manuals so that you can read them anytime while the <strong>T1</strong>-<strong>16S</strong> is in operation.<br />
General Information<br />
6F3B0253<br />
1. The <strong>T1</strong>-<strong>16S</strong> has been designed and manufactured for use in an industrial<br />
environment. However, the <strong>T1</strong>-<strong>16S</strong> is not intended to be used for systems which may<br />
endanger human life. Consult <strong>Toshiba</strong> if you intend to use the <strong>T1</strong>-<strong>16S</strong> for a special<br />
application, such as transportation machines, medical apparatus, aviation and space<br />
systems, nuclear controls, submarine systems, etc.<br />
2. The <strong>T1</strong>-<strong>16S</strong> has been manufactured under strict quality control. However, to keep<br />
safety of overall automated system, fail-safe systems should be considered outside<br />
the <strong>T1</strong>-<strong>16S</strong>.<br />
3. In installation, wiring, operation and maintenance of the <strong>T1</strong>-<strong>16S</strong>, it is assumed that the<br />
users have general knowledge of industrial electric control systems.<br />
If this product is handled or operated improperly, electrical shock, fire or damage to<br />
this product could result.<br />
4. This manual has been written for users who are familiar with Programmable<br />
Controllers and industrial control equipment. Contact <strong>Toshiba</strong> if you have any<br />
questions about this manual.<br />
5. Sample programs and circuits described in this manual are provided for explaining the<br />
operations and applications of the <strong>T1</strong>-<strong>16S</strong>. You should test completely if you use them<br />
as a part of your application system.<br />
Hazard Classifications<br />
In this manual, the following two hazard classifications are used to explain the safety<br />
precautions.<br />
! WARNING<br />
! CAUTION<br />
Indicates a potentially hazardous situation which, if not avoided, could<br />
result in death or serious injury.<br />
Indicates a potentially hazardous situation which, if not avoided, may<br />
result in minor or moderate injury. It may also be used to alert<br />
against unsafe practices.<br />
Even a precaution is classified as CAUTION, it may cause serious results depending on<br />
the situation. Observe all the safety precautions described on this manual.<br />
Basic Hardware and Function 3<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Installation:<br />
4 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Safety Precautions<br />
1. Excess temperature, humidity, vibration, shocks, or dusty and corrosive gas<br />
environment can cause electrical shock, fire or malfunction. Install and use the <strong>T1</strong>-<br />
<strong>16S</strong> and related equipment in the environment described in this manual.<br />
6F3B0253<br />
2. Improper installation directions or insufficient installation can cause fire or the units<br />
to drop. Install the <strong>T1</strong>-<strong>16S</strong> and related equipment in accordance with the instructions<br />
described in this manual.<br />
3. Turn off power before installing or removing any units, modules, racks, terminal<br />
blocks or battery. Failure to do so can cause electrical shock or damage to the <strong>T1</strong>-<br />
<strong>16S</strong> and related equipment.<br />
4. Entering wire scraps or other foreign debris into to the <strong>T1</strong>-<strong>16S</strong> and related<br />
equipment can cause fire or malfunction. Pay attention to prevent entering them into<br />
the <strong>T1</strong>-<strong>16S</strong> and related equipment during installation and wiring.<br />
5. Turn off power immediately if the <strong>T1</strong>-<strong>16S</strong> or related equipment is emitting smoke or<br />
odor. Operation under such situation can cause fire or electrical shock. Also<br />
unauthorized repairing will cause fire or serious accidents. Do not attempt to repair.<br />
Contact <strong>Toshiba</strong> for repairing.<br />
Wiring:<br />
! CAUTION<br />
! CAUTION<br />
1. Turn off power before wiring to minimize the risk of electrical shock.<br />
2. Exposed conductive parts of wire can cause electrical shock. Use crimp-style<br />
terminals with insulating sheath or insulating tape to cover the conductive parts. Also<br />
close the terminal covers securely on the terminal blocks when wiring has been<br />
completed.<br />
3. Operation without grounding may cause electrical shock or malfunction. Connect the<br />
ground terminal on the <strong>T1</strong>-<strong>16S</strong> to the system ground.<br />
4. Applying excess power voltage to the <strong>T1</strong>-<strong>16S</strong> can cause explosion or fire. Apply<br />
power of the specified ratings described in the manual.<br />
5. Improper wiring can cause fire, electrical shock or malfunction. Observe local<br />
regulations on wiring and grounding.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Operation:<br />
Safety Precautions<br />
! WARNING<br />
1. Configure emergency stop and safety interlocking circuits outside the <strong>T1</strong>-<strong>16S</strong>.<br />
Otherwise, malfunction of the <strong>T1</strong>-<strong>16S</strong> can cause injury or serious accidents.<br />
! CAUTION<br />
6F3B0253<br />
2. Operate the <strong>T1</strong>-<strong>16S</strong> and the related modules with closing the terminal covers. Keep<br />
hands away from terminals while power on, to avoid the risk of electrical shock.<br />
3. When you attempt to perform force outputs, RUN/HALT controls, etc. during<br />
operation, carefully check for safety.<br />
4. Turn on power to the <strong>T1</strong>-<strong>16S</strong> before turning on power to the loads. Failure to do so<br />
may cause unexpected behavior of the loads.<br />
5. Do not use any modules of the <strong>T1</strong>-<strong>16S</strong> for the purpose other than specified. This<br />
can cause electrical shock or injury.<br />
6. Do not modify the <strong>T1</strong>-<strong>16S</strong> and related equipment in hardware nor software. This can<br />
cause fire, electrical shock or injury.<br />
7. Configure the external circuit so that the external 24 Vdc power required for<br />
transistor output circuits and power to the loads are switched on/off simultaneously.<br />
Also, turn off power to the loads before turning off power to the <strong>T1</strong>-<strong>16S</strong>.<br />
8. Install fuses appropriate to the load current in the external circuits for the outputs.<br />
Failure to do so can cause fire in case of load over-current.<br />
9. Check for proper connections on wires, connectors and modules. Insufficient contact<br />
can cause malfunction or damage to the <strong>T1</strong>-<strong>16S</strong> and related equipment.<br />
Basic Hardware and Function 5<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Maintenance:<br />
6 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Safety Precautions<br />
! CAUTION<br />
6F3B0253<br />
1. Turn off power before removing or replacing units, modules, terminal blocks or wires.<br />
Failure to do so can cause electrical shock or damage to the <strong>T1</strong>-<strong>16S</strong> and related<br />
equipment.<br />
2. When you remove both input and output terminal blocks with wires for maintenance<br />
purpose, pay attention to prevent inserting them upside down.<br />
3. Touch a grounded metal part to discharge the static electricity on your body before<br />
touching the equipment.<br />
4. Otherwise, charged static electricity on your body can cause malfunction or failure.<br />
5. Do not disassemble the <strong>T1</strong>-<strong>16S</strong> because there are hazardous voltage parts inside.<br />
6. Perform daily checks, periodical checks and cleaning to maintain the system in<br />
normal condition and to prevent unnecessary troubles.<br />
7. Check by referring “Troubleshooting” section of this manual when operating<br />
improperly. Contact <strong>Toshiba</strong> for repairing if the <strong>T1</strong>-<strong>16S</strong> or related equipment is failed.<br />
<strong>Toshiba</strong> will not guarantee proper operation nor safety for unauthorized repairing.<br />
8. The contact reliability of the output relays will reduce if the switching exceeds the<br />
specified life. Replace the unit or module if exceeded.<br />
9. The battery used in <strong>T1</strong>-<strong>16S</strong> may present a risk of fire of chemical burn if mistreated.<br />
Do not recharge, disassemble, heat above 100ºC (212ºF), or incinerate.<br />
10. Replace battery with CR2032 only. Use of another battery may present a risk of fire<br />
or explosion.<br />
11. Dispose of used battery promptly. Keep away from children. Do not disassemble<br />
and do not dispose of in fire.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Safety Label<br />
The safety label as shown on the right is<br />
attached to the power terminal of the<br />
<strong>T1</strong>-<strong>16S</strong>.<br />
Remove the mount paper before wiring.<br />
Peel off the label from the mount paper<br />
and stick it near the power terminals<br />
where it can be readily seen.<br />
Safety Precautions<br />
Contact <strong>Toshiba</strong> if the label is damaged.<br />
!<br />
CAUTION<br />
Do not touch terminals<br />
while power on.<br />
Hazardous voltage can shock, burn or cause death.<br />
Do not touch terminals while power on.<br />
Read related manual thoroughly for safety.<br />
Stick this seal on unit or near unit.<br />
Take off this sheet before wiring.<br />
6F3B0253<br />
Basic Hardware and Function 7<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
About This <strong>Manual</strong><br />
About This <strong>Manual</strong><br />
8 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
This manual has been prepared for first-time users of <strong>Toshiba</strong>’s Programmable Controller<br />
<strong>T1</strong>-<strong>16S</strong> to enable a full understanding of the configuration of the equipment, and to<br />
enable the user to obtain the maximum benefits of the equipment.<br />
This manual introduces the <strong>T1</strong>-<strong>16S</strong>, and explains the system configuration,<br />
specifications, installation and wiring for <strong>T1</strong>-<strong>16S</strong>’s basic hardware. This manual provides<br />
the information for designing <strong>T1</strong>-<strong>16S</strong> user program, such as the internal operation,<br />
memory configuration, I/O allocation and programming instructions. Information for<br />
maintenance and troubleshooting are also provided in this manual.<br />
The <strong>T1</strong>-<strong>16S</strong>’s computer link function and <strong>T1</strong>-<strong>16S</strong>’s multi-purpose communication<br />
functions are covered by the separate manual. Read the <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong> -<br />
Communication Function - for details.<br />
Inside This <strong>Manual</strong><br />
This manual consists of 10 main sections and an appendix.<br />
Section 1 outlines the <strong>T1</strong>-<strong>16S</strong> configuration. To fully understand the <strong>T1</strong>-<strong>16S</strong>, it is<br />
important to read this section carefully. Sections 2, to 4 describe the hardware used in<br />
designing external circuits and panels. Sections 5 to 7 are mainly concerned with<br />
software. Section 8 explains the <strong>T1</strong>-<strong>16S</strong>’s special I/O functions. Sections 9 and 10<br />
describe the maintenance procedure for the <strong>T1</strong>-<strong>16S</strong>, to ensure safe operation and long<br />
service life.<br />
Related <strong>Manual</strong>s<br />
The following related manuals are available for <strong>T1</strong>-<strong>16S</strong>. Besides this manual, read the<br />
following manuals for your better understanding.<br />
<strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
- Basic Hardware and Function - (this manual) UM-TS01∗∗∗-E031<br />
- I/O Modules - UM-TS01∗∗∗-E034<br />
- Communication Function - UM-TS01∗∗∗-E033<br />
T-Series Handy Programmer (HP911) Operation <strong>Manual</strong> UM-TS03∗∗∗-E025<br />
T-Series Program Development System (T-PDS) User’s <strong>Manual</strong> UM-TS03∗∗∗-E045<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Terminology<br />
The following is a list of abbreviations and acronyms used in this manual.<br />
6F3B0253<br />
About This <strong>Manual</strong><br />
µs microsecond<br />
ASCII American Standard Code For Information Interchange<br />
AWG American Wire Gage<br />
BCC Block Check Code<br />
CCW Counter-Clockwise<br />
CPU Central Processing Unit<br />
CW Clockwise<br />
EEPROM Electrically Erasable Programmable Read Only Memory<br />
H hexadecimal (when it appears in front of an alphanumeric string)<br />
I/O Input/Output<br />
LED Light Emitting Diode<br />
LSB Least Significant Bit<br />
ms millisecond<br />
MSB Most Significant Bit<br />
PWM Pulse Width Modulation<br />
RAM Random Access Memory<br />
ROM Read Only Memory<br />
Vac AC voltage<br />
Vdc DC voltage<br />
Basic Hardware and Function 9<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Contents<br />
Contents<br />
Safety Precautions .................................................................................. 3<br />
About This <strong>Manual</strong> .................................................................................. 8<br />
1. System Configuration .................................................................... 13<br />
1.1 Introducing the <strong>T1</strong>-<strong>16S</strong> ................................................................ 14<br />
1.2 Features .............................................................................................. 16<br />
1.3 System configuration .......................................................................... 19<br />
1.4 I/O expansion ...................................................................................... 20<br />
1.5 Components ........................................................................................ 21<br />
1.5.1 Basic unit ......................................................................................... 21<br />
1.5.2 I/O modules ...................................................................................... 25<br />
1.5.3 Options ............................................................................................ 26<br />
1.6 Programmer port function .................................................................. 27<br />
1.7 RS-485 port communication function ................................................. 28<br />
1.8 Real-time data link system ................................................................. 32<br />
1.9 Peripheral tools .................................................................................. 33<br />
2. Specifications .................................................................................. 37<br />
2.1 General specifications ........................................................................ 38<br />
2.2 Functional specifications .................................................................... 40<br />
2.3 I/O specifications ................................................................................ 42<br />
2.4 External dimensions ........................................................................... 46<br />
3. I/O Application Precautions .......................................................... 47<br />
3.1 Application precautions for input signals ............................................ 48<br />
3.2 Application precautions for output signals .......................................... 50<br />
4. Installation and Wiring ................................................................... 53<br />
4.1 Environmental conditions ................................................................... 54<br />
4.2 Installing the unit ................................................................................. 55<br />
4.3 Wiring terminals .................................................................................. 57<br />
4.4 Grounding ........................................................................................... 58<br />
4.5 Power supply wiring ............................................................................ 59<br />
4.6 I/O wiring ............................................................................................ 61<br />
10 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
Contents<br />
5. Operating System Overview ......................................................... 63<br />
5.1 Operation modes ................................................................................ 64<br />
5.2 About the built-in EEPROM ................................................................ 66<br />
5.3 Scanning ............................................................................................. 69<br />
6. Programming Information ............................................................. 73<br />
6.1 Devices and registers ......................................................................... 74<br />
6.2 Index modification ............................................................................... 86<br />
6.3 Real-time clock/calendar .................................................................... 88<br />
6.4 I/O allocation ....................................................................................... 89<br />
6.5 <strong>T1</strong>-<strong>16S</strong> memory mode setting.............................................................. 91<br />
6.6 User program configuration ................................................................ 92<br />
6.6.1 Main program .................................................................................. 94<br />
6.6.2 Sub-program #1 .............................................................................. 95<br />
6.6.3 Timer interrupt program .................................................................. 95<br />
6.6.4 I/O interrupt programs ..................................................................... 96<br />
6.6.5 Subroutines .................................................................................... 97<br />
6.7 Programming language ...................................................................... 98<br />
6.8 Program execution sequence ............................................................ 99<br />
6.9 On-line debug support functions ........................................................ 100<br />
6.10 Password protection ........................................................................... 103<br />
7. Instructions ...................................................................................... 105<br />
7.1 List of instructions .............................................................................. 106<br />
7.2 Instruction specifications .................................................................... 116<br />
8. Special I/O Functions .................................................................... 255<br />
8.1 Special I/O function overview ............................................................. 256<br />
8.2 Variable input filter constant .............................................................. 260<br />
8.3 High speed counter ............................................................................ 261<br />
8.3.1 Single phase up-counter ................................................................. 262<br />
8.3.2 Single phase speed-counter ............................................................ 263<br />
8.3.3 Quadrature bi-pulse counter ............................................................ 265<br />
8.4 Interrupt input function ........................................................................ 268<br />
8.5 Analog setting function ....................................................................... 270<br />
8.6 Pulse output function .......................................................................... 271<br />
8.7 PWM output function .......................................................................... 273<br />
9. Maintenance and Checks .............................................................. 275<br />
9.1 Precautions during operation ............................................................. 276<br />
9.2 Daily checks ........................................................................................ 277<br />
9.3 Periodic checks ................................................................................... 278<br />
9.4 Maintenance parts ............................................................................... 279<br />
9.5 Battery ................................................................................................. 280<br />
Basic Hardware and Function 11<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Contents<br />
10. Troubleshooting .............................................................................. 281<br />
10.1 Troubleshooting procedure ................................................................ 282<br />
10.1.1 Power supply check ......................................................................... 283<br />
10.1.2 CPU check ....................................................................................... 284<br />
10.1.3 Program check ................................................................................. 284<br />
10.1.4 Input check ....................................................................................... 285<br />
10.1.5 Output check .................................................................................... 286<br />
10.1.6 Environmental problem .................................................................... 287<br />
10.2 Self-diagnostic items .......................................................................... 288<br />
Appendix ......................................................................................................... 293<br />
A.1 List of models and types ..................................................................... 294<br />
A.2 Instruction index ................................................................................. 295<br />
12 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Section 1<br />
System Configuration<br />
1.1 Introducing the <strong>T1</strong>-<strong>16S</strong>, 14<br />
1.2 Features, 16<br />
1.3 System configuration, 19<br />
1.4 I/O expansion, 20<br />
1.5 Components, 21<br />
1.6 Computer link system, 27<br />
1.7 <strong>T1</strong>-<strong>16S</strong> Communication function, 28<br />
1.8 Real-time data link system, 32<br />
1.9 Peripheral tools, 33<br />
6F3B0253<br />
Basic Hardware and Function 13<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
1.1 Introducing the <strong>T1</strong>-<strong>16S</strong><br />
14 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The <strong>T1</strong>-16 is compact, block style, high-performance programmable controller with a<br />
range of 16 to 144 input and output points.<br />
The figure below shows the <strong>T1</strong> Series line-up. The <strong>T1</strong> Series consists of the total 16<br />
types.<br />
<strong>T1</strong> Series <strong>T1</strong> <strong>T1</strong>-16 <strong>T1</strong>-MDR16<br />
<strong>T1</strong>-MAR16<br />
<strong>T1</strong>-MDR16D<br />
<strong>T1</strong>-28 <strong>T1</strong>-MDR28<br />
<strong>T1</strong>-MAR28<br />
<strong>T1</strong>-MDR28D<br />
<strong>T1</strong>-40 <strong>T1</strong>-MDR40<br />
<strong>T1</strong>-MAR40<br />
<strong>T1</strong>-MDR40D<br />
<strong>T1</strong>S <strong>T1</strong>-<strong>16S</strong> <strong>T1</strong>-MDR<strong>16S</strong>S<br />
<strong>T1</strong>-MDR<strong>16S</strong>C<br />
<strong>T1</strong>-MDR<strong>16S</strong>SD<br />
<strong>T1</strong>-MDR<strong>16S</strong>CD<br />
<strong>T1</strong>-40S <strong>T1</strong>-MDR40S<br />
<strong>T1</strong>-MAR40S<br />
<strong>T1</strong>-MDR40SD<br />
I/O points:<br />
The <strong>T1</strong> Series are available in five models, <strong>T1</strong>-16, <strong>T1</strong>-28, <strong>T1</strong>-40, <strong>T1</strong>-40S and <strong>T1</strong>-<br />
<strong>16S</strong>. Each model has the following I/O points.<br />
<strong>T1</strong>-16 <strong>T1</strong>-<strong>16S</strong> <strong>T1</strong>-28 <strong>T1</strong>-40 <strong>T1</strong>-40S<br />
Input 8 points 14 points 24 points<br />
Output 8 points<br />
(6 relay plus 2 slid-state)<br />
Expansion No Up to 8 I/O<br />
modules.<br />
Total up to<br />
144 points.<br />
14 points<br />
(12 relay plus<br />
2 slid-state)<br />
16 points<br />
(14 relay plus 2 solid-state)<br />
No 2 option cards plus<br />
1 expansion rack or unit.<br />
Total up to 382 points.<br />
The <strong>T1</strong>-<strong>16S</strong> can expand its I/O points by connecting I/O modules. Up to eight I/O<br />
modules can be connected. If eight 16-point I/O modules are connected to the <strong>T1</strong>-<br />
<strong>16S</strong>, it can control up to 144 points.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
1. System Configuration<br />
Memory capacity:<br />
Program memory capacity of the <strong>T1</strong> is 2 k steps. And that of the <strong>T1</strong>S is 8 k steps.<br />
Whole the program and a part of data registers are stored in built-in EEPROM.<br />
<strong>T1</strong>-16/28/40 <strong>T1</strong>-40S <strong>T1</strong>-<strong>16S</strong><br />
Memory RAM (for execution) and EEPROM (for back-up)<br />
Program 2 k steps 8 k steps<br />
capacity<br />
(4 k mode or 8 k mode)<br />
Data capacity Auxiliary relay: 1024 points Auxiliary relay: 4096 points<br />
Timer: 64 points Timer: 256 points<br />
Counter: 64 points Counter: 256 points<br />
Data register: 1024 words Data register: 4096 words<br />
EEPROM Program and leading 512 Program and the user specified range of<br />
back-up words of Data register Data register (0 to 2048 words)<br />
RAM back-up Capacitor: 6 hours or more Capacitor: 168 hours Capacitor: 1 hour<br />
(at 25°C)<br />
or more<br />
or more<br />
(at 77°F)<br />
Battery: 2 years<br />
or more<br />
Control functions:<br />
In addition to the basic relay ladder functions, the <strong>T1</strong>/<strong>T1</strong>S provides functions such as<br />
data operations, arithmetic operations, various functions, etc. Furthermore, its highspeed<br />
counter functions, pulse output functions and data communication functions<br />
allow its application to a wide scope of control systems.<br />
<strong>T1</strong>-16/28/40 <strong>T1</strong>-40S <strong>T1</strong>-<strong>16S</strong><br />
Language Ladder diagram with function block<br />
Number of Basic: 17 types Basic: 21 types Basic: 21 types<br />
instructions Function: 76 types Function: 99 types Function: 97 types<br />
Subroutines 16<br />
256<br />
(nesting not allowed) (up to 3 levels of nesting)<br />
Execution speed 1.4 µs/contact, 2.3 µs/coil, 4.2 µs/transfer, 6.5 µs/addition<br />
Real-time No Yes (year, month, day, week, hours,<br />
clock/calendar<br />
minutes, seconds)<br />
Communication RS-232C<br />
RS-232C (programmer port),<br />
(programmer port) RS-485 (multi-purpose)<br />
Construction:<br />
The <strong>T1</strong>-<strong>16S</strong> is a compact, easy-handling block style programmable controller. The<br />
<strong>T1</strong>-<strong>16S</strong> has all of the features of a block style controller. In addition, the <strong>T1</strong>-<strong>16S</strong> has<br />
modular expandability. The <strong>T1</strong>-<strong>16S</strong> provides flexibility into the block style controller.<br />
Series compatibility:<br />
Programming instructions are upward compatible in the T-Series programmable<br />
controllers. The <strong>T1</strong>/<strong>T1</strong>S programs can be used for other models of the T-Series, T2,<br />
T2E, T2N, T3 and T3H. Peripheral tools can also be shared.<br />
Basic Hardware and Function 15<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
1.2 Features<br />
16 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
I/O module support:<br />
The <strong>T1</strong>-<strong>16S</strong> has an interface for connecting the I/O modules. Up to eight modules<br />
can be connected to the <strong>T1</strong>-<strong>16S</strong>.<br />
By using the 16 points I/O module, the <strong>T1</strong>-<strong>16S</strong> can control up to 144 I/O points.<br />
Built-in high-speed counter:<br />
Two single-phase or one quadrature (2-phase) pulses can be counted. The<br />
acceptable pulse rate is up to 5 kHz. (DC input type only)<br />
Built-in analog setting adjusters:<br />
Two analog setting adjusters are provided on the <strong>T1</strong>-<strong>16S</strong>. This allows operators to<br />
adjust time or other control parameters easily using a screwdriver.<br />
High speed processing:<br />
Sophisticated machine control applications require high speed data manipulations.<br />
The <strong>T1</strong>-<strong>16S</strong> is designed to meet these requirements.<br />
• 1.4 µs per contact • 2.3 µs per coil<br />
• 4.2 µs per 16-bit transfer • 6.5 µs per 16-bit addition<br />
The <strong>T1</strong>-<strong>16S</strong> also supports interrupt input function (DC input type only). This allows<br />
immediate operation independent of program scan.<br />
High performance software:<br />
The <strong>T1</strong>-<strong>16S</strong> offers 21 basic ladder instructions and 97 function instructions.<br />
Subroutines, Interrupt functions, Indirect addressing, For/Next loops, Pre-derivative<br />
real PID, etc. are standard on the <strong>T1</strong>-<strong>16S</strong>. These functions allow the <strong>T1</strong>-<strong>16S</strong> to be<br />
applied to the most demanding control applications.<br />
Battery-less operation:<br />
The <strong>T1</strong>-<strong>16S</strong> has a standard built-in EEPROM, permitting operation without need of a<br />
battery. Also, the variable data can be written into and/or read from the EEPROM,<br />
providing completely maintenance-free back-up operation.<br />
This function is an important feature for OEMs, because it can eliminate the need for<br />
changing the battery every few years.<br />
(Optional battery is also available to back-up real-time clock and retentive data)<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
1. System Configuration<br />
Pulse output / PWM output:<br />
One point of variable frequency pulses (max. 5 kHz) or variable duty pulses can be<br />
output. These functions can be used to drive a stepping motor or to simulate an<br />
analog output. (DC input type only)<br />
Built-in computer link function:<br />
The <strong>T1</strong>-<strong>16S</strong>’s RS-232C programmer port can accept the computer link protocol (data<br />
read/write). This results in easy connection to a higher level computer, an operator<br />
interface unit, etc.<br />
The parity setting of the programmer port can be selected either odd or none. The<br />
none parity mode is provided especially for telephone modem connection. Using<br />
modems, remote programming/monitoring is available.<br />
Real-time control data link network:<br />
By connecting the TOSLINE-F10 remote module (FR112M) to the <strong>T1</strong> -<strong>16S</strong>, highspeed<br />
data link network can be established. In this network, upper T-series <strong>PLC</strong><br />
model (T2/T2E/T2N or T3/T3H) works as master and up to 16 <strong>T1</strong>-<strong>16S</strong>s can be<br />
connected as remote. Each <strong>T1</strong>-<strong>16S</strong> can exchange data with the master through 1<br />
word input and 1 word output. The transmission speed can be selected either 750<br />
kbps or 250 kbps.<br />
Sampling trace function:<br />
The sampling trace is the function to collect the user specified data every user<br />
specified timing (minimum every scan), and to display the collected data on the<br />
programmer screen in time chart and/or trend graph format. This function is useful<br />
for checking the input signals changing.<br />
Password protection:<br />
By registering your passwords, four levels of protection is available according to the<br />
security levels required for your application.<br />
Level 4: Reading/writing program and writing data are prohibited<br />
Level 3: Reading/writing program are prohibited<br />
Level 2: Writing program is prohibited<br />
Level 1: No protection (changing passwords is available only in this level)<br />
Two points of solid-state output:<br />
Each model of the <strong>T1</strong>-<strong>16S</strong> has two points of solid-state output (transistors for DC<br />
input type and triacs for AC input type). These solid-state outputs are suitable for<br />
frequent switching application.<br />
Basic Hardware and Function 17<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
18 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
DIN rail mounting:<br />
The <strong>T1</strong>-<strong>16S</strong> is equipped with brackets for mounting on a standard 35 mm DIN rail.<br />
The <strong>T1</strong>-<strong>16S</strong> can be mounted on a DIN rail as well as screw mounting.<br />
On-line program changes:<br />
When the <strong>T1</strong>-<strong>16S</strong>’s memory mode is set to 4 k steps mode, on-line (in RUN mode)<br />
program changes are available. Furthermore, program writing into the built-in<br />
EEPROM is also available in RUN mode. These functions are useful in program<br />
debugging stage.<br />
Real-time clock/calendar function: (Enhanced model only)<br />
The <strong>T1</strong>-<strong>16S</strong> has the real-time-clock/calendar function (year, month, day, day of the<br />
week, hours, minutes, seconds) that can be used for performing scheduled<br />
operations, data gathering with time stamps, etc. To back-up the real-time<br />
clock/calendar data, use of the optional battery is recommended.<br />
RS-485 multi-purpose communication port: (Enhanced model only)<br />
The <strong>T1</strong>-<strong>16S</strong> has an RS-485 multi-purpose communication port. Using this port, one<br />
of the following communication modes can be selected.<br />
• Computer link mode: T-series computer link protocol can be used in this mode.<br />
Up to 32 <strong>T1</strong>-<strong>16S</strong>s can be connected to a master computer. By using this mode,<br />
MMI/SCADA system can be easily configured.<br />
• Data link mode: Two <strong>PLC</strong>s (any combination of <strong>T1</strong>S, T2E or T2N) can be<br />
directly linked together. This direct link is inexpensive, easily configured and<br />
requires no special programming.<br />
• Free ASCII mode: User defined ASCII messages can be transmitted and<br />
received through this port. A terminal, printer, bar-code reader, or other serial<br />
ASCII device can be directly connected.<br />
• Inverter connection mode: This mode is specially provided to communicate with<br />
<strong>Toshiba</strong> Inverters (ASDs) VF-A7/G7/S9 series. By using this function, the <strong>T1</strong>-<strong>16S</strong><br />
can control and monitor the connected Inverters.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1.3 System configuration<br />
The following figure shows the <strong>T1</strong>-<strong>16S</strong> system configuration.<br />
Peripheral tool<br />
IBM-PC compatible<br />
personal computer<br />
T-PDS<br />
software<br />
Handy programmer<br />
HP911A<br />
Computer link function<br />
MMI/SCADA<br />
system<br />
RS232C<br />
MMI/SCADA<br />
system<br />
<strong>T1</strong>-<strong>16S</strong> basic unit<br />
<strong>T1</strong>-<strong>16S</strong><br />
I/O modules<br />
6F3B0253<br />
1. System Configuration<br />
IBM-PC compatible<br />
personal computer<br />
RS485 (Standard type only)<br />
8 modules max.<br />
Inverter<br />
Basic Hardware and Function 19<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
1.4 I/O expansion<br />
NOTE<br />
20 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The <strong>T1</strong>-<strong>16S</strong> provides I/O expandability by connecting the I/O modules. Up to eight<br />
I/O modules can be connected.<br />
Available I/O modules<br />
DI116M: 16 points DC input<br />
DO116M: 16 points DC output<br />
DD116M: 8 points DC input + 8 points DC output<br />
RO108M: 8 points relay output<br />
AD121M: 1 channel analog input (0 to 5V or 0 to 20mA)<br />
AD131M: 1 channel analog input (-10 to +10V)<br />
DA121M: 1 channel analog output (0 to 20mA)<br />
DA131M: 1 channel analog output (-10 to +10V)<br />
TC111M: 1 channel thermocouple input (type K, J, E, or ±50mV)<br />
FR112M: TOSLINE-F10 remote station<br />
<strong>T1</strong>-<strong>16S</strong> maximum configuration<br />
<strong>T1</strong>-<strong>16S</strong><br />
main unit<br />
Up to 8 I/O modules<br />
(1) The 5Vdc power to the I/O modules is supplied from the main unit. The main<br />
unit can supply maximum 1.5A of the 5Vdc power to the I/O modules. Check<br />
the current consumption of each I/O module used. Refer to section 2.1.<br />
(2) The connecting order of the I/O modules is not restricted except TOSLINE-<br />
F10 remote station FR112M. When the FR112M is used, it must be the right<br />
end module.<br />
(3) If more than 8 I/O modules are connected, the <strong>T1</strong>-<strong>16S</strong> cannot operate<br />
normally.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1.5 Components<br />
1.5.1 Basic unit<br />
The <strong>T1</strong>-<strong>16S</strong> is available in four types as shown in the following table.<br />
6F3B0253<br />
1. System Configuration<br />
Type Link/ Calendar Power supply Input Output<br />
<strong>T1</strong>-MDR<strong>16S</strong>S<br />
(Enhanced model)<br />
Yes<br />
100-240 Vac,<br />
50/60 Hz<br />
8 points - 24 Vdc 6 points - relay,<br />
2 points - transistor<br />
<strong>T1</strong>-MDR<strong>16S</strong>C<br />
(Standard model)<br />
No<br />
<strong>T1</strong>-MDR<strong>16S</strong>SD<br />
(Enhanced model)<br />
Yes<br />
24 Vdc<br />
<strong>T1</strong>-MDR<strong>16S</strong>CD<br />
(Standard model)<br />
No<br />
Link terminals<br />
(Enhanced model only)<br />
Programmer<br />
port cover<br />
Battery holder<br />
cover<br />
Power supply and<br />
input/output terminals<br />
Operation status LEDs<br />
I/O status LEDs (Low side)<br />
Mounting hole<br />
Expantion<br />
connector<br />
I/O status LEDs (High side)<br />
Basic Hardware and Function 21<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
♦ Behind the programmer port cover<br />
22 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
PRG<br />
Programmer port connector<br />
V0<br />
V1<br />
H/R<br />
Analog setting adjusters<br />
(V0 and V1)<br />
Mode control switch<br />
(HALT / RUN)<br />
Battery holder<br />
Battery type: CR2032<br />
(Optional)<br />
A tab for battery eject<br />
Power supply terminals:<br />
Connect the power cable and grounding wire. The terminal screw size is M3.<br />
See sections 4.4 and 4.5 for wiring.<br />
Input terminals:<br />
Connect input signal wires. The terminal screw size is M3. See section 2.4 for<br />
details.<br />
Output terminals:<br />
Connect output signal wires. The terminal screw size is M3. See section 2.4 for<br />
details.<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
I/O status LEDs:<br />
Indicates the ON/OFF status of each I/O signal. (color: red)<br />
SW54 setting<br />
value<br />
I/O intending for an indication Note<br />
0 (default) Basic unit (L: X000-007, H: Y020-027)<br />
1 I/O module slot 0<br />
2 I/O module slot 1<br />
3 I/O module slot 2<br />
4 I/O module slot 3<br />
5 I/O module slot 4<br />
6 I/O module slot 5<br />
7 I/O module slot 6<br />
8 I/O module slot 7<br />
9 TOSLINE-F10 (FR112M), Low 1 word<br />
10 TOSLINE-F10 (FR112M), High 1 word<br />
Others Basic unit (L: X000-007, H: Y020-027)<br />
Operation status LEDs:<br />
Indicates the operation status of the <strong>T1</strong>-<strong>16S</strong>.<br />
FLT<br />
RUN<br />
PWR<br />
6F3B0253<br />
1. System Configuration<br />
It indicates these at the<br />
time of only RUN<br />
mode.<br />
PWR<br />
Lit Internal 5 Vdc power is normal.<br />
(Power) (green) Not lit Internal 5 Vdc power is not normal.<br />
RUN (green) Lit RUN mode (in operation)<br />
Blinking HOLD mode<br />
Not lit HALT mode or ERROR mode<br />
FLT<br />
Lit ERROR mode<br />
(Fault) (red) Blinking Hardware error (programmer cannot be connected)<br />
Not lit Normal<br />
Mode control switch:<br />
Controls the operation modes of the <strong>T1</strong>-<strong>16S</strong>.<br />
H (HALT) When the switch is turned to H (HALT) side, the <strong>T1</strong>-<strong>16S</strong> stops<br />
program execution (HALT mode). In this position, RUN/HALT<br />
command from the programmer is disabled.<br />
R (RUN) When the switch is turned to R (RUN) side, the <strong>T1</strong>-<strong>16S</strong> starts<br />
program execution. This is the position during normal operation.<br />
In this position, RUN/HALT command from the programmer is also<br />
available.<br />
Basic Hardware and Function 23<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
24 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Analog setting adjusters:<br />
Two analog setting adjusters are provided. The V0 value is stored in SW30 and the<br />
V1 value is stored in SW31. The converted value range is 0 to 1000. Refer to section<br />
8.5 for details of the analog setting function.<br />
Programmer port connector:<br />
Used to connect the programmer cable. The interface is RS-232C. This port can also<br />
be used for the computer link function. Refer to section 1.6 for more information<br />
about the computer link function.<br />
Expansion connector:<br />
Used to connect the I/O module.<br />
RS-485 port (Enhanced model only):<br />
Used to connect a computer (SCADA system), operator interface unit, other <strong>T1</strong>-<strong>16S</strong>,<br />
or many kinds of serial ASCII devices including <strong>Toshiba</strong>’s Inverter through RS-485<br />
interface. Refer to section 1.7 for more information about the <strong>T1</strong>-<strong>16S</strong>’s RS-485 multipurpose<br />
communication functions.<br />
Mounting holes:<br />
Used to fix the <strong>T1</strong>-<strong>16S</strong> on a mounting frame by screws. The mounting holes are<br />
provided at two opposite corners.<br />
<strong>T1</strong><br />
Use two M4 screws for mounting. See section 4.2 for<br />
installing the unit.<br />
DIN rail bracket:<br />
The DIN rail bracket is provided at the rear for mounting the <strong>T1</strong>-<strong>16S</strong> on a 35 mm DIN<br />
rail. See section 4.2 for installing the unit.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1.5.2 I/O modules<br />
NOTE<br />
6F3B0253<br />
1. System Configuration<br />
The <strong>T1</strong>-<strong>16S</strong> can connect up to eight I/O modules.<br />
The following 10 types of the I/O modules are available.<br />
For specification details of the I/O modules, refer to the separate manual “<strong>T1</strong>-<strong>16S</strong><br />
User’s <strong>Manual</strong> − I/O Modules −“.<br />
Type Description Power supply<br />
DI116M 16 points input, 24Vdc – 5mA<br />
DO116M 16 points output, 24Vdc – 100mA<br />
DD116M 8 points input, 24Vdc - 5mA<br />
+ 8 points output, 24Vdc – 100mA<br />
RO108M 8 points relay output, 24Vdc/240Vac - 1A<br />
AD121M 1 channel analog input, 0 to 5V / 0 to 20mA<br />
AD131M 1 channel analog input, ±10V<br />
DA121M 1 channel analog output, 0 to 20mA<br />
DA131M 1 channel analog output, ±10V<br />
TC111M 1 channel thermo-couple input<br />
FR112M TOSLINE-F10 remote station,<br />
1 word input + 1 word output<br />
FR112M Other I/O modules<br />
Expantion connector Expantion connectors<br />
Supplied from the<br />
basic unit (5 Vdc)<br />
(1) If more than 8 I/O modules are connected, <strong>T1</strong>-<strong>16S</strong> cannot operate normally.<br />
(2) The TOSLINE-F10 remote station module (FR112M) must be connected at the<br />
right end. Tow or more FR112Ms cannot be used together.<br />
Basic Hardware and Function 25<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
1.5.3 Options<br />
The following optional items are available.<br />
26 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Item Type Description<br />
Cable for<br />
programming tool<br />
CJ105 For T-PDS, 5 m length<br />
Programmer port<br />
connector<br />
P<strong>T1</strong>6S For RS-232C computer link, with 2 m cable<br />
Option card I/O P<strong>T1</strong>5S Cable side connector for Soldering type<br />
connector P<strong>T1</strong>5F DI116M, DO116M, or DD116M Flat cable type<br />
Back-up battery CR2032 For memory back up. (Available on the market.)<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1.6 Programmer port function<br />
6F3B0253<br />
1. System Configuration<br />
The interface of the <strong>T1</strong>-<strong>16S</strong>’s programmer port is RS-232C. Normally this port is<br />
used to connect the programmer. However, this port can also be used for the<br />
computer link function.<br />
The computer link is a data communication function between computer or operator<br />
interface unit and the <strong>T1</strong>-<strong>16S</strong>. The data in the <strong>T1</strong>-<strong>16S</strong> can be read and written by<br />
creating simple communication program on the computer. The computer link protocol<br />
of the <strong>T1</strong>-<strong>16S</strong> is published in “<strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong> − Communication Function −”.<br />
Item Specifications<br />
Interface Conforms to RS-232C<br />
Transmission system Half-duplex<br />
Synchronization Start-stop system (asynchronous)<br />
Transmission speed 9600 bps (fixed)<br />
Transmission distance 15 m max.<br />
Framing Start bit:<br />
Data bits:<br />
Parity:<br />
Stop bit:<br />
1 bit<br />
8 bits (fixed)<br />
Odd or none<br />
1 bit (fixed)<br />
Protocol T-series computer link (ASCII)<br />
Programmer (binary)<br />
Transmission delay option 0 to 300 ms<br />
By using the multi-drop adapter (CU111), multiple <strong>T1</strong>-<strong>16S</strong>s can be connected on an<br />
RS-485 line. The T-series <strong>PLC</strong> programming software (T-PDS) can also be used in<br />
this configuration.<br />
Operator Interface<br />
<strong>T1</strong>-<strong>16S</strong><br />
C<br />
U<br />
Master Computer<br />
RS-232C RS-485 (1 km max.)<br />
<strong>T1</strong>-<strong>16S</strong><br />
C<br />
U<br />
<strong>T1</strong>-<strong>16S</strong><br />
C<br />
U<br />
Max. 32 <strong>T1</strong>-<strong>16S</strong>s<br />
<strong>T1</strong>-<strong>16S</strong><br />
Basic Hardware and Function 27<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
1.7 RS-485 port communication function<br />
NOTE<br />
28 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The <strong>T1</strong>-<strong>16S</strong> enhanced model has an RS-485 multi-purpose communication port.<br />
This port can work independent of the programmer port.<br />
By using this communication port, one of the following four communication modes is<br />
available, computer link mode, data link mode, free ASCII mode, and Inverter<br />
connection mode.<br />
For details of these functions, refer to the separate manual “<strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong> −<br />
Communication Function −”.<br />
Item Computer<br />
link<br />
Free ASCII Inverter<br />
connection<br />
Data link<br />
Interface Conforms to RS-458<br />
Transmission system Half-duplex<br />
Synchronization Start-stop system (asynchronous)<br />
Transmission code ASCII/binary ASCII Binary Binary<br />
Transmission speed 300, 600, 1200, 2400, 4800, 9600, or<br />
19200 bps<br />
19200 bps<br />
(fixed)<br />
Transmission<br />
distance<br />
1 km max.<br />
Framing Start bit: 1 bit<br />
Special<br />
Data bits: 7 or 8 bits<br />
Parity: Odd, even, or none<br />
Stop bit: 1 or 2 bits<br />
Protocol T-series<br />
computer<br />
User<br />
defined<br />
Inverter VF-<br />
A7/G7/S9<br />
Special<br />
link (ASCII), ASCII binary<br />
Programmer<br />
(binary)<br />
messages protocol<br />
Link configuration 1-to-N N/A 1-to-N 1-to-1<br />
<strong>T1</strong>-<strong>16S</strong> standard model does not have the RS-485 interface.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
1. System Configuration<br />
Computer link mode<br />
T-series computer link protocol can be used in this mode. A maximum of 32 <strong>T1</strong>-<strong>16S</strong>s<br />
can be connected to a master computer.<br />
By using this mode, all the <strong>T1</strong>-<strong>16S</strong>’s data can be accessed by a master computer.<br />
The T-series <strong>PLC</strong> programming software (T-PDS) can also be used in this<br />
configuration.<br />
<strong>T1</strong>-<strong>16S</strong><br />
Master Computer<br />
RS-485 (1 km max.)<br />
<strong>T1</strong>-<strong>16S</strong> <strong>T1</strong>-<strong>16S</strong><br />
Max. 32 <strong>T1</strong>-<strong>16S</strong>s<br />
<strong>T1</strong>-<strong>16S</strong><br />
Data link mode<br />
Two <strong>PLC</strong>s (any combination of <strong>T1</strong>-<strong>16S</strong>, T2E or T2N) can be directly linked together.<br />
This direct link is inexpensive, easily configured and requires no special<br />
programming. Data registers D0000 to D0031 are used for the data transfer.<br />
<strong>T1</strong>-<strong>16S</strong><br />
Station No. 1<br />
D0000<br />
D0015<br />
D0016<br />
D0031<br />
RS-485 (1 km max.)<br />
<strong>T1</strong>S<br />
Station No. 2<br />
D0000<br />
D0015<br />
D0016<br />
D0031<br />
Basic Hardware and Function 29<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net<br />
<strong>T1</strong>
1. System Configuration<br />
30 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Free ASCII mode<br />
The free ASCII mode is used to connect between the <strong>T1</strong>-<strong>16S</strong> and various serial<br />
ASCII devices, such as a micro computer, bar code reader, printer, display, etc.<br />
By using this mode, the <strong>T1</strong>-<strong>16S</strong> can work as a communication master. Therefore, the<br />
<strong>T1</strong>-<strong>16S</strong> can communicate with other <strong>PLC</strong>s using the computer link protocol.<br />
<strong>T1</strong>-<strong>16S</strong><br />
RS-485 (1 km max.)<br />
• Bar-code reader<br />
• ID system<br />
• Weigh scale<br />
• Power meter<br />
• Printer<br />
• Others<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
1. System Configuration<br />
Free ASCII mode<br />
The <strong>T1</strong>-<strong>16S</strong>'s Inverter connection mode is a special function to monitor/control the<br />
<strong>Toshiba</strong> Inverters (ASDs) VF-A7/G7/S9 through the RS-485 line.<br />
Using this mode, the <strong>T1</strong>-<strong>16S</strong> can perform the following functions for the Inverters<br />
connected on the RS-485 line without any special communication program.<br />
• Monitoring − Operating frequency and Terminal status<br />
• Control − Run/Stop/Jog, Forward/Reverse, Frequency reference, etc.<br />
• Parameter read/write<br />
• Broadcast command<br />
888<br />
VF-A7 VF-A7 VF-S9<br />
888<br />
<strong>T1</strong>-<strong>16S</strong><br />
RS-485 (1 km max.)<br />
888 888<br />
RS485 adapter<br />
VF-S9<br />
888 888<br />
VF-S9 VF-S9<br />
(Max. 64 Inverters)<br />
Basic Hardware and Function 31<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
1.8 Real-time data link system<br />
TOSLINE-F10<br />
32 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
TOSLINE-F10 is a high speed data transmission system suited for small points I/O<br />
distribution system. By inserting the TOSLINE-F10 remote module (FR112M), the<br />
<strong>T1</strong>-<strong>16S</strong> can work as a remote station of the TOSLINE-F10 network. On this network,<br />
the <strong>T1</strong>-<strong>16S</strong> sends 1 word data to the master station and receives 1 word data from<br />
the master station.<br />
Item TOSLINE-F10 system specifications<br />
High speed mode Long distance mode<br />
Topology Bus (terminated at both ends)<br />
Transmission distance<br />
(without repeater)<br />
500 m max. (total) 1 km max. (total)<br />
Transmission speed 750 kbps 250 kbps<br />
Scan transmission 512 points (32 words) max.<br />
capacity<br />
Scan cycle 7 ms/32 words 12 ms/32 words<br />
Error checking CRC check<br />
NOTE<br />
Typical data link configuration<br />
The figure below shows the typical data link configuration.<br />
<strong>T1</strong>-<strong>16S</strong><br />
(1) Refer to the separate “<strong>T1</strong> User’s <strong>Manual</strong> − Option Card and I/O<br />
Module −“ for details of the TOSLINE-F10 remote card (FR112).<br />
(2) Refer to the separate TOSLINE-F10 User’s <strong>Manual</strong> for details of<br />
overall TOSLINE-F10 system.<br />
TOSLINE-F10<br />
<strong>T1</strong>-<strong>16S</strong> <strong>T1</strong>-<strong>16S</strong><br />
Operator interface units<br />
Master<br />
computer<br />
T2E<br />
(master)<br />
T2E<br />
(remote)<br />
RI/O<br />
RI/O<br />
RI/O: remote I/O<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1.9 Peripheral tools<br />
The following peripheral tools are available for the <strong>T1</strong>-<strong>16S</strong>.<br />
T-Series Program Development System (T-PDS)<br />
6F3B0253<br />
1. System Configuration<br />
The T-Series Program Development System (T-PDS) is a software which runs on<br />
any IBM-PC compatible personal computers such as <strong>Toshiba</strong>’s Notebook computers.<br />
The same T-PDS software supports on-line/off-line programming, debugging and<br />
program documentation for all the T-Series programmable controllers <strong>T1</strong>/<strong>T1</strong>S,<br />
T2/T2E/T2N, T3/T3H and S2T.<br />
• User-friendly program editor includes cut & paste, address search & replace,<br />
program block move/copy, etc.<br />
• Group programming − part program development by multiple designers and<br />
merging them into a complete program − enhance the software productivity.<br />
• Powerful monitoring, I/O force and data set functions fully support your program<br />
debugging.<br />
• Documentation of programs with commentary makes your maintenance work<br />
easy.<br />
• Remote monitoring/programming via modem (radio/phone) is possible.<br />
The table below shows the T-PDS versions that support the <strong>T1</strong>-<strong>16S</strong>.<br />
Type Part number Versions available for<br />
<strong>T1</strong>-16/28/40 <strong>T1</strong>-40S/<strong>T1</strong>-<strong>16S</strong><br />
T-PDS for Windows TMW33E1SS Ver 1.0 or later *1)<br />
Ver 1.2 or later<br />
T-PDS for MS-DOS TMM33I1SS Ver 1.61 or later *1)<br />
Ver 2.1 or later<br />
*1) The <strong>T1</strong>-<strong>16S</strong> can be used with these versions. However, in this case, there are<br />
the following functional limitations.<br />
• The program size setting is only available as 2 k. It is set to 4 k mode in the<br />
<strong>T1</strong>-<strong>16S</strong>.<br />
• Some of the added instructions (MAVE, DFL, HTOA, ATOH) may not be<br />
edited/monitored. (depending on the version)<br />
NOTE<br />
The connection cable for the <strong>T1</strong>-<strong>16S</strong> is different from that for upper T-Series<br />
<strong>PLC</strong>s. These cables are supplied separately.<br />
Connection cable for <strong>T1</strong>-<strong>16S</strong> ... Type: CJ105, 5 m length<br />
Connection cable for T2/T3 …. Type: CJ905, 5 m length<br />
Basic Hardware and Function 33<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
1. System Configuration<br />
T-Series Handy Programmer (HP911A)<br />
34 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The HP911A is a hand-held programmer, that can be used to program the <strong>T1</strong>-<strong>16S</strong><br />
using ladder diagram. Its portability makes it ideal for maintenance use at remote<br />
locations.<br />
The HP911A has the following features.<br />
• The HP911A supports ladder diagram programming of T-Series programmable<br />
controllers <strong>T1</strong>-<strong>16S</strong>, T2/T2E/T2N and T3.<br />
• Built-in EEPROM allows program copy between T-Series controllers.<br />
• Two display modes are available,<br />
- Normal: 5 lines and 12 columns<br />
- Zoom: Full device description<br />
• On-line data set and I/O force are useful for system checking.<br />
• Backlit LCD display allows operation in dim light.<br />
There are two types of the Handy Programmer (HP911) depending on the cable<br />
included with.<br />
Type Part number Cable included with Versions available for <strong>T1</strong>-<strong>16S</strong><br />
HP911A THP911A∗S 2 m cable for <strong>T1</strong>-<strong>16S</strong> Ver 1.1 or later<br />
HP911 THP911∗∗S 2 m cable for the upper<br />
T-series <strong>PLC</strong>s<br />
Ver 1.1 or later<br />
The <strong>T1</strong>-<strong>16S</strong> can be used with the HP911(A). However, there are the following<br />
functional limitations.<br />
• The program size setting is only available as 2 k. It is set to 4 k mode in the <strong>T1</strong>-<br />
<strong>16S</strong>.<br />
• Some of the added instructions (MAVE, DFL, HTOA, ATOH) cannot be<br />
edited/monitored.<br />
NOTE<br />
A 2 m connection cable for the <strong>T1</strong>-<strong>16S</strong> (Type: CJ102) is supplied with the<br />
HP911A. The cable for the T2/T3 is available separately. (Type: CJ902, 2 m<br />
length)<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Program Storage Module (RM102)<br />
Multi-drop adapter (CU111)<br />
6F3B0253<br />
1. System Configuration<br />
The program storage module (RM102) is an<br />
external memory for storing the <strong>T1</strong>-<strong>16S</strong><br />
program. By using the RM102, program saving<br />
from the <strong>T1</strong>-<strong>16S</strong> to the RM102, and program<br />
loading from the RM102 to the <strong>T1</strong>-<strong>16S</strong> can be<br />
done without need of a programmer.<br />
Because the RM102 has an EEPROM,<br />
maintenance-free program storage and quick<br />
saving/loading are available.<br />
The <strong>T1</strong>-<strong>16S</strong>’s RS-232C programmer port<br />
supports the computer link function.<br />
When two or more <strong>T1</strong>-<strong>16S</strong>s are connected with<br />
a master computer, the multi-drop adapter<br />
(CU111) can be used. (One-to-N configuration)<br />
The CU111 is an RS-232C/RS-485 converter<br />
specially designed for the <strong>T1</strong>-<strong>16S</strong>’s<br />
programmer port.<br />
Basic Hardware and Function 35<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
36 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Section 2<br />
Specifications<br />
2.1 General specifications, 38<br />
2.2 Functional specifications, 40<br />
2.3 I/O specifications, 42<br />
2.4 External dimensions, 46<br />
6F3B0253<br />
Basic Hardware and Function 37<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
2. Specifications<br />
2.1 General specifications<br />
NOTE<br />
AC Power type<br />
DC Power type<br />
38 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Item <strong>T1</strong>-<strong>16S</strong><br />
Power supply voltage 100 to 240Vac (+10/-15%), 50/60 Hz<br />
Power consumption 45VA or less<br />
Inrush current 50A or less (at 240Vac, cold start)<br />
Output 24Vdc<br />
0.2A (for external devices and/or for input signals)<br />
rating (24Vdc, ±10%)<br />
(Note) 5Vdc 1.5A (for I/O module)<br />
Power supply voltage 24Vdc (+20/-15%)<br />
Power consumption 18W or less<br />
Inrush current 25A or less (at 24Vdc)<br />
5Vdc output rating (Note) 1.5A (for I/O module)<br />
Retentive power interruption 10ms or less<br />
Insulation resistance 10MΩ or more<br />
(between power terminals and ground terminal)<br />
Withstand voltage 1500Vac - 1 minute<br />
Ambient temperature 0 to 55°C (operation), -20 to 75°C (storage)<br />
Ambient humidity 5 to 95%RH, no condensation<br />
Noise immunity 1000Vp-p/1µs, Conform to EMC Directive 89/336/EEC<br />
Vibration immunity 9.8m/s 2 (1g)<br />
(for 30 minutes per axis, on 3 mutually perpendicular axes)<br />
Shock immunity 98m/s 2 (10g)<br />
(3 shocks per axis, on 3 mutually perpendicular axes)<br />
Approximate weight 500g<br />
6F3B0253<br />
(1) 24Vdc service power output is not provided on the DC power supply type.<br />
(2) The maximum output current of the 5Vdc is 1.5A. However there is the following<br />
restrictions, depending on the conditions.<br />
• When HP911 is used:<br />
→ Redused by 0.2A<br />
• When RS-485 port is used:<br />
→ Reduced by 0.1A<br />
• When 24Vdc service power is used:<br />
→ Refer to the right chart.<br />
5Vdc<br />
maximum load current<br />
(A)<br />
1.5<br />
1.0<br />
0.1 0.2 (A)<br />
24Vdc service power<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
NOTE<br />
(3) The 5Vdc current consumption of each I/O modules is described below.<br />
Check that the total 5Vdc current consumption is within the limit.<br />
6F3B0253<br />
2. Specifications<br />
Model Specifications 5Vdc consumer<br />
current<br />
DI116M 16points, 24Vdc-5mA input. 50mA<br />
DO116M 16points, 24Vdc-100mA output. 50mA<br />
DD116M 8points, 24Vdc-5mA input.<br />
8points, 24Vdc-100mA output.<br />
50mA<br />
RO108M 8 points, 24Vdc/240Vac – 1A relay output 260mA<br />
AD121M 1ch. 12bit analog input.<br />
(0 to 20mA, 0 to 5V)<br />
260mA<br />
AD131M 1ch. 12bit analog input. (±10V) 260mA<br />
DA121M 1ch. 12bit analog output.<br />
350mA<br />
(0 to 20mA, 0 to 5V)<br />
DA131M 1ch. 12bit analog output. (±10V) 240mA<br />
TC111M 1ch. 12bit thermo couple input. 400mA<br />
FR112M TOSLINE-F10 remote station. 100mA<br />
Basic Hardware and Function 39<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
2. Specifications<br />
2.2 Functional specifications<br />
Item <strong>T1</strong>-<strong>16S</strong><br />
Control method Stored program, cyclic scan system<br />
Scan system Floating scan or constant scan (10 – 200ms, 10ms units)<br />
I/O update Batch I/O refresh<br />
(direct I/O instruction available at basic unit’s I/O)<br />
Program memory (Note) RAM and EEPROM (no back-up battery required)<br />
Program capacity 8K steps<br />
(4K or 8K mode)<br />
Programming language Ladder diagram with function block<br />
Instructions Basic: 21<br />
Function: 97<br />
Execution speed 1.4µs/contact, 2.3µs/coil,<br />
4.2µs/16-bit transfer, 6.5µs/16-bit addition<br />
Program types<br />
1 main program<br />
1 sub-program (initial program)<br />
1 timer interrupt (interval: 5 to 1000ms, 5ms units)<br />
User data<br />
Memory<br />
40 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
4 I/O interrupt (high-speed counter and interrupt input)<br />
I/O register<br />
256 subroutines (up to 3 levels of nesting)<br />
512 points/ 32 words (X/XW, Y/YW)<br />
Auxiliary relay 4096 points/ 256 words (R/RW)<br />
Special relay 1024 points/ 64 words (S/SW)<br />
Timer 256 points (T./T)<br />
64 at 0.01s, 192 at 0.1s<br />
Counter 256 points (C./C)<br />
Data register 4096 words (D)<br />
Index register 3 words (I, J, K)<br />
Capacitor 1 hour (at 25°C)<br />
back-up Battery (option) Max. 2 years.<br />
Min. 6 months. (Note)<br />
NOTE<br />
6F3B0253<br />
(1) The user program stored in the EEPROM is transferred to the RAM<br />
when power is turned on. Therefore, if the program is modified, it is<br />
necessary to issue the EEPROM Write command from the programming<br />
tool. Otherwise, the modified program is over-written by original<br />
EEPROM contents at the next initial load timing.<br />
(2) The data of RAM and calendar IC are backed up by built-in capacitor<br />
and optional battery.<br />
(3) When the optional battery is used, replace the battery periodically with<br />
referring to the table below.<br />
Annual average air temperature<br />
Under 30°C (86°F) Over 30°C (86°F)<br />
Operation Over 8 hours 2 years 1 year<br />
time per day Under 8 hours 1 year 6 months<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Functional specifications (cont’d)<br />
Item <strong>T1</strong>-<strong>16S</strong><br />
I/O capacity 16 points (basic)<br />
+128 points (I/O modules)<br />
I/O type Input 24Vdc input (8 points)<br />
Output Relay (6 points) + transistor (2 points)<br />
I/O terminal block Fixed<br />
Real-time clock Yes, ±60 s/month at 25°C<br />
/calendar<br />
(Enhanced model only)<br />
Special I/O functions<br />
(Note)<br />
Communications<br />
interface<br />
Debug support<br />
function<br />
NOTE<br />
• High speed counter, 2 single or 1 quadrature<br />
• Interrupt input, 2 points<br />
• Adjustable analog register, 2 points<br />
• Pulse output, CW+CCW or pulse+direction<br />
• PWM output<br />
• 1 port RS-232C (programmer port)<br />
- for Programmer or Computer link connection<br />
• 1 port RS-485 (Enhanced model only)<br />
- Programmer<br />
- Computer link<br />
- Data link<br />
- Free ASCII<br />
• TOSLINE-F10 remote (by I/O module)<br />
• Sampling trace, 8 devices and 3 register - 256 times<br />
• On-line programming<br />
• On-line EEPROM write<br />
6F3B0253<br />
2. Specifications<br />
(1) High-speed counter, interrupt input, pulse output and PWM output are<br />
available in the DC input types.<br />
(2) High-speed counter and interrupt input cannot be used simultaneously.<br />
(3) Pulse output and PWM output cannot be used simultaneously.<br />
Basic Hardware and Function 41<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
2. Specifications<br />
2.3 I/O specifications<br />
• Input specifications<br />
Item Specifications<br />
Input type DC input, current source/sink<br />
Number of input points 8 points (8 points/common)<br />
Rated input voltage 24Vdc, +10/-15 %<br />
Rated input current 7mA (at 24Vdc)<br />
Min. ON voltage 15Vdc<br />
Max. OFF voltage 5Vdc<br />
ON delay time 0 to 15ms *1<br />
OFF delay time 0 to 15ms *1<br />
Input signal display LED display for all points, lit at ON, internal logic<br />
side<br />
External connection Removable terminal block, M3<br />
Withstand voltage 1500Vac, 1 minute<br />
(between internal and external circuits)<br />
Internal circuit<br />
LED<br />
42 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
0<br />
7<br />
C<br />
*1: User can change the input ON/OFF delay time of the DC input.<br />
The setting range is 0 to 15ms. (Default value = 10ms) Refer to section 8.2.<br />
Internal circuit<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
• Input signal connections<br />
L<br />
Service power<br />
24Vdc<br />
NOTE<br />
<strong>T1</strong>-<strong>16S</strong><br />
24Vdc<br />
−<br />
C<br />
1<br />
DC IN<br />
3<br />
5<br />
Vin<br />
21<br />
23<br />
N NC + 0 2 4 6 C 20 22 24 26 C<br />
24Vdc input<br />
7<br />
25<br />
27<br />
6F3B0253<br />
2. Specifications<br />
The 24Vdc service power output is not provided on the DC power supply type.<br />
Basic Hardware and Function 43<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
2. Specifications<br />
• Output specifications<br />
Item<br />
Specifications<br />
Relay output Transistor output<br />
Output type Relay contact, normally open Transistor output, current sink<br />
Number of output points 6 points<br />
2 points<br />
(6 pts/common)<br />
(2 points/common)<br />
Rated load voltage 240Vac/24Vdc (max.) 24Vdc<br />
Range of load voltage Max. 264Vac/125Vdc 20.0 - 28.0Vdc<br />
Maximum load current 2A/point (resistive),<br />
4A/common<br />
0.5A/point (resistive)<br />
ON resistance 50mΩ or less<br />
(initial value)<br />
−<br />
Voltage drop at ON − 0.5V or less<br />
Leakage current at OFF None 0.1mA or less<br />
Minimum load 5Vdc, 10mA<br />
(50mW)<br />
−<br />
ON delay time 10ms or less 0.1ms or less<br />
OFF delay time 10ms or less 0.1ms or less<br />
Input signal display LED display for all points, lit at ON, internal logic side<br />
External connection Removable terminal block, M3<br />
Withstand voltage<br />
Internal circuit<br />
1500Vac, 1 minute (between internal and external circuits)<br />
44 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
LED<br />
Internal circuit<br />
Ry<br />
22<br />
27<br />
C<br />
LED<br />
*1: The switching life of the relay output is as follows.<br />
20 million times or more (mechanical)<br />
100 thousand times or more (electrical, at maximum rated voltage and current)<br />
Internal circuit<br />
Vin<br />
20<br />
21<br />
C<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
• Output signal connections<br />
L<br />
Service power<br />
24Vdc<br />
<strong>T1</strong>-<strong>16S</strong><br />
N<br />
NC<br />
−<br />
C<br />
1<br />
3<br />
5<br />
24Vdc<br />
7<br />
DC OUT<br />
Vin<br />
21<br />
23<br />
+ 0 2 4 6 20 22 24 26<br />
+<br />
RELAY OUT<br />
25<br />
27<br />
C C<br />
Transister output Relay output<br />
PS<br />
6F3B0253<br />
2. Specifications<br />
PS 240Vac/24Vdc (max.)<br />
Basic Hardware and Function 45<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
2. Specifications<br />
2.4 External dimensions<br />
♦ <strong>T1</strong>-<strong>16S</strong><br />
♦ I/O module<br />
46 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net<br />
[mm]<br />
[mm]
Section 3<br />
I/O Application Precautions<br />
3.1 Application precautions for input signals, 48<br />
3.2 Application precautions for output signals, 50<br />
6F3B0253<br />
Basic Hardware and Function 47<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
3. I/O Application Precautions<br />
3.1 Application precautions for input signals<br />
! WARNING<br />
48 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
(1) Minimum ON/OFF time of the input signal<br />
The following conditions guarantee correct reading of the ON/OFF state of the input<br />
signal:<br />
Input ON time: ON delay time + the time for one scan<br />
Input OFF time: OFF delay time + the time for one scan<br />
The ON and OFF times of the input signals must be longer than these intervals.<br />
(2) Increasing the contact current<br />
The reliability of some contacts cannot be guaranteed by the specified input current. In<br />
this case, install an external bleeder resistor to increase the contact current.<br />
V<br />
I<br />
Configure emergency stop and safety interlocking circuits outside the<br />
<strong>T1</strong>-<strong>16S</strong>. Otherwise, malfunction of the <strong>T1</strong>-<strong>16S</strong> can cause injury or serious<br />
accidents.<br />
R<br />
I 2<br />
Bleeder resistor<br />
I 1<br />
<strong>T1</strong><br />
input<br />
circuit<br />
V<br />
R<br />
I I<br />
Wattage V<br />
=<br />
− 1<br />
2<br />
> × 3<br />
R<br />
(3) Connecting transistor output device<br />
An example of connecting a transistor output device to <strong>T1</strong>-<strong>16S</strong>’s input circuit is shown<br />
below.<br />
• For NPN open collector • For PNP open collector<br />
C<br />
<strong>T1</strong><br />
input<br />
circuit<br />
C<br />
<strong>T1</strong><br />
input<br />
circuit<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
3. I/O Application Precautions<br />
(4) Countermeasures against leakage current<br />
When a switch with an LED or sensor is used, the input sometimes cannot recognize<br />
that the switch is off due to the current leakage. In this case, install a bleeder resistor<br />
to reduce input impedance.<br />
LE<br />
Bleeder resistor<br />
C<br />
<strong>T1</strong><br />
input<br />
circuit<br />
Select a bleeder resistor according to the following criteria:<br />
(a) The voltage between the input terminals must be lower than the OFF voltage<br />
when the sensor is switched off.<br />
(b) The current must be within the allowable range when the sensor is switched on.<br />
(c) Calculate the wattage of the bleeder resistor by multiplying the current when the<br />
sensor is switched on times three.<br />
Basic Hardware and Function 49<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
3. I/O Application Precautions<br />
3.2 Application precautions for output signals<br />
! WARNING<br />
! CAUTION<br />
50 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Configure emergency stop and safety interlocking circuits outside the<br />
<strong>T1</strong>-<strong>16S</strong>. Otherwise, malfunction of the <strong>T1</strong>-<strong>16S</strong> can cause injury or serious<br />
accidents<br />
1. Turn on power to the <strong>T1</strong>-<strong>16S</strong> before turning on power to the loads.<br />
Failure to do so may cause unexpected behavior of the loads.<br />
2. Configure the external circuit so that the external 24Vdc power required<br />
for the transistor output circuits and power to the loads are switched<br />
on/off simultaneously. Also, turn off power to the loads before turning off<br />
power to the <strong>T1</strong>-<strong>16S</strong>.<br />
3. Install fuses appropriate to the load current in the external circuits for the<br />
outputs. Failure to do so can cause fire in case of load over-current.<br />
(1) 2 points of solid-state output<br />
The leading 2 points of output (Y020 and Y021) are solid-state outputs, transistors on<br />
the DC input types.<br />
These solid-state outputs are suited for frequent switching applications.<br />
Note that the specifications of the solid-state outputs and other outputs (relays) are<br />
different.<br />
(2) Switching life of output relays<br />
Expected relay life is more than 100,000 electrical cycles at rated maximum voltage<br />
and current, and more than 20 million mechanical cycles. The expected contact life<br />
(electrical cycles) is shown on the table below.<br />
Load Load Expected life<br />
Load Load Expected life<br />
voltage current (thousand)<br />
voltage current (thousand)<br />
AC 110Vac, 2A 340 DC 24Vdc, 2A 280<br />
load COSφ = 1 1A 720 load L/R = 0 ms 1A 600<br />
0.5A 1,600 0.5A 1,300<br />
110Vac, 2A 150 24Vdc, 2A 60<br />
COSφ = 0.7 1A 320 L/R = 15 ms 1A 150<br />
0.5A 700 0.5A 350<br />
220Vac, 2A 220 48Vdc, 1A 200<br />
COSφ = 1 1A 500 L/R = 0 ms 0.5A 420<br />
0.5A 1,100 48Vdc, 0.5A 130<br />
220Vac, 2A 100 L/R = 15 ms 0.2A 420<br />
COSφ = 0.7 1A 210 110Vdc, 0.5A 200<br />
0.5A 460 L/R = 0 ms 0.2A 550<br />
110Vdc, 0.2A 150<br />
L/R = 15 ms 0.1A 350<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
3. I/O Application Precautions<br />
(3) Over-current protection<br />
The output circuit of the <strong>T1</strong>-<strong>16S</strong> does not contain protective fuses. Fuses rated for the<br />
output should be provided by the user.<br />
<strong>T1</strong><br />
output<br />
(4) Output surge protection<br />
Where an inductive load is connected to the output, a relatively high energy transient<br />
voltage will be generated when the relay turns OFF. To prevent the problems caused<br />
by this surge, install a surge absorber in parallel to the inductive load.<br />
<strong>T1</strong><br />
output<br />
circuit<br />
Surge absorber:<br />
• Flywheel diode (for DC output)<br />
Inverse withstand voltage: At least three times that of the power supply<br />
Forward current: Larger than the load current<br />
• Varistor (for AC output)<br />
The voltage rating is 1.2 times the maximum (peak) voltage of the power supply<br />
• CR snubber (for DC or AC output)<br />
Load<br />
Load<br />
Fuse appropriate to<br />
the common current<br />
Load<br />
Surge absorber<br />
R: 0.5 to 1Ω per volt coil voltage<br />
C: 0.5 to 1µF per ampere of coil current (non-polarity capacitor)<br />
PS<br />
PS<br />
Basic Hardware and Function 51<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
52 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Section 4<br />
Installation and Wiring<br />
4.1 Environmental conditions, 54<br />
4.2 Installing the unit, 55<br />
4.3 Wiring terminals, 57<br />
4.4 Grounding, 58<br />
4.5 Power supply wiring, 59<br />
4.6 I/O wiring, 61<br />
6F3B0253<br />
Basic Hardware and Function 53<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
4. Installation and Wiring<br />
4.1 Environmental conditions<br />
! CAUTION<br />
Do not install the <strong>T1</strong>-<strong>16S</strong> in the following locations:<br />
• Where the ambient temperature drops below 0°C or exceeds 55°C.<br />
• Where the relative humidity drops below 20% or exceeds 90%.<br />
• Where there is condensation due to sudden temperature changes.<br />
• In locations subject to vibration that exceeds tolerance.<br />
• In locations subject to shock that exceeds tolerance.<br />
• Where there are corrosive or flammable gases.<br />
• In locations subject to dust, machining debris or other particles.<br />
• In locations exposed to direct sunlight.<br />
54 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Excess temperature, humidity, vibration, shocks, or dusty and corrosive<br />
gas environment can cause electrical shock, fire or malfunction.<br />
Install and use the <strong>T1</strong>-<strong>16S</strong> and related equipment in the environment<br />
described in this section.<br />
6F3B0253<br />
Observe the following precautions when installing enclosures in which the <strong>T1</strong>-<strong>16S</strong> will<br />
be installed:<br />
• Provide the maximum possible distance from high-voltage or high-power panels.<br />
This distance must be at least 200mm.<br />
• If installing the enclosures in the vicinity of high-frequency equipment, be sure to<br />
correctly ground the enclosures.<br />
• When sharing the channel base with other panels, check for leakage current from<br />
the other panels or equipment.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
4.2 Installing the unit<br />
! CAUTION<br />
NOTE<br />
6F3B0253<br />
4. Installation and Wiring<br />
The <strong>T1</strong>-<strong>16S</strong> basic unit and the I/O module come equipped with a bracket at the rear<br />
for mounting on a 35mm DIN rail.<br />
Installation precautions:<br />
• Because the <strong>T1</strong>-<strong>16S</strong> is not dust-proof, install it in a dust-proof enclosure.<br />
• Do not install the unit directly above equipment that generates a large amount of<br />
heat, such as a heater, transformer, or large-capacity resistor.<br />
• Do not install the unit within 200mm of high-voltage or high-power cables.<br />
• Allow at least 70mm on all sides of the unit for ventilation.<br />
• For safely during maintenance and operation, install the unit as far as possible from<br />
high-voltage or power equipment. Alternatively, keep the unit separate using a<br />
metal plate or similar separator.<br />
• If high-frequency equipment is installed in the enclosure together with the <strong>T1</strong>-<strong>16S</strong>,<br />
special attention is required for grounding. See section 4.4.<br />
• Be sure to install the unit vertically with keeping the power terminals downside. Do<br />
not install the unit horizontally or upside-down for safety reason.<br />
• Use M4 size screws to mount the <strong>T1</strong>-<strong>16S</strong>.<br />
(Recommended torque: 1.47N⋅m = 15Kgf⋅cm)<br />
Upward<br />
1. Improper installation directions or insufficient installation can cause<br />
fire or the units to drop. Install the <strong>T1</strong>-<strong>16S</strong> and related equipment in<br />
accordance with the instructions described in this section.<br />
2. Turn off power before installing or removing any units, modules,<br />
racks or terminal blocks. Failure to do so can cause electrical shock<br />
or damage to the <strong>T1</strong>-<strong>16S</strong> and related equipment.<br />
3. Entering wire scraps or other foreign debris into to the <strong>T1</strong>-<strong>16S</strong> and<br />
related equipment can cause fire or malfunction. Pay attention to<br />
prevent entering them into the <strong>T1</strong> and related equipment during<br />
installation and wiring.<br />
Mount the <strong>T1</strong>-<strong>16S</strong> on a vertical panel.<br />
All other mounting positions are not<br />
acceptable.<br />
Basic Hardware and Function 55<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
4. Installation and Wiring<br />
Dimensions for screw mounting:<br />
56 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
4.3 Wiring terminals<br />
! CAUTION<br />
6F3B0253<br />
4. Installation and Wiring<br />
The terminal screw size of the <strong>T1</strong>-<strong>16S</strong> is M3. Use crimp-style terminals of 7mm width<br />
or less useable for M3. The terminal block is not removable (fixed).<br />
NOTE<br />
For input and output signal connections, refer to sections 2.4 and 3.<br />
<strong>T1</strong>-MDR<strong>16S</strong>S .... AC power supply model <strong>T1</strong>-MDR<strong>16S</strong>SD.. DC power supply model<br />
RS-485 (Enhanced model only)<br />
TXA RXA RXB<br />
TXB TRM SG<br />
MDR<strong>16S</strong>S<br />
DC IN<br />
DC OUT<br />
RELAY OUT<br />
L − C 1 3 5 7 Vin 21 23 25 27<br />
N NC + 0 2 4 6 C 20 22 24 26 C<br />
NOTE<br />
1. Turn off power before wiring to minimize the risk of electrical shock.<br />
2. Exposed conductive parts of wire can cause electrical shock. Use<br />
crimp-style terminals with insulating sheath or insulating tape to cover<br />
the conductive parts. Also close the terminal covers securely on the<br />
terminal blocks when wiring has been completed.<br />
3. Turn off power before removing or replacing units, modules, terminal<br />
blocks or wires. Failure to do so can cause electrical shock or damage<br />
to the <strong>T1</strong>-<strong>16S</strong> and related equipment.<br />
RS-485 (Enhanced model only)<br />
TXA RXA RXB<br />
TXB TRM SG<br />
MDR<strong>16S</strong>SD<br />
+<br />
-<br />
DC IN<br />
DC OUT<br />
RELAY OUT<br />
NC C 1 3 5 7 Vin 21 23 25 27<br />
NC NC 0 2 4 6 C 20 22 24 26 C<br />
(1) NC stands for ”no connect”. Do not use the NC terminals for wire<br />
relaying or branching.<br />
(2) For the connections of the RS-485 communication port (the upper<br />
terminal block), refer to the separate manual “<strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong> -<br />
Communication Function -.<br />
The applicable wire size is 0.3mm 2 (22 AWG) to 1.25mm 2 (16 AWG). The table below<br />
shows the recommended wire size.<br />
Type of signal Recommended wire size<br />
Power 1.25mm 2 (16 AWG)<br />
Grounding 1.25mm 2 (16 AWG)<br />
I/O signals 0.3mm 2 (22 AWG) to 0.75mm 2 (18 AWG)<br />
Basic Hardware and Function 57<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
4. Installation and Wiring<br />
4.4 Grounding<br />
! CAUTION<br />
58 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
1. Turn off power before wiring to minimize the risk of electrical shock.<br />
6F3B0253<br />
2. Operation without grounding may cause electrical shock or malfunction.<br />
Connect the ground terminal on the <strong>T1</strong>-<strong>16S</strong> to the system ground.<br />
The optimum method for grounding electronic equipment is to ground it separately<br />
from other high-power systems, and to ground more than one units of electronic<br />
equipment with a single-point ground.<br />
Although the <strong>T1</strong>-<strong>16S</strong> has noise immunity to be used in industrial operating conditions,<br />
grounding is important for safety and reliability.<br />
Check the grounding against the following criteria.<br />
1. The <strong>T1</strong>-<strong>16S</strong> must not become a path for a ground current. A high-frequency current<br />
is particularly harmful.<br />
2. Equalize the ground potentials when the expansion rack or unit is connected.<br />
Ground the <strong>T1</strong>-<strong>16S</strong> and the expansion rack or unit at a single point.<br />
3. Do not connect the ground of the <strong>T1</strong>-<strong>16S</strong> to that of high-power systems.<br />
4. Do not use a ground that has unstable impedance, such as painted screws, or<br />
ground subject to vibration.<br />
The grounding marked terminal (see below) is provided on the <strong>T1</strong>-<strong>16S</strong> basic unit for<br />
grounding purpose.<br />
In case of the expansion rack is connected to the <strong>T1</strong>-<strong>16S</strong>, the rack mounting screw is<br />
used for this purpose.<br />
System ground<br />
<strong>T1</strong>-<strong>16S</strong><br />
Mounting panel<br />
• 1.25mm 2 (16 AWG) wire should be used to connect the <strong>T1</strong>-<strong>16S</strong> and the expansion<br />
rack/unit with the enclosure grounding bus bar.<br />
• 100Ω or less to ground is required.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
4.5 Power supply wiring<br />
! CAUTION<br />
Wire the power source to the <strong>T1</strong>-<strong>16S</strong> power supply terminals.<br />
Power source<br />
• Power conditions:<br />
Line filter<br />
6F3B0253<br />
4. Installation and Wiring<br />
1. Turn off power before wiring to minimize the risk of electrical shock.<br />
2. Applying excess power voltage to the <strong>T1</strong>-<strong>16S</strong> can cause explosion or<br />
fire. Apply power of the specified ratings described below.<br />
Insulation<br />
transformer<br />
<strong>T1</strong>-<strong>16S</strong><br />
AC power supply type DC power supply type<br />
Rated voltage 100 to 240Vac, +10/-15% 24Vdc, +20/-15%<br />
Frequency 50/60Hz, ±5% -<br />
Power consumption 45VA or less 18W or less<br />
Retentive power<br />
interruption<br />
Continuous operation for less than 10ms<br />
• 1.25mm 2 (16 AWG) twisted-pair cable should be used for the power cable.<br />
• The power cable should be separated from other cables.<br />
Basic Hardware and Function 59<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
4. Installation and Wiring<br />
Connections of the power supply terminals are shown below.<br />
• AC power supply type<br />
100 to 240Vac<br />
• DC power supply type<br />
24Vdc<br />
60 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
+<br />
-<br />
100-240Vac<br />
∼<br />
L<br />
N<br />
24 Vdc<br />
+<br />
-<br />
Grounding<br />
Grounding<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
4.6 I/O wiring<br />
! CAUTION<br />
6F3B0253<br />
4. Installation and Wiring<br />
• Refer to sections 2.4 and 3 for instructions on how to properly wire the I/O<br />
terminals.<br />
• 0.75mm 2 (18 AWG) to 0.3mm 2 (22 AWG) wires are recommended for I/O signals.<br />
• Separate the I/O signal cables from high-power cables by at least 200mm.<br />
• If expansion rack or unit is used, separate the expansion cable from the power and<br />
I/O signal cables by or unit at least 50mm.<br />
• It is recommended to separate the input signal cables from output signal cables.<br />
Input<br />
signal<br />
1. Turn off power before wiring to minimize the risk of electrical shock.<br />
2. Exposed conductive parts of wire can cause electrical shock. Use<br />
crimp-style terminals with insulating sheath or insulating tape to cover<br />
the conductive parts. Also close the terminal covers securely on the<br />
terminal blocks when wiring has been completed.<br />
3. Turn off power before removing or replacing units, modules, terminal<br />
blocks or wires. Failure to do so can cause electrical shock or damage<br />
to the <strong>T1</strong>-<strong>16S</strong> and related equipment.<br />
<strong>T1</strong>-<strong>16S</strong> 200mm<br />
or more<br />
Output<br />
signal<br />
High-power<br />
cable<br />
Basic Hardware and Function 61<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
62 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Section 5<br />
Operating System Overview<br />
5.1 Operation modes, 64<br />
5.2 About the built-in EEPROM, 66<br />
5.3 Scanning, 69<br />
6F3B0253<br />
Basic Hardware and Function 63<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
5. Operating System Overview<br />
5.1 Operation modes<br />
The <strong>T1</strong>-<strong>16S</strong> has three basic operation modes, the RUN mode, the HALT mode and<br />
the ERROR mode. The <strong>T1</strong>-<strong>16S</strong> also has the HOLD and RUN-F modes mainly for<br />
system checking.<br />
64 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
RUN: The RUN mode is a normal control-operation mode.<br />
In this mode, the <strong>T1</strong>-<strong>16S</strong> reads external signals, executes the user program<br />
stored in the RAM, and outputs signals to the external devices according to<br />
the user program. It is in the RUN mode that the <strong>T1</strong>-<strong>16S</strong> performs scans the<br />
user program logic, which is the basic operation of a <strong>PLC</strong>.<br />
Program changes and EEPROM write are possible while the <strong>T1</strong>-<strong>16S</strong> is in<br />
the RUN mode. Refer to section 6.9.<br />
HALT: The HALT mode is a programming mode.<br />
In this mode, user program execution is stopped and all outputs are<br />
switched off.<br />
Program loading into the <strong>T1</strong>-<strong>16S</strong> is possible only in the HALT mode.<br />
For the standard <strong>T1</strong>, program changes and EEPROM write are possible only<br />
when the <strong>T1</strong> is in the HALT mode.<br />
ERROR: The ERROR mode is a shutdown mode as a result of self-diagnosis.<br />
The <strong>T1</strong>-<strong>16S</strong> enters the ERROR mode if internal trouble is detected by selfdiagnosis.<br />
In this mode, program execution is stopped and all outputs are<br />
switched off. The cause of the shutdown can be confirmed by connecting<br />
the programming tool.<br />
To exit from the ERROR mode, execute the Error Reset command from the<br />
programming tool, or cycle power off and then on again.<br />
HOLD: The HOLD mode is provided mainly for checking the external I/O signals.<br />
In this mode, user program execution is stopped, with input and output<br />
updating is executed. It is therefore possible to suspend program execution<br />
while holding the output state. Moreover, a desired output state can be<br />
established by setting any data by using the programming tool.<br />
RUN-F: The RUN-F mode is a forced RUN mode provided for program checking.<br />
This mode is effective when using the expansion I/Os.<br />
Deferent from the normal RUN mode, the RUN-F mode allows operation<br />
even if the registered I/O modules are not actually mounted.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
5. Operating System Overview<br />
The operation modes are switched by the mode control switch provided on the <strong>T1</strong>-<strong>16S</strong><br />
and the mode control commands issued from the programming tool.<br />
The mode transition conditions are shown below.<br />
HOLD<br />
RUN<br />
Mode control switch is in R (RUN) side.<br />
�<br />
Mode control switch is in H (HALT) side.<br />
�<br />
Mode control switch is turned to H (HALT) side, or HALT command is issued from<br />
�<br />
the programming tool.<br />
Mode control switch is turned to R (RUN) side, or RUN command is issued from<br />
�<br />
the programming tool.<br />
(Power ON)<br />
� �<br />
� �<br />
RUN-F<br />
ERROR<br />
Force RUN (RUN-F) command is issued from the programming tool.<br />
�<br />
HOLD command is issued from the programming tool.<br />
�<br />
HOLD Cancel command is issued from the programming tool.<br />
�<br />
Error Reset command is issued from the programming tool.<br />
�<br />
(dotted line) Error is detected by self-diagnosis.<br />
�<br />
� �<br />
�<br />
�<br />
NOTE<br />
�<br />
�<br />
HALT<br />
The commands from the programming tool are available when the mode<br />
control switch is in R (RUN) side.<br />
�<br />
Basic Hardware and Function 65<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
5. Operating System Overview<br />
5.2 About the built-in EEPROM<br />
The <strong>T1</strong>-<strong>16S</strong> is equipped with a built-in EEPROM and a RAM as standard features.<br />
The user program is stored in the EEPROM so that the user program can be<br />
maintained without the need of a battery. A part of the Data register can also be<br />
stored in the EEPROM.<br />
The table below shows the contents stored in the built-in EEPROM.<br />
<strong>T1</strong>-<strong>16S</strong><br />
User program Entire program (8 k steps) and System information<br />
User data User specified number of Data register starting with address 0.<br />
It is set by SW55.<br />
D0000 - Dnnnn<br />
Setting<br />
information<br />
66 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
(up to 2048 words)<br />
SW36 - SW38:<br />
Programmer port settings<br />
SW55:<br />
Number of Data register to be saved in the EEPROM<br />
SW56 - SW57:<br />
RS-485 port settings<br />
Sampling trace setting information<br />
6F3B0253<br />
The user program and the data stored in the EEPROM are transferred to the RAM<br />
when power is turned on. Subsequent program execution is done based on the RAM<br />
contents. Program editing is also performed on the RAM contents.<br />
Therefore, if the program is modified, it is necessary to issue the EEPROM Write<br />
command from the programming tool. Otherwise, the modified program is overwritten<br />
by original EEPROM contents when the power is turned off and on again.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
EEPROM<br />
User program<br />
(8 k steps)<br />
and System info<br />
Data register<br />
(0 to 2048 words,<br />
user setting)<br />
Other data<br />
�<br />
�<br />
6F3B0253<br />
5. Operating System Overview<br />
RAM<br />
User program<br />
(8 k steps)<br />
and System info<br />
Data register<br />
(D0000 to Dnnnn,<br />
user setting)<br />
Other data<br />
The rest of Data<br />
register and<br />
other registers<br />
� Executed when power is turned on (it is called initial load) or EEPROM Read<br />
command is issued from the programming tool. The EEPROM Read is possible<br />
only in the HALT mode.<br />
� Executed when EEPROM Write command is issued from the programming tool.<br />
It is possible in either HALT or RUN mode. (See Note)<br />
Basic Hardware and Function 67<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
5. Operating System Overview<br />
68 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Special register SW55 is used to specify the number of Data registers to be stored in<br />
the EEPROM. The allowable setting value is 0 to 2048.<br />
The table below shows the correspondence between the SW55 value and Data<br />
registers saved in the EEPROM.<br />
SW55 setting Range of Data registers saved Remarks<br />
value<br />
in EEPROM<br />
0 None<br />
1 D0000 only<br />
2 D0000 to D0001<br />
3 D0000 to D0002<br />
: :<br />
2047 D0000 to D2046<br />
2048 D0000 to D2047 Default value<br />
Others D0000 to D2047 Regarded as 2048<br />
When the EEPROM Write command is executed, the <strong>T1</strong>-<strong>16S</strong> checks the value of<br />
SW55 and saves the Data registers into the EEPROM depending on the SW55 value.<br />
The value of SW55 itself is also saved in the EEPROM.<br />
At the initial load or the EEPROM Read command is executed, the <strong>T1</strong>-<strong>16S</strong> checks the<br />
value for SW55 in the EEPROM and transfers the corresponding number of data to<br />
the Data registers of the RAM.<br />
NOTE<br />
(1) The EEPROM has the life limit for writing. It is 100,000 times. Pay<br />
attention not to exceed the limit. If the number of execution of<br />
EEPROM Write command exceeds 100,000 times, EEPROM alarm<br />
flag (S007) comes ON.<br />
(2) Even in RUN mode, the EEPROM Write command can be executed.<br />
However, in this case, only the user program is written into the<br />
EEPROM. (D register data and setting information are not saved.)<br />
(3) The data in the EEPROM can also be read or written by using the<br />
program instruction (FUN236 XFER instruction).<br />
(4) When the EEPROM writing is executed by the XFER instruction in the<br />
user program, <strong>T1</strong>-<strong>16S</strong> does not update the internal EEPROM write<br />
counts. Therefore the EEPROM alarm flag (S007) will not correspond<br />
to this operation. Pay attention to the life limit of the EEPROM.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
5.3 Scanning<br />
6F3B0253<br />
5. Operating System Overview<br />
The flowchart below shows the basic internal operations performed by the <strong>T1</strong>-<strong>16S</strong><br />
from the time power is turned on through program execution. As the diagram shows,<br />
executing a program consists of continuous scanning operations. One scan is a cycle<br />
starting with the self-diagnosis and ending with the completion of peripheral support.<br />
Scan<br />
Power ON<br />
Hardware check<br />
Initial load<br />
Register/device<br />
initialization<br />
Self-diagnosis<br />
RUN mode<br />
Mode<br />
control<br />
Register/device<br />
initialization<br />
Program check<br />
I/O update<br />
Timer update<br />
User program<br />
execution<br />
Peripheral<br />
support<br />
HALT mode<br />
At the first<br />
scan<br />
At the first<br />
scan<br />
Power-up<br />
Initialization<br />
(approx. 1 s)<br />
Scan cycle<br />
Basic Hardware and Function 69<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
5. Operating System Overview<br />
Hardware check:<br />
Performs checking and initialization of the system ROM, the system RAM and the<br />
peripheral LSIs.<br />
70 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Initial load:<br />
Transfers the user program and user data from the EEPROM to the RAM. (Refer to<br />
section 5.2)<br />
Register/device initialization:<br />
Initializes registers and devices as shown below.<br />
Register/device Initialization<br />
External input (X/XW) Forced inputs are retained. Others are cleared to 0.<br />
External output (Y/YW) Forced coil devices are retained. Others are cleared to 0.<br />
Auxiliary device/register User specified retentive registers and forced coil devices<br />
(R/RW)<br />
are retained. Others are cleared to 0.<br />
Special device/register<br />
(S/SW)<br />
Special setting data are retained. Others are cleared to 0.<br />
Timer device/register User specified retentive registers are retained. Others are<br />
(T./T)<br />
cleared to 0.<br />
Counter device/register User specified retentive registers are retained. Others are<br />
(C./C)<br />
cleared to 0.<br />
Data register (D) User specified retentive registers are retained. Others are<br />
cleared to 0.<br />
Index register (I, J, K) Cleared to 0.<br />
NOTE<br />
(1) When the data stored in the EEPROM (Data registers) are used, these<br />
registers should be specified as retentive. Otherwise, these data are<br />
transferred from EEPROM to RAM, but then cleared to 0 at the<br />
initialization.<br />
(2) The data in the retentive registers are stored in RAM and backed up by<br />
built-in capacitor and by the optional battery if used. The back-up<br />
period is 1 hours or more at 25 °C. If optional battery (CR2032) is<br />
used, the back-up period is 1 year or more at 25 °C.<br />
The <strong>T1</strong>-<strong>16S</strong> checks the validity of the retentive data at the power-up<br />
initialization, and if they are not valid, sets the special device (S00F) to<br />
ON. Therefore, check the status of S00F in the user program and<br />
initialize the retentive registers if S00F is ON.<br />
(3) The retentive registers can be set by the programming tool for RW, T,<br />
C and D registers. The registers from address 0 to the designated<br />
address for each type are set as retentive registers. Refer to the<br />
separate manual for the programming tool for setting the retentive<br />
registers.<br />
(4) The input force and the forced coil are functions for program<br />
debugging. For details, refer to section 6.7.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
5. Operating System Overview<br />
Self-diagnosis:<br />
Checks the proper operation of the <strong>T1</strong>-<strong>16S</strong> itself. If an error has detected and cannot<br />
be recovered by re-tries, the <strong>T1</strong>-<strong>16S</strong> moves into ERROR mode. For the self-diagnosis<br />
items, refer to section 10.2.<br />
Mode control:<br />
Checks the mode control switch status and the mode control request commands from<br />
the programming tool.<br />
The scan mode − floating scan or fixed-time scan − is also controlled hear.<br />
NOTE<br />
The floating scan:<br />
When one scan is finished, immediately starts the next scan. The scan time<br />
is shortest, but may vary depending on the program execution status.<br />
Scan time Scan time Scan time<br />
The fixed-time scan:<br />
The scan operation is started every user-specified time. The time setting<br />
range is 10 to 200 ms (10 ms units). If an actual scan needs longer time<br />
than the setting time, it works as the floating scan.<br />
Scan time (50 ms fixed) Scan time (50 ms fixed)<br />
(idling) (idling)<br />
Program check:<br />
At the beginning of the RUN mode, the user program is compiled and its validity is<br />
checked.<br />
I/O update:<br />
Reads the external input signals into the external input devices/registers (X/XW), and<br />
sends the data of the external output devices/registers (Y/YW) to the external output<br />
circuits. Then the outputs (relays, etc.) changes the states and latches until the next<br />
I/O update timing.<br />
The states of the forced input devices are not updated by this operation.<br />
Timer update:<br />
Updates the timer registers which are activated in the user program, and the timing<br />
devices (S040 to S047).<br />
Basic Hardware and Function 71<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
5. Operating System Overview<br />
User program execution:<br />
Executes the programmed instructions from the beginning to the END instruction.<br />
This is the essential function of the <strong>T1</strong>-<strong>16S</strong>.<br />
In this section, only the main program execution is mentioned. For other program<br />
types, such as timer interrupt, etc., refer to section 6.5.<br />
72 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Peripheral support:<br />
Supports the communications with the programming tool or external devices<br />
connected by the computer link function. The time for this operation is limited within<br />
approx. 2 ms in the floating scan mode, and within allowable idling time in the fixedtime<br />
scan mode.<br />
If the special relay S158 is set to ON, the peripheral support priority mode is selected.<br />
In the peripheral support priority mode, the peripheral support time is not limited. As<br />
the result, the communication response is improved although the scan time becomes<br />
long at the time.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Section 6<br />
Programming Information<br />
6.1 Devices and registers, 74<br />
6.2 Index modification, 86<br />
6.3 Real-time clock/calendar, 88<br />
6.4 I/O allocation, 89<br />
6.5 <strong>T1</strong>-<strong>16S</strong> memory mode setting, 91<br />
6.6 User program configuration, 92<br />
6.7 Programming language, 98<br />
6.8 Program execution sequence, 99<br />
6.9 On-line debug support functions, 100<br />
6.10 Password protection, 103<br />
6F3B0253<br />
Basic Hardware and Function 73<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
6.1 Devices and registers<br />
74 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The <strong>T1</strong>-<strong>16S</strong> program consists of bit-based instructions that handle ON/OFF<br />
information, such as contact and coil instructions, and register-based (16-bit)<br />
instructions, such as those for data transfer and arithmetic operations.<br />
Devices are used to store the ON/OFF information of contacts and coils, and registers<br />
are used to store 16-bit data.<br />
Devices are divided into six types:<br />
X External input devices<br />
Y External output devices<br />
R Auxiliary relay devices<br />
S Special devices<br />
T. Timer devices<br />
C. Counter devices<br />
Registers are divided into eight types:<br />
XW External input registers<br />
YW External output registers<br />
RW Auxiliary relay registers<br />
SW Special registers<br />
T Timer registers<br />
C Counter registers<br />
D Data registers<br />
I, J, K Index registers<br />
Device and register numbers<br />
X devices share the same memory area as XW registers. Device X004, for example,<br />
represents the number 4 bit in the XW00 register.<br />
Bit position / Number<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
XW00 1<br />
X004<br />
Thus, "X004 is ON" means that bit number 4 of XW00 is 1.<br />
Y, R, and S devices work in a similar manner.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Addressing devices<br />
6F3B0253<br />
6. Programming Information<br />
A device number of X, Y, R and S devices consist of a register number and bit position<br />
as follows.<br />
X 00 4<br />
Represents bit position 0 to F in the register.<br />
Decimal number representing the register containing the corresponding<br />
device.<br />
Represents the type of device. (X, Y, R, or S)<br />
As for the timer (T.) and the counter (C.) devices, a device number is expressed as<br />
follows.<br />
T. 12<br />
Addressing registers<br />
Corresponding register number. (decimal number)<br />
Represents the type of device. (T. or C.)<br />
Dot (.) is used to identify as device.<br />
A register number except the index registers is expressed as follows.<br />
XW 01<br />
Register number. (decimal number)<br />
Represents the type of register. (XW, YW, RW, SW, T, C or D)<br />
The index registers (I, J and K) do not have the number.<br />
J<br />
I, J, or K<br />
Basic Hardware and Function 75<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
Available address range<br />
Device/register Symbol<br />
<strong>T1</strong>-<strong>16S</strong><br />
Number of points Address range<br />
External input device X Total 512 points X000 - X31F<br />
External output device Y<br />
Y020 - Y31F<br />
External input register XW Total 32 words XW00 - XW31<br />
External output register YW<br />
YW02 - YW31<br />
Auxiliary relay device R 4096 points R000 - R255F<br />
Auxiliary relay register RW 256 words RW000 - RW255<br />
Special device S 1024 points S000 - S63F<br />
Special register SW 64 words SW00 - SW63<br />
Timer device T. 256 points T.000 - T.255<br />
Timer register T 256 words T000 - T255<br />
Counter device C. 256 points C.000 - C.255<br />
Counter register C 256 words C000 - C255<br />
Data register D 4096 words D0000 - D4095<br />
Index register<br />
I 1 word I (no address)<br />
J 1 word J (no address)<br />
K 1 word K (no address)<br />
NOTE<br />
76 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
(1) 1 word = 16 bits<br />
(2) The available data range in each register is -32768 to 32767 (H8000 to<br />
H7FFF) except for the timer and the counter registers.<br />
The data range of the timer register is 0 to 32767. That of the counter<br />
register is 0 to 65535.<br />
(3) Double-word (32 bits) data is available in two consecutive registers.<br />
In this case, lower address register stores the lower 16 bits data.<br />
(MSB) F -------------0 F ------------ 0 (LSB)<br />
D0101 D0100<br />
Upper 16bits Lower 16bits<br />
In this manual, a double-word register is expressed by using ‘⋅’.<br />
For example, D0101⋅D0100.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
6. Programming Information<br />
External input devices (X)<br />
These devices (X) indicate the ON/OFF states of external input signals through the<br />
input circuits. External input devices can be used many times in a program.<br />
External output devices (Y)<br />
The external output devices (Y) store the ON/OFF signals that drive the external<br />
devices through the output circuits. They can be used for coils in a program.<br />
External input registers (XW)<br />
These (XW) are 16-bit registers for storing values, which are received from the input<br />
circuits.<br />
External output registers (YW)<br />
These 16-bit registers (YW) are used for storing values, which are sent to the output<br />
circuits.<br />
Auxiliary relay devices and registers (R/RW)<br />
The auxiliary relay devices (R) are used to store intermediate results of sequences.<br />
The auxiliary relay registers (RW) are used to store temporary results of function<br />
instructions. The data in R/RW cannot be output directly to the output circuits. It is<br />
necessary to move the data to Y/YW.<br />
It is possible to make these registers retentive so that they retain data in the event of a<br />
power failure. See section 5.3.<br />
Timer devices and registers (T./T)<br />
The timer registers (T) are used for storing the elapsed time of timer instructions, the<br />
on-delay (TON), off-delay (TOF) and single-shot (SS) timers.<br />
0.01 s base timers and 0.1 s base timers are provided.<br />
Time base <strong>T1</strong>-<strong>16S</strong><br />
0.01 s T000 to T063<br />
0.1 s T064 to T255<br />
The timer devices (T.) work as the output of the timer instructions.<br />
It is possible to specify the T registers as retentive to retain their data in the event of a<br />
power failure. See section 5.3.<br />
Basic Hardware and Function 77<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
78 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Counter devices and registers (C./C)<br />
The counter registers (C) are used for storing the count value of the counter (CNT)<br />
and the up-down counter (U/D) instructions.<br />
The counter devices (C.) work as the output of the counter instructions.<br />
It is possible to specify the C registers as retentive to retain their data in the event of a<br />
power failure. See section 5.3.<br />
Data registers (D)<br />
Functionally the data registers (D) are the same as auxiliary relay registers (RW)<br />
except that the D registers cannot be used as devices.<br />
A part of the data registers are saved in the built-in EEPROM as fixed data and<br />
transferred into the RAM at the initial load.<br />
The range of the data registers saved in the EEPROM can be specified by SW55.<br />
See section 5.2.<br />
It is possible to specify the D registers as retentive to retain their data in the event of a<br />
power failure. See section 5.3.<br />
Index registers (I, J, and K)<br />
These index registers are used for indirect addressing for a register.<br />
For example, if the value of I is 100 in the following register expression, it designates<br />
D0100. For details, refer to section 6.2.<br />
I<br />
D0000 D0100 if I=100<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
6. Programming Information<br />
Special devices and registers (S/SW)<br />
The special devices (S) and special registers (SW) are used for special purposes. See<br />
list below.<br />
Device/<br />
register<br />
Name Function<br />
S000 0: Initialization 4: HOLD mode<br />
S001 <strong>T1</strong>/<strong>T1</strong>S operation mode 1: HALT mode 6: ERROR mode<br />
S002 2: RUN mode<br />
S003 3: RUN-F mode<br />
S004 CPU error (down) ON at error state (related to SW01)<br />
S005 I/O error (down) ON at error state (related to SW02)<br />
S006 Program error (down) ON at error state (related to SW03)<br />
S007 EEPROM alarm (alarm) ON when EEPROM write exceeds 100,000 times<br />
S008 Fixed-time scan time-over ON when actual scan time is longer than the setting<br />
(alarm)<br />
time as fixed-time scan<br />
S009 − Reserved<br />
S00A Clock/calendar error<br />
(alarm)<br />
ON when clock/calendar data is illegal<br />
S00B − Reserved<br />
S00C − Reserved<br />
S00D TL-F10 error (alarm) ON when TOSLINE-F10 transmission error occurs<br />
S00E − Reserved<br />
S00F Retentive data invalid<br />
(alarm)<br />
ON when retentive data in RAM are invalid<br />
NOTE<br />
(1) These devices are set by the <strong>T1</strong>-<strong>16S</strong> operating system. These devices<br />
are read only for user.<br />
(2) Devices marked as (down) are set in the ERROR mode. Therefore<br />
these devices cannot be used in the user program.<br />
(3) Devices marked as (alarm) are set in the normal operation mode.<br />
These devices can be used in the user program.<br />
Basic Hardware and Function 79<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
Device/<br />
register<br />
Name Function<br />
S010 System ROM error (down) ON at error state<br />
S011 System RAM error (down) ON at error state<br />
S012 Program memory error<br />
(down)<br />
ON at error state<br />
S013 EEPROM error (down) ON at error state<br />
S014 − Reserved<br />
S015 − Reserved<br />
S016 − Reserved<br />
S017 − Reserved<br />
S018 − Reserved<br />
S019 − Reserved<br />
S01A − Reserved<br />
S01B − Reserved<br />
S01C − Reserved<br />
S01D − Reserved<br />
S01E − Reserved<br />
S01F Watchdog timer error<br />
(down)<br />
ON at error state<br />
S020 − Reserved<br />
S021 I/O mismatch (down) ON at error state<br />
S022 − Reserved<br />
S023 − Reserved<br />
S024 − Reserved<br />
S025 − Reserved<br />
S026 − Reserved<br />
S027 − Reserved<br />
S028 − Reserved<br />
S029 − Reserved<br />
S02A − Reserved<br />
S02B − Reserved<br />
S02C − Reserved<br />
S02D − Reserved<br />
S02E − Reserved<br />
S02F − Reserved<br />
NOTE<br />
80 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
(1) These devices are set by the <strong>T1</strong>-<strong>16S</strong> operating system. These devices<br />
are read only for user.<br />
(2) Devices marked as (down) are set in the ERROR mode. Therefore<br />
these devices cannot be used in the user program.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
6. Programming Information<br />
Device/<br />
register<br />
Name Function<br />
S030 Program error ON at error state (related to SW06)<br />
S031 Scan time over (down) ON when the scan time exceeds 200 ms<br />
S032 − Reserved<br />
S033 − Reserved<br />
S034 − Reserved<br />
S035 − Reserved<br />
S036 − Reserved<br />
S037 − Reserved<br />
S038 − Reserved<br />
S039 − Reserved<br />
S03A − Reserved<br />
S03B − Reserved<br />
S03C − Reserved<br />
S03D − Reserved<br />
S03E − Reserved<br />
S03F − Reserved<br />
S040 Timing relay 0.1 s OFF 0.05 s / ON 0.05 s (0.1 s interval)<br />
S041 Timing relay 0.2 s OFF 0.1 s / ON 0.1 s (0.2 s interval)<br />
S042 Timing relay 0.4 s OFF 0.2 s / ON 0.2 s (0.4 s interval) All OFF at the<br />
S043 Timing relay 0.8 s OFF 0.4 s / ON 0.4 s (0.8 s interval) beginning of<br />
S044 Timing relay 1.0 s OFF 0.5 s / ON 0.5 s (1.0 s interval) RUN mode<br />
S045 Timing relay 2.0 s OFF 1.0 s / ON 1.0 s (2.0 s interval)<br />
S046 Timing relay 4.0 s OFF 2.0 s / ON 2.0 s (4.0 s interval)<br />
S047 Timing relay 8.0 s OFF 4.0 s / ON 4.0 s (8.0 s interval)<br />
S048 − Reserved<br />
S049 − Reserved<br />
S04A − Reserved<br />
S04B − Reserved<br />
S04C − Reserved<br />
S04D − Reserved<br />
S04E Always OFF Always OFF<br />
S04F Always ON Always ON<br />
NOTE<br />
(1) These devices are set by the <strong>T1</strong>-<strong>16S</strong> operating system. These devices<br />
are read only for user.<br />
(2) Devices marked as (down) are set in the ERROR mode. Therefore<br />
these devices cannot be used in the user program.<br />
Basic Hardware and Function 81<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
82 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Device/<br />
register<br />
Name Function<br />
S050 CF (carry flag) Used for instructions which manipulate carry<br />
S051 ERF (instruction error flag) ON when instruction execution error is occurred<br />
(related to alarm flags of SW06)<br />
S052 − Reserved<br />
S053 − Reserved<br />
S054 − Reserved<br />
S055 − Reserved<br />
S056 − Reserved<br />
S057 − Reserved<br />
S058 − Reserved<br />
S059 − Reserved<br />
S05A − Reserved<br />
S05B − Reserved<br />
S05C − Reserved<br />
S05D − Reserved<br />
S05E − Reserved<br />
S05F − Reserved<br />
S060 Illegal instruction (down) ON when illegal instruction is detected<br />
S061 − Reserved<br />
S062 − Reserved<br />
S063 − Reserved<br />
S064 Boundary error (alarm) ON when illegal address is designated by indirect<br />
addressing (operation continued)<br />
S065 − Reserved<br />
S066 − Reserved<br />
S067 − Reserved<br />
S068 Division error (alarm) ON when error occurs in division instruction (operation<br />
continued)<br />
S069 BCD data error (alarm) ON when BCD data error has detected in BCD<br />
operation instructions (operation continued)<br />
S06A Table operation error ON when table size error has detected in table<br />
(alarm)<br />
operation instructions (operation continued) (<strong>T1</strong>S only)<br />
S06B Encode error (alarm) ON when error occurs in encode instruction (operation<br />
continued)<br />
S06C − Reserved<br />
S06D − Reserved<br />
S06E − Reserved<br />
S06F − Reserved<br />
NOTE<br />
(1) Devices marked as (down) are set in the ERROR mode. Therefore<br />
these devices cannot be used in the user program.<br />
(2) CF, ERF and devices marked as (alarm) can be reset by the user<br />
program.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
6. Programming Information<br />
Device/<br />
register<br />
Name Function<br />
SW07 Clock/calendar (Year) Lower 2 digits of the calendar year<br />
(01, 02, ... )<br />
SW08 Clock/calendar (Month) Month (01, 02, ... 12) They are stored in<br />
SW09 Clock/calendar (Day) Day (01, 02, ... 31) the lower 8 bits by<br />
SW10 Clock/calendar (Hour) Hour (00, 01, ... 59) BCD code<br />
SW11 Clock/calendar (Minute) Minute (00, 01, ... 59)<br />
SW12 Clock/calendar (Second) Second (00, 01, ... 59)<br />
SW13 Clock/calendar (Week) Day of the week<br />
(Sun = 00, Mon = 01, ... Sat = 06)<br />
SW14 − Reserved<br />
SW15 Peripheral support priority Bit 8 (S158) is used to select peripheral support priority<br />
SW16 Mode of special input<br />
functions<br />
Used to select the special input functions<br />
SW17 Input filter constant Used to set the input filter constant<br />
SW18 Preset values for high Used to set the preset values for high speed counters<br />
SW19<br />
SW20<br />
SW21<br />
speed counter<br />
SW22 Count values for high Present count values of the high speed counters are<br />
SW23 speed counter stored<br />
SW24 High speed counter control<br />
flags<br />
Control flags for the high speed counters<br />
SW25 − Reserved<br />
SW26 Mode of special output<br />
functions<br />
Used to select the special output functions<br />
SW27 Special output control flags Control flags for the pulse/PWM output<br />
SW28 Special output frequency<br />
setting<br />
Output frequency setting for the pulse/PWM output<br />
SW29 PWM output duty setting Pulse duty setting for the PWM output<br />
SW30 Analog setting value 1 Input value of the analog setting adjuster V0<br />
SW31 Analog setting value 2 Input value of the analog setting adjuster V1<br />
SW32 − Reserved<br />
SW33 − Reserved<br />
SW34 TL-F10 send data TOSLINE-F10 transmission data (send to master)<br />
SW35 TL-F10 receive data TOSLINE-F10 transmission data (receive from master)<br />
SW36 PRG port station address Used to set the programmer port station address<br />
(1 to 32)<br />
SW37 PRG port parity Used to set the programmer port parity (0=none,<br />
1=odd)<br />
SW38 PRG port response delay Used to set the programmer port response delay time<br />
(0 to 30: 0 to 300ms)<br />
NOTE<br />
(1) These devices are set by the <strong>T1</strong>-<strong>16S</strong> operating system. These devices<br />
are read only for user.<br />
(2) Devices marked as (down) are set in the ERROR mode. Therefore<br />
these devices cannot be used in the user program.<br />
Basic Hardware and Function 83<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
84 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Device/<br />
register<br />
Name Function<br />
S390 Timer interrupt execution<br />
status<br />
ON during execution<br />
S391 I/O interrupt #1 execution<br />
status<br />
ON during execution<br />
S392 I/O interrupt #2 execution<br />
status<br />
ON during execution<br />
S393 I/O interrupt #3 execution<br />
status<br />
ON during execution<br />
S394 I/O interrupt #4 execution<br />
status<br />
ON during execution<br />
S395 − Reserved<br />
S396 − Reserved<br />
S397 − Reserved<br />
S398 − Reserved<br />
S399 − Reserved<br />
S39A − Reserved<br />
S39B − Reserved<br />
S39C − Reserved<br />
S39D − Reserved<br />
S39E − Reserved<br />
S39F − Reserved<br />
S400 − Reserved<br />
S401 HOLD device ON during HOLD mode (setting by user program is also<br />
available)<br />
S402 − Reserved<br />
S403 − Reserved<br />
S404 − Reserved<br />
S405 − Reserved<br />
S406 − Reserved<br />
S407 − Reserved<br />
S408 − Reserved<br />
S409 − Reserved<br />
S40A − Reserved<br />
S40B − Reserved<br />
S40C − Reserved<br />
S40D − Reserved<br />
S40E − Reserved<br />
S40F − Reserved<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
6. Programming Information<br />
Device/<br />
register<br />
Name Function<br />
SW41 Sub-program #1 execution Bit 0 (S410) is ON during the sub-program #1 is<br />
status<br />
executed<br />
SW42 − Reserved<br />
SW43 − Reserved<br />
SW44 − Reserved<br />
SW45 − Reserved<br />
SW46 − Reserved<br />
SW47 − Reserved<br />
SW48 − Reserved<br />
SW49 − Reserved<br />
SW50 − Reserved<br />
SW51 − Reserved<br />
SW52 − Reserved<br />
SW53 − Reserved<br />
SW54 Basic unit I/O LED display Used to display the selected I/O module status<br />
mode<br />
(0 = Basic unit, 1 to 8 = I/O module slot 0 to 7,<br />
9 and 10 = TOSLINE-F10)<br />
SW55 Number of EEPROM write Used to set the number of data registers to be saved in<br />
data<br />
the EEPROM (0 to 2048, initial value is 2048)<br />
SW56 RS-485 port operation Used to set the RS-485 port operation mode<br />
mode<br />
(0 = Computer link, 1 = Data link, 2 = Free ASCII,<br />
3 = Inverter connection)<br />
SW57 RS-485 port response Used to set the RS-485 port response delay time<br />
delay<br />
(0 to 30: 0 to 300ms)<br />
SW58 RS-485 port Free ASCII<br />
flags<br />
Used for the RS-485 port Free ASCII function<br />
SW59 − Reserved<br />
SW60 − Reserved<br />
SW61 − Reserved<br />
SW62 − Reserved<br />
SW63 − Reserved<br />
NOTE<br />
(1) For details of SW54, refer to section 1.5.1.<br />
(2) For details of SW55, refer to section 5.2.<br />
(3) For details of SW56 through SW58, refer to the Communication<br />
function manual.<br />
Basic Hardware and Function 85<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
6.2 Index modification<br />
When registers are used as operands of instructions, the method of directly<br />
designating the register address as shown in Example 1) below is called ‘direct<br />
addressing’.<br />
86 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
As opposed to this, the method of indirectly designating the register by combination<br />
with the contents of the index register (I, J, or K) as shown in Example 2) below is<br />
called ‘indirect addressing’. In particular, in this case, since the address is modified<br />
using an index register, this is called ‘index modification’.<br />
Example 1)<br />
⎯[ RW10 MOV D1000 ]⎯<br />
Data transfer instruction<br />
Transfer data of RW10 to D1000<br />
Example 2)<br />
I J<br />
⎯[ RW10 MOV D0000 ]⎯<br />
Data transfer instruction (with index modification)<br />
Transfer data of RW(10 + I) to D(0000 + J)<br />
(If I = 3 and J = 200, the data of RW13 is transferred to D0200)<br />
There are 3 types of index register, I, J and K. Each type processes 16-bit integers<br />
(-32768 to 32767). There are no particular differences in function between these 3<br />
types of index register.<br />
There is no special instruction for substituting values in these index registers. These<br />
are designated as destination of data transfer instructions, etc.<br />
⎯[ 00064 MOV I ]⎯ (substitutes 64 in index register I)<br />
⎯[ D0035 MOV J ]⎯ (substitutes the data of D0035 in index register J)<br />
⎯[ RW20 + 00030 → K ]⎯ (substitutes the result of addition in index register K)<br />
NOTE<br />
(1) The index modification is available for RW, T, C and D registers.<br />
(2) If index registers are used as a double-length register, only the<br />
combinations J×I and K×J are allowed.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
The followings are examples of index modifications.<br />
I<br />
RW10<br />
! CAUTION<br />
J<br />
D0201⋅D0200<br />
NOTE<br />
When I = 0, it designates RW10.<br />
When I = 1, it designates RW11.<br />
When I = -1, it designates RW09.<br />
When I = 10, it designates RW20.<br />
When I = -10, it designates RW00.<br />
6F3B0253<br />
6. Programming Information<br />
When J = 0, it designates D0201⋅D0200.<br />
When J = 1, it designates D0202⋅D0201.<br />
When J = 2, it designates D0203⋅D0202.<br />
When J = -1, it designates D0200⋅D0199.<br />
When J = -2, it designates D0199⋅D0198.<br />
Be careful that the registers do not exceed the address range by the index<br />
modification. The address range is not checked by the <strong>T1</strong>-<strong>16S</strong>.<br />
Substitutions of values into index registers and index modifications can be<br />
used any times in a program. Normally, the program will be easier to see if<br />
a value substitution into an index register is positioned immediately before<br />
the index modification.<br />
Basic Hardware and Function 87<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
6.3 Real-time clock/calendar (Enhanced model only)<br />
88 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The <strong>T1</strong>-<strong>16S</strong> enhanced model is equipped with the real-time clock/calendar for year,<br />
month, day, day of the week, hour, minute, and second.<br />
These data are stored in the special registers SW07 to SW13 by 2-digit BCD format<br />
as follows.<br />
Register Function Data<br />
SW07 Year 1999 = H0099, 2000 = H0000, 2001 = H0001, 2002 = H0002 ...<br />
SW08 Month Jan. = H0001, Feb. = H0002, Mar. = H0003, ... Dec. = H0012<br />
SW09 Day 1st = H0001, 2nd = H0002, 3rd = H0003, ... 31st = H0031<br />
SW10 Hour H0000, H0001, H0002, ... H0022, H0023<br />
SW11 Minute H0000, H0001, H0002, ... H0058, H0059<br />
SW12 Second H0000, H0001, H0002, ... H0058, H0059<br />
SW13 Week Sun. = H0000, Mon. = H0001, Tue. = H0002, ... Sat. = H0006<br />
Program example:<br />
In the following circuit, output Y030 turns ON for 1 minute at every Sunday 6 pm.<br />
(H0018)<br />
Clock/calendar back up:<br />
The clock/calendar continues updating even while the power to the <strong>T1</strong>-<strong>16S</strong> is off by<br />
built-in capacitor and by the optional battery (CR2032) if used. Its buck-up period is as<br />
follows.<br />
Environment<br />
Expected value Guarantee value<br />
temperature Capacitor Battery Capacitor Battery<br />
Under 30 °C (86 °F) 2 hours 2 year 1 hours 1 year<br />
Over 30 °C (86 °F) 1 hours 1 year 30 minutes 6 months<br />
As shown in the table, it is recommended to use the optional battery when the realtime<br />
clock/calendar function is used.<br />
In the <strong>T1</strong>-<strong>16S</strong>, the validity of the clock/calendar is checked. If the data is not valid by<br />
excess power off period, special relay S00A is set to ON. Therefore, when the<br />
clock/calendar is used, it is recommended to check the status of S00A in the user<br />
program.<br />
Setting the clock/calendar:<br />
To set the clock/calendar data, the following 2 ways are available. In both cases, the<br />
week data is automatically calculated.<br />
(1) Setting the clock/calendar data on the system information screen of the<br />
programming tool.<br />
(2) Using the Calendar Set instruction (CLND) in the user program.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6.4 I/O allocation<br />
6F3B0253<br />
6. Programming Information<br />
The external input signals are allocated to the external input devices/registers (X/XW).<br />
The external output signals are allocated to the external output devices/registers<br />
(Y/YW).<br />
The register numbers of the external input and output registers are consecutive. Thus<br />
one register number can be assigned for either input or output.<br />
As for the <strong>T1</strong>-<strong>16S</strong> basic unit, I/O allocation is fixed as follows.<br />
Inputs: 8 points (X000 - X007)<br />
<strong>T1</strong>-<strong>16S</strong> Outputs: 8 points (Y020 - Y027)<br />
X000 --- X007 Y020---- Y027<br />
Any operations for the I/O allocation are not required if only the <strong>T1</strong>-<strong>16S</strong> basic unit is<br />
used.<br />
However, if the I/O modules are used with the <strong>T1</strong>-<strong>16S</strong>, the I/O allocation operation is<br />
necessary. Refer to the separate manual "<strong>T1</strong>-<strong>16S</strong> <strong>User's</strong> <strong>Manual</strong> - I/O Modules -".<br />
Basic Hardware and Function 89<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
90 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Internally, the <strong>T1</strong>-<strong>16S</strong> has information called ‘I/O allocation table’ in its memory. This<br />
I/O allocation table shows the correspondence between I/O hardware and software,<br />
i.e. register/device.<br />
The contents of the I/O allocation table are as follows.<br />
Unit Slot<br />
PU<br />
I/O type<br />
0<br />
1<br />
2<br />
X+Y 4W<br />
0 3<br />
4<br />
5<br />
1<br />
6<br />
7<br />
0<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
The <strong>T1</strong>-<strong>16S</strong> operating system automatically sets the I/O type ‘X+Y 4W’ on the slot 0 at<br />
unit 0 position when the memory clear is executed for the <strong>T1</strong>-<strong>16S</strong>.<br />
When the <strong>T1</strong>-<strong>16S</strong> program is developed in off-line, the above I/O allocation table<br />
should be set before programming. For this operation (called manual I/O allocation),<br />
refer to the programming tool manual.<br />
NOTE<br />
PU slot must be blank<br />
Slot 0 is for basic unit (XW00, XW01, YW02<br />
and YW03 are assigned internally)<br />
Slots 1 to 7 of unit 0 are not used<br />
(must be blank)<br />
These slots are for I/O modules<br />
(1) Unit base address setting function is not supported by the <strong>T1</strong>-<strong>16S</strong>.<br />
Do not use this function with the <strong>T1</strong>-<strong>16S</strong>. It will causes malfunction.<br />
(2) When the TOSLINE-F10 station module FR112M is used, allocate it at<br />
the end of the I/O modules.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6.5 <strong>T1</strong>-<strong>16S</strong> memory mode setting<br />
6F3B0253<br />
6. Programming Information<br />
The program capacity of the <strong>T1</strong>-<strong>16S</strong> is 8 k steps. However, user can set the <strong>T1</strong>-<strong>16S</strong>’s<br />
program capacity to 4 k steps. It is called the <strong>T1</strong>-<strong>16S</strong>’s memory mode.<br />
That is, the <strong>T1</strong>-<strong>16S</strong> has two memory modes, 8 k mode and 4 k mode.<br />
In the 4 k mode, on-line program changes become available, although the program<br />
capacity is limited to 4 k steps. Refer to section 6.9 for the on-line debug support<br />
functions.<br />
To set the <strong>T1</strong>-<strong>16S</strong>’s memory mode, write 4 k or 8 k on the Program Size Setting of the<br />
System Parameters using the programming tool. Then execute the EEPROM write<br />
command.<br />
Basic Hardware and Function 91<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
6.6 User program configuration<br />
92 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
A group of instructions for achieving the <strong>PLC</strong>-based control system is called ‘user<br />
program’. The <strong>T1</strong>-<strong>16S</strong> has 8 k steps capacity for storing the user program.<br />
A ‘step’ is the minimum unit, which composes an instruction. Number of steps required<br />
for one instruction is depending on the type of instruction. Refer to section 7.1.<br />
The figure below shows the <strong>T1</strong>-<strong>16S</strong>’s memory configuration.<br />
4 k or 8 k steps<br />
NOTE<br />
RAM<br />
System information<br />
User program<br />
Data registers<br />
mentioned in<br />
section 5.2<br />
Other registers/<br />
devices<br />
Back-up area<br />
by EEPROM<br />
For conditions of transfer between RAM and EEPROM, see section 5.2.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
System information<br />
6F3B0253<br />
6. Programming Information<br />
System information is the area which stores execution control parameters. The<br />
following contents are included in the system information.<br />
(1) Machine parameters (hardware type, memory type)<br />
(2) User program information (program ID, system comments, number of steps used)<br />
(3) Passwords<br />
(4) Retentive register area information<br />
(5) <strong>T1</strong>S program memory mode, 4 k steps or 8 k steps<br />
(6) Execution control parameters (scan mode, timer interrupt interval)<br />
(7) Station number setting for programmer port (<strong>T1</strong>), or RS-485 port communication<br />
parameters (Enhanced model)<br />
(8) I/O allocation table<br />
(9) Input force table<br />
The system information is stored in the built-in EEPROM. Therefore, when this<br />
information is modified, the EEPROM write operation is necessary. Otherwise, these<br />
are over-written by original EEPROM contents at the next initial load timing.<br />
User program<br />
The <strong>T1</strong>-<strong>16S</strong> has a capacity of 8 k steps of the user program.<br />
The user program is stored by each program types as shown in the following diagram,<br />
and is managed by units called blocks in each program types.<br />
User program configuration Program type internal configuration<br />
(Program types) (Blocks)<br />
Main program<br />
Sub-program #1<br />
Timer interrupt<br />
I/O interrupt #1<br />
I/O interrupt #2<br />
I/O interrupt #3<br />
I/O interrupt #4<br />
Subroutine<br />
Block 1<br />
Block 2<br />
Block 10<br />
Block N<br />
(N = max. 256)<br />
Block 1<br />
Basic Hardware and Function 93<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
In the user program, the main program is the core. The scan operation explained in<br />
section 5.3 is for the main program. The operation of other program types are<br />
explained in the following sections.<br />
The following 8 program types are supported by the <strong>T1</strong>-<strong>16S</strong>.<br />
(1) Main program<br />
(2) Sub-program #1<br />
(3) Timer interrupt program<br />
(4) I/O interrupt program #1<br />
(5) I/O interrupt program #2<br />
(6) I/O interrupt program #3<br />
(7) I/O interrupt program #4<br />
(8) Subroutine<br />
The blocks are just separators of the program, and have no effect on the program<br />
execution. However, by dividing the user program into some blocks, the program<br />
becomes easy to understand. The block numbers need not be consecutive.<br />
94 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
In each program type and block, there is no limit of program capacity. The only limit is<br />
the total capacity.<br />
6.6.1 Main program<br />
The main program is the core of the user program. It is executed once in each scan.<br />
1 scan time<br />
Mode I/O Timer Main program Mode I/O<br />
Time<br />
Timer<br />
In the above figure,<br />
Mode means the mode control operation<br />
I/O means the I/O update processing<br />
Timer means the timer up date processing<br />
Main program means the main program execution<br />
the self-diagnostic check and peripheral support are omitted in this figure.<br />
Main program<br />
The end of the main program is recognized by the END instruction.<br />
Although instructions may be present after the END instruction, these portions will not<br />
be executed.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6.6.2 Sub-program #1<br />
6F3B0253<br />
6. Programming Information<br />
If the sub-program #1 is programmed, it is executed once at the beginning of the first<br />
scan (before main program execution).<br />
Therefore, the sub-program #1 can be used to set the initial value into the registers.<br />
The sub-program #1 is called the initial program.<br />
The figure below shows the first scan operation.<br />
RUN mode<br />
transition 1st scan 2nd scan<br />
The end of the sub-program #1 is recognized by the END instruction.<br />
6.6.3 Timer interrupt program<br />
Scan<br />
I/O Timer Sub#1 Main program Mode I/O Timer Main program<br />
The timer interrupt is the highest priority task. It is executed cyclically with a user<br />
specified interval, with suspending other operation.<br />
The interrupt interval is set in the system information. (5 to 1000 ms, 5 ms units)<br />
Timer interrupt<br />
1 scan<br />
1 scan<br />
Timer interrupt<br />
interval<br />
Time<br />
Time<br />
1 scan<br />
Timer interrupt<br />
interval<br />
1 scan<br />
The end of the timer interrupt is recognized by the IRET instruction.<br />
Basic Hardware and Function 95<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
6.6.4 I/O interrupt programs<br />
96 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The I/O interrupt program is also the highest priority task. It is executed immediately<br />
when the interrupt factor is generated, with suspending other operation.<br />
The following 4 types I/O interrupt programs are supported in the <strong>T1</strong>/<strong>T1</strong>S.<br />
(1) I/O interrupt #1<br />
The I/O interrupt #1 is used with the high speed counter function. When the count<br />
value reaches the preset value, etc., the I/O interrupt #1 is activated immediately<br />
with suspending other operation. The end of the I/O interrupt #1 is recognized by<br />
the IRET instruction. For detailed information, refer to section 8.3.<br />
(2) I/O interrupt #2<br />
The I/O interrupt #2 is also used with the high speed counter function. Refer to<br />
section 8.3 for details.<br />
(3) I/O interrupt #3<br />
The I/O interrupt #3 is used with the interrupt input function. When the state of the<br />
interrupt input is changed from OFF to ON (or ON to OFF), the I/O interrupt #3 is<br />
activated immediately with suspending other operation. The end of the I/O<br />
interrupt #3 is also recognized by the IRET instruction. For detailed information,<br />
refer to section 8.4.<br />
(4) I/O interrupt #4<br />
The I/O interrupt #4 is also used with the interrupt input function. Refer to section<br />
8.4 for details.<br />
If an interrupt factor is generated while other interrupt program is executing (including<br />
the timer interrupt), the interrupt factor is held. Then it will be activated after finishing<br />
the other interrupt program execution.<br />
If two or more interrupt factors are generated at the same time, the priority is as<br />
follows.<br />
Timer > I/O #1 > I/O #2 > I/O #3 > I/O #4<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6.6.5 Subroutines<br />
6F3B0253<br />
6. Programming Information<br />
In the program type ‘Subroutine’, The following number of subroutines can be<br />
programmed.<br />
The <strong>T1</strong>-<strong>16S</strong> supports up to 256 subroutines.<br />
The subroutine is not a independent program. It is called from other program types<br />
(main program, sub-program, interrupt program) and from other subroutines.<br />
One subroutine is started with the SUBR instruction, and ended by the RET<br />
instruction.<br />
It is necessary to assign a subroutine number to the SUBR instruction. The available<br />
subroutine numbers are 0 to 255.<br />
⎯[ SUBR (000) ]⎯<br />
Subroutine number<br />
The RET instruction has no subroutine number.<br />
The instruction that calls a registered subroutine is the CALL instruction. The CALL<br />
instruction has the subroutine number to be called.<br />
⎯[ CALL N.000 ]⎯<br />
Subroutine number<br />
Main program<br />
Execution<br />
Subroutine<br />
flow<br />
⎥⎯[ SUBR (000) ]⎯⎯⎯⎜<br />
⎥⎯⎜⎥⎯[ CALL N.000 ]⎯⎯⎜<br />
NOTE<br />
⎥⎯⎯⎯⎯⎯⎯ [ RET ]⎯⎜<br />
(1) Multiple subroutines can be programmed in a block. However, one<br />
subroutine in one block is recommended.<br />
(2) From the inside of a subroutine, other subroutines can be called<br />
(nesting). Its allowable level is up to 3 levels.<br />
Basic Hardware and Function 97<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
6.7 Programming language<br />
98 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The programming language of the <strong>T1</strong>-<strong>16S</strong> is ‘ladder diagram’.<br />
Ladder diagram is a language, which composes program using relay symbols as a<br />
base in an image similar to a hard-wired relay sequence. In the <strong>T1</strong>/<strong>T1</strong>S, in order to<br />
achieve an efficient data-processing program, ladder diagram which are combinations<br />
of relay symbols and function blocks are used.<br />
The ladder diagram program is constructed by units called ‘rung’. A rung is defined as<br />
one network which is connected each other.<br />
Rung number<br />
1<br />
2<br />
3<br />
The rung numbers are a series of numbers (decimal number) starting from 1, and<br />
cannot be skipped. There is no limit to the number of rungs.<br />
The size of any one rung is limited to 11 lines × 12 columns.<br />
A example of a ladder diagram program is shown below.<br />
Rung<br />
When X005 is ON or the data of D0100 is greater than 200, Y027 comes ON.<br />
Y027 stays ON even if X005 is OFF and the data of D0100 is 200 or less.<br />
Y027 will come OFF when X006 comes ON.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6.8 Program execution sequence<br />
The instructions execution sequence is shown below.<br />
6F3B0253<br />
6. Programming Information<br />
(1) They are executed in the sequence from block 1 through the final block, which<br />
contains the END instruction (or IRET in an interrupt program).<br />
(2) They are executed in the sequence from rung 1 through the final rung in a block<br />
(or the END instruction).<br />
(3) They are executed according to the following rules in any one rung.<br />
� When there is no vertical<br />
connection, they are<br />
executed from left to right.<br />
� When there is an OR<br />
connection, the OR logic<br />
portion is executed first.<br />
� When there is a branch, they<br />
are executed in the order from<br />
the upper line to the lower line.<br />
A combination of � and �<br />
�<br />
above.<br />
The instructions execution sequence in which function instructions are included also<br />
follows the above rules. However, for program execution control instructions, such as<br />
jumps (JCS), loops (FOR-NEXT), subroutines (CALL-SUBR-RET), it will depend the<br />
specifications of each instruction.<br />
Basic Hardware and Function 99<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net<br />
1<br />
1<br />
5<br />
1<br />
1<br />
2<br />
7<br />
2<br />
2<br />
3<br />
2<br />
3<br />
3<br />
4<br />
3<br />
5<br />
4<br />
6<br />
6<br />
4<br />
7<br />
4<br />
6<br />
5<br />
8
6. Programming Information<br />
6.9 On-line debug support functions<br />
100 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The following on-line (during RUN) functions are supported in the <strong>T1</strong>-<strong>16S</strong> for effective<br />
program debugging.<br />
On-line function 4 k mode 8 k mode<br />
Force function Yes Yes<br />
Sampling trace function Yes Yes<br />
Changing timer /counter<br />
preset value<br />
Yes Yes<br />
Changing constant operand of<br />
function instruction<br />
Yes Yes<br />
Changing device directly Yes Yes<br />
Program changing in edit<br />
mode<br />
Yes No<br />
EEPROM write command Yes Yes<br />
NOTE<br />
Refer to section 6.5 for 4 k/8 k mode.<br />
Force function<br />
Two types of force functions are available, input force and coil force.<br />
The input force is used to disable the external input signals. When an external input<br />
device is designated as forced input, the ON/OFF state of the device can be changed<br />
manually by using the data setting function of the programming tool, regardless of the<br />
corresponding external signal state. The input force designation is available for the<br />
external input devices (X).<br />
The coil force is used to disable the coil instruction. When a coil instruction on the<br />
program is designated as forced coil, the ON/OFF state of the coil device can be<br />
changed manually by using the data setting function of the programming tool,<br />
regardless of the coil circuit execution status.<br />
On the programming tool, the forced input and forced coil are expressed as follows.<br />
Forced input<br />
Forced coil<br />
NOTE<br />
X005 x005<br />
Normal<br />
Normal<br />
Forced<br />
Y023 Y023<br />
Forced<br />
If EEPROM write operation is executed with remaining the force<br />
designation, the force designation is also saved into the built-in EEPROM.<br />
Because the force function is debugging function, release all force<br />
designation before executing the EEPROM write operation. The force batch<br />
release command is available when the <strong>T1</strong>-<strong>16S</strong> is in HALT mode.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
6. Programming Information<br />
Sampling trace function<br />
The sampling trace function collects the status of specified devices or register at every<br />
specified sampling timing. The collected data can be displayed on the programmer<br />
(T-PDS) screen in the format of timing chart (for devices) or trend graph (for register).<br />
The minimum sampling timing is the <strong>T1</strong>-<strong>16S</strong>’s scan cycle.<br />
This function is useful for program debugging and troubleshooting.<br />
<strong>T1</strong>-<strong>16S</strong><br />
Sampling target Devices (up to 8) and<br />
Registers (up to 3)<br />
Sampling capacity 256 times<br />
The collected data is stored in the <strong>T1</strong>-<strong>16S</strong> internal buffer.<br />
The buffer works as a ring buffer, and latest collected data can be displayed.<br />
The sampling start/stop condition (arm condition) and the collection timing (trigger<br />
condition) can be specified by status changing of devices.<br />
For detailed key operations for arm/trigger conditions setting on the T-PDS, refer to<br />
the manual for T-PDS.<br />
NOTE<br />
T-PDS screen example of device timing chart<br />
(1) On the T-PDS, select ‘3 registers + 8 devices’ as the sampling type.<br />
(2) As the arm and trigger conditions, register values cannot be used.<br />
(3) The After times setting is not effective for the <strong>T1</strong>-<strong>16S</strong>.<br />
Basic Hardware and Function 101<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6. Programming Information<br />
102 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Timer/counter preset value (constant data) changing<br />
The preset value (constant data) of timer or counter instruction can be changed in online<br />
(during RUN) by using the programming tool.<br />
Function instruction constant operand changing<br />
The constant operand of function instruction can be changed in on-line (during RUN)<br />
by using the programming tool.<br />
Device changing<br />
The device of contact or coil instruction can be changed in on-line (during RUN) by<br />
using the programming tool.<br />
On-line program changing<br />
When the <strong>T1</strong>S’s memory mode is 4 k mode, the program can be changed using<br />
normal edit mode. (rung by rung)<br />
In the on-line program changing, it is not allowed to change the number or order of the<br />
following instructions.<br />
NOTE<br />
END, MCS, MCR, JCS, JCR, FOR, NEXT, CALL, SUBR, RET, IRET<br />
The above on-line functions are performed on the RAM memory. Therefore,<br />
when program has been changed, execute the EEPROM write operation<br />
before turning off power. Otherwise, program stored in the EEPROM will be<br />
overwritten.<br />
On-line EEPROM write<br />
The EEPROM write is possible in on-line (during RUN) as well as in HALT mode.<br />
In the on-line EEPROM write, user data is not written into the EEPROM.<br />
During this operation, the <strong>T1</strong>-<strong>16S</strong>’s scan time becomes longer. However, as it has the<br />
time limit per scan, the <strong>T1</strong>-<strong>16S</strong>’s control operation is not stopped.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6.10 Password protection<br />
6F3B0253<br />
6. Programming Information<br />
The <strong>T1</strong>-<strong>16S</strong> has the password function to protect the user program and data from<br />
unauthorized operations.<br />
There are four levels of protection. Accordingly, three levels of passwords can be<br />
registered to control the protection levels.<br />
These passwords are stored in the built-in EEPROM. Therefore, if you entered,<br />
changed or cleared the passwords, the EEPROM write operation is necessary.<br />
The outline of the protection levels are shown below. For details, refer to the manual<br />
for the programming tool.<br />
Protection level 4 (disabled functions)<br />
• Writing register/device data<br />
• Writing system information<br />
• I/O allocation<br />
Protection level 3 (disabled functions)<br />
• Reading program<br />
• Program write into EEPROM<br />
Protection level 2 (disabled functions)<br />
• Clear memory<br />
• Writing/loading program<br />
• <strong>T1</strong>/<strong>T1</strong>S operation mode changes (by programming tool)<br />
• Setting/changing passwords<br />
Protection level 1 (disabled functions)<br />
• None (all functions are available)<br />
When the level 1, 2 and 3 passwords are registered, the <strong>T1</strong>-<strong>16S</strong> will be started as<br />
protection level 4. In this state, for example, entering the level 2 password changes<br />
the protection level to 2.<br />
NOTE<br />
Strict<br />
When you use the password function, do not forget the level 1 password.<br />
Otherwise, you cannot change/release the registered passwords.<br />
Basic Hardware and Function 103<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
104 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Section 7<br />
Instructions<br />
7.1 List of instructions, 106<br />
7.2 Instruction specifications, 116<br />
6F3B0253<br />
Basic Hardware and Function 105<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
7.1 List of instructions<br />
106 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The <strong>T1</strong>-<strong>16S</strong> has 21 types of basic ladder instructions and 97 types of function<br />
instructions as listed below. The specifications of each instruction will be described in<br />
detail later.<br />
The tables listing these instructions are provided as a quick reference. (Note: In the<br />
following table, italic character means operand, i.e. register, device or constant value.)<br />
Basic ladder instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
− NO contact A NO (normally open) contact of<br />
device A.<br />
− NC contact A<br />
NC (normally closed) contact<br />
of device A.<br />
− Transitional<br />
Turns ON output for 1 scan<br />
contact (rising)<br />
when input changes from OFF<br />
to ON.<br />
− Transitional<br />
Turns ON output for 1 scan<br />
contact (falling)<br />
when input changes from ON<br />
to OFF.<br />
− Coil A<br />
Relay coil of device A.<br />
Page<br />
1 1.4 - 3.3 117<br />
1 1.4 - 3.3 118<br />
1 3.0 119<br />
1 3.0 120<br />
1 2.3 121<br />
− Forced coil A<br />
Forced coil of device A. State<br />
of device A is retained<br />
regardless of the input state.<br />
1 2.3 122<br />
− Inverter I Inverts the input state. 1 1.4 - 3.3 123<br />
− Invert coil A<br />
I<br />
Stores the inverse state of<br />
input into device A.<br />
1 2.3 124<br />
− Positive pulse<br />
contact<br />
− Negative pulse<br />
contact<br />
A<br />
P<br />
A<br />
N<br />
− Positive pulse coil A<br />
P<br />
− Negative pulse coil A<br />
N<br />
Turns ON output for 1 scan<br />
when input is ON and device A<br />
changes from OFF to ON.<br />
Turns ON output for 1 scan<br />
when input is ON and device A<br />
changes from ON to OFF.<br />
Turns ON device A for 1 scan<br />
when input changes from OFF<br />
to ON.<br />
Turns ON device A for 1 scan<br />
when input changes from ON<br />
to OFF.<br />
− ON delay timer −[ A TON B ]− Turns ON output when the<br />
time specified by A has<br />
elapsed after the input came<br />
ON. B is a timer register.<br />
− OFF delay timer −[ A TOF B ]− Turns OFF output when the<br />
time specified by A has<br />
elapsed after the input came<br />
OFF. B is a timer register.<br />
− Single shot timer −[ A SS B ]− Turns ON output for the time<br />
specified by A when the input<br />
comes ON. B is a timer<br />
register.<br />
1 125<br />
1 126<br />
1 127<br />
1 128<br />
2 12.6 129<br />
2 12.8 130<br />
2 13.0 131<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Basic ladder instructions (continued)<br />
6F3B0253<br />
7. Instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
− Counter C CNT Q Counts the number of cycles<br />
E A B the count input (C) comes ON<br />
while the enable input (E) is<br />
ON, and turns ON output (Q)<br />
when the count reaches to the<br />
value specified by A. B is a<br />
counter register.<br />
2 22.6 132<br />
− Master control set ⎥−−[ MCS ]−⎢ Turns OFF power rail between 1 3.75<br />
− Master control reset ⎥−−[ MCR ]−⎢ MCS and MCR when MCS<br />
input is OFF.<br />
1<br />
(in a<br />
pair)<br />
133<br />
− Jump control set ⎥−−[ JCS ]−⎢ Jumps from JCS to JCR when 1 2.75<br />
− Jump control reset ⎥−−[ JCR ]−⎢ JCS input is ON.<br />
1<br />
(in a<br />
pair)<br />
134<br />
− End ⎥−−[ END ]−⎢ Indicates end of main program<br />
or sub-program.<br />
1 1.4 135<br />
Data transfer instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
018 Data transfer −[ A MOV B ]− Transfers data of A to B. 3 4.2 136<br />
019 Double-word<br />
data transfer<br />
−[ A+1⋅A DMOV B+1⋅B ]− Transfers double-word data<br />
of A+1⋅A to B+1⋅B.<br />
3 7.2 137<br />
020 Invert transfer −[ A NOT B ]− Transfers bit-inverted data of<br />
A to B.<br />
3 4.6 138<br />
022 Data exchange −[ A XCHG B ]− Exchanges data of A with B. 3 6.5 139<br />
024 Table initialize −[ A TINZ (n) B ]− Transfers data of A to n<br />
registers starting with B.<br />
3 140<br />
025 Table transfer −[ A TMOV (n) B ]− Transfers data of n registers<br />
starting with A to n registers<br />
starting with B.<br />
3 141<br />
026 Table invert −[ A TNOT (n) B ]− Transfers bit-inverted data of<br />
transfer<br />
n registers starting with A to<br />
n registers starting with B.<br />
3 142<br />
090 Multiplexer −[ A MPX (n) B → C ]− Transfers data from the<br />
register specified by B in the<br />
table, size n starting with A,<br />
to C.<br />
5 70.6 176<br />
091 Demultiplexer −[ A DPX (n) B → C ]− Transfers data from A to the<br />
register specified by B in the<br />
table, size n starting with C.<br />
5 71.5 177<br />
Basic Hardware and Function 107<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Arithmetic operations<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
027 Addition −[ A + B → C ]− Adds data of A and B, and<br />
stores the result in C.<br />
4 6.5 143<br />
028 Subtraction −[ A - B → C ]− Subtracts data of B from A,<br />
and stores the result in C.<br />
4 6.5 144<br />
029 Multiplication −[ A ∗ B → C+1⋅C ]− Multiplies data of A and B,<br />
and stores the result in<br />
double-length register C+1⋅C.<br />
4 8.8 145<br />
030 Division −[ A / B → C ]− Divides data of A by B, and<br />
stores the quotient in C and<br />
the reminder in C+1.<br />
4 9.7 146<br />
031 Double-word −[ A+1⋅A D+ B+1⋅B → C+1⋅C ]− Adds data of A+1⋅A and<br />
addition<br />
B+1⋅B, and stores the result<br />
in C+1⋅C.<br />
4 11.6 147<br />
032 Double-word −[ A+1⋅A D- B+1⋅B → C+1⋅C ]− Subtracts data of B+1⋅B from<br />
subtraction<br />
A+1⋅A, and stores the result<br />
in C+1⋅C.<br />
4 11.7 148<br />
035 Addition with −[ A +C B → C ]− Adds data of A, B and the<br />
carry<br />
carry, and stores the result in<br />
C. The carry flag changes<br />
according to the result.<br />
4 9.7 149<br />
036 Subtraction −[ A -C B → C ]− Subtracts data of B and the<br />
with carry<br />
carry from A, and stores the<br />
result in C. The carry flag<br />
changes according to the<br />
result.<br />
4 9.7 150<br />
039 Unsigned −[ A U∗ B → C+1⋅C ]− Multiplies data of A and B,<br />
multiplication<br />
and stores the result in<br />
double-length register C+1⋅C.<br />
(Unsigned integer operation)<br />
4 151<br />
040 Unsigned −[ A U/ B → C ]− Divides data of A by B, and<br />
division<br />
stores the quotient in C and<br />
the reminder in C+1.<br />
(Unsigned integer operation)<br />
4 152<br />
041 Unsigned −[ A+1⋅A DIV B → C ]− Divides data of A+1⋅A by B,<br />
double/single<br />
division<br />
and stores the quotient in C<br />
and the reminder in C+1.<br />
(Unsigned integer operation)<br />
4 15.3 153<br />
043 Increment −[ +1 A ]− Increments data of A by 1. 2 4.6 154<br />
044 Decrement −[ -1 A ]− Decrements data of A by 1. 2 4.6 155<br />
108 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Logical operations<br />
6F3B0253<br />
7. Instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
048 AND −[ A AND B → C ]− Finds logical AND of A and B,<br />
and stores it in C.<br />
4 5.7 156<br />
050 OR −[ A OR B → C ]− Finds logical OR of A and B,<br />
and stores it in C.<br />
4 5.7 157<br />
052 Exclusive OR −[ A EOR B → C ]− Finds logical exclusive OR of A<br />
and B, and stores it in C.<br />
4 5.7 158<br />
064 Bit test −[ A TEST B ]− Turns ON output if logical AND<br />
of A and B is not 0.<br />
3 5.0 163<br />
Shift operations<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
068 1 bit shift right −[ SHR1 A ]− Shifts data of A 1 bit to the right<br />
(LSB direction). The carry flag 2 6.8 164<br />
changes according to the result.<br />
069 1 bit shift left −[ SHL1 A ]− Shifts data of A 1 bit to the left<br />
(MSB direction). The carry flag<br />
changes according to the result.<br />
070 n bit shift right −[ A SHR n → B ]− Shifts data of A n bits to the<br />
right (LSB direction) and stores<br />
the result in B. The carry flag<br />
changes according to the result.<br />
071 n bit shift left −[ A SHL n → B ]− Shifts data of A n bits to the left<br />
(MSB direction) and stores the<br />
result in B. The carry flag<br />
074 Shift register D SR Q<br />
S (n)<br />
E A<br />
075 Bi-directional<br />
shift register<br />
D DSR Q<br />
S (n)<br />
E<br />
L A<br />
changes according to the result.<br />
When shift input (S) comes ON,<br />
shifts the data of specified shift<br />
register 1 bit to the left, and<br />
stores data input (D) state into<br />
A. This operation is enabled<br />
while enable input (E) is ON.<br />
The carry flag changes<br />
according to the result.<br />
Shift register: n devices starting<br />
with device A.<br />
When shift input (S) comes ON,<br />
shifts the data of specified shift<br />
register 1 bit to the left or to the<br />
right depending on direction<br />
input (L). This operation is<br />
enabled while enable input (E) is<br />
ON. The carry flag changes<br />
according to the result.<br />
Shift register: n devices starting<br />
with device A.<br />
Direction: Left when L is ON,<br />
right when L is OFF<br />
2 6.8 165<br />
4 10.2 166<br />
4 10.2 167<br />
3<br />
3<br />
65.9 -<br />
76.2<br />
69.0 -<br />
79.3<br />
168<br />
170<br />
Basic Hardware and Function 109<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Rotate operations<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
078 1 bit rotate −[ RTR1 A ]− Rotates data of A 1 bit to the<br />
right<br />
right (LSB direction). The<br />
carry flag changes according<br />
to the result.<br />
2 6.8 172<br />
079 1 bit rotate left −[ RTL1 A ]− Rotates data of A 1 bit to the<br />
left (MSB direction). The<br />
carry flag changes according<br />
to the result.<br />
2 6.8 173<br />
080 n bit rotate −[ A RTR n → B ]− Rotates data of A n bits to<br />
right<br />
the right (LSB direction) and<br />
stores the result in B. The<br />
carry flag changes according<br />
to the result.<br />
4 10.2 174<br />
081 n bit rotate left −[ A RTL n → B ]− Rotates data of A n bits to<br />
the left (MSB direction) and<br />
stores the result in B. The<br />
carry flag changes according<br />
to the result.<br />
4 10.2 175<br />
Compare instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
096 Greater than −[ A > B ]− Turns ON output if A > B. 3 6.1 178<br />
097 Greater than or<br />
equal<br />
−[ A >= B ]− Turns ON output if A ≥ B.<br />
3 5.3 179<br />
098 Equal −[ A = B ]− Turns ON output if A = B. 3 5.0 180<br />
099 Not equal −[ A B ]− Turns ON output if A ≠ B. 3 5.0 181<br />
100 Less than −[ A < B ]− Turns ON output if A < B. 3 6.1 182<br />
101 Less than or<br />
equal<br />
−[ A B+1⋅B ]− Turns ON output<br />
if A+1⋅A > B+1⋅B.<br />
3 6.1 184<br />
103 Double-word −[ A+1⋅A D>= B+1⋅B ]− Turns ON output<br />
greater than or<br />
equal<br />
if A+1⋅A ≥ B+1⋅B. 3 5.3 185<br />
104 Double-word<br />
equal<br />
−[ A+1⋅A D= B+1⋅B ]− Turns ON output<br />
if A+1⋅A = B+1⋅B.<br />
3 5.0 186<br />
105 Double-word<br />
not equal<br />
−[ A+1⋅A D B+1⋅B ]− Turns ON output<br />
if A+1⋅A ≠ B+1⋅B.<br />
3 5.0 187<br />
106 Double-word<br />
less than<br />
−[ A+1⋅A D< B+1⋅B ]− Turns ON output<br />
if A+1⋅A < B+1⋅B.<br />
3 6.1 188<br />
107 Double-word −[ A+1⋅A D
Compare instructions (continued)<br />
6F3B0253<br />
7. Instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
108 Unsigned<br />
greater than<br />
−[ A U> B ]− Turns ON output if A > B.<br />
(Unsigned integer compare)<br />
3 190<br />
109 Unsigned −[ A U>= B ]− Turns ON output if A ≥ B.<br />
greater than or<br />
equal<br />
(Unsigned integer compare) 3 191<br />
110 Unsigned<br />
equal<br />
−[ A U= B ]− Turns ON output if A = B.<br />
(Unsigned integer compare)<br />
3 192<br />
111 Unsigned<br />
not equal<br />
−[ A U B ]− Turns ON output if A ≠ B.<br />
(Unsigned integer compare)<br />
3 193<br />
112 Unsigned<br />
less than<br />
−[ A U< B ]− Turns ON output if A < B.<br />
(Unsigned integer compare)<br />
3 194<br />
113 Unsigned −[ A U
7. Instructions<br />
Program control instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
128 Subroutine call −[ CALL N. n ]− Calls the subroutine number n. 2 21.0 203<br />
129 Subroutine<br />
return<br />
⎥−−[ RET ]−⎢ Indicates the end of a<br />
subroutine.<br />
1<br />
(in a<br />
pair)<br />
204<br />
132 FOR<br />
133 NEXT<br />
−[ FOR n ]−<br />
−[ NEXT ]−<br />
When the input of FOR is ON,<br />
executes the segment from<br />
FOR to NEXT the number of<br />
times specified by n.<br />
2<br />
1<br />
22.0<br />
(in a<br />
pair)<br />
205<br />
206<br />
137 Subroutine<br />
entry<br />
⎥−[ SUBR (n) ]−−⎢ Indicates the start of the<br />
subroutine number n.<br />
2<br />
included<br />
in CALL 207<br />
140 Enable<br />
interrupt<br />
141 Disable<br />
interrupt<br />
−[ EI ]−<br />
−[ DI ]−<br />
Enables execution of interrupt<br />
program.<br />
Disables execution of interrupt<br />
program.<br />
1<br />
1<br />
27.6<br />
(in a<br />
pair)<br />
208<br />
209<br />
142 Interrupt return ⎥−−[ IRET ]−⎢ Indicates the end of an interrupt<br />
program.<br />
1 1.4 210<br />
143 Watchdog<br />
timer reset<br />
−[ WDT n ]− Extends the scan time over<br />
detection time.<br />
2 16.1 211<br />
144 Step sequence<br />
initialize<br />
−[ STIZ (n) A ]− Resets OFF the n<br />
devices stating with<br />
A, and sets ON A.<br />
These<br />
configure<br />
a series<br />
3<br />
59.9 -<br />
65.0<br />
212<br />
145 Step sequence −[ STIN A ]− Turns ON output if of step<br />
input<br />
input is ON and A is<br />
ON.<br />
sequence 2 27.0 213<br />
146 Step sequence −[ STOT A ]−⎢ When input is ON,<br />
output<br />
resets OFF the<br />
devices of STIN on<br />
the same rung, and<br />
sets ON A.<br />
2<br />
27.0 -<br />
119.0<br />
214<br />
RAS<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
154 Set calendar −[ A CLND ]− Sets 6 registers data starting<br />
with A into clock/calendar.<br />
2 217<br />
155 Calendar −[ A CLDS B ]− Calculates difference between<br />
operation<br />
present date & time and past<br />
date & time stored in 6 registers<br />
starting with A, and stores the<br />
result in 6 registers starting with<br />
B.<br />
3 218<br />
112 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Functions<br />
6F3B0253<br />
7. Instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
056 Moving −[ A MAVE (n) B → C ]− Calculates the average value<br />
average<br />
of latest n scan values of A,<br />
and stores the result in C.<br />
5 159<br />
061 Digital filter −[ A DFL B → C ]− Filters the value of A by filter<br />
constant specified by B, and<br />
stores the result in C.<br />
4 160<br />
156 Pre-derivative −[ A PID3 B → C ]− Performs PID control. (pre-<br />
real PID<br />
derivative real PID algorithm)<br />
Process value (PV): A<br />
Set value (SV): A+1<br />
PID parameters: B and after<br />
Manipulation value (MV): C<br />
4<br />
85.0 -<br />
428.0<br />
219<br />
160 Upper limit −[ A UL B → C ]− Upper limits the value of A<br />
by B, and stores the result in<br />
C.<br />
4 224<br />
161 Lower limit −[ A LL B → C ]− Lower limits the value of A<br />
by B, and stores the result in<br />
C.<br />
4 225<br />
162 Maximum −[ A MAX (n) B ]− Finds the maximum value of<br />
value<br />
n registers data starting with<br />
A, and stores the value in C<br />
and the pointer in C+1.<br />
4 226<br />
163 Minimum value −[ A MIN (n) B ]− Finds the minimum value of<br />
n registers data starting with<br />
A, and stores the value in C<br />
and the pointer in C+1.<br />
4 227<br />
164 Average value −[ A AVE (n) B ]− Calculates the average value<br />
of n registers data starting<br />
with A, and stores the result<br />
in C.<br />
4 228<br />
165 Function −[ A FG (n) B → C ]− Finds f(x) for given x=A, and<br />
generator<br />
stores it in C. The function<br />
f(x) is defined by parameters<br />
stored in a table 2×n<br />
registers starting with B.<br />
5<br />
77.7 -<br />
142.1<br />
229<br />
Basic Hardware and Function 113<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Conversion instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Page<br />
062 Hex to ASCII −[ A HTOA (n) B ]− Converts the hexadecimal<br />
conversion<br />
data of n words stating with<br />
A into ASCII characters, and<br />
stores them in nx2 registers<br />
starting with B.<br />
4 161<br />
063 ASCII to Hex −[ A ATOH (n) B ]− Converts the ASCII<br />
conversion<br />
characters stored in n<br />
registers stating with A into<br />
hexadecimal data, and stores<br />
them in n/2 registers starting<br />
with B.<br />
4 162<br />
180 Absolute value −[ A ABS B ]− Stores the absolute value of<br />
A in B.<br />
3 5.0 231<br />
182 2’s<br />
−[ A NEG B ]− Stores the 2’s complement<br />
complement<br />
value of A in B. 3 4.6 232<br />
183 Double-word<br />
2’s<br />
complement<br />
185 7-segment<br />
decode<br />
186 ASCII<br />
conversion<br />
188 Binary<br />
conversion<br />
190 BCD<br />
conversion<br />
114 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
−[ A+1⋅A DNEG B+1⋅B ]− Stores the 2’s complement<br />
value of A+1⋅A in B+1⋅B. 3 4.6 233<br />
−[ A 7SEG B ]− Converts lower 4 bits of A<br />
into 7-segment code, and<br />
stores it in B.<br />
−[ A ASC B ]− Converts the alphanumerics<br />
(max. 16 characters) of A<br />
into ASCII codes, and stores<br />
them in registers starting<br />
with B.<br />
−[ A BIN B ]− Converts the BCD data in A<br />
into binary data, and stores it<br />
in B.<br />
−[ A BCD B ]− Converts the binary data in A<br />
into BCD data, and stores it<br />
in B.<br />
3 43.9 234<br />
3 - 10<br />
29.8 -<br />
49.6<br />
236<br />
3 65.5 237<br />
3 55.6 238<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Special I/O instructions<br />
6F3B0253<br />
7. Instructions<br />
FUN<br />
No.<br />
Name Expression Function Steps Speed<br />
(µs)<br />
Available Page<br />
235 Direct I/O −[ I/O (n) A ]− Performs the immediate<br />
block I/O transfer of n<br />
registers starting with A.<br />
3<br />
20.7 +<br />
21.3 × n<br />
√ *1<br />
257<br />
236 Expanded data<br />
transfer<br />
−[ A XFER B → C ]− Writes data into the built-in<br />
EEPROM, or reads data<br />
from the EEPROM. The<br />
transfer source and<br />
destination are indirectly<br />
designated by A and C. The<br />
transfer register size is<br />
designated by B.<br />
4<br />
54.0<br />
1w<br />
read<br />
-<br />
7130<br />
16w<br />
write<br />
√ 259<br />
*1: Direct I/O instruction is effective only for the basic unit inputs/outputs.<br />
*2: The expanded data transfer (XFER) instruction supports some special functions. It<br />
also supports the communication function. The execution speed shown in the<br />
above table is for the EEPROM read/write function. When the Inverter connection<br />
mode is selected, the execution speed of this instruction is typically 150 µs (max.<br />
500 µs).<br />
NOTE<br />
The index modification is available for some instructions. The values in the<br />
execution speed column show the execution time without index<br />
modification.<br />
If index modification is used, approx. 20 µs is added per one indexed<br />
operand.<br />
Basic Hardware and Function 115<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
7.2 Instruction specifications<br />
The following pages in this section describe the detailed specifications of each<br />
instruction. On each page, the following items are explained.<br />
Expression<br />
Shows the operands required for the instruction as italic characters.<br />
Function<br />
Explains the functions of the instruction with referring the operands shown on the<br />
Expression box.<br />
Execution condition<br />
Shows the execution condition of the instruction and the instruction output status.<br />
116 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Shows available register, device or constant value for each operand. For constant<br />
operand, available value range is described. If the constant column is just marked (√),<br />
it means normal value range (-32768 to 32767 in 16-bit integer or -2147483648 to<br />
2147483647 in 32-bit integer) is available.<br />
Whether index modification for a register operand is usable or not is also shown for<br />
each operand.<br />
Example<br />
Explains the operation of the instruction by using a typical example.<br />
Note<br />
Explains supplementary information, limitations, etc. for the instruction.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Expression<br />
A<br />
Input Output<br />
NO contact<br />
Function<br />
NO (normally open) contact of device A.<br />
When the input is ON and the device A is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF Regardless of the state of device A OFF<br />
ON When device A is OFF OFF<br />
When device A is ON ON<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √ √ √ √<br />
Example<br />
Coil Y022 comes ON when the devices X000 and R001 are both ON.<br />
X000<br />
R001<br />
Y022<br />
Basic Hardware and Function 117<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Expression<br />
A<br />
Input Output<br />
NC contact<br />
Function<br />
NC (normally closed) contact of device A.<br />
When the input is ON and the device A is OFF, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF Regardless of the state of device A OFF<br />
ON When device A is OFF ON<br />
When device A is ON OFF<br />
118 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √ √ √ √<br />
Example<br />
Coil Y022 comes ON when the devices X000 and R001 are both OFF.<br />
X000<br />
R001<br />
Y022<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Expression<br />
Input Output<br />
Transitional contact (Rising edge)<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input at last scan is OFF and the input at this scan is ON, the output is turned ON.<br />
This instruction is used to detect the input changing from OFF to ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF Regardless of the input state at last scan OFF<br />
ON When the input state at last scan is OFF ON<br />
When the input state at last scan is ON OFF<br />
Operand<br />
No operand is required.<br />
Example<br />
Coil Y022 comes ON for only 1 scan when the device X000 comes ON.<br />
X000<br />
Y022<br />
1 scan time 1 scan time<br />
Note<br />
• In case of <strong>T1</strong>, the maximum usable number in a program is 512. ( and total)<br />
• In case of <strong>T1</strong>S, the maximum usable number in a program is 2048.<br />
( P N (P) (N) total)<br />
Basic Hardware and Function 119<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Expression<br />
Input Output<br />
Transitional contact (Falling edge)<br />
Function<br />
When the input at last scan is ON and the input at this scan is OFF, the output is turned ON.<br />
This instruction is used to detect the input changing from ON to OFF.<br />
Execution condition<br />
Input Operation Output<br />
OFF When the input state at last scan is OFF OFF<br />
When the input state at last scan is ON ON<br />
ON Regardless of the input state at last scan OFF<br />
Operand<br />
No operand is required.<br />
Example<br />
Coil Y022 comes ON for only 1 scan when the device X000 comes OFF.<br />
X000<br />
Y022<br />
120 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
1 scan time 1 scan time<br />
Note<br />
• In case of <strong>T1</strong>, the maximum usable number in a program is 512. ( and total)<br />
• In case of <strong>T1</strong>S, the maximum usable number in a program is 2048.<br />
( P N (P) (N) total)<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
( ) Coil<br />
Expression<br />
A<br />
Input ( )<br />
Function<br />
Relay coil of device A.<br />
When the input is ON, the device A is set to ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF Sets device A to OFF −<br />
ON Sets device A to ON −<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √<br />
Example<br />
Coil Y025 comes ON when the devices X000 is ON.<br />
X000<br />
Y025<br />
Basic Hardware and Function 121<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Expression<br />
Input<br />
A<br />
Forced coil<br />
Function<br />
Regardless of the input sate the state of device A is retained.<br />
Execution condition<br />
Input Operation Output<br />
OFF No operation −<br />
ON No operation −<br />
122 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √<br />
Example<br />
Device Y025 retains the preceding state regardless of the devices X000 state.<br />
X000<br />
Y025<br />
Set force Reset force Set force Reset force<br />
Note<br />
• The forced coil is a debugging function. The state of a forced coil device can be set ON or OFF<br />
by the programming tool.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
I Inverter<br />
Expression<br />
Input I Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is OFF, the output is turned ON, and when the input is ON, the output is turned<br />
OFF.<br />
This instruction inverts the link state.<br />
Execution condition<br />
Input Operation Output<br />
OFF Inverts the input state ON<br />
ON Inverts the input state OFF<br />
Operand<br />
No operand is required.<br />
Example<br />
Y022 comes ON when X000 is OFF, and Y022 comes OFF when X000 is ON.<br />
X000<br />
Y022<br />
Basic Hardware and Function 123<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
( I ) Invert coil<br />
Expression<br />
A<br />
Input ( I )<br />
124 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is OFF, the device A is set to ON, and when the input is ON, the device A is set to<br />
OFF. This instruction inverts the input state and store it in the device A.<br />
Execution condition<br />
Input Operation Output<br />
OFF Sets device A to ON −<br />
ON Sets device A to OFF −<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √<br />
Example<br />
Y025 comes ON when X000 is OFF, and Y025 comes OFF when X000 is ON.<br />
X000<br />
Y025<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
P Positive pulse contact<br />
Expression<br />
A<br />
Input P Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON and the device A is changed from OFF to ON (OFF at last scan and ON at<br />
this scan), the output is turned ON.<br />
This instruction is used to detect the device changing from OFF to ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF Regardless of the state of device A OFF<br />
ON State of device A is OFF OFF<br />
State of device A is ON A is OFF at last scan ON<br />
A is ON at last scan OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √ √ √ √<br />
Example<br />
R100 comes ON for only 1 scan when X000 is ON and X003 changes to ON.<br />
X000<br />
X003<br />
R100<br />
1 scan time 1 scan time<br />
Note<br />
• The maximum usable number in a program is 2048.<br />
( P N (P) (N) total)<br />
Basic Hardware and Function 125<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
N Negative pulse contact<br />
Expression<br />
A<br />
Input N Output<br />
126 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON and the device A is changed from ON to OFF (ON at last scan and OFF at<br />
this scan), the output is turned ON.<br />
This instruction is used to detect the device changing from ON to OFF.<br />
Execution condition<br />
Input Operation Output<br />
OFF Regardless of the state of device A OFF<br />
ON State of device A is OFF A is OFF at last scan OFF<br />
A is ON at last scan ON<br />
State of device A is ON OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √ √ √ √<br />
Example<br />
R100 comes ON for only 1 scan when X000 is ON and X003 changes to OFF.<br />
X000<br />
X003<br />
R100<br />
1 scan time 1 scan time<br />
Note<br />
• The maximum usable number in a program is 2048.<br />
( P N (P) (N) total)<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
( P ) Positive pulse coil<br />
Expression<br />
A<br />
Input ( P )<br />
Function<br />
When the input is changed form OFF to ON, the device A is set to ON for 1 scan time.<br />
This instruction is used to detect the input changing from OFF to ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF Sets device A to OFF −<br />
ON When the input at last scan is OFF, sets A to ON −<br />
When the input at last scan is ON, sets A to OFF −<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √<br />
Example<br />
R101 comes ON for only 1 scan when X000 is changed from OFF to ON.<br />
X000<br />
R100<br />
1 scan time 1 scan time<br />
Note<br />
• The maximum usable number in a program is 2048.<br />
( P N (P) (N) total)<br />
Basic Hardware and Function 127<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
( N ) Negative pulse coil<br />
Expression<br />
A<br />
Input ( N )<br />
Function<br />
When the input is changed form ON to OFF, the device A is set to ON for 1 scan time.<br />
This instruction is used to detect the input changing from ON to OFF.<br />
Execution condition<br />
Input Operation Output<br />
OFF When the input at last scan is OFF, sets A to OFF −<br />
When the input at last scan is ON, sets A to ON −<br />
ON Sets device A to OFF −<br />
128 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √<br />
Example<br />
R101 comes ON for only 1 scan when X000 is changed from ON to OFF.<br />
X000<br />
R100<br />
1 scan time 1 scan time<br />
Note<br />
• The maximum usable number in a program is 2048.<br />
( P N (P) (N) total)<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
TON ON delay timer<br />
Expression<br />
Input ⎯[ A TON B ]⎯ Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is changed from OFF to ON, timer updating for the timer register B is started. The<br />
elapsed time is stored in B. When the specified time by A has elapsed after the input came ON, the<br />
output and the timer device corresponding to B is turned ON. (Timer updating is stopped)<br />
When the input is changed from ON to OFF, B is cleared to 0, and the output and the timer device<br />
are turned OFF.<br />
The available data range for operand A is 0 to 32767.<br />
Execution condition<br />
Input Operation Output<br />
OFF No operation (timer is not updating) OFF<br />
ON Elapsed time < preset time (timer is updating) OFF<br />
Elapsed time ≥ preset time (timer is not updating) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Preset time √ √ √ √ √ √ √ √ √ √ 0 - 32767<br />
B Elapsed time √<br />
Example<br />
Y021 (and the timer device T.000) is turned ON 2 seconds after X000 came ON.<br />
X000<br />
Preset value<br />
T000<br />
T.000<br />
Y021<br />
Preset time (2s) Less than preset time<br />
Note<br />
• Time is set in 10 ms units for;<br />
<strong>T1</strong>: T000 to T031 (0 to 327.67 s)<br />
<strong>T1</strong>S: T000 to T063 (0 to 327.67 s)<br />
• Time is set in 100 ms units for;<br />
<strong>T1</strong>: T032 to T063 (0 to 3276.7 s)<br />
<strong>T1</strong>S: T064 to T255 (0 to 3276.7 s)<br />
• Multiple timer instructions (TON, TOF or<br />
SS) with the same timer register are not<br />
allowed.<br />
Basic Hardware and Function 129<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
TOF OFF delay timer<br />
Expression<br />
Input ⎯[ A TOF B ]⎯ Output<br />
130 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is changed from OFF to ON, the output and the timer device corresponding to the<br />
timer register B are set to ON. When the input is changed from ON to OFF, timer updating for B is<br />
started. The elapsed time is stored in B. When the specified time by A has elapsed after the input<br />
came OFF, the output and the timer device are turned OFF. (Timer updating is stopped)<br />
The available data range for operand A is 0 to 32767.<br />
Execution condition<br />
Input Operation Output<br />
OFF Elapsed time < preset time (timer is updating) ON<br />
Elapsed time ≥ preset time (timer is not updating) OFF<br />
ON No operation (timer is not updating) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Preset time √ √ √ √ √ √ √ √ √ √ 0 - 32767<br />
B Elapsed time √<br />
Example<br />
Y021 (and the timer device T.002) is turned OFF 1 second after X000 came OFF.<br />
X000<br />
Preset value<br />
T002<br />
T.002<br />
Y021<br />
Preset time (1 s) Less than preset time<br />
Note<br />
• Time is set in 10 ms units for;<br />
<strong>T1</strong>: T000 to T031 (0 to 327.67 s)<br />
<strong>T1</strong>S: T000 to T063 (0 to 327.67 s)<br />
• Time is set in 100 ms units for;<br />
<strong>T1</strong>: T032 to T063 (0 to 3276.7 s)<br />
<strong>T1</strong>S: T064 to T255 (0 to 3276.7 s)<br />
• Multiple timer instructions (TON, TOF or<br />
SS) with the same timer register are not<br />
allowed.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
SS Single shot timer<br />
Expression<br />
Input ⎯[ A SS B ]⎯ Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is changed from OFF to ON, the output and the timer device corresponding to the<br />
timer register B are set to ON, and timer updating for B is started. The elapsed time is stored in B.<br />
When the specified time by A has elapsed after the input came ON, the output and the timer device<br />
are turned OFF. (Timer updating is stopped)<br />
The available data range for operand A is 0 to 32767.<br />
Execution condition<br />
Input Operation Output<br />
OFF Elapsed time < preset time (timer is updating) ON<br />
Elapsed time ≥ preset time (timer is not updating) OFF<br />
ON Elapsed time < preset time (timer is updating) ON<br />
Elapsed time ≥ preset time (timer is not updating) OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Preset time √ √ √ √ √ √ √ √ √ √ 0 - 32767<br />
B Elapsed time √<br />
Example<br />
Y021 (and the timer device T.003) is turned OFF 1 second after X000 came ON.<br />
X000<br />
Preset value<br />
T003<br />
T.003<br />
Y021<br />
Preset time (1 s) Preset time (1 s)<br />
Note<br />
• Time is set in 10 ms units for;<br />
<strong>T1</strong>: T000 to T031 (0 to 327.67 s)<br />
<strong>T1</strong>S: T000 to T063 (0 to 327.67 s)<br />
• Time is set in 100 ms units for;<br />
<strong>T1</strong>: T032 to T063 (0 to 3276.7 s)<br />
<strong>T1</strong>S: T064 to T255 (0 to 3276.7 s)<br />
• Multiple timer instructions (TON, TOF or<br />
SS) with the same timer register are not<br />
allowed.<br />
Basic Hardware and Function 131<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
CNT Counter<br />
Expression<br />
Count input C CNT Q Output<br />
Enable input E A B<br />
132 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
While the enable input is ON, this instruction counts the number of the count input changes from<br />
OFF to ON. The count value is stored in the counter register B. When the count value reaches the<br />
set value A, the output and the counter device corresponding to B are turned ON. When the enable<br />
input comes OFF, B is cleared to 0 and the output and the counter device are turned OFF.<br />
The available data range for operand A is 0 to 65535.<br />
Execution condition<br />
Enable<br />
input<br />
Operation Output<br />
OFF No operation (B is cleared to 0) OFF<br />
ON Count value (B) < set value (A) OFF<br />
Count value (B) ≥ set value (A) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Set value √ √ √ √ √ √ √ √ √ √ 0 - 65535<br />
B Count value √<br />
Example<br />
X001<br />
X002<br />
C010<br />
C.010<br />
Y021<br />
1<br />
2<br />
3<br />
4<br />
5<br />
1<br />
2<br />
3<br />
Note<br />
• No transitional contact is required for the<br />
count input. The count input rising edge is<br />
detected by this instruction.<br />
• For the count input, direct linking to a<br />
connecting point is not allowed. In this<br />
case, insert a dummy contact (always ON<br />
= S04F, etc.) just before the input.<br />
Refer to Note of Shift register FUN 074.<br />
• Multiple counter instructions (CNT) with<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
MCS<br />
MCR<br />
Expression<br />
Input [ MCS ]<br />
Master control set / reset<br />
[ MCR ]<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the MCS input is ON, ordinary operation is performed. When the MCS input is OFF, the state<br />
of left power rail between MCS and MCR is turned OFF.<br />
Execution condition<br />
MCS<br />
input<br />
Operation Output<br />
OFF Sets OFF the left power rail until MCR −<br />
ON Ordinary operation −<br />
Operand<br />
No operand is required.<br />
Example<br />
When X000 is OFF, Y021 and Y022 are turned OFF regardless of the states of X001 and<br />
X002.<br />
Equivalent circuit<br />
X000<br />
X001 Y021<br />
X002 Y022<br />
Note<br />
• MCS and MCR must be used as a pair.<br />
• Nesting is not allowed.<br />
Basic Hardware and Function 133<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
JCS<br />
JCR<br />
Expression<br />
Input [ JCS ]<br />
Jump control set / reset<br />
[ JCR ]<br />
134 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the JCS input is ON, instructions between JCS and JCR are skipped (not executed). When<br />
the JCS input is OFF, ordinary operation is performed.<br />
Execution condition<br />
JCS<br />
input<br />
OFF Ordinary operation<br />
ON Skips until JCR<br />
Operand<br />
No operand is required.<br />
Example<br />
Operation Output<br />
When X000 is ON, the rung 2 circuit is skipped, therefore Y021 is not changed its state<br />
regardless of the X001 state. When X000 is OFF, Y021 is controlled by the X001 state.<br />
Note<br />
• JCS and JCR must be used as a pair.<br />
• Nesting is not allowed.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
END End<br />
Expression<br />
[ END ]<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
Indicates the end of main program or sub-program. Instructions after the END instruction are not<br />
executed. At least one END instruction is necessary in a program.<br />
Execution condition<br />
Input Operation Output<br />
Operand<br />
No operand is required.<br />
Example<br />
Note<br />
• For debugging purpose, 2 or more END instructions can be written in a program.<br />
• Instructions after END instruction are not executed. Those steps are, however, counted as used<br />
steps.<br />
Basic Hardware and Function 135<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 018 MOV Data transfer<br />
Expression<br />
Input −[ A MOV B ]− Output<br />
Function<br />
When the input is ON, the data of A is stored in B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
136 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
B Destination √ √ √ √ √ √ √ √ √ √<br />
Example 1 (constant to register)<br />
When R010 is ON, a constant data (12345) is stored in D0100 and the output is turned ON.<br />
Example 2 (register to register)<br />
When X005 is ON, the data of SW30 is stored in RW45 and the output is turned ON. If SW30<br />
is 500, the data 500 is stored in RW45.<br />
Example 3 (index modification)<br />
When R050 is changed from OFF to ON, the data of RW08 is stored in the index register I and<br />
the data of D(0000+I) is stored in YW10. If RW08 is 300, the data of D0300 is stored in YW10.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 019 DMOV Double-word data transfer<br />
Expression<br />
Input −[ A+1⋅A MOV B+1⋅B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the double-word (32-bit) data of A+1⋅A is stored in double-word register<br />
B+1⋅B. The data range is -2147483648 to 2147483647.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
B Destination √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R011 is ON, a double-word data of D0101⋅D0100 is stored in RW17⋅RW16 and the<br />
output is turned ON. If D0101⋅D0100 is 1234567, the data 1234567 is stored in RW17⋅RW16.<br />
Basic Hardware and Function 137<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 020 NOT Invert transfer<br />
Expression<br />
Input −[ A NOT B ]− Output<br />
Function<br />
When the input is ON, the bit-inverted data of A is stored in B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
138 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
B Destination √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R010 is ON, the bit-inverted data of RW30 is stored in D0200 and the output is turned<br />
ON. If RW30 is H4321, the bit-inverted data (HBCDE) is stored in D0200.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW30 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1<br />
4 3 2 1<br />
Bit-invert<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
D0200 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0<br />
B C D E<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 022 XCHG Data exchange<br />
Expression<br />
Input −[ A XCHG B ]− Output<br />
Function<br />
When the input is ON, the data of A and the data of B is exchanged.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √<br />
B Operation data √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R005 is ON, the data of RW23 and D0100 is exchanged. If the original data of RW23 is<br />
23456 and that of D0100 is 291, the operation result is as follows.<br />
RW23 23456 RW23 291<br />
D0100 291 D0100 23456<br />
Before operation After operation<br />
Basic Hardware and Function 139<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 024 TINZ Table initialize<br />
Expression<br />
Input −[ A TINZ (n) B ]− Output<br />
Function<br />
When the input is ON, the data of A is stored in n registers starting with B.<br />
The allowable range of the table size n is 1 to 1024 words.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
140 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √<br />
n Table size 1 - 1024<br />
B Start of<br />
destination<br />
√ √ √ √ √ √<br />
Example<br />
When R010 is ON, a constant data (0) is stored in 100 registers starting with D0200 (D0200 to<br />
D0299) and the output is turned ON.<br />
Constant 0 D0200 0<br />
D0201 0<br />
D0202 0 100 registers<br />
D0299 0<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 025 TMOV Table transfer<br />
Expression<br />
Input −[ A TMOV (n) B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of n registers starting with A are transferred to n registers starting<br />
with B in a block. The allowable range of the table size n is 1 to 1024 words.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Start of source √ √ √ √ √ √ √<br />
n Table size 1 - 1024<br />
B Start of<br />
destination<br />
√ √ √ √ √ √<br />
Example<br />
When R010 is ON, the data of D0500 to D0509 (10 registers) are block transferred to D1000 to<br />
D1009, and the output is turned ON.<br />
D0500 1111 D1000 1111<br />
D0501 2222 D1001 2222<br />
D0502 3333 Block transfer D1002 3333 10 registers<br />
D0509 12345 D1009 12345<br />
Note<br />
• The source and destination tables can be overlapped.<br />
Basic Hardware and Function 141<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 026 TNOT Table invert transfer<br />
Expression<br />
Input −[ A TNOT (n) B ]− Output<br />
Function<br />
When the input is ON, the data of n registers starting with A are bit-inverted and transferred to n<br />
registers starting with B in a block. The allowable range of the table size n is 1 to 1024 words.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
142 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Start of source √ √ √ √ √ √ √<br />
n Table size 1 - 1024<br />
B Start of<br />
destination<br />
√ √ √ √ √ √<br />
Example<br />
When R010 is ON, the data of D0600 to D0604 (5 registers) are bit-inverted and transferred to<br />
D0865 to D0869, and the output is turned ON.<br />
D0600 H00FF D0865 HFF00<br />
D0601 H0000 Bit-invert D0866 HFFFF<br />
D0602 H1234 and transfer D0867 HEDCB 5 registers<br />
D0603 H5555 D0868 HAAAA<br />
D0604 H89AB D0869 H7654<br />
Note<br />
• The source and destination tables can be overlapped.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 027 + Addition<br />
Expression<br />
Input −[ A + B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of A and the data of B are added, and the result is stored in C.<br />
If the result is greater than 32767, the upper limit value 32767 is stored in C, and the output is<br />
turned ON. If the result is smaller than -32768, the lower limit value -32768 is stored in C, and the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution (normal) OFF<br />
Execution (overflow or underflow occurred) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Augend √ √ √ √ √ √ √ √ √ √ √ √<br />
B Addend √ √ √ √ √ √ √ √ √ √ √ √<br />
C Sum √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R005 is ON, the data of D0100 and the constant data 1000 is added, and the result is<br />
stored in D0110.<br />
If the data of D0100 is 12345, the result 13345 is stored in D0110, and R010 is turned OFF.<br />
D0100 12345<br />
Constant 1000<br />
+ D0110 13345 R010 is OFF<br />
If the data of D0100 is 32700, the result exceeds the limit value, therefore 32767 is stored in<br />
D0110, and R010 is turned ON.<br />
D0100 32700 Overflow<br />
+ D0110 32767 R010 is ON<br />
Constant 1000<br />
Basic Hardware and Function 143<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 028 − Subtraction<br />
Expression<br />
Input −[ A − B → C ]− Output<br />
144 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of B is subtracted from the data of A, and the result is stored in C.<br />
If the result is greater than 32767, the upper limit value 32767 is stored in C, and the output is<br />
turned ON. If the result is smaller than -32768, the lower limit value -32768 is stored in C, and the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution (normal) OFF<br />
Execution (overflow or underflow occurred) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Minuend √ √ √ √ √ √ √ √ √ √ √ √<br />
B Subtrahend √ √ √ √ √ √ √ √ √ √ √ √<br />
C Difference √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R005 is ON, the constant data 2500 is subtracted from the data of D0200, and the result<br />
is stored in RW50.<br />
If the data of D0200 is 15000, the result 12500 is stored in RW50, and R010 is turned OFF.<br />
D0200 15000<br />
Constant 2500<br />
− RW50 12500 R010 is OFF<br />
If the data of D0200 is -31000, the result is smaller than the limit value, therefore -32768 is<br />
stored in RW50, and R010 is turned ON.<br />
D0100 -31000 Underflow<br />
− RW50 -32768 R010 is ON<br />
Constant 2500<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 029 ∗ Multiplication<br />
Expression<br />
Input −[ A ∗ B → C+1⋅C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of A is multiplied by the data of B, and the result is stored in<br />
double-length register C+1⋅C.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Multiplicand √ √ √ √ √ √ √ √ √ √ √ √<br />
B Multiplier √ √ √ √ √ √ √ √ √ √ √ √<br />
C Product √ √ √ √ √ √ √ √ √<br />
Example<br />
When R005 is ON, the data of D0050 is multiplied by the data of RW05, and the result is<br />
stored in double-length register D0101⋅D0100 (upper 16-bit in D0101 and lower 16-bit in<br />
D0100).<br />
If the data of D0050 is 1500 and the data of RW05 is 20, the result 30000 is stored in<br />
D0101⋅D0100.<br />
D0050 1500<br />
RW05 20<br />
× D0101⋅D0100 30000<br />
D0101 H0000 (upper 16-bit)<br />
D0100 H7530 (lower 16-bit)<br />
Basic Hardware and Function 145<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 030 / Division<br />
Expression<br />
Input −[ A / B → C ]− Output<br />
146 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of A is divided by the data of B, and the quotient is stored in C and<br />
the remainder in C+1.<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution (B ≠ 0) ON −<br />
No execution (B = 0) OFF Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Dividend √ √ √ √ √ √ √ √ √ √ √ √<br />
B Divisor √ √ √ √ √ √ √ √ √ √ √ √<br />
C Quotient √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R005 is ON, the data of RW22 is divided by the constant data 325, and the quotient is<br />
stored in RW27 and the remainder is stored in RW28.<br />
If the data of RW22 is 2894, the quotient 8 is stored in RW27 and the remainder 294 is stored<br />
in RW28.<br />
RW22 2894<br />
÷ RW27 8 (quotient)<br />
Constant 325 RW28 294 (remainder)<br />
Note<br />
• If divisor (operand B) is 0, ERF (instruction error flag = S051) is set to ON.<br />
The ERF (S051) can be reset to OFF by user program, e.g. �[ RST S051 ] �.<br />
• If the index register K is used as operand C, the remainder is ignored.<br />
• If operand A is -32768 and operand B is -1, the data -32768 is stored in C and 0 is stored in<br />
C+1.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 031 D+ Double-word addition<br />
Expression<br />
Input −[ A+1⋅A D+ B+1⋅B → C+1⋅C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the double-word data of A+1⋅A and B+1⋅B are added, and the result is<br />
stored in C+1⋅C. The data range is -2147483648 to 2147483647.<br />
If the result is greater than 2147483647, the upper limit value 2147483647 is stored in C+1⋅C, and<br />
the output is turned ON. If the result is smaller than -2147483648, the lower limit value<br />
-2147483648 is stored in C+1⋅C, and the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution (normal) OFF<br />
Execution (overflow or underflow occurred) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Augend √ √ √ √ √ √ √ √<br />
B Addend √ √ √ √ √ √ √ √<br />
C Sum √ √ √ √ √ √<br />
Example<br />
When R005 is ON, the data of D0011⋅D0010 and the constant data 100000 is added, and the<br />
result is stored in D0101⋅D0100.<br />
If the data of D0011⋅D0010 is 300000, the result 400000 is stored in D0101⋅D0100, and R010<br />
is turned OFF. (No overflow/underflow)<br />
D0011⋅D0010 300000<br />
Constant 100000<br />
+ D0101⋅D0100 400000 R010 is OFF<br />
Basic Hardware and Function 147<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 032 D− Double-word subtraction<br />
Expression<br />
Input −[ A+1⋅A D− B+1⋅B → C+1⋅C ]− Output<br />
148 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the double-word data of B+1⋅B is subtracted from A+1⋅A, and the result is<br />
stored in C+1⋅C. The data range is -2147483648 to 2147483647.<br />
If the result is greater than 2147483647, the upper limit value 2147483647 is stored in C+1⋅C, and<br />
the output is turned ON. If the result is smaller than -2147483648, the lower limit value<br />
-2147483648 is stored in C+1⋅C, and the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution (normal) OFF<br />
Execution (overflow or underflow occurred) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Minuend √ √ √ √ √ √ √ √<br />
B Subtrahend √ √ √ √ √ √ √ √<br />
C Difference √ √ √ √ √ √<br />
Example<br />
When R005 is ON, the double-word data of RW25⋅RW24 is subtracted from the double-word<br />
data of D0101⋅D0100, and the result is stored in D0103⋅D0102.<br />
If the data of D0101⋅D0100 is 1580000 and the data of RW25⋅RW24 is 80000, the result<br />
1500000 is stored in D0103⋅D0102, and R010 is turned OFF. (No overflow/underflow)<br />
D0101⋅D0100 1580000<br />
RW25⋅RW24 80000<br />
− D0103⋅D0102 1500000 R010 is OFF<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 035 +C Addition with carry<br />
Expression<br />
Input −[ A +C B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of A, B and the carry flag (CF = S050) are added, and the result is<br />
stored in C. If carry is occurred in the operation, the carry flag is set to ON. If the result is greater<br />
than 32767 or smaller than -32768, the output is turned ON.<br />
This instruction is used to perform unsigned addition or double-length addition.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution Normal No carry OFF Reset<br />
Carry occurred OFF Set<br />
Overflow / No carry ON Reset<br />
underflow Carry occurred ON Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Augend √ √ √ √ √ √ √ √ √ √ √ √<br />
B Addend √ √ √ √ √ √ √ √ √ √ √ √<br />
C Sum √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R013 is ON, the data of double-length registers D0101⋅D0100 and RW21⋅RW20 are<br />
added, and the result is stored in D0201⋅D0200. The RSTC is a instruction to reset the carry<br />
flag before starting the calculation.<br />
If the data of D0101⋅D0100 is 12345678 and RW21⋅RW20 is 54322, the result 12400000 is<br />
stored in D0201⋅D0200.<br />
D0101⋅D0100 12345678<br />
RW21⋅RW20 54322<br />
+ D0201⋅D0200 12400000<br />
Basic Hardware and Function 149<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 036 -C Subtraction with carry<br />
Expression<br />
Input −[ A -C B → C ]− Output<br />
150 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of B and the carry flag (CF = S050) are subtracted from A, and the<br />
result is stored in C. If borrow is occurred in the operation, the carry flag is set to ON. If the result is<br />
greater than 32767 or smaller than -32768, the output is turned ON.<br />
This instruction is used to perform unsigned subtraction or double-length subtraction.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution Normal No borrow OFF Reset<br />
Borrow occurred OFF Set<br />
Overflow / No borrow ON Reset<br />
underflow Borrow occurred ON Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Minuend √ √ √ √ √ √ √ √ √ √ √ √<br />
B Subtrahend √ √ √ √ √ √ √ √ √ √ √ √<br />
C Difference √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R013 is ON, the data of double-length register RW23⋅RW22 is subtracted from the data<br />
of D0201⋅D0200, and the result is stored in D0211⋅D0210. The RSTC is a instruction to reset<br />
the carry flag before starting the calculation.<br />
If the data of D0201⋅D0200 is 12345678 and RW23⋅RW22 is 12340000, the result 5678 is<br />
stored in D0211⋅D0210.<br />
D0201⋅D0200 12345678<br />
RW23⋅RW22 12340000<br />
- D0211⋅D0210 5678<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 039 U∗ Unsigned multiplication<br />
Expression<br />
Input −[ A U∗ B → C+1⋅C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the unsigned data of A and B are multiplied, and the result is stored in<br />
double-length register C+1⋅C. The data range of A and B is 0 to 65535 (unsigned 16-bit data)<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Multiplicand √ √ √ √ √ √ √ √ √ √ √ √<br />
B Multiplier √ √ √ √ √ √ √ √ √ √ √ √<br />
C Product √ √ √ √ √ √ √ √ √<br />
Example<br />
When R010 is ON, the data of D0050 is multiplied by the data of RW05, and the result is<br />
stored in double-length register D0101⋅D0100 (upper 16-bit in D0101 and lower 16-bit in<br />
D0100).<br />
If the data of D0050 is 52500 and the data of RW05 is 30, the result 1575000 is stored in<br />
D0101⋅D0100.<br />
D0050 52500<br />
RW05 30<br />
× D0101⋅D0100 1575000<br />
Note<br />
• This instruction handles the register data as unsigned integer.<br />
Basic Hardware and Function 151<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 040 U/ Unsigned division<br />
Expression<br />
Input −[ A U/ B → C ]− Output<br />
Function<br />
When the input is ON, the unsigned data of A is divided by the unsigned data of B, and the<br />
quotient is stored in C and the remainder in C+1.<br />
The data range of A and B is 0 to 65535 (unsigned 16-bit data)<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution (B ≠ 0) ON −<br />
No execution (B = 0) OFF Set<br />
152 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Dividend √ √ √ √ √ √ √ √ √ √ √ √<br />
B Divisor √ √ √ √ √ √ √ √ √ √ √ √<br />
C Quotient √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R010 is ON, the data of D0030 is divided by the constant data 300, and the quotient is<br />
stored in D0050 and the remainder is stored in D0051.<br />
If the data of D0030 is 54321, the quotient 181 is stored in D0050 and the remainder 21 is<br />
stored in D0051.<br />
D0030 54321<br />
÷ RW27 181 (quotient)<br />
Constant 300 RW28 21 (remainder)<br />
Note<br />
• If divisor (operand B) is 0, ERF (instruction error flag = S051) is set to ON.<br />
The ERF (S051) can be reset to OFF by user program, e.g. −[ RST S051 ]−.<br />
• If the index register K is used as operand C, the remainder is ignored.<br />
• This instruction handles the register data as unsigned integer.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 041 DIV Unsigned double/single division<br />
Expression<br />
Input −[ A+1⋅A DIV B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the double-word data of A+1⋅A is divided by the data of B, and the quotient<br />
is stored in C and the remainder in C+1. The data range of A+1⋅A is 0 to 4294967295, and the data<br />
range of B and C is 0 to 65535.<br />
If the quotient is greater than 65535 (overflow), the limit value 65535 is stored in C, 0 is stored in<br />
C+1, and the instruction error flag (ERF = S051) is set to ON.<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution (B ≠ 0) ON −<br />
Overflow (B ≠ 0) ON Set<br />
No execution (B = 0) OFF Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Dividend √ √ √ √ √ √ √ √<br />
B Divisor √ √ √ √ √ √ √ √<br />
C Quotient √ √ √ √ √ √<br />
Example<br />
When R010 is ON, the double-word data of D0201⋅D0200 is divided by the constant data<br />
4000, and the quotient is stored in D1000 and the remainder is stored in D1001.<br />
If the data of D0201⋅D0200 is 332257, the quotient 83 is stored in D1000 and the remainder<br />
257 is stored in D1001.<br />
D0201⋅D0200 332257<br />
÷ D1000 83 (quotient)<br />
Constant 4000 D1001 257 (remainder)<br />
Note<br />
• If divisor (operand B) is 0, ERF (instruction error flag = S051) is set to ON.<br />
The ERF (S051) can be reset to OFF by user program, e.g. −[ RST S051 ]−.<br />
• This instruction handles the register data as unsigned integer.<br />
Basic Hardware and Function 153<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 043 +1 Increment<br />
Expression<br />
Input −[ +1 A ]− Output<br />
Function<br />
When the input is ON, the data of A is increased by 1 and stored in A.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
154 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √<br />
Example<br />
At the rising edge of X004 changes from OFF to ON, the data of D0050 is increased by 1 and<br />
stored in D0050.<br />
If the data of D0050 is 750 before the execution, it will be 751 after the execution.<br />
D0050 D0050<br />
750 + 1 751<br />
Note<br />
• There is no limit value for this instruction. When the data of operand A is 32767 before the<br />
execution, it will be -32768 after the execution.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 045 -1 Decrement<br />
Expression<br />
Input −[ -1 A ]− Output<br />
Function<br />
When the input is ON, the data of A is decreased by 1 and stored in A.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √<br />
Example<br />
At the rising edge of X005 changes from OFF to ON, the data of D0050 is decreased by 1 and<br />
stored in D0050.<br />
If the data of D0050 is 1022 before the execution, it will be 1021 after the execution.<br />
D0050 D0050<br />
1022 - 1 1021<br />
Note<br />
• There is no limit value for this instruction. When the data of operand A is -32768 before the<br />
execution, it will be 32767 after the execution.<br />
Basic Hardware and Function 155<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 048 AND AND<br />
Expression<br />
Input −[ A AND B → C ]− Output<br />
Function<br />
When the input is ON, this instruction finds logical AND of A and B, and stores the result in C.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
156 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
B Source √ √ √ √ √ √ √ √ √ √ √ √<br />
C AND √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R012 is ON, logical AND operation is executed for the data of RW12 and the constant<br />
data HFF00, and the result is stored in D0030.<br />
If the data of RW12 is H3456, the result H3400 is stored in D0030.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW12 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0<br />
3 4 5 6<br />
AND<br />
Constant 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0<br />
F F 0 0<br />
D0030 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0<br />
3 4 0 0<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 050 OR OR<br />
Expression<br />
Input −[ A OR B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction finds logical OR of A and B, and stores the result in C.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
B source √ √ √ √ √ √ √ √ √ √ √ √<br />
C OR √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R012 is ON, logical OR operation is executed for the data of RW13 and RW20, and the<br />
result is stored in D0031.<br />
If the data of RW13 is H5678 and RW20 is H4321, the result H5779 is stored in D0031.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW13 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0<br />
5 6 7 8<br />
OR<br />
RW20 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1<br />
4 3 2 1<br />
D0031 0 1 0 1 0 1 1 1 0 1 1 1 1 0 0 1<br />
5 7 7 9<br />
Basic Hardware and Function 157<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 052 EOR Exclusive OR<br />
Expression<br />
Input −[ A EOR B → C ]− Output<br />
Function<br />
When the input is ON, this instruction finds exclusive OR of A and B, and stores the result in C.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
158 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
B source √ √ √ √ √ √ √ √ √ √ √ √<br />
C Exclusive OR √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R012 is ON, exclusive OR operation is executed for the data of D1000 and D0300, and<br />
the result is stored in D1000.<br />
If the data of D1000 is H5678 and D0300 is H4321, the result H1559 is stored in D1000.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
D1000 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0<br />
5 6 7 8<br />
Exclusive OR<br />
D0300 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1<br />
4 3 2 1<br />
D1000 0 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1<br />
1 5 5 9<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 056 MAVE Moving average<br />
Expression<br />
Input −[ A MAVE (n) B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction calculates the average value of the latest n scan’s register A<br />
data, and stores it in C. The allowable range of n is 1 to 64.<br />
This instruction is useful for filtering the analog input signal.<br />
The latest n scan’s data of A are stored in n registers starting with B, and C+1 are used as pointer.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Input data √ √ √ √ √ √ √ √ √ √ √<br />
n Data size 1 - 64<br />
B Start of table √ √ √ √ √ √<br />
C Output data √ √ √ √ √ √ √ √<br />
Example<br />
The latest 5 scan’s data of XW04 is stored in D0900 to D0904 (5 registers), and the average<br />
value of them is calculated and stored in D0010.<br />
D0011 is used as internal work data.<br />
XW04 D0010<br />
1st scan 1000 200 = (1000) / 5<br />
2nd scan 1005 401 = (1000 + 1005) / 5<br />
3rd scan 1009 603 = (1000 + 1005 + 1009) / 5<br />
4th scan 1012 805 = (1000 + 1005 + 1009 + 1012) / 5<br />
5th scan 1007 1006 = (1000 + 1005 + 1009 + 1012 + 1007) / 5<br />
6th scan 1004 1007 = (1005 + 1009 + 1012 + 1007 + 1004) / 5<br />
7th scan 998 1006 = (1009 + 1012 + 1007 + 1004 + 998) / 5<br />
8th scan 994 1003 = (1012 + 1007 + 1004 + 998 + 994) / 5<br />
Basic Hardware and Function 159<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 061 DFL Digital Filter<br />
Expression<br />
Input −[ A DFL B → C ]− Output<br />
160 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction calculates the following formula to perform digital filtering for<br />
input data A by filter constant by B, and stores the result in C.<br />
yn = ( 1− FL) × xn+ FL× yn<br />
− 1<br />
Here; xn is input data specified by A<br />
FL is filter constant, 1/10000 of data specified by B (data range: 0 to 9999)<br />
yn is output data to be stored in C<br />
yn-1 is output data at last scan<br />
This instruction is useful for filtering the analog input signal. C+1 is used for internal work data.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution (FL is limited within the range of 0 to<br />
9999)<br />
ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Input data √ √ √ √ √ √ √ √ √ √ √<br />
B Filter constant √ √ √ √ √ √ √<br />
C Output data √ √ √ √ √ √<br />
Example<br />
The filtered data of XW04 is stored in D0110. (D0111 is used for internal work data)<br />
When D0100 value is small<br />
XW04<br />
D0110<br />
Time<br />
When D0100 value is large<br />
XW04<br />
D0110<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net<br />
Time
FUN 062 HTOA Hex to ASCII conversion<br />
Expression<br />
Input −[ A HTOA (n) B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the hexadecimal data of n registers starting with A is converted into ASCII<br />
characters and stored in B and after. The uppermost digit of source A is stored in lower byte of<br />
destination B, and followed in this order. The allowable range of n is 1 to 32.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √<br />
n Data size 1 - 32<br />
B Destination √ √ √ √ √ √<br />
Example<br />
When R010 is ON, 4 words data of D0100 to D0103 are converted into ASCII characters, and<br />
stored in 8 words registers starting with D0200.<br />
F 0 F 8 7 0<br />
D0100 H0123 D0220 “1” (H31) “0” (H30)<br />
D0101 H4567 Converted D0221 “3” (H33) “2” (H32)<br />
D0102 H89AB D0222 “5” (H35) “4” (H34)<br />
D0103 HCDEF D0223 “7” (H37) “6” (H36)<br />
D0224 “9” (H39) “8” (H38)<br />
D0225 “B” (H42) “A” (H41)<br />
D0226 “D” (H44) “C” (H43)<br />
D0227 “F” (H46) “E” (H45)<br />
Note<br />
• If index register (I, J or K) is used for the operand A, only n = 1 is allowed. Otherwise,<br />
boundary error will occur.<br />
Basic Hardware and Function 161<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 063 ATOH ASCII to Hex conversion<br />
Expression<br />
Input −[ A ATOH (n) B ]− Output<br />
162 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the ASCII characters stored in n registers starting with A is converted into<br />
hexadecimal data and stored in B and after. The lower byte of source A is stored as uppermost<br />
digit of destination B, and followed in this order. The allowable ASCII character in the source table<br />
is “0” (H30) to “9” (H39) and “A” (H41) to “F” (H46). The allowable range of n is 1 to 64.<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution ON −<br />
Conversion data error (no execution) OFF Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √<br />
n Data size 1 - 64<br />
B Destination √ √ √ √ √ √<br />
Example<br />
When R011 is ON, the ASCII characters stored in 8 words of D0300 to D0307 are converted<br />
into hexadecimal data, and stored in 4 words registers starting with RW040.<br />
F 8 7 0 F 0<br />
D0300 “1” (H31) “0” (H30) RW040 H0123<br />
D0301 “3” (H33) “2” (H32) Converted RW041 H4567<br />
D0302 “5” (H35) “4” (H34) RW042 H89AB<br />
D0303 “7” (H37) “6” (H36) RW043 HCDEF<br />
D0304 “9” (H39) “8” (H38)<br />
D0305 “B” (H42) “A” (H41)<br />
D0306 “D” (H44) “C” (H43)<br />
D0307 “F” (H46) “E” (H45)<br />
Note<br />
• If index register (I, J or K) is used for the operand A, only n = 1 is allowed.<br />
• If n is odd number, lower 2 digits of the last converted data will not be fixed, Use even for n.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 064 TEST Bit test<br />
Expression<br />
Input −[ A TEST B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction finds logical AND of A and B. Then if the result is not 0, sets<br />
the output to ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution When the result is not 0 ON<br />
When the result is 0 OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
B Test data √ √ √ √ √ √ √ √ √ √ √ √<br />
Example<br />
Logical AND operation is executed for the data of RW07 and the constant data H0FFF, and if<br />
the result is not 0, R00A is turned ON. (R00A is turned ON when any device from R070 to<br />
R07B is ON.)<br />
If the data of RW07 is H4008, R00A is turned ON.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW07 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0<br />
4 0 0 8<br />
AND<br />
Constant 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1<br />
0 F F F<br />
Result is not 0<br />
Result 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 R00A comes ON<br />
Basic Hardware and Function 163<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 068 SHR1 1 bit shift right<br />
Expression<br />
Input −[ SHR1 A ]− Output<br />
164 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of register A is shifted 1 bit to the right (LSB direction). 0 is stored in<br />
the left most bit (MSB). The pushed out bit state is stored in the carry flag (CF = S050). After the<br />
operation, if the right most bit (LSB) is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution When LSB = 1 ON Set or reset<br />
When LSB = 0 OFF Set or reset<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When X007 is changed from OFF to ON, the data of RW15 is shifted 1 bit to the right.<br />
The figure below shows an operation example.<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW15 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0<br />
CF<br />
RW15 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0<br />
(Result)<br />
0 R001 is turned ON<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 069 SHL1 1 bit shift left<br />
Expression<br />
Input −[ SHL1 A ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of register A is shifted 1 bit to the left (MSB direction). 0 is stored in<br />
the right most bit (LSB). The pushed out bit state is stored in the carry flag (CF = S050). After the<br />
operation, if the left most bit (MSB) is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution When MSB = 1 ON Set or reset<br />
When MSB = 0 OFF Set or reset<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When X008 is changed from OFF to ON, the data of RW15 is shifted 1 bit to the left.<br />
The figure below shows an operation example.<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 0<br />
CF<br />
1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 0 0<br />
R002 is turned ON 0<br />
RW15<br />
RW15 (Result)<br />
Basic Hardware and Function 165<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 070 SHR n bit shift right<br />
Expression<br />
Input −[ A SHR n → B ]− Output<br />
166 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of register A is shifted n bits to the right (LSB direction) including<br />
the carry flag (CF = S050), and stored in B. 0 is stored in upper n bits. After the operation, if the<br />
right most bit (LSB) is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution When LSB = 1 ON Set or reset<br />
When LSB = 0 OFF Set or reset<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
n Shift bits 1 - 16<br />
B Destination √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When X007 is changed from OFF to ON, the data of RW18 is shifted 5 bits to the right and the<br />
result is stored in RW20.<br />
The figure below shows an operation example.<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW18 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 0<br />
CF<br />
RW20 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1<br />
(Result)<br />
0 R001 is turned OFF<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 071 SHL n bit shift left<br />
Expression<br />
Input −[ A SHL n → B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of register A is shifted n bits to the left (MSB direction) including the<br />
carry flag (CF = S050), and stored in B. 0 is stored in lower n bits. After the operation, if the left<br />
most bit (MSB) is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution When MSB = 1 ON Set or reset<br />
When MSB = 0 OFF Set or reset<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
n Shift bits 1 - 16<br />
B Destination √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When X008 is changed from OFF to ON, the data of RW18 is shifted 3 bits to the left and the<br />
result is stored in RW20.<br />
The figure below shows an operation example.<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
1 0 1 0 0 1 1 1 0 0 1 1 1 0 1 0<br />
CF<br />
1 0 0 1 1 1 0 0 1 1 1 0 1 0 0 0 0<br />
R002 is turned OFF 0<br />
RW18<br />
RW20 (Result)<br />
Basic Hardware and Function 167<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 074 SR Shift register<br />
Expression<br />
Data input − D SR Q − Output<br />
Shift input − S (n)<br />
Enable input − E A<br />
168 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
While the enable input is ON, this instruction shifts the data of the bit table, size n starting with A,<br />
1 bit to the left (upper address direction) when the shift input is ON. The state of the data input is<br />
stored in A. The pushed out bit state is stored in the carry flag (CF = S050).<br />
When the enable input is OFF, all bits in the table and the carry flag are reset to OFF.<br />
Execution condition<br />
Enable<br />
input<br />
Operation Output CF<br />
OFF Resets all bits in the bit table OFF Reset<br />
ON When the shift input is ON Shift execution Last bit Set or reset<br />
When the shift input is OFF No execution state −<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Leading device √ √ √<br />
n Device size 1 - 64<br />
Example<br />
32 devices starting with R100 (R100 to R11F) is specified as a shift register.<br />
When R010 is OFF, the data of the shift register is reset to 0. (R100 to R11F are reset to OFF)<br />
The carry flag (CF = S050) is also reset to OFF.<br />
While R010 is ON, the data of the shift register is shifted 1 bit to the upper address direction<br />
when X009 is changed from OFF to ON. At the same time, the state of X008 is stored in the<br />
leading bit (R100).<br />
The output (R011) indicates the state of the last bit (R11F).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
7. Instructions<br />
The figure below shows an operation example. (When X009 is changed from OFF to ON)<br />
CF R11F R11E R11D R11C R103 R102 R101 R100 X008<br />
1 0 0 1 0 0 1 1 0<br />
1 0 0 1 0 1 1 0<br />
R011 is turned OFF<br />
Note<br />
• When the shift input is ON, the shift operation is performed every scan. Use a transitional<br />
contact for the shift input to detect the state changing.<br />
• For the data input and the shift input, direct linking to a connecting point is not allowed. In this<br />
case, insert a dummy contact (always ON special device = S04F, etc.) just before the input.<br />
( )<br />
D SR Q Not allowed<br />
S (n)<br />
E A<br />
Dummy contact<br />
( )<br />
D SR Q Allowed<br />
S (n)<br />
E A<br />
Shift result<br />
Basic Hardware and Function 169<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 075 DSR Bi-directional shift register<br />
Expression<br />
Data input − D DSR Q − Output<br />
Shift input − S (n)<br />
Enable input − E<br />
Direction input − L A<br />
170 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
While the enable input (E) is ON, this instruction shifts the data of the bit table, size n starting with<br />
A, 1 bit when the shift input (S) is ON. The shift direction is determined by the state of the direction<br />
input (L).<br />
When L is OFF, the direction is right (lower address direction).<br />
When L is ON, the direction is left (upper address direction).<br />
The state of the data input (D) is stored in the highest bit if right shift, and stored in the lowest bit A<br />
if left shift. The pushed out bit state is stored in the carry flag (CF = S050).<br />
When the enable input (E) is OFF, all bits in the table and the carry flag are reset to OFF.<br />
Execution condition<br />
Enable<br />
input<br />
Operation Output CF<br />
OFF Resets all bits in the bit table OFF Reset<br />
ON S = ON L = ON Shift left execution Highest bit state Set or reset<br />
L = OFF Shift right execution Lowest bit state Set or reset<br />
S = OFF No execution Highest bit state −<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Leading device √ √ √<br />
n Device size 1 - 64<br />
Example<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
7. Instructions<br />
9 devices starting with R200 (R200 to R208) is specified as a shift register.<br />
When R010 is OFF, the data of the shift register is reset to 0. (R200 to R208 are reset to OFF)<br />
The carry flag (CF = S050) is also reset to OFF.<br />
While R010 is ON the following operation is enabled.<br />
• When X00A is ON (shift left), the data of the shift register is shifted 1 bit to the upper<br />
address direction when X009 is changed from OFF to ON. At the same time, the state of<br />
X008 is stored in the leading bit (R200). The output (R012) indicates the state of the highest<br />
bit (R208).<br />
• When X00A is OFF (shift right), the data of the shift register is shifted 1 bit to the lower<br />
address direction when X009 is changed from OFF to ON. At the same time, the state of<br />
X008 is stored in the highest bit (R208). The output (R012) indicates the state of the lowest<br />
bit (R200).<br />
The figure below shows an operation example.<br />
(When X00A is ON and X009 is changed from OFF to ON)<br />
CF R208 R207 R206 R205 R204 R203 R202 R201 R200 X008<br />
1 0 0 1 1 0 0 1 1 0<br />
1 0 0 1 1 0 0 1 1 0<br />
R012 is turned OFF<br />
(When X00A is OFF and X009 is changed from OFF to ON)<br />
X008 R208 R207 R206 R205 R204 R203 R202 R201 R200 CF<br />
1 0 0 1 1 0 0 1 1 0<br />
Shift result<br />
Shift result<br />
1 0 0 1 1 0 0 1 1 0<br />
R012 is turned ON<br />
Note<br />
• When the shift input is ON, the shift operation is performed every scan. Use a transitional<br />
contact for the shift input to detect the state changing.<br />
• For the data input, the shift input and the enable input, direct linking to a connecting point is not<br />
allowed. In this case, insert a dummy contact (always ON special device = S04F, etc.) just<br />
before the input. Refer to Note of Shift register FUN 074.<br />
Basic Hardware and Function 171<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 078 RTR1 1 bit rotate right<br />
Expression<br />
Input −[ RTR1 A ]− Output<br />
172 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of register A is rotated 1 bit to the right (LSB direction). The pushed<br />
out bit state is stored in the left most bit (MSB) and in the carry flag (CF = S050). After the<br />
operation, if the right most bit (LSB) is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution When LSB = 1 ON Set or reset<br />
When LSB = 0 OFF Set or reset<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When X007 is changed from OFF to ON, the data of RW15 is rotated 1 bit to the right.<br />
The figure below shows an operation example.<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW15 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0<br />
CF<br />
RW15 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0<br />
(Result)<br />
R001 is turned ON<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 079 RTL1 1 bit rotate left<br />
Expression<br />
Input −[ RTL1 A ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of register A is rotated 1 bit to the left (MSB direction). The pushed<br />
out bit state is stored in the right most bit (LSB) and in the carry flag (CF = S050). After the<br />
operation, if the left most bit (MSB) is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution When MSB = 1 ON Set or reset<br />
When MSB = 0 OFF Set or reset<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When X008 is changed from OFF to ON, the data of RW15 is rotated 1 bit to the left.<br />
The figure below shows an operation example.<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 0<br />
CF<br />
1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 0 1<br />
R002 is turned ON<br />
RW15<br />
RW15 (Result)<br />
Basic Hardware and Function 173<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 080 RTR n bit rotate right<br />
Expression<br />
Input −[ A RTR n → B ]− Output<br />
174 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of register A is rotated n bits to the right (LSB direction), and stored<br />
in B. After the operation, if the right most bit (LSB) is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution When LSB = 1 ON Set or reset<br />
When LSB = 0 OFF Set or reset<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
n Shift bits 1 - 16<br />
B Destination √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When X007 is changed from OFF to ON, the data of RW18 is rotated 5 bits to the right and the<br />
result is stored in RW20.<br />
The figure below shows an operation example.<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW18 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 0<br />
CF<br />
RW20 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1<br />
(Result)<br />
∗<br />
∗<br />
R001 is turned OFF<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 081 RTL n bit rotate left<br />
Expression<br />
Input −[ A RTL n → B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of register A is rotated n bits to the left (MSB direction), and stored<br />
in B. After the operation, if the left most bit (MSB) is ON, the output is turned ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution When MSB = 1 ON Set or reset<br />
When MSB = 0 OFF Set or reset<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √ √<br />
n Shift bits 1 - 16<br />
B Destination √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When X008 is changed from OFF to ON, the data of RW18 is rotated 3 bits to the left and the<br />
result is stored in RW20.<br />
The figure below shows an operation example.<br />
∗<br />
(MSB) (LSB)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
1 0 1 0 0 1 1 1 0 0 1 1 1 0 1 0<br />
CF<br />
1 0 0 1 1 1 0 0 1 1 1 0 1 0 1 0 1<br />
R002 is turned OFF<br />
RW18<br />
RW20 (Result)<br />
∗<br />
Basic Hardware and Function 175<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 090 MPX Multiplexer<br />
Expression<br />
Input −[ A MPX (n) B → C ]− Output<br />
176 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of the register which is designated by B in the table, size n starting<br />
with A, is transferred to C.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Normal execution OFF<br />
Pointer over (no execution) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Start of table √ √ √ √ √ √ √<br />
n Table size 1 - 64<br />
B Pointer √ √ √ √ √ √ √ √ √ √ 0 - 63<br />
C Destination √ √ √ √ √ √ √ √ √<br />
Example<br />
When R010 is ON, the register data which is designated by RW30 is read from the table<br />
D0500 to D0509 (10 registers size), and stored in D0005.<br />
If the data of RW30 is 7, D0507 data is transferred to D0005.<br />
Source table Pointer Destination<br />
D0500 0 D0005 12345<br />
D0501 1<br />
D0507 12345 7<br />
D0508 8<br />
D0509 9<br />
Note<br />
• If the pointer data designates outside the table (10 or more in the above example), the transfer<br />
is not executed and the output comes ON.<br />
• The table must be within the effective range of the register address.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 091 DPX Demultiplexer<br />
Expression<br />
Input −[ A DPX (n) B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of A is transferred to the register which is designated by B in the<br />
table, size n starting with C.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Normal execution OFF<br />
Pointer over (no execution) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √<br />
n Table size 1 - 64<br />
B Pointer √ √ √ √ √ √ √ √ √ √ 0 - 63<br />
C Start of table √ √ √ √ √ √<br />
Example<br />
When R011 is ON, the data of XW04 is transferred to the register which is designated by<br />
RW30 in the table D0500 to D0509 (10 registers size).<br />
If the data of RW30 is 8, XW04 data is transferred to D0508.<br />
Source Destination table Pointer<br />
XW04 3210 D0500 0<br />
D0501 1<br />
D0507 7<br />
D0508 3210 8<br />
D0509 9<br />
Note<br />
• If the pointer data designates outside the table (10 or more in the above example), the transfer<br />
is not executed and the output comes ON.<br />
• The table must be within the effective range of the register address.<br />
Basic Hardware and Function 177<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 096 > Greater than<br />
Expression<br />
Input −[ A > B ]− Output<br />
178 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of A and the data of B are compared, and if A is greater than B, the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A > B ON<br />
A ≤ B OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the constant data 2500, and if the data<br />
of D0125 is greater than 2500, R020 is turned ON.<br />
If the data of D0125 is 3000, the comparison result is true. Consequently, R020 is turned ON.<br />
D0125 3000 > Constant 2500 R020 is ON<br />
If the data of D0125 is -100, the comparison result is false. Consequently, R020 is turned OFF.<br />
D0125 -100 ≤ Constant 2500 R020 is OFF<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 097 >= Greater than or equal<br />
Expression<br />
Input −[ A >= B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of A and the data of B are compared, and if A is greater than or<br />
equal to B, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A ≥ B ON<br />
A < B OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the data of D0020, and if the data of<br />
D0125 is greater than or equal to the data of D0020, R020 is turned ON.<br />
If the data of D0125 is 3000 and that of D0020 is 3000, the comparison result is true.<br />
Consequently, R020 is turned ON.<br />
D0125 3000 ≥ D0020 3000 R020 is ON<br />
If the data of D0125 is -1500 and that of D0020 is 0, the comparison result is false.<br />
Consequently, R020 is turned OFF.<br />
D0125 -1500 < D0020 0 R020 is OFF<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
Basic Hardware and Function 179<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 098 = Equal<br />
Expression<br />
Input −[ A = B ]− Output<br />
Function<br />
When the input is ON, the data of A and the data of B are compared, and if A is equal to B, the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A = B ON<br />
A ≠ B OFF<br />
180 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the data of D0030, and if the data of<br />
D0125 is equal to the data of D0030, R020 is turned ON.<br />
If the data of D0125 is 3000 and that of D0020 is 3000, the comparison result is true.<br />
Consequently, R020 is turned ON.<br />
D0125 3000 = D0030 3000 R020 is ON<br />
If the data of D0125 is -1500 and that of D0020 is 0, the comparison result is false.<br />
Consequently, R020 is turned OFF.<br />
D0125 -1500 ≠ D0030 0 R020 is OFF<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 099 Not equal<br />
Expression<br />
Input −[ A B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
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<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A ≠ B ON<br />
A = B OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the constant data 0, and if the data of<br />
D0125 is not 0, R020 is turned ON.<br />
If the data of D0125 is 10, the comparison result is true. Consequently, R020 is turned ON.<br />
D0125 10 ≠ Constant 0 R020 is ON<br />
If the data of D0125 is 0, the comparison result is false. Consequently, R020 is turned OFF.<br />
D0125 0 = Constant 0 R020 is OFF<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
Basic Hardware and Function 181<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 100 < Less than<br />
Expression<br />
Input −[ A < B ]− Output<br />
Function<br />
When the input is ON, the data of A and the data of B are compared, and if A is less than B, the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A < B ON<br />
A ≥ B OFF<br />
182 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the data of D0040, and if the data of<br />
D0125 is less than the data of D0040, R020 is turned ON.<br />
If the data of D0125 is 10 and that of D0040 is 15, the comparison result is true. Consequently,<br />
R020 is turned ON.<br />
D0125 10 < D0040 15 R020 is ON<br />
If the data of D0125 is 0 and that of D0040 is -50, the comparison result is false.<br />
Consequently, R020 is turned OFF.<br />
D0125 0 ≥ D0040 0 R020 is OFF<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 101
7. Instructions<br />
FUN 102 D> Double-word greater than<br />
Expression<br />
Input −[ A+1⋅A D> B+1⋅B ]− Output<br />
Function<br />
When the input is ON, the double-word data of A+1⋅A and B+1⋅B are compared, and if A+1⋅A is<br />
greater than B+1⋅B, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A+1⋅A > B+1⋅B ON<br />
A+1⋅A ≤ B+1⋅B OFF<br />
184 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √<br />
When R010 is ON, the data of D0101⋅D0100 is compared with the constant data 200000, and<br />
if the data of D0101⋅D0100 is greater than 200000, R014 is turned ON.<br />
If the data of D0101⋅D0100 is 250000, the comparison result is true. Consequently, R014 is<br />
turned ON.<br />
D0101⋅D0100 250000 > Constant 200000 R014 is ON<br />
If the data of D0101⋅D0100 is -100, the comparison result is false. Consequently, R014 is<br />
turned OFF.<br />
D0101⋅D0100 -100 ≤ Constant 200000 R014 is OFF<br />
Note<br />
• This instruction deals with the data as double-word integer (-2147483648 to 2147483647).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 103 D>= Double-word greater than or equal<br />
Expression<br />
Input −[ A+1⋅A D>= B+1⋅B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the double-word data of A+1⋅A and B+1⋅B are compared, and if A+1⋅A is<br />
greater than or equal to B+1⋅B, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A+1⋅A ≥ B+1⋅B ON<br />
A+1⋅A < B+1⋅B OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √<br />
When R010 is ON, the double-word data of D0101⋅D0100 is compared with the double-word<br />
data of D0251⋅D0250, and if the data of D0101⋅D0100 is greater than or equal to the data of<br />
D0251⋅D0250, R014 is turned ON.<br />
If the data of D0101⋅D0100 is 250000 and D0251⋅D0250 is 200000, R014 is turned ON.<br />
D0101⋅D0100 250000 ≥ D0251⋅D0250 200000 R014 is ON<br />
If the data of D0101⋅D0100 is -100 and D0251⋅D0250 is 0, R014 is turned OFF.<br />
D0101⋅D0100 -100 < D0251⋅D0250 0 R014 is OFF<br />
Note<br />
• This instruction deals with the data as double-word integer (-2147483648 to 2147483647).<br />
Basic Hardware and Function 185<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 104 D= Double-word equal<br />
Expression<br />
Input −[ A+1⋅A D= B+1⋅B ]− Output<br />
Function<br />
When the input is ON, the double-word data of A+1⋅A and B+1⋅B are compared, and if A+1⋅A is<br />
equal to B+1⋅B, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A+1⋅A = B+1⋅B ON<br />
A+1⋅A ≠ B+1⋅B OFF<br />
186 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √<br />
When R010 is ON, the double-word data of D0101⋅D0100 is compared with the double-word<br />
data of D0251⋅D0250, and if the data of D0101⋅D0100 is equal to the data of D0251⋅D0250,<br />
R014 is turned ON.<br />
If the data of D0101⋅D0100 is 250000 and D0251⋅D0250 is 250000, R014 is turned ON.<br />
D0101⋅D0100 250000 = D0251⋅D0250 250000 R014 is ON<br />
If the data of D0101⋅D0100 is -100 and D0251⋅D0250 is 0, R014 is turned OFF.<br />
D0101⋅D0100 -100 ≠ D0251⋅D0250 0 R014 is OFF<br />
Note<br />
• This instruction deals with the data as double-word integer (-2147483648 to 2147483647).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 105 D Double-word not equal<br />
Expression<br />
Input −[ A+1⋅A D B+1⋅B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the double-word data of A+1⋅A and B+1⋅B are compared, and if A+1⋅A is not<br />
equal to B+1⋅B, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A+1⋅A ≠ B+1⋅B ON<br />
A+1⋅A = B+1⋅B OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √<br />
When R010 is ON, the double-word data of D0101⋅D0100 is compared with the double-word<br />
data of D0251⋅D0250, and if the data of D0101⋅D0100 is not equal to the data of<br />
D0251⋅D0250, R014 is turned ON.<br />
If the data of D0101⋅D0100 is 250000 and D0251⋅D0250 is 200000, R014 is turned ON.<br />
D0101⋅D0100 250000 ≠ D0251⋅D0250 250000 R014 is ON<br />
If the data of D0101⋅D0100 is -100 and D0251⋅D0250 is -100, R014 is turned OFF.<br />
D0101⋅D0100 -100 = D0251⋅D0250 -100 R014 is OFF<br />
Note<br />
• This instruction deals with the data as double-word integer (-2147483648 to 2147483647).<br />
Basic Hardware and Function 187<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 106 D< Double-word less than<br />
Expression<br />
Input −[ A+1⋅A D< B+1⋅B ]− Output<br />
Function<br />
When the input is ON, the double-word data of A+1⋅A and B+1⋅B are compared, and if A+1⋅A is<br />
less than B+1⋅B, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A+1⋅A < B+1⋅B ON<br />
A+1⋅A ≥ B+1⋅B OFF<br />
188 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √<br />
When R010 is ON, the data of D0101⋅D0100 is compared with the constant data 427780, and<br />
if the data of D0101⋅D0100 is less than 427780, R014 is turned ON.<br />
If the data of D0101⋅D0100 is 250000, R014 is turned ON.<br />
D0101⋅D0100 250000 < Constant 427780 R014 is ON<br />
If the data of D0101⋅D0100 is 430000, R014 is turned OFF.<br />
D0101⋅D0100 430000 ≥ Constant 427780 R014 is OFF<br />
Note<br />
• This instruction deals with the data as double-word integer (-2147483648 to 2147483647).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 107 D Constant 0 R014 is OFF<br />
Note<br />
• This instruction deals with the data as double-word integer (-2147483648 to 2147483647).<br />
Basic Hardware and Function 189<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 108 U> Unsigned greater than<br />
Expression<br />
Input −[ A U> B ]− Output<br />
190 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the data of A and the data of B are compared, and if A is greater than B, the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A > B ON<br />
A ≤ B OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the constant data 40000, and if the<br />
data of D0125 is greater than 40000, R020 is turned ON.<br />
If the data of D0125 is 52000, the comparison result is true. Consequently, R020 is turned ON.<br />
D0125 52000 > Constant 40000 R020 is ON<br />
If the data of D0125 is 21000, the comparison result is false. Consequently, R020 is turned<br />
OFF.<br />
D0125 21000 ≤ Constant 40000 R020 is OFF<br />
Note<br />
• This instruction deals with the data as unsigned integer (0 to 65535).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 109 U>= Unsigned greater than or equal<br />
Expression<br />
Input −[ A >= B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the data of A and the data of B are compared, and if A is greater than or<br />
equal to B, the output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A ≥ B ON<br />
A < B OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the data of D0020, and if the data of<br />
D0125 is greater than or equal to the data of D0020, R020 is turned ON.<br />
If the data of D0125 is 40000 and that of D0020 is 40000, the comparison result is true.<br />
Consequently, R020 is turned ON.<br />
D0125 40000 ≥ D0020 40000 R020 is ON<br />
If the data of D0125 is 15000 and that of D0020 is 20000, the comparison result is false.<br />
Consequently, R020 is turned OFF.<br />
D0125 15000 < D0020 20000 R020 is OFF<br />
Note<br />
• This instruction deals with the data as unsigned integer (0 to 65535).<br />
Basic Hardware and Function 191<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 110 U= Unsigned equal<br />
Expression<br />
Input −[ A U= B ]− Output<br />
Function<br />
When the input is ON, the data of A and the data of B are compared, and if A is equal to B, the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A = B ON<br />
A ≠ B OFF<br />
192 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the data of D0030, and if the data of<br />
D0125 is equal to the data of D0030, R020 is turned ON.<br />
If the data of D0125 is 35000 and that of D0020 is 35000, the comparison result is true.<br />
Consequently, R020 is turned ON.<br />
D0125 35000 = D0030 35000 R020 is ON<br />
If the data of D0125 is 1500 and that of D0020 is 4000, the comparison result is false.<br />
Consequently, R020 is turned OFF.<br />
D0125 1500 ≠ D0030 4000 R020 is OFF<br />
Note<br />
• This instruction deals with the data as unsigned integer (0 to 65535).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 111 U Unsigned not equal<br />
Expression<br />
Input −[ A U B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
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<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A ≠ B ON<br />
A = B OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the constant data 0, and if the data of<br />
D0125 is not 0, R020 is turned ON.<br />
If the data of D0125 is 41000, the comparison result is true. Consequently, R020 is turned ON.<br />
D0125 41000 ≠ Constant 0 R020 is ON<br />
If the data of D0125 is 0, the comparison result is false. Consequently, R020 is turned OFF.<br />
D0125 0 = Constant 0 R020 is OFF<br />
Note<br />
• This instruction deals with the data as unsigned integer (0 to 65535).<br />
Basic Hardware and Function 193<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 112 U< Unsigned less than<br />
Expression<br />
Input −[ A U< B ]− Output<br />
Function<br />
When the input is ON, the data of A and the data of B are compared, and if A is less than B, the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution A < B ON<br />
A ≥ B OFF<br />
194 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Compared<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
data<br />
B Reference<br />
data<br />
Example<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R00C is ON, the data of D0125 is compared with the data of D0040, and if the data of<br />
D0125 is less than the data of D0040, R020 is turned ON.<br />
If the data of D0125 is 43000 and that of D0040 is 45000, the comparison result is true.<br />
Consequently, R020 is turned ON.<br />
D0125 43000 < D0040 45000 R020 is ON<br />
If the data of D0125 is 50000 and that of D0040 is 50000, the comparison result is false.<br />
Consequently, R020 is turned OFF.<br />
D0125 50000 ≥ D0040 50000 R020 is OFF<br />
Note<br />
• This instruction deals with the data as unsigned integer (0 to 65535).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 113 U Constant 35000 R020 is OFF<br />
Note<br />
• This instruction deals with the data as unsigned integer (0 to 65535).<br />
Basic Hardware and Function 195<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 114 SET Device/register set<br />
Expression<br />
Input −[ SET A ]− Output<br />
196 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
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<br />
register A if A is a register.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
A Device or<br />
register<br />
Example 1 (device set)<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R010 is ON, R025 is set to ON. The state of R025 is remained even if R010 comes<br />
OFF.<br />
Example 2 (register set)<br />
When R010 is ON, the data HFFFF is stored in RW20. (R200 to R20F are set to ON)<br />
The state of RW20 is remained even if R010 comes OFF.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 115 RST Device/register reset<br />
Expression<br />
Input −[ RST A ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the device A is reset to OFF if A is a device, or the data 0 is stored in the<br />
register A if A is a register.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
A Device or<br />
register<br />
Example 1 (device reset)<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
√ √ √ √ √ √ √ √ √ √ √ √<br />
When R011 is ON, R005 is reset to OFF. The state of R025 is remained even if R011 comes<br />
OFF.<br />
Example 2 (register reset)<br />
When R011 is ON, the data 0 is stored in RW20. (R200 to R20F are reset to OFF)<br />
The state of RW20 is remained even if R011 comes OFF.<br />
Basic Hardware and Function 197<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 118 SETC Set carry<br />
Expression<br />
Input −[ SETC ]− Output<br />
Function<br />
When the input is ON, the carry flag (CF = S050) is set to ON.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution ON Set<br />
Operand<br />
No operand is required.<br />
Example<br />
When R011 is changed from OFF to ON, the carry flag S050 is set to ON.<br />
198 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 119 RSTC Reset carry<br />
Expression<br />
Input −[ RSTC ]− Output<br />
Function<br />
When the input is ON, the carry flag (CF = S050) is reset to OFF.<br />
Execution condition<br />
Input Operation Output CF<br />
OFF No execution OFF −<br />
ON Execution ON Reset<br />
Operand<br />
No operand is required.<br />
Example<br />
When R010 is changed from OFF to ON, the carry flag S050 is reset to OFF.<br />
6F3B0253<br />
7. Instructions<br />
Basic Hardware and Function 199<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 120 ENC Encode<br />
Expression<br />
Input −[ A ENC (n) B ]− Output<br />
200 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction finds the bit position of the most significant ON bit in the bit<br />
table, size 2 n bits starting with 0 bit (LSB) of A, and stores it in B.<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution ON −<br />
There is no ON bit (no execution) OFF Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Start of table √ √ √ √ √ √ √<br />
n Table size 1 - 8<br />
B Encode result √ √ √ √ √ √ √ √ √<br />
Example<br />
2 5 (=32) bits starting with 0 bit of RW05 (R050 to R06F) are defined as the bit table.<br />
When R010 is ON, the most significant ON (1) bit position in the bit table is searched, and the<br />
position is stored in D0010.<br />
The following figure shows an operation example.<br />
RW06 RW05<br />
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 3 2 1 0<br />
0 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 0<br />
D0010 26<br />
Note<br />
• If there is no ON bit in the bit table, the instruction error flag (ERF = S051) is set to ON.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 121 DEC Decode<br />
Expression<br />
Input −[ A DEC (n) B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction sets the bit position which is designated by lower n bits of A<br />
to ON in the bit table, size 2 n bits starting with 0 bit (LSB) of B, and resets all other bits to OFF.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Decode source √ √ √ √ √ √ √ √ √ √<br />
n Table size 1 - 8<br />
B Start of table √ √ √ √ √ √<br />
Example<br />
2 5 (=32) bits starting with 0 bit of RW05 (R050 to R06F) are defined as the bit table.<br />
When R011 is ON, the bit position designated by lower 5 bits of D0011 in the bit table is set to<br />
ON, and all other bits in the table are reset to OFF.<br />
The following figure shows an operation example.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
D0011 1 1 0 0 0<br />
Ignored H18 (=24)<br />
Sets ON<br />
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 3 2 1 0<br />
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />
RW06 RW05<br />
Basic Hardware and Function 201<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 122 BC Bit count<br />
Expression<br />
Input −[ A BC B ]− Output<br />
202 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction counts the number of ON (1) bits of A, and stores the result<br />
in B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √<br />
B Count data √ √ √ √ √ √<br />
Example<br />
When R020 is ON, the number of ON (1) bits of the register RW032 is counted, and the result<br />
is stored in D0102.<br />
The following figure shows an operation example.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW032 0 0 1 0 0 1 1 1 0 1 0 1 1 0 0 0<br />
Counts the number of ON (1) bits = 7<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
D0102 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1<br />
The result data (7) is stored in binary<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 128 CALL Subroutine call<br />
Expression<br />
Input −[ CALL N. n ]− Output<br />
Function<br />
When the input is ON, this instruction calls the subroutine number n.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
n Subroutine<br />
number<br />
Example<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
√ (Note)<br />
When X007 is ON, the subroutine number 8 is called. When the program execution is returned<br />
from the subroutine, the output is turned ON.<br />
Main program Subroutine<br />
| | [ CALL N.008 ] [ SUBR (008)]<br />
[ RET ]<br />
Note<br />
• The possible subroutine number is 0 to 15 (<strong>T1</strong>) or 0 to 255 (<strong>T1</strong>S).<br />
• Refer to the SUBR instruction (FUN 137).<br />
• In case of <strong>T1</strong>, nesting of subroutines is not allowed. That is, the CALL instruction cannot be<br />
used in a subroutine.<br />
• In case of <strong>T1</strong>S, nesting of subroutines is possible. (up to 3 levels)<br />
• The CALL instruction can be used in an interrupt program. However, it is not allowed that the<br />
same subroutine is called from an interrupt program and from main program.<br />
Basic Hardware and Function 203<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 129 RET Subroutine return<br />
Expression<br />
⎟−−[ RET ]−⎢<br />
Function<br />
This instruction indicates the end of a subroutine. When program execution is reached this<br />
instruction, it is returned to the original CALL instruction.<br />
Execution condition<br />
Input Operation Output<br />
- Execution -<br />
Operand<br />
No operand is required.<br />
Example<br />
Main program Subroutine<br />
| | [ CALL N.008 ] [ SUBR (008)]<br />
204 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
[ RET ]<br />
Note<br />
• Refer to the SUBR instruction (FUN 137).<br />
• The RET instruction can be programmed only in the program type ‘Subroutine’.<br />
• The RET instruction must be connected directly to the left power rail.<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 132 FOR FOR (FOR-NEXT loop)<br />
Expression<br />
Input −[ FOR n ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the program segment between FOR and NEXT is executed n times<br />
repeatedly in a scan.<br />
When the input is OFF, the repetition is not performed. (the segment is executed once)<br />
Execution condition<br />
Input Operation Output<br />
OFF No repetition OFF<br />
ON Repetition ON<br />
Operand<br />
Name Device Register Constant Index<br />
n Repetition<br />
times<br />
Example<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
√ √ √ √ √ √ √ √ √ √ 1 - 32767<br />
This segment is executed 30 times repeatedly in a scan.<br />
When R005 is ON, the program segment between FOR and NEXT is executed 30 times in a<br />
scan.<br />
R005<br />
| | [ FOR 30 ]<br />
[ NEXT ]<br />
Executed 30 times in a scan when<br />
R005 is ON.<br />
Basic Hardware and Function 205<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 133 NEXT NEXT (FOR-NEXT loop)<br />
Expression<br />
Input −[ NEXT ]− Output<br />
Function<br />
This instruction configures a FOR-NEXT loop.<br />
If the input is OFF, The repetition is forcibly broken. and the program execution is moved to the<br />
next instruction.<br />
Execution condition<br />
Input Operation Output<br />
OFF Forcibly breaks the repetition OFF<br />
ON Repetition ON<br />
Operand<br />
No operand is required.<br />
Example<br />
206 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
When R005 is ON, the program segment between FOR and NEXT is executed 30 times in a<br />
scan. In the above example, the rung 3 is executed 30 times. As a result, the data of D0000 to<br />
D0029 are transferred to D0500 to D0529. (Block transfer)<br />
Note<br />
• The FOR instruction must be used with a corresponding NEXT instruction one by one.<br />
• Nesting of the FOR-NEXT loop is not allowed. That is, the FOR instruction cannot be used in a<br />
FOR-NEXT loop.<br />
• The FOR and NEXT instructions cannot be programmed on the same rung.<br />
• The following connection is not allowed.<br />
| | [ FOR n ] | | [ NEXT ]<br />
| | | |<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 137 SUBR Subroutine entry<br />
Expression<br />
⎟−[ SUBR (n) ]−−⎢<br />
Function<br />
This instruction indicates the begging of a subroutine.<br />
Execution condition<br />
Input Operation Output<br />
- Execution -<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
n Subroutine<br />
number<br />
Example<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
The begging of the subroutine number 8 is indicated.<br />
Main program Subroutine<br />
| | [ CALL N.008 ] [ SUBR (008)]<br />
[ RET ]<br />
Note<br />
• The possible subroutine number is 0 to 15 (<strong>T1</strong>) or 0 to 255 (<strong>T1</strong>S).<br />
• Refer to the CALL instruction (FUN 128) and the RET instruction (FUN 129).<br />
• The SUBR instruction can be programmed only in the program type ‘Subroutine’.<br />
• Nesting of subroutine is not allowed. That is, the CALL instruction cannot be used in a<br />
subroutine.<br />
• No other instruction cannot be placed on the rung of the SUBR instruction.<br />
√ (Note)<br />
Basic Hardware and Function 207<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 140 EI Enable interrupt<br />
Expression<br />
Input −[ EI ]− Output<br />
208 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction enables the execution of user designated interrupt operation,<br />
i.e. timer interrupt program and I/O interrupt programs.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
No operand is required.<br />
Example<br />
In the above example, the DI instruction disables the interrupt. Then the EI instruction enables<br />
the interrupt again. As a result, the rung 2 instructions can be executed without interruption<br />
between each instructions.<br />
Note<br />
• Refer to the DI instruction (FUN 141).<br />
• If an interrupt factor is occurred during the interrupt disabled state, the interrupt is kept waiting<br />
and it will be executed just after the EI instruction is executed.<br />
• The EI instruction can be used only in the main program.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 141 DI Disable interrupt<br />
Expression<br />
Input −[ DI ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction disables the execution of user designated interrupt operation,<br />
i.e. timer interrupt program and I/O interrupt programs.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
No operand is required.<br />
Example<br />
In the above example, the interrupt is disabled when R000 is ON, and it is enabled when R000<br />
is OFF.<br />
Note<br />
• Refer to the EI instruction (FUN 140).<br />
• If an interrupt factor is occurred during the interrupt disabled state, the interrupt is kept waiting<br />
and it will be executed just after the EI instruction is executed.<br />
• The DI instruction can be used only in the main program.<br />
Basic Hardware and Function 209<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 142 IRET Interrupt return<br />
Expression<br />
⎟−−[ IRET ]−⎢<br />
210 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
This instruction indicates the end of an interrupt program. When program execution reaches this<br />
instruction, it returns to the original location of the main program (or subroutine).<br />
Execution condition<br />
Input Operation Output<br />
- Execution -<br />
Operand<br />
No operand is required.<br />
Example<br />
An interrupt program<br />
(Timer interrupt,<br />
I/O interrupt #1, #2, #3 or #4)<br />
Note<br />
• The IRET instruction can be used only in an interrupt program.<br />
• There is no specific instruction which indicates the beginning of the interrupt program.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 143 WDT Watchdog timer reset<br />
Expression<br />
Input −[ WDT n ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction extend the scan time over detection time by 200 ms.<br />
Normally, <strong>T1</strong>/<strong>T1</strong>S detects the scan time-over if a scan is not finished within 200 ms. This instruction<br />
can be used to extend the detection time.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
n Extend time 1 - 100<br />
Example<br />
When R020 is ON, the scan time detection time is extended by 200 ms. The operand n has no<br />
effect on the extended time. It is fixed as 200 ms.<br />
Normal detection point Extended point<br />
0 50 100 150 200 250 300 (ms)<br />
Scan<br />
WDT instruction<br />
execution<br />
Extended by 200 ms<br />
Note<br />
• As for the upper T-series <strong>PLC</strong>s, the operand n specifies the extended time. However in the<br />
<strong>T1</strong>/<strong>T1</strong>S, it is fixed as 200 ms regardless of the operand n.<br />
Basic Hardware and Function 211<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 144 STIZ Step sequence initialize<br />
Expression<br />
Input −[ STIZ (n) A ]− Output<br />
Function<br />
When the input is ON, n devices starting with A are reset to OFF, and A is set to ON.<br />
This instruction is used to initialize a series of step sequence. The step sequence is useful to<br />
describe a sequential operation.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution at the rising edge of the input ON<br />
212 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
n Size of step<br />
sequence<br />
1 - 64<br />
A Start device √<br />
Example<br />
When R020 is changed from OFF to ON, R400 is set to ON and subsequent 9 devices (R401<br />
to R409) are reset to OFF.<br />
This instruction initializes a series of step sequence, 10 devices starting with R400.<br />
R409 R408 R407 R406 R405 R404 R403 R402 R401 R400<br />
OFF OFF OFF OFF OFF OFF OFF OFF OFF ON<br />
10 devices starting with R400<br />
Note<br />
• The STIZ instruction is used together with STIN (FUN 145) and STOT (FUN 146) instructions to<br />
configure the step sequence.<br />
• The STIZ instruction is executed only when the input is changed from OFF to ON.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 145 STIN Step sequence input<br />
Expression<br />
Input −[ STIN A ]− Output<br />
Function<br />
When the input is ON and the device A is ON, the output is set to ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON When A is ON ON<br />
When A is OFF OFF<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Step device √<br />
Example<br />
The following sequential operation is performed.<br />
When R020 is changed from OFF to ON, R400 is set to ON and subsequent 9 devices (R401<br />
to R409) are reset to OFF.<br />
When X004 comes ON, R400 is reset to OFF and R401 is set to ON.<br />
When both X005 and R022 are ON, R401 is reset to OFF and R402 is set to ON.<br />
R020<br />
X004<br />
X005<br />
R022<br />
R400<br />
R401<br />
R402<br />
Basic Hardware and Function 213<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 146 STOT Step sequence output<br />
Expression<br />
Input −[ STOT A ]−⎢<br />
214 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, the device A is set to ON and the devices of STIN instructions on the same<br />
rung are reset to OFF.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution -<br />
ON Execution -<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Step device √<br />
Example<br />
See example on STIN (FUN 145) instruction.<br />
Note<br />
• The STIZ, STIN and STOT instructions are used together to configure the step sequence.<br />
• Two or more STOT instructions can be placed on one rung to perform simultaneous sequences.<br />
• Two or more STIN instructions can be placed on one rung in parallel or in series to perform loop<br />
or convergence of sequences. (Max. 11 STIN instructions on one rung)<br />
• To perform the conditional branch (sequence selection), separate the rungs as follows.<br />
This limitation is applied to <strong>T1</strong> version 1.00 only.<br />
[ STIN A ] | | [ STOT B ] [ STIN A ] | | [ STOT B ]<br />
| | [ STOT C ] [ STIN A ] | | [ STOT C ]<br />
Not allowed Available<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 147 F/F Flip-flop<br />
Expression<br />
Set input − S F/F Q − Output<br />
Reset input − R A<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the set input is ON, the device A is set to ON. When the reset input is ON, the device A is<br />
reset to OFF. When both the set and reset inputs are OFF, the device A remains the state. If both<br />
the set and reset inputs are ON, the device A is reset to OFF.<br />
The state of the output is the same as the device A.<br />
Execution condition<br />
Set Reset<br />
Operation Output<br />
input input<br />
OFF OFF No execution (A remains previous state) Same<br />
ON Resets A to OFF as A<br />
ON OFF Sets A to ON<br />
ON Resets A to OFF<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Device √ √ √<br />
Example<br />
When X003 is ON, R10E is set to ON. When X004 is ON, R10E is reset to OFF. If both are<br />
ON, R10E is reset to OFF.<br />
An example timing diagram is shown below.<br />
X003<br />
X004<br />
R10E<br />
Note<br />
• For the set input, direct linking to a connecting point is not allowed. In this case, insert a dummy<br />
contact (always ON = S04F, etc.) just before the input. Refer to Note of Shift register FUN 074.<br />
Basic Hardware and Function 215<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 149 U/D Up-down counter<br />
Expression<br />
Direction input − U U/D Q − Output<br />
Count input − C<br />
Enable input − E A<br />
216 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
While the enable input is ON, this instruction counts the number of the count input changes from<br />
OFF to ON. The count direction (up count or down count) is selected by the state of the direction<br />
input. The count value is stored in the counter register A. The count value range is 0 to 65535.<br />
• Up count when the direction input is ON<br />
• Down count when the direction input is OFF<br />
When the enable input is OFF, the counter register A is cleared to 0.<br />
Execution condition<br />
Enable<br />
input<br />
Operation Output<br />
OFF No operation (A is cleared to 0) OFF<br />
ON Count value is not limit value (0 or 65535) OFF<br />
Count value is limit value and count input is ON ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Count value √<br />
Example<br />
X005<br />
X006<br />
R010<br />
C005<br />
C.005<br />
1<br />
2<br />
3 2<br />
1<br />
1<br />
2 3<br />
Note<br />
• The transitional contact is required for<br />
the count input. Otherwise, counting is<br />
executed every scan during X005 is ON<br />
in this example.<br />
• For the direction input and the count<br />
input, direct linking to a connecting point<br />
is not allowed. Refer to Note of Shift<br />
register FUN 074.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 154 CLND Set calendar<br />
Expression<br />
Input −[ A CLND ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, the built-in clock/calendar is set to the date and time specified by 6 registers<br />
starting with A. If an invalid data is contained in the registers, the operation is not executed and the<br />
output is turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No operation OFF<br />
ON Execution (data is valid)) OFF<br />
No execution (data is not valid) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Start of table √ √ √ √ √ √ √<br />
Example<br />
When R020 is ON, the clock/calendar is set according to the data of D0050 to D0055, and the<br />
output is OFF (R0031 is OFF).<br />
If D0050 to D0055 contains invalid data, the setting operation is not executed and the output is<br />
turned ON (R0031 comes ON).<br />
F 8 7 0 Allowable data range (2-digit BCD)<br />
D0050 H00 Year H00 to H99 (1990 - 2089)<br />
D0051 H00 Month H01 to H12<br />
D0052 H00 Day H01 to H31 Calendar<br />
D0053 H00 Hour H00 to H23 LSI<br />
D0054 H00 Minute H00 to H59<br />
D0055 H00 Second H00 to H59<br />
Note<br />
• The day of the week is automatically.<br />
Basic Hardware and Function 217<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 155 CLDS Calendar operation<br />
Expression<br />
Input −[ A CLDS B ]− Output<br />
218 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction subtracts the date and time stored in 6 registers starting with<br />
A from the current date and time, and stores the result in 6 registers starting with B.<br />
If an invalid data is contained in the registers, the operation is not executed and the output is<br />
turned ON.<br />
Execution condition<br />
Input Operation Output<br />
OFF No operation OFF<br />
ON Execution (data is valid)) OFF<br />
No execution (data is not valid) ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Subtrahend √ √ √ √ √ √ √<br />
B Result √ √ √ √ √ √<br />
Example<br />
When R020 is ON, the date and time data recorded in D0050 to D0055 are subtracted from<br />
the current date and time of clock/calendar, and the result is stored in D0100 to D0105.<br />
In normal operation, the output is OFF (R0035 is OFF). If D0050 to D0055 contains invalid<br />
data, the operation is not executed and the output is turned ON (R0035 comes ON).<br />
Current date & time<br />
F 0 F 0<br />
H0098 D0050 H0097 D0100 H0000 (Year)<br />
H0001 D0051 H0010 D0101 H0003 (Month)<br />
H0015 minus D0052 H0010 D0102 H0007 (Day)<br />
H0017 D0053 H0015 D0103 H0001 (Hour)<br />
H0000 D0054 H0030 D0104 H0030 (Minute)<br />
H0000 D0055 H0000 D0105 H0000 (Second)<br />
Note<br />
• Future date and time cannot be used as subtrahend A.<br />
• In the calculation result, it means that 1 year is 365 days and 1 month is 30 days.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 156 PID3 Pre-derivative real PID<br />
Expression<br />
Input −[ A PID3 B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
Performs PID (Proportional, Integral, Derivative) control which is a fundamental method of feedback<br />
control. (Pre-derivative real PID algorithm) This PID3 instruction has the following features.<br />
• For derivative action, incomplete derivative is used to suppress interference of high-frequency<br />
noise and to expand the stable application range,<br />
• Controllability and stability are enhanced in case of limit operation for MV, by using digital PID<br />
algorithm succeeding to benefits of analog PID.<br />
• Auto, cascade and manual modes are supported in this instruction.<br />
• Digital filter is available for PV.<br />
• Direct / reverse operation is selectable.<br />
Execution condition<br />
Input Operation Output<br />
OFF Initialization OFF<br />
ON Execute PID every setting interval ON when<br />
execution<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XW YW RW SW T C D I J K<br />
A Top of input data √ √ √ √ √ √ √<br />
B Top of parameter √ √ √ √ √ √ √<br />
C Top of output data √ √ √ √ √ √<br />
Input data Control parameter Output data<br />
A Process input value PVC B Proportional gain KP C Manipulation value MV<br />
A+1 A-mode set value ASV B+1 Integral time TI C+1 Last error en-1<br />
A+2 C-mode set value CSV B+2 Derivative time TD C+2 Last derivative value Dn-1<br />
A+3 M-mode MV input MMV B+3 Dead-band GP C+3 Last PV PVn-1<br />
A+4 MV tracking input TMV B+4 A-mode initial SV ISV C+4 Last SV SVn-1<br />
A+5 Mode setting MODE B+5 Input filter constant FT C+5 Integral remainder Ir<br />
B+6 ASV differential limit DSV C+6 Derivative remainder Dr<br />
B+7 MMV differential limit DMMV C+7 Internal MV MVn<br />
A-mode: Auto mode B+8 Initial status STS C+8 Internal counter C<br />
C-mode: Cascade mode B+9 MV upper limit MH C+9 Control interval ∆t<br />
M-mode: <strong>Manual</strong> mode B+10 MV lower limit ML<br />
B+11 MV differential limit DMV<br />
B+12 Control interval setting n<br />
Basic Hardware and Function 219<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Control block diagram<br />
220 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Integral<br />
1<br />
ASV<br />
DSV<br />
Differential<br />
Auto<br />
mode<br />
SVn +<br />
Gap<br />
en<br />
TI⋅s<br />
∆In<br />
Proportional<br />
∆Pn<br />
1<br />
+<br />
+ KP<br />
∆MVn<br />
MVn<br />
MVS H/L DMV<br />
CSV<br />
-<br />
-<br />
Cascade<br />
Derivative<br />
mode<br />
TD⋅s<br />
1+η⋅TD⋅s<br />
∆Dn<br />
MMV<br />
DMMV<br />
Differential limit<br />
PVn<br />
(η = 0.1)<br />
1<br />
1+T⋅s<br />
Digtal filter<br />
Integral<br />
control<br />
PVC<br />
MVS: Velocity → Position<br />
MVn = MVn-1 ± ∆MVn<br />
H/L: Upper / lower limit<br />
DMV: Differential limit<br />
MVCn<br />
<strong>Manual</strong><br />
mode<br />
6F3B0253<br />
Integral action control:<br />
When MV is limited (H/L, DMV) and the integral value has same sign as limit over, integral action<br />
is stopped.<br />
Velocity → Position conversion:<br />
In Direct mode, MV increases when PV is increased. → MVn = MVn-1 - ∆Mvn<br />
In Reverse mode, MV decreases when PV is increased. → MVn = MVn-1 + ∆MVn<br />
Gap (dead-band) operation:<br />
Algorithm<br />
Digital filter:<br />
PVn = ( −FT) ⋅ PVC + FT ⋅PVn −<br />
Here,<br />
Error e<br />
1 1<br />
0. 000 ≤FT ≤ 0. 999<br />
GP (%) GP (%)<br />
SV - PV<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net<br />
MV
PID algorithm:<br />
∆MVn= KP ⋅ ( ∆Pn+ ∆In+ ∆Dn)<br />
MV = MV − 1 ± ∆MV<br />
Here,<br />
n n n<br />
∆P = e −e<br />
Parameter details<br />
n n n − 1<br />
e = SV −PV<br />
n n n<br />
en⋅ ∆t+<br />
Ir<br />
∆In<br />
=<br />
TI<br />
TD⋅( PVn − 1−PVn) −∆t⋅ Dn − 1+<br />
Dr<br />
∆Dn<br />
=<br />
∆t+<br />
η⋅TD<br />
Dn = Dn − 1 + ∆Dn<br />
η = 01 . (Fixed)<br />
(If GP ≠ 0, Gap is applied)<br />
(If TI = 0, then ∆In = 0)<br />
A Process input value PVC (0.00 to 100.00 %) Data range: 0 to 10000<br />
A+1 Auto mode set value ASV (0.00 to 100.00 %) Data range: 0 to 10000<br />
A+2 Cascade mode set value CSV (0.00 to 100.00 %) Data range: 0 to 10000<br />
A+3 <strong>Manual</strong> mode MV MMV (-25.00 to 125.00 %) Data range: -2500 to 12500<br />
A+4 MV tracking input TMV (-25.00 to 125.00 %) Data range: -2500 to 12500<br />
A+5 Mode setting MODE<br />
F C 8 4 0<br />
Operation mode<br />
00 : <strong>Manual</strong> mode<br />
01 : Auto mode<br />
10 : Cascade mode<br />
11 : (Reserve)<br />
Tracking designation<br />
0 : No<br />
1 : Yes<br />
B Proportional gain KP (0.00 to 327.67) Data range: 0 to 32767<br />
B+1 Integral time TI (0.000 to 32.767 min., ∆In=0 if TI =0) Data range: 0 to 32767<br />
B+2 Derivative time TD (0.000 to 32.767 min.) Data range: 0 to 32767<br />
B+3 Gap (dead-band) GP (0.00 to 10.00 %) Data range: 0 to 1000<br />
B+4 Auto mode initial set value ISV (0.00 to 100.00 %) Data range: 0 to 10000<br />
B+5 Input filter constant FT (0.000 to 0.999) Data range: 0 to 999<br />
B+6 ASV differential limit DSV (0.00 to 100.00 %/∆t) Data range: 0 to 10000<br />
B+7 MMV differential limit DMMV (0.00 to 100.00 %/∆t) Data range: 0 to 10000<br />
6F3B0253<br />
7. Instructions<br />
Basic Hardware and Function 221<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
B+8 Initial status STS<br />
F C 8 4 0<br />
222 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Initial operation mode<br />
00 : <strong>Manual</strong> mode<br />
01 : Auto mode<br />
10 : Cascade mode<br />
11 : (Reserve)<br />
Direct / reverse selection<br />
0 : Direct<br />
1 : Reverse<br />
B+9 MV upper limit MH (-25.00 to 125.00 %) Data range: -2500 to 12500<br />
B+10 MV lower limit ML (-25.00 to 125.00 %) Data range: -2500 to 12500<br />
B+11 MV differential limit DMV (0.00 to 100.00 %/∆t) Data range: 0 to 10000<br />
B+12 Control interval setting n (1 to 32767 times) Data range: 1 to 32767<br />
Executes PID every n scan. Therefore, control interval ∆t = n × constant scan interval<br />
(It is treated as n = 1 when n ≤ 0)<br />
C Manipulation value MV (-25.00 to 125.00 %) Data range: -2500 to 12500<br />
C+1<br />
: Internal work area<br />
C+9<br />
Operation<br />
1. When the instruction input is OFF:<br />
Initializes the PID3 instruction.<br />
Operation mode is set as specified by B+8. A+5 bit 0, 1 ← B+8 bit 0, 1<br />
Auto mode SV is set as specified by B+4. ASV ← ISV<br />
<strong>Manual</strong> mode MV is set as current MV. MMV ← MV<br />
Internal calculation data is initialized.<br />
MV remains unchanged.<br />
2. When the instruction input is ON:<br />
Executes PID calculation every n scan which is specified by B+12. The following operation modes are<br />
available according to the setting of A+5.<br />
6F3B0253<br />
• Auto mode<br />
This is a normal PID control mode with ASV as set value.<br />
Set value differential limit DSV, manipulation value upper/lower limit MH/ML and differential limit DMV<br />
are effective.<br />
Bump-less changing from auto mode to manual mode is available. (<strong>Manual</strong> mode manipulation value<br />
MMV is over-written by current MV automatically. MMV ← MV)<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
7. Instructions<br />
• <strong>Manual</strong> mode<br />
In this mode, the manipulation value MV can be directly controlled by the input value of MMV.<br />
MV differential limit for manual mode DMMV is effective. MH/ML and DMV are not effective.<br />
When mode is changed from manual to auto or cascade, the operation is started from the current MV.<br />
• Cascade mode<br />
This is a mode for PID cascade connection. PID is executed with CSV as set value.<br />
Different from the auto mode, set value differential limit is not effective. Manipulation value upper/lower<br />
limit MH/ML and differential limit DMV are effective.<br />
Bump-less changing from cascade mode to manual mode is available. (<strong>Manual</strong> mode manipulation<br />
value MMV is over-written by current MV automatically. MMV ← MV)<br />
And, bump-less changing from cascade mode to auto mode is available. (Auto mode set value ASV is<br />
over-written by current CSV automatically. ASV ← CSV)<br />
• MV tracking<br />
This function is available in auto and cascade modes. When the tracking designation ( A+5 bit 2) is ON,<br />
tracking input TMV is directly output as MV.<br />
Manipulation value upper/lower limit MH/ML is effective, but differential limit DMV is not effective.<br />
When the tracking designation is changed to OFF, the operation is started from the current MV.<br />
Note<br />
• PID3 instruction is only usable on the main-program.<br />
• PID3 instruction must be used under the constant scan mode. The constant scan interval can be selected<br />
in the range of 10 to 200 ms, 10 ms increments.<br />
• The data handled by the PID3 instruction are % units. Therefore, process input value PVC, manipulation<br />
value MV, etc., should be converted to % units (scaling), before and/or after the PID3 instruction. For this<br />
purpose, the function generator instruction (FUN165 FG) is convenient.<br />
Basic Hardware and Function 223<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 160 UL Upper limit<br />
Expression<br />
Input −[ A UL B → C ]− Output<br />
Function<br />
When the input is ON, the following operation is executed. (Upper limit for A by B)<br />
If A ≤ B, then C = A.<br />
If A > B, then C = B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No operation OFF<br />
ON Execution: not limited (A ≤ B) OFF<br />
Execution: limited (A > B) ON<br />
224 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √ √ √<br />
B Upper limit √ √ √ √ √ √ √ √ √ √ √ √<br />
C Destination √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R030 is ON, the upper limit operation is executed for the data of RW018 by the data of<br />
D1200, and the result is stored in RW021.<br />
C<br />
(RW021) Upper limit B (D1200)<br />
A (RW018)<br />
When RW018 is 3000 and D1200 is 4000, 3000 is stored in RW021 and R0040 is OFF.<br />
When RW018 is 4500 and D1200 is 4000, the limit value 4000 is stored in RW021 and R0040<br />
is ON.<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 161 LL Lower limit<br />
Expression<br />
Input −[ A LL B → C ]− Output<br />
Function<br />
When the input is ON, the following operation is executed. (Lower limit for A by B)<br />
If A ≥ B, then C = A.<br />
If A < B, then C = B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No operation OFF<br />
ON Execution: not limited (A ≥ B) OFF<br />
Execution: limited (A < B) ON<br />
6F3B0253<br />
7. Instructions<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Operation data √ √ √ √ √ √ √ √ √ √ √ √<br />
B Lower limit √ √ √ √ √ √ √ √ √ √ √ √<br />
C Destination √ √ √ √ √ √ √ √ √ √<br />
Example<br />
When R031 is ON, the lower limit operation is executed for the data of RW019 by the data of<br />
D1220, and the result is stored in RW022.<br />
Lower limit B (D1220)<br />
C<br />
(RW022)<br />
A (RW019)<br />
When RW019 is -1000 and D1220 is -1800, -1000 is stored in RW022 and R0041 is OFF.<br />
When RW019 is 800 and D1220 is 1200, the limit value 1200 is stored in RW022 and R0041<br />
is ON.<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
Basic Hardware and Function 225<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 162 MAX Maximum value<br />
Expression<br />
Input −[ A MAX (n) B ]− Output<br />
226 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction searches for the maximum value from the table of size n<br />
words starting with A, and stores the maximum value in B and the pointer indicating the position of<br />
the maximum value in B+1. The allowable range of the table size n is 1 to 64.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Start of table √ √ √ √ √ √ √<br />
n Table size 1 - 64<br />
B Result √ √ √ √ √ √ √ √ √<br />
Example<br />
When R010 is ON, the maximum value is found from the register table D0200 to D0209 (10<br />
words), and the maximum value is stored in D0500 and the pointer is stored in D0501.<br />
Pointer<br />
D0200 100 0<br />
D0201 10000 1<br />
D0202 -1000 2<br />
D0203 10 3<br />
D0204 0 4<br />
D0205 200 5<br />
D0206 -300 6<br />
D0207 20000 7 D0500 20000 (Maximum value)<br />
D0208 -30 8 D0501 7 (Pointer)<br />
D0209 20 9<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
• If there are two or more maximum value in the table, the lowest pointer is stored.<br />
• If Index register K is used as operand B, the pointer data is discarded.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 163 MIN Minimum value<br />
Expression<br />
Input −[ A MIN (n) B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction searches for the minimum value from the table of size n<br />
words starting with A, and stores the minimum value in B and the pointer indicating the position of<br />
the minimum value in B+1. The allowable range of the table size n is 1 to 64.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Start of table √ √ √ √ √ √ √<br />
n Table size 1 - 64<br />
B Result √ √ √ √ √ √ √ √ √<br />
Example<br />
When R011 is ON, the minimum value is found from the register table D0200 to D0209 (10<br />
words), and the minimum value is stored in D0510 and the pointer is stored in D0511.<br />
Pointer<br />
D0200 100 0<br />
D0201 10000 1<br />
D0202 -1000 2 D0510 -1000 (Minimum value)<br />
D0203 10 3 D0511 2 (Pointer)<br />
D0204 0 4<br />
D0205 200 5<br />
D0206 -300 6<br />
D0207 20000 7<br />
D0208 -30 8<br />
D0209 20 9<br />
Note<br />
• This instruction deals with the data as signed integer (-32768 to 32767).<br />
• If there are two or more minimum value in the table, the lowest pointer is stored.<br />
• If Index register K is used as operand B, the pointer data is discarded.<br />
Basic Hardware and Function 227<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 164 AVE Average value<br />
Expression<br />
Input −[ A AVE (n) B ]− Output<br />
228 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction calculates the average value of the data stored in the n<br />
registers starting with A, and stores the average value in B. The allowable range of the table size n<br />
is 1 to 64.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Start of table √ √ √ √ √ √ √<br />
n Table size 1 - 64<br />
B Result √ √ √ √ √ √ √ √ √<br />
Example<br />
When R012 is ON, the average value of the data stored in the register table D0200 to D0209<br />
(10 words), and the average value is stored in D0520.<br />
D0200 100<br />
D0201 10000<br />
D0202 -1000<br />
D0203 10<br />
D0204 0 D0520 2900 (Average value)<br />
D0205 200<br />
D0206 -300<br />
D0207 20000<br />
D0208 -30<br />
D0209 20<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 165 FG Function generator<br />
Expression<br />
Input −[ A FG (n) B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction finds the function value f(x) for A as x, and stores it in C. The<br />
function f(x) is defined by the parameters stored in 2 × n registers starting with B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Input value x √ √ √ √ √ √ √ √ √ √ √<br />
n Parameter size 1 - 32<br />
B Start of<br />
√ √ √ √ √ √ √<br />
parameters<br />
C Function value<br />
f(x)<br />
Example<br />
√ √ √ √ √ √ √ √ √<br />
When R010 is ON, the FG instruction finds the function value f(x) for x = XW004, and stores<br />
the result in D0100.<br />
The function f(x) is defined by 2 × 4 = 8 parameters stored in D0600 to D0607. In this example,<br />
these parameters are set at the first scan.<br />
Basic Hardware and Function 229<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Parameter table<br />
4 registers for x parameters and subsequent 4 registers for corresponding f(x) parameters<br />
D0600 -2000 x1<br />
D0601 -100 x2<br />
D0602 100 x3<br />
D0603 2000 x4<br />
D0604 -1800 y1<br />
D0605 -300 y2<br />
D0606 300 y3<br />
D0607 1800 y4<br />
The FG instruction interpolators f(x) value for x based on the n parameters of (xi,yi).<br />
For example, if XW04 is 1500 (x = 1500), the result 1405 (f(x) = 1405) is stored in D0100.<br />
230 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
-2000<br />
1405<br />
y = f(x)<br />
-2000<br />
(x1,y1)<br />
y<br />
1800<br />
300<br />
-100<br />
100<br />
-300<br />
-1800<br />
6F3B0253<br />
Note<br />
• The order of the x parameters should be x1 ≤ x2 ≤ ... ≤ xi ≤ ... ≤ xn. In the above example, the<br />
data of D0600 to D0603 should be D0600 ≤ D0601 ≤ D0602 ≤ D0603.<br />
• If x is smaller than x1, y1 is given as f(x). In this example, D0604 data (-1800) is stored in<br />
D0100 if XW04 is smaller than D0600 (-2000).<br />
• If x is greater than xn, yn is given as f(x). In this example, D0607 data (1800) is stored in<br />
D0100 if XW04 is greater than D0603 (2000).<br />
• The valid data range is -32768 to 32767.<br />
y<br />
1800<br />
300<br />
-100<br />
(x3,y3)<br />
100<br />
(x2,y2) -300<br />
2000<br />
1500<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net<br />
-1800<br />
x<br />
(x4,y4)<br />
2000<br />
x
FUN 180 ABS Absolute value<br />
Expression<br />
Input −[ A ABS B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction finds the absolute value of operand A, and stores it in B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √<br />
B Destination √ √ √ √ √ √ √ √ √<br />
Example<br />
When X006 is ON, the absolute value of RW38 is stored in D0121.<br />
For example, if RW38 is -12000, the absolute value 12000 is stored in D0121.<br />
-32767<br />
12000<br />
D0121<br />
32767<br />
-12000<br />
0 32767<br />
RW38<br />
Note<br />
• The data range of A is -32768 to 32767. If the data of A is -32768, 32767 is stored in B.<br />
Basic Hardware and Function 231<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 182 NEG 2’s complement<br />
Expression<br />
Input −[ A NEG B ]− Output<br />
Function<br />
When the input is ON, this instruction finds the 2’s complement value of A, and stores it in B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
232 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √<br />
B Destination √ √ √ √ √ √ √ √ √<br />
Example<br />
When X007 is ON, the 2’s complement value (sign inverted data) of RW39 is stored in D0122.<br />
For example, if RW38 is 4660, the 2’s complement value -4660 is stored in D0122.<br />
2’s complement data is calculated as follows.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW39 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 (4660)<br />
Bit inverse<br />
1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 (-4661)<br />
D0122 1 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 (-4660)<br />
+ 1<br />
Note<br />
• The data range of A is -32768 to 32767. If the data of A is -32768, the same data -32768 is<br />
stored in B.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 183 DNEG Double-word 2’s complement<br />
Expression<br />
Input −[ A+1⋅A DNEG B+1⋅B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction finds the 2’s complement value of double-word data A+1⋅A,<br />
and stores it in B+1⋅B.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √<br />
B Destination √ √ √ √ √ √<br />
Example<br />
When X007 is ON, the 2’s complement value (sign inverted data) of double-word register<br />
RW41⋅RW40 is stored in double-word register D0151⋅D0150.<br />
For example, if RW41⋅RW40 is -1234567890, the 2’s complement value 1234567890 is stored<br />
in D0151⋅D0150.<br />
Note<br />
• The data range of A+1⋅A is -2147483648 to 2147483647. If the data of A+1⋅A is -2147483648,<br />
the same data -2147483648 is stored in B+1⋅B.<br />
Basic Hardware and Function 233<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 185 7SEG 7 segment decode<br />
Expression<br />
Input −[ A 7SEG B ]− Output<br />
234 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction converts the lower 4 bits data of A into the 7 segment code,<br />
and stores it in B. The 7 segment code is normally used for a numeric display LED.<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source √ √ √ √ √ √ √ √ √ √ √<br />
B Destination √ √ √ √ √ √ √ √ √<br />
Example<br />
When X000 is ON, the lower 4 bits data of RW15 is converted into the 7 segment code, and<br />
the result is stored in lower 8 bits of RW10. 0 is stored in upper 8 bits of RW10.<br />
For example, if RW15 is H0009, the corresponding 7 segment code H006F is stored in RW10.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
RW15 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 (H0009)<br />
Upper 12 bits are ignored<br />
RW10 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 (H006F)<br />
0 is stored in upper 8 bits<br />
7 segment decode<br />
The 7 segment code conversion table is shown on the next page.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
7. Instructions<br />
Operand A (lower 4 bits) 7 segment LED Operand B (lower 8 bits) Display<br />
Hex Binary composition B7 B6 B5 B4 B3 B2 B1 B0<br />
0 0000 0 0 1 1 1 1 1 1<br />
1 0001 0 0 0 0 0 1 1 0<br />
2 0010 0 1 0 1 1 0 1 1<br />
3 0011 0 1 0 0 1 1 1 1<br />
4 0100 B0<br />
0 1 1 0 0 1 1 0<br />
5 0101<br />
B5<br />
0 1 1 0 1 1 0 1<br />
B1<br />
6 0110 B6<br />
0 1 1 1 1 1 0 1<br />
7 0111 0 0 1 0 0 1 1 1<br />
8 1000 B4 B2 0 1 1 1 1 1 1 1<br />
9 1001 0 1 1 0 1 1 1 1<br />
A 1010<br />
B3<br />
0 1 1 1 0 1 1 1<br />
B 1011 0 1 1 1 1 1 0 0<br />
C 1100 0 0 1 1 1 0 0 1<br />
D 1101 0 1 0 1 1 1 1 0<br />
E 1110 0 1 1 1 1 0 0 1<br />
F 1111 0 1 1 1 0 0 0 1<br />
Basic Hardware and Function 235<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 186 ASC ASCII conversion<br />
Expression<br />
Input −[ A ASC B ]− Output<br />
236 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction converts the alphanumeric characters into the ASCII codes,<br />
and stores them in the register table starting with B. (16 characters maximum)<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Characters √<br />
B Start of<br />
destination<br />
√ √ √ √ √ √<br />
Example<br />
When R030 is ON, the characters ‘ABCDEFGHIJKLMN’ is converted into the ASCII codes, and<br />
the result is stored in 8 registers starting with lower 8 bits (byte) of D0200 (D0200 to D0207).<br />
High Low<br />
F 8 7 0<br />
D0200 H42 (B) H41 (A)<br />
D0201 H44 (D) H43 (C)<br />
D0202 H46 (F) H45 (E)<br />
D0203 H48 (H) H47 (G)<br />
D0204 H4A (J) H49 (I)<br />
D0205 H4C (L) H4B (K)<br />
D0206 H4E (N) H4D (M)<br />
D0207<br />
Previous data is remained<br />
Note<br />
• Only the number of bytes converted are stored. The rest are not changed. In the above<br />
example, 14 characters are converted into 14 bytes of ASCII code, and these ASCII codes are<br />
stored in 7 registers (D0200 to D0206). The data of D0207 remains unchanged.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 188 BIN Binary conversion<br />
Expression<br />
Input −[ A BIN B ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction converts the 4 digits of BCD data of A into binary, and stores<br />
in B. If any digit of A contains non-BCD code (other than H0 through H9), the conversion is not<br />
executed and the instruction error flag (ERF = S051) is set to ON.<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution ON −<br />
BCD data error OFF Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source (BCD) √ √ √ √ √ √ √ √ √ √ H0000 -<br />
B Destination<br />
(Binary)<br />
Example<br />
√ √ √ √ √ √ √ √ √<br />
H9999<br />
When R017 is ON, the BCD data of RW28 is converted into binary data, and the result is<br />
stored in D0127.<br />
For example, if RW28 is H1234, the binary data 1234 is stored in D0127.<br />
RW28 BCD to Binary D0127<br />
H1234 1234<br />
Note<br />
• If any digit of operand A contains non-BCD data, e.g. H13A6, the conversion is not executed<br />
and the instruction error flag (ERF = S051) is set to ON.<br />
Basic Hardware and Function 237<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
FUN 190 BCD BCD conversion<br />
Expression<br />
Input −[ A BCD B ]− Output<br />
238 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function<br />
When the input is ON, this instruction converts the binary data of A into BCD, and stores in B. If the<br />
data of A is not in the range of 0 to 9999, the conversion is not executed and the instruction error<br />
flag (ERF = S051) is set to ON.<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution ON −<br />
Binary data error OFF Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source<br />
√ √ √ √ √ √ √ √ √ √ 0 - 9999<br />
(Binary)<br />
B Destination<br />
(BCD)<br />
Example<br />
√ √ √ √ √ √ √ √ √<br />
When R019 is ON, the data of D0211 is converted into 4-digit BCD, and the result is stored in<br />
RW22.<br />
For example, if D0211 is 5432, the BCD data H5432 is stored in RW22.<br />
D0211 Binary to BCD RW22<br />
5432 H5432<br />
Note<br />
• If the data of A is smaller than 0 or greater than 9999, the conversion is not executed and the<br />
instruction error flag (ERF = S051) is set to ON.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 235 I/O Direct I/O<br />
Expression<br />
Input −[ I/O (n) A ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, this instruction immediately updates the external input (XW) and output<br />
(YW) registers which are in the range of n registers starting with A.<br />
• For XW register ... reads the data from corresponding input circuit<br />
• For YW register ... writes the data into corresponding output circuit<br />
Execution condition<br />
Input Operation Output<br />
OFF No execution OFF<br />
ON Execution ON<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
n Register size 1 - 32<br />
A Start of<br />
registers<br />
√ √<br />
Example<br />
When R010 is ON, the 4 registers starting with XW00 (XW00 to YW03) are updated<br />
immediately.<br />
XW00 Input<br />
XW01 circuit<br />
YW02 Output<br />
YW03 circuit<br />
Basic Hardware and Function 239<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
240 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Note<br />
• In the <strong>T1</strong>-<strong>16S</strong>, the following register/device range is only effective for this Direct I/O instruction.<br />
Input on basic unit Output on basic unit I/O module<br />
X000 - X007 Y020 - Y027 Not effective<br />
• The Direct I/O instruction can be programmed in the main program and in the interrupt program.<br />
If this instruction is programmed in both, the instruction in the main program should be executed<br />
in interrupt disable state. Refer to EI (FUN 140) and DI (FUN 141) instructions.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
FUN 236 XFER Expanded data transfer<br />
Expression<br />
Input −[ A XFER B → C ]− Output<br />
6F3B0253<br />
7. Instructions<br />
Function<br />
When the input is ON, data block transfer is performed between the source which is indirectly<br />
designated by A and A+1 and the destination which is indirectly designated by C and C+1. The<br />
transfer size (number of words) is designated by B.<br />
The transfer size is 1 to 256 words. (except for writing into EEPROM)<br />
Data transfer between the following objects are available.<br />
• CPU register (RW or D) ↔ EEPROM (D register)<br />
• CPU register (RW or D) ↔ <strong>T1</strong>S RS-485 port (<strong>T1</strong>S only)<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution ON −<br />
When error is occurred (see Note) ON Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Source<br />
parameter<br />
√ √ √ √ √ √ √<br />
B Transfer size √ √ √ √ √ √ √<br />
C Destination<br />
parameter<br />
√ √ √ √ √ √<br />
Parameters<br />
Source parameter Transfer size and status Destination parameter<br />
A Type B Transfer size C Type<br />
A+1 Leading address B+1 Status flag for RS-485 port C+1 Leading address<br />
B+2 (max. 2 words)<br />
Register type Type code Leading address Transfer size<br />
RW register (RAM) H0003 0 to 255 1 to 256<br />
D register (RAM) H0004 0 to 4095 1 to 256<br />
D register (EEPROM) H0020 0 to 2047 1 to 32 (if destination)<br />
1 to 256 (if source)<br />
<strong>T1</strong>S RS-485 port H0030 0 (fixed) 1 to 256<br />
Basic Hardware and Function 241<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
CPU register ↔ built-in EEPROM<br />
In the EEPROM, the D registers are divided into pages as follows.<br />
Example<br />
<strong>T1</strong>-<strong>16S</strong><br />
D0000 Page 1<br />
(32 words)<br />
D0031<br />
D0032 Page 2<br />
(32 words)<br />
D0063<br />
D2016 Page 64<br />
(32 words)<br />
D2047<br />
242 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
• Writing data into the EEPROM is<br />
available within one page at a<br />
time. (max. 32 words)<br />
• For data reading from the<br />
EEPROM, there is no need to<br />
consider the pages.<br />
6F3B0253<br />
When R020 is changed from OFF to ON, 10 words of RAM data (D0700 to D0709) are written<br />
into the EEPROM (D0016 to D0025).<br />
D1000 (H0004) and D1001 (700) indicate the leading register of the source table (D0700 in<br />
RAM). D1002 (10) indicates the transfer size (10 words = 10 registers). D1003 (H0020 = 32)<br />
and D1004 (16) indicate the leading register of the destination table (D0016 in EEPROM).<br />
Note<br />
• The XFER instruction is not executed as error in the following cases. In these cases, the<br />
instruction error flag (ERF = S051) is set to ON. If the ERF is set to ON once, it remains ON until<br />
resetting to OFF by user program.<br />
(1) When the number of words transferred exceeds limit.<br />
(2) When the source/destination table of transfer is out of the valid range.<br />
(3) When the transfer combination is invalid.<br />
• The EEPROM has a life limit for data writing into an address. It is 100,000 times. Pay attention<br />
not to exceed the limit. (EEPROM alarm flag = S007 is not updated by this instruction)<br />
• Once data writing into the EEPROM is executed, EEPROM access (read/write) is prohibited for<br />
the duration of 10 ms. Therefore, minimum 10 ms interval is necessary for data writing.<br />
• The XFER instruction can be programmed in the main program and in the interrupt program.<br />
If this instruction is programmed in both, the instruction in the main program should be executed<br />
in interrupt disable state. Refer to EI (FUN 140) and DI (FUN 141) instructions.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
CPU register ↔ <strong>T1</strong>S RS-485 port<br />
<br />
6F3B0253<br />
7. Instructions<br />
When the instruction input is ON, one set of message (from start character to the trailing code)<br />
which is received by the RS-485 port is read from the receive buffer, and stored in the CPU<br />
registers. The transfer size is fixed to 256 words. The execution status and the message length<br />
(in bytes) are stored in the status flag.<br />
The instruction input must be kept ON until the receiving operation is complete.<br />
Example<br />
Source designation Transfer size Destination designation<br />
D0000 H0030 D0002 00256 (fixed) D0005 H0004<br />
D0001 00000 D0003 Execution status D0006 00100<br />
D0004 Message length<br />
<strong>T1</strong>S RS-485 port D0100 (CPU register)<br />
When R0000 is ON, one set of received message is read and stored in D0100 and after.<br />
Execution status: H0000 ... Normal complete<br />
H0001 ... Communication error (parity error, framing error)<br />
H0002 ... Message length over (more than 512 bytes)<br />
H0003 ... Receive buffer over flow<br />
H0004 ... Receive time-out (from start character to the trailing code)<br />
Baudrate Time-out setting<br />
300, 600, 1200 bps 30 seconds<br />
2400 bps 15 seconds<br />
4800 bps 7 seconds<br />
9600 bps 3 seconds<br />
19200 bps 1.5 seconds<br />
Message length: 0 .............. No receive message<br />
1 to 512 ... Message length in bytes<br />
Note<br />
• The XFER instruction is not executed as error in the following cases. In these cases, the<br />
instruction error flag (ERF = S051) is set to ON. If the ERF is set to ON once, it remains ON until<br />
resetting to OFF by user program.<br />
(1) The leading address for the RS-485 port designation is other than 0.<br />
(2) Transfer size is other than 256.<br />
(3) Mode setting of the RS-485 port is not the free ASCII mode.<br />
(4) This instruction is programmed in the sub-program #1.<br />
Basic Hardware and Function 243<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
<br />
244 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
When the instruction input is ON, one set of message which is stored in the source table (from<br />
start character to the trailing code) is transmitted through the RS-485 port. The execution<br />
status is stored in the status flag.<br />
The instruction input must be kept ON until the transmitting operation is complete.<br />
Example<br />
Source designation Transfer size Destination designation<br />
D0010 H00 H04 D0012 00012 D0015 H00 H30<br />
D0011 00500 D0013 Execution status D0016 00000<br />
D0500 (CPU register) <strong>T1</strong>S RS-485 port<br />
When R0001 is ON, one set of message (ended by the trailing code) stored in the range of<br />
D0500 to D0511 (12 words) is transmitted through the RS-485 port.<br />
Execution status: H0000 ... Normal complete<br />
H0001 ... During transmitting the message<br />
H0002 ... Communication busy<br />
H0003 ... During the reset operation<br />
H0004 ... Send time-out (from start character to the trailing code)<br />
H0005 ... Send message length error (no trailing code in the source table)<br />
Baudrate Time-out setting<br />
300, 600, 1200 bps 30 seconds<br />
2400 bps 15 seconds<br />
4800 bps 7 seconds<br />
9600 bps 3 seconds<br />
19200 bps 1.5 seconds<br />
Note<br />
• The XFER instruction is not executed as error in the following cases. In these cases, the<br />
instruction error flag (ERF = S051) is set to ON. If the ERF is set to ON once, it remains ON until<br />
resetting to OFF by user program.<br />
(1) The leading address for the RS-485 port designation is other than 0.<br />
(2) Transfer size is out of the range of 1 to 256.<br />
(3) Mode setting of the RS-485 port is not the free ASCII mode.<br />
(4) This instruction is programmed in the sub-program #1.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
7. Instructions<br />
FUN 236 XFER Expanded data transfer (Inverter connection mode)<br />
Expression<br />
Input −[ A XFER B → C ]− Output<br />
Function<br />
This function is provided to control <strong>Toshiba</strong> Inverters VF-A7/G7/S9 connected on the RS-485 line.<br />
When the RS-485 port operation mode is set to the Inverter mode (SW56 = 3), the <strong>T1</strong>-<strong>16S</strong> can<br />
perform the following functions for up to 63 Inverters.<br />
(1) Cyclically scans the Inverters and sends/receives the following data to/from each Inverter.<br />
• Send to Inverter: Frequency reference write and Operation command write (Run, Stop, etc.)<br />
• Receive from Inverter: Operating frequency monitor and Output terminal status monitor<br />
(2) Cyclically scans the Inverters and receives the following data from each Inverter.<br />
• Receive from Inverter: Operating frequency monitor and Output terminal status monitor<br />
(3) Sends a specified Read command to a specified Inverter and stores the response data.<br />
(4) Sends a specified Write command with the command data to a specified Inverter.<br />
(5) Sends a specified Write command with the command data to all the connected inverters as<br />
broadcast.<br />
Execution condition<br />
Input Operation Output ERF<br />
OFF No execution OFF −<br />
ON Normal execution ON −<br />
When error is occurred (see Note) ON Set<br />
Operand<br />
Name Device Register Constant Index<br />
X Y R S T. C. XWYWRWSW T C D I J K<br />
A Data table √ √ √ √ √ √ √<br />
B Inverter No. √ √ √ √ √ √ √<br />
C RS-485 port √ √ √ √ √ √<br />
Parameters<br />
Data table designation Parameter and status RS-485 port designation<br />
A Register type code B Inverter number C Fixed to H0030<br />
A+1 Leading address B+1 Operation mode C+1 Fixed to 0<br />
B+2 Execution status<br />
B+3 Communication error code<br />
B+4 Inverter communication<br />
B+5 status map<br />
B+6 (each bit shows each<br />
B+7 Inverter status)<br />
Data table designation (A, A+1):<br />
Register Type code (A) Leading address (A+1)<br />
RW register H0003 0 to 255<br />
D register H0004 0 to 4095<br />
Basic Hardware and Function 245<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Operation mode designation (B+1):<br />
246 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
B+1 Operation mode Description<br />
0 Data exchange mode Cyclically scans the connected Inverters (Control & Monitor)<br />
(Mode 0)<br />
(Inverter command: P+FA01&FA00 and R+FD00&FE07)<br />
1 Monitor mode<br />
Cyclically scans the connected Inverters (Monitor only)<br />
(Mode 1)<br />
(Inverter command: R+FD00&FE07)<br />
2 Read command mode Sends a read command to a specified Inverter<br />
(Mode 2)<br />
(Inverter command: R+ User designation)<br />
3 Write command mode Sends a write command to a specified Inverter<br />
(Mode 3)<br />
(Inverter command: P+ User designation)<br />
4 Broadcast mode Sends a write command to all the connected Inverters as broadcast<br />
(Mode 4)<br />
(Inverter command: P+ User designation)<br />
Inverter number (B):<br />
For the operation mode 0 and 1:<br />
It specifies the maximum Inverter number. For example, if it is 5, the <strong>T1</strong>-<strong>16S</strong> scans from #0<br />
through #5 Inverters and repeats. Setting range is 0 to 63.<br />
For the operation mode 2 and 3:<br />
It specifies the target Inverter number for sending commands. Setting range is 0 to 63.<br />
For the operation mode 4:<br />
This setting is ignored. The broadcast address (HFF) is used as Inverter number.<br />
Execution status (B+2):<br />
B+2<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
Communication error code (B+3):<br />
The communication error code responded from the Inverter is shown here. If 2 or more Inverters are error,<br />
the smallest Inverter number's error is stored. Refer to Inverter's manual for the error code.<br />
B+3 Meaning<br />
0 No error (Normal)<br />
Response time-out (No answer)<br />
Others Inverter error response (Refer to Inverter's manual)<br />
Inverter communication status map (B+4 to B+7):<br />
Shows the scan count.<br />
(0 → 1 → 2 → ... → 32767 → 0 → 1 ... )<br />
Comes 1 when the RS-485 port is busy. (No execution)<br />
This 4-word table shows the communication status map of each Inverter. (1: Normal / 0: Error or No<br />
answer)<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
B+4 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />
B+5 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16<br />
B+6 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32<br />
B+7 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Data exchange mode (Mode 0) ><br />
6F3B0253<br />
7. Instructions<br />
When the instruction input comes ON with the operand B+1 is 0, the Data exchange mode<br />
(mode 0) is selected. In this mode, the <strong>T1</strong>-<strong>16S</strong> sends the following commands to the Inverters<br />
starting from #0 through the Inverter number specified by the operand B, and repeats.<br />
Scan<br />
#0 Frequency reference write (FA01)<br />
#0 Operation command write (FA00)<br />
#1 Frequency reference write (FA01)<br />
#1 Operation command write (FA00)<br />
:<br />
#n Frequency reference write (FA01)<br />
#n Operation command write (FA00)<br />
#0 Operating frequency monitor (FD00)<br />
#0 Output terminal status monitor (FE07)<br />
#1 Operating frequency monitor (FD00)<br />
#1 Output terminal status monitor (FE07)<br />
:<br />
#n Operating frequency monitor (FD00)<br />
#n Output terminal status monitor (FE07)<br />
The maximum Inverter number #n is specified by the operand B.<br />
The scan execution status and the Inverter communication status are stored in the operand<br />
B+2 to B+7.<br />
The command data table is specified by the operand A and A+1.<br />
When the instruction input is reset to OFF, the operation is stopped after receiving the<br />
response from the Inverter currently communicating.<br />
Example<br />
Data table designation Parameter & status RS-485 port<br />
D1000 4 RW200 5 D1010 H0030 (fixed)<br />
D1001 2000 RW201 0 (mode 0) D1011 0 (fixed)<br />
RW202 Execution status<br />
RW203 Comm error code<br />
RW204<br />
RW205 Inverter comms<br />
RW206 status map<br />
RW207<br />
When the data for each operand are set as above, the following operation condition is specified.<br />
• RW200=5 ⇒ The max Inverter number is 5. Therefore <strong>T1</strong>-<strong>16S</strong> scans from #0 through #5 Inverters.<br />
• D1000=4 & D1001=2000 ⇒ D2000 is specified as the data table starting address.<br />
Basic Hardware and Function 247<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Data table:<br />
Register Data contents Signal direction<br />
D2000 #0 Operating frequency ← Read<br />
D2001 #0 Output terminal status ← Read<br />
D2002 #0 Frequency reference → Write<br />
D2003 #0 Operation command → Write<br />
D2004 #1 Operating frequency ← Read<br />
D2005 #1 Output terminal status ← Read<br />
D2006 #1 Frequency reference → Write<br />
D2007 #1 Operation command → Write<br />
D2020 #5 Operating frequency ← Read<br />
D2021 #5 Output terminal status ← Read<br />
D2022 #5 Frequency reference → Write<br />
D2023 #5 Operation command → Write<br />
248 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
• The data format for the operating frequency and the frequency reference registers are 0.01 Hz units.<br />
For example, if it is 60 Hz, the corresponding register data is 6000.<br />
• For the data format of the output terminal status register, refer to the Monitor mode (mode 1).<br />
• The bit assignment of the operation command register is as follows. For details, refer to your<br />
Inverter manual.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
Example operation:<br />
Programmed speed selection<br />
0000 = None<br />
0001 = Speed 1<br />
0010 = Speed 2<br />
:<br />
1111 = Speed 15<br />
PI operation (0 = Normal / 1 = Off)<br />
DC braking (0 = Off / 1 = On)<br />
Jog operation (0 = off / 1 = On)<br />
F/R selection (0 = Forward / 1 = Reverse)<br />
Run/Stop (0 = Stop / 1 = Run)<br />
Free run (0 = Normal / 1 = Free run)<br />
Emergency stop (0 = Normal / 1 = EMS)<br />
Reset command (0 = Normal / 1 = Reset)<br />
Frequency enable (0 = Disable / 1 = Enable)<br />
Command enable (0 = Disable / 1 = Enable)<br />
To operate the #0 Inverter at 30 Hz forward rotation, write the value 3000 in D2002 and HC400 in<br />
D2003. (HC400 = Bits F, E, A are 1, and others are 0)<br />
The current operating frequency and the output terminal status of the #0 Inverter are stored in D2000<br />
and D2001 respectively.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Monitor mode (Mode 1) ><br />
6F3B0253<br />
7. Instructions<br />
When the instruction input comes ON with the operand B+1 is 1, the Monitor mode (mode 1) is<br />
selected.<br />
In this mode, the <strong>T1</strong>-<strong>16S</strong> sends the following Read commands to the Inverters starting from #0<br />
through the Inverter number specified by the operand B, and repeats.<br />
Scan<br />
#0 Operating frequency monitor (FD00)<br />
#0 Output terminal status monitor (FE07)<br />
#1 Operating frequency monitor (FD00)<br />
#1 Output terminal status monitor (FE07)<br />
:<br />
#n Operating frequency monitor (FD00)<br />
#n Output terminal status monitor (FE07)<br />
The maximum Inverter number #n is specified by the operand B.<br />
The scan execution status and the Inverter communication status are stored in the operand<br />
B+2 to B+7.<br />
The monitor data table is specified by the operand A and A+1.<br />
When the instruction input is reset to OFF, the operation is stopped after receiving the<br />
response from the Inverter currently communicating.<br />
Example<br />
Data table designation Parameter & status RS-485 port<br />
D1000 3 RW200 19 D1010 H0030 (fixed)<br />
D1001 100 RW201 1 (mode 1) D1011 0 (fixed)<br />
RW202 Execution status<br />
RW203 Comm error code<br />
RW204<br />
RW205 Inverter comms<br />
RW206 status map<br />
RW207<br />
When the data for each operand are set as above, the following operation condition is specified.<br />
• RW200=19 ⇒ The max Inverter number is 19. Therefore <strong>T1</strong>-<strong>16S</strong> scans from #0 through #19 Inverters.<br />
• D1000=3 & D1001=100 ⇒ RW100 is specified as the data table starting address.<br />
Basic Hardware and Function 249<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
Data table:<br />
Register Data contents Signal direction<br />
RW100 #0 Operating frequency ← Read<br />
RW101 #0 Output terminal status ← Read<br />
RW102 No use<br />
RW103 No use<br />
RW104 #1 Operating frequency ← Read<br />
RW105 #1 Output terminal status ← Read<br />
RW106 No use<br />
RW107 No use<br />
RW176 #19 Operating frequency ← Read<br />
RW177 #19 Output terminal status ← Read<br />
RW178 No use<br />
RW179 No use<br />
250 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
• The data format for the operating frequency register is 0.01 Hz units. For example, if it is 60 Hz, the<br />
corresponding register data is 6000.<br />
• The bit assignment of the output terminal status register is as follows. For details, refer to your<br />
Inverter manual.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
Example operation:<br />
OU<strong>T1</strong> (f130)<br />
OUT2 (f131)<br />
FL (f132)<br />
R1 (f133)<br />
R2 (f134)<br />
OUT3 (f135)<br />
OUT4 (f136)<br />
ALM0<br />
ALM1<br />
ALM2<br />
ALM3<br />
The current operating frequency and the output terminal status of the #0 Inverter are stored in RW100<br />
and RW101 respectively.<br />
If the #0 Inverter is operating at 55 Hz, the data 5500 is stored in RW100. If the OUT2 terminal of the<br />
#0 Inverter is ON, the bit 1 of RW101 (R1011) becomes 1.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Read command mode (Mode 2) ><br />
6F3B0253<br />
7. Instructions<br />
When the instruction input comes ON with the operand B+1 is 2, the Read command mode<br />
(mode 2) is selected. In this mode, the <strong>T1</strong>-<strong>16S</strong> sends the user specified Read command to the<br />
Inverter specified by the operand B, and repeats.<br />
Repeat<br />
Sends the specified command to #n Inverter<br />
Receives the response and stores the data into the register<br />
The target Inverter number #n is specified by the operand B.<br />
The scan execution status and the Inverter communication status are stored in the operand<br />
B+2 to B+7.<br />
The command setting register and the response data storing register is indirectly specified by<br />
the operand A and A+1.<br />
When the instruction input is reset to OFF, the operation is stopped after receiving the<br />
response from the Inverter.<br />
Example<br />
Data table designation Parameter & status RS-485 port<br />
D1000 4 RW200 3 D1010 H0030 (fixed)<br />
D1001 3000 RW201 2 (mode 2) D1011 0 (fixed)<br />
RW202 Execution status<br />
RW203 Comm error code<br />
RW204<br />
RW205 Inverter comms<br />
RW206 status map<br />
RW207<br />
When the data for each operand are set as above, the following operation condition is specified.<br />
• RW200=3 ⇒ The target Inverter number is 3. Therefore <strong>T1</strong>-<strong>16S</strong> communicates with #3 Inverter.<br />
• D1000=4 & D1001=3000 ⇒ D3000 is specified as the command setting register and D3001 is specified<br />
as the response data storing register.<br />
Data table:<br />
Register Data contents Signal direction<br />
D3000 Command code<br />
D3001 Response data ← Read<br />
Example operation:<br />
For example, to read the output current from the #3 Inverter, set the command code HFE03 into<br />
D3000. Then the response data is stored in D3001. If the response data is 1915, it means 19.15 %.<br />
For the command code and the data format of the response, refer to your Inverter manual.<br />
Basic Hardware and Function 251<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
< Write command mode (Mode 3) ><br />
252 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
When the instruction input comes ON with the operand B+1 is 3, the Write command mode<br />
(mode 3) is selected. In this mode, the <strong>T1</strong>-<strong>16S</strong> sends the user specified Write command to the<br />
Inverter specified by the operand B, and repeats.<br />
Repeat<br />
Sends the specified command with command data to #n Inverter<br />
Checks the acknowledge<br />
The target Inverter number #n is specified by the operand B.<br />
The scan execution status and the Inverter communication status are stored in the operand<br />
B+2 to B+7.<br />
The command code and the command data setting registers are indirectly specified by the<br />
operand A and A+1.<br />
When the instruction input is reset to OFF, the operation is stopped after receiving the<br />
response from the Inverter.<br />
Example<br />
Data table designation Parameter & status RS-485 port<br />
D1000 4 RW200 5 D1010 H0030 (fixed)<br />
D1001 3010 RW201 3 (mode 3) D1011 0 (fixed)<br />
RW202 Execution status<br />
RW203 Comm error code<br />
RW204<br />
RW205 Inverter comms<br />
RW206 status map<br />
RW207<br />
When the data for each operand are set as above, the following operation condition is specified.<br />
• RW200=5 ⇒ The target Inverter number is 5. Therefore <strong>T1</strong>-<strong>16S</strong> communicates with #5 Inverter.<br />
• D1000=4 & D1001=3010 ⇒ D3010 is specified as the command code setting register and D3011 is<br />
specified as the command data setting register.<br />
Data table:<br />
Register Data contents Signal direction<br />
D3010 Command code<br />
D3011 Command data → Write<br />
Example operation:<br />
For example, to write the acceleration time parameter (10 seconds) to the #5 Inverter, set the<br />
command code H0009 into D3010 and the value 100 into D3011.<br />
For the command code and the command data format, refer to your Inverter manual.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Broadcast mode (Mode 4) ><br />
6F3B0253<br />
7. Instructions<br />
When the instruction input comes ON with the operand B+1 is 4, the Broadcast mode (mode 4)<br />
is selected. In this mode, the <strong>T1</strong>-<strong>16S</strong> sends the user specified Write command to all the<br />
Inverters as broadcast.<br />
This mode is useful to send Run/Stop command to all the Inverter at the same time.<br />
Repeat<br />
Sends the specified command with command data to all Inverters (broadcast)<br />
Checks the acknowledge from #0 Inverter<br />
The Inverter number specified by the operand B is ignored.<br />
The scan execution status and the Inverter communication status are stored in the operand<br />
B+2 to B+7. (only #0 Inverter responds)<br />
The command code and the command data setting registers are indirectly specified by the<br />
operand A and A+1.<br />
When the instruction input is reset to OFF, the operation is stopped after receiving the<br />
response from the Inverter.<br />
Example<br />
Data table designation Parameter & status RS-485 port<br />
D1000 4 RW200 (any 0 to 63) D1010 H0030 (fixed)<br />
D1001 3020 RW201 4 (mode 4) D1011 0 (fixed)<br />
RW202 Execution status<br />
RW203 Comm error code<br />
RW204<br />
RW205 Inverter comms<br />
RW206 status map<br />
RW207<br />
When the data for each operand are set as above, the following operation condition is specified.<br />
• D1000=4 & D1001=3020 ⇒ D3020 is specified as the command code setting register and D3021 is<br />
specified as the command data setting register.<br />
Data table:<br />
Register Data contents Signal direction<br />
D3020 Command code<br />
D3021 Command data → Write<br />
Example operation:<br />
For example, to send the Run forward command to all the Inverters, set the command code HFA00<br />
into D3020 and the value HC400 into D3021.<br />
For the command code and the command data format, refer to your Inverter manual.<br />
Basic Hardware and Function 253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
7. Instructions<br />
< Note ><br />
254 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
(1) The XFER instruction is not executed as error in the following cases. In these cases, the instruction error<br />
flag (ERF = S051) is set to ON. If the ERF is set to ON once, it remains ON until resetting to OFF by<br />
user program.<br />
• The RS-485 port designation is other than H0030 and 0.<br />
• The Inverter number designation is other than 0 to 63.<br />
• Operation mode setting for RS-485 port is other than the Inverter connection mode.<br />
(2) This XFER instruction must be programmed in the Main program.<br />
(3) During the instruction input is ON, the data contents in the data table specified by A can be changed.<br />
However, parameters specified by B cannot be changed.<br />
(4) In the Data exchange mode (mode 0) and the Monitor mode (mode 1), the <strong>T1</strong>-<strong>16S</strong> scans from #0 to the<br />
specified number. Therefore the Inverter number should be consecutive starting with 0.<br />
If an Inverter is disconnected from the network, the <strong>T1</strong>-<strong>16S</strong> checks its existence periodically. When you<br />
turn off power to an Inverter for maintenance purpose and turn on again, it is recommended to reset the<br />
instruction input to re-configure the network.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Section 8<br />
Special I/O Functions<br />
8.1 Special I/O function overview, 256<br />
8.2 Variable input filter constant, 260<br />
8.3 High speed counter, 261<br />
8.4 Interrupt input function, 268<br />
8.5 Analog setting function, 270<br />
8.6 Pulse output function, 271<br />
8.7 PWM output function, 273<br />
6F3B0253<br />
Basic Hardware and Function 255<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
8.1 Special I/O function overview<br />
The <strong>T1</strong>-<strong>16S</strong> supports the special I/O functions as listed below.<br />
256 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Function name Function summary Remarks<br />
Variable input filter<br />
constant<br />
High<br />
speed<br />
counter<br />
Single phase<br />
up-counter<br />
Single phase<br />
speedcounter<br />
Quadrature<br />
bi-pulse<br />
counter<br />
Input filter constant (ON/OFF delay time) can be set<br />
by user program. The setting range is 0 to 15ms<br />
(1ms units). Default value is 10ms. This function is<br />
applied for X000 to X007 (8 points as a block).<br />
Counts the number of pulses of single phase pulse<br />
train. 2 channels of pulse input are available. The<br />
countable pulse rate is up to 5KHz for each channel.<br />
Channel 1 … X000 count input, X002 reset input<br />
Channel 2 … X001 count input, X003 reset input<br />
Counts the number of pulses in a specified sampling<br />
time. The sampling time setting is 10 to 1000ms<br />
(10ms units). 2 channels of pulse input are available.<br />
The countable pulse rate is up to 5KHz for each<br />
channel.<br />
Channel 1 … X000 count input<br />
Channel 2 … X001 count input<br />
Counts the 2-phase pulses whose phases are shifted<br />
90° each other. Counts up when phase A precedes,<br />
and counts down when phase B precedes.<br />
The countable pulse rate is up to 5KHz.<br />
Phase A … X000<br />
Phase B … X001<br />
Reset …… X002<br />
Interrupt input function Immediately activates the corresponding I/O interrupt<br />
program when the interrupt input is changed from<br />
OFF to ON (or ON to OFF). 2 points of interrupt input<br />
are available.<br />
X002 … Interrupt 1 (I/O interrupt program #3)<br />
Analog setting<br />
function<br />
X003 … Interrupt 2 (I/O interrupt program #4)<br />
The value of the analog setting adjuster is converted<br />
into digital value (0 to 1000) and stored in the SW<br />
register. 2 adjusters are provided on the <strong>T1</strong>-<strong>16S</strong>.<br />
V0 … SW30<br />
V1 … SW31<br />
Pulse output function Variable frequency pulse train can be output. The<br />
available pulse rate is 50 to 5000Hz (1Hz units).<br />
Y020 … CW or Pulse (PLS)<br />
Y021 … CCW or Direction (DIR)<br />
PWM output function Variable duty cycle pulse train can be output. The<br />
available ON duty setting is 0 to 100% (1% units).<br />
Y020 … PWM output<br />
SW16 setting<br />
is necessary to<br />
use this<br />
function. (Note)<br />
Only one<br />
among these 4<br />
functions can<br />
be selected.<br />
SW16 is used<br />
to select the<br />
function.<br />
(Note)<br />
No function<br />
selection is<br />
required.<br />
Either one<br />
between these<br />
2 functions<br />
can be used.<br />
SW26 is used<br />
to select the<br />
function.(Note)<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Mode setting for the special I/O functions<br />
6F3B0253<br />
8. Special I/O Functions<br />
These functions, except the analog setting function, are selected by setting data into<br />
SW16 and SW26 by user program. These registers work as mode setting registers for<br />
the special I/O functions. The data setting for these registers, i.e. mode setting for the<br />
special I/O functions, is effective only at the first scan.<br />
Note) In the explanation below, HSC and INT mean the high speed counter and the<br />
interrupt input functions respectively.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
SW16 0 0 0 0 0<br />
Bit 0 < HSC and INT master flag ><br />
0: No use<br />
1: Use<br />
Bit 1 < HSC / INT selection ><br />
0: INT<br />
1: HSC<br />
Bits 2 and 3 < INT No.1 mode ><br />
00: No use (Reserve)<br />
01: Rising (OFF to ON)<br />
10: Falling (ON to OFF)<br />
11: No use (Reserve)<br />
Bits 6 and 7 < INT No.2 mode ><br />
00: No use (Reserve)<br />
01: Rising (OFF to ON)<br />
10: Falling (ON to OFF)<br />
11: No use (Reserve)<br />
Bits A and B < HSC mode ><br />
00: Single phase up-counter<br />
01: Single phase speed-counter<br />
10: Quadrature bi-pulse counter<br />
11: No use (Reserve)<br />
Bits C and D < Enable flag for HSC / INT ><br />
00: CH2 - disable, CH1 - disable<br />
01: CH2 - disable, CH1 - enable<br />
10: CH2 - enable, CH1 - disable<br />
11: CH2 - enable, CH1 - enable<br />
Bit F < Variable input filter constant ><br />
0: No use (fixed to 10ms)<br />
1: Use<br />
Basic Hardware and Function 257<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
Note) In the explanation below, P-OUT means the pulse output function.<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
SW26 0 0 0 0 0 0 0 0 0 0<br />
258 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Bit 0 < P-OUT and PWM master flag ><br />
0: No use<br />
1: Use<br />
Bit 1 < P-OUT / PWM selection ><br />
0: PWM<br />
1: P-OUT<br />
Bit 2 < PLS mode ><br />
0: CW/CCW<br />
1: Pulse/Direction (PLS/DIR)<br />
P-OUT / PWM operation error flag<br />
(These are not user setting items)<br />
Bit D < PWM pulse width error ><br />
0: Normal<br />
1: Error<br />
Bit E < PWM ON duty setting error ><br />
0: Normal<br />
1: Error<br />
Bit F < Frequency setting error ><br />
0: Normal<br />
1: Error<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
8. Special I/O Functions<br />
The table below summarizes the mode setting data of each function. In the table,<br />
‘−’ means do not care.<br />
Variable input filter constant<br />
SW16<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
Use 1 0 − − − − 0 0 − − 0 0 − − − −<br />
High speed counter<br />
SW16<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
Single phase Channel 1 only − 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1<br />
up-counter Channel 2 only − 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1<br />
Both channels − 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1<br />
Single phase Channel 1 only − 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1<br />
speed-counter Channel 2 only − 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1<br />
Both channels − 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1<br />
Quadrature bi-pulse counter − 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1<br />
Interrupt input function<br />
SW16<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
Interrupt 1 only Rising (OFF to ON) − 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1<br />
Falling (ON to OFF) − 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1<br />
Interrupt 2 only Rising (OFF to ON) − 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1<br />
Falling (ON to OFF) − 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1<br />
Both interrupts No.1 = Rising, No.2 = Rising − 0 1 1 0 0 0 0 0 1 0 0 0 1 0 1<br />
1 and 2 No.1 = Rising, No.2 = Falling − 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1<br />
No.1 = Falling, No.2 = Rising − 0 1 1 0 0 0 0 0 1 0 0 1 0 0 1<br />
No.1 = Falling, No.2 =<br />
Falling<br />
− 0 1 1 0 0 0 0 1 0 0 0 1 0 0 1<br />
Pulse output function<br />
SW26<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
CW/CCW method − − − 0 0 0 0 0 0 0 0 0 0 0 1 1<br />
Pulse/Direction (PLS/DIR) method − − − 0 0 0 0 0 0 0 0 0 0 1 1 1<br />
PWM output function<br />
SW26<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
Use − − − 0 0 0 0 0 0 0 0 0 0 0 0 1<br />
For example, the following programs can be used to select the quadrature bi-pulse<br />
counter.<br />
(H0803)<br />
or<br />
Basic Hardware and Function 259<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
8.2 Variable input filter constant<br />
Function<br />
260 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
The input filter constant (ON/OFF delay time) of the leading 8 points X000 to X007<br />
can be specified by user program within the range of 0 to 15ms. The default is 10ms.<br />
The setting value is recognized at the first scan. Therefore, it cannot be changed after<br />
the second scan.<br />
Related registers<br />
SW16 Function selection. Refer to section 8.1.<br />
SW17 Input filter constant value<br />
Operation<br />
Input signal<br />
Internal logic<br />
Scan cycle<br />
X device<br />
Sample program<br />
F E D C B A 9 8 7 6 5 4 3 2 1 0<br />
No use (set to 0)<br />
Setting value<br />
0 to 15<br />
T T<br />
T T<br />
T: Input filter constant (0 to 15ms)<br />
This program sets the input filter constant to 3ms.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8.3 High speed counter<br />
8.3.1 Single phase up-counter<br />
Function<br />
6F3B0253<br />
8. Special I/O Functions<br />
When the count input is changed from OFF to ON, the count value is increased by 1.<br />
When the count value reaches the set value, the count value is reset to 0, and I/O<br />
interrupt program is activated (if the interrupt enable flag is ON). The count value is<br />
reset to 0 when the reset input comes ON.<br />
This counter operation is enabled while the soft-gate is ON. The count value is reset to<br />
0 when the soft-gate is changed from ON to OFF.<br />
The set value is set internally at the timing of the soft-gate changing from OFF to ON.<br />
When the soft-gate is OFF, the count value can be changed by writing the data into<br />
the set value register and setting the count preset flag to ON.<br />
The count value range is H0000 to HFFFF (16-bit data).<br />
Hardware condition<br />
Count input (X000 and X001)<br />
ON/OFF pulse width: 100µs or more (max. 5KHz)<br />
Reset input (X002 and X003)<br />
ON/OFF duration: 2ms or more<br />
Related registers<br />
SW16: Function selection. Refer to section 8.1.<br />
Function Register/device Remarks<br />
Channel 1 Channel 2<br />
Count input X000 X001 (Note)<br />
Reset input X002 X003<br />
Set value SW18 SW20 Data range: H0000 to HFFFF<br />
Count value SW22 SW23<br />
Soft-gate S240 S248 Operation is enabled when ON<br />
Interrupt enable S241 S249 Interrupt is enabled when ON<br />
Count preset S243 S24B Used to preset the counter value<br />
Note) When both channels are used, X000 to X003 cannot be used as normal<br />
input devices. However, if either one channel is used, these inputs for unused<br />
channel can be used as normal input devices.<br />
Interrupt assignment<br />
Channel 1 … I/O interrupt program #1<br />
Channel 2 … I/O interrupt program #2<br />
Basic Hardware and Function 261<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
Operation<br />
Count input<br />
Reset input<br />
Soft-gate<br />
Count value<br />
Interrupt<br />
Sample program<br />
(H1003)<br />
262 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Set value<br />
6F3B0253<br />
In this example, 4099 (H1003) is set in SW16. As a result, the single phase upcounter<br />
(channel 1 only) is selected.<br />
When R010 comes ON, the data 2000 is written into the set value register (SW18).<br />
While R010 is ON, the soft-gate (S240) and the interrupt enable flag (S241) are set to<br />
ON to enable the counter operation.<br />
The counter works as a ring counter with the set value 2000. The count value is stored<br />
in SW22.<br />
When R010 is OFF and R011 comes ON, the count value is preset to the data of<br />
D0100.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8.3.2 Single phase speed-counter<br />
Function<br />
6F3B0253<br />
8. Special I/O Functions<br />
This function counts the number of changes of the count input from OFF to ON during<br />
the every specified sampling time. The count value in a sampling time is stored in the<br />
hold value register.<br />
This counter operation is enabled while the soft-gate is ON. When the soft-gate is<br />
OFF, the hold value is cleared to 0.<br />
The setting range of the sampling time is 10 to 1000ms (10ms units).<br />
The count value range is H0000 to HFFFF (16-bit).<br />
Hardware condition<br />
Count input (X000 and X001)<br />
ON/OFF pulse width: 100µs or more (max. 5KHz)<br />
Related registers<br />
SW16: Function selection. Refer to section 8.1.<br />
Function Register/device Remarks<br />
Channel 1 Channel 2<br />
Count input X000 X001 (Note 2)<br />
Sampling time SW18 SW20 Data range: 1 to 100 (Note 1)<br />
Hold value SW22 SW23 Data range: H0000 to HFFFF<br />
Soft-gate S240 S248 Operation is enabled when ON<br />
Note 1) The setting data range of the sampling time is 1 to 100. (10ms multiplier)<br />
Note 2) When both channels are used, X000 and X001 cannot be used as normal<br />
input devices. However, if either one channel is used, the input for unused<br />
channel can be used as normal input devices.<br />
Interrupt assignment<br />
No interrupt function.<br />
Basic Hardware and Function 263<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
Operation<br />
Count input<br />
Sampling time<br />
Soft-gate<br />
Internal<br />
count value<br />
Hold value<br />
Sample program<br />
(H1403)<br />
264 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
∆T<br />
a<br />
∆T<br />
b<br />
a<br />
∆T<br />
6F3B0253<br />
In this example, 5123 (H1403) is set in SW16. As a result, the single phase speedcounter<br />
(channel 1 only) is selected.<br />
The sampling time is set as 100ms, because 10 is written in SW18.<br />
While R010 is ON, the soft-gate (S240) is set to ON, and the speed-counter works.<br />
The hold value is stored in SW22.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net<br />
c<br />
b<br />
∆T<br />
d<br />
c<br />
∆T<br />
e<br />
d<br />
e<br />
∆T
8.3.3 Quadrature bi-pulse counter<br />
Function<br />
6F3B0253<br />
8. Special I/O Functions<br />
This function counts up or down the quadrature bi-pulse (2-phase pulses whose<br />
phases are shifted 90° each other). Counts up when phase A precedes, and counts<br />
down when phase B precedes. Both rising and falling edges of each phase are<br />
counted. Consequently, 4 times count value against the pulse frequency is obtained.<br />
Phase A<br />
Phase B<br />
Up count Down count<br />
When the count value reaches the comparison value 1 (or 2), the I/O interrupt<br />
program #1 (or #2) is activated (if the interrupt enable flag for each is ON).<br />
This counter operation is enabled while the soft-gate is ON. The count value is reset to<br />
0 when the soft-gate is changed from ON to OFF. The count value is also reset to 0<br />
when the reset input comes ON.<br />
When the soft-gate is OFF, the count value can be changed by writing the data into<br />
the comparison value 1 (or 2) register and setting the count preset flag 1 (or 2) to ON.<br />
The comparison value 1 and 2 can be changed even when the soft-gate is ON.<br />
The count value range is -2147483648 to 2147483647 (32-bit data).<br />
Hardware condition<br />
Phase A and phase B (X000 and X001)<br />
ON/OFF pulse width: 100µs or more (max. 5KHz)<br />
Reset input (X002)<br />
ON/OFF duration: 2ms or more<br />
Related registers<br />
SW16: Function selection. Refer to section 8.1.<br />
Function Register/device Remarks<br />
Phase A X000<br />
Phase B X001<br />
Reset input X002<br />
Comparison value 1 SW19⋅SW18 Data range: -2147483648 to 2147483647<br />
Comparison value 2 SW21⋅SW20<br />
Count value SW23⋅SW22<br />
Soft-gate S240 Operation is enabled when ON<br />
Interrupt enable 1 S241 Interrupt 1 is enabled when ON<br />
Count preset 1 S243 Used to preset the count value<br />
Interrupt enable 2 S249 Interrupt 2 is enabled when ON<br />
Count preset 2 S24B Used to preset the count value<br />
Basic Hardware and Function 265<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
Interrupt assignment<br />
Comparison value 1 … I/O interrupt program #1<br />
Comparison value 2 … I/O interrupt program #2<br />
Operation<br />
Up count<br />
Down count<br />
Reset input<br />
Soft-gate<br />
Comparison<br />
value 1<br />
Count value<br />
Interrupt<br />
Comparison<br />
value 2<br />
266 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
2147483647<br />
1<br />
1<br />
1<br />
-2147483648<br />
2<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Sample program<br />
(H0803)<br />
6F3B0253<br />
8. Special I/O Functions<br />
In this example, 2051 (H0803) is set in SW16. As a result, the quadrature bi-pulse<br />
counter is selected.<br />
When R010 comes ON, the data 150000 is set into the comparison value 1 register<br />
(SW19⋅SW18), and 200000 is set into the comparison value 2 register (SW21⋅SW20).<br />
While R010 is ON, the soft-gate (S240), the interrupt enable flag 1 (S241) and the<br />
interrupt enable flag 2 (S249) are set to ON to enable the counter operation.<br />
The count value is stored in SW23⋅SW22.<br />
When R010 is OFF and R011 comes ON, the count value is preset to the data of<br />
D0101⋅D0100.<br />
Basic Hardware and Function 267<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
8.4 Interrupt input function<br />
Function<br />
When the signal state of the interrupt input is changed from OFF to ON (or ON to<br />
OFF), the corresponding I/O interrupt program is activated immediately.<br />
Up to 2 interrupt inputs can be used. The interrupt generation condition can be<br />
selected either rising edge (OFF to ON) or falling edge (ON to OFF) for each input.<br />
The I/O interrupt program #3 is corresponding to the interrupt input 1, and the I/O<br />
interrupt program #4 is corresponding to the interrupt input 2.<br />
Hardware condition<br />
Interrupt input (X002 and X003)<br />
ON/OFF pulse width: 100µs or more<br />
Related registers<br />
SW16: Function selection. Refer to section 8.1.<br />
Interrupt input 1 X002<br />
Interrupt input 2 X003<br />
Interrupt assignment<br />
Interrupt input 1 … I/O interrupt program #3<br />
Interrupt input 2 … I/O interrupt program #4<br />
Operation<br />
Interrupt input 1<br />
Interrupt input 2<br />
Interrupt<br />
268 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
3<br />
4 3 4<br />
The above operation example is the case of rising edge setting for both inputs.<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Sample program<br />
Main program<br />
(H3045)<br />
I/O interrupt program #3<br />
I/O interrupt program #4<br />
Interrupt program A<br />
Interrupt program B<br />
6F3B0253<br />
8. Special I/O Functions<br />
In this example, 12357 (H3045) is set in SW16. As a result, the interrupt input function<br />
(2 points, rising for both) is selected.<br />
When X002 is changed from OFF to ON, the interrupt program A is executed. When<br />
X003 is changed from OFF to ON, the interrupt program B is executed.<br />
NOTE<br />
Even if the Direct I/O instruction is used in the interrupt program, the<br />
corresponding input state (X002 or X003) cannot be confirmed. Because<br />
the interrupt is generated before internal updating of the input states.<br />
Basic Hardware and Function 269<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
8.5 Analog setting function<br />
Function<br />
The value of the analog setting adjuster is converted into a digital value (0 to 1000)<br />
and stored in the SW register. 2 adjusters are provided. (V0 and V1)<br />
The SW register data can be used as timer presets or any parameters for function<br />
instructions.<br />
Related registers<br />
Function Register Remarks<br />
Adjuster V0 SW30 Data range: 0 to 1000<br />
Adjuster V1 SW31<br />
Operation<br />
Decrease Increase Decrease Increase<br />
Sample program<br />
270 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
V0 V1<br />
SW30 (0 to 1000) SW31 (0 to 1000)<br />
The above example is a simple flicker circuit of Y020. In this example, the ON/OFF<br />
interval of Y020 can be controlled by the adjuster V0.<br />
6F3B0253<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8.6 Pulse output function<br />
Function<br />
6F3B0253<br />
8. Special I/O Functions<br />
This function is used to output a variable frequency pulse train. The controllable pulse<br />
frequency is 50 to 5000 Hz (1 Hz units).<br />
The output mode can be selected either CW/CCW or Pulse/Direction (PLS/DIR).<br />
In the CW/CCW mode, CW pulse is output when the frequency setting is positive (50<br />
to 5000), and CCW pulse is output when it is negative (-50 to -5000).<br />
In the PLS/DIR mode, DIR is OFF when the frequency setting is positive (50 to 5000),<br />
and DIR is ON when it is negative (-50 to -5000).<br />
< CW/CCW mode ><br />
< PLS/DIR mode ><br />
CW<br />
CCW<br />
PLS<br />
DIR<br />
In the both modes, pulse output is enabled when the pulse enable flag is ON. While<br />
the pulse enable flag is ON, the pulse frequency can be changed by changing the<br />
frequency setting value. However, the pulse direction (the sign of the frequency<br />
setting) cannot be changed when the pulse enable flag is ON.<br />
This function can be used to control the speed of a stepping motor, etc.<br />
Related registers<br />
SW26: Function selection. Refer to section 8.1.<br />
Function Register/ Remarks<br />
CW/CCW PLS/DIR device<br />
CW pulse PLS Y020<br />
CCW pulse DIR Y021<br />
Pulse enable flag S270 Output is enabled when ON<br />
Frequency setting register SW28 Data range: -5000 to -50, 50 to 5000<br />
Frequency setting error flag S26F ON at error (reset OFF automatically)<br />
Note) The allowable value range of the frequency setting (SW28) is -5000 to -50 and<br />
50 to 5000. If the value is out of this range or the sign is changed while the<br />
pulse enable flag (S270) is ON, the frequency setting error flag (S26F) comes<br />
ON. (Pulse output operation is continued with previous frequency setting)<br />
Basic Hardware and Function 271<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
Operation<br />
Pulse enable<br />
Frequency setting<br />
+<br />
Frequency<br />
Pulse output<br />
Sample program<br />
272 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
-<br />
100 1000 300 -100<br />
100Hz<br />
1KHz<br />
300Hz<br />
100Hz<br />
-1000<br />
1KHz<br />
6F3B0253<br />
In this example, 3 (H0003) is set in SW26. As a result, the CW/CCW mode pulse<br />
output function is selected.<br />
When R000 is ON, the pulse output is started with the frequency designated by<br />
D0100.<br />
If an invalid frequency is designated, the frequency setting error flag (S26F) comes<br />
ON and the pulse enable flag (S270) is turned OFF. Then the pulse output is stopped.<br />
-300<br />
300Hz<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8.7 PWM output function<br />
Function<br />
6F3B0253<br />
8. Special I/O Functions<br />
This function is used to output a variable duty cycle pulse train. The controllable duty<br />
cycle is 0 to 100 % (1 % units).<br />
PWM<br />
ON duty 50% 70% 60%<br />
T T T T = Pulse cycle<br />
The PWM output is enabled when the pulse enable flag is ON. While the pulse enable<br />
flag is ON, the duty cycle (ON duty) can be changed by changing the duty setting<br />
value (0 to 100).<br />
The frequency setting is available in the range of 50 to 5000 Hz (1 Hz units) before<br />
turning ON the pulse enable flag. The frequency changing is not allowed while the<br />
pulse enable is ON.<br />
Note that the minimum ON/OFF pulse duration is 100 µs. Therefore, the controllable<br />
ON duty range is limited depending on the frequency setting as follows. If the ON duty<br />
setting value is not available (within 0 to 100), the pulse width error flag comes ON.<br />
(PWM output operation is continued but the duty cycle is not guaranteed)<br />
Frequency Cycle time Available ON duty<br />
50 - 100 Hz 20 - 10 ms 0 to 100 %<br />
200 Hz 5 ms 0, 2 to 98, 100 %<br />
1000 Hz 1 ms 0, 10 to 90, 100 %<br />
5000 Hz 200 µs 0, 50, 100 %<br />
Related registers<br />
SW26: Function selection. Refer to section 8.1.<br />
Function Register/<br />
device<br />
Remarks<br />
PWM pulse Y020<br />
Pulse enable flag S270 Output is enabled when ON<br />
Frequency setting register SW28 Data range: 50 to 5000<br />
ON duty setting register SW29 Data range: 0 to 100<br />
Pulse width error flag S26D ON at error (reset OFF automatically)<br />
ON duty setting error flag S26E ON at error (reset OFF automatically)<br />
Frequency setting error flag S26F ON at error (reset OFF automatically)<br />
Note) If the setting value of SW28 or SW29 is out of the allowable range, the<br />
frequency setting error flag (S26F) or the ON duty setting error flag (S26E)<br />
comes ON. (PWM output operation is continued with previous ON duty setting)<br />
Basic Hardware and Function 273<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
8. Special I/O Functions<br />
Operation<br />
Pulse enable<br />
ON duty setting<br />
ON duty<br />
PWM output<br />
Sample program<br />
274 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
10<br />
10%<br />
20<br />
20%<br />
30<br />
6F3B0253<br />
In this example, 1 (H0001) is set in SW26 and 100 is set in SW28. As a result, 100 Hz<br />
PWM output function is selected.<br />
When R005 is ON, the PWM output is started with the duty cycle designated by<br />
D0200.<br />
If an invalid ON duty is designated, the ON duty setting error flag (S26E) comes ON<br />
and the pulse enable flag (S270) is turned OFF. Then the PWM output is stopped.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net<br />
30%<br />
70<br />
70%<br />
60<br />
60%<br />
70<br />
70%
Section 9<br />
Maintenance and Checks<br />
9.1 Precautions during operation, 276<br />
9.2 Daily checks, 277<br />
9.3 Periodic checks, 278<br />
9.4 Maintenance parts, 279<br />
9.5 Battery, 280<br />
6F3B0253<br />
Basic Hardware and Function 275<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
9. Maintenance and Checks<br />
9.1 Precautions during operation<br />
When the <strong>T1</strong>-<strong>16S</strong> is in operation, you should pay attention to the following items.<br />
276 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
(1) The programmer cable can be plugged or unplugged while the <strong>T1</strong>-<strong>16S</strong> is in<br />
operation. When you try to do it, do not touch the connector pins. This may cause<br />
malfunction of the <strong>T1</strong>-<strong>16S</strong> owing to static electricity.<br />
(2) Do not plug nor unplug the expansion cable during power on. This can cause<br />
damage to the equipment. Furthermore, to avoid malfunction of the <strong>T1</strong>-<strong>16S</strong> owing<br />
to static electricity, do not touch the cable ends.<br />
(3) Do not touch any terminals while the <strong>T1</strong>-<strong>16S</strong> is in operation, even if the terminals<br />
are not live parts. This may cause malfunction of the <strong>T1</strong>-<strong>16S</strong> owing to static<br />
electricity.<br />
(4) Do not touch the expansion connector pins while the <strong>T1</strong>-<strong>16S</strong> is in operation. This<br />
may cause malfunction of the <strong>T1</strong>-<strong>16S</strong> owing to static electricity.<br />
Fix the expansion connector cover if the expansion connector is not used.<br />
(5) Turn off power when a battery installs and removes.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
9.2 Daily checks<br />
! CAUTION<br />
6F3B0253<br />
9. Maintenance and Checks<br />
1. Pay special attention during the maintenance work to minimize the risk<br />
of electrical shock.<br />
2. Turn off power immediately if the <strong>T1</strong>-<strong>16S</strong> or related equipment is<br />
emitting smoke or odor. Operation under such situation can cause fire<br />
or electrical shock.<br />
To maintain the system and to prevent troubles, check the following items on daily<br />
basis.<br />
Item Check Corrective measures<br />
Status LEDs PWR Lit when internal 5V is If the LEDs are not normal, see<br />
(power) normal.<br />
10. Troubleshooting.<br />
RUN Lit when operating<br />
normally.<br />
FLT (fault) Not lit when operating<br />
normally.<br />
Mode control Check that the mode control switch is Turn this switch to R (RUN) side.<br />
switch<br />
in R (RUN) side. Normal operation is<br />
performed when this switch is in R<br />
(RUN) side.<br />
Input LEDs Lit when the corresponding input is • Check that the input terminal<br />
ON.<br />
screw is not loose.<br />
• Check that the input terminal<br />
block is not loose.<br />
• Check that the input voltage is<br />
within the specified range.<br />
Output LEDs Lit when the output is ON and the • Check that the output terminal<br />
corresponding load should operate. screw is not loose.<br />
• Check that the output terminal<br />
block is not loose.<br />
• Check that the output voltage<br />
is within the specified range.<br />
Basic Hardware and Function 277<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
9. Maintenance and Checks<br />
9.3 Periodic checks<br />
! CAUTION<br />
Check the <strong>T1</strong>-<strong>16S</strong> based on the following items every six months. Also perform<br />
checks when the operating environment is changed.<br />
278 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
1. Pay special attention during the maintenance work to minimize the risk<br />
of electrical shock.<br />
2. Turn off power immediately if the <strong>T1</strong>-<strong>16S</strong> or related equipment is<br />
emitting smoke or odor. Operation under such situation can cause fire<br />
or electrical shock.<br />
Item Check Criteria<br />
Power supply Measure the power voltage at the <strong>T1</strong>- 85 - 132/170 - 264Vac (AC PS)<br />
<strong>16S</strong>’s power terminals.<br />
20.4 - 28.8Vdc (DC PS)<br />
Check that the terminal screw is not<br />
loose.<br />
Not loose<br />
Check that the power cable is not<br />
damaged.<br />
Not damaged<br />
Installation Check that the unit is installed Not loose, no play<br />
condition securely.<br />
Check that the I/O module is inserted<br />
securely. (if any)<br />
Not loose, no play<br />
Check that the expansion rack/unit is<br />
installed securely. (if any)<br />
Not loose, no play<br />
Check that the expansion cable is<br />
connected securely and the cable is<br />
not damaged. (if any)<br />
Not loose, not damaged<br />
Check that the I/O module on the<br />
expansion rack is inserted securely. (if<br />
any)<br />
Not loose, no play<br />
Input/output Measure the input/output voltage at The voltage must be within the<br />
the <strong>T1</strong>-<strong>16S</strong>’s terminals.<br />
specified range.<br />
Check the input status LEDs. The LED must light normally.<br />
Check the output status LEDs. The LED must light normally.<br />
Check that the terminal block is<br />
installed securely.<br />
Not loose, no play<br />
Check that the terminal screw is not Not loose, not contacting the<br />
loose and the terminal has a sufficient<br />
distance to the next terminal.<br />
next terminal<br />
Check that the each I/O wire is not<br />
damaged.<br />
Not damaged<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
(Periodic checks - continued)<br />
6F3B0253<br />
9. Maintenance and Checks<br />
Item Check Criteria<br />
Environment Check that the temperature, humidity,<br />
vibration, dust, etc. are within the<br />
specified range.<br />
Programming tool Check that the functions of the<br />
programming tool are normal.<br />
Check that the connector and cable<br />
are not damaged.<br />
User program Check that the <strong>T1</strong>-<strong>16S</strong> program and<br />
the master program (saved on a floppy<br />
disk, etc.) are the same.<br />
9.4 Maintenance parts<br />
Must be within the range of<br />
general specification.<br />
Monitoring and other operations<br />
are available.<br />
Not damaged<br />
No compare error<br />
To recover from trouble quickly, it is recommended to keep the following spare parts.<br />
Item Quantity Remarks<br />
<strong>T1</strong>-<strong>16S</strong> basic unit 1 Prepare at least one to minimize the down-time<br />
of the controlled system.<br />
Programming tool 1 Useful for the troubleshooting procedure.<br />
Master program As required Saved on a floppy disk, etc.<br />
Expansion rack or<br />
unit (if any)<br />
1<br />
I/O module<br />
One of each type<br />
(if any)<br />
used<br />
Fuse for I/O<br />
One of each type<br />
module (if any)<br />
used<br />
Battery (CR2032) 1<br />
These spare parts should not be stored in high temperature and/or humidity locations.<br />
Basic Hardware and Function 279<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
9. Maintenance and Checks<br />
9.5 Battery<br />
(1) Install<br />
(2) Eject<br />
NOTE<br />
+ side<br />
280 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
Insert the battery by an angle of 45°.<br />
(Turn + side into an upside.)<br />
(1) Push the battery horizontal direction.<br />
(2) Push from upside and lock.<br />
6F3B0253<br />
Push the center of the tab by a finger or a pen. Then<br />
the battery will be unlocked.<br />
Remove the battery.<br />
1. Turn off power when installing or removing the battery for safety.<br />
2. The battery type is CR2032. Do not use other types of battery. Use of<br />
another battery may present a risk of fire or explosion.<br />
3. Dispose of used battery promptly. Keep away from children. Do not<br />
disassemble and do not dispose of in fire.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Section 10<br />
Troubleshooting<br />
10.1 Troubleshooting procedure, 282<br />
10.2 Self-diagnostic items, 288<br />
6F3B0253<br />
Basic Hardware and Function 281<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10. Troubleshooting<br />
10.1 Troubleshooting procedure<br />
! CAUTION<br />
282 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
1. Pay special attention during the troubleshooting to minimize the risk of<br />
electrical shock.<br />
2. Turn off power immediately if the <strong>T1</strong>-<strong>16S</strong> or related equipment is<br />
emitting smoke or odor. Operation under such situation can cause fire<br />
or electrical shock.<br />
3. Turn off power before removing or replacing units, modules, terminal<br />
blocks or wires. Failure to do so can cause electrical shock or damage<br />
to the <strong>T1</strong> and related equipment.<br />
4. Contact <strong>Toshiba</strong> for repairing if the <strong>T1</strong>-<strong>16S</strong> or related equipment is<br />
failed. <strong>Toshiba</strong> will not guarantee proper operation nor safety for<br />
unauthorized repairing.<br />
If a trouble occurs, determine whether the cause lies in the mechanical side or in the<br />
control system (<strong>PLC</strong>) side. A problem may cause a secondary problem, therefore, try<br />
to determine the cause of trouble by considering the whole system.<br />
If the problem is found in the <strong>T1</strong>-<strong>16S</strong>, check the following points:<br />
PWR (power) LED Follow the procedure in<br />
Not lit 10.1.1 Power supply check<br />
Lit<br />
RUN LED<br />
Lit<br />
Not lit<br />
Follow the procedure in<br />
10.1.2 CPU check<br />
User program<br />
Normal operation<br />
Not normal<br />
Follow the procedure in<br />
10.1.3 Program check<br />
Input operation<br />
Normal operation<br />
Not normal<br />
Follow the procedure in<br />
10.1.4 Input check<br />
Output operation Follow the procedure in<br />
Not normal 10.1.5 Output check<br />
Also refer to section 10.1.6 for environmental problem.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10.1.1 Power supply check<br />
6F3B0253<br />
10. Troubleshooting<br />
If the PWR (power) LED is not lit after power on, check the following points.<br />
Check the power connection Connection terminals are correct.<br />
The terminal screws are not loose.<br />
The terminal block is installed securely.<br />
Correct<br />
Check the power voltage 85 to 132/170 to 264Vac (50/60 Hz)<br />
at the <strong>T1</strong>-<strong>16S</strong>’s terminal or 20.4 to 28.8Vdc (DC power)<br />
Normal<br />
Remove the programmer If the PWR LED becomes normal, the<br />
port connector internal 5Vdc can be shorted in the<br />
external connections of this port.<br />
Still unlit<br />
Remove the 24Vdc service If the PWR LED becomes normal, the<br />
power terminals if it is used 24Vdc service power can be over load.<br />
Still unlit<br />
Remove the I/O modules. If the PWR LED is still unlit, the <strong>T1</strong>-<strong>16S</strong><br />
basic unit may be faulty. Replace the unit.<br />
Lit<br />
Confirm the internal 5Vdc The 5Vdc capacity for I/O modules is<br />
current consumption if max. 1.5A.<br />
I/O module is used. (Refer to section 2.1.)<br />
Within the limit<br />
Insert the removed option Replace the faulty I/O module.<br />
modules one by one to<br />
pinpoint the faulty card.<br />
Basic Hardware and Function 283<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10. Troubleshooting<br />
10.1.2 CPU check<br />
If the PWR (power) LED is lit but the RUN LED is not lit, check the following points.<br />
Check the position of the If it is not in R (RUN) position, turn the<br />
mode control switch switch to R (RUN) position.<br />
284 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Check the FLT (fault) LED If the FLT LED is lit or blinking, the <strong>T1</strong>-<strong>16S</strong><br />
is in the ERROR mode. Confirm the error<br />
message by connecting the<br />
programming tool. Refer to section 10.2.<br />
Is the RUN LED blinking ? If it is blinking, the <strong>T1</strong>-<strong>16S</strong> is in the HOLD<br />
mode. Check your program<br />
whether the HOLD device (S401) is<br />
not used.<br />
Connect the programming If the <strong>T1</strong>-<strong>16S</strong> stays in HALT mode even<br />
tool, and check the <strong>T1</strong>-<strong>16S</strong>’s when the mode control switch is changed,<br />
status the switch may be faulty.<br />
If the communication between the <strong>T1</strong>-<strong>16S</strong><br />
and the programming tool is not possible,<br />
the <strong>T1</strong>-<strong>16S</strong> may be faulty.<br />
10.1.3 Program check<br />
Check the user program based on the following points if it is running but the operation<br />
does not work as intended.<br />
(1) Whether duplicated coils are not programmed.<br />
(2) Whether a coil device and a destination of a function instruction are not<br />
overlapping.<br />
(3) Whether the ON/OFF duration of an external input signal is not shorter than the<br />
<strong>T1</strong>-<strong>16S</strong>’s scan time.<br />
(4) Whether a register/device, which is used in the main program, is not operated<br />
erroneously in the interrupt program.<br />
NOTE<br />
When you write/modify the program, it is necessary to execute the<br />
EEPROM write operation before turning off power to the <strong>T1</strong>. Otherwise the<br />
old program stored in the built-in EEPROM will be over-written, and your<br />
program modification will disappear.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10.1.4 Input check<br />
6F3B0253<br />
10. Troubleshooting<br />
If the program is running but the external input signal is not read normally, check the<br />
following points:<br />
Is the input status LED If not, check the input voltage at the<br />
changed ON/OFF according <strong>T1</strong>-<strong>16S</strong>’s input terminals.<br />
to the corresponding input If the voltage is not normal, check the input<br />
device operation ? device and the cable.<br />
If the voltage is normal, the <strong>T1</strong>-<strong>16S</strong>’s input<br />
Yes circuit may be faulty.<br />
Connect the programming If the monitored X device state is identical<br />
tool, and monitor the to the state of the input status LED, the<br />
corresponding X device state cause may lie in the user program or in the<br />
in RUN mode environment.<br />
Not normal<br />
Check whether the X device If it is forced, release the force designation<br />
is forced or not then execute the EEPROM write<br />
operation.<br />
Not forced<br />
Check whether the I/O If identical, the <strong>T1</strong>-<strong>16S</strong>’s internal circuit or<br />
allocation table is identical to the input circuit may be faulty.<br />
the actual I/O configuration<br />
Not identical<br />
Execute the automatic I/O If it becomes identical, execute the<br />
allocation, and check whether EEPROM write operation.<br />
the I/O allocation table is now<br />
identical to the actual I/O<br />
configuration<br />
Still not identical<br />
Is the allocation mismatch for If so, the card, module or expansion unit<br />
a specific I/O module? may be faulty. For expansion unit, check<br />
the expansion cable also.<br />
Basic Hardware and Function 285<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10. Troubleshooting<br />
10.1.5 Output check<br />
If the output status monitored on the programming tool is normal but the external<br />
output device (load) is not operated normally, check the following points:<br />
Is the output status LED<br />
changed ON/OFF according<br />
No to the program execution ?<br />
Yes<br />
286 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Check the voltage between If it is the circuit voltage at the output is<br />
the output terminal and its ON, or if it is 0V at the output is OFF with<br />
common terminal. the load ON, the <strong>T1</strong>-<strong>16S</strong>’s output circuit<br />
It should be 0V when the may be faulty.<br />
output is ON, and it should If it is 0V and the load is also OFF, check<br />
be the circuit voltage when the output power and the output cable<br />
the output is OFF. connections.<br />
Normal<br />
If it is not normal, check the output cable<br />
Check the voltage at the load connections.<br />
If it is normal, check the specification of<br />
the load, also check environmental factors.<br />
Check whether the I/O If identical, the <strong>T1</strong>-<strong>16S</strong>’s internal circuit or<br />
allocation table is identical to the output circuit may be faulty.<br />
the actual I/O configuration<br />
Not identical<br />
Execute the automatic I/O If it becomes identical, execute the<br />
allocation, and check whether EEPROM write operation.<br />
the I/O allocation table is now<br />
identical to the actual I/O<br />
configuration<br />
Still not identical<br />
Is the allocation mismatch for If so, the card, module or expansion unit<br />
a specific I/O module? may be faulty. For expansion unit, check<br />
the expansion cable also.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10.1.6 Environmental problem<br />
6F3B0253<br />
10. Troubleshooting<br />
If the following improper operations occur in the controlled system, check possible<br />
environmental factors.<br />
(1) If an improper operation occurs synchronously with the operation of I/O devices:<br />
The noise generated at ON/OFF of the output device (load) may be the cause of<br />
the problem. Take necessary measures mentioned in section 3.<br />
(2) If an improper operation occurs synchronously with the operation of surrounding<br />
equipment or high-frequency equipment:<br />
The noise induced in I/O signal lines may be the cause of the problem. The surge<br />
voltage, voltage fluctuations, or differences of grounding potentials may cause<br />
the problem, depending on the power supply system or the grounding system.<br />
Check the operation in accordance with the precautions in section 4. For some<br />
cases, isolation from the ground may lead to the stable operation.<br />
(3) If an improper operation occurs synchronously with the operation of machinery:<br />
The vibration of the equipment may cause the problem. Check that the installation<br />
status of the units and take necessary measures.<br />
(4) If a similar failure is repeated after the unit is replaced:<br />
Check that no metal debris or water drops has been entered into the unit/module.<br />
Apart from the above points, consider climatic conditions. If the ambient temperature<br />
is beyond the specified range, stable operation of the system is not guaranteed.<br />
Basic Hardware and Function 287<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10. Troubleshooting<br />
10.2 Self-diagnostic items<br />
288 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
If an error is detected by the self-diagnostic check of the <strong>T1</strong>-<strong>16S</strong> CPU, the error<br />
messages and the related information shown on the following pages will be recorded<br />
in the <strong>T1</strong>-<strong>16S</strong>’s event history table. If the error is severe and continuation of operation<br />
is not possible, the <strong>T1</strong>-<strong>16S</strong> turns OFF all outputs and stops the operation (ERROR<br />
mode).<br />
The latest 15 error messages are stored in the event history table. This event history<br />
table can be displayed on the programming tool. (Power ON/OFF is also registered)<br />
If the <strong>T1</strong>-<strong>16S</strong> has entered into ERROR mode, connect the programming tool to the <strong>T1</strong>-<br />
<strong>16S</strong> to confirm the error message in the event history table. This information is<br />
important to recover from a trouble. For the key operations on the programming tool to<br />
display the event history table, refer to the separate manual for the programming tool.<br />
(An example of the event history)<br />
< Event History><br />
Date Time Event Count Info 1 Info 2 Info 3 Mode<br />
1. 98-02-21 16:48:01 I/O no answer 3 #00-04 RUN Down<br />
2. 98-02-21 15:55:26 System power on 1 INIT.<br />
3. 98-02-21 12:03:34 System power off 1 RUN<br />
4. 98-01-15 09:27:12 System power on 1 INIT.<br />
5. 98-01-14 19:11:43 System power off 1 HALT<br />
6. 98-01-14 10:39:11 No END/IRET error 3 M-001 H0024 HALT Down<br />
In the event history table, No.1 message indicates the latest event recorded.<br />
Each column shows the following information.<br />
Date: The date when the error has detected (Enhanced model only)<br />
Time: The time when the error has detected (Enhanced model only)<br />
Event: Error message<br />
Count: Number of times the error has detected by retry action<br />
Info n: Related information to the error detected<br />
Mode: <strong>T1</strong>-<strong>16S</strong>’s operation mode in which the error has detected (INIT. means the<br />
power-up initialization)<br />
Down: Shows the <strong>T1</strong>-<strong>16S</strong> has entered into ERROR mode by the error detected<br />
If the <strong>T1</strong>-<strong>16S</strong> is in the ERROR mode, operations to correct the program are not<br />
accepted.<br />
In this case, execute the Error reset operation by the programming tool to return the<br />
HALT mode before starting the correction operation.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
10. Troubleshooting<br />
Error message and related information Special Meaning and countermeasures<br />
Event Info 1 Info 2 Info 3 device<br />
Batt voltage drop S00F In the power-up initialization, data invalidity<br />
of RAM (back-up area) has been detected.<br />
If retentive registers are used, these validity<br />
are not guaranteed. (No error down)<br />
Boundary error Program Address FUN No. The register of index modification is other<br />
type - in the<br />
than RW, T, C and D. (Error down)<br />
block No. block S064 The register designated by index<br />
modification has exceeded the allowable<br />
range. That is, out of RW, T, C and D.<br />
(No error down)<br />
Check the value of the index register.<br />
Clock-calendar error S00A The data of built-in calendar LSI is illegal.<br />
(No error down)<br />
Set the date and time.<br />
Duplicate entry No. Program<br />
type -<br />
block No.<br />
EEPROM BCC error Illegal<br />
BCC<br />
EEPROM warning Number<br />
of excess<br />
writing<br />
Address<br />
in the<br />
block<br />
(Enhanced model only)<br />
Entry No. Multiple SUBR instructions which have the<br />
same subroutine number are programmed.<br />
(Error down)<br />
S004<br />
S013<br />
I/O bus error Unit No. Data S005<br />
S020<br />
I/O mismatch Unit No. -<br />
slot No.<br />
I/O no answer Unit No. -<br />
slot No.<br />
I/O parity error Unit No. -<br />
slot No.<br />
Illegal I/O reg Unit No. -<br />
slot No.<br />
Register<br />
No.<br />
Register<br />
No.<br />
Register<br />
No.<br />
Register<br />
No.<br />
Check the program.<br />
BCC error has been detected in the user<br />
program of the EEPROM. (Error down)<br />
Reload the program and execute EEPROM<br />
write operation again.<br />
S007 The number of times of writing into<br />
EEPROM has exceeded the life (100,000<br />
times). (No error down)<br />
Replace the unit because the data reliability<br />
S005<br />
S021<br />
S005<br />
S022<br />
S005<br />
S023<br />
S005<br />
S021<br />
of the EEPROM will decrease.<br />
An abnormality has been detected in I/O<br />
bus checking. (Error down)<br />
Check the expansion cable connection and<br />
I/O module mounting status.<br />
The I/O allocation information and the<br />
actual I/O configuration are not identical.<br />
(Error down)<br />
Check the I/O allocation and the I/O module<br />
mounting status.<br />
No response from the T2 I/O module has<br />
been received. (Error down)<br />
Check the I/O allocation, the expansion<br />
cable connection and the T2 I/O module<br />
mounting status.<br />
I/O bus parity error has been detected in<br />
data read/write for T2 I/O modules. (Error<br />
down)<br />
Check the expansion cable connection and<br />
the T2 I/O module mounting status.<br />
The allocated I/O register address exceeds<br />
the limit, 32 words. (Error down)<br />
Check the I/O allocation.<br />
Basic Hardware and Function 289<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10. Troubleshooting<br />
290 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Error message and related information Special Meaning and countermeasures<br />
Event Info 1 Info 2 Info 3 device<br />
Illegal inst Program Address<br />
S006 An illegal instruction has been detected in<br />
type - in the<br />
S030 the program. (Error down)<br />
block No. block<br />
S060 Reload the program and execute EEPROM<br />
write operation again.<br />
Illegal sys intrpt Interrupt Interrupt<br />
Unregistered interrupt has occurred. (No<br />
address 1 address 2<br />
error down)<br />
If the error occurs frequently, replace the<br />
unit.<br />
Invalid Fun inst Program Address Fun No. A function instruction which is not supported<br />
type - in the<br />
by the <strong>T1</strong>-<strong>16S</strong> is programmed. (Error down)<br />
block No. block<br />
Correct the program.<br />
Invalid program Program<br />
A basic ladder instruction which is not<br />
type -<br />
supported by the <strong>T1</strong>-<strong>16S</strong> is programmed.<br />
block No.<br />
(Error down)<br />
Correct the program.<br />
SUBR instruction is not programmed before<br />
RET instruction. (Error down)<br />
Correct the program.<br />
An abnormality is detected in the program<br />
management information. (Error down)<br />
Reload the program and execute EEPROM<br />
write operation again.<br />
Loop nesting error Program Address<br />
A FOR-NEXT loop is programmed inside<br />
type - in the<br />
other FOR-NEXT loop. (Error down)<br />
block No. block<br />
Correct the program.<br />
Memory full The program exceeds the executable<br />
memory capacity. (Error down)<br />
Reduce the program steps.<br />
No END/IRET error Program Address<br />
The END instruction is not programmed in<br />
type - in the<br />
the main program or in the sub-program.<br />
block No. block<br />
(Error down)<br />
Correct the program.<br />
The IRET instruction is not programmed in<br />
the interrupt program. (Error down)<br />
Correct the program.<br />
No RET error Program Address Sub-r No. The RET instruction is not programmed in<br />
type - in the<br />
the subroutine program. (Error down)<br />
block No. block<br />
Correct the program.<br />
No sub-r entry Program Address Sub-r No. The subroutine corresponding to CALL<br />
type - in the<br />
instruction is not programmed. (Error down)<br />
block No. block<br />
Correct the program.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
6F3B0253<br />
10. Troubleshooting<br />
Error message and related information Special Meaning and countermeasures<br />
Event Info 1 Info 2 Info 3 device<br />
Operand error Program Address<br />
A register/device which is not supported by<br />
type - in the<br />
the <strong>T1</strong>-<strong>16S</strong> is programmed. (Error down)<br />
block No. block<br />
Correct the program.<br />
The timer or counter register is duplicated in<br />
the program. (Error down)<br />
Correct the program.<br />
The subroutine number programmed with<br />
CALL or SUBR instruction is out of the<br />
range. (Error down)<br />
0 to 255<br />
Correct the program.<br />
Index modification is programmed for<br />
instructions in which the index modification<br />
is not allowed. (Error down)<br />
Correct the program.<br />
Pair inst error Program Address<br />
The combination is illegal for MCS-MCR,<br />
type - in the<br />
JCS-JCR or FOR-NEXT instructions. (Error<br />
block No. block<br />
down)<br />
Correct the program.<br />
A MCS-MCR is programmed inside other<br />
MCS-MCR segment. (Error down )<br />
Correct the program.<br />
A JCS-JCR is programmed inside other<br />
JCS-JCR segment. (Error down )<br />
Correct the program.<br />
Peripheral LSI err Error<br />
S004 CPU hardware error has been detected in<br />
code<br />
S016 the power-up initialization. (Error down and<br />
programming tool cannot be connected)<br />
Replace the unit if the error remains after<br />
power OFF and ON again.<br />
Program BCC error Illegal<br />
S006 BCC error has been detected in the user<br />
BCC<br />
S030 program in the RAM. (Error down)<br />
If the error remains after power OFF and<br />
ON again, reload the program and execute<br />
EEPROM write operation.<br />
RAM check error Error Error data Test data S004 In the power-up initialization, an error has<br />
address<br />
S012 detected by RAM read/write checking. (Error<br />
down)<br />
Replace the unit if the error remains after<br />
power OFF and ON again.<br />
Scan time over Scan time S006 The scan time has exceeded 200 ms. (Error<br />
S031 down)<br />
Correct the program to reduce the scan time<br />
or use WDT instruction to extend the check<br />
time.<br />
Basic Hardware and Function 291<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
10. Troubleshooting<br />
292 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Error message and related information Special Meaning and countermeasures<br />
Event Info 1 Info 2 Info 3 device<br />
Sys RAM check err Error Error data Test data S004 In the power-up initialization, an error has<br />
address<br />
S011 detected by system RAM read/write<br />
checking. (Error down and programming<br />
tool cannot be connected)<br />
Replace the unit if the error remains after<br />
power OFF and ON again.<br />
Sys ROM BCC error Illegal<br />
S004 BCC error has been detected in the system<br />
BCC<br />
S010 program in the ROM. (Error down and<br />
programming tool cannot be connected)<br />
Replace the unit if the error remains after<br />
power OFF and ON again.<br />
System power off Power OFF (no error)<br />
System power on Power ON (no error)<br />
Sub-r nesting err Program Address Sub-r No. The nesting of subroutines exceeds 3<br />
type - in the<br />
levels.<br />
block No. block<br />
(Error down)<br />
Correct the program.<br />
WD timer error Address 1 Address 2 S004 The watchdog timer error has occurred.<br />
S01F (Error down)<br />
If the error occurs frequently, replace the<br />
unit.<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Appendix<br />
A.1 List of models and types, 294<br />
A.2 Instruction index, 295<br />
6F3B0253<br />
Basic Hardware and Function 293<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Appendix<br />
A.1 List of models and types<br />
• Basic unit<br />
294 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Model Power supply Input type RTC/RS-485 Type code Part number<br />
<strong>T1</strong>-<strong>16S</strong> 100 – 240Vac 24Vdc<br />
Yes <strong>T1</strong>-MDR<strong>16S</strong>S TDR1<strong>16S</strong>6S<br />
No <strong>T1</strong>-MDR<strong>16S</strong>C TDR1<strong>16S</strong>6C<br />
24Vdc<br />
Yes <strong>T1</strong>-MDR<strong>16S</strong>SD TDR1<strong>16S</strong>3S<br />
No <strong>T1</strong>-MDR<strong>16S</strong>CD TDR1<strong>16S</strong>3C<br />
• I/O module<br />
Description Type code Part number<br />
16 points 24Vdc input DI116M TDI116M∗S<br />
16 points 24Vdc output DO116M TDO116M∗S<br />
8 points 24Vdc input and 8 points 24Vdc output DD116M TDD116M∗S<br />
8 points relay output RO108M TRO108M∗S<br />
1 channel analog input, 0 – 5V/0 - 20mA AD121M TAD121M∗S<br />
1 channel analog input, ±10V AD131M TAD131M∗S<br />
1 channel analog output, 0 – 20mA DA121M TDA121M∗S<br />
1 channel analog output, ±10V DA131M TDA131M∗S<br />
1 channel thermo couple input, K/E/J TC111M TTC111M∗S<br />
TOSLINE-F10 remote station FR112M TFR112M∗S<br />
• Peripherals<br />
Description Type code Part number<br />
Handy programmer (with 2 m cable for <strong>T1</strong>/<strong>T1</strong>S) HP911A THP911A∗S<br />
T-PDS software (Windows version) T-PDS Windows TMW33E2SS<br />
Program storage module RM102 TRM102∗∗S<br />
Multi-drop adapter for computer link CU111 TCU111∗∗S<br />
• Cable and others<br />
Description Type code Part number<br />
T-PDS cable for <strong>T1</strong>/<strong>T1</strong>S, 5m length CJ105 TCJ105∗CS<br />
HP911A cable for <strong>T1</strong>/<strong>T1</strong>S, 2m length (spare parts) CJ102 TCJ102∗CS<br />
RS-232C connector for computer link<br />
(with 2 m cable)<br />
P<strong>T1</strong>6S TP<strong>T1</strong>6S∗AS<br />
I/O module I/O connector for<br />
P<strong>T1</strong>5S TP<strong>T1</strong>5S∗AS<br />
DI116M/DO116M/DD116M, soldering type<br />
I/O module I/O connector for<br />
DI116M/DO116M/DD116M, flat cable type<br />
P<strong>T1</strong>5F TP<strong>T1</strong>5F∗AS<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Appendix<br />
A.2 Instruction index<br />
• Instruction name<br />
1 bit rotate left 173 Exclusive OR 158<br />
1 bit rotate right 172 Expanded data transfer 241<br />
1 bit shift left 165 Flip-flop 215<br />
1 bit shift right 164 FOR 205<br />
2’s complement 232 Forced coil 122<br />
7-segment decode 234 Function generator 229<br />
Absolute value 231 Greater than 178<br />
Addition 143 Greater than or equal 179<br />
Addition with carry 149 Hex to ASCII conversion 161<br />
AND 156 Increment 154<br />
ASCII conversion 236 Interrupt return 210<br />
ASCII to Hex conversion 162 Invert coil 124<br />
Average value 228 Invert transfer 138<br />
BCD conversion 238 Inverter 123<br />
Bi-directional shift register 170 Jump control reset 134<br />
Binary conversion 237 Jump control set 134<br />
Bit count 202 Less than 182<br />
Bit test 163 Less than or equal 183<br />
Calendar operation 218 Lower limit 225<br />
Coil 121 Master control reset 133<br />
Counter 132 Master control set 133<br />
Data exchange 139 Maximum value 226<br />
Data transfer 136 Minimum value 227<br />
Decode 201 Moving average 159<br />
Decrement 155 Multiplexer 176<br />
Demultiplexer 177 Multiplication 145<br />
Device/register reset 197 n bit rotate left 175<br />
Device/register set 196 n bit rotate right 174<br />
Digital filter 160 n bit shift left 167<br />
Direct I/O 239 n bit shift right 166<br />
Disable interrupt 209 NC contact 118<br />
Division 146 Negative pulse coil 128<br />
Double-word 2’s complement 233 Negative pulse contact 126<br />
Double-word addition 147 NEXT 206<br />
Double-word data transfer 137 NO contact 117<br />
Double-word equal 286 Not equal 181<br />
Double-word greater than 284 OFF delay timer 130<br />
Double-word greater than or equal 285 ON delay timer 129<br />
Double-word less than 288 OR 157<br />
Double-word less than or equal 289 Positive pulse coil 127<br />
Double-word not equal 287 Positive pulse contact 125<br />
Double-word subtraction 148 Pre-derivative real PID 219<br />
Enable interrupt 208 Reset carry 199<br />
Encode 200 Set calendar 217<br />
End 135 Set carry 198<br />
Equal 180 Shift register 168<br />
6F3B0253<br />
Basic Hardware and Function 295<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Single shot timer 131<br />
Special module data read 245<br />
Special module data write 247<br />
Step sequence initialize 212<br />
Step sequence input 213<br />
Step sequence output 214<br />
Subroutine call 203<br />
Subroutine entry 207<br />
Subroutine return 204<br />
Subtraction 144<br />
Subtraction with carry 150<br />
Table initialize 140<br />
Table invert transfer 142<br />
Table transfer 141<br />
Transitional contact (falling) 120<br />
Transitional contact (rising) 119<br />
Unsigned division 152<br />
Unsigned double/single division 153<br />
Unsigned equal 192<br />
Unsigned greater than 190<br />
Unsigned greater than or equal 191<br />
Unsigned less than 194<br />
Unsigned less than or equal 195<br />
Unsigned multiplication 151<br />
Unsigned not equal 193<br />
Up-down counter 216<br />
Upper limit 224<br />
Watchdog timer reset 211<br />
296 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />
6F3B0253<br />
Appendix<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Appendix<br />
• Instruction symbol<br />
∗ 145 FG 229 U/D 216<br />
+ 143 FOR 205 U< 194<br />
+1 154 HTOA 161 U 190<br />
-C 150 JCS 134 U>= 191<br />
/ 146 LL 225 UL 224<br />
< 182 MAVE 159 WDT 211<br />
178 MIN 227<br />
>= 179 MOV 136<br />
7SEG 234 MPX 176<br />
ABS 231 NEG 232<br />
AND 156 NEXT 206<br />
ASC 236 NOT 138<br />
ATOH 162 OR 157<br />
AVE 228 PID3 219<br />
BC 202 READ 245<br />
BCD 238 RET 204<br />
BIN 237 RST 197<br />
CALL 203 RSTC 199<br />
CLDN 217 RTL 175<br />
CLDS 218 RTL1 173<br />
CNT 132 RTR 174<br />
D+ 147 RTR1 172<br />
D- 148 SET 196<br />
D< 188 SETC 198<br />
D 184 SHR1 164<br />
D>= 185 SR 168<br />
DEC 201 SS 131<br />
DFL 160 STIN 213<br />
DI 209 STIZ 212<br />
DIV 153 STOT 214<br />
DMOV 137 SUBR 207<br />
DNEG 233 TEST 163<br />
DPX 177 TINZ 140<br />
DSR 170 TMOV 141<br />
EI 208 TNOT 142<br />
ENC 200 TOF 130<br />
END 135 TON 129<br />
EOR 158 U∗ 151<br />
F/F 215 U/ 152<br />
6F3B0253<br />
Basic Hardware and Function 297<br />
<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net