Industrial communication networks - Fieldbus specifications - Part 4-12: Data-link layer protocol specification - Type 12 elements

IEC 61158-4-12:2019 specifies procedures for the timely transfer of data and control information from one data-link user entity to a peer user entity, and among the data-link entities forming the distributed data-link service provider and the structure of the fieldbus DLPDUs used for the transfer of data and control information by the protocol of this standard, and their representation as physical interface data units. This fourth edition cancels and replaces the third edition published in 2014 and constitutes a technical revision. The main changes are: technical corrections and editorial improvements for clarification.

Réseaux de communication industriels - Spécifications des bus de terrain - Partie 4-12: Spécification du protocole de la couche liaison de données - Éléments de type 12

L'IEC 61158-4-12:2019 la couche de liaison de données assure les communications de messagerie à contrainte de temps de base entre les appareils d’un environnement d’automatisation.
Ce protocole offre des opportunités de communication à toutes les entités de liaison de données participantes
a) de manière cyclique et synchrone, et
b) de manière cyclique ou acyclique asynchrone, comme demandé par chaque cycle de chacune de ces entités de liaison de données.
Par conséquent, ce protocole peut se caractériser comme assurant un accès cyclique et acyclique asynchrone, mais avec un redémarrage synchrone de chaque cycle.

General Information

Status
Published
Publication Date
17-Apr-2019
Technical Committee
Drafting Committee
Current Stage
PPUB - Publication issued
Start Date
18-Apr-2019
Completion Date
26-Apr-2019
Ref Project

Relations

Standard
IEC 61158-4-12:2019 - Industrial communication networks - Fieldbus specifications - Part 4-12: Data-link layer protocol specification - Type 12 elements
English language
142 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
IEC 61158-4-12:2019 - Industrial communication networks - Fieldbus specifications - Part 4-12: Data-link layer protocol specification - Type 12 elements
English and French language
303 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


IEC 61158-4-12 ®
Edition 4.0 2019-04
INTERNATIONAL
STANDARD
colour
inside
Industrial communication networks – Fieldbus specifications –
Part 4-12: Data-link layer protocol specification – Type 12 elements

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.
IEC 61158-4-12 ®
Edition 4.0 2019-04
INTERNATIONAL
STANDARD
colour
inside
Industrial communication networks – Fieldbus specifications –

Part 4-12: Data-link layer protocol specification – Type 12 elements

INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
ICS 25.040.40; 35.100.20; 35.110 ISBN 978-2-8322-6775-2

– 2 – IEC 61158-4-12:2019 © IEC 2019
CONTENTS
FOREWORD . 8
INTRODUCTION . 10
1 Scope . 11
1.1 General . 11
1.2 Specifications . 11
1.3 Procedures . 11
1.4 Applicability . 11
1.5 Conformance . 11
2 Normative references . 12
3 Terms, definitions, symbols, abbreviations and conventions . 12
3.1 Reference model terms and definitions . 12
3.2 Service convention terms and definitions . 13
3.3 Common terms and definitions . 14
3.4 Additional Type 12 definitions . 14
3.5 Common symbols and abbreviations . 17
3.6 Additional Type 12 symbols and abbreviations . 18
3.7 Conventions . 19
3.7.1 General concept . 19
3.7.2 Abstract syntax conventions . 19
3.7.3 Convention for the encoding of reserved bits and octets . 21
3.7.4 Conventions for the common coding s of specific field octets . 21
3.7.5 State machine conventions . 22
4 Overview of the DL-protocol . 24
4.1 Operating principle. 24
4.2 Topology . 24
4.3 Frame processing principles . 24
4.4 Data-link layer overview . 25
4.5 Error detection overview . 26
4.6 Node reference model . 26
4.6.1 Mapping onto OSI basic reference model . 26
4.6.2 Data-link Layer features . 27
4.7 Operation overview . 27
4.7.1 Relation to ISO/IEC/IEEE 8802-3 . 27
4.7.2 Frame structure . 27
5 Frame structure . 28
5.1 Frame coding principles . 28
5.2 Data types and encoding rules . 28
5.2.1 General description of data types and encoding rules . 28
5.2.2 Transfer syntax for bit sequences . 28
5.2.3 Unsigned Integer . 29
5.2.4 Signed Integer . 30
5.2.5 Octet String . 30
5.2.6 Visible String . 30
5.3 Ethernet DLPDU structure . 31
5.3.1 Type 12 frame inside an Ethernet frame . 31
5.3.2 Type 12 frame inside a UDP datagram . 31

