Industrial communication networks - Fieldbus specifications - Part 6-21: Application layer protocol specification - Type 21 elements

IEC 61158-6-21:2019 provides common elements for basic time-critical and non-time-critical messaging communications between application programs in an automation environment and material specific to Type 2 fieldbus. The term “time-critical” is used to represent the presence of a time-window, within which one or more specified actions are required to be completed with some defined level of certainty. Failure to complete specified actions within the time window risks failure of the applications requesting the actions, with attendant risk to equipment, plant and possibly human life.
This International Standard specifies interactions between remote applications and defines the externally visible behavior provided by the Type 2 fieldbus application layer. The purpose of this document is to define the protocol provided to
a) define the wire-representation of the service primitives defined in this document, and
b) define the externally visible behavior associated with their transfer. This document specifies the protocol of the Type 2 fieldbus application layer, in conformance with the OSI Basic Reference Model (ISO/IEC 7498-1) and the OSI application layer structure (ISO/IEC 9545).
This second edition includes the following significant technical changes with respect to the previous edition:
- added WriteAndRead service;
- miscellaneous editorial corrections.

Réseaux de communication industriels - Spécifications des bus de terrain - Partie 6-21: Spécification du protocole de la couche application - Eléments de Type 21

L’IEC 61158-6-21:2019 appartient à une série élaborée pour faciliter l’interconnexion des composants des systèmes d’automatisation. Elle est liée à d'autres normes de la série telle que définie par le modèle de référence des bus de terrain "à trois couches" décrit dans l’IEC 61158‑1.
La présente Norme internationale contient des éléments spécifiques au protocole de communication de Type 21.

General Information

Status
Published
Publication Date
19-Jun-2019
Technical Committee
Drafting Committee
Current Stage
PPUB - Publication issued
Start Date
26-Apr-2019
Completion Date
20-Jun-2019
Ref Project

Buy Standard

Standard
IEC 61158-6-21:2019 - Industrial communication networks - Fieldbus specifications - Part 6-21: Application layer protocol specification - Type 21 elements
English language
55 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
IEC 61158-6-21:2019 - Industrial communication networks - Fieldbus specifications - Part 6-21: Application layer protocol specification - Type 21 elements
English and French language
111 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

IEC 61158-6-21
®

Edition 2.0 2019-06
INTERNATIONAL
STANDARD



Industrial communication networks – Fieldbus specifications –
Part 6-21: Application layer protocol specification – Type 21 elements

IEC 61158-6-21:2019-06(en)

---------------------- Page: 1 ----------------------
THIS PUBLICATION IS COPYRIGHT PROTECTED
Copyright © 2019 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 mechanical, including photocopying and microfilm, without permission in writing from
either IEC or IEC's 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 address below or
your local IEC member National Committee for further information.


IEC Central Office Tel.: +41 22 919 02 11
3, rue de Varembé info@iec.ch
CH-1211 Geneva 20 www.iec.ch
Switzerland

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 is kept under constant review by the IEC. Please make sure that you have the
latest edition, a corrigendum or an amendment might have been published.

IEC publications search - webstore.iec.ch/advsearchform Electropedia - www.electropedia.org
The advanced search enables to find IEC publications by a The world's leading online dictionary on electrotechnology,
variety of criteria (reference number, text, technical containing more than 22 000 terminological entries in English
committee,…). It also gives information on projects, replaced and French, with equivalent terms in 16 additional languages.
and withdrawn publications. Also known as the International Electrotechnical Vocabulary

(IEV) online.
IEC Just Published - webstore.iec.ch/justpublished
Stay up to date on all new IEC publications. Just Published IEC Glossary - std.iec.ch/glossary
details all new publications released. Available online and 67 000 electrotechnical terminology entries in English and
once a month by email. French extracted from the Terms and Definitions clause of
IEC publications issued since 2002. Some entries have been
IEC Customer Service Centre - webstore.iec.ch/csc collected from earlier publications of IEC TC 37, 77, 86 and
If you wish to give us your feedback on this publication or CISPR.

need further assistance, please contact the Customer Service

Centre: sales@iec.ch.

---------------------- Page: 2 ----------------------
IEC 61158-6-21

®


Edition 2.0 2019-06




INTERNATIONAL



STANDARD



















Industrial communication networks – Fieldbus specifications –

Part 6-21: Application layer protocol specification – Type 21 elements



























INTERNATIONAL

