IEC TR 61131-8- 可編程的控制器.第8部分 程序設(shè)計(jì)語言的執(zhí)行和應(yīng)用指南_第1頁
IEC TR 61131-8- 可編程的控制器.第8部分 程序設(shè)計(jì)語言的執(zhí)行和應(yīng)用指南_第2頁
IEC TR 61131-8- 可編程的控制器.第8部分 程序設(shè)計(jì)語言的執(zhí)行和應(yīng)用指南_第3頁
IEC TR 61131-8- 可編程的控制器.第8部分 程序設(shè)計(jì)語言的執(zhí)行和應(yīng)用指南_第4頁
IEC TR 61131-8- 可編程的控制器.第8部分 程序設(shè)計(jì)語言的執(zhí)行和應(yīng)用指南_第5頁
已閱讀5頁,還剩158頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、IEC TR 61131-8-2003 可編程的控制器.第8部分 程序設(shè)計(jì)語言的執(zhí)行和應(yīng)用指南TECHNICALIECREPORT TR 61131-8Second edition2003-09Programmable controllers Part 8:Guidelines for the application and implementationof programming languagesAutomates programmables Partie 8:Lignes directrices pour lapplication et la mise en oeuvredes lang

2、ages de programmationReference numberIEC/TR 61131-8:2003(E)?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 versi

3、ons 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 publicat

4、ions 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. Informati

5、on 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 (.iec.ch) ? Catalogue of IEC publications The on-line catalogue on t

6、he IEC web site (.iec.ch/searchpub) 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 Publ

7、ished This summary of recently issued publications (.iec.ch/online_news/ justpub) 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, ple

8、ase contact the Customer Service Centre: Email: custserviec.ch Tel: +41 22 919 02 11 Fax: +41 22 919 03 00 ?TECHNICALIECREPORTTR 61131-8Second edition2003-09Programmable controllers Part 8:Guidelines for the application and implementationof programming languagesAutomates programmables Partie 8:Ligne

9、s directrices pour lapplication et la mise en oeuvredes langages de programmation? IEC 2003 ? Copyright - all rights reservedNo part of this publication may be reproduced or utilized in any form or by any means, electronic ormechanical, including photocopying and microfilm, without permission in wri

10、ting 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: .iec.chPRICE CODECommission Electrotechnique InternationaleXDInternational Electrotechnical C

11、ommissionFor price, see current catalogue? 2 TR 61131-8 ? IEC:2003(E)CONTENTSFOREWORD.6INTRODUCTION.81General.91.1Scope.91.2Normative references.91.3Abbreviated terms.91.4Overview.102Introduction to IEC 61131-3.102.1General considerations.102.2Overcoming historical limitations.122.3Basic features in

12、 IEC 61131-3.132.4New features in the second edition of IEC 61131-3.142.5Software engineering considerations.142.5.1Application of software engineering principles.142.5.2Portability.173Application guidelines.183.1Use of data types.183.1.1Type versus variable initialization.183.1.2Use of enumerated a

13、nd subrange types.183.1.3Use of BCD data.193.1.4Use of REAL data types.213.1.5Use of character string data types.213.1.6Use of time data types.233.1.7Declaration and use of multi-element variables.233.1.8Use of bit-string functions.243.1.9Strongly typed assignment.253.2Data passing.263.2.1Global and

14、 external variables.273.2.2In-out (VAR_IN_OUT) variables.273.2.3Formal and non-formal invocations and argument lists.303.3Use of function blocks.323.3.1Function block types and instances.323.3.2Scope of data within function blocks.333.3.3Function block access and invocation.343.4Differences between

15、function block instances and functions.353.5Use of indirectly referenced function block instances.353.5.1Establishing an indirect function block instance reference.353.5.2Access to indirectly referenced function block instances.373.5.3Invocation of indirectly referenced function block instances.383.

16、5.4Recursion of indirectly referenced function block instances.403.5.5Execution control of indirectly referenced function block instances.403.5.6Use of indirectly referenced function block instances in functions.403.6Recursion within programmable controller programming languages.413.7Single and mult

