Fp programming manual
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Fp programming manual

  • 2,243 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,243
On Slideshare
2,243
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
17
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 6_0408.ai GLOBAL NETWORK Europe http://www.mew-europe.com/ í Germany Matsushita Electric Works (Europe) AG Rudolf-Diesel-Ring 2, D-83607 Holzkirchen, Germany Tel: 49-8024-648-0 Germany Matsushita Electric Works Deutschland G.m.b.H. United Kingdom Matsushita Electric Works UK Ltd. • Ireland Matsushita Electric Works UK Ltd. Irish Branch Office Austria Matsushita Electric Works Austria G.m.b.H. Switzerland Matsushita Electric Works Schweiz AG France Matsushita Electric Works France S.A.R.L. Italy Matsushita Electric Works Italia s.r.l. FP Series Programming Manual Benelux Matsushita Electric Works Benelux B.V.uth America http://www.aromat.com/ Aromat Corporation Spain • Portugal Matsushita Electric Works España S.A. Matsushita Electric Works España S.A. Portuguese Branch Office PROGRAMMABLE CONTROLLER 629 Central Ave., New Providence, N.J. 07974 U.S.A. Czech Matsushita Electric Works (CZ) s.r.o. Tel: 1-908-464-3550 (Headquarters) Scandinavia Matsushita Electric Works Scandinavia ABetts FP Serieses Programming Manual Aromat Canada, Inc. [Applicable PLC] FP0/FP-e FPΣ Asia FP1 í Singapore Matsushita Electric Works (Asia Pacific) Pte. Ltd. FP-M 101 Thomson Road, #25-03/05, United Square, Singapore 307591 Representative Office Tel: 65-255-5473 FP2 • Indonesia Malaysia Matsushita Electric Works (Malaysia) Sdn. Bhd. FP2SH Thailand Matsushita Electric Works Sales (Thailand) Co., Ltd. • Vietnam U.A.E. Matsushita Electric Works (Middle East) FZE. FP3 • Philippines í China • India Matsushita Electric Works (China) Co., Ltd. FP10SH Suite 201 Level 2 Tower W3, The Toners, Oriental Plaza, No. 1, • Turkey East Chang An Ave., Dong Cheng District, Beijing, 100005 China • Brazil Tel: 86-10-8518-1302, 1303 Beijing Matsushita Electric Works (China) Co., Ltd. Shanghai Matsushita Electric Works (China) Co., Ltd. Shanghai Branch Office ARCT1F313E-4/ACG-M313E-4 Guangzhou Matsushita Electric Works (China) Co., Ltd. Guangzhou Branch Office Dalian Matsushita Electric Works (China) Co., Ltd. Dalian Branch Office Shenzhen Matsushita Electric Works (China) Co., Ltd. Shenzhen Branch Office Chengdu Matsushita Electric Works (China) Co., Ltd. Chengdu Branch Office í Hong Kong Matsushita Electric Works (Hong Kong), Ltd. Rm1601, 16/F, Tower 2, The Gateway, 25 Canton Road, Tsimshatsui, Kowloon, Hong Kong Tel: 852-2529-3956 í Japan Matsushita Electric Works, Ltd. Automation Controls Company 1048, Kadoma, Kadoma-shi, Osaka 571-8686, Japan Tel: 81-06-6908-1050 .......... Matsushita Electric Works, Ltd. Matsushita Electric Works, Ltd. This manual was created using Adobe Acrobat. Automation Controls Company Adobe, the Adobe logo, and Acrobat are trademarks íHead Office: 1048, Kadoma, Kadoma-shi, Osaka 571-8686, Japan of Adobe Systems Incorporated. íTelephone: Japan (81) Osaka (06) 6908-1050 íFacsimile: Japan (81) Osaka (06) 6908-5781 http://www.nais-e.com/ COPYRIGHT © 2003 All Rights Reserved FP Series Programming Manual 200307-5ZT Specifications are subject to change without notice. Printed in Japan. ARCT1F313E-7 ’04.10 http://www.nais-e.com/plc
  • 2. Table of ContentsChapter 1 Relays, Memory Areas and Constants1.1 Table of Relays, Memory Areas and Constants . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.1.1 FP0/FP - e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.1.2 FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 4 1.1.3 FP1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 6 1.1.4 FP - M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 8 1.1.5 FP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 10 1.1.6 FP2SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 12 1.1.7 FP10SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 14 1.1.8 FP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 16 1.1.9 Relay Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 181.2 Explanation of Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 21 1.2.1 External Input Relays (X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 21 1.2.2 External Output Relays (Y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 22 1.2.3 Internal Relays (R) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 23 1.2.4 Special Internal Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 25 1.2.5 Link Relays (L) for FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 26 1.2.6 Link Relays (L) for FP2/FP2SH/FP10SH/FP3 . . . . . . . . . . . . . . . . . 1 - 28 1.2.7 Timer (T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 32 1.2.8 Counter (C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 33 1.2.9 Items Shared by the Timer and Counter . . . . . . . . . . . . . . . . . . . . . 1 - 34 1.2.10 Pulse Relays (P) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 37 1.2.11 Error Alarm Relays (E) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 391.3 Explanation of Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 42 1.3.1 Data Register (DT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 42 1.3.2 Special Data Registers (DT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 44 1.3.3 File Registers (FL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 46 1.3.4 WX, WY, WR and WL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 47 1.3.5 Link Data Registers (LD) for FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 48 1.3.6 Link Data Registers (LD) for FP2/FP2SH/FP10SH/FP3 . . . . . . . . 1 - 50 1.3.7 Set Value Area for Timer/Counter (SV) . . . . . . . . . . . . . . . . . . . . . . 1 - 54 1.3.8 Elapsed Value Area for Timer/Counter (EV) . . . . . . . . . . . . . . . . . . 1 - 55 1.3.9 Index Registers (IX, IY) (for FP0, FP - e, FP1, FP - M and FP3) . . 1 - 56 1.3.10 Index Registers (I0 to ID) (for FPΣ) . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 59 1.3.11 Index Registers (I0 to ID) (for FP2, FP2SH and FP10SH) . . . . . . 1 - 601.4 Explanation of Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 70 1.4.1 Integer Type Decimal Constants (K) . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 70 1.4.2 Hexadecimal Constants (H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 71 i
  • 3. Table of Contents 1.4.3 Floating Point Type Real Numbers (f) . . . . . . . . . . . . . . . . . . . . . . . 1 - 72 1.4.4 BCD Type Real Numbers (H) (for FP2, FP2SH and FP10SH) . . . 1 - 77 1.4.5 Character Constants (M) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 781.5 Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . . . . . . . . . . 1 - 79 1.5.1 Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . . 1 - 79 1.5.2 Overflow and Underflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 82Chapter 2 Basic Instructions2.1 Composition of Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 2.1.1 Sequence Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 2.1.2 Basic Function Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 2.1.3 Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 2.1.4 Data Compare Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-52.2 Number of Steps in the FP2, FP2SH and FP10SH . . . . . . . . . . . . . . . . . . . . . 2 - 6Chapter 3 High - level Instructions3.1 Composition of High-level Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 3.1.1 Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 3.1.2 High-level Instruction Numbers and Program Input . . . . . . . . . . . . . 3-4 3.1.3 High-level Instruction and Execution Condition (Trigger) . . . . . . . . 3-5 3.1.4 “F” and “P” Type High-level Instructions . . . . . . . . . . . . . . . . . . . . . . 3-6Chapter 4 Precautions Concerning Programs4.1 Changing the Set Value of Timer/Counter During RUN . . . . . . . . . . . . . . . . . 4 - 3 4.1.1 Method of Rewriting Constant in the Program . . . . . . . . . . . . . . . . . 4 - 3 4.1.2 Method of Rewriting a Value in the Set Value Area . . . . . . . . . . . . . 4 - 54.2 Use of Duplicated Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 8 4.2.1 Duplicated Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 8 4.2.2 When Output is Repeated with an OT, KP, SET, or RST Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 94.3 Leading Edge Detection Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 10 4.3.1 Instructions of Leading Edge Detection Method . . . . . . . . . . . . . . . 4 - 10 4.3.2 Operation and Precautions at Run Start Time . . . . . . . . . . . . . . . . 4 - 11 4.3.3 Precautions when Using a Control Instruction . . . . . . . . . . . . . . . . 4 - 134.4 Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 15 4.4.1 Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 15ii
  • 4. Table of Contents 4.4.2 Operation Mode when an Operation Error Occurs . . . . . . . . . . . . . 4 - 16 4.4.3 Dealing with Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 17 4.4.4 Points to Check in Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 184.5 Handling Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 19 4.5.1 Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 19 4.5.2 Memory Areas Which can be Modified with Index Registers . . . . 4 - 20 4.5.3 Example of Using an Index Register . . . . . . . . . . . . . . . . . . . . . . . . 4 - 214.6 Handling BCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 25 4.6.1 BCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 25 4.6.2 Handling BCD Data in the Programmable Controller . . . . . . . . . . . 4 - 254.7 Precautions for Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 27Chapter 5 Special Functions of FP05.1 High - speed Counter, Pulse Output and PWM Output . . . . . . . . . . . . . . . . . . 5 - 3 5.1.1 Outline of Functions that Use Built - in High - speed Counter . . . . . . 5 - 3 5.1.2 Specifications and Restricted Items . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 5 5.1.2.1 High - speed Counter Function Specifications . . . . . . . . 5 - 5 5.1.2.2 Pulse Output Function Specifications . . . . . . . . . . . . . . 5 - 6 5.1.2.3 PWM Output Specifications . . . . . . . . . . . . . . . . . . . . . . . 5 - 6 5.1.2.4 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 7 5.1.3 High - speed Counter Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 9 5.1.3.1 Outline of High - speed Counter Function . . . . . . . . . . . 5 - 9 5.1.3.2 Types of Input Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 9 5.1.3.3 I/O Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 11 5.1.3.4 Instructions Used with High - speed Counter Function 5 - 12 5.1.3.5 Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 14 5.1.4 Pulse Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 18 5.1.4.1 Outline of Pulse Output Function . . . . . . . . . . . . . . . . . 5 - 18 5.1.4.2 Control Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 19 5.1.4.3 I/O Allocation and Wiring . . . . . . . . . . . . . . . . . . . . . . . . 5 - 20 5.1.4.4 Instructions Used with Pulse Output Function . . . . . . 5 - 22 5.1.4.5 Sample Program for Positioning Control . . . . . . . . . . . 5 - 25 5.1.5 PWM Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 33 5.1.5.1 Outline of PWM Output Function . . . . . . . . . . . . . . . . . 5 - 33 5.1.5.2 Instruction Used with PWM Output Function . . . . . . . 5 - 335.2 General - purpose Serial Communications Function . . . . . . . . . . . . . . . . . . . 5 - 34 5.2.1 General - purpose Serial Communications . . . . . . . . . . . . . . . . . . . . 5 - 34 5.2.1.1 Data Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 34 5.2.1.2 Data Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 35 5.2.2 System Register Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 36 iii
  • 5. Table of Contents 5.2.3 Explanation of Operations When Using General - use Serial Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 39 5.2.3.1 Start Code “None”, Terminal Code: CR . . . . . . . . . . . . 5 - 39 5.2.3.2 Start Code “STX”, Terminal Code “ETX” . . . . . . . . . . . 5 - 405.3 Rewrite Function During RUN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 42 5.3.1 Operation of Rewrite During RUN . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 42 5.3.2 Cases where Rewriting During Run is not Possible . . . . . . . . . . . . 5 - 43 5.3.3 Procedures and Operation of Rewrite During RUN . . . . . . . . . . . . 5 - 44 5.3.4 Changing Modes in FP Programmer II . . . . . . . . . . . . . . . . . . . . . . . 5 - 465.4 Processing During Forced Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 47Chapter 6 Special Functions of FP - M/FP16.1 High - speed Counter Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 6.1.1 Specifications of High - speed Counter . . . . . . . . . . . . . . . . . . . . . . . . 6-3 6.1.2 Input Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 6.1.3 Connection and Input Mode Setting with Pulse Output Control . . . 6-6 6.1.4 Instructions Used with High - speed Counter Function . . . . . . . . . . . 6-86.2 Frequency Value for Pulse Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 146.3 ON Pulse Wide for Pulse Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 21Chapter 7 Hints for FP2/FP2SH/FP3/FP10SH7.1 Specifying Slot Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 3 7.1.1 With the FP2 and FP2SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 3 7.1.2 With the FP3 and FP10SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 4Appendix A SpecificationsA.1 Performance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 3 A.1.1 FP0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 3 A.1.2 FP - e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 7 A.1.3 FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 11 A.1.4 FP1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 13 A.1.5 FP - M C16T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 15 A.1.6 FP - M C20/C32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 17 A.1.7 FP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 19 A.1.8 FP2SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 21 A.1.9 FP10SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 23iv
  • 6. Table of Contents A.1.10 FP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 25Appendix B Programming InformationB.1 Table of System Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B - 2 B.1.1 Precartion for System Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B - 2 B.1.2 Content of System Register Settings . . . . . . . . . . . . . . . . . . . . . . . . . B - 4 B.1.3 Table of System Registers for FP0 . . . . . . . . . . . . . . . . . . . . . . . . . . . B - 8 B.1.4 Table of System Registers for FP - e . . . . . . . . . . . . . . . . . . . . . . . . . B - 18 B.1.5 Table of System Registers for FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . B - 22 B.1.6 Table of System Registers for FP - M/FP1 . . . . . . . . . . . . . . . . . . . . B - 27 B.1.7 Table of System Registers for FP2/FP2SH/FP10SH . . . . . . . . . . . B - 37 B.1.8 Table of System Registers for FP3 . . . . . . . . . . . . . . . . . . . . . . . . . . B - 46B.2 Table of Special Internal Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B - 52 B.2.1 Table of Special Internal Relays for FP0/FP - e . . . . . . . . . . . . . . . . B - 52 B.2.2 Table of Special Internal Relays for FPΣ . . . . . . . . . . . . . . . . . . . . . B - 55 B.2.3 Table of Special Internal Relays for FP1/FP - M/FP2/FP2SH/FP10SH/FP3 . . . . . . . . . . . . . . . . . . . . . . . B - 62B.3 Table of Special Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B - 73 B.3.1 Special Data Registers for FP0/FP - e . . . . . . . . . . . . . . . . . . . . . . . B - 73 B.3.2 Special Data Registers for FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B - 81 B.3.3 Special Data Registers for FP - M/FP1 . . . . . . . . . . . . . . . . . . . . . . . B - 95 B.3.4 Special Data Registers for FP2/FP2SH/FP3/FP10SH . . . . . . . . . B - 109B.4 Binary/Hexadecimal/BCD/Gray Code Expressions . . . . . . . . . . . . . . . . . . . B - 132B.5 ASCII Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B - 133Appendix 1 Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E1 - 1 Error Confirmation When the Error LED Turns ON Table of Syntax Check Error Table of Self-Diagnostic Error Table of Communication Check ErrorAppendix 2 Table of Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P2 - 1 Table of Basic Instructions Table of High-level InstructionsIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I - 1Record of changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R - 1 v
  • 7. Table of ContentsBasic InstructionsSequence basic instructions TMX On - delay timer TMX . . . . 2 - 42ST Start . . . . . . . . . . . . . . . . . . . 2 - 8 TMY On - delay timer TMY . . . . 2 - 42ST/ Start Not . . . . . . . . . . . . . . . 2 - 8 CT Counter . . . . . . . . . . . . . . . 2 - 48OT Out . . . . . . . . . . . . . . . . . . . . 2 - 8 SR Shift register . . . . . . . . . . . 2 - 54/ Not . . . . . . . . . . . . . . . . . . . 2 - 10AN AND . . . . . . . . . . . . . . . . . . 2 - 11 Control instructionsAN/ AND Not . . . . . . . . . . . . . . 2 - 11 MC Master control relay . . . . . 2 - 57OR OR . . . . . . . . . . . . . . . . . . . 2 - 12 MCE Master control relay end . 2 - 57 JP Jump . . . . . . . . . . . . . . . . . 2 - 61OR/ OR Not . . . . . . . . . . . . . . . . 2 - 12 LBL Label . . . . . . . . . . 2 - 61, 2 - 64ST↑ Leading edge start . . . . . . 2 - 14 LOOP Loop . . . . . . . . . . . . . . . . . . 2 - 64ST↓ Trailing edge start . . . . . . 2 - 14 BRK Break . . . . . . . . . . . . . . . . . 2 - 68AN↑ Leading edge AND . . . . . 2 - 14 ED End . . . . . . . . . . . . . . . . . . . 2 - 70AN↓ Trailing edge AND . . . . . . 2 - 14 CNDE Conditional end . . . . . . . . 2 - 71OR↑ Leading edge OR . . . . . . . 2 - 14 EJECT Eject . . . . . . . . . . . . . . . . . . . 2 - 73OR↓ Trailing edge OR . . . . . . . 2 - 14OT↑ Leading edge out . . . . . . . 2 - 16 Step ladder instructionsOT↓ Trailing edge out . . . . . . . 2 - 16 SSTP Start step . . . . . . . . . . . . . . 2 - 75ALT Alternative out . . . . . . . . . 2 - 18 NSTL Next step . . . . . . . . . . . . . . 2 - 75ANS AND stack . . . . . . . . . . . . . 2 - 19 NSTP Next step . . . . . . . . . . . . . . 2 - 75ORS OR stack . . . . . . . . . . . . . . 2 - 21 CSTP Clear step . . . . . . . . . . . . . 2 - 75PSHS Push stack . . . . . . . . . . . . 2 - 23 STPE Step end . . . . . . . . . . . . . . 2 - 75RDS Read stack . . . . . . . . . . . . 2 - 23 SCLR Clear multiple steps . . . . . 2 - 85POPS Pop stack . . . . . . . . . . . . . 2 - 23DF Leading edge differential 2 - 26 Subroutine instructionsDF/ Trailing edge differential . 2 - 26 CALL Subroutine call . . . . . . . . . 2 - 86DFI Leading edge differential FCAL Output off type (initial execution type) . . . 2 - 30 subroutine call . . . . . . . . . 2 - 89SET Set . . . . . . . . . . . . . . . . . . . 2 - 32 SUB Subroutine entry . . . . . . . . 2 - 86RST Reset . . . . . . . . . . . . . . . . . 2 - 32 RET Subroutine return . . . . . . . 2 - 86KP Keep . . . . . . . . . . . . . . . . . 2 - 34NOP No operation . . . . . . . . . . . 2 - 35 Interrupt instructions INT Interrupt . . . . . . . . . . . . . . . 2 - 97Basic function instructions IRET Interrupt return . . . . . . . . . 2 - 97TML On - delay timer TML . . . . 2 - 36 ICTL Interrupt control 2 - 102, 2 - 109TMR On - delay timer TMR . . . . 2 - 42vi
  • 8. Table of ContentsSpecial setting instructions AN< 16 - bit data compare (AND) . . . . . . . . . . . . . . . . 2 - 136SYS1 Communication conditions setting . . . . . . . . . . . . . . . 2 - 116 AN<= 16 - bit data compare Password setting . . . . . . 2 - 120 (AND) . . . . . . . . . . . . . . . . 2 - 136 Interrupt setting . . . . . . . 2 - 122 AND= 32 - bit data compare (AND) . . . . . . . . . . . . . . . . 2 - 138 PLC link time setting . . . 2 - 124 RS485 response time AND<> 32 - bit data compare control . . . . . . . . . . . . . . . 2 - 126 (AND) . . . . . . . . . . . . . . . . 2 - 138SYS2 Change system registers AND> 32 - bit data compare (No.40 to No.47) . . . . . . 2 - 128 (AND) . . . . . . . . . . . . . . . . 2 - 138 AND>= 32 - bit data compareData compare instructions (AND) . . . . . . . . . . . . . . . . 2 - 138ST= 16 - bit data compare AND< 32 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 132 (AND) . . . . . . . . . . . . . . . . 2 - 138ST<> 16 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 132 AND<= 32 - bit data compare (AND) . . . . . . . . . . . . . . . . 2 - 138ST> 16 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 132 OR= 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 140ST>= 16 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 132 OR<> 16 - bit data compareST< 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 140 (Start) . . . . . . . . . . . . . . . . 2 - 132 OR> 16 - bit data compareST<= 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 140 (Start) . . . . . . . . . . . . . . . . 2 - 132STD= 32 - bit data compare OR>= 16 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 134 (OR) . . . . . . . . . . . . . . . . . 2 - 140STD<> 32 - bit data compare OR< 16 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 134 (OR) . . . . . . . . . . . . . . . . . 2 - 140STD> 32 - bit data compare OR<= 16 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 134 (OR) . . . . . . . . . . . . . . . . . 2 - 140STD>= 32 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 134 ORD= 32 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 142STD< 32 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 134 ORD<> 32 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 142STD<= 32 - bit data compare (Start) . . . . . . . . . . . . . . . . 2 - 134 ORD> 32 - bit data compareAN= 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 142 (AND) . . . . . . . . . . . . . . . . 2 - 136 ORD>= 32 - bit data compareAN<> 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 142 (AND) . . . . . . . . . . . . . . . . 2 - 136AN> 16 - bit data compare ORD< 32 - bit data compare (AND) . . . . . . . . . . . . . . . . 2 - 136 (OR) . . . . . . . . . . . . . . . . . 2 - 142AN>= 16 - bit data compare ORD<= 32 - bit data compare (AND) . . . . . . . . . . . . . . . . 2 - 136 (OR) . . . . . . . . . . . . . . . . . 2 - 142 vii
  • 9. Table of ContentsHigh - level InstructionsData transfer instructionsF0 MV 16-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 8P0 PMVF1 DMV 32-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 10P1 PDMVF2 MV/ 16-bit data invert and move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 12P2 PMV/F3 DMV/ 32-bit data invert and move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 14P3 PDMV/F4 GETS Reading of head word No. of the specified slot. . . . . . . . . . . . . . 3 - 16P4 PGETSF5 BTM Bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 17P5 PBTMF6 DGT Hexadecimal digit (4-bit) data move . . . . . . . . . . . . . . . . . . . . . . . 3 - 21P6 PDGTF7 MV2 Two 16-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 25P7 PMV2F8 DMV2 Two 32-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 27P8 PDMV2F10 BKMV Block move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 29P10 PBKMVF11 COPY Block copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 31P11 PCOPYF12 ICRD Data read from EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 32 Data read from F - ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 34F12 ICRD Data read from IC card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 37P12 PICRDP13 PICWT Data write to EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 38 Data write to F - ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 40F13 ICWT Data write to IC card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 43P13 PICWTF14 PGRD Program read from IC card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 45P14 PPGRDF15 XCH 16-bit data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 49P15 PXCHF16 DXCH 32-bit data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 51P16 PDXCHF17 SWAP Higher/ lower byte in 16-bit data exchange . . . . . . . . . . . . . . . . . 3 - 53P17 PSWAPF18 BXCH 16 - bit blocked data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 55P18 PBXCHviii
  • 10. Table of ContentsControl instructionF19 SJP Auxiliary jump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 57Binary arithmetic instructionsF20 + 16-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 59P20 P+F21 D+ 32-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 61P21 PD+F22 + 16-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 63P22 P+F23 D+ 32-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 65P23 PD+F25 - 16-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 67P25 P-F26 D- 32-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 69P26 PD -F27 - 16-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 71P27 P-F28 D- 32-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 73P28 PD -F30 * 16-bit data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 75P30 P*F31 D* 32-bit data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 77P31 PD*F32 % 16-bit data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 79P32 P%F33 D% 32-bit data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 81P33 PD%F34 *W 16-bit data multiplication (result in 16 bits) . . . . . . . . . . . . . . . . . . 3 - 83P34 P*WF35 +1 16-bit data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 85P35 P+1F36 D+1 32-bit data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 87P36 PD+1F37 -1 16-bit data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 89P37 P-1F38 D-1 32-bit data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 91P38 PD - 1F39 D*D 32-bit data multiplication (result in 32 bits) . . . . . . . . . . . . . . . . . . 3 - 93P39 PD*DBCD arithmetic instructionsF40 B+ 4-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 95P40 PB+F41 DB+ 8-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 97P41 PDB+ ix
  • 11. Table of ContentsF42 B+ 4-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 99P42 PB+F43 DB+ 8-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 101P43 PDB+F45 B- 4-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 103P45 PB -F46 DB - 8-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 105P46 PDB -F47 B- 4-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 107P47 PB -F48 DB - 8-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 109P48 PDB -F50 B* 4-digit BCD data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 111P50 PB*F51 DB* 8-digit BCD data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 113P51 PDB*F52 B% 4-digit BCD data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 115P52 PB%F53 DB% 8-digit BCD data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 117P53 PDB%F55 B+1 4-digit BCD data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 119P55 PB+1F56 DB+1 8-digit BCD data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 121P56 PDB+1F57 B-1 4-digit BCD data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 123P57 PB - 1F58 DB - 1 8-digit BCD data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 125P58 PDB - 1Data compare instructionsF60 CMP 16-bit data comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 127P60 PCMPF61 DCMP 32-bit data comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 131P61 PDCMPF62 WIN 16-bit data band comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 135P62 PWINF63 DWIN 32-bit data band comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 137P63 PDWINF64 BCMP Block data comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 139P64 PBCMPLogic operation instructionsF65 WAN 16-bit data AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 143P65 PWANF66 WOR 16-bit data OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 145P66 PWORx
  • 12. Table of ContentsF67 XOR 16-bit data exclusive OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 147P67 PXORF68 XNR 16-bit data exclusive NOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 149P68 PXNRF69 WUNI 16-bit data unite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 151P69 PWUNIData conversion instructionsF70 BCC Block check code calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 153P70 PBCCF71 HEXA Hexadecimal data → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . 3 - 156P71 PHEXAF72 AHEX ASCII code → Hexadecimal data . . . . . . . . . . . . . . . . . . . . . . . . 3 - 159P72 PAHEXF73 BCDA BCD date →ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 163P73 PBCDAF74 ABCD ASCII code → BCD data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 167P74 PABCDF75 BINA 16-bit binary data → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 171P75 PBINAF76 ABIN ASCII code → 16-bit binary data . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 175P76 PABINF77 DBIA 32-bit binary data → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 178P77 PDBIAF78 DABI ASCII code → 32-bit binary data . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 181P78 PDABIF80 BCD 16-bit binary data → 4-digit BCD data . . . . . . . . . . . . . . . . . . . . 3 - 185P80 PBCDF81 BIN 4-digit BCD data → 16-bit binary data . . . . . . . . . . . . . . . . . . . . 3 - 187P81 PBINF82 DBCD 32-bit binary data → 8-digit BCD data . . . . . . . . . . . . . . . . . . . . 3 - 189P82 PDBCDF83 DBIN 8-digit BCD data → 32-bit binary data . . . . . . . . . . . . . . . . . . . . 3 - 191P83 PDBINF84 INV 16-bit data invert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 192P84 PINVF85 NEG 16-bit data complement of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 193P85 PNEGF86 DNEG 32-bit data complement of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 195P86 PDNEGF87 ABS 16-bit data absolute value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 197P87 PABSF88 DABS 32-bit data absolute value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 198P88 PDABSF89 EXT 16-bit data sign extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 199P89 PEXT xi
  • 13. Table of ContentsF90 DECO Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 201P90 PDECOF91 SEGT 7-segment decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 205P91 PSEGTF92 ENCO Encode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 207P92 PENCOF93 UNIT 16-bit data combine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 211P93 PUNITF94 DIST 16-bit data distribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 213P94 PDISTF95 ASC Character → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 215P95 PASCF96 SRC 16-bit data search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 219P96 PSRCF97 DSRC 32-bit data search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 221P97 PDSRCData shift instructionsF98 CMPR Data table shift-out and compress . . . . . . . . . . . . . . . . . . . . . . . . 3 - 223P98 PCMPRF99 CMPW Data table shift-in and compress . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 226P99 PCMPWF100 SHR Right shift of multiple bits (n bits) in a 16-bit data . . . . . . . . . . . 3 - 229P100 PSHRF101 SHL Left shift of multiple bits (n bits) in a 16-bit data . . . . . . . . . . . . 3 - 231P101 PSHLF102 DSHR Right shift of n bits in a 32-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 - 233P102 PDSHRF103 DSHL Left shift of n bits in a 32-bit data . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 235P103 PDSHLF105 BSR Right shift of one hexadecimal digit (4 bits) . . . . . . . . . . . . . . . . 3 - 237P105 PBSRF106 BSL Left shift of one hexadecimal digit (4 bits) . . . . . . . . . . . . . . . . . 3 - 239P106 PBSLF108 BITR Right shift of multiple bits of 16 - bit data range . . . . . . . . . . . . . 3 - 241P108 PBITRF109 BITL Left shift of multiple bits of 16 - bit data range . . . . . . . . . . . . . . 3 - 243P109 PBITLF110 WSHR Right shift of one word (16 bits) of 16 - bit data range . . . . . . . . 3 - 245P110 PWSHRF111 WSHL Left shift of one word (16 bits) of 16 - bit data range . . . . . . . . . 3 - 247P111 PWSHLF112 WBSR Right shift of one hexadecimal digit (4-bit) of 16 - bit data range 3 - 249P112 PWBSRF113 WBSL Left shift of one hexadecimal digit (4-bit) of 16 - bit data range 3 - 251P113 PWBSLxii
  • 14. Table of ContentsFIFO instructionsF115 FIFT FIFO buffer definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 253P115 PFIFTF116 FIFR Data read from FIFO buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 255P116 PFIFRF117 FIFW Data write to FIFO buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 259P117 PFIFWBasic function instructionsF118 UDC UP/DOWN counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 266F119 LRSR Left/right shift register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 269Data rotate instructionsF120 ROR 16-bit data right rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 273P120 PRORF121 ROL 16-bit data left rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 275P121 PROLF122 RCR 16-bit data right rotation with carry flag data . . . . . . . . . . . . . . . 3 - 277P122 PRCRF123 RCL 16-bit data left rotation with carry flag data . . . . . . . . . . . . . . . . 3 - 279P123 PRCLF125 DROR 32-bit data right rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 281P125 PDRORF126 DROL 32-bit data left rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 283P126 PDROLF127 DRCR 32-bit data right rotation with carry flag data . . . . . . . . . . . . . . . 3 - 285P127 PDRCRF128 DRCL 32-bit data left rotation with carry flag data . . . . . . . . . . . . . . . . 3 - 287P128 PDRCLBit manipulation instructionsF130 BTS 16-bit data bit set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 289P130 PBTSF131 BTR 16-bit data bit reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 291P131 PBTRF132 BTI 16-bit data bit invert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 293P132 PBTIF133 BTT 16-bit data bit test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 295P133 PBTTF135 BCU Number of on (1) bits in 16-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 - 297P135 PBCUF136 DBCU Number of on (1) bits in 32-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 - 299P136 PDBCUBasic function instructionF137 STMR Auxiliary timer (16 - bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 301 xiii
  • 15. Table of ContentsSpecial instructionsF138 HMSS Hours, minutes, and seconds data to seconds data . . . . . . . . . 3 - 304P138 PHMSSF139 SHMS Seconds data to hours, minutes, and seconds data . . . . . . . . . 3 - 306P139 PSHMSF140 STC Carry flag (R9009) set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 309P140 PSTCF141 CLC Carry flag (R9009) reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 310P141 PCLCF142 WDT Watching dog timer update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 311P142 PWDTF143 IORF Partial I/O update for FP0/FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 313 Partial I/O update for FP1/FP - M . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 313F143 IORF Partial I/O update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 315P143 PIORFF144 TRNS Serial data communication for FP0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 318 for FP1/FP - M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 324 for FP2/FP2SH/FP3/FP10SH . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 333F145 SEND Data send (MEWNET link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 344P145 PSENDF146 RECV Data receive (MEWNET link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 354P146 PRECVF147 PR Printout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 364F148 ERR Self-diagnostic error set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 368P148 PERRF149 MSG Message display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 370P149 PMSGF150 READ Data read from intelligent unit . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 373P150 PREADF151 WRT Data write into intelligent unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 376P151 PWRTF152 RMRD Data read from MEWNET-F slave station . . . . . . . . . . . . . . . . . 3 - 379P152 PRMRDF153 RMWT Data write into MEWNET-F slave station . . . . . . . . . . . . . . . . . . 3 - 383P153 PRMWTF155 SMPL Sampling start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 387P155 PSMPLF156 STRG Sampling stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 389P156 PSTRGF157 CADD Time addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 391P157 PCADDF158 CSUB Time substruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 394P158 PCSUBF159 MTRN Serial data communicationP159 PMTRN for FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 398 for FP2/FP2SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 406xiv
  • 16. Table of ContentsF161 MRCV Serial data reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 410P161 PMRCVBIN arithmetic instructionsF160 DSQR 32-bit data square root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 413P160 PDSQRSpecial instructions (High - speed counter instructions)F0 MV High - speed counter control for FP1/FP - M . . . . . . . . . . . . . . . . 3 - 415 High - speed counter control for FP0/FPΣ . . . . . . . . . . . . . . . . . 3 - 436 Pulse output control for FP0/FPΣ . . . . . . . . . . . . . . . . . . . . . . . . 3 - 440F1 DMV Set and read of the elapsed value of high - speed counter for FP1/FP - M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 420 Writing and reading the high - speed counter and pulse output elapsed value for FP0/FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 444F162 HC0S High - speed counter output set . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 423F163 HC0R High - speed counter output reset . . . . . . . . . . . . . . . . . . . . . . . . 3 - 425F164 SPD0 Pulse output control (Transistor output type) . . . . . . . . . . . . . . . 3 - 427 Pattern output control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 431F165 CAM0 Cam control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 436F166 HC1S Target value match on (with channel specification) . . . . . . . . . 3 - 456F167 HC1R Target value match off (with channel specification) . . . . . . . . . 3 - 458F168 SPD1 Positioning control (trapezoidal control) . . . . . . . . . . . . . . . . . . . 3 - 460 Positioning control (home position return) . . . . . . . . . . . . . . . . . 3 - 456F169 PLS Pulse output (with channel specification)(JOG operation) . . . . 3 - 468F170 PWM PWM output (with channel specification) . . . . . . . . . . . . . . . . . . 3 - 470F171 SPDH Pulse output (with channel specification) (trapezoidal control) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 464 (home position return) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 468F172 PLSH Pulse output (with channel specification)(JOG operation) . . . . 3 - 473F173 PWMH PWM output (with channel specification) . . . . . . . . . . . . . . . . . . 3 - 476F174 SP0H Pulse output (with channel specification) (Selectable data table control operation) . . . . . . . . . . . . . . . . . 3 - 479F175 SPSH Pulse output (Linear interpolation) . . . . . . . . . . . . . . . . . . . . . . . 3 - 483F176 SPCH Pulse output (Circular interpolation) . . . . . . . . . . . . . . . . . . . . . . 3 - 488Screen display instructionsF180 SCR FP - e screen display registration . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 492F181 DSP FP - e screen display switching . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 495Basic function instructionF183 DSTM Auxiliary timer (32-bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 504 xv
  • 17. Table of ContentsData transfer instructionsF190 MV3 Three 16-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 508P190 PMV3F191 DMV3 Three 32-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 510P191 PDMV3Logic operation instructionsF215 DAND 32-bit data AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 512P215 PDANDF216 DOR 32-bit data OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 514P216 PDORF217 DXOR 32-bit data XOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 516P217 PDXORF218 DXNR 32-bit data XNR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 518P218 PDXNRF219 DUNI 32-bit data unites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 520P219 PDUNIF230 TMSEC Time data Second conversion . . . . . . . . . . . . . . . . . . . . . . . . 3 - 522P230 PTMSECF231 SECTM Second Time data conversion . . . . . . . . . . . . . . . . . . . . . . . . 3 - 524P231 PSECTMData conversion instructionsF235 GRY 16 - bit data → Gray code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 526P235 PGRYF236 DGRY 32 - bit data → Gray code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 527P236 PDGRYF237 GBIN 16 - bit Gray code → 16 - bit binary data . . . . . . . . . . . . . . . . . . . 3 - 528P237 PGBINF238 DGBIN 32 - bit Gray code → 32 - bit binary data . . . . . . . . . . . . . . . . . . . . 3 - 529P238 PDGBINF240 COLM Bit line to bit column conversion . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 532P240 PCOLMF241 LINE Bit column to bit line conversion . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 534P241 PLINECharacter string instructionsF257 SCMP Comparing character strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 526P257 PSCMPF258 SADD Character string coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 528P258 PSADDF259 LEN Number of characters in a character string . . . . . . . . . . . . . . . . 3 - 530P259 PLENF260 SSRC Search for character string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 532P260 PSSRCxvi
  • 18. Table of ContentsF261 RIGHT Retrieving data from character strings (right side) . . . . . . . . . . 3 - 534P261 PRIGHTF262 LEFT Retrieving data from character strings (left side) . . . . . . . . . . . 3 - 536P262 PLEFTF263 MIDR Retrieving a character string from a character string . . . . . . . . 3 - 538P263 PMIDRF264 MIDW Writing a character string to a character string . . . . . . . . . . . . . 3 - 540P264 PMIDWF265 SREP Replacing character strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 542P265 PSREPInteger type data processing instructionsF270 MAX Maximum value search in 16-bit data table . . . . . . . . . . . . . . . . 3 - 556P270 PMAXF271 DMAX Maximum value search in 32-bit data table . . . . . . . . . . . . . . . . 3 - 558P271 PDMAXF272 MIN Minimum value search in 16-bit data table . . . . . . . . . . . . . . . . . 3 - 560P272 PMINF273 DMIN Minimum value search in 32-bit data table . . . . . . . . . . . . . . . . . 3 - 562P273 PDMINF275 MEAN Total and mean numbers calculation in 16-bit data table . . . . . 3 - 564P275 PMEANF276 DMEAN Total and mean numbers calculation in 32-bit data table . . . . . 3 - 566P276 PDMEANF277 SORT Sort data in 16-bit data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 568P277 PSORTF278 DSORT Sort data in 32-bit data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 570P278 PDSORTF282 SCAL Scaling of 16-bit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 560P282 PSCALF283 DSCAL Scaling of 32-bit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 562P283 PDSCALInteger type non-linear function instructionsF285 LIMT 16-bit data upper and lower limit control . . . . . . . . . . . . . . . . . . . 3 - 576P285 PLIMTF286 DLIMT 32-bit data upper and lower limit control . . . . . . . . . . . . . . . . . . . 3 - 578P286 PDLIMTF287 BAND 16-bit data deadband control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 580P287 PBANDF288 DBAND 32-bit data deadband control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 582P288 PDBANDF289 ZONE 16-bit data zone control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 584P289 PZONEF290 DZONE 32-bit data zone control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 586P290 PDZONE xvii
  • 19. Table of ContentsBCD type real number operation instructionsF300 BSIN BCD type Sine operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 588P300 PBSINF301 BCOS BCD type Cosine operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 590P301 PBCOSF302 BTAN BCD type Tangent operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 592P302 PBTANF303 BASIN BCD type Arcsine operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 594P303 PBASINF304 BACOS BCD type Arccosine operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 596P304 PBACOSF305 BATAN BCD type Arctangent operation . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 598P305 PBATANFloating point type real number operation instructions (for FP2/FP2SH/FP10SH)F309 FMV Floating point data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 600P309 PFMVF310 F+ Floating point data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 602P310 PF+F311 F- Floating point data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 604P311 PF -F312 F* Floating point data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 606P312 PF*F313 F% Floating point data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 608P313 PF%F314 SIN Floating point data Sine operation . . . . . . . . . . . . . . . . . . . . . . . . 3 - 610P314 PSINF315 COS Floating point data Cosine operation . . . . . . . . . . . . . . . . . . . . . 3 - 612P315 PCOSF316 TAN Floating point data Tangent operation . . . . . . . . . . . . . . . . . . . . . 3 - 614P316 PTANF317 ASIN Floating point data Arcsine operation . . . . . . . . . . . . . . . . . . . . . 3 - 616P317 PASINF318 ACOS Floating point data Arccosine operation . . . . . . . . . . . . . . . . . . . 3 - 618P318 PACOSF319 ATAN Floating point data Arctangent operation . . . . . . . . . . . . . . . . . . 3 - 620P319 PATANF320 LN Floating point data natural logarithm . . . . . . . . . . . . . . . . . . . . . . 3 - 622P320 PLNF321 EXP Floating point data exponent . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 624P321 PEXPF322 LOG Floating point data logarithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 626P322 PLOGF323 PWR Floating point data power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 628P323 PPWRxviii
  • 20. Table of ContentsF324 FSQR Floating point data square root . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 630P324 PFSQRF325 FLT 16-bit integer data → Floating point real number data . . . . . . . 3 - 632P325 PFLTF326 DFLT 32-bit integer data → Floating point real number data . . . . . . . 3 - 634P326 PDFLTF327 INT Floating point real number data →16-bit integer data (largestP327 PINT integer not exceeding the floating point real number data) . . . 3 - 636F328 DINT Floating point real number data → 32-bit integer data (largestP328 PDINT integer not exceeding the floating point real number data) . . 3 - 638F329 FIX Floating point real number data →16-bit integer dataP329 PFIX (rounding the first decimal point down to integer) . . . . . . . . . . . 3 - 640F330 DFIX Floating point real number data →32-bit integer dataP330 PDFIX (rounding the first decimal point down to integer) . . . . . . . . . . . 3 - 642F331 ROFF Floating point real number data →16-bit integer dataP331 PROFF (rounding the first decimal point off to integer) . . . . . . . . . . . . . 3 - 644F332 DROFF Floating point real number data →32-bit integer dataP332 PDROFF (rounding the first decimal point off to integer) . . . . . . . . . . . . . 3 - 646F333 FINT Floating point real number data rounding the first decimalP333 PFINT point down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 648F334 FRINT Floating point real number data rounding the first decimalP334 PFRINT point off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 650F335 F+/ - Floating point real number data sign changes . . . . . . . . . . . . . . 3 - 652P335 PF+/ -F336 FABS Floating point real number data absolute . . . . . . . . . . . . . . . . . . 3 - 654P336 PFABSF337 RAD Floating point real number data conversion of angle unitsP337 PRAD (Degrees → Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 656F338 DEG Floating point real number data conversion of angle unitsP338 PDEG (Radians → Degrees) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 658Floating point type real number data processing instructionsF345 FCMP Floating point real number data comparison . . . . . . . . . . . . . . . 3 - 660P345 PFCMPF346 FWIN Floating point real number data band comparison . . . . . . . . . . 3 - 662P346 PFWINF347 FLIMT Floating point data upper and lower limit control for realP347 PFLIMT number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 664F348 FBAND Floating point real number data deadband control . . . . . . . . . . 3 - 666P348 PFBANDF349 FZONE Floating point real number data zone control . . . . . . . . . . . . . . 3 - 668P349 PFZONEF350 FMAX Maximum value search in floating point real number dataP350 PFMAX table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 670 xix
  • 21. Table of ContentsF351 FMIN Minimum value search in floating point real number dataP351 PFMIN table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 672F352 FMEAN Total and mean numbers calculation in floating point realP352 PFMEAN number data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 674F353 FSORT Sort data in real number floating point data table . . . . . . . . . . . 3 - 676P353 PFSORTF354 FSCAL Scaling of real number data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 678P354 PFSCALTime series processing instructionF355 PID PID processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 680Compare instructionsF373 DTR 16-bit data revision detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 688P373 PDTRF374 DDTR 32-bit data revision detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 690P374 PDDTRIndex register bank processing instructionsF410 SETB Setting the index register bank number . . . . . . . . . . . . . . . . . . . 3 - 692P410 PSETBF411 CHGB Changing the index register bank number . . . . . . . . . . . . . . . . . 3 - 694P411 PCHGBF412 POPB Restoring the index register bank number . . . . . . . . . . . . . . . . . 3 - 696P412 PPOPBFile register bank processing instructionsF414 SBFL Setting the file register bank number . . . . . . . . . . . . . . . . . . . . . 3 - 697P414 PSBFLF415 CBFL Changing the file register bank number . . . . . . . . . . . . . . . . . . . 3 - 698P415 PCBFLF416 PBFL Restoring the file register bank number . . . . . . . . . . . . . . . . . . . 3 - 699P416 PPBFLxx
  • 22. Chapter 1 Relays, Memory Areas and Constants
  • 23. Relays, Memory Areas and Constants1.1 Table of Relays, Memory Areas and Constants1.1.1 FP0/FP - eFP0Item Numbering Function C10/C14 C32/SL1 T32C /C16Relay External input (X) 208 points (X0 to X12F) Turns on/off based on external input. relay External output (Y) 208 points (Y0 to Y12F) Externally outputs on/off state. relay Internal relay (R) 1,008 points (R0 to R62F) Relay which turns on/off only within pro- (* Note 2) gram. Timer (T) 144 points If a TM instruction has timed out, the (* Note 2) ( ) (T0 to T99/C100 to C143) contact with the same number turns on. (* N t 1) Note Counter (C) If a CT instruction has counted up, the (* Note 2) contact with the same number turns on. Special internal (R) 64 points (R9000 to R903F) Relay which turns on/off based on spe- relay cific conditions and is used as a flag.Memory External input (WX) 13 words (WX0 to WX12) Code for specifying 16 external inputa eaarea relay points as one word (16 bits) of data. External output (WY) 13 words (WY0 to WY12) Code for specifying 16 external output relay points as one word (16 bits) of data. Internal relay (WR) 63 words (WR0 to WR62) Code for specifying 16 internal relay (* Note 2) points as one word (16 bits) of data. Data register (DT) 1,660 6,144 16,384 Data memory used in program. Data is (* Note 2) words words words handled in 16- bit units (one word). (DT0 to (DT0 to (DT0 to DT1659) DT6143) DT16383) Timer/Counter (SV) 144 words Data memory for storing a target value set value area (SV0 to SV143) of a timer and an initial value of a count- (* Note 2) er. Stores by timer/counter number. Timer/Counter (EV) 144 words Data memory for storing the elapsed elapsed value area (EV0 to EV143) value during operation of a timer/count- (* Note 2) er. Stores by timer/counter number. Special data (DT) 112 words 112 words Data memory for storing specific data. register (DT9000 to DT9111) (DT90000 Various settings and error codes are to stored. DT90111) Index register (I) 2 words (IX, IY) Register can be used as an address of memory area and constants modifier.Constant Decimal (K) K - 32768 to K32767 (for 16-bit operation) ( ) constants t t K - 2147483648 to K2147483647 (for 32-bit operation) Hexadecimal (H) H0 to HFFFF (for 16-bit operation) ( ) constants t t H0 to HFFFFFFFF (for 32-bit operation)1-2
  • 24. 1.1 Table of Relays, Memory Areas and ConstantsNotes 1) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are the numbers when system register 5 is at its default setting. 2) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing form the RUN mode to PROG. mode, and the non - hold type that resets them. For the FP0 T32C, the selection of hold type and non - hold type can be changed by the setting of system register. These areas can be spcified as hold type or non - hold type by setting system register. For the FP0 C10/C14/C16/C32/SL1, that area is fixed and allotted the numbers as shown below. Hold type and Non-hold type areas Item C10/C14/C16 C32/SL1 Timer Non- hold type: All points Counter Non-hold type From the set value to C139 From the set value to C127 Hold type 4 points (elapsed values) 16 points (elapsed values) (C140 to C143) C128 to C143 Internal Non-hold type 976 points 880 points relay (R0 to R60F) (R0 to R54F) 61 words 55 words (WR0 to WR60) (WR0 to WR54) Hold type 32 points (R610 to R62F) 128 points (R550 to R62F) 2 words (WR61 to WR62) 8 words (WR55 to WR62) Data Non-hold type 1652 words 6112 words eg s e register (DT0 to DT1651) (DT0 to DT6111) Hold type 8 words 32 words (DT1652 to DT1659) (DT6112 to DT6143) 1-3
  • 25. Relays, Memory Areas and ConstantsFP - e Item Number Memory area available for use Function of points Matsushita IEC External input relay 208 X0 - X12F %IX0.0 - Turns on or off based on (see note 3) %IX12.15 external input. External output relay 208 Y0 - Y12F %QX0.0 - Outputs on or off state (see note 3) %QX12.15 externally. Internal relay 1008 R0 - R62F %MX0.0 - Turns on or off only within a (see note 2) %MX0.62.15 program. Timer 100 T0 - T99/ %MX1.0 - Turns on when the timer reaches (see notes 1 and 2) C100- C143 %MX1. 99/ the specified time.Relay %MX2.100- Corresponds to the timer %MX2.143 number. Counter 44 C100- C143/ %MX2.100- Turns on when the counter (see notes 1 and 2) T0 - T99 %MX2.143/ increments. %MX1.0 - Corresponds to the counter %MX1.99 number. Special internal relay 64 R9000 - R903F %MX0.900.0 - Turns on or off based on specific %MX0.903.15 conditions. Used as a flag. External input relay 13 words WX0 - WX12 %IW0 - Code for specifying 16 external (see note 3) %IW12 input points as one word (16 bits) of data. External output relay 13 words WY0 - WY12 %QW0 - Code for specifying 16 external (see note 3) %QW12 output points as one word (16 bits) of data. Internal relay 63 words WR0 - WR62 %MW0.0 - Code for specifying 16 internal (see note 2) %MW0.62 relay points as one word (16 bits) of data. Data register 1660 words DT0 - DT1659 %MW5.0 - Data memory used in a (see note 2) %MW5.1659 program. Data is handled in words) 16-bit units (one word).Memor area (wo Timer/counter set 144 words SV0 - SV143 %MW3.0 - Data memory for storing a target value area %MW3.143 value of a timer and an initial value of a counter. Stores by timer/counter number. ory Timer/counter elapsed 144 words EV0 - EV143 %MW4.0 - Data memory for storing the value area (see note 2) %MW4.143 elapsed value during operation of a timer/counter. Stores by timer/counter number. Special data 112 words DT9000 - %MW5.9000- Data memory for storing register DT9111 %MW5.9111 specific data. Various settings and error codes are stored. Index register 2 words IX - IY %MW6.0 - Used as an address of memory %MW6.1 area and constants modifier.1-4
  • 26. 1.1 Table of Relays, Memory Areas and Constants Item Number of Memory area available for use Function points Matsushita IEC External input relay 6 double DWX0 - DWX11 %ID0 - Code for specifying 32 external (see note 3) words %ID11 input points as a double wordMemory are (double word) (see note 4) (32 bits) of data. e External output relay 6 double DWY0 - DWY11 %QD0 - Code for specifying 32 external (see note 3) words %QD11 output points as double word (32 bits) of data. w Internal relay 31 double DWR0 - DWR61 %MD0.0 - Code for specifying 32 internal (see note 2) words %MD0.61 relay points as double word (32 bits) of data. rea Data register 830 double DDT0 - %MD5.0 - Data memory used in a (see note 2) words DDT1658 %MD5.1658 program. Data is handled in 32-bit units (double word).M Timer/counter set 72 double DSV0 - DSV142 %MD3.0 - Data memory for storing a value area words %MD3.142 target value of a timer and an initial value of a counter. Stores by timer/counter number. Timer/counter 72 double DEV0 - DEV142 %MD4.0 - Data memory for storing the elapsed value area (see words %MD4.142 elapsed value during operation note 2) of a timer/counter. Stores by timer/counter number. Special data 56 double DDT9000 - %MD5.9000- Data memory for storing register words DDT9110 %MD5.9110 specific data. Various settings and error codes are stored. Index register 1 double DI0 %MD6.0 Used as an address of words memory area and constants modifier. Item Range available for use g Matsushita IEC Decimal constants K - 32768 to K32767 (for 16-bit operation) - 32768 to 32767 (for 16-bit operation) (integral type) K - 2147483648 to K2147483647 - 2147483648 to 2147483647 (for 32-bit operation) (for 32-bit operation) Hexadecimal H0 to HFFFF (for 16-bit operation) 16#0 to 16#FFFF (for 16-bit operation) ant constantsConsta H0 to HFFFFFFFF (for 32-bit operation) 16#0 to 16#FFFFFFFF (for 32-bit operation)C Decimal constants F - 1.175494×10 - 38 to F - 3.402823×1038 - 1.17549410E - 38 to - 3.402823E38 (monorefined real number) F1.175494×10 - 38 to F3.402823×1038 1.17549410E - 38 to 3.402823E38 1-5
  • 27. Relays, Memory Areas and Constants Notes 1) The points for the timer and counter can be changed by the setting of System register No. 5. The number given in the table above are the numbers when System register No. 5 is at its default setting. 2) There are two unit types; the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non - hold type that resets them. These areas can be specified as hold type or non - hold type by setting system register. For the FP - e, that area is fixed and allotted the numbers as shown in the table below. For the FP - e with clock/calendar function type, the selection of hold type and non - hold type can be changed by the setting of system register. 3) The number of points noted above is the number reserved in the system. For the actual number of points available for use, refer to “I/O Allocation” in Appendix A. 4) Double words cannot be specified with FPWIN GR. Hold type and non - hold type areas*1 Model AFPE224300 AFPE224305 AFPE214325 (Standard type) (Calendar timer (Thermocouple type) input type) Timer Non- hold type: all points Counter Non-hold type From the set value to C139 Hold type yp C140 to C143, EV140 to EV143 (elapsed value) SV: non- hold *2 SV: hold Internal Non-hold type 976 points (R0 to R60F) e ay relay 61 words (WR0 to WR60) Hold type 32 points (R610 to R62F) 2 words (WR61 to WR62) Data Non-hold type 1652 words (DT0 to DT1651) register i t Hold type 8 words (DT1652 to DT1659) *1 When a battery is installed in a calendar timer type FP - e, the areas above can be changed using the system register. If a battery is not installed, the data cannot be stored even when the settings are changed using the system register. *2 Use the following methods for holding the SV data: - Set the transfer instruction for the special data register (DT) to hold the data. Then, perform the setting so that the data can be transferred from DT to SV after the RUN mode starts. - Use the FP - e model with a battery.1-6
  • 28. 1.1 Table of Relays, Memory Areas and Constants1.1.2 FPΣ Item Number Memory area available for use Function of points External input relay 512 X0 - X31F Turns on or off based on (see note 1) external input. FPG - C32T/C32TTM External input relay 1184 X0 - X73F (see note 1) FPG - C32T2/C32T2TM FPG - C24R2/C24R2TM FPG - C28P2 External output relay 512 Y0 - Y31F Externally outputs on or off state. (see note 1) FPG - C32T/C32TTM External output relay 1184 Y0 - Y73F (see note 1) FPG - C32T2/C32T2TM FPG - C24R2/C24R2TM elay FPG - C28P2Rel Internal relay 1568 R0 - R97F Turns on or off only within a (see note 2) program. Link relay 1024 L0 - L63F Shared relay used for PLC link. (see note 2) Timer 1024 T0 - T1007/C1008 - C1023 Goes on when the timer reaches (see notes 2 the specified time. and 3) Corresponds to the timer number. Counter 1024 C1008 - C1023/T0 - T1007 Goes on when the timer (see notes 2 increments. and 3) Corresponds to the timer number. Special internal relay 176 R9000 - R910F Turns on or off based on specific conditions. Used as a flag. External input relay 32 words WX0 - WX31 Code for specifying 16 external (see note 1) input points as one word (16 FPG - C32T/C32TTM ) bits) of data. External input relay 74 words WX0 - WX73 (see note 1) FPG - C32T2/C32T2TM FPG - C24R2/C24R2TM FPG - C28P2 External output relay 32 words WY0 - WY31 Code for specifying 16 external words) (see note 1) output points as one word (16 FPG - C32T/C32TTM ) bits) of data. mory area (wo External output relay 74 words WY0 - WY73 (see note 1) FPG - C32T2/C32T2TM FPG - C24R2/C24R2TM FPG - C28P2Mem Internal relay 98 words WR0 - WR97 Code for specifying 16 internal (see note 2) relay points as one word (16 bits) of data. Link relay 64 words WL0 - WL63 Code for specifying 16 link relay points as one word (16 bits) of data. 1-7
  • 29. Relays, Memory Areas and Constants Item Number of Memory area available for use Function points Data register 32765 words DT0 - DT32764 Data memory used in a (see note 2) program. Data is handled in 16-bit units (one word). Link data register 128 words LD0 - LD127 A shared data memory which (see note 2) is used within the PLC link. Data is handled in 16-bit units (one word).Memory are (words) Timer/counter set 1024 words SV0 - SV1023 Data memory for storing a value area target value of a timer and an (see note 2) initial value of a counter. Stores by timer/counter number. ea Timer/counter elapsed 1024 words EV0 - EV1023 Data memory for storing the value area (see note 2) elapsed value during operation of a timer/counter. Stores by timer/counter number.M Special data 260 words DT90000 - DT90259 Data memory for storing register specific data. Various settings and error codes are stored. Index register 14 words I0 - ID Can be used as an address of memory area and constants modifier. Item Range available for use Decimal constants K - 32768 to K32767 (for 16-bit operation) (integer type) K - 2147483648 to K2147483647 (for 32-bit operation) Hexadecimal H0 to HFFFF (for 16-bit operation)Co ant constantsConsta H0 to HFFFFFFFF (for 32-bit operation) Decimal constants F - 1.175494×10 - 38 to F - 3.402823×1038 (monorefined real number) F1.175494×10 - 38 to F3.402823×1038 Notes 1) The number of points noted above is the number reserved as the calculation memory. The actual number of points available for use is determined by the hardware configuration. 2) If no battery is used, only the fixed area is backed up (counters 16 points: C1008 to C1023, internal relays 128 points: R900 to R97F, data registers: DT32710 to DT32764). When the optional battery is used, data can be backed up. Areas to be held and not held can be specified using the system registers. 3) The points for the timer and counter can be changed by the setting of system register 5. The number given in the table are the numbers when system register 5 is at its default setting.1-8
  • 30. 1.1 Table of Relays, Memory Areas and Constants1.1.3 FP1Item Numbering Function C14/C16 C24/C40 C56/C72Relay External input 208 points (X0 to X12F) Turns on/off based on external input. relay (X) External output 208 points (Y0 to Y12F) Externally outputs on/off state. relay (Y) Internal relay 256 points 1,008 points (R0 to R62F) Relay which turns on/off only within (R) (* Note 1) (R0 to R15F) program. Timer (T) 128 points 144 points If a TM instruction has timed out, the (* Note 1) (T0 to T99/ (T0 to T99/C100 to C143) contact with the same number turns C100 to C127) (* Note 2) ( on. Counter (C) (* Note 2) If a CT instruction has counted up, (* Note 1) the contact with the same number turns on. Special internal 64 points (R9000 to R903F) Relay which turns on/off based on relay (R) specific conditions and is used as a flag.Memory External input 13 words (WX0 to WX12) The word format of external inputarea relay (WX) relay “WX” treats 16- bit relay groups as one word (one word = 16 bits). External output 13 words (WY0 to WY12) The word format of external output relay (WY) relay “WY” treats 16- bit relay groups as one word (one word = 16 bits). Internal relay 16 words 63 words (WR0 to WR62) The word format of internal relay (WR) (WR0 to “WR” treats 16- bit relay groups as WR15) one word (one word = 16 bits). Data register 256 words 1,660 words 6,144 words The data register is a memory area (DT) (* Note 1) (DT0 to (DT0 to (DT0 to for data processed and each data DT255) DT1659) DT6143) register consists of one word (one word = 16 bits). Timer/Counter 128 words 144 words (SV0 to SV143) Data memory for storing a set value set value area (SV0 to of a timer and default value of a (SV) (* Note 1) SV127) counter. Stores by timer/counter number. Timer/Counter 128 words 144 words (EV0 to EV143) Data memory for storing the elapsed elapsed value (EV0 to value during operation of a area (EV) EV127) timer/counter. Stores by timer/counter (* Note 1) number. Special data 70 words (DT9000 to DT9069) Data memory for storing specific register (DT) data. Various settings and error codes are stored. Index register 2 words (IX, IY) Register can be used as an address (I) of memory area and constants modifier.Constant Decimal K - 32768 to K32767 (for 16-bit operation) constants (K) t t K - 2147483648 to K2147483647 (for 32-bit operation) Hexadecimal H0 to HFFFF (for 16-bit operation) constants (H) t t H0 to HFFFFFFFF (for 32-bit operation) 1-9
  • 31. Relays, Memory Areas and Constants Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non - hold type that resets them. These areas can be specified as hold type or non - hold type by setting system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are the numbers when system register 5 is at its default setting.1 - 10
  • 32. 1.1 Table of Relays, Memory Areas and Constants1.1.4 FP - MItem Numbering Function C16T C20R/ C20RC/ C20T/ C20TC/ C32T C32TCRelay External input 208 points (X0 to X12F) Turns on/off based on external input. relay (X) External output 208 points (Y0 to Y12F) Externally outputs on/off state. relay (Y) Internal relay 256 points 1,008 points Relay which turns on/off only within pro- (R) (* Note 1) (R0 to (R0 to R62F) gram. R15F) Timer (T) 128 points 144 points If a TM instruction has timed out, the con- (* Note 1) (T0 to T99/ (T0 to T99/C100 to C143) tact with the same number turns on. C100 to (* Note 2) Counter (C) C127) If a CT instruction has counted up, the con- (* Note 1) (* Note 2) tact with the same number turns on. Special internal 64 points (R9000 to R903F) Relay which turns on/off based on specific relay (R) conditions and is used as a flag.Memory External input 13 words (WX0 to WX12) The word format of external input relayarea relay (WX) “WX” treats 16- bit relay groups as one word (one word = 16 bits). External output 13 words (WY0 to WY12) The word format of external output relay relay (WY) “WY” treats 16- bit relay groups as one word (one word = 16 bits). Internal relay 16 words 63 words (WR0 to WR62) The word format of internal relay “WR” (WR) (WR0 to treats 16- bit relay groups as one word WR15) (one word = 16 bits). Data register 256 words 1,660 6,144 The data register is a memory area for (DT) (* Note 1) (DT0 to words (DT0 words (DT0 data processed and each data register DT255) to to consists of one word (one word = 16 bits). DT1659) DT6143) Timer/Counter 128 words 144 words (SV0 to Data memory for storing a set value of a set value area (SV0 to SV143) timer and default value of a counter. (SV) (* Note 1) SV127) Stores by timer/counter number. Timer/Counter 128 words 144 words (EV0 to Data memory for storing the elapsed value elapsed value (EV0 to EV143) during operation of a timer/counter. Stores area (EV) EV127) by timer/counter number. (* Note 1) Special data 70 words 112 words Data memory for storing specific data. register (DT) (DT9000 to (DT9000 to DT9069) Various settings and error codes are DT9069) (DT9080 to DT9121) stored. Index register 2 words (IX, IY) Register can be used as an address of (I) memory area and constants modifier.Constant Decimal K - 32768 to K32767 (for 16-bit operation) constants (K) t t K - 2147483648 to K2147483647 (for 32-bit operation) Hexadecimal H0 to HFFFF (for 16-bit operation) constants (H) t t H0 to HFFFFFFFF (for 32-bit operation) 1 - 11
  • 33. Relays, Memory Areas and Constants Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non - hold type that resets them. These areas can be specified as hold type or non - hold type by setting system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are the numbers when system register 5 is at its default setting.1 - 12
  • 34. 1.1 Table of Relays, Memory Areas and Constants1.1.5 FP2Item Numbering FunctionRelay External input (X) 2,048 points Turn on or off based on external input. relay (X0 to X127F) External (Y) 2,048 points Externally outputs on or off state. output relay (Y0 to Y127F) Internal relay (R) 4,048 points Relay which turns on or off only within pro- (* Note 1) (R0 to R252F) gram. Link relay (L) 2,048 points This relay is a shared relay used for (* Note 1) (L0 to L127F) MEWNET link system. Timer (T) 1,024 points , p If a TM instruction has timed out, the con- , (* Notes 1 and 2) (T0 to T999/ C1000 to C1023) t t tact ith th t t with the same number t b turns on. Counter (C) If a CT instruction has counted up, the con- p, (* Notes 1 and 2) tact ith th t t with the same number t b turns on. Pulse relay (P) 1,024 points This relay is used to turn on only for one (P0 to P63F) scan duration programmed with the OT" and OT# instructions. Special internal (R) 176 points Relay which turns on or off based on spe- relay (R9000 to R910F) cific conditions and is used as a flag.Memory External input (WX) 128 words Code for specifying 16 external input pointsarea relay (WX0 to WX127) as one word (16 bits) of data.Memory External (WY) 128 words Code for specifying 16 external outputarea output relay (WY0 to WY127) points as one word (16 bits) of data. Internal relay (WR) 253 words Code for specifying 16 internal relay points (WR0 to WR252) as one word (16 bits) of data. Link relay (WL) 128 words Code for specifying 16 link relay points as (WL0 to WL127) one word (16 bits) of data. Data register (DT) 6,000 words Data memory used in program. Data is (* Note 1) (DT0 to DT5999) handled in 16-bit units (one word). Link data register (LD) 256 words This is a shared data memory which is (* Note 1) (LD0 to LD255) used within the MEWNET link system. Data is handled in 16-bit units (one word).Memory Timer/Counter (SV) 1,024 words Data memory for storing a target value of aarea set value area (SV0 to SV1023) timer and an initial value of a counter. (* Note 1) Stores by timer/counter number.Memory Timer/Counter (EV) 1,024 words Data memory for storing the elapsed valuearea elapsed value area (EV0 to EV1023) during operation of a timer/counter. Stores (* Note 1) by timer/ counter number.Memory File register (FL) FP2 (16 K): Data memory used in program. Data isarea (* Notes 1 and 3) 0 to 14,333 words handled in 16-bit units (one word). (FL0 to FL14332) FP2 (32 K) (when expanded): 0 to 30,717 words (FL0 to FL30716)Memory Special data (DT) 256 words Data memory for storing specific data.area register (DT90000 to DT90255) Various settings and error codes are stored.Memory Index register (I) 14 words (I0 to ID) Register can be used as an address ofarea memory area and constants modifier. 1 - 13
  • 35. Relays, Memory Areas and ConstantsItem Numbering FunctionConstant Decimal constants ( ) (K) K - 32768 to K32767 (for 16-bit operation) (integer type) t pe) K - 2147483648 to K2147483647 (for 32-bit operation) Hexadecimal ( ) (H) H0 to HFFFF (for 16-bit operation) constants H0 to HFFFFFFFF (for 32-bit operation) Decimal constants (f) f - 1.175494×10 - 38 to f - 3.402823×1038 (monorefined real f1.175494×10 - 38 to f3.402823×1038 number) Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non-hold type that resets them. The selection of hold type and non-hold type can be changed by the setting of system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are numbers when system register 5 is at its default setting. 3) The size of the file register varies depending on the settings of system registers 0, 1 and 2.1 - 14
  • 36. 1.1 Table of Relays, Memory Areas and Constants1.1.6 FP2SHItem Numbering FunctionRelay External input (X) 8,192 points (X0 to X511F) Turn on or off based on external input. relay External output (Y) 8,192 points (Y0 to Y511F) Externally outputs on or off state. relay Internal relay (R) 14.192 points (R0 to R886F) Relay which turns on or off only within pro- (* Note 1) gram. Link relay (L) 10,240 points (L0 to L639F) This relay is a shared relay used for (* Note 1) MEWNET link system. Timer (T) 3,072 points ( ) p If a TM instruction has timed out, the con- con (* Notes 1 and 2) (T0 to T2999/ C3000 to C3071) tact with the same number turns on. ( ) Counter ( ) (C) If a CT instruction has counted up, the con- con (* Notes 1 and 2) tact with the same number turns on Pulse relay (P) 2,048 points (P0 to P127F) This relay is used to turn on only for one scan duration programmed with the OT" and OT# instructions. Error alarm relay (E) 2,048 points (E0 to E2047) If turned on while the unit is running, this relay stores the history in a dedicated buff- er. Program this relay so that it is turned on at the time of abnormality. Special (R) 176 points (R9000 to R910F) Relay which turns on or off based on spe- internal relay cific conditions and is used as a flag.Memory External input (WX) 512 words (WX0 to WX511) Code for specifying 16 external input pointsarea relay as one word (16 bits) of data. External output (WY) 512 words (WY0 to WY511) Code for specifying 16 external output relay points as one word (16 bits) of data. Internal relay (WR) 887 words (WR0 to WR886) Code for specifying 16 internal relay points as one word (16 bits) of data. Link relay (WL) 640 words (WL0 to WL639) Code for specifying 16 link relay points as one word (16 bits) of data. Data register (DT) 10,240 words Data memory used in program. Data is (* Note 1) (DT0 to DT10239) handled in 16-bit units (one word). Link data register (LD) 8,448 words (LD0 to LD8447) This is a shared data memory which is (* Note 1) used within the MEWNET link system. Data is handled in 16-bit units (one word). Timer/Counter (SV) 3,072 words Data memory for storing a target value of a set value area (SV0 to SV3071) timer and an initial value of a counter. (* Note 1) Stores by timer/counter number. Timer/Counter (EV) 3,072 words Data memory for storing the elapsed value elapsed value area (EV0 to EV3071) during operation of a timer/counter. Stores (* Note 1) by timer/ counter number. File register (FL) 98,295 words , Data memory used in program. Data is y p g (* Note 1) (32,765 (32 6 words ×3 banks ) d 3b k handled in 16-bit i ( h dl d i 16 bi units (one word). d) 1 - 15
  • 37. Relays, Memory Areas and ConstantsItem Numbering FunctionMemory Special data (DT) 512 words (DT90000 to Data memory for storing specific data.area register DT90511) Various settings and error codes are stored. Index register (I) 14 words ×16 banks (I0 to ID) Register can be used as an address of memory area and constants modifier.Constant Decimal (K) K - 32768 to K32767 (for 16-bit operation) constants (integer type) K - 2147483648 to K2147483647 (for 32-bit operation) Hexadecimal ( ) (H) H0 to HFFFF (for 16-bit operation) constants H0 to HFFFFFFFF (for 32-bit operation) Decimal (f) f - 1.175494×10 - 38 to f - 3.402823×1038 constants f1.175494×10 - 38 to f3.402823×1038 (monorefined real number) Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non-hold type that resets them. The selection of hold type and non-hold type can be changed by the setting of system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are numbers when system register 5 is at its default setting.1 - 16
  • 38. 1.1 Table of Relays, Memory Areas and Constants1.1.7 FP10SHItem Numbering FunctionRelay External input (X) 8,192 points (X0 to X511F) Turn on or off based on external input. relay External output (Y) 8,192 points (Y0 to Y511F) Externally outputs on or off state. relay Internal relay (R) 14,192 points (R0 to R886F) Relay which turns on or off only within (* Note 1) program. Link relay (L) 10,240 points (L0 to L639F) This relay is a shared relay used for (* Note 1) MEWNET link system. Timer (T) 3,072 points If a TM instruction has timed out, the , (* Notes 1 and 2) N t d ( (T0 to T2999/ C3000 to C3071) ) contact with the same number t t t ith th b turns on. Counter (C) If a CT instruction has counted up, the p, (* Notes 1 and 2) contact with the same number t t t ith th b turns on. Pulse relay (P) 2,048 points (P0 to P127F) This relay is used to turn on only for one scan duration programmed with the OT" and OT# instructions. Error alarm relay (E) 2,048 points (E0 to E2047) If turned on while the unit is running, this relay stores the history in a dedi- cated buffer. Program this relay so that it is turned on at the time of abnormality. Special internal (R) 176 points (R9000 to R910F) Relay which turns on or off based on relay specific conditions and is used as a flag.Memory External input (WX) 512 words Code for specifying 16 external inputarea relay (WX0 to WX511) points as one word (16 bits) of data. External output (WY) 512 words Code for specifying 16 external output relay (WY0 to WY511) points as one word (16 bits) of data. Internal relay (WR) 887 words Code for specifying 16 internal relay (WR0 to WR886) points as one word (16 bits) of data. Link relay (WL) 640 words Code for specifying 16 link relay points (WL0 to WL639) as one word (16 bits) of data. Data register (DT) 10,240 words Data memory used in program. Data is (* Note 1) (DT0 to DT10239) handled in 16-bit units (one word). Link data register (LD) 8,448 words This is a shared data memory which is (* Note 1) (LD0 to LD8447) used within the MEWNET link system. Data is handled in 16-bit units (one word). Timer/Counter (SV) 3,072 words Data memory for storing a target value of set value area (SV0 to SV3071) a timer and an initial value of a counter. (* Note 1) Stores by timer/counter number. Timer/Counter (EV) 3,072 words Data memory for storing the elapsed val- elapsed value area (EV0 to EV3071) ue during operation of a timer/counter. (* Note 1) Stores by timer/ counter number. File register (FL) 32,765 words , Data memory used in program. Data is y p g (* Note 1) (FL0 to FL32764) handled in 16-bit it ( h dl d i 16 bit units (one word). d) 1 - 17
  • 39. Relays, Memory Areas and ConstantsItem Numbering FunctionMemory Special data (DT) 512 words Data memory for storing specific data.area register (DT90000 to DT90511) Various settings and error codes are stored. Index register (I) 14 words ×16 banks (I0 to ID) Register can be used as an address of memory area and constants modifier.Constant Decimal (K) K - 32768 to K32767 (for 16-bit operation) constants (integer type) K - 2147483648 to K2147483647 (for 32-bit operation) Hexadecimal ( ) (H) H0 to HFFFF (for 16-bit operation) constants t t H0 to HFFFFFFFF (for 32-bit operation) Decimal (f) f - 1.175494×10 - 38 to f - 3.402823×1038 constants f1.175494×10 - 38 to f3.402823×1038 (monorefined real number) Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non-hold type that resets them. The selection of hold type and non-hold type can be changed by the setting of system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are numbers when system register 5 is at its default setting.1 - 18
  • 40. 1.1 Table of Relays, Memory Areas and Constants1.1.8 FP3Item Numbering FunctionRelay External input (X) 2,048 points (X0 to X127F) Turn on or off based on external input. relay External output (Y) 2,048 points (Y0 to Y127F) Externally outputs on or off state. relay Internal relay (R) 1,568 points (R0 to R97F) Relay which turns on or off only within (* Note 1) program. Link relay (L) 2,048 points (L0 to L127F) This relay is a shared relay used for (* Note 1) MEWNET link system. Timer (T) 256 points p If a TM instruction has timed out, the (* Notes 1 and 2) (T0 to T199/ C200 to C255) contact with the same number turns on. Counter (C) If a CT instruction has counted up, the (* Notes 1 and 2) contact with the same number turns on. Special (R) 176 points Relay which turns on or off based on internal relay (R9000 to R910F) specific conditions and is used as a flag.Memory External (WX) 128 words Code for specifying 16 external inputarea input relay (WX0 to WX127) points as one word (16 bits) of data. External (WY) 128 words Code for specifying 16 external output output relay (WY0 to WY127) points as one word (16 bits) of data. Internal relay (WR) 98 words Code for specifying 16 internal relay (WR0 to WR97) points as one word (16 bits) of data. Link relay (WL) 128 words Code for specifying 16 link relay points (WL0 to WL127) as one word (16 bits) of data. Data register (DT) 2,048 words Data memory used in program. Data is (* Note 1) (DT0 to DT2047) handled in 16-bit units (one word). Link data register (LD) 256 words This is a shared data memory which is (* Note 1) (LD0 to LD255) used within the MEWNET link system. Data is handled in 16-bit units (one word). Timer/Counter set (SV) 256 words Data memory for storing a target value of value area (SV0 to SV255) a timer and an initial value of a counter. (* Note 1) Stores by timer/counter number. Timer/Counter (EV) 256 words Data memory for storing the elapsed val- elapsed value area (EV0 to EV255) ue during operation of a timer/counter. (* Note 1) Stores by timer/ counter number. File register (FL) FP3 (16 K): Data memory used in program. Data is y p g (* Notes 1 and 3) 8,189 to 22,525 words handled in 16-bit i ( h dl d i 16 bi units (one word). d) (FL0 to FL22524) FP3 (10 K): 0 to 8,189 words (FL0 to FL8188) Special data (DT) 256 words Data memory for storing specific data. register (DT9000 to DT9255) Various settings and error codes are stored. Index register (I) 2 words (IX, IY) Register can be used as an address of memory area and constants modifier. 1 - 19
  • 41. Relays, Memory Areas and ConstantsItem Numbering FunctionConstant Decimal ( ) (K) K - 32768 to K32767 (for 16-bit operation) constants K - 2147483648 to K2147483647 (for 32-bit operation) Hexadecimal ( ) (H) H0 to HFFFF (for 16-bit operation) constants H0 to HFFFFFFFF (for 32-bit operation) Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non-hold type that resets them. The selection of hold type and non-hold type can be changed by the setting of system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are numbers when system register 5 is at its default setting. 3) The size of the file register varies depending on the settings of system registers 0 and 1.1 - 20
  • 42. 1.1 Table of Relays, Memory Areas and Constants1.1.9 Relay NumbersExternal input relays (X), External output relays (Y), Internal relays (R), Link relays(L) and Pulse relays (P)Since these relays are handled in units of 16 points, they are expressed as acombination of decimal and hexadecimal numbers as shown below. 1,2,3... Decimal number 0,1,2...9,A,B...F Hexadecimal numberThe maximum value that can be selected varies with each relay. Example: External input relay (X) X0, X1 . . . . . . . . . . . . . . . . . . . . . . . . . XF X10, X11 . . . . . . . . . . . . . . . . . . . . . . . X1F X20, X21 . . . . . . . . . . . . . . . . . . . . . . . X2F .................................Timers (T) and Counters (C)The addresses for timer contacts (T) and counter contacts (C) are correspond to thetimer and counter instruction numbers and expressed in decimals as shown below. Example: FP2 0, 1, 2 ... Decimal number T0, T1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T999 C1000, C1001 . . . . . . . . . . . . . . . . . . . . . . . . . C1023 Note Counters and timers share the same area. The division of the area can be changed with system register 5. (The table and example are when settings are the default values.)Error alarm relays (E) (FP2SH/FP10SH only)The addresses for error alarm relays (E) are represented in only decimals.E0, E1 . . . . . . . . E2047 1 - 21
  • 43. Relays, Memory Areas and ConstantsExternal input relay (X) and External output relay (Y)Only relays with numbers actually allocated to input contacts can be used as externalinput relay (X).Only relays with numbers actually allocated to output contacts can output as externaloutput relay (Y). The external output relays (Y) which are not allocated can be used asinternal relays.Allocation of numbers is determined by the combination of units and boards used. Fordetails about the I/O allocation, refer to “Hardware Manual” of each PLC. Example: FP2 0 1 2 3 4 (Slot No.) 16- point type 16- point type Power supply output unit input unit CPU unit Y10 to Y1F X0 to XF The 16 points external input relays X0 through XF are allotted for the 16-point type input unit for slot 0, and the 16 points external output relays Y10 through Y1F are allotted for the 16-point type output unit for slot 1. The 16 points X10 through X1F cannot be used in this such combination.1 - 22
  • 44. 1.1 Table of Relays, Memory Areas and ConstantsRelation of WX, WY, WR and WL to X, Y, R and LWX, WY WR and WL correspond respectively to groups of 16 external input relay (X)points, 16 external output relay (Y) points, 16 internal relay (R) points and 16 link relay(L) points. Example: Word external input relay (WX) Each relay is composed of 16 external input relay (X) points as shown below. XFXE XDXCXB XA X9 X8 X7 X6 X5 X4 X3 X2 X1 X0 WX0 X1F X1E X1D X12 X11 X10 WX1 .... ... When the state of an external input relay (X) changes, the content of WX also changes. 1 - 23
  • 45. Relays, Memory Areas and Constants1.2 Explanation of Relays1.2.1 External Input Relays (X)Function of external input relays (X)This relay feeds signals to the programmable controller from an external device suchas a limit switch or a photoelectric sensor. Program X contact: on X Y Input CPU unit Input: on InputUsage restrictionsThe addresses for inputs which do not actually exist cannot be used.The on or off status of the external input relays cannot be changed by the program inthe programmable controller.There are no restrictions on the number of times one external input relay isprogrammed.1 - 24
  • 46. 1.2 Explanation of Relays1.2.2 External Output Relays (Y)Function of external output relays (Y)This relay outputs the program execution result of the programmable controller andactivates an external device (load) such as a solenoid, operating panel or intelligentunit.The on or off status of the external output relay is output as a control signal. Program Output relay External Output X R Y devices CPU unit (load): R output on ExecutionUsage restrictionsExternal output relays which are not actually allocated can be used in the same way asinternal relays. However, they cannot be specified as hold types.When used as contacts, there are no restrictions on the number of times that can beused.As a rule, when specified as the output destination for operation results of OT and KPinstructions, use is limited to once in a program (to inhibit double output). Note You can permit duplicated use of an output by changing the system register 20 setting. Even if the same relay is used as an operand for instructions such as SET and RST, it is not regarded as duplicated use of outputs. Yn Yn Duplicated output 1 - 25
  • 47. Relays, Memory Areas and Constants1.2.3 Internal Relays (R)Function of internal relays (R)This relay can be used only within program and on or off status does not provide anexternal output. When the coil of the relay is energized, its contacts turn on. Internal relay R R F0 MVUsage restrictionsWhen used as contacts, there are no restrictions on the number of times that can beused.As a rule, when specified as the output destination for operation results of OT and KPinstructions, use is limited to once in a program (to inhibit double output). Note You can permit duplicated use of an output by changing the system register 20 setting. Even if the same relay is used as an operand for instructions such as SET and RST, it is not regarded as duplicated use of outputs.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, all of the internal relays (R) go off. If a hold typehas been specified (see next page), the internal relays (R) go off as well. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the relays are not cleared even if the Initialize/Test switch is set to the upper side.1 - 26
  • 48. 1.2 Explanation of RelaysNon- hold type relay and hold type relayThere are two types of internal relays: hold type relays and non - hold type relays. Whenthe power is turned off or the mode changed from RUN to PROG., - Hold type relays hold their on or off status and resume operation in that status when the system is restarted. - Non - hold type relays reset.For the FP0 C10/C14/C16/C32, and FP - e without clock/calendar function, non - holdtype and hold type relay numbers are as follows:Item Non-hold type Hold typeFP0 C10, C14, C16 R0 to R60F (976 points) R610 to R62F (32 points)FP - eFP0 C32 R0 to R54F (880 points) R550 to R62F (128 points)For the FP0 T32C/FPΣ/FP1/FP - M/FP2/FP2SH/FP10SH/FP3, and FP - e with clock/calendar function, system register 7 can be used to specify whether a hold type or anon - hold type is used. If the beginning of a hold type relay is specified using a wordnumber, relays before that point will be non - hold types, and subsequent relays willbe hold types. Non-hold type Value of system register 7 (initial number of hold type) Hold typeDefault settings for hold types and non - hold typesType Non - hold type Hold typeFP10SH/FP2SH R0 to R499F (8000 points) R5000 to R886F (6192 points)FP3 R0 to R59F (960 points) R600 to R97F (608 points)FP2 R0 to R199F (3200 points) R2000 to R252F (848 points)FP - M C16T, R0 to R9F (160 points) R100 to R15F (96 points)FP1 C14, C16FP - M C20, C32 R0 to R9F (160 points) R100 to R62F (848 points)FP1 C24, C40, C56, C72FP0 T32C R0 to R9F (160 points) R100 to R62F (848 points)FPΣ R0 to R89F (1440 points) R900 to R97F (128 points)FP - e R0 to R60F (976 points) R610 to R62F (32 points) Note For FPΣ and FP - e, in case of not using back - up battery, please keep the default value. Otherwise we cannot guarantee the function of hold/non - hold value. 1 - 27
  • 49. Relays, Memory Areas and Constants1.2.4 Special Internal RelaysFunction of special internal relaysThe special internal relays turn on or off under specific conditions. The on or off stateis not externally output and only functions within the program.The principal special internal relays are as follows: Operation status flags: Operation status is indicated by on or off. - Operation (RUN mode) in progress (R9020) - Forced input/output in progress (R9029) - Link station operation (R9060 to R909F) - Turns on and off at each scan (R9012) - Result of comparison instruction (R900A to R900C) - High - speed counter control flag (R903A to R903D) and others Error flags: Turns on when an error occurs. - Operation error (R9007, R9008) - Shared memory access error (R9031) and others Relays which turn on and off under special conditions: The required conditions can be selected in the program and the relays used accordingly. - Always on relay (R9010) - Clock pulse relay (R9018 to R901E) and othersFor the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, special internal relays R9000 to R910F go off.If self - diagnostic error 44 or an error with a lower number has occurred, however,R9000 to R9008 are not cleared.1 - 28
  • 50. 1.2 Explanation of Relays1.2.5 Link Relays (L) for FPΣFunction of link relays (L)Link relays are relays used for the PC Link, that can be shared between multipleprogrammable controllers when they are connected using a PLC link.If calculation results are output to the link relay (coil) of a certain PLC, the results arealso sent to other PLC connected with MEWNET, and will be reflected in link relay(contact) that have the same number. Ln on Send-area SendCommunicationCassette MEWNET-W0 Receive-area Receive Ln onWhen link relays are used, bit information can be exchanged in this way between PLCs.Available range of link relaysThe available range of link relays varies depending on the type of network and thecombination of units. The available range and number of points must be specifiedseparately for each network.For MEWNET- W0:A maximum of 1,024 points are available with one control unit. The available range isfrom L0 to L63F 1 - 29
  • 51. Relays, Memory Areas and ConstantsSpecifying hold type and non - hold type relaysThere are two types of link relays, which can be switched when the power is turned offand the mode is switched from RUN to PROG and operation is stopped.Hold type relays, which hold the on or off status in effect immediately prior to stopping,during the period between stopping and resuming operationNon - hold type relays, which are reset when operation stopsIn case of using back - up battery, System register 10 can be used to specify whetherthe link relays are the hold or non - hold type.Range System register no.L0 to L63F 10If the beginning of a hold type relay is specified using a word number, relays before thatpoint will be non - hold types, and subsequent relays will be hold types.For example, if “10” is set for system register 10, L0 to L9F will be non - hold types, andL100 to L63F will be hold types.For the default value, all link relays are hold types.If used as link relays for reception, be aware that no holding operation is carried out,even if the link relays are specified as hold types using the system registers.Usage restrictionsWhen used as contacts, there are no restrictions on the number of times that can beused.As a rule, when specified as the output destination for operation results of OT instructionand KP instruction, use is limited to once in a program (to inhibit double output). Notes System register 20 can be used to permit double output. Also, double output does not result if the SET and RST instructions are used. Link relays must be allocated when the network is configured, before programming is done. The method by which allocations are made varies depending on the type of network. Refer to the manual for the pertinent link unit.1 - 30
  • 52. 1.2 Explanation of Relays1.2.6 Link Relays (L) for FP2/FP2SH/FP10SH/FP3Function of link relays (L)Link relays are relays used for the PC Link, that can be shared between multipleprogrammable controllers when they are connected using a MEWNET link.The following types of MEWNET links are available. - MEWNET-H link system for FP3 and FP10SH (for coaxial cables) - MEWNET-W link system for FP2, FP2SH, FP3 and FP10SH (for wire cables) - MEWNET-P link system for FP3 and FP10SH (for fiber - optic cables)If calculation results are output to the link relay (coil) of a certain PLC, the results arealso sent to other PLC connected with MEWNET, and will be reflected in link relay(contact) that have the same number.Link station Ln on CPU Send-area SendLink unit MEWNETLink Receive-areastation Receive Ln on CPUWhen link relays are used, bit information can be exchanged in this way between PLCs. 1 - 31
  • 53. Relays, Memory Areas and ConstantsAvailable range of link relaysThe available range of link relays varies depending on the type of network and thecombination of units. The available range and number of points must be specifiedseparately for each network.For MEWNET- W and MEWNET- P:A maximum of 1,024 points are available with one link unit. The available range is fromL0 to L63F for the first unit (PC Link 0), and from L640 to L127F to the second unit (PCLink 1).For MEWNET- W2A maximum of 4,096 points can be used per link unit. Please set the range of use atthe MEWNET- W2 settings menu.With the FP2SH, the range between L0 and L639F can be specified. When used withMEWNET- W the range between L0 and L127F cannot be used. With the FP2, the range between L0 and L127F can be specified. Also, the internalrelay can be used in place of the link relay by setting the MEWNET- W2 setting menu.However, when used with MEWNET- W the range between L0 and L127F cannot beused with MEWNET- W2.For MEWNET- H:A maximum of 10,240 points can be used. Please set the range to be used with theMEWNET- H link setting software.With the FP10SH, the range from L0 to L639F can be used.If used in conjunction with a MEWNET- W or MEWNET- P link unit, be aware that therange from L0 to L127F cannot be used.With the FP3, the range from L0 to L127F can be used.If used in conjunction with a MEWNET- W or MEWNET- P link unit, however, be awarethat the range from L0 to L127F cannot be used with MEWNET- H. L0 to L127F Can be used with MEWNET - P and MEWNET - W. (2,048 points) Can also be used with MEWNET - H. L1280 to L639F Can be used with MEWNET - H. (8,192 points)1 - 32
  • 54. 1.2 Explanation of RelaysSpecifying hold type and non - hold type relaysThere are two types of link relays, which can be switched when the power is turned offand the mode is switched from RUN to PROG and operation is stopped.Hold type relays, which hold the on or off status in effect immediately prior to stopping,during the period between stopping and resuming operationNon - hold type relays, which are reset when operation stopsSystem register 10, 11, and 16 can be used to specify whether the link relays are thehold or non - hold type.Range System register no.L0 to L63F 10L640 to L127F 11L1280 to L639F 16If the beginning of a hold type relay is specified using a word number, relays before thatpoint will be non - hold types, and subsequent relays will be hold types.For example, if “10” is set for system register 10, L0 to L9F will be non - hold types, andL100 to L63F will be hold types.For the default value, all link relays are hold types.If used as link relays for reception, be aware that no holding operation is carried out,even if the link relays are specified as hold types using the system registers. Example: Non - hold type L0 System to Hold type register 10 L63F Non - hold type L640 System to Hold type register 11 L127F Non - hold type L1280 to System L639F Hold type register 16 1 - 33
  • 55. Relays, Memory Areas and ConstantsUsage restrictionsWhen used as contacts, there are no restrictions on the number of times that can beused.As a rule, when specified as the output destination for operation results of OT instructionand KP instruction, use is limited to once in a program (to inhibit double output). Notes System register 20 can be used to permit double output. Also, double output does not result if the SET and RST instructions are used. Link relays must be allocated when the network is configured, before programming is done. The method by which allocations are made varies depending on the type of network. Refer to the manual for the pertinent link unit.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, all of the link relays (L) go off. If a hold type hasbeen specified (see next page), these relays go off as well. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the relays are not cleared even if the Initialize/Test switch is set to the upper side.1 - 34
  • 56. 1.2 Explanation of Relays1.2.7 Timer (T)Function of timers (T)When a timer is activated and the set time elapses, the timer contact with the samenumber as the timer turns on.When the timer is in the time - up state and the timer execution condition turns off, thetimer contact turns off. TM n Time - up Timer number Tn: on Tn Timer contact: on n: Timer numberUsage restrictionsWhen used as contacts, there are no restrictions on the number of times that can beused.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, the timer contact goes off. If a hold type has beenspecified, it goes off as well. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the timer contact is not cleared even if the Initialize/Test switch is set to the upper side. 1 - 35
  • 57. Relays, Memory Areas and Constants1.2.8 Counter (C)Function of counters (C)When the decrement - type preset counter is activated and the elapsed value reacheszero, the counter contact with the same number as the counter turns on.When the counter’s reset input is turned on, the counter contact turns off.Count input Counter number CT nReset input Count - up Cn:on CnCounter contact: on n: Counter numberUsage restrictionsWhen used as contacts, there are no resrictions on the number of times that can beused.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, the counter contact goes off. If a hold type hasbeen specified, it goes off as well. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the counter contact is not cleared even if the Initialize/ Test switch is set to the upper side.1 - 36
  • 58. 1.2 Explanation of Relays1.2.9 Items Shared by the Timer and CounterTimer and counter partitioningTimers and counters share the same area. The partitioning of the area can be changedto obtain the number of timers or counters needed.Partition the area by setting system register 5. If the initial number of the counter isspecified, those prior to that point will be timers, and those subsequent to that point willbe counters.If the same value is set for system register 5 and 6, timers are non - hold types, andcounters are hold types. Normally, the same value should be set for both systemregisters. Non-hold type Value of system register 5 (initial number for counter) Hold typeDefault settings for timer and counterType Timer CounterFP2SH/FP10SH T0 to T2999 (3000 points) C3000 to C3071 (72 points)FP3 T0 to T199 (200 points) C200 to C255 (56 points)FP2 T0 to T999 (1000 points) C1000 to C1023 (24 points)FP - M C16T, T0 to T99 (100 points) C100 to C127 (28 points)FP1 C14, C16FP - M C20, C32 T0 to T99 (100 points) C100 to C143 (44 points)FP1 C24, C40, C56, C72FPΣ T0 to T1007 (1008 points) C1008 to C1023 (16 points)FP0, FP - e T0 to T99 (100 points) C100 to C143 (44 points) 1 - 37
  • 59. Relays, Memory Areas and ConstantsHold type and non - hold type partitioningThe contents of timer contacts, counter contacts, set value areas and elapsed valueareas can be held when the power is turned off or the mode switched from RUN toPROG., and operation later resumed based on those contents.In the case of the FP0 C10/C14/C16/C32, and FP - e without clock/calendar function,the areas which hold their contents when the power is turned off are fixed as shownbelow. System register settings 6 to 8 as well as 14 become invalid.Timer Non- hold type: all pointsCounter Non- hold type FP0 C10, C14, C16 FP - e: From set value to C139 FP0 C32: From set value to C127 Hold type FP0 C10, C14, C16 FP - e: C140 to C143 FP0 C32: C128 to C143For the FP0 T32C/FPΣ/FP1/FP- M/FP2/FP2SH/FP10SH/FP3, and FP - e withclock/calendar function, system register 6 can be used to specify whether a holdtype or a non - hold type is used. If the beginning of a hold type is specified using aword number, the contents of timer/counter contacts and set value/elapsed valueareas before that point will be non - hold types, and subsequent the contents oftimer/counter contacts and set value/elapsed value areas will be hold types.Even if specifying for the unit without batteries, the data will be indefinite. Non-hold type Value of system register 6 (initial number of hold type) Hold typeDefault settings for hold types and non - hold typesType Non - hold type Hold typeFP2SH/FP10SH 0 to 2999 (3000 points) 3000 to 3071 (72 points)FP3 0 to 199 (200 points) 200 to 255 (56 points)FP2 0 to 999 (1000 points) 1000 to 1023 (24 points)FP - M C16T, 0 to 99 (100 points) 100 to 127 (28 points)FP1 C14, C16FP - M C20, C32 0 to 99 (100 points) 100 to 143 (44 points)FP1 C24, C40, C56, C72FPΣ 0 to 1007 (1008 points) 1008 to 1023 (16 points)FP - e 0 to 139 (140 points) 140 to 143 (4 points) SV: non- hold *1 SV: holdFP0 T32C 0 to 99 (100 points) 100 to 143 (44 points) Note For FPΣ and FP - e, in case of not using back - up battery, please keep the default value. Otherwise we cannot guarantee the function of hold/non - hold value.1 - 38
  • 60. 1.2 Explanation of Relays *1 Use the following methods for holding the SV data: - Set the transfer instruction for the special data register (DT) to hold the data. Then, perform the setting so that the data can be transferred from DT to SV after the RUN mode starts. - Use the FP - e model with a battery.For the FP2/FP2SH/FP3/FP10SH, contacts of timers and counters specified as holdtypes, as well as setting value areas and elapsed value areas, are cleared to 0 whenthe Initialize/Test switch is set to the upper side (the Initialize side). Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the counter contact is not cleared even if the Initialize/Test switch is set to the upper side. 1 - 39
  • 61. Relays, Memory Areas and Constants1.2.10 Pulse Relays (P) Note Pulse relays (P) can only be used with the FP2/FP2SH/FP10SH.Function of pulse relays (P)A pulse relay (P) goes on for one scan only. The on or off state is not externally outputand only operates in the program.A pulse relay only goes on when a leading edge start instruction (OT↑) or a trailing edgestart instruction (OT↓) is executed.When used as the trigger, a pulse relay only operates during one scan when leadingedge or trailing edge is detected. Example 1: Differential execution when input X0 rises X0 P0 ↑ P0 Y10 X0 P0 Y10 One scan Example 2: Differential execution when input X1 falls X1 P1 ↓ P1 Y11 X1 P1 Y11 One scan1 - 40
  • 62. 1.2 Explanation of RelaysUsage restrictionsPulse relays are cleared when the power is turned off.A pulse relay can only be used once in a program as an output destination for an OT↑or OT↓ instruction (double output is prohibited).There is no limitation to the number of times a pulse relay can used as a contact.A pulse relay cannot be specified as an output destination for an OT, KP, SET, RST orALT instruction.A word unit pulse relay (WP) cannot be specified as a storage location for a high-levelinstruction. 1 - 41
  • 63. Relays, Memory Areas and Constants1.2.11 Error Alarm Relays (E) Note Error alarm relays can only be used with the FP2SH/FP10SH.Function of error alarm relays (E)Error alarm relays are used to feed back error conditions freely assigned by the userto internal relays, and to store them in memory.Error alarm relays are turned on and off using the SET and RST instructions in the userprogram.When an error alarm relay goes on, the number of error alarm relays which are on, therelay numbers, and the data of the calendar timer which went on first are stored in amemory area in the CPU unit.DT90400 No. of relays which are onDT90401 to DT90419 Relay numbers which are onDT90420 Min./sec. data Day/time data Data f l d timer f fi t relay to go D t of calendar ti for first l tDT90421 onDT90422 Year/month dataInformation for up to 500 error alarm relays can be stored in the memory area. Thosewhich can be monitored or operated by the user, however, are those in the range fromDT90401 to DT90419 only.Usage restrictions and precautionsError alarm relay (E) cannot be specified as the output destination for the OT, KP, or ALTinstructions.Error alarm relay (E) can be turned on and off in multiple locations in the program, usingthe SET and RST instructions. However, no check is carried out for overlapping use.Program for setting (turning on) an error alarm relaysThe SET instruction should be used to turn on error alarm relays in the error alarmconditions.Error alarm relays are held even if the error condition goes off.1 - 42
  • 64. 1.2 Explanation of Relays Example: If X0 goes on when an error occurs X0 E15 Set E15 S X0 : on No. of error +1 alarm relays DT90400 K 3 K 4 which are on DT90401 K21 K21 Relay numbers DT90402 K12 K12 of error alarm DT90403 K 5 K 5 relay which are on DT90404 K 0 K15 DT90405 K 0 K 0 Data of calen- dar timer which DT90420 the error alarm DT90421 relay of relay number in DT90422 DT90400.Program for resetting (turning off) an error alarm relayWhen an error has been corrected, the RST instruction should be used to turn off theerror alarm relay. Example: If X1 goes on when an error is corrected X1 E12 R Reset E12 X1 : on -1 No. of error alarm DT90400 K 4 K 3 relays which are on DT90401 K21 K21 Relay numbers of error alarm relay DT90402 K12 K 5 which are on DT90403 K 5 K 0 DT90404 K 0 K 0 DT90405 K 0Clearing all buffer areasEither of the following methods may be used. - To reset all of the error alarm relays, use the RST instruction in the same way as that described on the next page, and specify special data register DT90400. - If the Initialize/Test switch is set to the Initialize side in the PROG mode, all error alarm relays (E) go off, and the storage buffer is cleared. (To avoid clearing the buffer with the Initialize switch, change the setting of system register 4.) 1 - 43
  • 65. Relays, Memory Areas and ConstantsClearing buffer areas and initial dataOf the areas in which relay numbers are stored, only DT90400 and DT90401 can becleared by directly specifying the special data register with the RST instruction.If DT90400 is specified, all error information in the buffer is cleared, and if DT90401 isspecified, the initial relay number in the buffer area is cleared. Buffers fill up as shownin the example below. Example: When the contents of DT90401 are deleted using the RST instruction X1 DF R DT90401 Storage buffer 1 K 1 DT90401 Storage buffer 2 K 2 DT90402 Storage buffer 3 K 3 DT90403 Storage buffer 4 K 4 DT90404 Range visible to user Storage buffer 17 K17 DT90417 Storage buffer 18 K18 DT90418 Storage buffer 19 K19 DT90419 Storage buffer 20 K20 Storage buffer 21 K21 Range not visible to user Storage buffer 499 K499 Storage buffer 500 K500 Storage buffer 1 K 2 DT90401 Storage buffer 2 K 3 DT90402 Storage buffer 3 K 4 DT90403 Storage buffer 4 K 5 DT90404 Range visible to user Storage buffer 17 K18 DT90417 Storage buffer 18 K19 DT90418 Storage buffer 19 K20 DT90419 Storage buffer 20 K21 Storage buffer 21 K22 Range not visible to user Storage buffer 499 K500 Storage buffer 5001 - 44
  • 66. 1.3 Explanation of Memory Areas1.3 Explanation of Memory Areas1.3.1 Data Register (DT)Function of data registers (DT)Data registers are memory areas which are handled in word (16 - bit) units, and are usedto store data such as numerical data configured of 16 bits.Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DTn 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0Example of a program which writes a numeric value to DTn. F0, MV, K0, DT n Decimal constant (K) or hexadecimal constant (H)When 32-bit (double word) data is handled in data registers, use two data registers asa set. The number of the data register for the lower 16 bits is specified. DTn+1 DTn0 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 higher 16-bit area lower 16-bit area 1 - 45
  • 67. Relays, Memory Areas and ConstantsNon- hold type data and hold - type dataThere are two types of data registers which handle data differently when the power isturned off or the mode is changed from RUN to PROG.: - Hold type data registers hold their contents while operation stops and allow operation to be restarted with the contents still effective. - Non - hold type data registers reset when operation stops.For the FP0 C10/C14/C16/C32, and FP - e without clock/calendar function, non - holdtype and hold type data register numbers are as shown in the following table.Item FP0 C10/C14/C16 and FP - e FP0 C32Data register Non - hold type 1652 words (DT0 to DT1651) 6112 words (DT0 to DT6111) Hold type 8 words (DT1652 to DT1659) 32 words (DT6112 to DT6143)For theFP0 T32C/FPΣ/FP1/FP - M/FP2/FP2SH/FP10SH/FP3, and FP - e withclock/calendar function, system register 8 can be used to specify whether hold typesor non - hold types are to be used. If the beginning of a hold type data register isspecified using a word number, data registers before that point will be non - holdtypes, and subsequent data registers will be hold types. Non-hold typeValue of system register 8(initial number of hold type) Hold typeDefault settings for hold types and non - hold typesType Non - hold type Hold typeFPΣ DT0 to DT32709 (32710 words) DT32710 to DT32765 (55 words)FP - e DT0 to DT1651 (1652 words) DT1652 to DT1659 (8 words) Note For FPΣ and FP - e, in case of not using back - up battery, please keep the default value. Otherwise we cannot guarantee the function of hold/non - hold value.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, all data registers (DT) are cleared to 0. Even ifa hold type has been specified, these are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the data registers are not cleared even if the Initialize/ Test switch is set to the upper side.1 - 46
  • 68. 1.3 Explanation of Memory Areas1.3.2 Special Data Registers (DT)Function of the special data registersThese data registers have specific applications.Data cannot be written to most of them using instructions such as F0 (MV).With the FP0 T32C, FPΣ, FP2, FP2SH, FP10SH and the FP0 C10/C14/C16/ C32, FP- e,FP1, FP- M, FP3, the special data registers have different numbers, but the last three digitsof the numbers are the same. Example: With the FP0 C10/C14/ C16/C32, FP - e, FP1, DT9055 FP - M and FP3: The last three digits With the FP0 T32C, DT90055 are the same. FPΣ, FP2, FP2SH and FP10SH: If a “0” is added, this becomes the five - digit number used with the FP0 T32C, FPΣ, FP2, FP2SH and FP10SH.The main functions of special data registers are:Environmental settings and operation statusesThe operation statuses of the programmable controller specified with the systemregisters and the various types of instructions are stored. - Link communication status (DT9140 to DT9254/DT90140 to DT90254) - High - speed counter control flag (DT9052/DT90052) and othersError contentsThe unit in which the error occurred, and other information, is stored. - Self - diagnostic error code (DT9000/DT90000) - The slot number of the unit where the error occurred (DT9002, DT9003, etc.) - Remote input/output error slave station numbers (DT9131 to DT9135) - The address where the operation error occurred (DT9017, DT9018/DT90017, DT90018) 1 - 47
  • 69. Relays, Memory Areas and ConstantsClock/calendar timers(can be used with all types of the FP0 T32C, FP - e, FPΣ, FP2, FP2SH and FP10SH,FP3 and C version FP - M C20/C32, FP1 C24C/C40C/C56C/C72C types)The year, month, day, hour, minute, second, and day of the week tracked by thecalendar timer are stored here (DT9053 to DT9057/DT90053 to DT90057). Note The values stored for the clock/calendar timer can be overwritten (to calibrate the date and time). Values should be written to DT9054 to DT9057/DT90054 to DT90057 either using the F0 (MV) instruction or directly, using programming tools.High - performance counterThese registers are used for reading and writing the target value and elapsed value ofthe high- performance counters. - High - performance counter elapsed/target value area (DT9044 to DT9051/DT90044 to DT90051 and DT9104 to DT9111/DT90104 to DT90111)FP - M intelligent boardThese registers are used to store the data for the FP - M intelligent boards. - For FP - M A/D converter and analog I/O boards: DT9080 to DT9095 - For FP - M A/D converter and analog I/O boards: DT9096 to DT9103 - For FP - M high- speed counter board: DT9104 to DT9121For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, all special data registers are cleared to 0. Ifself - diagnosis error 44 or an error with a lower number occurs, however, DT9000(DT90000 with the FP2, FP2SH and FP10SH) is not cleared.1 - 48
  • 70. 1.3 Explanation of Memory Areas1.3.3 File Registers (FL)Function of file registers (FL)File registers are memory areas which are handled in word (16 - bit) units, and are usedto store data such as numerical data configured of 16 bits.They can be used in exactly the same way as data registers. Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 FLn 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0Double - word specifications can also be used in the same way as with data registers.32 - bit data can be handled.The number of file registers varies depending on the type and the system registersettings.Type No. of file register wordsFP10SH 32,765 wordsFP3 (16 K) Max. 22,525 words (see note)FP3 (10 K) Max. 8,189 words (see note)FP2 (32 K) Max. 30,717 words (see note)FP2 (16 K) Max. 14,333 words (see note)FP2SH 32,765 words ×3 banks Note The number of words varies depending on the type and the system register settings.Non- hold type data and hold type dataSystem register 9 can be used to specify whether hold types or non - hold types of fileregisters are to be used. For the default setting, all file registers are hold types.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, all file registers are cleared to 0. Even if a holdtype has been specified, these are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the file registers are not cleared to 0 even if the Initialize/Test switch is set to the upper side. 1 - 49
  • 71. Relays, Memory Areas and Constants1.3.4 WX, WY, WR and WLFunction of WX, WY, WR and WLRelays (X, Y, R, L) can be handled as blocks of 16 points.These are one - word (16 - bit) memory areas, thus they can be treated as data memory.The composition of the one - word memory areas is as follows.The numbers correspond to the words as shown.WR0 RF RE RD RC RB RA R9 R8 R7 R6 R5 R4 R3 R2 R1 R0WR1 R1F R1E · · · · · · · · · · · R12 R11 R10WR2 R2F R2E · · · · · · · · · · · R22 R21 R20For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, WX, WY, WR, and WL are cleared to 0. Evenif a hold type has been specified, these are cleared to 0.Pulse relays (P) and error alarm relays (E) cannot be handled in word units.Examples of using WX, WY, WR and WLWX can be used to read in digital switch and keyboard inputs, and WY can be used foroutput to 7 - segment displays.WR can also be used as a shift register.All of the relays can be used to monitor 16 - bit words.Precautions concerning usageIf an on or off status of one of the relays composing the memory area changes, thememory area value will also change. WR0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 (H9) When R1 is turned on WR0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 (HB)1 - 50
  • 72. 1.3 Explanation of Memory Areas1.3.5 Link Data Registers (LD) for FPΣFunction of link data registers (LD)Link data registers are data memories for “PC links”, which are shared between multipleprogrammable controllers which are connected through the same network link.When data is written to a link data register of one PLC, the contents are stored in thelink data registers that have the same numbers, in other PLCs connected through thenetwork. LDn Send Communication Cassette MEWNET-W0 Receive LDnWhen link data registers are used, data can be exchanged between PLCs simply bywriting the data, as shown here.Available range of link data registersThe available range of link data registers varies depending on the type of network andthe combination of units. The available range and number of points must be specifiedseparately for each networkFor MEWNET- W0A maximum of 128 words can be used with one control unit. The available range is fromLD0 to LD127 1 - 51
  • 73. Relays, Memory Areas and ConstantsSpecifying hold type and non - hold type registersThere are two types of link data registers, which can be switched when the power isturned off and the mode is switched from RUN to PROG and operation is stopped. - Hold type registers, which hold the on or off status in effect immediately prior to stopping, during the period between stopping and resuming operation - Non - hold type registers, which are reset when operation stopsIn case of using back - up battery, System registers 12 can be used to specify whetherthe link data registers are the hold type or non-hold type.Range System register no.LD0 to LD127 12If the beginning of a hold type register is specified using a word number, registers beforethat point will be non - hold types, and subsequent registers will be hold types. Forexample, if “64” is set for system register 12, LD0 to LD63 will be non - hold types, andLD64 to LD127 will be hold types.For the default value, all link data registers are hold types.If used as link data registers for reception, be aware that no holding operation is carriedout, even if the link data registers are specified as hold types using the system registers.1 - 52
  • 74. 1.3 Explanation of Memory Areas1.3.6 Link Data Registers (LD) for FP2/FP2SH/FP10SH/FP3Function of link data registers (LD)Link data registers are data memories for “PC links”, which are shared between multipleprogrammable controllers which are connected through the same MEWNET link.The following types of MEWNET links are available. - MEWNET-H link system for FP3 and FP10SH (for coaxial cables) - MEWNET-W link system for FP2, FP2SH, FP3 and FP10SH (for wire cables) - MEWNET-P link system for FP3 and FP10SH (for fiber - optic cables)When data is written to a link data register of one PLC, the contents are stored in thelink data registers that have the same numbers, in other PLCs connected through theMEWNET.Link station CPU LDn Send MEWNETLinkstation Receive CPU LDnWhen link data registers are used, data can be exchanged between PLCs simply bywriting the data, as shown here. 1 - 53
  • 75. Relays, Memory Areas and ConstantsAvailable range of link data registersThe available range of link data registers varies depending on the type of network andthe combination of units. The available range and number of points must be specifiedseparately for each network.For MEWNET- W and MEWNET- P:A maximum of 128 words can be used with one link unit. The available range is fromLD0 to LD127 for the first unit (PC Link 0), and from LD128 to LD255 for the second unit(PC Link 1).For MEWNET- W2:A maximum of 4,096 words can be used per link unit. Please set the range of use at theMEWNET- W2 settings menu.With the FP2SH, the range between LD0 and LD8447 can be specified. When usedwith MEWNET- W the range between LD0 and LD255 cannot be used. With the FP2, the range between LD0 and LD255 can be specified. Also, the dataregister can be used in place of the link relay by setting the MEWNET- W2 setting menu.However, when used with MEWNET- W the range between LD0 and LD255 cannot beused with MEWNET- W2.For MEWNET- H:A maximum of 8,192 words can be used. Please set the range to be used with theMEWNET- H link setting software.With the FP10SH, the range from LD0 to LD8447 can be used.If used in conjunction with a MEWNET- W or MEWNET- P link unit, be aware that therange from LD0 to LD255 cannot be used.With the FP3, the range from LD0 to LD255 can be used.If used in conjunction with a MEWNET- W or MEWNET- P link unit, however, be awarethat the range from LD0 to LD255 cannot be used with MEWNET- H. LD0 to LD255 Can be used with MEWNET - P and MEWNET - W. (256 words) Can also be used with MEWNET - H. LD256 to LD8447 Can be used with MEWNET - H. (8,192 words)1 - 54
  • 76. 1.3 Explanation of Memory AreasSpecifying hold type and non - hold type registersThere are two types of link data registers, which can be switched when the power isturned off and the mode is switched from RUN to PROG and operation is stopped. - Hold type registers, which hold the on or off status in effect immediately prior to stopping, during the period between stopping and resuming operation - Non - hold type registers, which are reset when operation stopsSystem registers 12, 13 and 17 can be used to specify whether the link data registersare the hold type or non-hold type.Range System register no.LD0 to LD127 12LD128 to LD255 13LD256 to LD8447 17If the beginning of a hold type register is specified using a word number, registers beforethat point will be non - hold types, and subsequent registers will be hold types. Forexample, if “64” is set for system register 12, LD0 to LD63 will be non - hold types, andLD64 to LD127 will be hold types.For the default value, all link data registers are hold types.If used as link data registers for reception, be aware that no holding operation is carriedout, even if the link data registers are specified as hold types using the system registers. Note This is determined based on the settings of system register 0 and 1. 1 - 55
  • 77. Relays, Memory Areas and Constants Example: Non - hold type LD0 System to Hold type register 12 LD127 Non - hold type LD128 System to Hold type register 13 LD255 Non - hold type LD256 to System LD8447 Hold type register 17 Note Link data registers must be allocated when the network is configured, before programming is done. The method by which allocations are made varies depending on the type of network. Refer to the manual for the pertinent link unit.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, all of the link data registers (LD) are cleared to0. Even if a hold type has been specified, these link data registers are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the link data registers are not cleared to 0 even if the Initialize/Test switch is set to the upper side.1 - 56
  • 78. 1.3 Explanation of Memory Areas1.3.7 Set Value Area for Timer/Counter (SV)Function of set value areas (SV)A set value for a timer or counter is stored in the set value area (SV) with the samenumber as the timer or counter. Set value TM n, K30 SVn K30 (Decimal number)A decimal number or SV area number is specified for the set value when the TM or CTinstruction is entered in the program.An SV is a one - word, 16 - bit memory area which stores a decimal number from K0 toK32767.Using set value area (SV)During RUN mode, a set value for a timer or counter can be changed by rewriting thecorresponding set value area.The value in a set value area can be read and changed from the program by specifyingthe destination and other information in F0 (MV) data transfer instruction.The set value area can be read and rewritten using a programming tool.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, all timer/counter setting value areas (SV) arecleared to 0. Even if a hold type has been specified, these are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that these areas not cleared even if the Initialize/Test switch is set to the upper side. Example: SV and EV areas are in a one - to - one correspondence with timers and counters. Timer/Counter number Set value area (SV) Elapsed value area (EV) T0 SV0 EV0 T1 SV1 EV1 : : : T99 SV99 EV99 C100 SV100 EV100 : : : 1 - 57
  • 79. Relays, Memory Areas and Constants1.3.8 Elapsed Value Area for Timer/Counter (EV)Function of elapsed value areas (EV)While a timer or counter is operating, the elapsed value is stored in the elapsed valuearea (EV) with the same number as the timer or counter.When the EV reaches zero, the timer or counter contact with the same number turnson.An EV is a one - word, 16 - bit memory area which stores a decimal number from K0 toK32767. Value of SVn SVn EVn TM n, K 30 K30 K30 0 Value of EVn 29 Tn 28 Decrements 1 EVn 0 Tn turns on when decrement operation endsUsing elapsed value area (EV)The elapsed value of a timer or counter in operation can be changed to prolong orshorten the operation.The value in elapsed value area can be read and changed from the program byspecifying the F0 (MV) data transfer instruction.The elapsed value area can be read and rewritten using a programming tool.For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side(the Initialize side) in the PROG mode, the timer/counter elapsed value areas (EV) arecleared to 0. Even if a hold type has been specified, these values are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the timer/counter elapsed value areas are not cleared to 0 even if the Initialize/Test switch is set to the upper side.1 - 58
  • 80. 1.3 Explanation of Memory Areas1.3.9 Index Registers (IX, IY) (for FP0, FP - e, FP1, FP - M and FP3)Function of index registers (IX, IY)Index registers are used to indirectly specify constants and memory area addresses.Two 16 - bit registers are available, IX and IY. Changing addresses and constants usinga value in an index register is called “index modification”.With the FP0, FP - e, FP1, FP - M and FP3, index modification is possible only withregard to operands of high- level instructions.Modifying an addressAddress = Base address + Value in IX or IY (K constant) Example: Modifying DT11 IXDT11 Base address IX value Target address 11 + K0 = DT11 11 + K10 = DT21 11 + K - 10 = DT1Modifying a constantConstant = Base value + Value in IX or IY Example 1: Modifying K100 IXK100 Base value IX value Constant K100 + K0 = K100 K100 + K10 = K110 K100 + K - 10 = K90 Example 2: Modifying H10 IXH10 Base value IX value Constant H10 + HA = H1A H10 + H10 = H20 1 - 59
  • 81. Relays, Memory Areas and ConstantsIndex modification method Example 1: Modifying a destination address X0 F0 MV, DT 0, IX IX setting F0 MV, K100, IXWR0 The value of DT0 determines the WR address where K100 is written. When the DT0 value is K10, K100 is written to WR10. IX WR0 → WR10 ↓ K10 ↓ 10 + 0 = 10 Example 2: Modifying a source address X0 F0 MV, DT 1, IX IX setting F0 MV, IXWR0, DT 0 The value of DT1 determines the WR address for transferring a value to DT0. When the DT1 value is K9, the value in WR9 is transferred to DT0. IX WR0 → WR9 ↓ K9 ↓ 9 + 0 = 91 - 60
  • 82. 1.3 Explanation of Memory AreasCautions when using index registersAn index register can not be modified with an index register.IXIX, IXIYIf the result of address modification overflows the memory area, an operation error willresult.When the address resulting from modification is negative or a large number.When modifying 32 - bit constants, IX is specified. At this point, IX and IY in combinationare handled as 32 - bit data. Higher 16- bit area Lower 16- bit area Contents of IY Contents of IXThe results of modification will be 32 - bit data.For the FP3 if the Initialize/Test switch is set to the upper side (the Initialize side) in thePROG mode, index registers IX and IY are cleared to 0. Note For detailed information about the procedures for using index registers section 4.5 1 - 61
  • 83. Relays, Memory Areas and Constants1.3.10 Index Registers (I0 to ID) (for FPΣ)Function of index registers (I0 to ID)Index registers are used for indirect specification of values to addresses and operandsin relays and memory areas.There are a total of 14 index registers which can be used with the FPΣ, consisting ofI0 to I9 and IA to ID.Cautions when using index registersAn index register can not be modified with an index register.I0I0, I1I1An index register can be modified using a different index register.Available: I0IA, Not available: I0I0If the result of address modification overflows the memory area, an operation error willresult.When the address resulting from modification is negative or a large number.When a 32 - bit constant is modified, the specified index register number and thefollowing index register number are used in combination to handle the data as a 32 - bitdata. Higher 16- bit area Lower 16- bit area Contents of In+1 Contents of InThe results of modification will be 32 - bit data. Note When 32 - bit constants are being modified, ID should not be specified.The following index modifications are possibleMemory area numbers used with high-level instructionsK constants (16-bit and 32-bit) and H constants (16-bit and 32-bit) specified withhigh-level instructions Note There are some cases in which index modification cannot be specified, depending on the instruction. Confirm the table of “Operands” on the page describing the various instructions.1 - 62
  • 84. 1.3 Explanation of Memory Areas1.3.11 Index Registers (I0 to ID) (for FP2, FP2SH and FP10SH)Function of index registers (I0 to ID)Index registers are used for indirect specification of values to addresses and operandsin relays and memory areas.Changing an address or a constant using an index register value is called “indexmodification”.There are a total of 14 index registers which can be used with the FP2, FP2SH andFP10SH, consisting of I0 to I9 and IA to ID.With the FP2SH/FP10SH, because there are bank areas for index registers, changingthe bank enables 14 points x 16 banks = 224 points of index registers available for use.Cautions when using index registersAn index register can not be modified with an index register.I0I0, I1I1An index register can be modified using a different index register.Available: I0IA, Not available: I0I0If the result of address modification overflows the memory area, an operation error willresult.When the address resulting from modification is negative or a large number.When a 32 - bit constant is modified, the specified index register number and thefollowing index register number are used in combination to handle the data as a 32 - bitdata. Higher 16- bit area Lower 16- bit area Contents of In+1 Contents of InThe results of modification will be 32 - bit data. Note When 32 - bit constants are being modified, ID should not be specified. 1 - 63
  • 85. Relays, Memory Areas and ConstantsFor the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (theInitialize side) in the PROG mode, index registers I0 to ID are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that these are not cleared to 0 even if the Initialize/Test switch is set to the upper side.The bank switching function for index registers can be used on the FP2SH/FP10SH.This function is not provided in the FP2.The following index modifications are possibleMemory area numbers used with high-level instructionsK constants (16-bit and 32-bit) and H constants (16-bit and 32-bit) specified withhigh-level instructionsRelay numbers used with the following basic instructions: ST, ST/, AN, AN/, OR, OR/,OT, KP, SET, RST, OT↑, OT↓Instruction numbers specified with the following basic instructions: TM, CT, MC, MCE,JP, LOOP, CALL, FCAL (FCAL instruction can be used with the FP2SH/FP10SH.)Memory areas used with the following basic instructions: TM, CT, SR Note There are some cases in which index modification cannot be specified, depending on the instruction. Confirm the table of “Operands” on the page describing the various instructions.1 - 64
  • 86. 1.3 Explanation of Memory AreasModification of memory area numbers specified by high - level instructionsAddress = Base address + value in I0 through ID (K constant) Example: Modifying DT11 I0DT11 Base address I0 value Target address 11 + K0 = DT11 11 + K10 = DT21 11 + K - 10 = DT1 Example 1: Modifying a destination address X0 F0 MV, DT 0, I0 I0 setting F0 MV, K100, I0DT100 The value of DT0 determines the DT address where K100 is written. When the DT0 value is K10, K100 is written to DT110. I0 DT100 → DT110 ↓ K10 ↓ 10 + 100 = 110 Example 2: Modifying a source address X0 F0 MV, DT 1, I0 I0 setting F0 MV, I0DT100, DT 0 The value of DT1 determines the DT address for transferring a value to DT0. When the DT1 value is K9, the value in DT109 is transferred to DT0. I0 DT100 → DT109 ↓ K9 ↓ 9 + 100 = 109 1 - 65
  • 87. Relays, Memory Areas and ConstantsModification of values of constants specified by high - level instructionsConstant = Base value + value in I0 through ID Example 1: Modifying 16-bit constant K100 I0K100 Base value I0 value 16-bit constant K100 + K0 = K100 K100 + K10 = K110 K100 + K - 10 = K90 Example 2: Modifying 16-bit constant H10 I0H10 Base value I0 value 16-bit constant H10 + HA = H1A H10 + H10 = H20 Example 3: Modifying 32-bit constant K0 I0K 0 Base value I1 and I0 value 32-bit constant K0 + K10000 = K10000 K0 + K60000 = K60000 K0 + K999999 = K9999991 - 66
  • 88. 1.3 Explanation of Memory AreasModification of relay numbers specified by basic instructionsNumber = Base number + value in I0 through ID (K constant / H constant) Example: Modifying X10 IAX10 Base number IA value Target number 10 + H0 = X10 10 + HF = X1F 10 + H - 10 = X0 19 + K7 = X20 19 + K - 11 = XE Example 1: Modifying a trigger R0 F0 MV, DT 0, I0 I0 setting I0X0 F35 +1, DT100 The trigger of the F35 (+1) instruction is determined by the DT0 value. When the value of DT0 is K10, the F35 (+1) instruction is executed when XA goes on. I0 X0 → XA ↓ K10 ↓ 10 + 0 = 10 (decimal) → A (hexadecimal) Example 2: Modifying an output destination R0 F0 MV, DT 2, I0 I0 setting X0 I0Y10 The value of DT2 determines the output destination when X0 goes on. When the value of DT0 is HF and X0 goes on, Y1F goes on. I0 Y10 → Y1F ↓ HF ↓ F + 10 = 1F 1 - 67
  • 89. Relays, Memory Areas and Constants Example 3: Modifying a destination address X0 F0 MV, DT 0, I0 I0 setting F0 MV, K100, I0WR0 The value of DT0 determines the address of WR where K100 is written. When the value of DT0 is K10, K100 is written to WR10. I0 WR0 → WR10 ↓ K10 ↓ 10 + 0 = 10 Example 4: Modifying a source address X0 F0 MV, DT 1, IB IB setting F0 MV, IBWR0, DT 0 The value of DT1 determines the address of WR for transferring a value to DT0. When the value of DT1 is K9, the value in WR9 is transferred to DT0. IB WR0 WR9 ↓ K9 ↓ 9 + 0 = 91 - 68
  • 90. 1.3 Explanation of Memory AreasItems requiring particular attentionFor the external input relay (X), external output relay (Y), and internal relay (R), whenusing index modification on relay numbers, be aware that the last digit of the relaynumber is hexadecimal and the first digits are decimal. Example: For external input relay (X) × Decimal 1, 2, 3 ............12 Hexadecimal 0, 1, 2, 3 ........ 9 A,B ........ F X 0, X 1 . . . . . . . . . . . . . . . . . . . . X F X 10, X 11 . . . . . . . . . . . . . . . . . . . . X 1F X 20, X 21 . . . . . . . . . . . . . . . . . . . . X 2F Example using I0X0 Value of I0 Target address K H 0 0 X0 1 1 X1 : : : 9 9 X9 10 A XA : : : 15 F XF 16 10 X10 : : : 31 1F X1F : : : 159 9F X9F 160 A0 X100 161 A1 X101 : : : 255 FF X15F 256 100 X160 257 101 X161 : : : 265 10A X169 267 10B X16A : : : 1 - 69
  • 91. Relays, Memory Areas and ConstantsModifying instruction numbers of basic instructionsTimer numbersModifying TML20 - - - TML I020Counter numbersModifying CT3000 - - - CT I03000Shift register numbersModifying SRWR0 - - - SR I0WR0Master control numbersModifying MCE1 - - - MCE I01Label number specification with the Jump instructionModifying JP1 - - - JP I01Label number specification with the Loop instructionModifying LOOP5 - - - LOOP I05Subroutine program numbersModifying CALL10 - - - CALL I010 Note Timer numbers and counter numbers can be modified only when a memory area is specified for the set value. Correct TMXI0 0, SV0 Specification of set value area number Modification cannot be done if the set value is specified with a constant. Incorrect TMXI0 0, K30 Specification of constant1 - 70
  • 92. 1.3 Explanation of Memory AreasChanging index register banks (for FP2SH/FP10SH only)The banks of the index registers of the FP2SH/FP10SH can be changed to allow useof up to 224 points (14 points × 16 banks) in a program. Bank Bank Bank Bank 0 1 2 15I0I1I2I3I4I5I6I7I8I9IAIBICIDWhen the register bank setting instruction F410 (SETB) or the register bank changinginstruction F411 (CHGB) is used to specify a bank number, index registers I0 to ID usedafter that point can be used as separate index registers from the I0 to ID index registersused prior to changing the bank.The bank is automatically set to bank 0 before execution of the leading address of theprogram. The bank is also automatically set to bank 0 before execution of the leadingaddress of a second program.The bank numbers of index registers used in interrupt programs, subroutines, and othersub programs should be specified in such a way that the F411 (CHGB) instruction isexecuted at the beginning of the sub program, and the F412 (POPB) instruction isexecuted at the end of the sub program. 1 - 71
  • 93. Relays, Memory Areas and Constants Example 1: Changing banks using a register bank setting instruction F410 (SETB) 0 I0 to ID of bank 0 R9010 F410 SETB, H 11 SETB, H I0 to ID of bank 1 R9010 F410 SETB, H 2 I0 to ID of bank 2 R9010 F410 SETB, H 3 I0 to ID of bank 3Different values can be set for I0 in bank 0, bank 1 and bank 2. The set values are onlyeffective within their respective ranges. Note For details on changing bank instruction, refer to the explanations of F410 (SETB), F411 (CHGB) and F412 (POPB) instructions. Example 2: Changing banks within an interrupt program Main program END INT 0 R9010 F411 CHGB, H2 Sub program R9010 F412 POPB IRET1 - 72
  • 94. 1.4 Explanation of Constants1.4 Explanation of Constants1.4.1 Integer Type Decimal Constants (K)Function of decimal constants (K)This is binary data that has been converted to the decimal format.When entering and reading a decimal constant, specify the value by entering a K at thebeginning.Decimal constants are primarily used to specify data sizes and quantities such as setvalues for timer.In the PLC, the decimal constant (K) is processed as binary (BIN) data in units of 16 bits,as shown below.The sign is determined by the MSB “Most Significant Bit” (bit position 15). [A “0”indicates a positive sign (+), and a “1” indicates a negative sign ( - ).] The MSB (MostSignificant Bit) is called the “sign bit”. Example: Decimal number “+32” (K32) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 “+” Example: Decimal number “ - 32” (K - 32) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 “-”Data is normally handled in units of one word (16 bits), however, it is also occasionallyhandled in units of two words (32 bits). In this case, as well, the MSB serves as the signbit.The available range of a decimal constant is:16-bit equivalent data: K-32768 to K3276732-bit equivalent data: K-2147483648 to K2147483647 1 - 73
  • 95. Relays, Memory Areas and Constants1.4.2 Hexadecimal Constants (H)Function of hexadecimal constants (H)Hexadecimal constants are values which have been converted from binary intohexadecimal. When entering and reading a hexadecimal constant, specify the value byentering an H at the beginning.Hexadecimal constants are primarily used to specify an ordering of 1’s and 0’s in 16 - bitdata, such as system register settings and specification of control data for high- levelinstructions. Hexadecimal constants are also used to specify BCD data.In the PLC, the hexadecimal constant (H) is processed as binary (BIN) data in units of16 bits, as shown below. Example: Hexadecimal number “2A” (H2A) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Hexadecimal 0 0 2 A Binary data 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0Data is normally handled in units of one word (16 bits), however, it is also occasionallyhandled in units of two words (32 bits).The available range of a hexadecimal constant is:16-bit equivalent data: H0 to HFFFF32-bit equivalent data: H0 to HFFFFFFFF1 - 74
  • 96. 1.4 Explanation of Constants1.4.3 Floating Point Type Real Numbers (f)Available PLCFP0, FP - e, FPΣ, FP2, FP2SH and FP10SHRange of floating point type real numbers that can be used in operationsThe range of floating point type real numbers that can be stored in the memory area isas noted below.Range of negative numbers: - 3.402823 x 1038 to - 1.175494 x 10 - 38Range of positive numbers: 1.175494 x 10 - 38 to 3.402823 x 1038Even if the results of the real - number operation involve multiple digits, the actualprocessing is effective for a mantissa of up to 7 digits. Example: If the actual operation result were 0.33333333 ..., the stored data would consist of the value 0.3333333.Area in which floating point type real numbers are storedWith floating point type real number operation instructions, the area in which dataconverted to a real number is stored consists of two words (32 bits) per data element.As a result, in transmission instructions such as that used to send real - number data toa storage area and in other operations, data should be moved in units of two words (32bits). Example 1: If DT0 is specified as the area in which floating point type real number data is to be stored, the data will be written to DT0 and DT1. F313 F%, DT10, DT20, DT0 The operation results will be stored in DT0 and DT1. Storage destination DT10 ÷ DT20 (f2.0) DT0 (f1.0) (f0.5) DT11 DT21 DT1 Example 2: When floating point type real number data stored in DT0 and DT1 is being sent to destination, the 32 - bit data sending instruction F1 (DMV) instruction should be used. F1 DMV, DT0, DT100 Transmission source Transmission source DT0 DT100 (f1.234) (f1.234) DT1 DT101 1 - 75
  • 97. Relays, Memory Areas and ConstantsProcessing of floating point type real number operations1) Processing by specifying an integer deviceInstructions can be used to store data in a specific location. Adding the symbol % or #to either S (source: the area from which the data is loaded) or D (destination: the areain which the result is stored) determines how the data is processed. If added to S(source), integer data is automatically converted to real - number data and the operationis carried out. If added to D (destination), the real - number data resulting from theoperation is automatically converted into integer data and stored in the destination.When the integer area consists of 16 - bit data … It is specified using the % symbol.When the integer area consists of 32 - bit data … It is specified using the # symbol. Example 1: Specifying the target operation data S for an integer device The contents of “DT10” and “DT20” are converted to real numbers, and the operation is executed. The results are stored in “DT30 and DT31” as real - number data. F310 F+, %DT10, %DT20, DT30 Example 2: Specifying stored results D for an integer device The target operation data stored in “DT40 and DT41” and “DT50 and DT51” are loaded, and the operation is executed. The results of the operation are converted to an integer and stored in DT60. F310 F+, DT40, DT50, %DT60 Example 3: When the integer data S targeted by the operation is stored as two words The contents of “DT70 and DT71” and “DT80 and DT81” are converted to real numbers and the operation is executed. The results of the operation are stored in “DT90 and DT91” as real - number data. F310 F+, #DT70, #DT80, DT901 - 76
  • 98. 1.4 Explanation of ConstantsIn processing involving an integer device specification and real numbers beingconverted to integers, the processing is the same as that of the F327 (INT) instruction.If the real - number data is a positive number, the number is rounded off, and any digitsto the right of the decimal point are discarded.If the real - number data is a negative number, the value 0.4999 ... is subtracted fromthe target real - number data, and the value is rounded off to the decimal point. Example 1: If the operation result is f1.234, the value will be stored as integer data “K1”. Example 2: If the operation result is f - 1.234, the value will be stored as integer data “K - 2”.Integer device specification can be used for the following instructions.F309 (FMV) to F324 (FSQR) / F336 (FABS) to F338 (DEG) / F345 (FCMP) to F349(FZONE)2) Using the integer → real number and real number → integer conversioninstructions to convert valuesWith this method, a conversion instruction is used to convert integer data to realnumbers.When the integer data is 16- bit data, F325 (FLT) is used.When the integer data is 32- bit data, F326 (DFLT) is used.Real- number data that has undergone real- number operation processing is convertedfrom real- number data to integer data using the F327 (INT) to F332 (DROFF)conversion instructions. Example 1: When conversion is carried out using the maximum value that does not exceed the allowable range converted to F327 INT, DT0, DT10 16- bit integer converted to F328 DINT, DT0, DT10 32- bit integer When the value is a positive number, the result is rounded off to the decimal point. When the value is a negative number, the value 0.4999 ... is subtracted from the data, and the result is rounded off. If the real - number data is 1.5, it is converted as integer data K1. If the real - number data is - 1.5, it is converted as integer data K - 2. 1 - 77
  • 99. Relays, Memory Areas and Constants Example 2: When conversion is carried out by rounding down the digits to the right of the decimal point converted to F329 FIX, DT0, DT10 16- bit integer converted to F330 DFIX, DT0, DT10 32- bit integer Digits to the right of the decimal point are rounded down. If the real - number data is 1.5, it is converted as integer data K1. If the real - number data is - 1.5, it is converted as integer data K - 1. Example 3: When conversion is carried out by rounding off the digits to the right of the decimal point. converted to F331 ROFF, DT0, DT10 16- bit integer converted to F332 DROFF, DT0, DT10 32- bit integer Digits to the right of the decimal point are rounded off. If the real - number data is 1.5, it is converted as integer data K2. If the real - number data is - 1.5, it is converted as integer data K - 2.1 - 78
  • 100. 1.4 Explanation of Constants3) Direct specification of the real - number constant dataWhen operations are being carried out on real - number constants as real - number data,the values can be directly input by using a programming tool in which “f” is added eitherto the target data “S” or the destination “D” defined by the instruction.The range that can be specified by these instructions is 0.0000001 to 9999999 (theeffective value consists of seven digits). Example: Specifying the target data “S” with a real - number constant The real - number data stored in DT10 and DT11 is multiplied by the real - number constant 0.5, and the result of the operation stored in DT20 and DT21 as real - number data. F312 f*, DT10, f0.5, DT204) Specifying a K constant for conversionThe K constant (32 - bit data) is an integer data element, so it is automatically convertedto real - number data and the operation is executed. F310 F+, K10, DT50, DT60 Automatic conversion to real number5) Specifying an H constant for conversionWith an H constant (32 - bit data), the operation is carried out using the H constant asfloating point data.Operation if an overflow occursIf the operation result exceeds the real - number range, an overflow flag (R9009) is set.If this occurs, one of the values noted below is set for R9009 as a result.Positive infinite value: H7F800000Negative infinite value: HFF800000 1 - 79
  • 101. Relays, Memory Areas and Constants1.4.4 BCD Type Real Numbers (H) (for FP2, FP2SH and FP10SH)Range of BCD type real numbers that can be used in operationsThe range of real - number data that can be stored in the memory area is as noted below.- 9999.9999 to +9999.9999Data stored in the memory area in one - word units, with the positive/negative signcoming first, followed by the integer segment and then by the decimal point and anysubsequent digits. One- word BCD One- word BCD One- word BCDSignsH0: Positive valueH1: Negative valueInteger segmentH0 to H9999Decimal point segmentH0 to H9999Area in which the BCD type real number is storedIn the BCD type real number operation instructions, the area in which data convertedto real numbers is stored consists of a three - word area for each data element. As aresult, in instructions such as that used to send real - number data to a storage area andin other operations, data should be moved in units of three words. Example 1: If DT0 is specified as the area in which BCD type real - number data is to be stored, the data will be written to “DT0 to DT2”. X10 F300 BSIN, H45, D70 Operation results + 0. 7071 Areas in which data are stored DT0 H0 Sign DT1 H0 Integer segment DT2 H7071 Decimal point segment Example 2: When sending BCD type real - number data stored in “DT0 to DT2”, the F10 (BKMV) block transmission instruction or a similar instruction should be used, and the data sent in three - word units. X10 F10 BKMV, DT0, DT2, DT100 Transmission source Transmission destination DT0 H0 DT100 H0 DT1 H0 DT101 H0 DT2 H7071 DT102 H70711 - 80
  • 102. 1.4 Explanation of Constants1.4.5 Character Constants (M)Function of character constants (M)The character constant is used to express ASCII code in binary.The character constant is expressed by adding the prefix M to the data.There are only two instructions in which character constants can be specified, F95(ASC) instruction, F257 to F265 (SYS1) instruction and F149 (MSG) instruction.The character constant M is stored in a specified memory area in the PLC as BIN data,as shown below. Example: When character constant “MEWNET” is input T E N W E M Character constant 54 45 4E 57 45 4D ASCII Hex code One word One word One word 1 - 81
  • 103. Relays, Memory Areas and Constants1.5 Data Ranges Which can be Handled in the PLC1.5.1 Data Ranges Which can be Handled in the PLC16 - bit data Decimal HexadecimalData which can be handled in the PLC (16 - bit binary data) constants constants 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 K 32767 H7FFF · · · · · · · · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 K 1 H0001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 K 0 H0000 K -1 HFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 · · · · · · · · · 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 K - 32768 H800032-bit data Decimal HexadecimalData which can be handled in the PLC (32 - bit binary data) constants constants 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 K 2147483647 H7FFFFFFF · · · · · · · · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 K 1 H00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 K 0 H00000000 K -1 HFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 · · · · · · · · · 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 K - 2147483648 H800000001 - 82
  • 104. 1.5 Data Ranges Which can be Handled in the PLCExpression of decimal numbers in PLCDecimal number is basically processed in 16-bit or 32-bit binary.The most significant bit (MSB) expresses negative or positive sign of the data. Whenthe MSB is “0”, data is regarded as having a zero or positive value and when the MSBis “1”, data is regarded as having a negative value.In the case of positive numbers, the bits following the most significant bit express thesize of the data. Example 1: Expressing the decimal number “1868” 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0 16,384 512 256 128 8,192 4,096 2,048 1,024 64 32 16 8 4 2 1 The data size is indicated by the other bits. 1,024 + 512 + 256 + 64 + 8 + 4 = 1,868 Most significant bit: 0 (positive value)A negative number is expressed as a two’s complement (the bits of the 16 - bit binarydata of the positive number are inverted and 1 is added to the result). Example 2: Expressing the decimal number “-4” 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 Binary expression of decimal number “4” Invert each bit 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 Add 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 Binary expression of decimal number “ - 4” Most significant bit: 1 (negative value) 1 - 83
  • 105. Relays, Memory Areas and ConstantsData ranges which can be handled in the PLCBinary data which can be handled by programmable controllers are:16-bit binary data: K-32768 to K3276732-bit binary data: K-2147483648 to K2147483647BCD code which can be handled by programmable controllers are:16-bit (4-digit BCD H code): H0 to H999932-bit (8-digit BCD H code): H0 to H99999999If any of the above ranges are exceeded when processing the corresponding data,overflow or underflow will result.BCD is an acronym for binary coded decimal and refers to expressing each digit of adecimal number by four binary digits. Example: When the decimal number is expressed in BCD Decimal number 6 4 5 Each digit is converted to binary BCD code 0110 0100 0101 → H645 (Binary coded decimal)1 - 84
  • 106. 1.5 Data Ranges Which can be Handled in the PLC1.5.2 Overflow and UnderflowOperation instructions occasionally produce a value which is outside of the allowedrange. This is called overflow if the value exceeds the maximum value and underflowif the value falls short of the minimum value. When an overflow or underflow occurs, thecarry flag R9009 turns on.Overflow and underflow during binary operationIf any of the following values are exceeded, overflow or underflow will result. 16- bit binary operation 32- bit binary operation (Overflow results if over (Overflow results if over the maximum value.) the maximum value.)Max. value K 32767 H 7FFF K 2147483647 H 7FFFFFFF . . . . . . . . K 1 H 0001 K 1 H 00000001 K 0 H 0000 K 0 H 00000000 K . -1 H FFFF . K . -1 H FFFFFFFF . . . . .Min. value K-32768 H 8000 K-2147483648 H 80000000 (Underflow results if under (Underflow results if under the minimum value.) the minimum value.)Overflow and underflow during BCD operationIf any of the following values are exceeded, overflow or underflow will result.Only positive values can be handled. 4 - digit BCD code operation 8 - digit BCD code operation (Overflow results if over the (Overflow results if over the maximum value.) maximum value.)Max. value H 9999 H 99999999 . . . . . . . . . . . .Min. value H 0 H 0 (Underflow results if under (Underflow results if under the minimum value.) the minimum value.) 1 - 85
  • 107. Relays, Memory Areas and ConstantsValues when overflow or underflow occursNumerical value handled by the FP series programmable controller all form a loopjoined at the maximum value and the minimum value as shown below.16 - bit binary operation Overflow Max. value K 32767 H 7FFF ... ... K 1 H 0001 The max. value K 0 H 0000 links with the min. K -1 H FFFF value. ... ... Min. value K-32768 H 8000 Underflow Example 1: For K32767 + K1 (overflow) The operation result is K - 32768 and the carry flag turns on. Example 2: For K - 32768 - K1 (underflow) The operation result is K32767 and the carry flag turns on.4 - digit BCD code operation Overflow Max. value H 9999 The max. value ..... links with the min. value. Min. value H 0 Underflow Example 1: For H9999 + H1 (overflow) The operation result is H0 and the carry flag turns on. Example 2: For H0 - H1 (underflow) The operation result is H9999 and the carry flag turns on.1 - 86
  • 108. Chapter 2 Basic Instructions
  • 109. Basic Instructions2-2
  • 110. 2.1 Composition of Basic Instructions2.1 Composition of Basic Instructions2.1.1 Sequence Basic InstructionsThese basic instructions perform bit unit logic operations and are the basis of the relaysequence circuit.As shown in the illustration below, this is expressed by the combination of the relay coiland contact.There are several relay types which are explained in “Section 1.2”, and the relay whichcan be specified depends on the instruction. Refer to the explanation of each instruction. Example: Start (ST) instruction Read the on or off status of the specified contact. Read the status of external input (X0). Out (OT) instruction Output the operation result to the specified coil. Outputs the operated result (on and off) to the external output (Y10). Example: Input contacts Internal relay coil Address X0 X1 R0 0 ST AN OT R0 1 OR Output coil Internal relay contacts R0 Y10 4 ST OT Bus line <Ladder diagram> 2-3
  • 111. Basic Instructions2.1.2 Basic Function InstructionsThese are the timer, counter and shift register instructions.To specify set values, the instructions are composed of several steps. Example: Example of setting 3.0 seconds in the 0.1 second timer (timer 5) Timer 5 (0.1 s units timer) Set value X0 TMX 5 K 30 Constant of Y30 T5 timer 5 Timing begins when X0 turns on, and T5 turns on when 3.0 seconds elapses.2.1.3 Control InstructionsThese instructions determine the order and flow of program execution.It is possible to change the sections to be executed, or to execute only the necessarysegments, depending on the conditions.Specify the section which will execute. This is composed of several steps.Master control relayA certain part of the program (specified with MC or MCE) is only executed when theappropriate condition is met.JumpSkips execution of part of the program (specified with JP or LBL) when the appropriatecondition is met. This shortens program execution time.Step ladder controlPart of the program (specified with SSTP or STPE) is treated as an independent“process”, and sequential and branch execution is carried out.Subroutine programA program which is repeatedly executed for a particular operation is called as asubroutine (specified with SUB or RET) and executed when needed.2-4
  • 112. 2.1 Composition of Basic InstructionsInterrupt programIn addition to the normal program, enter an interrupt program (specified with INT or IRET)if you need a program which will execute immediately when a certain condition is met.When an interrupt is received, the normal program is interrupted and the interruptprogram is executed.2.1.4 Data Compare InstructionsThis is a group of instructions which compare two data. A contact is turned on or off basedon the result of the comparison. Each comparison instruction is composed of severalsteps. Example: Example of comparing the value of DT10 to K100. <=, DT 10, K100 Y30 If the value of DT10 is less than K100, Y30 is turned on. If the value of DT10 is greater than K100, Y30 is turned off. 2-5
  • 113. Basic Instructions2.2 Number of Steps in the FP2, FP2SH and FP10SHNumber of steps in basic instructionsOf the basic instructions used with the FP2, FP2SH and FP10SH, the number of steps inthe following instructions changes depending on the number specified.Sequence basic instructionsWith Start (ST), Out (OT), And (AN), Or (OR), and Keep (KP), the number of stepsmaking up the instruction changes depending on the relay number which has beenspecified. StepsType of relay Relay number Normal With index modificationInput X 0 to 127F 1 2Output Y 1280 or more 2 2Internal relay y R0 to R111F 1 2 R R1120 or more 2 2Special internal R R9000 to R910F 2 2relayLink relay y L0 to L127F 1 2 L L1280 to L639F 2 2Timer T 0 to 255 1 2Counter C 256 or more 2 2 Note Index modification is possible only with the FP2, FP2SH and FP10SH.Basic function instructionsType of instruction yp Specified number p Steps Normal With index modification0.001 s units timer TML 0 to 255 3 40.010 01 s units timer TMR 256 or more 4 40.1 s units timer TMX1 s units timer 0 to 255 4 5 TMY 256 or more 5 5Counter 0 to 255 3 4 CT 256 or more 4 4Shift register g WR0 to WR239 1 2 SR WR240 or more 2 2 Note Index modification is possible only with the FP2, FP2SH and FP10SH.2-6
  • 114. 2.2 Number of Steps in the FP2, FP2SH and FP10SHControl and subroutine instructions StepsInstructions Normal specification With index modificationJP 2 3LOOP 4 5CALL 2 3FCAL 4 5 Note Index modification is possible only with the FP2, FP2SH and FP10SH.Table of Basic Instructions 2-7
  • 115. Basic Instructions ST Start ST/ Start Not OT OutOutline ST, ST/: Begins a logic operation. OT: Outputs the operation result. 1Program example Boolean Ladder Diagram Address Instruction X0 Y10 0 ST X 0 0 1 OT Y 10 X0 Start Out Y11 2 ST/ X 0 2 Start Not Out 3 OT Y 11Operands Timer/Counter Relay Index Contact Instruction modifier L P E X Y R T C (*2) (*1) (*2) (*3) ST, ST/ A A A A A A A A A A: Available OT N/A A A A N/A N/A N/A N/A N/A: Not Available(*1) This cannot be used with the FP0/FP1/FP–M.(*2) This can be used only with the FP2/FP2SH/FP10SH.(*3) This can be used only with the FP2SH/FP10SH.Explanation of exampleY10 goes on when X0 turns on.Y11 goes on when X0 turns off. onX0 off onY10 off onY11 offDescriptionThe ST instruction starts logic operations and regards the input contact specified at the start as a Form A(normally open) contact.The ST/ instruction starts logic operations and regards the input contact specified at the start as a Form B(normally closed) contact.The OT instruction outputs the operation result to a specified coil.2- 8
  • 116. Basic InstructionsPrecautions during programmingThe ST and ST/ instructions start from the bus line. X0 Y10The OT instruction cannot start directly from the bus line. Y10The OT instruction can be used consecutively. X0 Y10 Y11 Y12Some input devices, such as emergency stop switches, usually have a Form B (normally closed) contact.When an emergency stop switch with a Form B contact is programmed, be sure to use the ST instruction. 2- 9
  • 117. Basic Instructions / NotOutline Inverts the operation result up to this instruction. 2Program example Boolean Ladder Diagram Address Instruction X0 Y10 0 ST X 0 0 1 OT Y 10 Y11 2 / Not 3 OT Y 11Explanation of exampleY10 goes on and Y11 goes off when X0 turns on.Y10 goes off and Y11 goes on when X0 turns off.X0 on off onY10 off onY11 offDescriptionThe / instruction inverts the operation result up to this instruction.2 - 10
  • 118. Basic Instructions AN AND AN/ AND NotOutline AN: Connects Form A (normally open) contacts in series. AN/: Connects Form B (normally closed) contacts in series. 3Program example Boolean Ladder Diagram Address Instruction 0 ST X 0 X0 X1 X2 Y10 1 AN X 1 0 2 AN/ X 2 AND AND Not 3 OT Y 10Operands Timer/Counter Relay Index Contact Instruction modifier L P E X Y R T C (*2) (*1) (*2) (*3) A: Available AN, AN/ A A A A A A A A A N/A: Not Available(*1) This cannot be used with the FP0/FP1/FP–M.(*2) This can be used only with the FP2/FP2SH/FP10SH.(*3) This can be used only with the FP2SH/FP10SH.Explanation of exampleY10 goes on when both X0 and X1 turn on and also X2 turns off. onX0 off onX1 off onX2 off onY10 offDescriptionPerforms a logical AND operation with the results of the immediately preceding serially connected operation.Precautions during programmingUse the AN instruction when normally open contacts (Form A contacts) are serially connected.Use the AN/ instruction when normally closed contacts (Form B contacts) are serially connected. X0 X1 Y10 X2 X3 Y10The AN and AN/ instructions can be used consecutively. X0 X1 X2 X3 2 - 11
  • 119. Basic Instructions OR OR OR/ OR NotOutline OR: Connects Form A (normally open) contacts in parallel. OR/: Connects Form B (normally closed) contacts in parallel. 4Program example Boolean Ladder Diagram Address Instruction X0 Y10 0 ST X 0 0 X1 1 OR X 1 1 2 OR/ X 2 X2 OR 3 OT Y 10 2 OR NotOperands Timer/Counter Relay Index Contact Instruction modifier L P E X Y R T C (*2) (*1) (*2) (*3) A: Available OR, OR/ A A A A A A A A A N/A: Not Available(*1) This cannot be used with the FP0/FP1/FP–M.(*2) This can be used only with the FP2/FP2SH/FP10SH.(*3) This can be used only with the FP2SH/FP10SH.Explanation of exampleY10 goes on when either X0 or X1 turns on or X2 turns off.X0 on off onX1 off onX2 offY10 on offDescriptionPerforms a logical OR operation with the results of the immediately preceding operation connected inparallel.2 - 12
  • 120. Basic InstructionsPrecautions during programmingUse the OR instruction when normally open contacts (Form A contacts) are connected in parallel.Use the OR/ instruction when normally closed contacts (Form B contacts) are connected in parallel.The OR instruction starts from the bus line.The OR and OR/ instructions can be used consecutively. X0 Y10 X1 X2 X3 2 - 13
  • 121. Basic Instructions ST ↑ Leading edge Start ST ↓ Trailing edge Start AN ↑ Leading edge AND AN ↓ Trailing edge AND OR ↑ Leading edge OR OR ↓ Trailing edge OROutline Contact instructions for leading edge detection and trailing edge detection Logic processing is only carried out during the scan following detection of a leading edge or trailing edge in the signal.Program example Boolean Ladder Diagram Address Instruction Leading edge Start 0 ST↑ X 0 X0 Y10 0 2 OT Y 10 3 ST X 1 X1 X2 Leading edge AND Y11 4 AN↑ Y 2 3 6 OT X 11 7 ST↓ Y 3 X3 Y12 9 OR↓ X 4 7 11 OT Y 12 Trailing edge OR X4Operands Timer/Counter Relay Index Instruction Contact modifier X Y R L P E T CST↑, ST↓ A A A A A N/A A A N/AAN↑, AN↓ A A A A A N/A A A N/A A: AvailableOR↑, OR↓ A A A A A N/A A A N/A N/A: Not Available2 - 14
  • 122. Basic InstructionsExplanation of exampleST↑, AN↑ and OR↑ instructionsOutput to Y10 takes place for one scan only following a change in X0 from off to on. on X0 off on Y10 off One scan One scan Leading edge Leading edgeOutput to Y11 takes place for one scan only following a change in X2 from off to on when X1 is on. on X1 off on X2 off onY11 off One scanOutput to Y12 takes place for one scan only following a change in X3 or X4 from on to off. on X3 off on X4 off onY12 off One scan One scan 2 - 15
  • 123. Basic Instructions OT ↑ Leading edge Out OT ↓ Trailing edge OutOutline Leading edge detection and trailing edge detection output The result of processing is output to the pulse relay for one scan only.Program example Boolean Ladder Diagram Address Instruction X0 0 ST X 0 P0 1 OT↑ P 0 0 3 ST X 1 Leading edge Out 4 OT↓ P 1 X1 P1 3 Trailing edge OutOperands Timer/Counter Relay Index Instruction Contact modifier X Y R L P E T C OT↑ N/A N/A N/A N/A A N/A N/A N/A A A: Available OT↓ N/A N/A N/A N/A A N/A N/A N/A A N/A: Not AvailableExplanation of exampleOutput to pulse relay “P0” takes place for one scan only following a change in X0 from off to on. onX0 off onP0 off One scanOutput to pulse relay “P1” takes place for one scan only following a change in X1 from on to off. onX1 off onP1 off One scan2 - 16
  • 124. Basic InstructionsDescriptionOT↑ instructionsOutput to the pulse relay takes place for one scan only following a change in the immediately previousprocessing result from off to on. The pulse relay goes on for one scan only.OT↓ instructionsOutput to the pulse relay takes place for one scan only following a change in the immediately previousprocessing result from on to off. The pulse relay goes on for one scan only.Precautions during programmingWhen the pulse relay (P) (which goes on for one scan only due to execution of a OT↑ or OT↓ instruction) isused with a logic instruction (ST, AN or OR), operation is the same as a normal contact followed by DFinstruction.Example using an OT↑ instruction and the pulse relay (P) X0 P0 ↑ P0 Y10Example using a DF instruction X0 Y10 DFBoth example are executed as shown below. on X0 off onY10 off One scan One scan 2 - 17
  • 125. Basic Instructions ALT Alternative outOutline Inverts the output condition each time the leading edge of the signal is detected.Program example Boolean Ladder Diagram Address Instruction 0 ST X 0 X0 Y10 1 ALT Y 10 0 A Alternative outOperands Timer/Counter Relay Index Instruction Contact modifier X Y R L P E T C A: Available ALT N/A A A A N/A N/A N/A N/A N/A N/A: Not AvailableExplanation of exampleEach time X0 changes from off to on, the on/off state of output Y10 toggles. on X0 off on Y10 off Invert Invert InvertDescriptionWhen the immediately previous processing result changes from off to on, the on/off state of the specified coiltoggles.The on/off state of the specified coil is held until an ALT instruction specifying that coil rises. (Flip-flop control)Precautions during programmingDuring the interval that the input remains on, the output only toggles when the rise occurs, not after that.When the mode is changed to RUN or the power is turned on in RUN mode such that the input is initially on,toggling does not occur at the first scan.When used with instructions which change the order of execution such as MC to MCE and JP to LBL (seebelow), take care because the operation of instructions may change depending on the timing of instructionexecution and input. - MC to MCE instructions - JP to LBL instructions - F19 (SJP) to LBL instructions - LOOP to LBL instructions - CNDE instruction - Step ladder instructions - Subroutine instructions2 - 18
  • 126. Basic Instructions ANS AND stackOutline Multiple blocks are connected in series.Program example Boolean Ladder Diagram Address Instruction 0 ST X 0 X0 X2 Y10 1 OR X 1 0 2 ST X 2 X1 X3 Block 2 3 OR X 3 4 ANS Block 1 5 OT Y 10Explanation of exampleY10 goes on when X0 or X1 and X2 or X3 turn on. (X0 OR X1) AND (X2 OR X3) → Y10 block 1 block 2 onX0 off onX1 off onX2 off onX3 off onY10 offDescriptionBlocks connected in parallel are connected in series. +A block begins with the ST instruction. 2 - 19
  • 127. Basic InstructionsWhen blocks are consecutiveWhen blocks are consecutive, a division of the blocks should be considered, such as that shown below. block ST X 0 1 2 block 1 OR X 1 4 ST X 2block Y10 X0 X2 X4 block 5 OR X 3 block 2block X1 X3 X5 5 ANS . . . . . . . . . . 1 4 ST X 4 block 3 OR X 5 block block block 1 2 3 ANS . . . . . . . . . . 2 OUT Y 102 - 20
  • 128. Basic Instructions ORS OR stackOutline Multiple blocks are connected in parallel. 5Program example Boolean Ladder Diagram Address Instruction 0 ST X 0 1 AN X 1 X0 X1 Block 1 Y10 0 2 ST X 2 X2 X3 Block 2 3 AN X 3 4 ORS 5 OT Y 10Explanation of exampleY10 goes on when both X0 and X1 or both X2 and X3 turn on. (X0 AND X1) OR (X2 AND X3) → Y10 block 1 block 2 onX0 off onX1 off onX2 off onX3 offY10 on offDescriptionBlocks connected in series are connected in parallel. +A block begins with the ST instruction. 2 - 21
  • 129. Basic InstructionsWhen blocks are consecutiveWhen blocks are consecutive, a division of the blocks should be considered, such as that shown below. block ST X 0 block 4 block 1 AN X 1 4 ST X 2block X0 X1 Y10 block 1 2 AN X 3 blockblock X2 X3 1 5 ORS . . . . . . . . . 1 2 block ST X 4 X4 X5 2block 3 AN X 5 3 ORS . . . . . . . . . 2 block 5 OUT Y 102 - 22
  • 130. Basic Instructions PSHS Push stack RDS Read stack POPS Pop stackOutline PSHS: Stores the operation result up to this instruction. 6 RDS: Reads the operation result stored by the PSHS instruction. POPS: Reads and clears the operation result stored by the PSHS instruction.Program example Boolean Ladder Diagram Address Instruction 0 ST X 0 1 PSHS 2 AN X 1 X0 X1 Y10 0 3 OT Y 10 X2 Push Stack Y11 4 RDS 5 AN X 2 X3 Read Stack Y12 6 OT Y 11 Pop Stack 7 POPS 8 AN/ X 3 9 OT Y 12Explanation of exampleWhen X0 turns on:- Stores the operation result up to the PSHS instruction and Y10 goes on when X1 turns on.- Reads the stored result using the RDS instruction and Y11 goes on when X2 turns on.- Reads the stored result using the POPS instruction and Y12 goes on when X3 turns off. Also clears the result stored by the PSHS instruction. onX0 off onX1 off onY10 off onX2 off onY11 off onX3 off onY12 off 2 - 23
  • 131. Basic InstructionsDescriptionOne operation result can be stored in memory and read, and multiple processes performed.PSHS (stores operation result):Stores the operation result up to this instruction and continues execution from the next step.RDS (reads operation result):Reads the operation result stored using the PSHS instruction and, using this result, continues operation fromthe next step.POPS (resets operation contents):Reads the operation result stored using the PSHS instruction and, using this result, continues operation fromthe next step. Also clears the operation result stored by the PSHS instruction.These instructions are used if there is branching from a single contact, followed by another contact orcontacts.Precautions during programmingYou can continue to use the same operation result several times by repeatedly using the RDS instruction.When you are finished, be sure to issue the POPS instruction. X0 X1 Y10PSHS X2 Y11RDS X3 X4 Y12POPSAn RDS instruction can be used repeatedly any number of times. X0 Y10 X1 Y11 X2 X3 Y12RDS X4 X5 Y13 X6 X7 Y142 - 24
  • 132. Basic InstructionsCaution regarding repeated use of a PSHS instructionThe PSHS instruction is limited in the number of times that it can be used consecutively. The number of timesthat the instruction can be used consecutively before the next POPS instruction is as shown below. Type No. of consecutive times FP0, FPΣ, FP1, FP–M Up to 8 times maximum FP2, FP2SH, FP3, FP10SH Up to 7 times maximumIf the instruction is used consecutively more than the allowable number of times, be aware that the programwill not run correctly.X0 X1 X2 X3 X4 X5 X6 Y10 ST X 0 PSHS . . . . 1 AN X 1 PSHS . . . . 2 AN X 2 1 2 3 4 5 6 PSHS . . . . 3 AN X 3 This example shows the instruction used PSHS . . . . 4 consecutively 6 times. AN X 4 PSHS . . . . 5 AN X 5 PSHS . . . . 6 AN X 6 OT Y10If a POPS instruction is used during repeated use of a PSHS instruction, reading will take place in orderbeginning from the last data stored by the PSHS instruction. X0 X1 X2 X3 X4 X5 Y10 POPS . . . . . 5 Reading AN X 6 OT Y 11 X6 Y11 POPS . . . . . 4 Reading AN X 7 1 2 3 4 5 X7 Y12 OT Y 12 POPS . . . . . 3 Reading AN X 8 X8 Y13 OT Y 13 X9 Y14 XA Y15 2 - 25
  • 133. Basic Instructions DF Leading edge differential DF/ Trailing edge differentialOutline DF: Turns on the contact for only one scan when the leading edge of the trigger is detected. DF/: Turns on the contact for only one scan when the trailing edge of the trigger is detected. 7Program example Boolean Ladder Diagram Address Instruction Leading edge differential 0 ST X 0 X0 Y10 1 DF 0 (DF) 2 OT Y 10 X1 Y11 3 (DF/) 3 ST X 1 4 DF/ Trailing edge differential 5 OT Y 11Explanation of exampleY10 goes on for only one scan when the leading edge (off → on) of X0 is detected.Y11 goes on for only one scan when the trailing edge (on → off) of X1 is detected. onX0 offX1 on off onY10 offY11 on off 1 scan 1 scan 1 scan 1 scan Leading Trailing edge edgeRelated instructionsWith the FPΣ, FP2, FP2SH and FP10SH, the DFI instruction can be used. It is executed only for the first scan.2 - 26
  • 134. Basic InstructionsDescriptionThe DF instruction executes and turns on output for only one scan duration when the trigger changes from anoff to an on state.The DF/ instruction executes and turns on output for only one scan duration when the trigger changes from anon to an off state.There is no limit on the number of times the DF and DF/ instructions can be used.With the DF and DF/ differential instructions, only a change in the on and off status of the contact is detected.Thus, if the execution condition is initially on such as when the mode is changed to RUN or the power turnedon in RUN mode, output will not be obtained. Example: Leading edge differential (DF) instruction X0 on off Y10 on off DF instruction Leading RUN not executed. edgePrecautions during programmingWith a program such as the one in the figure below, operation will be as follows. X0 X0 X1 Y10 (DF) X1 Y10 1 2 31 When X1 is off, even if X0 rises, Y10 remains off.2 Even if X1 rises when X0 is on, Y10 remains off.3 If X0 rises when X1 is on, then Y10 will go on for one scan.In the following program the execution condition is initially on, therefore output is not obtained. R9013 Y10 DF R9013 only turns on during the first scan after RUN begins. R9010 Y10 DF R9010 is always on.With the following program, output is obtained. R9014 Y10 DF R9014 turns on from the second scan after RUN begins. 2 - 27
  • 135. Basic InstructionsCaution is required when using a differential instruction with instructions which change the order of instructionexecution such as MC and MCE or JP and LBL (below instructions). - MC to MCE instructions - JP to LBL instructions - F19 (SJP) to LBL instructions - LOOP to LBL instructions - CNDE instruction - Step ladder instructions - Subroutine instructionsWhen combining a differential instruction with an AND stack or pop stack instruction, take care that the syntaxis correct.Operation is as follows with a circuit like the one shown below. Time chart X0 Y0 DF X0 X1 X1 Y0 You cannot output from here.Please use a program as follows when Y0 is turned on at the rise of either X0 or X1. Time chart X0 Y0 DF X0 X1 X1 DF Y0Example of a differential instruction applicationUsing a differential instruction makes it easier to adjust a program.Application example for self - hold circuitUsing a differential instruction makes it possible to handle long input signals. X0 R0 Y10 DF X0 Y10 X1 X1 R0 R0 DF Y10 Y10 With no differential instruction2 - 28
  • 136. Basic InstructionsApplication example for alternating circuitA differential instruction can also be applied to an alternating circuit to hold and release the circuit using asingle signal. Example 1: X0 R0 DF R0 Y10 Y10 R0 Y10 Example 2: X0 R0 DF R0 R0 Y10 Y10 Y10 2 - 29
  • 137. Basic Instructions DFI Leading edge differential (initial execution type)Outline When a leading edge of signal is detected, the contact goes on during that scan only. Leading edge detection is possible at the first scan.Program example Boolean Ladder Diagram Address Instruction X0 Y10 0 ST X 0 0 DFI 1 DFI 3 OT Y 10 Leading edge differential (initial execution type)Explanation of exampleOutput to Y10 takes place for one scan only following a change in X0 from off to on.When the trigger X0 is met after RUN is begun X0 Y10 One scan Leading edgeWhen the trigger X0 is met before RUN X0 Y10 One scanDescriptionWhen the trigger (execution condition) changes from off to on, the DFI instruction outputs (differential output)during the following scan only.When the trigger (execution condition) is met before RUN is begun, output (differential output) takes place atthe first scan.There is no limit to the number of times the DFI instruction can be used.When the mode is changed to RUN or the power is turned on in RUN mode and the trigger (executioncondition) is already met, a DF instruction will not obtain output at the first scan. For this reason, use a DFIinstruction.2 - 30
  • 138. Basic InstructionsPrecautions during programmingWhen used with instructions which change the order of execution such as MC to MCE and JP to LBL (seebelow), caution must be exercised. - MC to MCE instructions - JP to LBL instructions - F19 (SJP) to LBL instructions - LOOP to LBL instructions - CNDE instruction - Step ladder instructions - Subroutine instructionsTake care that the syntax is correct when combining a differential instruction with an ANS or POPSinstruction. 2 - 31
  • 139. Basic Instructions SET Set RST ResetOutline SET: When the execution conditions have been satisfied, the output is turned on, and the on status is retained. RST: When the execution conditions have been satisfied, the output is turned off, and the off status is retained.Program example Boolean Ladder Diagram Address Instruction Set 20 ST X 0 X0 Y30 20 〈S 〈 21 SET Y 30 X1 Y30 24 ST X 1 〈R 〈 24 25 RST Y 30 Output destination ResetOperands Timer/Counter Relay Index Contact Instruction modifier L E X Y R P T C (*2) (*1) (*2) A: Available SET, RST N/A A A A N/A A N/A N/A A N/A: Not Available(*1) This cannot be used with the FP0/FP1/FP–M.(*2) This can be used only with the FP2SH/FP10SH. Index Relay Timer/Counter Register Constant Index Operand register modifier WX WY WR WL SV EV DT FL I K H M RST N/A A A A A A A A A N/A N/A N/A A* A word device can be used only by FP2/FP2SH.Explanation of exampleWhen X0 turns on, Y30 goes on and holds on.When X1 turns on, Y30 goes off and stays off. onX0 offX1 on off onY30 offDescriptionThe SET instruction executes when the trigger is turned on. Output turns on and holds on even if the trigger’sstate changes.The RST instruction executes when the trigger is turned on. Output coil turns off and stays off even if thetrigger’s state changes.You can use relays with the same number as many times as you like with the SET and RST instructions.(Even if a total check is run, this is not handled as a syntax error.)2 - 32
  • 140. Basic InstructionsWhen SET and RST instructions are usedWhen the SET and RST instructions are used, the output changes with each step during processing of theoperation. Example: When X0, X1, and X2 are turned on X0 Y10 〈S 〈 Y10 This portion of the program is processed as if Y10 were on. X1 Y10 〈R 〈 This portion is processed as if Y10 were off. X2 Y10 〈S 〈 This portion is processed as if Y10 were on.I/O update is performed when an ED instruction is executed, therefore the data actually output is determinedby the final operation result. In the above example, the Y10 output is on.To output a result while operation is still in progress, use a partial I/O update instruction (F143).Precautions during programmingThe output destination of a SET instruction is held even during the operation of an MC instruction.The output destination of a SET instruction is reset when the mode is changed from RUN to PROG. or whenthe power is turned off, except when a hold type internal relay is specified as the output destination.SET and RST instructions and differential instructionsBe sure to place a DF instruction before the SET and RST instructions to make program development andrefinement easier.This is particularly effective when the same output destination is used in several places in the program. X0 Y10 〈S 〈 (DF) X1 Y10 (DF) 〈R 〈Precautions when using the FP2SH and FP10SHIt is not possible to specify a pulse relay (P) as the output destination for a SET or RST instruction.How relays are handled with SET and RST instructionsRelays can be turned off using the RST instruction.Using the various relays with the SET and RST instructions does not result in double output.It is not possible to specify a pulse relay (P) as the output destination for a SET or RST instruction. 2 - 33
  • 141. Basic Instructions KP KeepOutline This is output which is accompanied by set or reset input, and which is retained. 4Program example Boolean Ladder Diagram Address Instruction Set input X0 0 ST X 0 KP R 30 0 X1 Reset input 1 ST X 1 1 2 KP R 30 Output destinationOperands Timer/Counter Relay Index Contact Instruction modifier L X Y R P E T C (*2) (*1) A: Available KP N/A A A A N/A N/A N/A N/A A N/A: Not Available(*1) This cannot be used with the FP0/FP1/FP–M.Explanation of exampleWhen X0 turns on, output relay R30 goes on and stays on.R30 goes off when X1 turns on. onX0 off onX1 off onR30 off Set Reset Reset takes precedenceDescriptionWhen the set input turns on, output of the specified relay goes on and stays on.Output relay goes off when the reset input turns on.The output relay’s on state is maintained until a reset input turns on, regardless of the on or off states of the setinput.If the set input and reset input turn on simultaneously, the reset input has priority.Precautions during programmingWhen the KP instruction is programmed between the MC and MCE instructions, the status of outputdestination (relay) specified by the KP instruction is maintained.If a internal relay (R) specified by the KP instruction is set as the non-hold type, it is reset when the mode ofoperation is changed from RUN to PROG or when the power is turned off.(If an internal relay set as a hold type is specified as the output destination, a reset does not take place.)2 - 34
  • 142. Basic Instructions NOP No operationOutline No operation 5Program example Boolean Ladder Diagram Address Instruction 0 ST X 0 X0 X1 X2 Y10 1 AN X 1 0 ・ 2 NOP NOP 3 AN/ X 2 4 OT Y 10DescriptionThis instruction has no effect on the operation result to that point.The same operation takes place without a NOP instruction.The NOP instruction can be used to make the program easier to read when checking or correcting.When you want to delete an instruction without changing addresses, write a NOP instruction (overwrite theprevious instruction).When you want to move the addresses of one part of a program without changing the program, insert a NOPinstruction.This is a convenient means of breaking a long program into several blocks. Example: To move the starting point of a program block from address 39 to address 40, insert a NOP instruction at address 39. Address Address 36 ST X0 36 ST X0 ・ OR X1 ・ OR X1 ・ OT Y10 This moves the ・ OT Y10 39 ST X2 starting point to 39 NOP Insert a NOP 40 AN X3 address 40. 40 ST X2 instruction. ・ OT R20 41 AN X3 ・ ST R2 ・ OT R20 ・ DF ・ ST R2 44 ST X3 ・ DF 45 ST X3Deleting a NOP instructionTo delete the NOP instruction after editing in the PROG. mode, use the programming tools. 2 - 35
  • 143. Basic Instructions TML Timer (0.001s units)Outline Sets the on-delay timer for 0.001s unitsProgram example Boolean Ladder Diagram Address Instruction Timer instruction number Timer unit Set value 0 ST X 0 1 TM L 5 X0 TML 5, K 300 K 300 0 4 ST T 5 5 OT R 0 T5 R0 4 Timer contact of timer No. 5Operands Timer/ Index Relay Register Constant Index Counter register Instruction modifier WX WY WR WL EV DT LD FL SV IX IY K H (*2) (*1) (*1) (*1) (*1) (*1) (*1) (*1) (*1) A: Available Set value A A A A A A A A A N/A N/A A N/A A N/A: Not Available(*1) This can be used with the FP2SH/FP10SH.(*2) This can be used with the FP2/FP2SH/FP10SH.DescriptionThe timer is reset and does not retain its data when the power is turned off or the mode is changed from RUNto PROG. (If you need to retain the operating state , set system register 6.)When the trigger (execution condition) is on, the set time decrements until the elapsed value reaches zero,and at this point the timer contact Tn (n represents the timer contact number) goes on.If the trigger (execution condition) goes off during decrement operation, operation stops and the elapsedvalue is reset to zero (cleared).An OT instruction can appear immediately after a timer coil.2 - 36
  • 144. Basic InstructionsSetting the time in the timerThe time setting is equal to the time increment multiplied by the value set in the timer.The value set in the timer can be a decimal value within the range K1 to K32767. The time increment is 0.001seconds, producing a time range of 0.001 to 32.767 seconds. Example: When the value K43 is set, the time will be 0.001 × 43 = 0.043 seconds. When the K500 is set, the set time will be 0.001 × 500 = 0.5 seconds.Precautions during programmingThe timer value decrements during processing, therefore, create the program so that one decrement occursduring one scan. (A correct result will not be obtained if no processing operations or multiple processingoperations take place during one scan due to an interrupt program or JP/LOOP instruction.) If multipleprocessing operations are needed during one scan, set system register 4.Take care that the syntax is correct when combining a timer instruction with an ANS or POPS instruction.1.1) Specifying the timer setting with a decimal constant KTimer operation when a decimal constant K is specifiedWhen a K constant is specified for the timer setting, the memory area SV with the same number as the timernumber is used as the setting value area. 1 When the mode is changed to RUN or the power is turned on in RUN mode, the timer setting will be transferred to the setting value area SV with the same number as the timer. 1 Transfer to SV area Set value SV5 X0 TML5, K300 300 T5 Y102 When the trigger X0 (timer execution condition) rises from off to on, the setting is transferred from the setting value area SV to the elapsed value area EV with the same number. (The same operation takes place if the mode is changed to RUN while the trigger (execution condition) is on.)3 With each scan, the value in the elapsed value area EV decrements if the trigger (execution condition) is on. 2 Transfer to EV area SV5 EV5 X0 TML5, K300 300 300 229 T5 Y10 3 Decrement 228 operation 227 2 - 37
  • 145. Basic Instructions4 When the value in the elapsed value area EV reaches zero, the timer contact T with the same number goes on. SV5 EV5 X0 TML5, K300 300 0 4 Decrement operation ends T5 Y10Important points when specifying constant (K)The constant (K) can be changed during RUN.A specified constant (K) cannot be modified by index modification.This program cannot be executed. X0 TML5, I0K300When the constant (K) is specified, the timer number cannot be modified by index modification.This program cannot be executed. X0 TML I05, K3002) Using a word memory area for a timer settingTimer operation when a word memory area is specifiedA word memory area specified as a set value is used as a setting value area1 When the execution condition (X0) for a high-level instruction goes on, the setting value is set in the specified area (this explanation uses DT0 as an example). The following diagram uses the F0 (MV) instruction as an example. Setting value X0 F0 MV, K30, DT0 DT0 30 X1 TML5, DT0 1 Transfer to set value area T5 Y102 When the timer execution condition rises from off to on, the value is transferred from the setting value area (DT0 in this example) to the elapsed value area EV with the same number as the timer. (The same operation takes place if the mode is changed to RUN while the trigger (execution condition) is on.)2 - 38
  • 146. Basic Instructions3 With each scan, the value in the elapsed value area EV decrements if the trigger (execution condition) is on. 2 Transfer to EV area X0 F0 MV, K30, SV5 DT0 EV5 30 30 X1 TML5, DT0 29 3 Decrement 28 27 T5 Y104 When the value in the elapsed value area EV reaches zero, the timer contact T with the same number goes on. X1 TML5, DT0 DT0 EV5 30 0 T5 Y10 4 Decrement operation endsImportant points when specifying a word memory areaEven if the value of the specified word memory area is changed during decrement operation, decrementoperation will continue using the value prior to the change. Timer operation using the new value will not beginuntil the next time the execution condition changes from off to on.There are both word memory area which reset (non-hold type) and do not reset (hold type) when the power isturned off or the mode changed from RUN to PROG. If you need to retain the value written to a word memoryarea when the power is turned on a second time, or after the mode is changed from RUN to PROG., use amemory area which has been set for hold type with the system register.When a word memory area is used for a set value, the memory area address and timer number can bemodified by index modification. Example: Modifying a memory area address X1 TML5, I2DT0 When I2 = K10, DT10 is used as the setting value area. - Setting value area: DT10 - Elapsed value area: EV5 - Timer contact: T5 2 - 39
  • 147. Basic Instructions Example: Modifying a timer number X1 TML I05, DT 0 T15 Y10 When I0 = K10, the timer operates as TML15. - Setting value area: DT0 - Elapsed value area: EV15 - Timer contact: T15 The timer contact can also be modified by index modification. Notes When a timer number is modified, the number of steps is 4 regardless of the value in the index register. When both the memory area address and timer number are modified, different index registers can be used for each.Examples of timer instruction applicationsSerial connection of timerLadder diagram Boolean Time chart on ST X 0 X0 off X0 TMX 0, K 30 TML 1, K 200 TMX 0 on K 30 T0 off T0 Y10 TML 1 on 3s K 200 T1 off 0.2s T1 Y11 ST T 0 on Y10 off OT Y 10 ST T 1 on Y11 off OT Y 11Parallel connection of timerLadder diagram Boolean Time chart on ST X 0 X0 off X0 TML 0, K 300 PSHS on T0 off TML 0 0.3s TML 1, K 200 K 300 T1 on off POPS 0.2s T0 Y10 TML 1 on Y10 off K 200 T1 ST T 0 Y11 on Y11 off OT Y 10 ST T 1 OT Y 112 - 40
  • 148. Basic InstructionsChanging set values based on specified conditionsThe set value is K50 when X0 is on and K30 when X1 is on.Ladder diagram Boolean Time chart on ST/ X 1 X0 off X1 X0 AN X 0 on F0 MV, K 500, DT 0 F0 (MV) X1 off X0 X1 K 500 on X2 off F0 MV, K 300, DT 0 DT 0 X2 TML 5, DT 0 ST/ X 0 on T5 off AN X 1 F0 (MV) 0.5s 0.3s T5 Y30 K 300 DT0 K0 K500 K300 K500 DT 0 ST X 2 TML 5 DT 0 ST T 5 OT Y 30Example of setting a set value from external digital switchesThe BCD data of the digital switches connected to X0 through XF is converted and becomes the set value Connection example Ladder diagram Boolean R10 ST R 10 F81 BIN, WX 0, DT 1 F81 (BIN) CPU and input units WX 0 R11 TML 5, DT 1 DT 1 ST R 11 T5 Y30 TML 5 DT 1 0 7 9 4 Set value ST T 5 of timer OT Y 30 WX0 Digital switch 2 - 41
  • 149. Basic Instructions TMR Timer (0.01s units) TMX Timer (0.1s units) TMY Timer (1.0s units)Outline TMR:Sets the on-delay timer for 0.01 s units TMX: Sets the on-delay timer for 0.1 s units TMY: Sets the on-delay timer for 1.0 s units 6Program example Boolean Ladder Diagram Address Instruction Timer number Unit of timer 0 ST X 0 Trigger Set value TMX 5 K 30 1 TMX 5 X0 0 K 30 Elapsed value T5 Y37 4 ST T 5 4 5 OT Y 37 Timer contact of timer No.5Operands Timer/ Index Relay Register Constant Index Counter register Instruction modifier WX WY WR WL EV DT LD FL SV IX IY K H (*2) (*1) (*1) (*1) (*1) (*1) (*1) (*1) (*1) A: Available Set value A A A A A A A A A N/A N/A A N/A A N/A: Not Available(*1) This can be used with the FP2SH/FP10SH.(*2) This can be used with the FP2/FP2SH/FP10SH.DescriptionThe timer is a non - hold type that is reset if the power is turned off, or if the mode is changed from the RUN tothe PROG mode. If it is necessary to hold the operation state, set system register 6.When the trigger is on, the set time [n] decrements, and when the elapsed value reaches zero, timer contactTn (n is the timer contact number) turns on.If the trigger turns off during operation, operation stops and the elapsed value is reset (cleared to 0).An OT instruction can be entered immediately after a timer coil.2 - 42
  • 150. Basic InstructionsTimer set timeThe formula of the timer set time is [the time unit] × [set value]The timer setting [n] must be a decimal constant from K1 to K32767.- TMR is from 0.01 to 327.67 seconds in increments of 0.01 seconds.- TMX is from 0.1 to 3276.7 seconds in increments of 0.1 seconds.- TMY is from 1 to 32767 seconds in increments of 1 second. Example: When K43 is set in TMX, the set time is 0.1 × 43 = 4.3 seconds. When K500 is set in TMR, the set time is 0.01 × 500 = 5 seconds.Precautions during programmingIn order to ensure correct timer operation, the TM instruction should be executed in every scan. Be aware ofthis when using instructions like INT, JP and LOOP.When a timer instruction is combined with an ANS or POPS instruction, take care that the syntax is correct.Timer operationThe following is an example of setting the set value with a K constant. For an explanation of operation whenan set value area (SV) is specified, see the following pages.1 When the mode is changed to RUN or when the power is turned on with the mode set to RUN, the timer set value is transferred to the set value area (SV) with the same number. 1 Transfers to SV area Set value SV5 X0 TMX 5, K 30 30 T5 Y102 When the timer trigger rises from off to on, the setting is transferred from the set value area (SV) to the elapsed value area (EV) with the same number. (The same operation takes place if the mode is changed to RUN when the trigger is on.)3 The value in the elapsed value area (EV) decrements every scan if the trigger stays on. 2 Transfers to EV area SV5 EV5 X0 TMX 5, K 30 30 30 29 T5 Y10 28 27 3 Decrements 2 - 43
  • 151. Basic Instructions4 When the value in the elapsed value area (EV) reaches zero, the timer contact (T) with same number turns on. SV5 EV5 X0 TMX 5, K 30 30 0 4 Decrement operation ends T5 Y10Examples of timer instruction applicationsSerial connection of timerLadder diagram Boolean Time chart on ST X 0 X0 off X0 TMX 0, K 30 TMX 1, K 20 TMX 0 on K 30 T0 off T0 Y10 TMX 1 on 3s K 20 T1 off 2s T1 Y11 ST T 0 on Y10 off OT Y 10 ST T 1 on Y11 off OT Y 11Parallel connection of timerLadder diagram Boolean Time chart on ST X 0 X0 off X0 TMX 0, K 30 PSHS on T0 off TMX 0 TMX 1, K 20 K 30 T1 on 3s off POPS T0 Y10 TMX 1 on Y10 off 2s K 20 T1 ST T 0 Y11 on Y11 off OT Y 10 ST T 1 OT Y 112 - 44
  • 152. Basic InstructionsDirectly specifying a set value area number as a timer setting valueWith FP0/FPΣ/FP2/FP2SH/FP10SH, FP3 with a CPU Ver. 4.4 or later and FP - M/FP1 with a CPU Ver. 2.7 orlater, the set value area number can be specified directly as the set value n. X0 F0 MV, K30, SV5 ............. 1 X1 TMX 5, SV5 ............. 2 T5 Y10The above program operates as follows:1 When trigger X0 is on the data transfer instruction F0 (MV) is executed, set the K30 in SV5.2 When trigger X1 turns on, decrement operation begins from the set value 30.Specify n (the number of the set value area SV) to be the same number as the timer. Timer number Set value area number (n)Ladder TMX 5 SV 5diagram: These must be the sameEven if the value of the set value area (SV) is changed during decrement operation, the decrement operationwill continue from the value before the change. Timer operation from the new value will not begin untildecrement operation has ended or is interrupted and the trigger subsequently changes from off to on.The set value area (SV) is normally a non - hold type which resets if the power is turned off or the mode ischanged from RUN to PROG.If the SV value was changed while in the RUN mode, and that value is to be used as the set value, withoutbeing reset, the next time that the power supply is turned on, or when the mode is changed from RUN toPROG, system register 6 should be used to specify the value as a hold type. 2 - 45
  • 153. Basic InstructionsTimer operation when a set value area number is directly specified1 When the trigger for a high - level instruction is on, the value is set in the set value area (SV). The following diagram shows an example of using the high - level instruction F0(MV). Set value X0 F0 MV, K30, SV5 SV5 30 X1 TMX 5, SV 5 1 Transfers to SV area T5 Y102 When the timer trigger rises from off to on, the setting is transferred from the set value area (SV) to the elapsed value area (EV) with the same number. (The same operation takes place if the mode is changed to RUN when the trigger is on.)3 The value in the elapsed value area (EV) decrements if the trigger stays on every scan. 2 Transfers to EV area X0 F0 MV, K30, SV5 SV5 EV5 30 30 X1 TMX 5, SV 5 29 28 3 Decrement 27 T5 Y10 operation4 When the value in the elapsed value area (EV) reaches zero, the timer contact (T) with same number turns on. X1 TMX 5, SV 5 SV5 EV5 30 0 T5 Y10 4 Decrement operation ends2 - 46
  • 154. Basic InstructionsExamples of applying direct specification of set value area numbersChanging set values based on specified conditionsThe set value is K50 when X0 is on and K30 when X1 is on.Ladder diagram Boolean Time chart on ST/ X 1 X0 off X1 X0 AN X 0 on F0 MV, K 50, SV 5 F0 (MV) X1 off X0 X1 K 50 on F0 MV, K 30, SV 5 X2 off SV 5 X2 TMX 5, SV 5 ST/ X 0 on T5 off AN X 1 5s F0 (MV) 3s T5 Y30 K 30 SV5 K0 K50 K30 K50 SV 5 ST X 2 TMX 5 SV 5 ST T 5 OT Y 30Example of setting a set value from external digital switchesThe BCD data of the digital switches connected to X0 through XF is converted and becomes the set valueConnection example Ladder diagram Boolean R10 ST R 10 F81 BIN, WX 0, SV 5 F81 (BIN) CPU and input units WX 0 R11 TMX 5, SV 5 SV 5 ST R 11 T5 Y30 TMX 5 SV 5 0 7 9 4 Set value ST T 5 of timer OT Y 30 WX0 Digital switchWith the FP2SH and FP10SH, a memory area such as a data register DT can be specified as the set value.