5.3.3 Type 12 frame structure . 33
5.4 Type 12 DLPDU structure . 33
5.4.1 Read . 33
5.4.2 Write . 38
5.4.3 Read write . 43
5.4.4 Attributes access . 50
5.5 Network variable structure . 50
5.6 Type 12 mailbox structure . 51
6 Attributes . 52
6.1 Management . 52
6.1.1 DL Information . 52
6.1.2 Station address . 56
6.1.3 DL control . 57
6.1.4 DL status . 59
6.1.5 DLS-user specific registers . 62
6.1.6 Event parameter . 63
6.2 Statistics . 68
6.2.1 RX error counter . 68
6.2.2 Lost link counter . 69
6.2.3 Additional counter . 70
6.3 Watchdogs . 71
6.3.1 Watchdog divider . 71
6.3.2 DLS-user watchdog . 72
6.3.3 Sync manager watchdog . 72
6.3.4 Sync manager watchdog status . 73
6.3.5 Watchdog counter. 74
6.4 Slave information interface . 74
6.4.1 Slave information interface area . 74
6.4.2 Slave information interface access . 74
6.4.3 Slave information interface control/status . 75
6.4.4 Slave information interface address . 77
6.4.5 Slave information interface data . 78
6.5 Media independent interface (MII) . 78
6.5.1 MII control/status . 78
6.5.2 MII address . 80
6.5.3 MII data . 81
6.5.4 MII access . 81
6.6 Fieldbus memory management unit (FMMU) . 82
6.6.1 General . 82
6.6.2 FMMU attributes . 83
6.7 Sync manager . 85
6.7.1 Sync manager overview . 85
6.7.2 Sync Manager Attributes . 88
6.8 Distributed clock . 91
6.8.1 General . 91
6.8.2 Delay measurement . 91
6.8.3 Local time parameter . 92
6.8.4 DL-user time parameter . 92
6.8.5 DC attributes . 93

– 4 – IEC 61158-4-12:2019 © IEC 2019
7 DL-user memory . 95
7.1 Overview . 95
7.2 Mailbox access type . 95
7.2.1 Mailbox transfer . 95
7.2.2 Write access from master . 95
7.2.3 Read access from master . 97
7.3 Buffered access type . 98
7.3.1 Write access from master . 98
7.3.2 Read access from master . 98
8 Type 12: FDL protocol state machines . 99
8.1 Overview of slave DL state machines . 99
8.2 State machine description . 100
8.2.1 Port state machine (PSM) . 100
8.2.2 PDU handler state machine (DHSM) . 100
8.2.3 Sync manager state machine (SYSM) . 101
8.2.4 Resilient mailbox state machine (RMSM) . 101
8.2.5 SII state machine (SIISM) . 101
8.2.6 MII state machine (MIISM) . 105
8.2.7 DC state machine (DCSM) . 105
Annex A (informative) Type 12: Additional specifications on DL-Protocol state
machines . 108
A.1 DHSM . 108
A.1.1 Primitive definitions . 108
A.1.2 State machine description . 109
A.1.3 DHSM table . 110
A.1.4 Functions . 125
A.2 SYSM . 126
A.2.1 Primitive definition . 126
A.2.2 State machine description . 127
A.2.3 Local variables . 128
A.2.4 State table nomenclature . 128
A.2.5 SYSM table . 128
A.2.6 Functions . 138
A.3 RMSM . 138
A.3.1 Primitive definitions . 138
A.3.2 State machine description . 139
A.3.3 Local variables . 139
A.3.4 RMSM table . 139
A.3.5 Functions . 141
Bibliography . 142

