1、 IEC 61158-6-21 Edition 1.0 2010-08 INTERNATIONAL STANDARD Industrial communication networks Fieldbus specifications Part 6-21: Application layer protocol specification Type 21 elements IEC 61158-6-21:2010(E) THIS PUBLICATION IS COPYRIGHT PROTECTED Copyright 2010 IEC, Geneva, Switzerland All rights
2、reserved. Unless otherwise specified, 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 either IEC or IECs member National Committee in the country of the requester
3、. If you have any questions about IEC copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or your local IEC member National Committee for further information. IEC Central Office 3, rue de Varemb CH-1211 Geneva 20 Switzerland Email: inm
4、ailiec.ch Web: www.iec.ch About the IEC The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes International Standards for all electrical, electronic and related technologies. About IEC publications The technical content of IEC publications
5、 is kept under constant review by the IEC. Please make sure that you have the latest edition, a corrigenda or an amendment might have been published. Catalogue of IEC publications: www.iec.ch/searchpub The IEC on-line Catalogue enables you to search by a variety of criteria (reference number, text,
6、technical committee,). It also gives information on projects, withdrawn and replaced publications. IEC Just Published: www.iec.ch/online_news/justpub Stay up to date on all new IEC publications. Just Published details twice a month all new publications released. Available on-line and also by email.
7、Electropedia: www.electropedia.org The worlds leading online dictionary of electronic and electrical terms containing more than 20 000 terms and definitions in English and French, with equivalent terms in additional languages. Also known as the International Electrotechnical Vocabulary online. Custo
8、mer Service Centre: www.iec.ch/webstore/custserv If you wish to give us your feedback on this publication or need further assistance, please visit the Customer Service Centre FAQ or contact us: Email: csciec.ch Tel.: +41 22 919 02 11 Fax: +41 22 919 03 00 IEC 61158-6-21 Edition 1.0 2010-08 INTERNATI
9、ONAL STANDARD Industrial communication networks Fieldbus specifications Part 6-21: Application layer protocol specification Type 21 elements INTERNATIONAL ELECTROTECHNICAL COMMISSION XA ICS 25.04.40; 35.100.70; 35.110 PRICE CODE ISBN 978-2-88912-135-9 Registered trademark of the International Electr
10、otechnical Commission 2 61158-6-21 IEC:2010(E) CONTENTS FOREWORD.5 INTRODUCTION.7 1 Scope.8 1.1 General .8 1.2 Overview.8 1.3 Specifications9 1.4 Conformance.9 2 Normative references .9 3 Terms, definitions, symbols, abbreviations, and conventions 10 3.1 Terms and definitions from other ISO/IEC stan
11、dards .10 3.2 Other terms and definitions .10 3.3 Abbreviations and symbols16 3.4 Conventions 17 4 FAL syntax description .19 4.1 General .19 4.2 FAL-AR PDU abstract syntax 19 4.3 Abstract syntax of PDU body.20 4.4 Protocol data units (PDUs) for application service elements (ASEs) 21 5 Transfer Synt
12、ax24 5.1 Overview of encoding24 5.2 APDU header encoding .25 5.3 APDU body encoding 26 5.4 Encoding of Data types .26 6 FAL protocol state machines 30 7 AP context state machine .32 8 FAL service protocol machine.32 8.1 General .32 8.2 Common parameters of the primitives .32 8.3 AP ASE protocol mach
13、ine .32 8.4 Service data object ASE protocol machine (SDOM).36 8.5 Process data object ASE protocol machine (PDOM)40 9 AR protocol machine 41 9.1 General .41 9.2 Point-to-point user-triggered confirmed client/server AREP (PTC-AR) ARPM 42 9.3 Multipoint network-scheduled unconfirmed publisher/subscri
14、ber AREP (MSU-AR) ARPM.44 9.4 Multipoint user-triggered unconfirmed publisher/subscriber AREP (MTU-AR) ARPM47 10 DLL mapping protocol machine 49 10.1 Primitive definitions .49 10.2 DMPM state machine 50 Bibliography51 Figure 1 Common structure of specific fields17 Figure 2 APDU overview25 61158-6-21
15、 IEC:2010(E) 3 Figure 3 Type field.25 Figure 4 Encoding of Time of Day value.29 Figure 5 Encoding of Time Difference value.30 Figure 6 Primitives exchanged between protocol machines31 Figure 7 State transition diagram of APAM.34 Figure 8 State transition diagram of SDOM 37 Figure 9 State transition
16、diagram of PDOM 40 Figure 10 State transition diagram of PTC-ARPM 43 Figure 11 State transition diagram of MSU-ARPM46 Figure 12 State transition diagram of MTU-ARPM48 Figure 13 State transition diagram of DMPM50 Table 1 Conventions used for AE state machine definitions .18 Table 2 Status code for th
17、e confirmed response primitive 21 Table 3 Encoding of FalArHeader field.25 Table 4 Transfer Syntax for bit sequences .26 Table 5 Transfer syntax for data type UNSIGNEDn27 Table 6 Transfer syntax for data type INTEGERn.28 Table 7 Primitives exchanged between FAL-user and APAM33 Table 8 Parameters use
18、d with primitives exchanged FAL-user and APAM .34 Table 9 APAM state table Sender transitions 34 Table 10 APAM state table Receiver transitions35 Table 11 Functions used by the APAM.35 Table 12 Primitives exchanged between FAL-user and SDOM .36 Table 13 Parameters used with primitives exchanged FAL-
19、user and SDOM.37 Table 14 SDOM state table Sender transitions38 Table 15 SDOM state table Receiver transitions .39 Table 16 Functions used by the SDOM 39 Table 17 Primitives exchanged between FAL-user and PDOM .40 Table 18 Parameters used with primitives exchanged between FAL-user and PDOM.40 Table
20、19 PDOM state table Sender transitions41 Table 20 PDOM state table Receiver transitions .41 Table 21 Functions used by the SDOM 41 Table 22 Primitives issued by user to PTC-ARPM42 Table 23 Primitives issued by PTC-ARPM to user42 Table 24 PTC-ARPM state table sender transactions 43 Table 25 PTC-ARPM
21、state table receiver transactions 44 Table 26 Function BuildFAL-PDU.44 Table 27 Primitives issued by user to ARPM44 Table 28 Primitives issued by ARPM to user44 Table 29 MSU-ARPM state table sender transactions .46 Table 30 MSU-ARPM state table receiver transactions .46 Table 31 Function BuildFAL-PD
22、U.46 4 61158-6-21 IEC:2010(E) Table 32 Primitives issued by user to ARPM47 Table 33 Primitives issued by ARPM to user47 Table 34 MTU-ARPM state table sender transactions .48 Table 35 MTU-ARPM state table receiver transactions48 Table 36 Function BuildFAL-PDU.49 Table 37 Primitives issued by ARPM to
23、DMPM 49 Table 38 Primitives issued by DMPM to ARPM 49 Table 39 Primitives issued by DMPM to DLL49 Table 40 Primitives issued by DLL to DMPM49 Table 41 DMPM state table sender transactions .50 Table 42 DMPM state table receiver transactions50 61158-6-21 IEC:2010(E) 5 INTERNATIONAL ELECTROTECHNICAL CO
24、MMISSION _ INDUSTRIAL COMMUNICATION NETWORKS FIELDBUS SPECIFICATIONS Part 6-21: Application layer protocol specification Type 21 elements FOREWORD 1) The International Electrotechnical Commission (IEC) is a worldwide organization for standardization comprising all national electrotechnical committee
25、s (IEC National Committees). The object of IEC is to promote international co-operation on all questions concerning standardization in the electrical and electronic fields. To this end and in addition to other activities, IEC publishes International Standards, Technical Specifications, Technical Rep
26、orts, Publicly Available Specifications (PAS) and Guides (hereafter referred to as “IEC Publication(s)”). Their preparation is entrusted to technical committees; any IEC National Committee interested in the subject dealt with may participate in this preparatory work. International, governmental and
27、non- governmental organizations liaising with the IEC also participate 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 agreement
28、s of IEC on technical matters express, as nearly as possible, an international consensus of opinion on the relevant subjects since each technical committee has representation from all interested IEC National Committees. 3) IEC Publications have the form of recommendations for international use and a
29、re accepted by IEC National Committees in that sense. While all reasonable efforts are made to ensure that the technical content of IEC Publications is accurate, IEC cannot be held responsible for the way in which they are used or for any misinterpretation by any end user. 4) In order to promote int
30、ernational uniformity, IEC National Committees undertake to apply IEC Publications transparently to the maximum extent possible in their national and regional publications. Any divergence between any IEC Publication and the corresponding national or regional publication shall be clearly indicated in
31、 the latter. 5) IEC itself does not provide any attestation of conformity. Independent certification bodies provide conformity assessment services and, in some areas, access to IEC marks of conformity. IEC is not responsible for any services carried out by independent certification bodies. 6) All us
32、ers 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 and members of its technical committees and IEC National Committees for any personal injury, property damage or ot
33、her damage of any nature whatsoever, whether direct or indirect, or for costs (including legal fees) and expenses arising out of the publication, use of, or reliance upon, this IEC Publication or any other IEC Publications. 8) Attention is drawn to the Normative references cited in this publication.
34、 Use of the referenced publications is indispensable for the correct application of this publication. 9) Attention is drawn to the possibility that some of the elements of this IEC Publication may be the subject of patent rights. IEC shall not be held responsible for identifying any or all such pate
35、nt rights. NOTE 1 Use of some of the associated protocol types is restricted by their intellectual-property-right holders. In all cases, the commitment to limited release of intellectual-property-rights made by the holders of those rights permits a particular data-link layer protocol type to be used
36、 with physical layer and application layer protocols in type combinations as specified explicitly in the IEC 61784 series. Use of the various protocol types in other combinations may require permission of their respective intellectual-property-right holders. International Standard IEC 61158-6-21 has
37、 been prepared by subcommittee 65C: Industrial networks, of IEC technical committee 65: Industrial-process measurement, control and automation. This standard cancels and replaces IEC/PAS 62573 published in 2008. This first edition constitutes a technical revision 6 61158-6-21 IEC:2010(E) The text of
38、 this standard is based on the following documents: FDIS Report on voting 65C/607/FDIS 65C/621/RVD Full information on the voting for the approval of this standard can be found in the report on voting indicated in the above table. This publication has been drafted in accordance with ISO/IEC Directiv
39、es, Part 2. A list of all parts of the IEC 61158 series, published under the general title Industrial communication networks Fieldbus specifications, can be found on the IEC web site. The committee has decided that the contents of this publication will remain unchanged until the stability date indic
40、ated on the IEC web site under “http:/webstore.iec.ch“ in the data related to the specific publication. At this date, the publication will be: reconfirmed; withdrawn; replaced by a revised edition, or amended. NOTE 2 The revision of this standard will be synchronized with the other parts of the IEC
41、61158 series. 61158-6-21 IEC:2010(E) 7 INTRODUCTION This part of IEC 61158 is one of a series produced to facilitate the interconnection of automation system components. It is related to other standards in the set as defined by the “three-layer” fieldbus reference model described in IEC/TR 611581. T
42、he application protocol provides the application service by making use of the services available from the data-link or other immediately lower layer. The primary aim of this standard is to provide a set of rules for communication expressed in terms of the procedures to be carried out by peer applica
43、tion entities (AEs) at the time of communication. These rules for communication are intended to provide a sound basis for development in order to serve a variety of purposes: as a guide for implementers and designers; for use in the testing and procurement of equipment; as part of an agreement for t
44、he admission of systems into the open systems environment; as a refinement to the understanding of time-critical communications within OSI. This standard is concerned, in particular, with the communication and interworking of sensors, effectors and other automation devices. By using this standard to
45、gether with other standards positioned within the OSI or fieldbus reference models, otherwise incompatible systems may work together in any combination. 8 61158-6-21 IEC:2010(E) INDUSTRIAL COMMUNICATION NETWORKS FIELDBUS SPECIFICATIONS Part 6-21: Application layer protocol specification Type 21 elem
46、ents 1 Scope 1.1 General This standard is one of a series produced to facilitate the interconnection of automation system components. It is related to other standards in the set as defined by the three-layer fieldbus reference model described in IEC/TR 61158-1:2010. This standard contains material s
47、pecific to the Type 21 communication protocol. 1.2 Overview The Fieldbus Application Layer (FAL) provides user programs with a means to access the fieldbus communication environment. In this respect, the FAL can be viewed as a window between corresponding application programs. This standard provides
48、 common elements for basic time-critical and non-time-critical messaging communications between application programs in an automation environment, as well as material specific to Type 21. The term “time-critical” is used to represent the presence of a time-window, within which one or more specified
49、actions must to be completed with some defined level of certainty. Failure to complete specified actions within the required time risks the failure of the applications requesting the actions, with attendant risk to equipment, plant, and possibly human life. This standard defines interactions between remote applications. It also defines th