ELECTROTECHNICAL


COMMISSION





ICS 25.040.40; 35.100.70; 35.110 ISBN 978-2-8322-7013-4




  Warning! Make sure that you obtained this publication from an authorized distributor.


® Registered trademark of the International Electrotechnical Commission

---------------------- Page: 3 ----------------------
– 2 – IEC 61158-6-21:2019 © IEC 2019
CONTENTS
FOREWORD . 6
INTRODUCTION . 8
1 Scope . 9
1.1 General . 9
1.2 Overview. 9
1.3 Specifications . 9
1.4 Conformance . 10
2 Normative references . 10
3 Terms, definitions, symbols, abbreviations and conventions . 10
3.1 Terms and definitions from other ISO/IEC standards . 11
3.1.1 ISO/IEC 7498-1 terms . 11
3.1.2 ISO/IEC 8822 terms . 11
3.1.3 ISO/IEC 8824-1 terms . 11
3.1.4 ISO/IEC 9545 terms . 11
3.2 Other terms and definitions . 11
3.3 Abbreviations and symbols . 17
3.4 Conventions . 18
3.4.1 General conventions . 18
3.4.2 Convention for the encoding of reserved bits and octets . 18
3.4.3 Conventions for the common coding of specific field octets . 18
3.4.4 Conventions for APDU abstract syntax definitions . 19
3.4.5 Conventions for APDU transfer syntax definitions . 19
3.4.6 Conventions for AE state machine definitions . 20
4 FAL syntax description . 21
4.1 General . 21
4.2 FAL-AR PDU abstract syntax . 21
4.2.1 Top level definition . 21
4.2.2 Confirmed send service . 21
4.2.3 Unconfirmed send service . 21
4.2.4 FalArHeader . 21
4.2.5 InvokeID . 21
4.2.6 ServiceType . 21
4.3 Abstract syntax of PDU body . 22
4.3.1 ConfirmedServiceRequest PDUs . 22
4.3.2 ConfirmedServiceResponse PDUs . 22
4.3.3 UnconfirmedServiceRequest PDUs . 22
4.3.4 Error information . 22
4.4 Protocol data units (PDUs) for application service elements (ASEs) . 23
4.4.1 PDUs for Application process ASE . 23
4.4.2 PDUs for Service data object ASE . 25
4.4.3 PDUs for Process data object ASE . 28
5 Transfer Syntax . 28
5.1 Overview of encoding. 28
5.2 APDU header encoding . 29
5.2.1 Encoding of FalArHeader field . 29
5.2.2 Encoding of InvokeID Field . 29

---------------------- Page: 4 ----------------------
IEC 61158-6-21:2019 © IEC 2019 – 3 –
5.2.3 Encoding of Type field . 29
5.3 APDU body encoding . 30
5.3.1 General . 30
5.4 Encoding of Data types . 30
5.4.1 General description of data types and encoding rules . 30
5.4.2 Transfer syntax for bit sequences . 30
5.4.3 Encoding of a Boolean value . 31
5.4.4 Encoding of an unsigned integer value . 31
5.4.5 Encoding of a signed integer . 31
5.4.6 Encoding of a floating point value . 32
5.4.7 Encoding of an octet string value . 32
5.4.8 Encoding of a visible string value . 33
5.4.9 Encoding of a Unicode string value . 33
5.4.10 Encoding of a time of day value . 33
5.4.11 Encoding of a Time Difference value . 33
6 FAL protocol state machines . 34
7 AP context state machine . 36
8 FAL service protocol machine . 36
8.1 General . 36
8.2 Common parameters of the primitives . 36
8.3 AP ASE protocol machine . 36
8.3.1 Primitive definitions . 36
8.3.2 State machine . 38
8.4 Service data object ASE protocol machine (SDOM) . 40
8.4.1 Primitive definitions . 40
8.4.2 State machine . 41
8.5 Process data object ASE protocol machine (PDOM) . 44
8.5.1 Primitive definitions . 44
8.5.2 State machine . 44
9 AR protocol machine . 45
9.1 General . 45
9.2 Point-to-point user-triggered confirmed client/server AREP (PTC-AR) ARPM . 46
9.2.1 PTC-AR Primitive definitions . 46
9.2.2 DLL mapping of PTC-AREP class . 46
9.2.3 PTC-ARPM state machine . 47
9.3 Multipoint network-scheduled unconfirmed publisher/subscriber AREP
(MSU-AR) ARPM . 48
9.3.1 MSU-AR primitive definitions . 48
9.3.2 DLL mapping of MSU-AR class . 49
9.3.3 MSU-ARPM state machine. 49
9.4 Multipoint user-triggered unconfirmed publisher/subscriber AREP (MTU-AR)
ARPM . 51
9.4.1 MTU-AR primitive definitions . 51
9.4.2 DLL mapping of MTU-AR class . 51
9.4.3 MTU-ARPM state machine . 52
10 DLL mapping protocol machine . 53
10.1 Primitive definitions . 53
10.1.1 Primitives exchanged between DMPM and ARPM . 53
10.1.2 Parameters of ARPM/DMPM primitives . 53