Figure 1 – Type description example . 20
Figure 2 – Common structure of specific fields . 21
Figure 3 – Frame structure. 25
Figure 4 – Mapping of data in a frame . 26
Figure 5 – Slave node reference model . 27
Figure 6 – Type 12 PDUs embedded in Ethernet frame . 28
Figure 7 – Type 12 PDUs embedded in UDP/IP . 28

Figure 8 – DL information type description . 54
Figure 9 – Address type description . 56
Figure 10 – DL control type description . 58
Figure 11 – DL status type description . 61
Figure 12 – Successful write sequence to DL-user control register . 62
Figure 13 – Successful read sequence to the DL-user status register . 63
Figure 14 – RX error counter type description . 69
Figure 15 – Lost link counter type description . 70
Figure 16 – Additional counter type description . 71
Figure 17 – Watchdog divider type description . 72
Figure 18 – DLS-user Watchdog divider type description . 72
Figure 19 – Sync manager watchdog type description . 73
Figure 20 – Sync manager watchdog status type description . 73
Figure 21 – Watchdog counter type description . 74
Figure 22 – Slave information interface access type description . 74
Figure 23 – Slave information interface control/status type description . 76
Figure 24 – Slave information interface address type description . 78
Figure 25 – Slave information interface data type description . 78
Figure 26 – MII control/status type description . 79
Figure 27 – MII address type description . 81
Figure 28 – MII data type description . 81
Figure 29 – MII access type description . 82
Figure 30 – FMMU mapping example . 83
Figure 31 – FMMU entity type description . 84
Figure 32 – SyncM mailbox interaction . 86
Figure 33 – SyncM buffer allocation . 86
Figure 34 – SyncM buffer interaction . 87
Figure 35 – Handling of write/read toggle with read mailbox . 87
Figure 36 – Sync manager channel type description . 89
Figure 37 – Distributed clock local time parameter type description . 93
Figure 38 – Successful write sequence to mailbox . 96
Figure 39 – Bad write sequence to mailbox . 96
Figure 40 – Successful read sequence to mailbox . 97
Figure 41 – Bad read sequence to mailbox . 97
Figure 42 – Successful write sequence to buffer . 98
Figure 43 – Successful read sequence to buffer. 99
Figure 44 – Structuring of the protocol machines of an slave . 100
Figure 45 – Slave information interface read operation . 102
Figure 46 – Slave information interface write operation . 103
Figure 47 – Slave information interface reload operation . 104
Figure 48 – Distributed clock . 106
Figure 49 – Delay measurement sequence . 107

– 6 – IEC 61158-4-12:2019 © IEC 2019
Table 1 – PDU element description example . 20
Table 2 – Example attribute description . 21
Table 3 – State machine description elements . 23
Table 4 – Description of state machine elements . 23
Table 5 – Conventions used in state machines . 23
Table 6 – Transfer Syntax for bit sequences . 29
Table 7 – Transfer syntax for data type Unsignedn . 29
Table 8 – Transfer syntax for data type Integern . 30
Table 9 – Type 12 frame inside an Ethernet frame . 31
Table 10 – Type 12 frame inside an UDP PDU . 32
Table 11 – Type 12 frame structure containing Type 12 PDUs . 33
Table 12 – Type 12 frame structure containing network variables . 33
Table 13 – Type 12 frame structure containing mailbox . 33
Table 14 – Auto increment physical read (APRD) . 34
Table 15 – Configured address physical read (FPRD) . 35
Table 16 – Broadcast read (BRD) . 36
Table 17 – Logical read (LRD) . 37
Table 18 – Auto Increment physical write (APWR) . 38
Table 19 – Configured address physical write (FPWR) . 39
Table 20 – Broadcast write (BWR) . 41
Table 21 – Logical write (LWR) . 42
Table 22 – Auto increment physical read write (APRW) . 43
Table 23 – Configured address physical read write (FPRW) . 44
Table 24 – Broadcast read write (BRW) . 45
Table 25 – Logical read write (LRW) . 47
Table 26 – Auto increment physical read multiple write (ARMW) . 48
Table 27 – Configured address physical read multiple write (FRMW) . 49
Table 28 – Network variable . 50
Table 29 – Mailbox . 51
Table 30 – Error Reply Service Data . 52
Table 31 – DL information . 54
Table 32 – Configured station address . 57
Table 33 – DL control . 58
Table 34 – DL status . 61
Table 35 – DLS-user specific registers . 63
Table 36 – DLS-user event . 65
Table 37 – DLS-user event mask . 66
Table 38 – External event . 67
Table 39 – External event mask . 68
Table 40 – RX error counter . 69
Table 41 – Lost link counter . 70
Table 42 – Additional counter . 71
Table 43 – Watchdog divider . 72

