1、 IEC 61158-6-8 Edition 1.0 2007-12 INTERNATIONAL STANDARD NORME INTERNATIONALE Industrial communication networks Fieldbus specifications Part 6-8: Application layer protocol specification Type 8 elements Rseaux de communication industriels Spcifications de bus de terrain Partie 6-8: Spcification de
2、protocole de couche application lments de Type 8 IEC 61158-6-8:2007 THIS PUBLICATION IS COPYRIGHT PROTECTED Copyright 2007 IEC, Geneva, Switzerland All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic or me
3、chanical, including photocopying and microfilm, without permission in writing from either IEC or IECs member National Committee in the country of the requester. If you have any questions about IEC copyright or have an enquiry about obtaining additional rights to this publication, please contact the
4、address below or your local IEC member National Committee for further information. Droits de reproduction rservs. Sauf indication contraire, aucune partie de cette publication ne peut tre reproduite ni utilise sous quelque forme que ce soit et par aucun procd, lectronique ou mcanique, y compris la p
5、hotocopie et les microfilms, sans laccord crit de la CEI ou du Comit national de la CEI du pays du demandeur. Si vous avez des questions sur le copyright de la CEI ou si vous dsirez obtenir des droits supplmentaires sur cette publication, utilisez les coordonnes ci-aprs ou contactez le Comit nationa
6、l de la CEI de votre pays de rsidence. IEC Central Office Tel.: +41 22 919 02 11 3, rue de Varemb Fax: +41 22 919 03 00 CH-1211 Geneva 20 infoiec.ch Switzerland www.iec.ch About the IEC The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
7、 International Standards for all electrical, electronic and related technologies. About IEC publications The technical content of IEC publications 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. Usef
8、ul links: IEC publications search - www.iec.ch/searchpub The advanced search enables you to find IEC publications by a variety of criteria (reference number, text, technical committee,). It also gives information on projects, replaced and withdrawn publications. IEC Just Published - webstore.iec.ch/
9、justpublished Stay up to date on all new IEC publications. Just Published details all new publications released. Available on-line and also once a month by email. Electropedia - www.electropedia.org The worlds leading online dictionary of electronic and electrical terms containing more than 30 000 t
10、erms and definitions in English and French, with equivalent terms in additional languages. Also known as the International Electrotechnical Vocabulary (IEV) on-line. Customer Service Centre - webstore.iec.ch/csc If you wish to give us your feedback on this publication or need further assistance, ple
11、ase contact the Customer Service Centre: csciec.ch. A propos de la CEI La Commission Electrotechnique Internationale (CEI) est la premire organisation mondiale qui labore et publie des Normes internationales pour tout ce qui a trait llectricit, llectronique et aux technologies apparentes. A propos d
12、es publications CEI Le contenu technique des publications de la CEI est constamment revu. Veuillez vous assurer que vous possdez ldition la plus rcente, un corrigendum ou amendement peut avoir t publi. Liens utiles: Recherche de publications CEI - www.iec.ch/searchpub La recherche avance vous permet
13、 de trouver des publications CEI en utilisant diffrents critres (numro de rfrence, texte, comit dtudes,). Elle donne aussi des informations sur les projets et les publications remplaces ou retires. Just Published CEI - webstore.iec.ch/justpublished Restez inform sur les nouvelles publications de la
14、CEI. Just Published dtaille les nouvelles publications parues. Disponible en ligne et aussi une fois par mois par email. Electropedia - www.electropedia.org Le premier dictionnaire en ligne au monde de termes lectroniques et lectriques. Il contient plus de 30 000 termes et dfinitions en anglais et e
15、n franais, ainsi que les termes quivalents dans les langues additionnelles. Egalement appel Vocabulaire Electrotechnique International (VEI) en ligne. Service Clients - webstore.iec.ch/csc Si vous dsirez nous donner des commentaires sur cette publication ou si vous avez des questions contactez-nous:
16、 csciec.ch. IEC 61158-6-8 Edition 1.0 2007-12 INTERNATIONAL STANDARD NORME INTERNATIONALE Industrial communication networks Fieldbus specifications Part 6-8: Application layer protocol specification Type 8 elements Rseaux de communication industriels Spcifications de bus de terrain Partie 6-8: Spcif
17、ication de protocole de couche application lments de Type 8 INTERNATIONAL ELECTROTECHNICAL COMMISSION COMMISSION ELECTROTECHNIQUE INTERNATIONALE XD ICS 25.040.40; 35.100.70 PRICE CODE CODE PRIX ISBN 978-2-83220-636-2 Registered trademark of the International Electrotechnical Commission Marque dpose
18、de la Commission Electrotechnique Internationale Warning! Make sure that you obtained this publication from an authorized distributor. Attention! Veuillez vous assurer que vous avez obtenu cette publication via un distributeur agr. 2 61158-6-8 IEC:2007 CONTENTS FOREWORD . 6 INTRODUCTION . 8 1 Scope
19、. 9 1.1 General . 9 1.2 Specifications 9 1.3 Conformance . 10 2 Normative references . 10 3 Terms and definitions . 10 3.1 ISO/IEC 7498-1 terms . 10 3.9 ISO/IEC 8822 terms 11 3.11 ISO/IEC 9545 terms 11 3.16 ISO/IEC 8824 terms 11 3.37 ISO/IEC 8825 terms 12 3.40 Terms and definitions from IEC 61158-5-
20、8. 12 3.47 Other terms and definitions . 12 4 FAL syntax description . 13 4.1 FAL-AR PDU abstract syntax 13 4.2 Abstract syntax of PDUBody 16 4.3 Type definitions for ASEs 21 4.4 Object definitions 24 4.5 Abstract syntax of Data types 26 5 Transfer syntax 27 5.1 Peripherals encoding rules (PER) 27 5
21、.2 Encoding of APDU types . 27 5.3 Encoding of tagged type values . 29 5.4 Encoding of simple values . 30 6 Protocol machine overview . 36 7 AP-context state machine . 36 7.1 Primitive definitions . 36 7.2 State machine description . 37 7.3 AP to AP-context initiation state transitions . 38 7.4 Func
22、tions 49 8 FAL service protocol machine (FSPM) 52 8.1 Summary . 52 8.2 Primitive definitions . 52 8.3 FSPM state tables . 54 9 Application relationship protocol machines (ARPMs) 57 9.1 Queued user-triggered bidirectional-flow control (QUB-FC) ARPM 57 9.2 Buffered network-scheduled unidirectional (BN
23、U) ARPM . 79 9.3 Queued user-triggered bidirectional transparent mode (QUB-TM) ARPM 87 10 DLL mapping protocol machine 91 10.1 Overview . 91 10.2 Primitive definitions . 92 10.3 DMPM state machine 95 Bibliography 102 61158-6-8 IEC:2007 3 Figure 1 APDU overview 27 Figure 2 APDU header . 27 Figure 3 P
24、DU with type extension 27 Figure 4 PDU with address extension 28 Figure 5 PDU with type and length extension . 28 Figure 6 Example of an Establish-Request PDU. 28 Figure 7 Encoding of a PRIVATE tagged value 29 Figure 8 Encoding of a context specific tagged value . 29 Figure 9 Identification informat
25、ion fields . 29 Figure 10 ID-info for tag 0 14 , length entry 0 6 . 30 Figure 11 ID-info for tag 15 255 , length entry 0 6 30 Figure 12 ID-info for tag 0 14 , length entry 7 255 30 Figure 13 ID-info for tag 15 255 , length entry 7 255 30 Figure 14 Encoding of Boolean value TRUE . 30 Figure 15 Encodi
26、ng of Boolean value FALSE . 30 Figure 16 Encoding of Strings 31 Figure 17 Encoding of BinaryDate value 32 Figure 18 Encoding of BinaryDate2000 value . 32 Figure 19 Encoding of Time-of-day value . 33 Figure 20 Encoding of Time-difference value . 33 Figure 21 Encoding of Time value 34 Figure 22 Exampl
27、e for an Object definition . 35 Figure 23 Primitives exchanged between protocol machines 36 Figure 24 AP to AP-context initiation state machine . 38 Figure 25 State transition diagram of FSPM . 54 Figure 26 State transition diagram of QUB-FC ARPM 60 Figure 27 State transition diagram of the BNU ARPM
28、 82 Figure 28 State transition diagram of QUB-TM AREP . 89 Figure 29 State transition diagram of DMPM 95 Table 1 Primitives issued by FAL-user to AP-context . 36 Table 2 Primitives issued by AP-context to FAL-user . 37 Table 3 AP-context state machine sender transactions 38 Table 4 AP-context state
29、machine receiver transactions 42 Table 5 Function ResetArep . 50 Table 6 Function ApContextTest 50 Table 7 Function ServicesSupportedTest . 50 Table 8 Function ApExplicitConnection 50 Table 9 Function ImmediateAcknowledge 50 Table 10 Function ConfirmedServiceCheck 50 Table 11 Function UnconfirmedSer
30、viceCheck 50 Table 12 Function ArServiceCheck 51 4 61158-6-8 IEC:2007 Table 13 Function ArFspmService . 51 Table 14 Function ArAcceeSupported 51 Table 15 Function MaxFalPduLengthTest 51 Table 16 Function NegotiateOutstandingServices 51 Table 17 Function RequestedServicesSupportedTest 52 Table 18 Fun
31、ction IndicatedServicesSupportedTest . 52 Table 19 Function InvokeIdExistent . 52 Table 20 Function SameService. 52 Table 21 Primitives issued by AP-context to FSPM 53 Table 22 Primitives issued by FSPM to AP-context 53 Table 23 FSPM state table sender transactions 54 Table 24 FSPM state table recei
32、ver transactions 56 Table 25 Function SelectArep 56 Table 26 Primitives issued by FSPM to ARPM . 57 Table 27 Primitives issued by ARPM to FSPM . 57 Table 28 Parameters used with primitives exchanged between FSPM and ARPM 58 Table 29 QUB-FC ARPM states . 60 Table 30 QUB-FC ARPM state table sender tra
33、nsactions 61 Table 31 QUB-FC ARPM state table receiver transactions 66 Table 32 Function GetArepId () 77 Table 33 Function BuildFAL-PDU . 77 Table 34 Function FAL_Pdu_Type . 78 Table 35 Function AREPContextCheck() 78 Table 36 Function AbortIdentifier . 78 Table 37 Function AbortReason . 78 Table 38
34、Function AbortDetail 78 Table 39 Function StartTimer . 79 Table 40 Function StopTimer . 79 Table 41 Function ResetCounters 79 Table 42 Function IncrementCounter . 79 Table 43 Function DecrementCounter 79 Table 44 Function GetCounterValue 79 Table 45 Primitives issued by FSPM to ARPM . 80 Table 46 Pr
35、imitives issued by ARPM to FSPM . 80 Table 47 Parameters used with primitives exchanged between FSPM and ARPM 80 Table 48 BNU ARPM states . 82 Table 49 BNU ARPM state table sender transactions 82 Table 50 BNU ARPM state table receiver transactions 83 Table 51 Function GetArepId () 86 Table 52 Functi
36、on BuildFAL-PDU . 86 Table 53 Function FAL_Pdu_Type . 86 Table 54 Function AbortIdentifier . 86 Table 55 Function AbortReason . 86 61158-6-8 IEC:2007 5 Table 56 Function AbortDetail 86 Table 57 Primitives issued by FAL to ARPM 87 Table 58 Primitives issued by ARPM to FAL 87 Table 59 Parameters used
37、with primitives exchanged between FAL and ARPM . 87 Table 60 QUB-TM ARPM states . 89 Table 61 QUB-TM state table - sender transactions . 89 Table 62 QUB-TM state table - receiver transactions . 90 Table 63 Function GetArepId () 90 Table 64 Function BuildFAL-PDU . 90 Table 65 Function FAL_Pdu_Type .
38、90 Table 66 Function ResetCounters 91 Table 67 Function IncrementCounter . 91 Table 68 Function DecrementCounter 91 Table 69 Function GetCounterValue 91 Table 70 Primitives issued by ARPM to DMPM 92 Table 71 Primitives issued by DMPM to ARPM 93 Table 72 Parameters used with primitives exchanged betw
39、een ARPM and DMPM . 94 Table 73 Primitives exchanged between data-link layer and DMPM . 94 Table 74 DMPM state descriptions . 95 Table 75 DMPM state table sender transactions . 95 Table 76 DMPM state table receiver transactions 99 Table 77 Function PickArep . 100 Table 78 Function FindAREP . 100 Tab
40、le 79 Function SelectNextArep . 100 Table 80 Function ArepRole . 101 Table 81 Function FalArHeader . 101 Table 82 Function AddUcsPduHeader 101 Table 83 Function RemoveUcsPduHeader . 101 Table 84 Function DlLinkStatus . 101 6 61158-6-8 IEC:2007 INTERNATIONAL ELECTROTECHNICAL COMMISSION _ INDUSTRIAL C
41、OMMUNICATION NETWORKS FIELDBUS SPECIFICATIONS Part 6-8: Application layer protocol specification Type 8 elements FOREWORD 1) The International Electrotechnical Commission (IEC) is a worldwide organization for standardization comprising all national electrotechnical committees (IEC National Committee
42、s). 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 Reports, Publicly Available
43、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 non- governmental organiz
44、ations 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 agreements of IEC on technical mat
45、ters 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 are accepted by IEC Nation
46、al 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 international uniformity, IE
47、C 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 the latter. 5) IEC provi
48、des no marking procedure to indicate its approval and cannot be rendered responsible for any equipment 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 and members of its technical committees and IEC National Committees for any personal injury, property damage or other damage of any nature whatsoeve