温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,汇文网负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
网站客服:3074922707
IEC_61131
_2003
INTERNATIONAL STANDARD IEC61131-3 Second edition2003-01 Programmable controllers Part 3:Programming languages Automates programmables Partie 3:Langages de programmation Reference number IEC 61131-3:2003(E)Copyright International Electrotechnical Commission Provided by IHS under license with IECLicensee=Technip Abu Dabhi/5931917101 Not for Resale,02/12/2006 07:01:30 MSTNo reproduction or networking permitted without license from IHS-,-,-Publication numbering As from 1 January 1997 all IEC publications are issued with a designation in the 60000 series.For example,IEC 34-1 is now referred to as IEC 60034-1.Consolidated editions The IEC is now publishing consolidated versions of its publications.For example,edition numbers 1.0,1.1 and 1.2 refer,respectively,to the base publication,the base publication incorporating amendment 1 and the base publication incorporating amendments 1 and 2.Further information on IEC publications The technical content of IEC publications is kept under constant review by the IEC,thus ensuring that the content reflects current technology.Information relating to this publication,including its validity,is available in the IEC Catalogue of publications(see below)in addition to new editions,amendments and corrigenda.Information on the subjects under consideration and work in progress undertaken by the technical committee which has prepared this publication,as well as the list of publications issued,is also available from the following:IEC Web Site(www.iec.ch)Catalogue of IEC publications The on-line catalogue on the IEC web site(http:/www.iec.ch/searchpub/cur_fut.htm)enables you to search by a variety of criteria including text searches,technical committees and date of publication.On-line information is also available on recently issued publications,withdrawn and replaced publications,as well as corrigenda.IEC Just Published This summary of recently issued publications(http:/www.iec.ch/online_news/justpub/jp_entry.htm)is also available by email.Please contact the Customer Service Centre(see below)for further information.Customer Service Centre If you have any questions regarding this publication or need further assistance,please contact the Customer Service Centre:Email:custserviec.ch Tel:+41 22 919 02 11 Fax:+41 22 919 03 00 Copyright International Electrotechnical Commission Provided by IHS under license with IECLicensee=Technip Abu Dabhi/5931917101 Not for Resale,02/12/2006 07:01:30 MSTNo reproduction or networking permitted without license from IHS-,-,-INTERNATIONAL STANDARD IEC61131-3 Second edition2003-01 Programmable controllers Part 3:Programming languages Automates programmables Partie 3:Langages de programmation IEC 2003 Copyright-all rights reserved No part of this publication may be reproduced or utilized in any form or by any means,electronic or mechanical,including photocopying and microfilm,without permission in writing from the publisher.International Electrotechnical Commission,3,rue de Varemb,PO Box 131,CH-1211 Geneva 20,SwitzerlandTelephone:+41 22 919 02 11 Telefax:+41 22 919 03 00 E-mail:inmailiec.ch Web:www.iec.ch For price,see current catalogue PRICE CODE Commission Electrotechnique InternationaleInternational Electrotechnical Commission XE Copyright International Electrotechnical Commission Provided by IHS under license with IECLicensee=Technip Abu Dabhi/5931917101 Not for Resale,02/12/2006 07:01:30 MSTNo reproduction or networking permitted without license from IHS-,-,-2 61131-3 IEC:2003(E)CONTENTS FOREWORD.8 1 General.9 1.1 Scope.9 1.2 Normative references.9 1.3 Definitions.9 1.4 Overview and general requirements.14 1.4.1 Software model.14 1.4.2 Communication model.16 1.4.3 Programming model.18 1.5 Compliance.19 1.5.1 System compliance.20 1.5.2 Program compliance.22 2 Common elements.23 2.1 Use of printed characters.23 2.1.1 Character set.23 2.1.2 Identifiers.23 2.1.3 Keywords.24 2.1.4 Use of white space.24 2.1.5 Comments.24 2.1.6 Pragmas.25 2.2 External representation of data.25 2.2.1 Numeric literals.25 2.2.2 Character string literals.26 2.2.3 Time literals.28 2.2.3.1 Duration.28 2.2.3.2 Time of day and date.29 2.3 Data types.29 2.3.1 Elementary data types.30 2.3.2 Generic data types.31 2.3.3 Derived data types.32 2.3.3.1 Declaration.32 2.3.3.2 Initialization.33 2.3.3.3 Usage.35 2.4 Variables.36 2.4.1 Representation.36 2.4.1.1 Single-element variables.36 2.4.1.2 Multi-element variables.38 2.4.2 Initialization.38 2.4.3 Declaration.39 2.4.3.1 Type assignment.41 2.4.3.2 Initial value assignment.42 2.5 Program organization units.45 2.5.1 Functions.45 2.5.1.1 Representation.46 2.5.1.2 Execution control.49 2.5.1.3 Declaration.50 2.5.1.4 Typing,overloading,and type conversion.52 2.5.1.5 Standard functions.55 2.5.1.5.1 Type conversion functions.55 2.5.1.5.2 Numerical functions.56 2.5.1.5.3 Bit string functions.59 2.5.1.5.4 Selection and comparison functions.59 2.5.1.5.5 Character string functions.62 2.5.1.5.6 Functions of time data types.64 2.5.1.5.7 Functions of enumera