17、iple invocation.41?TR 61131-8 ? IEC:2003(E) 3 3.8Language specific features.423.8.1Edge-triggered functionality.423.8.2Use of EN/ENO in functions and function blocks.433.8.3Use of non-IEC 61131-3 languages.443.9Use of SFC elements.453.9.1Action control.453.9.2Boolean actions.463.9.3Non-SFC actions.4

18、93.9.4SFC actions.513.9.5SFC function blocks.513.9.6“Indicator” variables.523.10Scheduling, concurrency, and synchronization mechanisms.523.10.1Operating system issues.523.10.2Task scheduling.543.10.3Semaphores.553.10.4Messaging.563.10.5Time stamping.563.11Communication facilities in ISO/IEC 9506/5

19、and IEC 61131-5.573.11.1Communication channels.573.11.2Reading and writing variables.573.11.3Communication function blocks.583.12Deprecated programming practices.593.12.1Global variables.593.12.2Jumps in FBD language.593.12.3Multiple invocations of function block instances in FBD.593.12.4Coupling of

20、 SFC networks.593.12.5Dynamic modification of task priorities.603.12.6Execution control of function block instances by tasks.603.12.7Incorrect use of WHILE and REPEAT constructs.603.13Use of TRUNC and REAL_TO_INT functions.614Implementation guidelines.624.1Resource allocation.624.2Implementation of

21、data types.624.2.1REAL and LREAL data types.624.2.2Bit strings.624.2.3Character strings.634.2.4Time data types.634.2.5Multi-element variables.634.3Execution of functions and function blocks.644.3.1Functions.644.3.2Function blocks.644.4Implementation of SFCs.654.4.1General considerations.654.4.2SFC e

22、volution.664.5Task scheduling.664.5.1Classification of tasks.664.5.2Task priorities.67? 4 TR 61131-8 ? IEC:2003(E)4.6Error handling.674.6.1Error-handling mechanisms.674.6.2Run-time error-handling procedures.694.7System interface.714.8Compliance.714.8.1Compliance statement.714.8.2Controller instructi

23、on sets.714.8.3Compliance testing.725PSE requirements.725.1User interface.725.2Programming of programs, functions and function blocks.735.3Application design and configuration.735.4Separate compilation.745.5Separation of interface and body.755.5.1Invocation of a function from a programming unit.755.

24、5.2Declaration and invocation of a function block instance.765.6Linking of configuration elements with programs.775.7Library management.795.8Analysis tools.795.8.1Simulation and debugging.795.8.2Performance estimation.805.8.3Feedback loop analysis.805.8.4SFC analysis.805.9Documentation requirements.

25、835.10Security of data and programs.835.11On-line facilities.83Annex A (informative) Changes to IEC 61131-3, Second edition.84Annex B (informative) Software quality measures.94Annex 8C (informative) Relationships to other standards.96INDEX.97Bibliography.109Figure 1 A distributed application.11Figur

26、e 2 Stand-alone applications.11Figure 3 Cyclic or periodic scanning of a program.12Figure 4 Function block BCD_DIFF.20Figure 5 Function block SBCD_DIFFF.21Figure 6 ST example of time data type usage.23Figure 7 Example of declaration and use of “anonymous array types”.24Figure 8 Examples of VAR_IN_OU

27、T usage.29Figure 9 Hiding of function block instances.34Figure 10 Graphical use of a function block name.37Figure 11 Access to an indirectly referenced function block instance.37?TR 61131-8 ? IEC:2003(E) 5 Figure 12 Invocation of an indirectly referenced function block instance.39Figure 13 Timing of

28、 edge triggered functionality.43Figure 14 Execution control example.44Figure 15 Timing of Boolean actions.49Figure 16 Example of a programmed non-Boolean action.50Figure 17 Use of the pulse (P) qualifier.51Figure 18 An SFC function block.52Figure 19 Example of incorrect and allowed programming const