---------------------- Page: 5 ----------------------
– 4 – IEC 61158-6-21:2019 © IEC 2019
10.1.3 Primitives exchanged between DLL and DMPM . 53
10.1.4 Parameters of DMPM/DLL primitives . 54
10.2 DMPM state machine . 54
10.2.1 DMPM states . 54
10.2.2 DMPM state table . 54
10.2.3 Functions used by DMPM . 54
Bibliography . 55

Figure 1 – Common structure of specific fields . 19
Figure 2 – APDU overview . 29
Figure 3 – Type field . 30
Figure 4 – Encoding of Time of Day value . 33
Figure 5 – Encoding of Time Difference value . 34
Figure 6 – Primitives exchanged between protocol machines . 35
Figure 7 – State transition diagram of APAM . 38
Figure 8 – State transition diagram of SDOM . 41
Figure 9 – State transition diagram of PDOM . 44
Figure 10 – State transition diagram of PTC-ARPM . 47
Figure 11 – State transition diagram of MSU-ARPM . 50
Figure 12 – State transition diagram of MTU-ARPM . 52
Figure 13 – State transition diagram of DMPM . 54

Table 1 – Conventions used for AE state machine definitions . 20
Table 2 – Status code for the confirmed response primitive . 23
Table 3 – Encoding of FalArHeader field . 29
Table 4 – Transfer Syntax for bit sequences . 30
Table 5 – Transfer syntax for data type UNSIGNEDn . 31
Table 6 – Transfer syntax for data type INTEGERn . 32
Table 7 – Primitives exchanged between FAL-user and APAM . 37
Table 8 – Parameters used with primitives exchanged FAL-user and APAM . 38
Table 9 – APAM state table – Sender transitions . 38
Table 10 – APAM state table – Receiver transitions . 39
Table 11 – Functions used by the APAM . 39
Table 12 – Primitives exchanged between FAL-user and SDOM . 40
Table 13 – Parameters used with primitives exchanged FAL-user and SDOM . 41
Table 14 – SDOM state table – Sender transitions . 42
Table 15 – SDOM state table – Receiver transitions . 43
Table 16 – Functions used by the SDOM . 43
Table 17 – Primitives exchanged between FAL-user and PDOM . 44
Table 18 – Parameters used with primitives exchanged between FAL-user and PDOM . 44
Table 19 – PDOM state table – Sender transitions . 45
Table 20 – PDOM state table – Receiver transitions . 45
Table 21 – Functions used by the SDOM . 45
Table 22 – Primitives issued by user to PTC-ARPM . 46

---------------------- Page: 6 ----------------------
IEC 61158-6-21:2019 © IEC 2019 – 5 –
Table 23 – Primitives issued by PTC-ARPM to user . 46
Table 24 – PTC-ARPM state table – sender transactions . 47
Table 25 – PTC-ARPM state table – receiver transactions . 48
Table 26 – Function BuildFAL-PDU . 48
Table 27 – Primitives issued by user to ARPM . 48
Table 28 – Primitives issued by ARPM to user . 48
Table 29 – MSU-ARPM state table – sender transactions . 50
Table 30 – MSU-ARPM state table – receiver transactions . 50
Table 31 – Function BuildFAL-PDU . 50
Table 32 – Primitives issued by user to ARPM . 51
Table 33 – Primitives issued by ARPM to user . 51
Table 34 – MTU-ARPM state table – sender transactions. 52
Table 35 – MTU-ARPM state table – receiver transactions . 52
Table 36 – Function BuildFAL-PDU . 53
Table 37 – Primitives issued by ARPM to DMPM . 53
Table 38 – Primitives issued by DMPM to ARPM . 53
Table 39 – Primitives issued by DMPM to DLL . 53
Table 40 – Primitives issued by DLL to DMPM . 53
Table 41 – DMPM state table – sender transactions. 54
Table 42 – DMPM state table – receiver transactions . 54

