APPLICATION FUNCTIONS 5 - 1 to 5 - 242 5.1 Type Conversion Functions 5 - 2 5.1.1 Bit Type Word (Signed), Double Word (Signed) Type Conversion
Total Page:16
File Type:pdf, Size:1020Kb
SAFETY PRECAUTIONS (Always read these instructions before using this product.) Before using MELSEC-Q or -L series programmable controllers, please read the manuals included with each product and the relevant manuals introduced in those manuals carefully, and pay full attention to safety to handle the product correctly. Make sure that the end users read the manuals included with each product, and keep the manuals in a safe place for future reference. A-1 CONDITIONS OF USE FOR THE PRODUCT (1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions; i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident; and ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem, fault or failure occurring in the PRODUCT. (2) The PRODUCT has been designed and manufactured for the purpose of being used in general industries. MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR WARNING CONTAINED IN MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL BULLETINS AND GUIDELINES FOR the PRODUCT. ("Prohibited Application") Prohibited Applications include, but not limited to, the use of the PRODUCT in; • Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the public could be affected if any problem or fault occurs in the PRODUCT. • Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality assurance system is required by the Purchaser or End User. • Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator, Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other applications where there is a significant risk of injury to the public or property. Notwithstanding the above, restrictions Mitsubishi may in its sole discretion, authorize use of the PRODUCT in one or more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or other safety features which exceed the general specifications of the PRODUCTs are required. For details, please contact the Mitsubishi representative in your region. A-2 REVISIONS The manual number is written at the bottom left of the back cover. Print date Manual number Revision Jul., 2008 SH(NA)-080784ENG-A First edition Jan., 2009 SH(NA)-080784ENG-B Model Addition Q00UJCPU, Q00UCPU, Q01UCPU, Q10UDHCPU, Q10UDEHCPU, Q20UDHCPU, Q20UDEHCPU Addition Section 2.1.5, Section 5.5.2, Section 5.5.3 Correction GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL, Section 3.7.1 Jul., 2009 SH(NA)-080784ENG-C Model Addition Q00JCPU, Q00CPU, Q01CPU Addition Section 2.2, Section 3.1 Correction Section 1.2, Section 2.1, Section 2.1.1 to Section 2.1.12 are changed to Section 2.2.1 to Section 2.2.12, Section 3.1 is changed to Section 3.2, Chapter 4, Chapter 5 Deletion Section 3.2 to Section 3.7, Appendix 1, Appendix 2 Jan., 2010 SH(NA)-080784ENG-D Model Addition L02CPU, L26CPU-BT Addition CONDITIONS OF USE FOR THE PRODUCT Correction MANUALS, Section 1.1, Section 1.2, Section 3.1, Chapter 4 Apr., 2010 SH(NA)-080784ENG-E Model Addition Q50UDEHCPU, Q100UDEHCPU Correction Section 1.1, Section 1.2 Sep., 2010 SH(NA)-080784ENG-F Addition Section 5.1.39, Section 5.1.40, Section 5.1.41, Section 5.1.42, Section 5.1.43, Section 5.1.44, Section 5.1.45 Correction Section 2.2.1, Section 5.1.30, Section 5.1.31, Section 5.1.33, Section 5.6.1 Jan., 2011 SH(NA)-080784ENG-G Correction Section 1.1, Section 2.2, Section 5.1.13, Section 5.1.19, Section 5.1.25, Section 5.1.29, Section 5.1.30, Section 5.1.31, Section 5.1.32, Section 5.1.33, Section 5.1.34, Section 5.1.36, Section 5.1.37, Section 5.2.1, Section 5.3.6, Section 5.5.1, Section 5.5.2, Section 5.5.3, Section 5.5.4, Section 5.6.1, Section 5.7.1, Section 5.8.1, Section 5.8.2, Section 5.8.4, Section 5.11.1, Section 5.11.2, Section 5.11.3, Section 5.11.4, Section 5.12.1, Section 5.12.2, Section 5.12.3, Section 5.12. A-3 Print date Manual number Revision Mar., 2011 SH(NA)-080784ENG-H Addition Section 2.3, Chapter 6 Correction Section 1.1, Section 2.1, Section 2.2.3, Section 2.2.4, Section 2.2.6, Section 5.1.10, Section 5.1.15, Section 5.1.32, Section 5.1.34, Section 5.1.38, Section 5.2.1, Section 5.3.1, Section 5.3.2, Section 5.3.3, Section 5.3.4, Section 5.3.6, Section 5.3.7, Section 5.4.1, Section 5.6.1, Section 5.8.1, Section 5.8.2, Section 5.8.3, Section 5.8.4, Section 5.9.1, Section 5.9.2, Section 5.10.1, Section 5.10.2, Section 5.11.1, Section 5.11.2, Section 5.11.3, Section 5.11.4, Section 5.12.1, Section 5.12.2, Section 5.12.3, Section 5.12.4 Jul., 2011 SH(NA)-080784ENG-I Model Addition L02CPU-P, L26CPU-PBT Correction Section 1.2, Section 2.3, Chapter 4, Section 5.1.14, Section 5.1.16, Section 5.1.17, Section 5.1.18, Section 5.1.19, Section 5.1.45, Section 5.2.1, Section 5.3.1, Section 5.3.2, Section 5.3.3, Section 5.3.4, Section 5.3.6, Section 5.3.7, Section 5.5.1, Section 5.5.2, Section 5.5.3, Section 5.5.4, Section 5.6.1, Section 5.8.3, Section 5.8.4, Section 5.11.14 Feb., 2013 SH(NA)-080784ENG-J Descriptions concerning the model additions of a Process CPU, Redundant CPU, Universal model QCPU, and LCPU Model Addition Q02PHCPU, Q06PHCPU, Q12PHCPU, Q25PHCPU, Q12PRHCPU, Q25PRHCPU, Q03UDVCPU, Q04UDVCPU, Q06UDVCPU, Q13UDVCPU, Q26UDVCPU, L02SCPU, L06CPU, L26CPU Jun., 2013 SH(NA)-080784ENG-K Model Addition L02SCPU-P, L06CPU-P, L26CPU-P Correction Section 1.2 Japanese manual version SH-080737-O This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual. 2008 MITSUBISHI ELECTRIC CORPORATION A-4 INTRODUCTION Thank you for purchasing the Mitsubishi MELSEC-Q or -L series programmable controllers. Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the programming specifications to handle the product correctly. When applying the program examples introduced in this manual to an actual system, ensure the applicability and confirm that it will not cause system control problems. CONTENTS SAFETY PRECAUTIONS ...............................................................................................................................A - 1 CONDITIONS OF USE FOR THE PRODUCT................................................................................................. A - 2 REVISIONS.......................................................................................................................................................A - 3 INTRODUCTION...............................................................................................................................................A - 5 CONTENTS ......................................................................................................................................................A - 5 MANUALS.........................................................................................................................................................A - 9 1. OVERVIEW 1 - 1 to 1 - 6 1.1 Purpose of This Manual 1 - 2 1.2 Terms 1 - 5 2. FUNCTION TABLES 2 - 1 to 2 - 8 2.1 How to Read Function Tables 2 - 2 2.2 Function Tables 2 - 3 2.2.1 Type conversion functions............................................................................................................. 2 - 3 2.2.2 Standard functions of one numeric variable .................................................................................. 2 - 5 2.2.3 Standard arithmetic functions ........................................................................................................ 2 - 5 2.2.4 Standard bitwise Boolean functions............................................................................................... 2 - 5 2.2.5 Standard selection functions.......................................................................................................... 2 - 5 2.2.6 Standard comparison functions ..................................................................................................... 2 - 6 2.2.7 Standard character string functions............................................................................................... 2 - 6 2.2.8 Functions of time data types.......................................................................................................... 2 - 6 2.2.9 Standard bistable function blocks.................................................................................................. 2 - 6 2.2.10 Standard edge detection function blocks....................................................................................... 2 - 7 2.2.11 Standard counter function blocks .................................................................................................