29、ructs.61Figure 20 Essential phases of POU creation.73Figure 21 Essential phases of application creation.74Figure 22 Separate compilation of functions and function blocks.74Figure 23 Compiling a program accessing external or directly represented variables.75Figure 24 Compiling a function that invokes

30、 another function.75Figure 25 Compiling a program containing local instances of function blocks.76Figure 26 Separate compilation example.77Figure 27 The configuration process.78Figure 28 Reduction steps.81Figure 29 Reduction of SFCs.82Table 1 IEC 61131-3 elements supporting encapsulation and hiding.

31、15Table 2 Examples of textual invocations of functions and function blocks.31Table 3 Differences between multi-user and real-time systems.54Table 4 Recommended run-time error-handling mechanisms.68Table A.1 Changes in usage to achieve program compliance.93? 6 TR 61131-8 ? IEC:2003(E)INTERNATIONAL EL

32、ECTROTECHNICAL COMMISSION_PROGRAMMABLE CONTROLLERS Part 8: Guidelines for the applicationand implementation of programming languagesFOREWORD1)The International Electrotechnical Commission (IEC) is a worldwide organization for standardization comprisingall national electrotechnical committees (IEC Na

33、tional Committees). The object of IEC is to promoteinternational co-operation on all questions concerning standardization in the electrical and electronic fields. Tothis end and in addition to other activities, IEC publishes International Standards, Technical Specifications,Technical Reports, and Gu

34、ides (hereafter referred to as “IEC Publication(s)”). Their preparation is entrusted totechnical committees; any IEC National Committee interested in the subject dealt with may participate in thispreparatory work. International, governmental and non-governmental organizations liaising with the IEC a

35、lsoparticipate in this preparation. IEC collaborates closely with the International Organization for Standardization(ISO) in accordance with conditions determined by agreement between the two organizations.2)The formal decisions or agreements of IEC on technical matters express, as nearly as possibl

36、e, an internationalconsensus of opinion on the relevant subjects since each technical committee has representation from allinterested IEC National Committees.3)IEC Publications have the form of recommendations for international use and are accepted by IEC NationalCommittees in that sense. While all

37、reasonable efforts are made to ensure that the technical content of IECPublications is accurate, IEC cannot be held responsible for the way in which they are used or for anymisinterpretation by any end user.4)In order to promote international uniformity, IEC National Committees undertake to apply IE

38、C Publicationstransparently to the maximum extent possible in their national and regional publications. Any divergencebetween any IEC Publication and the corresponding national or regional publication shall be clearly indicated inthe latter.5)IEC provides no marking procedure to indicate its approva

39、l and cannot be rendered responsible for anyequipment declared to be in conformity with an IEC Publication.6)All users should ensure that they have the latest edition of this publication.7)No liability shall attach to IEC or its directors, employees, servants or agents including individual experts a

40、ndmembers of its technical committees and IEC National Committees for any personal injury, property damage orother damage of any nature whatsoever, whether direct or indirect, or for costs (including legal fees) andexpenses arising out of the publication, use of, or reliance upon, this IEC Publicati

41、on or any other IECPublications.8)Attention is drawn to the Normative references cited in this publication. Use of the referenced publications isindispensable for the correct application of this publication.9)Attention is drawn to the possibility that some of the elements of this IEC Publication may

42、 be the subject ofpatent rights. IEC shall not be held responsible for identifying any or all such patent rights.The main task of IEC technical committees is to prepare International Standards. However, atechnical committee may propose the publication of a technical report when it has collecteddata

43、of a different kind from that which is normally published as an International Standard, forexample “state of the art”.IEC 61131-8, which is a technical report, has been prepared by subcommittee 65B: Devices,of IEC technical committee 65: Industrial-process measurement and control.This second edition

44、 cancels and replaces the first edition, published in 2000, and constitutesa technical revision.The main changes with respect to the previous edition are to make IEC 61131-8 consistent withIEC 61131-3, 2nd edition.?TR 61131-8 ? IEC:2003(E) 7 The text of this technical report is based on the followin