Table 44 – DLS-user watchdog . 72
Table 45 – Sync manager channel watchdog . 73
Table 46 – Sync manager watchdog Status . 73
Table 47 – Watchdog counter . 74
Table 48 – Slave information interface access . 75
Table 49 – Slave information interface control/status . 76
Table 50 – Slave information interface address . 78
Table 51 – Slave information interface data . 78
Table 52 – MII control/status . 80
Table 53 – MII address . 81
Table 54 – MII data . 81
Table 55 – MII access . 82
Table 56 – Fieldbus memory management unit (FMMU) entity . 84
Table 57 – Fieldbus memory management unit (FMMU) . 85
Table 58 – Sync manager channel . 90
Table 59 – Sync manager Structure . 91
Table 60 – Distributed clock local time parameter . 93
Table 61 – Distributed clock DLS-user parameter . 94
Table A.1 – Primitives issued by DHSM to PSM . 108
Table A.2 – Primitives issued by PSM to DHSM . 108
Table A.3 – Parameters used with primitives exchanged between DHSM and PSM . 108
Table A.4 – Identifier for the octets of a Ethernet frame . 109
Table A.5 – DHSM state table . 111
Table A.6 – DHSM function table . 126
Table A.7 – Primitives issued by SYSM to DHSM . 126
Table A.8 – Primitives issued by DHSM to SYSM . 127
Table A.9 – Primitives issued by DL-User to SYSM . 127
Table A.10 – Primitives issued by SYSM to DL-User . 127
Table A.11 – Parameters used with primitives exchanged between SYSM and DHSM . 127
Table A.12 – SYSM state table . 129
Table A.13 – SYSM function table . 138
Table A.14 – Primitives issued by RMSM to SYSM . 138
Table A.15 – Primitives issued by SYSM to RMSM . 139
Table A.16 – Parameters used with primitives exchanged between RMSM and SYSM . 139
Table A.17 – RMSM state table. 140
Table A.18 – RMSM function table . 141

– 8 – IEC 61158-4-12:2019 © IEC 2019
INTERNATIONAL ELECTROTECHNICAL COMMISSION
____________
INDUSTRIAL COMMUNICATION NETWORKS –
FIELDBUS SPECIFICATIONS –
Part 4-12: Data-link layer protocol specification –
Type 12 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-4-12 has been prepared by subcommittee 65C: Industrial
networks, of IEC technical committee 65: Industrial-process measurement, control and
automation.
This fourth edition cancels and replaces the third edition published in 2014. This edition
constitutes a technical revision.

This edition includes the following significant technical changes with respect to the previous
edition:
• technical corrections and editorial improvements for clarification.
The text of this International Standard is based on the following documents:
FDIS Report on voting
65C/946/FDIS 65C/955/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 the ISO/IEC Directives, Part 2.
A list of all the 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.