---------------------- Page: 7 ----------------------
– 6 – IEC 61158-6-21:2019 © IEC 2019
INTERNATIONAL ELECTROTECHNICAL COMMISSION
____________

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 committees (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 Reports, 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 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 agreements 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 are 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 international 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
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 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 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. 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 patent rights.
Attention is drawn to the fact that the use of the associated protocol type is restricted by its
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 layer protocol type to
be used with other layer protocols of the same type, or in other type combinations explicitly
authorized by its intellectual-property-right holders.
NOTE Combinations of protocol types are specified in IEC 61784-1 and IEC 61784-2.
International Standard IEC 61158-6-21 has been prepared by subcommittee 65C: Industrial
networks, of IEC technical committee 65: Industrial process measurement, control and
automation.
This second edition cancels and replaces the first edition published in 2010. This edition
constitutes a technical revision.

---------------------- Page: 8 ----------------------
IEC 61158-6-21:2019 © IEC 2019 – 7 –
This edition includes the following significant technical changes with respect to the previous
edition:
• added WriteAndRead service;
• miscellaneous editorial corrections.
The text of this International standard is based on the following documents:
FDIS Report on voting
65C/948/FDIS 65C/956/RVD

Full information on the voting for the approval of this International standard can be found in
the report on voting indicated in the above table.
This publication has been drafted in accordance with ISO/IEC Directives, 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 indicated 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.
A bilingual version of this publication may be issued at a later date.

---------------------- Page: 9 ----------------------
– 8 – IEC 61158-6-21:2019 © IEC 2019
INTRODUCTION
This document 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 61158–1.
The 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
document is to provide a set of rules for communication expressed in terms of the procedures
to be carried out by peer application 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 the admission of systems into the open systems environment;
• as a refinement to the understanding of time-critical communications within OSI.
This document is concerned, in particular, with the communication and interworking of
sensors, effectors and other automation devices. By using this document together with other
standards positioned within the OSI or fieldbus reference models, otherwise incompatible
systems may work together in any combination.

---------------------- Page: 10 ----------------------
IEC 61158-6-21:2019 © IEC 2019 – 9 –
INDUSTRIAL COMMUNICATION NETWORKS –
FIELDBUS SPECIFICATIONS –

Part 6-21: Application layer protocol specification –
Type 21 elements



1 Scope
1.1 General
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 61158-1.
This International Standard contains material specific 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 document provides 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
...

IEC 61158-6-21
®

Edition 2.0 2019-06
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE


Industrial communication networks – Fieldbus specifications –
Part 6-21: Application layer protocol specification – Type 21 elements

Réseaux de communication industriels – Spécifications des bus de terrain –
Partie 6-21: Spécification du protocole de la couche application – Eléments
de Type 21

IEC 61158-6-21:2019-06(en-fr)

---------------------- Page: 1 ----------------------
THIS PUBLICATION IS COPYRIGHT PROTECTED
Copyright © 2019 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 mechanical, including photocopying and microfilm, without permission in writing from
either IEC or IEC's 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 address below or
your local IEC member National Committee for further information.


Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite
ni utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie
et les microfilms, sans l'accord écrit de l'IEC ou du Comité national de l'IEC du pays du demandeur. Si vous avez des
questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence.

IEC Central Office Tel.: +41 22 919 02 11
3, rue de Varembé info@iec.ch
CH-1211 Geneva 20 www.iec.ch
Switzerland

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 is kept under constant review by the IEC. Please make sure that you have the
latest edition, a corrigendum or an amendment might have been published.

IEC publications search - webstore.iec.ch/advsearchform Electropedia - www.electropedia.org
The advanced search enables to find IEC publications by a The world's leading online dictionary on electrotechnology,
variety of criteria (reference number, text, technical containing more than 22 000 terminological entries in English
committee,…). It also gives information on projects, replaced and French, with equivalent terms in 16 additional languages.
and withdrawn publications. Also known as the International Electrotechnical Vocabulary

(IEV) online.
IEC Just Published - webstore.iec.ch/justpublished
Stay up to date on all new IEC publications. Just Published IEC Glossary - std.iec.ch/glossary
details all new publications released. Available online and 67 000 electrotechnical terminology entries in English and
once a month by email. French extracted from the Terms and Definitions clause of
IEC publications issued since 2002. Some entries have been
IEC Customer Service Centre - webstore.iec.ch/csc collected from earlier publications of IEC TC 37, 77, 86 and
If you wish to give us your feedback on this publication or CISPR.

need further assistance, please contact the Customer Service

Centre: sales@iec.ch.


A propos de l'IEC
La Commission Electrotechnique Internationale (IEC) est la première organisation mondiale qui élabore et publie des
Normes internationales pour tout ce qui a trait à l'électricité, à l'électronique et aux technologies apparentées.

A propos des publications IEC
Le contenu technique des publications IEC est constamment revu. Veuillez vous assurer que vous possédez l’édition la
plus récente, un corrigendum ou amendement peut avoir été publié.

Recherche de publications IEC - Electropedia - www.electropedia.org
webstore.iec.ch/advsearchform Le premier dictionnaire d'électrotechnologie en ligne au
La recherche avancée permet de trouver des publications IEC monde, avec plus de 22 000 articles terminologiques en
en utilisant différents critères (numéro de référence, texte, anglais et en français, ainsi que les termes équivalents dans
comité d’études,…). Elle donne aussi des informations sur les 16 langues additionnelles. Egalement appelé Vocabulaire
projets et les publications remplacées ou retirées. Electrotechnique International (IEV) en ligne.

IEC Just Published - webstore.iec.ch/justpublished Glossaire IEC - std.iec.ch/glossary
Restez informé sur les nouvelles publications IEC. Just 67 000 entrées terminologiques électrotechniques, en anglais
Published détaille les nouvelles publications parues. et en français, extraites des articles Termes et Définitions des
Disponible en ligne et une fois par mois par email. publications IEC parues depuis 2002. Plus certaines entrées
antérieures extraites des publications des CE 37, 77, 86 et
Service Clients - webstore.iec.ch/csc CISPR de l'IEC.

Si vous désirez nous donner des commentaires sur cette
publication ou si vous avez des questions contactez-nous:
sales@iec.ch.

---------------------- Page: 2 ----------------------
IEC 61158-6-21

®


Edition 2.0 2019-06




INTERNATIONAL



STANDARD




NORME


INTERNATIONALE











Industrial communication networks – Fieldbus specifications –

Part 6-21: Application layer protocol specification – Type 21 elements



Réseaux de communication industriels – Spécifications des bus de terrain –

Partie 6-21: Spécification du protocole de la couche application – Eléments

de Type 21















INTERNATIONAL

ELECTROTECHNICAL

COMMISSION


COMMISSION

ELECTROTECHNIQUE


INTERNATIONALE




ICS 25.040.40; 35.100.70; 35.110 ISBN 978-2-8322-9120-7




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éé.

® Registered trademark of the International Electrotechnical Commission
Marque déposée de la Commission Electrotechnique Internationale

---------------------- Page: 3 ----------------------
– 2 – IEC 61158-6-21:2019 © IEC 2019
CONTENTS
FOREWORD . 6
INTRODUCTION . 8
1 Scope . 9
1.1 General . 9
1.2 Overview. 9
1.3 Specifications . 9
1.4 Conformance . 10
2 Normative references . 10
3 Terms, definitions, symbols, abbreviations and conventions . 10
3.1 Terms and definitions from other ISO/IEC standards . 11
3.1.1 ISO/IEC 7498-1 terms . 11
3.1.2 ISO/IEC 8822 terms . 11
3.1.3 ISO/IEC 8824-1 terms . 11
3.1.4 ISO/IEC 9545 terms . 11
3.2 Other terms and definitions . 11
3.3 Abbreviations and symbols . 17
3.4 Conventions . 18
3.4.1 General conventions . 18
3.4.2 Convention for the encoding of reserved bits and octets . 18
3.4.3 Conventions for the common coding of specific field octets . 18
3.4.4 Conventions for APDU abstract syntax definitions . 19
3.4.5 Conventions for APDU transfer syntax definitions . 19
3.4.6 Conventions for AE state machine definitions . 20
4 FAL syntax description . 21
4.1 General . 21
4.2 FAL-AR PDU abstract syntax . 21
4.2.1 Top level definition . 21
4.2.2 Confirmed send service . 21
4.2.3 Unconfirmed send service . 21
4.2.4 FalArHeader . 21
4.2.5 InvokeID . 21
4.2.6 ServiceType . 21
4.3 Abstract syntax of PDU body . 22
4.3.1 ConfirmedServiceRequest PDUs . 22
4.3.2 ConfirmedServiceResponse PDUs . 22
4.3.3 UnconfirmedServiceRequest PDUs . 22
4.3.4 Error information . 22
4.4 Protocol data units (PDUs) for application service elements (ASEs) . 23
4.4.1 PDUs for Application process ASE . 23
4.4.2 PDUs for Service data object ASE . 25
4.4.3 PDUs for Process data object ASE . 28
5 Transfer Syntax . 28
5.1 Overview of encoding. 28
5.2 APDU header encoding . 29
5.2.1 Encoding of FalArHeader field . 29
5.2.2 Encoding of InvokeID Field . 29

---------------------- Page: 4 ----------------------
IEC 61158-6-21:2019 © IEC 2019 – 3 –
5.2.3 Encoding of Type field . 29
5.3 APDU body encoding . 30
5.3.1 General . 30
5.4 Encoding of Data types . 30
5.4.1 General description of data types and encoding rules . 30
5.4.2 Transfer syntax for bit sequences . 30
5.4.3 Encoding of a Boolean value . 31
5.4.4 Encoding of an unsigned integer value . 31
5.4.5 Encoding of a signed integer . 31
5.4.6 Encoding of a floating point value . 32
5.4.7 Encoding of an octet string value . 32
5.4.8 Encoding of a visible string value . 33
5.4.9 Encoding of a Unicode string value . 33
5.4.10 Encoding of a time of day value . 33
5.4.11 Encoding of a Time Difference value . 34
6 FAL protocol state machines . 34
7 AP context state machine . 36
8 FAL service protocol machine . 36
8.1 General . 36
8.2 Common parameters of the primitives . 36
8.3 AP ASE protocol machine . 36
8.3.1 Primitive definitions . 36
8.3.2 State machine . 38
8.4 Service data object ASE protocol machine (SDOM) . 40
8.4.1 Primitive definitions . 40
8.4.2 State machine . 41
8.5 Process data object ASE protocol machine (PDOM) . 44
8.5.1 Primitive definitions . 44
8.5.2 State machine . 44
9 AR protocol machine . 45
9.1 General . 45
9.2 Point-to-point user-triggered confirmed client/server AREP (PTC-AR) ARPM . 46
9.2.1 PTC-AR Primitive definitions . 46
9.2.2 DLL mapping of PTC-AREP class . 46
9.2.3 PTC-ARPM state machine . 47
9.3 Multipoint network-scheduled unconfirmed publisher/subscriber AREP
(MSU-AR) ARPM . 48
9.3.1 MSU-AR primitive definitions . 48
9.3.2 DLL mapping of MSU-AR class . 49
9.3.3 MSU-ARPM state machine. 49
9.4 Multipoint user-triggered unconfirmed publisher/subscriber AREP (MTU-AR)
ARPM . 51
9.4.1 MTU-AR primitive definitions . 51
9.4.2 DLL mapping of MTU-AR class . 51
9.4.3 MTU-ARPM state machine . 52
10 DLL mapping protocol machine . 53
10.1 Primitive definitions . 53
10.1.1 Primitives exchanged between DMPM and ARPM . 53
10.1.2 Parameters of ARPM/DMPM primitives . 53

---------------------- Page: 5 ----------------------
– 4 – IEC 61158-6-21:2019 © IEC 2019
10.1.3 Primitives exchanged between DLL and DMPM . 53
10.1.4 Parameters of DMPM/DLL primitives . 54
10.2 DMPM state machine . 54
10.2.1 DMPM states . 54
10.2.2 DMPM state table . 54
10.2.3 Functions used by DMPM . 54
Bibliography . 55

Figure 1 – Common structure of specific fields . 19
Figure 2 – APDU overview . 29
Figure 3 – Type field . 30
Figure 4 – Encoding of Time of Day value . 33
Figure 5 – Encoding of Time Difference value . 34
Figure 6 – Primitives exchanged between protocol machines . 35
Figure 7 – State transition diagram of APAM . 38
Figure 8 – State transition diagram of SDOM . 41
Figure 9 – State transition diagram of PDOM . 44
Figure 10 – State transition diagram of PTC-ARPM . 47
Figure 11 – State transition diagram of MSU-ARPM . 50
Figure 12 – State transition diagram of MTU-ARPM . 52
Figure 13 – State transition diagram of DMPM . 54

Table 1 – Conventions used for AE state machine definitions . 20
Table 2 – Status code for the confirmed response primitive . 23
Table 3 – Encoding of FalArHeader field . 29
Table 4 – Transfer Syntax for bit sequences . 30
Table 5 – Transfer syntax for data type UNSIGNEDn . 31
Table 6 – Transfer syntax for data type INTEGERn . 32
Table 7 – Primitives exchanged between FAL-user and APAM . 37
Table 8 – Parameters used with primitives exchanged FAL-user and APAM . 38
Table 9 – APAM state table – Sender transitions . 38
Table 10 – APAM state table – Receiver transitions . 39
Table 11 – Functions used by the APAM . 39
Table 12 – Primitives exchanged between FAL-user and SDOM . 40
Table 13 – Parameters used with primitives exchanged FAL-user and SDOM . 41
Table 14 – SDOM state table – Sender transitions . 42
Table 15 – SDOM state table – Receiver transitions . 43
Table 16 – Functions used by the SDOM . 43
Table 17 – Primitives exchanged between FAL-user and PDOM . 44
Table 18 – Parameters used with primitives exchanged between FAL-user and PDOM . 44
Table 19 – PDOM state table – Sender transitions . 45
Table 20 – PDOM state table – Receiver transitions . 45
Table 21 – Functions used by the SDOM . 45
Table 22 – Primitives issued by user to PTC-ARPM . 46

---------------------- Page: 6 ----------------------
IEC 61158-6-21:2019 © IEC 2019 – 5 –
Table 23 – Primitives issued by PTC-ARPM to user . 46
Table 24 – PTC-ARPM state table – sender transactions . 47
Table 25 – PTC-ARPM state table – receiver transactions . 48
Table 26 – Function BuildFAL-PDU . 48
Table 27 – Primitives issued by user to ARPM . 48
Table 28 – Primitives issued by ARPM to user . 48
Table 29 – MSU-ARPM state table – sender transactions . 50
Table 30 – MSU-ARPM state table – receiver transactions . 50
Table 31 – Function BuildFAL-PDU . 50
Table 32 – Primitives issued by user to ARPM . 51
Table 33 – Primitives issued by ARPM to user . 51
Table 34 – MTU-ARPM state table – sender transactions. 52
Table 35 – MTU-ARPM state table – receiver transactions . 52
Table 36 – Function BuildFAL-PDU . 53
Table 37 – Primitives issued by ARPM to DMPM . 53
Table 38 – Primitives issued by DMPM to ARPM . 53
Table 39 – Primitives issued by DMPM to DLL . 53
Table 40 – Primitives issued by DLL to DMPM . 53
Table 41 – DMPM state table – sender transactions. 54
Table 42 – DMPM state table – receiver transactions . 54

---------------------- Page: 7 ----------------------
– 6 – IEC 61158-6-21:2019 © IEC 2019
INTERNATIONAL ELECTROTECHNICAL COMMISSION
____________

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 committees (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 Reports, 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 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 agreements 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 are 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 international 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
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 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 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. 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 patent rights.
Attention is drawn to the fact that the use of the associated protocol type is restricted by its
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 layer protocol type to
be used with other layer protocols of the same type, or in other type combinations explicitly
authorized by its intellectual-property-right holders.
NOTE Combinations of protocol types are specified in IEC 61784-1 and IEC 61784-2.
International Standard IEC 61158-6-21 has been prepared by subcommittee 65C: Industrial
networks, of IEC technical committee 65: Industrial process measurement, control and
automation.
This second edition cancels and replaces the first edition published in 2010. This edition
constitutes a technical revision.

---------------------- Page: 8 ----------------------
IEC 61158-6-21:2019 © IEC 2019 – 7 –
This edition includes the following significant technical changes with respect to the previous
edition:
• added WriteAndRead service;
• miscellaneous editorial corrections.
The text of this International standard is based on the following documents:
FDIS Report on voting
65C/948/FDIS 65C/956/RVD

Full information on the voting for the approval of this International standard can be found in
the report on voting indicated in the above table.
This publication has been drafted in accordance with ISO/IEC Directives, Part 2.
A list of all parts of the IEC 61158 series, published under the general title Industrial
communication network
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.