Transcription of CX-Programmer Ver. 9 WS02-CXPC1-V9 - Omron
1 Cat. No. W447-E1-09CX- programmer Ver. 9WS02- cxpc1 -V9 SYSMACOPERATION MANUALF unction Blocks/Structured TextCX-ProgrammerVer. 9.@ WS02-CXPC1-V9 Operation ManualFunction Blocks/Structured TextRevised December 2009ivvNotice: Omron products are manufactured for use according to proper procedures by a qualified operatorand only for the purposes described in this following conventions are used to indicate and classify precautions in this manual . Always heedthe information provided with them. Failure to heed precautions can result in injury to people or dam-age to property.!DANGERI ndicates an imminently hazardous situation which, if not avoided, will result in death orserious injury. Additionally, there may be severe property damage.
2 !WARNINGI ndicates a potentially hazardous situation which, if not avoided, could result in death orserious injury. Additionally, there may be severe property damage. !CautionIndicates a potentially hazardous situation which, if not avoided, may result in minor ormoderate injury, or property Product ReferencesAll Omron products are capitalized in this manual . The word Unit is also capitalized when it refers toan Omron product, regardless of whether or not it appears in the proper name of the abbreviation Ch, which appears in some displays and on some Omron products, often means word and is abbreviated Wd in documentation in this abbreviation PLC means Programmable Controller. PC is used, however, in some Program-ming Device displays to mean Programmable AidsThe following headings appear in the left column of the manual to help you locate different types information of particular interest for efficient and convenient opera-tion of the ,2, Indicates lists of one sort or another, such as procedures, checklists, etc.
3 Omron , 2008 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, orby any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission patent liability is assumed with respect to the use of the information contained herein. Moreover, because Omron is con-stantly striving to improve its high-quality products, the information contained in this manual is subject to change withoutnotice. Every precaution has been taken in the preparation of this manual . Nevertheless, Omron assumes no responsibilityfor errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained inthis publication.
4 ViPart 1: Function BlockPart 2: Structured TextSECTION 1 Introduction to Function BlocksSECTION 2 Function Block SpecificationsSECTION 3 Creating Function BlocksSECTION 4 Introduction to Structured TextSECTION 5 Structured Text (ST) Language Specifica-tionsSECTION 6 Creating ST ProgramsAppendicesixTABLE OF CONTENTSPRECAUTIONS .. xxi1 Intended Audience ..xxii2 General Precautions ..xxii3 Safety Precautions ..xxii4 Application Precautions..xxiiiPart 1:Function BlocksSECTION 1 Introduction to Function Blocks ..31-1 Introducing the Function Blocks ..41-2 Function Blocks ..111-3 Variables ..181-4 Converting Function Block Definitions to Library Files ..231-5 Usage Procedures..231-6 Version Upgrade Information ..25 SECTION 2 Function Block Specifications.
5 292-1 Function Block Specifications ..302-2 Data Types Supported in Function Blocks ..412-3 Instance Specifications ..422-4 Programming Restrictions ..512-5 Function Block Applications Guidelines..562-6 Precautions for Instructions with Operands Specifying the First or Last of Multiple Words652-7 Instruction Support and Operand Restrictions..682-8 CPU Unit Function Block Specifications ..702-9 Number of Function Block Program Steps and Instance Execution Time ..76 SECTION 3 Creating Function Blocks..793-1 Procedural Flow ..803-2 Procedures ..82xTABLE OF CONTENTSPart 2:Structured Text (ST)SECTION 4 Introduction to Structured Text .. 1314-1ST Language ..1324-2CX- programmer Specifications ..133 SECTION 5 Structured Text (ST) Language Specifications.
6 1355-1 Structured Text Language Specifications ..1365-2 Data Types Used in ST Programs ..1375-3 Inputting ST Programs..1385-4ST Language Configuration ..1415-5 Statement Descriptions ..1485-6ST-language Program Example ..1665-7 Restrictions ..167 SECTION 6 Creating ST Programs .. 1696-1 Procedures ..170 AppendicesASystem-defined external variables supported in function blocks ..181 BStructured Text Errors ..183 CFunction Descriptions ..187 Index.. 201 Revision History .. 203xiAbout this manual :This manual describes the CX-Programmer operations that are related to the function block functionsand Structured Text (ST) functions. The function block and structure text functionality of CX-Program-mer is supported by CJ2H CPU Units, by CS1-H, CJ1-H, and CJ1M CPU Units with unit version orlater, by CP-series CPU Units, and by NSJ-series and FQM1-series Controllers.
7 Some function block and structure text functionality, however, is supported only by CJ2H CPU Units, byCS1-H, CJ1-H, and CJ1M CPU Units with unit version or later. For details, refer to 1-6 Version Upgrade Information. For information on functionality other than function blocks and structure text, refer to the following man-uals. CX-Programmer : CX-Programmer Operation manual (W446) and CX-Programmer Operation manual : SFC (W469) CPU Unit: The operation manuals for the CS-series, CJ-series, CP-series, and NSJ-series ControllersCX- programmer Ver. 9.@ Manuals NameCat. ws02 - cxpc1 -V9CX- programmer Operation ManualFunction Blocks/Structured TextW447 (this manual )Explains how to use the CX-Programmer software s function block and structured text functions.
8 For explanations of other shared CX-Programmer functions, refer to the CX-Program-mer Operation manual (W446). SYSMAC ws02 - cxpc1 -V9CX- programmer Operation ManualW446 Provides information on how to use the CX-Programmer for all functionality except for function ws02 - cxpc1 -V9CX- programmer Operation manual : SFCW469 Explains how to use the SFC programming functions. For explanations of other shared CX-Programmer functions, refer to the CX-Programmer Operation manual (W446). CX-Net Operation ManualW362 Information on setting up networks, such as setting data links, routing tables, and unit CXONE-AL@@C-V4 SYSMAC CXONE-AL@@D-V4CX-Integrator Operation ManualW445 Describes the operating procedures for the , CJ1-H, and CJ1M CPU Unit ManualsNameCat. CJ SeriesCJ2H-CPU6@-EIP, CJ2H-CPU6@Programmable ControllersHardware User's ManualW472 Provides an outline of and describes the design, installation, maintenance, and other basic operations for the CJ-series CJ2 CPU following information is included:Overview and featuresSystem configurationInstallation and wiringTroubleshootingUse this manual together with the CJ SeriesCJ2H-CPU6@-EIP, CJ2H-CPU6@Programmable ControllersSoftware User's ManualW473 Describes programming and other methods to use the func-tions of the CJ2 CPU following information is included.
9 CPU Unit operationInternal memory areasProgrammingTasksCPU Unit built-in functionsUse this manual together with the CS/CJ SeriesCS1G/H-CPU@@ -EV1, CS1G/H-CPU@@H,CS1D-CPU@@H, CS1D-CPU@@S,CJ2H-CPU6@-EIP, CJ2H-CPU6@, CJ1H-CPU@@H-RCJ1G-CPU@@, CJ1G/H-CPU@@H,CJ1G-CPU@@P, C J 1 M - C P U@@SYSMAC One NSJ SeriesNSJ@-@@@@(B)-G5 DNSJ@-@@@@(B)-M3 DProgrammable ControllersInstructions Reference ManualW474 Describes the ladder diagram programming instructions sup-ported by CS/CJ-series or NSJ-series programming, use this manual together with the Oper-ation manual or Hardware User's manual (CS1: W339, CJ1: W393,or CJ2:W472) and Programming manual or Software User's manual (CS1/CJ1:W394 or CJ2:W473).SYSMAC CS Series CS1G/H-CPU@@-EV1, CS1G/H-CPU@@HProgrammable Controllers Operation ManualW339 Provides an outline of and describes the design, installation, maintenance, and other basic operations for the CS-series following information is included:An overview and featuresThe system configurationInstallation and wiringI/O memory allocationTroubleshootingUse this manual together with the CJ Series CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1H-CPU@@H-R, CJ1G-CPU@@P, CJ1M-CPU@@ Programmable Controllers Operation ManualW393 Provides an outline of and describes the design, installation, maintenance, and other basic operations for the CJ-series PLCs.
10 The following information is included:An overview and featuresThe system configurationInstallation and wiringI/O memory allocationTroubleshootingUse this manual together with the NSJ Controller ManualRefer to the following manual for NSJ-series NSJ Controller specifications and handling methods notgiven in this manual . SYSMAC CS/CJ SeriesCS1G/H-CPU@@-EV1, CS1G/H-CPU@@H, CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1H-CPU@@H-R, CJ1G-CPU@@P, CJ1M-CPU@@, NSJ@-@@@@(B)-G5D, NSJ@-@@@@(B)-M3 DProgrammable Controllers Programming ManualW394 Describes programming and other methods to use the func-tions of the CS/CJ-series and NSJ-series following information is included:ProgrammingTasksFile memoryOther functionsUse this manual together with the W339 or W393. SYSMAC CS/CJ Series CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H, CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1H-CPU@@H-R, CJ1G-CPU@@P, CJ1M-CPU@@, NSJ@-@@@@(B)-G5D, NSJ@-@@@@(B)-M3 DProgrammable ControllersInstructions Reference ManualW340 Describes the ladder diagram programming instructions sup-ported by CS/CJ-series and NSJ-series programming, use this manual together with the Oper-ation manual (CS1: W339 or CJ1: W393) and Programming manual (W394).