IMPORTANT – The 'colour inside' logo on the cover page of this publication indicates
that it contains colours which are considered to be useful for the correct
understanding of its contents. Users should therefore print this document using a
colour printer.
– 10 – IEC 61158-4-12: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 data-link protocol provides the data-link service by making use of the services available
from the physical 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 data-link
entities (DLEs) 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:
a) as a guide for implementors and designers;
b) for use in the testing and procurement of equipment;
c) as part of an agreement for the admittance of systems into the open systems environment;
d) 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.
NOTE 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 with physical layer and application layer protocols in Type
combinations as specified explicitly in the profile parts. Use of the various protocol types in other combinations
may require permission from their respective intellectual-property-right holders.
The International Electrotechnical Commission (IEC) draws attention to the fact that it is
claimed that compliance with this document may involve the use of patents concerning
Type 12 elements and possibly other types given as follows:
EP 1 590 927 B1 [BE] Koppler für ein Netzwerk mit Ringtopologie und ein auf Ethernet basierten Netzwerk
EP 1 789 857 B1 [BE] Datenübertragungsverfahren und automatisierungssystem zum Einsatz eines
solchen Datenübertragungsverfahrens
EP 2 137 893 B1 [BE] Paketvermittlungsvorrichtung und lokales Kommunikationsnetz mit einer solchen
Paketvermittlungsvorrichtung
EP 1 456 722 B1 [BE] Datenübertragungsverfahren, serielles Bussystem und Anschalteinheit für einen
passiven Busteilnehmer
IEC takes no position concerning the evidence, validity and scope of these patent rights.
The holder of these patent rights has assured the IEC that he/she is willing to negotiate
licences either free of charge or under reasonable and non-discriminatory terms and
conditions with applicants throughout the world. In this respect, the statement of the holder of
these patent rights is registered with IEC. Information may be obtained from:
[BE]: Beckhoff Automation GmbH
Eiserstraße 5
33415 Verl,
Germany
Attention is drawn to the possibility that some of the elements of this document may be the
subject of patent rights other than those identified above. IEC shall not be held responsible for
identifying any or all such patent rights.
ISO (www.iso.org/patents) and IEC (http://patents.iec.ch) maintain on-line databases of
patents relevant to their standards. Users are encouraged to consult the databases for the
most up to date information concerning patents.
...


IEC 61158-4-12 ®
Edition 4.0 2019-04
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
colour
inside
Industrial communication networks – Fieldbus specifications –
Part 4-12: Data-link layer protocol specification – Type 12 elements

Réseaux de communication industriels – Spécifications des bus de terrain –
Partie 4-12: Spécification du protocole de la couche liaison de données –
Éléments de type 12
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.
IEC 61158-4-12 ®
Edition 4.0 2019-04
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
colour
inside
Industrial communication networks – Fieldbus specifications –

Part 4-12: Data-link layer protocol specification – Type 12 elements

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

Partie 4-12: Spécification du protocole de la couche liaison de données –

Éléments de type 12
INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
COMMISSION
ELECTROTECHNIQUE
INTERNATIONALE
ICS 25.040.40; 35.100.20; 35.110 ISBN 978-2-8322-9141-2

– 2 – IEC 61158-4-12:2019 © IEC 2019
CONTENTS
FOREWORD . 8
INTRODUCTION . 10
1 Scope . 11
1.1 General . 11
1.2 Specifications . 11
1.3 Procedures . 11
1.4 Applicability . 11
1.5 Conformance . 11
2 Normative references . 12
3 Terms, definitions, symbols, abbreviations and conventions . 12
3.1 Reference model terms and definitions . 12
3.2 Service convention terms and definitions . 13
3.3 Common terms and definitions . 14
3.4 Additional Type 12 definitions . 14
3.5 Common symbols and abbreviations . 17
3.6 Additional Type 12 symbols and abbreviations . 18
3.7 Conventions . 19
3.7.1 General concept . 19
3.7.2 Abstract syntax conventions . 19
3.7.3 Convention for the encoding of reserved bits and octets . 21
3.7.4 Conventions for the common coding s of specific field octets . 21
3.7.5 State machine conventions . 22
4 Overview of the DL-protocol . 24
4.1 Operating principle. 24
4.2 Topology . 24
4.3 Frame processing principles . 24
4.4 Data-link layer overview . 25
4.5 Error detection overview . 26
4.6 Node reference model . 26
4.6.1 Mapping onto OSI basic reference model . 26
4.6.2 Data-link Layer features . 27
4.7 Operation overview . 27
4.7.1 Relation to ISO/IEC/IEEE 8802-3 . 27
4.7.2 Frame structure . 27
5 Frame structure . 28
5.1 Frame coding principles . 28
5.2 Data types and encoding rules . 28
5.2.1 General description of data types and encoding rules . 28
5.2.2 Transfer syntax for bit sequences . 28
5.2.3 Unsigned Integer . 29
5.2.4 Signed Integer . 30
5.2.5 Octet String . 30
5.2.6 Visible String . 30
5.3 Ethernet DLPDU structure . 31
5.3.1 Type 12 frame inside an Ethernet frame . 31
5.3.2 Type 12 frame inside a UDP datagram . 31

5.3.3 Type 12 frame structure . 33
5.4 Type 12 DLPDU structure . 33
5.4.1 Read . 33
5.4.2 Write . 38
5.4.3 Read write . 43
5.4.4 Attributes access . 50
5.5 Network variable structure . 50
5.6 Type 12 mailbox structure . 51
6 Attributes . 52
6.1 Management . 52
6.1.1 DL Information . 52
6.1.2 Station address . 56
6.1.3 DL control . 57
6.1.4 DL status . 59
6.1.5 DLS-user specific registers . 62
6.1.6 Event parameter . 63
6.2 Statistics . 68
6.2.1 RX error counter . 68
6.2.2 Lost link counter . 69
6.2.3 Additional counter . 70
6.3 Watchdogs . 71
6.3.1 Watchdog divider . 71
6.3.2 DLS-user watchdog . 72
6.3.3 Sync manager watchdog . 72
6.3.4 Sync manager watchdog status . 73
6.3.5 Watchdog counter. 74
6.4 Slave information interface . 74
6.4.1 Slave information interface area . 74
6.4.2 Slave information interface access . 74
6.4.3 Slave information interface control/status . 75
6.4.4 Slave information interface address . 77
6.4.5 Slave information interface data . 78
6.5 Media independent interface (MII) . 78
6.5.1 MII control/status . 78
6.5.2 MII address . 80
6.5.3 MII data . 81
6.5.4 MII access . 81
6.6 Fieldbus memory management unit (FMMU) . 82
6.6.1 General . 82
6.6.2 FMMU attributes . 83
6.7 Sync manager . 85
6.7.1 Sync manager overview . 85
6.7.2 Sync Manager Attributes . 88
6.8 Distributed clock . 91
6.8.1 General . 91
6.8.2 Delay measurement . 91
6.8.3 Local time parameter . 92
6.8.4 DL-user time parameter . 92
6.8.5 DC attributes . 93

– 4 – IEC 61158-4-12:2019 © IEC 2019
7 DL-user memory . 95
7.1 Overview . 95
7.2 Mailbox access type . 95
7.2.1 Mailbox transfer . 95
7.2.2 Write access from master . 95
7.2.3 Read access from master . 97
7.3 Buffered access type . 98
7.3.1 Write access from master . 98
7.3.2 Read access from master . 98
8 Type 12: FDL protocol state machines . 99
8.1 Overview of slave DL state machines . 99
8.2 State machine description . 100
8.2.1 Port state machine (PSM) . 100
8.2.2 PDU handler state machine (DHSM) . 100
8.2.3 Sync manager state machine (SYSM) . 101
8.2.4 Resilient mailbox state machine (RMSM) . 101
8.2.5 SII state machine (SIISM) . 101
8.2.6 MII state machine (MIISM) . 105
8.2.7 DC state machine (DCSM) . 105
Annex A (informative) Type 12: Additional specifications on DL-Protocol state
machines . 108
A.1 DHSM . 108
A.1.1 Primitive definitions . 108
A.1.2 State machine description . 109
A.1.3 DHSM table . 110
A.1.4 Functions . 125
A.2 SYSM . 126
A.2.1 Primitive definition . 126
A.2.2 State machine description . 127
A.2.3 Local variables . 128
A.2.4 State table nomenclature . 128
A.2.5 SYSM table . 128
A.2.6 Functions . 138
A.3 RMSM . 138
A.3.1 Primitive definitions . 138
A.3.2 State machine description . 139
A.3.3 Local variables . 139
A.3.4 RMSM table . 139
A.3.5 Functions . 141
Bibliography . 142

Figure 1 – Type description example . 20
Figure 2 – Common structure of specific fields . 21
Figure 3 – Frame structure. 25
Figure 4 – Mapping of data in a frame . 26
Figure 5 – Slave node reference model . 27
Figure 6 – Type 12 PDUs embedded in Ethernet frame . 28
Figure 7 – Type 12 PDUs embedded in UDP/IP . 28

Figure 8 – DL information type description . 54
Figure 9 – Address type description . 56
Figure 10 – DL control type description . 58
Figure 11 – DL status type description . 61
Figure 12 – Successful write sequence to DL-user control register . 62
Figure 13 – Successful read sequence to the DL-user status register . 63
Figure 14 – RX error counter type description . 69
Figure 15 – Lost link counter type description . 70
Figure 16 – Additional counter type description . 71
Figure 17 – Watchdog divider type description . 72
Figure 18 – DLS-user Watchdog divider type description . 72
Figure 19 – Sync manager watchdog type description . 73
Figure 20 – Sync manager watchdog status type description . 73
Figure 21 – Watchdog counter type description . 74
Figure 22 – Slave information interface access type description . 74
Figure 23 – Slave information interface control/status type description . 76
Figure 24 – Slave information interface address type description . 78
Figure 25 – Slave information interface data type description . 78
Figure 26 – MII control/status type description . 79
Figure 27 – MII address type description . 81
Figure 28 – MII data type description . 81
Figure 29 – MII access type description . 82
Figure 30 – FMMU mapping example . 83
Figure 31 – FMMU entity type description . 84
Figure 32 – SyncM mailbox interaction . 86
Figure 33 – SyncM buffer allocation . 86
Figure 34 – SyncM buffer interaction . 87
Figure 35 – Handling of write/read toggle with read mailbox . 87
Figure 36 – Sync manager channel type description . 89
Figure 37 – Distributed clock local time parameter type description . 93
Figure 38 – Successful write sequence to mailbox . 96
Figure 39 – Bad write sequence to mailbox . 96
Figure 40 – Successful read sequence to mailbox . 97
Figure 41 – Bad read sequence to mailbox . 97
Figure 42 – Successful write sequence to buffer . 98
Figure 43 – Successful read sequence to buffer. 99
Figure 44 – Structuring of the protocol machines of an slave . 100
Figure 45 – Slave information interface read operation . 102
Figure 46 – Slave information interface write operation . 103
Figure 47 – Slave information interface reload operation . 104
Figure 48 – Distributed clock . 106
Figure 49 – Delay measurement sequence . 107

– 6 – IEC 61158-4-12:2019 © IEC 2019
Table 1 – PDU element description example . 20
Table 2 – Example attribute description . 21
Table 3 – State machine description elements . 23
Table 4 – Description of state machine elements . 23
Table 5 – Conventions used in state machines . 23
Table 6 – Transfer Syntax for bit sequences . 29
Table 7 – Transfer syntax for data type Unsignedn . 29
Table 8 – Transfer syntax for data type Integern . 30
Table 9 – Type 12 frame inside an Ethernet frame . 31
Table 10 – Type 12 frame inside an UDP PDU . 32
Table 11 – Type 12 frame structure containing Type 12 PDUs . 33
Table 12 – Type 12 frame structure containing network variables . 33
Table 13 – Type 12 frame structure containing mailbox . 33
Table 14 – Auto increment physical read (APRD) . 34
Table 15 – Configured address physical read (FPRD) . 35
Table 16 – Broadcast read (BRD) . 36
Table 17 – Logical read (LRD) . 37
Table 18 – Auto Increment physical write (APWR) . 38
Table 19 – Configured address physical write (FPWR) . 39
Table 20 – Broadcast write (BWR) . 41
Table 21 – Logical write (LWR) . 42
Table 22 – Auto increment physical read write (APRW) . 43
Table 23 – Configured address physical read write (FPRW) . 44
Table 24 – Broadcast read write (BRW) . 45
Table 25 – Logical read write (LRW) . 47
Table 26 – Auto increment physical read multiple write (ARMW) . 48
Table 27 – Configured address physical read multiple write (FRMW) . 49
Table 28 – Network variable . 50
Table 29 – Mailbox . 51
Table 30 – Error Reply Service Data . 52
Table 31 – DL information . 54
Table 32 – Configured station address . 57
Table 33 – DL control . 58
Table 34 – DL status . 61
Table 35 – DLS-user specific registers . 63
Table 36 – DLS-user event . 65
Table 37 – DLS-user event mask . 66
Table 38 – External event . 67
Table 39 – External event mask . 68
Table 40 – RX error counter . 69
Table 41 – Lost link counter . 70
Table 42 – Additional counter . 71
Table 43 – Watchdog divider . 72

Table 44 – DLS-user watchdog . 72
Table 45 – Sync manager channel watchdog . 73
Table 46 – Sync manager watchdog Status . 73
Table 47 – Watchdog counter . 74
Table 48 – Slave information interface access . 75
Table 49 – Slave information interface control/status . 76
Table 50 – Slave information interface address . 78
Table 51 – Slave information interface data . 78
Table 52 – MII control/status . 80
Table 53 – MII address . 81
Table 54 – MII data . 81
Table 55 – MII access . 82
Table 56 – Fieldbus memory management unit (FMMU) entity . 84
Table 57 – Fieldbus memory management unit (FMMU) . 85
Table 58 – Sync manager channel . 90
Table 59 – Sync manager Structure . 91
Table 60 – Distributed clock local time parameter . 93
Table 61 – Distributed clock DLS-user parameter . 94
Table A.1 – Primitives issued by DHSM to PSM . 108
Table A.2 – Primitives issued by PSM to DHSM . 108
Table A.3 – Parameters used with primitives exchanged between DHSM and PSM . 108
Table A.4 – Identifier for the octets of a Ethernet frame . 109
Table A.5 – DHSM state table . 111
Table A.6 – DHSM function table . 126
Table A.7 – Primitives issued by SYSM to DHSM . 126
Table A.8 – Primitives issued by DHSM to SYSM . 127
Table A.9 – Primitives issued by DL-User to SYSM . 127
Table A.10 – Primitives issued by SYSM to DL-User . 127
Table A.11 – Parameters used with primitives exchanged between SYSM and DHSM . 127
Table A.12 – SYSM state table . 129
Table A.13 – SYSM function table . 138
Table A.14 – Primitives issued by RMSM to SYSM . 138
Table A.15 – Primitives issued by SYSM to RMSM . 139
Table A.16 – Parameters used with primitives exchanged between RMSM and SYSM . 139
Table A.17 – RMSM state table. 140
Table A.18 – RMSM function table . 141

– 8 – IEC 61158-4-12:2019 © IEC 2019
INTERNATIONAL ELECTROTECHNICAL COMMISSION
____________
INDUSTRIAL COMMUNICATION NETWORKS –
FIELDBUS SPECIFICATIONS –
Part 4-12: Data-link layer protocol specification –
Type 12 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-4-12 has been prepared by subcommittee 65C: Industrial
networks, of IEC technical committee 65: Industrial-process measurement, control and
automation.
This fourth edition cancels and replaces the third edition published in 2014. This edition
constitutes a technical revision.

This edition includes the following significant technical changes with respect to the previous
edition:
• technical corrections and editorial improvements for clarification.
The text of this International Standard is based on the following documents:
FDIS Report on voting
65C/946/FDIS 65C/955/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 the ISO/IEC Directives, Part 2.
A list of all the 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.
IMPORTANT – The 'colour inside' logo on the cover page of this publication indicates
that it contains colours which are considered to be useful for the correct
understanding of its contents. Users should therefore print this document using a
colour printer.
– 10 – IEC 61158-4-12: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 data-link protocol provides the data-link service by making use of the services available
from the physical 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 data-link
entities (DLEs) 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:
a) as a g
...

Questions, Comments and Discussion

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

Loading comments...