45、g documents:Enquiry draftReport on voting65B/478/DTR65B/492/RVCFull information on the voting for the approval of this technical report can be found in the reporton voting indicated in the above table.This publication has been drafted in accordance with the ISO/IEC Directives, Part 2.The committee h

46、as decided that the contents of this publication will remain unchanged until2008. At this date, the publication will be?reconfirmed;?withdrawn;?replaced by a revised edition, or?amended.A bilingual version of this publication may be issued at a later date.? 8 TR 61131-8 ? IEC:2003(E)INTRODUCTIONThis

47、 part of IEC 61131 is being issued as a technical report in order to provide guidelines forthe implementation and application of the programming languages defined in IEC 61131-3:2003, second edition. Its contents answer a number of frequently asked questions about the intended applicationand impleme

48、ntation of the normative provisions of IEC 61131-3, second edition and about itsdifferences from IEC 61131-3:1993, first edition.?TR 61131-8 ? IEC:2003(E) 9 PROGRAMMABLE CONTROLLERS Part 8: Guidelines for the applicationand implementation of programming languages1 General1.1 ScopeThis part of IEC 61

49、131, which is a technical report, applies to the programming of program-mable controller systems using the programming languages defined in IEC 61131-3. It alsoprovides guidelines for the implementation of these languages in programmable controllersystems and their programming support environments (

50、PSEs).IEC 61131-4 should be consulted for other aspects of the application of programmablecontroller systems.NOTE Neither IEC 61131-3 nor this technical report explicitly addresses safety issues of programmable controllersystems or their associated software. The various parts of IEC 61508 should be

51、consulted for such considerations.1.2 Normative referencesThe following referenced documents are indispensable for the application of this document. Fordated references, only the edition cited applies. For undated references, the latest edition ofthe referenced document (including any amendments) ap

52、plies.IEC 61131-1:1992, Programmable controllers Part 1: General informationIEC 61131-2:2003, Programmable controllers Part 2: Equipment requirements and testsIEC 61131-3:2003, Programmable controllers Part 3: Programming languagesIEC 61131-5:2000, Programmable controllers Part 5: Communications1.3

53、Abbreviated termsFBFunction BlockFBDFunction Block DiagramLDLadder DiagramILInstruction ListPOUProgram Organization UnitPSEProgramming Support EnvironmentSFCSequential Function ChartST Structured Text? 10 TR 61131-8 ? IEC:2003(E)1.4 OverviewThe intended audience for this technical report consists of

54、users of programmable controller systems as defined in IEC 61131-3, who must program,configure, install and maintain programmable controllers as part of industrial-processmeasurement and control systems; andimplementors of programming languages, as defined in IEC 61131-3, for programmablecontroller

55、systems. This may include vendors of software and hardware for the preparationand maintenance of programs for these systems, as well as vendors of the programmablecontroller systems themselves.IEC 61131-3 is mainly oriented toward the implementors of programming languages forprogrammable controllers

56、. Users who wish a general introduction to these languages and theirapplication should consult any of several generally available textbooks on this subject.Subclause 1.4 of IEC 61131-3 should be consulted by those who wish a “top-down” overview ofthe contents of that standard.Clause 2 of this techni

57、cal report provides a general introduction to IEC 61131-3, while Clause 3provides complementary information about the application of some of the programminglanguage elements specified in IEC 61131-3. Clause 4 provides information about the intendedimplementation of some of these programming language

58、 elements, while Clause 5 providesgeneral information about requirements for hardware and software for program developmentand maintenance. Hence, it is expected that users of programmable controllers will findClauses 2 and 3 of this technical report most useful, while programming languageimplementor

59、s will find Clauses 4 and 5 more useful, referring to the background material inClauses 2 and 3 as necessary.2 Introduction to IEC 61131-32.1 General considerationsIn the past, the limited capabilities of expensive hardware components imposed severeconstraints on the design process for industrial-pr

60、ocess control, measurement and automationsystems. Software design and implementation were tightly tailored to the selected hardware.This required specialists who were highly skilled, both in solving process automation problemsand in dealing with complicated, often hardware-specific computer programm

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論