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

IEC 61158-6-4: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 third edition includes the following significant technical changes with respect to the previous edition:
a) additional user parameters to services;
b) additional services to support distributed objects;
c) additional secure services.

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

l’IEC 61158-6-4:2019 fournit des éléments communs pour les communications à temps critique ou non entre des programmes d’application dans un environnement et avec un matériel d’automation spécifiques aux bus de terrain de type 4. Le terme "en temps critique" signale l'existence d'une fenêtre temporelle dans laquelle des actions spécifiées doivent être exécutées, avec un niveau de certitude défini. La non-réalisation des actions spécifiées dans la fenêtre temporelle induit un risque de défaillance des applications qui demandent ces actions, avec les risques relatifs à l'équipement, les installations et éventuellement la vie humaine.
La présente norme internationale spécifie les interactions entre les applications distantes et définit le comportement, visible par un observateur externe, assuré par la couche Application de bus de terrain de type 4, en termes
a) de syntaxe abstraite formelle définissant les unités de données de protocole de couche Application, acheminées entre les entités d'application en communication;
b) de syntaxe de transfert définissant les règles de codage qui s'appliquent aux unités de données de protocole de couche Application;
c) de diagramme d'états de contexte d'application définissant le comportement de service d'application observable entre les entités d'application en communication;
d) de diagrammes d'états de relations d'applications définissant le comportement de communication visible entre les entités d'application en communication.

General Information

Status
Published
Publication Date
19-Jun-2019
Technical Committee
Drafting Committee
Current Stage
DELPUB - Deleted Publication
Start Date
24-Mar-2023
Completion Date
26-Oct-2025
Ref Project

Relations

Overview

IEC 61158-6-4:2019 - "Industrial communication networks – Fieldbus specifications – Part 6-4: Application layer protocol specification – Type 4 elements" defines the application‑layer protocol and externally visible behavior for Type 4 fieldbus elements. The standard specifies the wire representation of service primitives and their transfer semantics to support both basic time‑critical and non‑time‑critical messaging between automation applications. It is written in conformance with the OSI Basic Reference Model (ISO/IEC 7498‑1) and the OSI application‑layer structure (ISO/IEC 9545). The third edition adds user parameters, support for distributed objects and additional secure services.

Key technical topics and requirements

  • Application layer protocol (FAL): Abstract and transfer syntaxes for APDUs (Application Protocol Data Units), including header and body encodings.
  • Service primitives and wire representation: Definitions of how application primitives map to on‑the‑wire messages.
  • Data types and variable object encoding: Rules for simple and constructed variables, arrays, structures, alignment and packing.
  • State machines and protocol machines: Formal behavior models such as FAL Service Protocol Machine (FSPM), Application Relationship Protocol Machine (ARPM) and DLL mapping protocol machine (DMPM) that define sender/receiver states and transitions.
  • Error handling and codes: Standardized error codes and response semantics for reliable inter‑application messaging.
  • Security and distributed objects: New secure services and primitives to support distributed object architectures and additional user parameters introduced in Edition 3.0.
  • Conformance and mapping: Guidance on conformant implementations and mapping to data‑link layers and OSI concepts.

Practical applications

  • Implementing fieldbus application-layer stacks for industrial controllers, I/O devices and gateways.
  • Designing time‑critical messaging (with defined time windows and deterministic behavior) in process and discrete automation systems.
  • Integrating distributed object architectures and secure application services across fieldbus networks.
  • Specifying interoperability and conformance requirements for device manufacturers, protocol stack vendors and system integrators.

Who should use this standard

  • Automation engineers and system integrators designing deterministic communication in industrial plants.
  • Protocol implementers, firmware and software developers building fieldbus application-layer stacks (APDU encoding, state machines).
  • Device manufacturers, safety and control vendors needing standardized messaging and conformance criteria.
  • Test labs and certification bodies validating application-layer behavior and interoperability.

Related standards

  • ISO/IEC 7498‑1 (OSI Basic Reference Model)
  • ISO/IEC 9545 (OSI application layer structure)
  • Other parts of IEC 61158 (fieldbus specifications) for data‑link and physical layer mappings

Keywords: IEC 61158-6-4:2019, Fieldbus, application layer protocol, Type 4, APDU, FAL, time‑critical messaging, industrial communication networks, distributed objects, secure services.

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

Standards Content (Sample)


IEC 61158-6-4 ®
Edition 3.0 2019-06
INTERNATIONAL
STANDARD
Industrial communication networks – Fieldbus specifications –
Part 6-4: Application layer protocol specification – Type 4 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-6-4 ®
Edition 3.0 2019-06
INTERNATIONAL
STANDARD
Industrial communication networks – Fieldbus specifications –

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

INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
ICS 25.040.40; 35.100.70; 35.110 ISBN 978-2-8322-7009-7

– 2 – IEC 61158-6-4:2019 © IEC 2019
CONTENTS
FOREWORD . 5
INTRODUCTION . 7
1 Scope . 8
1.1 General . 8
1.2 Specifications . 8
1.3 Conformance . 9
2 Normative references . 9
3 Terms, definitions, symbols, abbreviations and conventions . 9
3.1 Referenced terms and definitions . 10
3.1.1 ISO/IEC 7498-1 terms . 10
3.1.2 ISO/IEC 8822 terms . 10
3.1.3 ISO/IEC 9545 terms . 10
3.1.4 ISO/IEC 8824-1 terms . 10
3.1.5 Fieldbus data-link layer terms . 10
3.2 Abbreviations and symbols . 11
3.3 Conventions . 11
3.3.1 General concept . 11
3.3.2 Conventions for state machines for Type 4 . 12
4 FAL syntax description . 13
4.1 FAL-AR PDU abstract syntax . 13
4.1.1 General . 13
4.1.2 Abstract syntax of APDU header . 13
4.1.3 Abstract syntax of APDU body . 14
4.2 Data types . 16
5 Transfer syntaxes . 16
5.1 APDU encoding . 16
5.1.1 APDU Header encoding . 16
5.1.2 APDU body encoding . 18
5.2 Variable object encoding and packing . 20
5.2.1 Encoding of simple variables . 20
5.2.2 Encoding of constructed variables . 21
5.2.3 Alignment . 22
5.2.4 Variable object attributes . 23
5.3 Error codes . 24
6 FAL protocol state machines . 25
7 AP-context state machine . 26
8 FAL service protocol machine (FSPM) . 27
8.1 Primitives exchanged between FAL User and FSPM . 27
8.2 FSPM states . 27
8.2.1 General . 27
8.2.2 FSPM proxy object states . 27
8.2.3 FSPM real object state machine description . 32
9 Application relationship protocol machine (ARPM) . 34
9.1 Primitives exchanged between ARPM and FSPM . 34
9.2 ARPM States . 34
9.2.1 General . 34

9.2.2 Sender state transitions . 34
9.2.3 Receiver state transitions . 35
10 DLL mapping protocol machine (DMPM) . 36
10.1 Data-link Layer service selection. 36
10.1.1 General . 36
10.1.2 DL-UNITDATA request . 36
10.1.3 DL-UNITDATA indication . 36
10.1.4 DL-UNITDATA response . 36
10.1.5 DLM-Set primitive and parameters . 36
10.1.6 DLM-Get primitive and parameters . 36
10.2 Primitives exchanged between ARPM and DLPM . 36
10.3 Primitives exchanged between DLPM and data-link layer . 37
10.4 DLPM states . 37
10.4.1 States . 37
10.4.2 Sender state transitions . 38
10.4.3 Receiver state transitions . 39
11 Protocol options. 39
Bibliography . 40

Figure 1 – State transition diagram . 12
Figure 2 – APDU header structure . 16
Figure 3 –Subfields of ControlStatus for Request . 17
Figure 4 – Subfields of ControlStatus for Response with error . 17
Figure 5 – Subfields of ControlStatus for Response with no error . 18
Figure 6 – DataFieldFormat encoding . 18
Figure 7 – Structure of request APDU body . 19
Figure 8 – Structure of response APDU body . 19
Figure 9 – Variable identifier . 19
Figure 10 – Code subfield of variable identifier . 19
Figure 11 – Sequence of data in the APDU body subfield . 21
Figure 12 – MSG consists of APDU header and APDU body . 22
Figure 13 – Summary of FAL architecture . 26
Figure 14 – FSPM proxy object state machine . 28
Figure 15 – FSPM real object state machine . 33
Figure 16 – ARPM state machine . 34
Figure 17 – DLPM state machine . 37

Table 1 – State machine description elements . 12
Table 2 – APDU header . 13
Table 3 – APDU body . 15
Table 4 – Transfer syntax for Array . 23
Table 5 – Transfer syntax for Structure . 23
Table 6 – Common variable object attributes . 23
Table 7 – Variable type identifiers . 24
Table 8 – FIFO variable object attributes . 24

– 4 – IEC 61158-6-4:2019 © IEC 2019
Table 9 – Error codes . 25
Table 10 – Primitives exchanged between FAL-User and FSPM . 27
Table 11 – REQUEST.req FSPM constraints . 28
Table 12 – REQUEST.req FSPM actions . 29
Table 13 – RESPONSE.cnf FSPM constraints . 30
Table 14 – RESPONSE.cnf FSPM actions . 31
Table 15 – AR Send.ind proxy FSPM constraints . 32
Table 16 – AR Send.ind proxy FSPM actions . 32
Table 17 – AR Send.ind real FSPM constraints . 33
Table 18 – AR Send.ind real FSPM Actions . 33
Table 19 – Primitives issued by FSPM to ARPM . 34
Table 20 – Primitives issued by ARPM to FSPM . 34
Table 21 – Primitives issued by ARPM to ARPM . 34
Table 22 – AR Send.req ARPM constraints . 35
Table 23 – AR Send.req ARPM actions . 35
Table 24 – AR Acknowledge.req ARPM constraints . 35
Table 25 – AR Acknowledge.req ARPM actions . 35
Table 26 – AR Send.ind ARPM constraints . 36
Table 27 – AR Send.req ARPM actions . 36
Table 28 – Primitives issued by ARPM to DLPM . 37
Table 29 – Primitives issued by DLPM to ARPM . 37
Table 30 – Primitives issued by DLPM to data-link layer . 37
Table 31 – Primitives issued by data-link layer to DLPM . 37
Table 32 – AR Send.req DLPM constraints . 38
Table 33 – AR Send.req DLPM actions . 38
Table 34 – AR Acknowledge.req DLPM constraints . 38
Table 35 – AR Acknowledge.req DLPM actions . 39
Table 36 – DL-UNITDATA.ind DLPM constraints . 39
Table 37 – DL-UNITDATA.ind DLPM actions . 39

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

– 6 – IEC 61158-6-4:2019 © IEC 2019
This edition includes the following significant technical changes with respect to the previous
edition:
a) additional user parameters to services;
b) additional services to support distributed objects;
c) additional secure services.
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 the parts of the IEC 61158 series, 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.

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 implementors and designers;
• for use in the testing and procurement of equipment;
• as part of an agreement for the admittance 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.

– 8 – IEC 61158-6-4:2019 © IEC 2019
INDUSTRIAL COMMUNICATION NETWORKS –
FIELDBUS SPECIFICATIONS –
Part 6-4: Application layer protocol specification –
Type 4 elements
1 Scope
1.1 General
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 part of IEC 61158 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 4 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 4 fieldbus application layer in terms of
a) the formal abstract syntax defining the application layer protocol data units conveyed
between communicating application entities;
b) the transfer syntax defining encoding rules that are applied to the application layer
protocol data units;
c) the application context state machine defining the application service behavior visible
between communicating application entities;
d) the application relationship state machines defining the communication behavior visible
between communicating application entities.
The purpose of this document is to define the protocol provided to
1) define the wire-representation of the service primitives defined in IEC 61158-5-4, and
2) define the externally visible behavior associated with their transfer.
This document specifies the protocol of the Type 4 fieldbus application layer, in conformance
with the OSI Basic Reference Model (ISO/IEC 7498-1) and the OSI application layer structure
(ISO/IEC 9545).
1.2 Specifications
The principal objective of this document is to specify the syntax and behavior of the
application layer protocol that conveys the application layer services defined in IEC 61158-5-4.
A secondary objective is to provide migration paths from previously-existing industrial
communications protocols. It is this latter objective which gives rise to the diversity of
protocols standardized in IEC 61158-6 series.

1.3 Conformance
This document do not specify individual implementations or products, nor do they constrain
the implementations of application layer entities within industrial automation systems.
Conformance is achieved through implementation of this application layer protocol
specification.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their
content constitutes requirements of this document. For dated references, only the edition
cited applies. For undated references, the latest edition of the referenced document (including
any amendments) applies.
NOTE All parts of the IEC 61158 series, as well as IEC 61784-1 and IEC 61784-2 are maintained simultaneously.
Cross-references to these documents within the text therefore refer to the editions as dated in this list of normative
references.
IEC 61158-3-4:2019, Industrial communication networks – Fieldbus specifications – Part 3-4:
Data-link layer service definition – Type 4 elements
IEC 61158-5-4:2019, Industrial communication networks – Fieldbus specifications – Part 5-4:
Application layer service definition – Type 4 elements
ISO/IEC 7498-1, Information technology – Open Systems Interconnection – Basic Reference
Model – Part 1: The Basic Model
ISO/IEC 8822, Information technology – Open Systems Interconnection – Presentation
service definition
ISO/IEC 8824-1, Information technology – Abstract Syntax Notation One (ASN.1):
Specification of basic notation
ISO/IEC 9545, Information technology – Open Systems Interconnection – Application Layer
structure
ISO/IEC 10731, Information technology – Open Systems Interconnection – Basic Reference
Model – Conventions for the definition of OSI services
ISO/IEC 9797-1, Information technology – Security techniques – Message Authentication
Codes (MACs) – Part 1: Mechanisms using a block cipher
3 Terms, definitions, symbols, abbreviations and conventions
For the purposes of this document, the following terms, definitions, symbols, abbreviations
and conventions apply.
ISO and IEC maintain terminological databases for use in standardization at the following
addresses:
• IEC Electropedia: available at http://www.electropedia.org/
• ISO Online browsing platform: available at http://www.iso.org/obp

– 10 – IEC 61158-6-4:2019 © IEC 2019
3.1 Referenced terms and definitions
3.1.1 ISO/IEC 7498-1 terms
For the purposes of this document, the following terms as defined in ISO/IEC 7498-1 apply:
a) application entity
b) application process
c) application protocol data unit
d) application service element
e) application entity invocation
f) application process invocation
g) application transaction
h) real open system
i) transfer syntax
3.1.2 ISO/IEC 8822 terms
For the purposes of this document, the following terms as defined in ISO/IEC 8822 apply:
a) abstract syntax
b) presentation context
3.1.3 ISO/IEC 9545 terms
For the purposes of this document, the following terms as defined in ISO/IEC 9545 apply:
a) application-association
b) application-context
c) application context name
d) application-entity-invocation
e) application-entity-type
f) application-process-invocation
g) application-process-type
h) application-service-element
i) application control service element
3.1.4 ISO/IEC 8824-1 terms
For the purposes of this document, the following terms as defined in ISO/IEC 8824-1 apply:
a) object identifier
b) type
3.1.5 Fieldbus data-link layer terms
For the purposes of this document, the following terms as defined in IEC 61158-3-4 and
IEC 61158-4-4 apply.
a) DL-Time
b) DL-Scheduling-policy
c) DLCEP
d) DLC
e) DL-connection-oriented mode

f) DLPDU
g) DLSDU
h) DLSAP
i) network address
j) node address
k) node
3.2 Abbreviations and symbols
AE Application Entity
AL Application Layer
ALE Application Layer Entity
APDU Application Protocol Data Unit
AR Application Relationship
AREP Application Relationship End Point
ASE Application Service Element
Cnf Confirmation
DL- (as a prefix) Data-link-
DLCEP Data-link Connection End Point
DLL Data-link Layer
DLE Data-link Entity
DLM Data-link-management
DLS Data-link Service
DLSAP Data-link Service Access Point
DLSDU DL-service-data-unit
FME FAL Management Entity
Ind Indication
IP Internet Protocol
PDU Protocol Data Unit
Req Request
Rsp Response
SME System Management Entity
.cnf Confirm Primitive
.ind Indication Primitive
.req Request Primitive
.rsp Response Primitive
3.3 Conventions
3.3.1 General concept
The FAL is defined as a set of object-oriented ASEs. Each ASE is specified in a separate
subclause. Each ASE specification is composed of three parts: its class definitions, its
services, and its protocol specification. The first two are contained in IEC 61158-5-4. The
protocol specification for each of the ASEs is defined in this document.
The class definitions define the attributes of the classes supported by each ASE. The
attributes are accessible from instances of the class using the Management ASE services
specified in IEC 61158-5-4. The service specification defines the services that are provided by
the ASE.
– 12 – IEC 61158-6-4:2019 © IEC 2019
This document uses the descriptive conventions given in ISO/IEC 10731.
3.3.2 Conventions for state machines for Type 4
A state machine describes the state sequence of an entity and can be represented by a state
transition diagram and/or a state table.
In a state transition diagram (see Figure 1), the transition between two states represented by
circles is illustrated by an arrow beside which the transition events or conditions are
presented.
R1
S1
S2
Figure 1 – State transition diagram
Table 1 – State machine description elements
Events or conditions that trigger this state
transaction
Current
# Next state
state  =>
action
Name of The current Events or conditions that trigger this state The next state after the
this state to transaction. actions in this transition is
transition which this taken
=>
state
transition
The actions that are taken when the above events
applies
or
conditions are met. The actions are always indented
below events or conditions
The conventions used in the state transition table (Table 1) are as follows.
:= Value of an item on the left is replaced by value of an item on the right. If an item on
the right is a parameter, it comes from the primitive shown as an input event.
xxx A parameter name.
Example:
Identifier:= reason
means value of a 'reason' parameter is assigned to a parameter called 'Identifier.'
"xxx" Indicates fixed value.
Example:
Identifier:= "abc"
means value "abc" is assigned to a parameter named 'Identifier.'
= A logical condition to indicate an item on the left is equal to an item on the right.
< A logical condition to indicate an item on the left is less than the item on the right.
> A logical condition to indicate an item on the left is greater than the item on the
right.
<> A logical condition to indicate an item on the left is not equal to an item on the
right.
&& Logical "AND"
|| Logical "OR"
Service.req represents a Request Primitive; Service.req{} indicates that a request
primitive is sent;
Service.ind represents an Indication Primitive; Service.ind{} indicates that an Indication
Primitive is received;
Service.rsp represents a Response Primitive; Service.rsp{} indicates that a Response
Primitive is sent;
Service.cnf represents a Confirm Primitive; Service.cnf{} indicates that a Confirm
Primitive is received.
4 FAL syntax description
4.1 FAL-AR PDU abstract syntax
4.1.1 General
The information stored in an APDU depends on whether the APDU holds a request or a
response. The role of the state machine that encodes the APDU (the FSPM) determines how
the APDU is encoded.
APDUs always consist of an APDU header and an APDU body. In response APDUs the APDU
body may be empty.
4.1.2 Abstract syntax of APDU header
Table 2 defines the contents of the APDU header.
Table 2 – APDU header
Field name Subfield name Possible values Constraint (present if) Comment
ControlStatus Instruction Errorcode
Method
Store
Load
And
Or
Test-And-Set
Segmented Load
Segmented Store
ControlStatus Errorcode Described in ControlStatus.Instruction
Figure 3 to = Errorcode
Figure 5
ControlStatus Addressing method Variable Object ControlStatus.Instruction
<> Errorcode
Flat
ControlStatus Addressing method Variable Object ControlStatus.Instruction Variable object means 2
=Method octet MethodID
Flat
Flat means 4 octet
MethodID
– 14 – IEC 61158-6-4:2019 © IEC 2019
Field name Subfield name Possible values Constraint (present if) Comment
ControlStatus SourceID NoSourceIDInData Used by the requesting
application to indicate to
SourceIDInData
the responding
application that the
performed instruction can
be related to a specific
SourceID
ControlStatus SecureDataExchange NoSecureData APDU is a request APDU Read type instruction:
Used by the requesting
SecureData
application to ensure an
authenticated response.
Write type instruction:
Used by the requesting
application to ensure an
authenticated write type
instruction in the
responder.
ControlStatus ActualDataError NoActualError ControlStatus.Instruction Used by the responding
<> Errorcode user application to
ActualError
indicate, that an actual
error may affect the
accessed Variable
Object
ControlStatus SystemResult NoSystemResult ControlStatus.Instruction Used by the responding
= Method user application to
SystemResult
indicate that additional 2
octet data are inserted in
the APDU data before
the result data for the
accessed Variable
identifier
Hence, DataLength is 2
higher than the method
result length.
ControlStatus HistoricalDataError NoHistoricalError ControlStatus.Instruction Used by the responding
<> Errorcode user application to
HistoricalError
indicate, that an error
may have affected the
accessed Variable
Object
DataFieldFormat Offset/Attribute No Offset/Attribute Indicates, whether the
APDU Body holds an
Offset/Attribute
Offset/Attribute field
DataFieldFormat Variable Identifier Simple APDU is a request APDU Indicates the format of
Format the Variable Identifier in
Complex
a request APDU
DataFieldFormat Offset/Attribute size Integer16 APDU is a response Indicates the size of the
APDU AND Offset/Attribute field of
Integer32
DataFieldFormat.Offset/A the APDU Body
ttribute = Offset/Attribute
DataLength min. 2 Indicates the total length
of the APDU Body.
MaxDataSize indicates
the max length of the
data part of the APDU
Body.
4.1.3 Abstract syntax of APDU body
The APDU header indicates the interpretation of the contents of the APDU body.
Table 3 defines the contents of the APDU body.

Table 3 – APDU body
Field name Subfield name Possible values Constraint (present if) Comment
VariableIdentifier Code.Bitaddressing No BitAddressing APDU is a request If this field indicates
APDU AND APDU BitAddressing, the
BitAddressing
Header indicates VariableIdentifier also
Complex holds a Bit-no
VariableIdentifier
VariableIdentifier Code.Bit-no 0 to 7 APDU is a request Bit-no selects a bit
APDU AND APDU within one octet. Bit-no
Header indicates = 0 selects bit 1 etc.
Complex The octet is selected by
VariableIdentifier AND Offset/Attribute.
VariableIdentifier
indicates BitAddressing
VariableIdentifier Code.Offset/Attribute Integer16 APDU is a request
size APDU AND
Integer32
DataFieldFormat.Variabl
e Identifier Format =
Complex AND
DataFieldFormat.Offset/
Attribute =
Offset/Attribute
VariableIdentifier ID -32 768 to APDU is a request
APDU AND
+32 767
DataFieldFormat.Variabl
e Identifier Format =
Simple
VariableIdentifier ID -8 388 608 to APDU is a request
APDU AND
+8 388 607
DataFieldFormat.Variabl
e Identifier Format =
Complex
Offset/Attribute -32 768  APDU is a request Negative values select
APDU AND attribute, positive
+32 767
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
VariableIdentifier.Code.
Offset/Attribute size =
Integer16
Offset/Attribute -2 147 483 648 to APDU is a request Negative values select
+2 147 483 647 APDU AND attribute, positive
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
VariableIdentifier.Code.
Offset/Attribute size =
Integer32
APDU is a response Negative values select
Offset/Attribute -32 768 to
APDU AND attribute, positive
+32 767
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
DataFieldFormat.Offset/
Attribute size= Integer16
Offset/Attribute -2 147 483 648 to APDU is a response Negative values select
+2 147 483 647 APDU AND attribute, positive
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
DataFieldFormat.Offset/
Attribute size= Integer32
Data Any
– 16 – IEC 61158-6-4:2019 © IEC 2019
Field name Subfield name Possible values Constraint (present if) Comment
RequestedLength 0 to 65 535 APDU is a request Indicates the length of
APDU AND data to Read, as the
ControlStatus.Instruction number of octets
indicates Load OR
Segmented Load
Sequence 0 to 2 APDU is a request Indicates whether this
APDU AND request is the first, one
ControlStatus.Instruction in the middle, or the last
indicates Segmented of a segmented
Load OR Segmented transfer.
Store
4.2 Data types
The notation for data types is the same as IEC 61158-6:2003, Type 1, for the following types:
• Integer, Integer8, Integer16, Integer32
• Unsigned, Unsigned8, Unsigned16
• Floating32, Floating64
5 Transfer syntaxes
5.1 APDU encoding
5.1.1 APDU Header encoding
5.1.1.1 APDU header structure
The abstract syntax of the APDU header is defined in 4.1.2. Subclause 5.1 describes the
encoding of the header. The APDU header consists of three fields, as shown in Figure 2.
One octet One octet 4 octets
ControlStatus Data Field Format Data Length

Figure 2 – APDU header structure
5.1.1.2 ControlStatus
ControlStatus is coded into one octet. If the APDU is a request APDU, the ControlStatus holds
the subfields instruction, addressing method, SourceID and SecureDataExchange. The
interpretation of this octet is shown in Figure 3.

8 7 6 5 4 3 2 1
000 Method
001 Store
010 Load
011 And
100 Or
101 Test-And-Set
Addressing method
110 Segmented Load
0: Variable object
111 Segmented Store
1:Flat
FAL-user
information
SourceID
0: No SourceID in data
1: SourceID in data
SecureDataExchange
0: No Secure data
1: Secure data
Figure 3 –Subfields of ControlStatus for Request
If the instruction is = 000 ( = Errorcode), the remaining five bits of ControlStatus holds the
error code. The possible values are shown in Figure 4.
8 7 6 5 4 3 2 1
= 000 ( = Errorcode)
00000 No response
00001 Time out
00011 Wait too long
00100 FIFO full or empty
00101 Dataformat error
00110 Variable ObjectID error
00111 Route error
01000 Write protection
01001 Info length error
01010 Instruction error
10000 CRC error
10001 Overrun/framing error
10010 Net short circuit
10011 DLE not client
10100 Out of sync
10101 RS-232 handshake error
10111 Signature error
Figure 4 – Subfields of ControlStatus for Response with error
If the instruction is <> 000 (<> Errorcode), the remaining five bits of ControlStatus holds the
subfields Statuscode and HistoricalDataError. The coding of these fields is shown in Figure 5.

– 18 – IEC 61158-6-4:2019 © IEC 2019
8 7 6 5 4 3 2 1
001 Store/Method
010 Load
011 And
000 OK
100 Or
001 Busy
101 Test-And-Set
010 Actual data error
110 Segmented Load
011 SystemResult
111 Segmented Store
100 Wait
101 ACL
110 Not defined (reserved)
111 Not defined (reserved)
0 No historical data error
1 Historical data error
Figure 5 – Subfields of ControlStatus for Response with no error
5.1.1.3 DataFieldFormat
DataFieldFormat is coded into one octet. The coding of this octet is shown in Figure 6.
8 7 6 5 4 3 2 1
Don’t care
Offset/Attribute
0: No Offset/Attribute
1: Offset/Attribute
Variable Identifier Format
0: Simple
1: Complex
Figure 6 – DataFieldFormat encoding
5.1.1.4 DataLength
DataLength is an Integer32, indicating the total length of the APDU body.
5.1.2 APDU body encoding
5.1.2.1 APDU body structure
The abstract syntax for the APDU Body is described in 4.1.3. Subclause 5.1.2 describes the
encoding. The interpretation of the APDU Body is indicated by the APDU header.
A request APDU body may consist of up
...


IEC 61158-6-4 ®
Edition 3.0 2019-06
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
Industrial communication networks – Fieldbus specifications –
Part 6-4: Application layer protocol specification – Type 4 elements

Réseaux de communication industriels – Spécifications des bus de terrain –
Partie 6-4: Spécification du protocole de la couche application – Eléments
de type 4
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 IEC online collection - oc.iec.ch
The advanced search enables to find IEC publications by a Discover our powerful search engine and read freely all the
variety of criteria (reference number, text, technical publications previews. With a subscription you will always
committee, …). It also gives information on projects, replaced have access to up to date content tailored to your needs.
and withdrawn publications.
Electropedia - www.electropedia.org
IEC Just Published - webstore.iec.ch/justpublished
The world's leading online dictionary on electrotechnology,
Stay up to date on all new IEC publications. Just Published
containing more than 22 000 terminological entries in English
details all new publications released. Available online and
and French, with equivalent terms in 18 additional languages.
once a month by email.
Also known as the International Electrotechnical Vocabulary

(IEV) online.
IEC Customer Service Centre - webstore.iec.ch/csc
If you wish to give us your feedback on this publication or
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 - IEC online collection - oc.iec.ch
webstore.iec.ch/advsearchform Découvrez notre puissant moteur de recherche et consultez
La recherche avancée permet de trouver des publications IEC gratuitement tous les aperçus des publications. Avec un
en utilisant différents critères (numéro de référence, texte, abonnement, vous aurez toujours accès à un contenu à jour
comité d’études, …). Elle donne aussi des informations sur adapté à vos besoins.
les projets et les publications remplacées ou retirées.

Electropedia - www.electropedia.org
IEC Just Published - webstore.iec.ch/justpublished
Le premier dictionnaire d'électrotechnologie en ligne au
Restez informé sur les nouvelles publications IEC. Just
monde, avec plus de 22 000 articles terminologiques en
Published détaille les nouvelles publications parues.
anglais et en français, ainsi que les termes équivalents dans
Disponible en ligne et une fois par mois par email.
16 langues additionnelles. Egalement appelé Vocabulaire

Electrotechnique International (IEV) en ligne.
Service Clients - webstore.iec.ch/csc

Si vous désirez nous donner des commentaires sur cette
publication ou si vous avez des questions contactez-nous:
sales@iec.ch.
IEC 61158-6-4 ®
Edition 3.0 2019-06
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
Industrial communication networks – Fieldbus specifications –

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

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

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

de type 4
INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
COMMISSION
ELECTROTECHNIQUE
INTERNATIONALE
ICS 25.040.40; 35.100.70; 35.110 ISBN 978-2-8322-9702-5

– 2 – IEC 61158-6-4:2019 © IEC 2019
CONTENTS
FOREWORD . 5
INTRODUCTION . 7
1 Scope . 8
1.1 General . 8
1.2 Specifications . 8
1.3 Conformance . 9
2 Normative references . 9
3 Terms, definitions, symbols, abbreviations and conventions . 9
3.1 Referenced terms and definitions . 10
3.1.1 ISO/IEC 7498-1 terms . 10
3.1.2 ISO/IEC 8822 terms . 10
3.1.3 ISO/IEC 9545 terms . 10
3.1.4 ISO/IEC 8824-1 terms . 10
3.1.5 Fieldbus data-link layer terms . 10
3.2 Abbreviations and symbols . 11
3.3 Conventions . 11
3.3.1 General concept . 11
3.3.2 Conventions for state machines for Type 4 . 12
4 FAL syntax description . 13
4.1 FAL-AR PDU abstract syntax . 13
4.1.1 General . 13
4.1.2 Abstract syntax of APDU header . 13
4.1.3 Abstract syntax of APDU body . 14
4.2 Data types . 16
5 Transfer syntaxes . 16
5.1 APDU encoding . 16
5.1.1 APDU Header encoding . 16
5.1.2 APDU body encoding . 18
5.2 Variable object encoding and packing . 20
5.2.1 Encoding of simple variables . 20
5.2.2 Encoding of constructed variables . 21
5.2.3 Alignment . 22
5.2.4 Variable object attributes . 23
5.3 Error codes . 24
6 FAL protocol state machines . 25
7 AP-context state machine . 26
8 FAL service protocol machine (FSPM) . 27
8.1 Primitives exchanged between FAL User and FSPM . 27
8.2 FSPM states . 27
8.2.1 General . 27
8.2.2 FSPM proxy object states . 27
8.2.3 FSPM real object state machine description . 32
9 Application relationship protocol machine (ARPM) . 34
9.1 Primitives exchanged between ARPM and FSPM . 34
9.2 ARPM States . 34
9.2.1 General . 34

9.2.2 Sender state transitions . 34
9.2.3 Receiver state transitions . 35
10 DLL mapping protocol machine (DMPM) . 36
10.1 Data-link Layer service selection. 36
10.1.1 General . 36
10.1.2 DL-UNITDATA request . 36
10.1.3 DL-UNITDATA indication . 36
10.1.4 DL-UNITDATA response . 36
10.1.5 DLM-Set primitive and parameters . 36
10.1.6 DLM-Get primitive and parameters . 36
10.2 Primitives exchanged between ARPM and DLPM . 36
10.3 Primitives exchanged between DLPM and data-link layer . 37
10.4 DLPM states . 37
10.4.1 States . 37
10.4.2 Sender state transitions . 38
10.4.3 Receiver state transitions . 39
11 Protocol options. 39
Bibliography . 40

Figure 1 – State transition diagram . 12
Figure 2 – APDU header structure . 16
Figure 3 – Subfields of ControlStatus for Request . 17
Figure 4 – Subfields of ControlStatus for Response with error . 17
Figure 5 – Subfields of ControlStatus for Response with no error . 18
Figure 6 – DataFieldFormat encoding . 18
Figure 7 – Structure of request APDU body . 19
Figure 8 – Structure of response APDU body . 19
Figure 9 – Variable identifier . 19
Figure 10 – Code subfield of variable identifier . 19
Figure 11 – Sequence of data in the APDU body subfield . 21
Figure 12 – MSG consists of APDU header and APDU body . 22
Figure 13 – Summary of FAL architecture . 26
Figure 14 – FSPM proxy object state machine . 28
Figure 15 – FSPM real object state machine . 33
Figure 16 – ARPM state machine . 34
Figure 17 – DLPM state machine . 37

Table 1 – State machine description elements . 12
Table 2 – APDU header . 13
Table 3 – APDU body . 15
Table 4 – Transfer syntax for Array . 23
Table 5 – Transfer syntax for Structure . 23
Table 6 – Common variable object attributes . 23
Table 7 – Variable type identifiers . 24
Table 8 – FIFO variable object attributes . 24

– 4 – IEC 61158-6-4:2019 © IEC 2019
Table 9 – Error codes . 25
Table 10 – Primitives exchanged between FAL-User and FSPM . 27
Table 11 – REQUEST.req FSPM constraints . 28
Table 12 – REQUEST.req FSPM actions . 29
Table 13 – RESPONSE.cnf FSPM constraints . 30
Table 14 – RESPONSE.cnf FSPM actions . 31
Table 15 – AR Send.ind proxy FSPM constraints . 32
Table 16 – AR Send.ind proxy FSPM actions . 32
Table 17 – AR Send.ind real FSPM constraints . 33
Table 18 – AR Send.ind real FSPM Actions . 33
Table 19 – Primitives issued by FSPM to ARPM . 34
Table 20 – Primitives issued by ARPM to FSPM . 34
Table 21 – Primitives issued by ARPM to ARPM . 34
Table 22 – AR Send.req ARPM constraints . 35
Table 23 – AR Send.req ARPM actions . 35
Table 24 – AR Acknowledge.req ARPM constraints . 35
Table 25 – AR Acknowledge.req ARPM actions . 35
Table 26 – AR Send.ind ARPM constraints . 36
Table 27 – AR Send.req ARPM actions . 36
Table 28 – Primitives issued by ARPM to DLPM . 37
Table 29 – Primitives issued by DLPM to ARPM . 37
Table 30 – Primitives issued by DLPM to data-link layer . 37
Table 31 – Primitives issued by data-link layer to DLPM . 37
Table 32 – AR Send.req DLPM constraints . 38
Table 33 – AR Send.req DLPM actions . 38
Table 34 – AR Acknowledge.req DLPM constraints . 38
Table 35 – AR Acknowledge.req DLPM actions . 39
Table 36 – DL-UNITDATA.ind DLPM constraints . 39
Table 37 – DL-UNITDATA.ind DLPM actions . 39

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

– 6 – IEC 61158-6-4:2019 © IEC 2019
This edition includes the following significant technical changes with respect to the previous
edition:
a) additional user parameters to services;
b) additional services to support distributed objects;
c) additional secure services.
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 the parts of the IEC 61158 series, 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.
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 implementors and designers;
• for use in the testing and procurement of equipment;
• as part of an agreement for the admittance 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.

– 8 – IEC 61158-6-4:2019 © IEC 2019
INDUSTRIAL COMMUNICATION NETWORKS –
FIELDBUS SPECIFICATIONS –
Part 6-4: Application layer protocol specification –
Type 4 elements
1 Scope
1.1 General
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 part of IEC 61158 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 4 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 4 fieldbus application layer in terms of
a) the formal abstract syntax defining the application layer protocol data units conveyed
between communicating application entities;
b) the transfer syntax defining encoding rules that are applied to the application layer
protocol data units;
c) the application context state machine defining the application service behavior visible
between communicating application entities;
d) the application relationship state machines defining the communication behavior visible
between communicating application entities.
The purpose of this document is to define the protocol provided to
1) define the wire-representation of the service primitives defined in IEC 61158-5-4, and
2) define the externally visible behavior associated with their transfer.
This document specifies the protocol of the Type 4 fieldbus application layer, in conformance
with the OSI Basic Reference Model (ISO/IEC 7498-1) and the OSI application layer structure
(ISO/IEC 9545).
1.2 Specifications
The principal objective of this document is to specify the syntax and behavior of the
application layer protocol that conveys the application layer services defined in IEC 61158-5-4.
A secondary objective is to provide migration paths from previously-existing industrial
communications protocols. It is this latter objective which gives rise to the diversity of
protocols standardized in IEC 61158-6 series.

1.3 Conformance
This document do not specify individual implementations or products, nor do they constrain
the implementations of application layer entities within industrial automation systems.
Conformance is achieved through implementation of this application layer protocol
specification.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their
content constitutes requirements of this document. For dated references, only the edition
cited applies. For undated references, the latest edition of the referenced document (including
any amendments) applies.
NOTE All parts of the IEC 61158 series, as well as IEC 61784-1 and IEC 61784-2 are maintained simultaneously.
Cross-references to these documents within the text therefore refer to the editions as dated in this list of normative
references.
IEC 61158-3-4:2019, Industrial communication networks – Fieldbus specifications – Part 3-4:
Data-link layer service definition – Type 4 elements
IEC 61158-5-4:2019, Industrial communication networks – Fieldbus specifications – Part 5-4:
Application layer service definition – Type 4 elements
ISO/IEC 7498-1, Information technology – Open Systems Interconnection – Basic Reference
Model – Part 1: The Basic Model
ISO/IEC 8822, Information technology – Open Systems Interconnection – Presentation
service definition
ISO/IEC 8824-1, Information technology – Abstract Syntax Notation One (ASN.1):
Specification of basic notation
ISO/IEC 9545, Information technology – Open Systems Interconnection – Application Layer
structure
ISO/IEC 10731, Information technology – Open Systems Interconnection – Basic Reference
Model – Conventions for the definition of OSI services
ISO/IEC 9797-1, Information technology – Security techniques – Message Authentication
Codes (MACs) – Part 1: Mechanisms using a block cipher
3 Terms, definitions, symbols, abbreviations and conventions
For the purposes of this document, the following terms, definitions, symbols, abbreviations
and conventions apply.
ISO and IEC maintain terminological databases for use in standardization at the following
addresses:
• IEC Electropedia: available at http://www.electropedia.org/
• ISO Online browsing platform: available at http://www.iso.org/obp

– 10 – IEC 61158-6-4:2019 © IEC 2019
3.1 Referenced terms and definitions
3.1.1 ISO/IEC 7498-1 terms
For the purposes of this document, the following terms as defined in ISO/IEC 7498-1 apply:
a) application entity
b) application process
c) application protocol data unit
d) application service element
e) application entity invocation
f) application process invocation
g) application transaction
h) real open system
i) transfer syntax
3.1.2 ISO/IEC 8822 terms
For the purposes of this document, the following terms as defined in ISO/IEC 8822 apply:
a) abstract syntax
b) presentation context
3.1.3 ISO/IEC 9545 terms
For the purposes of this document, the following terms as defined in ISO/IEC 9545 apply:
a) application-association
b) application-context
c) application context name
d) application-entity-invocation
e) application-entity-type
f) application-process-invocation
g) application-process-type
h) application-service-element
i) application control service element
3.1.4 ISO/IEC 8824-1 terms
For the purposes of this document, the following terms as defined in ISO/IEC 8824-1 apply:
a) object identifier
b) type
3.1.5 Fieldbus data-link layer terms
For the purposes of this document, the following terms as defined in IEC 61158-3-4 and
IEC 61158-4-4 apply.
a) DL-Time
b) DL-Scheduling-policy
c) DLCEP
d) DLC
e) DL-connection-oriented mode

f) DLPDU
g) DLSDU
h) DLSAP
i) network address
j) node address
k) node
3.2 Abbreviations and symbols
AE Application Entity
AL Application Layer
ALE Application Layer Entity
APDU Application Protocol Data Unit
AR Application Relationship
AREP Application Relationship End Point
ASE Application Service Element
Cnf Confirmation
DL- (as a prefix) Data-link-
DLCEP Data-link Connection End Point
DLL Data-link Layer
DLE Data-link Entity
DLM Data-link-management
DLS Data-link Service
DLSAP Data-link Service Access Point
DLSDU DL-service-data-unit
FME FAL Management Entity
Ind Indication
IP Internet Protocol
PDU Protocol Data Unit
Req Request
Rsp Response
SME System Management Entity
.cnf Confirm Primitive
.ind Indication Primitive
.req Request Primitive
.rsp Response Primitive
3.3 Conventions
3.3.1 General concept
The FAL is defined as a set of object-oriented ASEs. Each ASE is specified in a separate
subclause. Each ASE specification is composed of three parts: its class definitions, its
services, and its protocol specification. The first two are contained in IEC 61158-5-4. The
protocol specification for each of the ASEs is defined in this document.
The class definitions define the attributes of the classes supported by each ASE. The
attributes are accessible from instances of the class using the Management ASE services
specified in IEC 61158-5-4. The service specification defines the services that are provided by
the ASE.
– 12 – IEC 61158-6-4:2019 © IEC 2019
This document uses the descriptive conventions given in ISO/IEC 10731.
3.3.2 Conventions for state machines for Type 4
A state machine describes the state sequence of an entity and can be represented by a state
transition diagram and/or a state table.
In a state transition diagram (see Figure 1), the transition between two states represented by
circles is illustrated by an arrow beside which the transition events or conditions are
presented.
R1
S1
S2
Figure 1 – State transition diagram
Table 1 – State machine description elements
Events or conditions that trigger this state
transaction
Current
# Next state
state  =>
action
Name of The current Events or conditions that trigger this state The next state after the
this state to transaction. actions in this transition is
transition which this taken
=>
state
transition
The actions that are taken when the above events
applies
or
conditions are met. The actions are always indented
below events or conditions
The conventions used in the state transition table (Table 1) are as follows.
:= Value of an item on the left is replaced by value of an item on the right. If an item on
the right is a parameter, it comes from the primitive shown as an input event.
xxx A parameter name.
Example:
Identifier:= reason
means value of a 'reason' parameter is assigned to a parameter called 'Identifier.'
"xxx" Indicates fixed value.
Example:
Identifier:= "abc"
means value "abc" is assigned to a parameter named 'Identifier.'
= A logical condition to indicate an item on the left is equal to an item on the right.
< A logical condition to indicate an item on the left is less than the item on the right.
> A logical condition to indicate an item on the left is greater than the item on the
right.
<> A logical condition to indicate an item on the left is not equal to an item on the
right.
&& Logical "AND"
|| Logical "OR"
Service.req represents a Request Primitive; Service.req{} indicates that a request
primitive is sent;
Service.ind represents an Indication Primitive; Service.ind{} indicates that an Indication
Primitive is received;
Service.rsp represents a Response Primitive; Service.rsp{} indicates that a Response
Primitive is sent;
Service.cnf represents a Confirm Primitive; Service.cnf{} indicates that a Confirm
Primitive is received.
4 FAL syntax description
4.1 FAL-AR PDU abstract syntax
4.1.1 General
The information stored in an APDU depends on whether the APDU holds a request or a
response. The role of the state machine that encodes the APDU (the FSPM) determines how
the APDU is encoded.
APDUs always consist of an APDU header and an APDU body. In response APDUs the APDU
body may be empty.
4.1.2 Abstract syntax of APDU header
Table 2 defines the contents of the APDU header.
Table 2 – APDU header
Field name Subfield name Possible values Constraint (present if) Comment
ControlStatus Instruction Errorcode
Method
Store
Load
And
Or
Test-And-Set
Segmented Load
Segmented Store
ControlStatus Errorcode Described in ControlStatus.Instruction
Figure 3 to = Errorcode
Figure 5
ControlStatus Addressing method Variable Object ControlStatus.Instruction
<> Errorcode
Flat
ControlStatus Addressing method Variable Object ControlStatus.Instruction Variable object means 2
=Method octet MethodID
Flat
Flat means 4 octet
MethodID
– 14 – IEC 61158-6-4:2019 © IEC 2019
Field name Subfield name Possible values Constraint (present if) Comment
ControlStatus SourceID NoSourceIDInData Used by the requesting
application to indicate to
SourceIDInData
the responding
application that the
performed instruction can
be related to a specific
SourceID
ControlStatus SecureDataExchange NoSecureData APDU is a request APDU Read type instruction:
Used by the requesting
SecureData
application to ensure an
authenticated response.
Write type instruction:
Used by the requesting
application to ensure an
authenticated write type
instruction in the
responder.
ControlStatus ActualDataError NoActualError ControlStatus.Instruction Used by the responding
<> Errorcode user application to
ActualError
indicate, that an actual
error may affect the
accessed Variable
Object
ControlStatus SystemResult NoSystemResult ControlStatus.Instruction Used by the responding
= Method user application to
SystemResult
indicate that additional 2
octet data are inserted in
the APDU data before
the result data for the
accessed Variable
identifier
Hence, DataLength is 2
higher than the method
result length.
ControlStatus HistoricalDataError NoHistoricalError ControlStatus.Instruction Used by the responding
<> Errorcode user application to
HistoricalError
indicate, that an error
may have affected the
accessed Variable
Object
DataFieldFormat Offset/Attribute No Offset/Attribute Indicates, whether the
APDU Body holds an
Offset/Attribute
Offset/Attribute field
DataFieldFormat Variable Identifier Simple APDU is a request APDU Indicates the format of
Format the Variable Identifier in
Complex
a request APDU
DataFieldFormat Offset/Attribute size Integer16 APDU is a response Indicates the size of the
APDU AND Offset/Attribute field of
Integer32
DataFieldFormat.Offset/A the APDU Body
ttribute = Offset/Attribute
DataLength min. 2 Indicates the total length
of the APDU Body.
MaxDataSize indicates
the max length of the
data part of the APDU
Body.
4.1.3 Abstract syntax of APDU body
The APDU header indicates the interpretation of the contents of the APDU body.
Table 3 defines the contents of the APDU body.

Table 3 – APDU body
Field name Subfield name Possible values Constraint (present if) Comment
VariableIdentifier Code.Bitaddressing No BitAddressing APDU is a request If this field indicates
APDU AND APDU BitAddressing, the
BitAddressing
Header indicates VariableIdentifier also
Complex holds a Bit-no
VariableIdentifier
VariableIdentifier Code.Bit-no 0 to 7 APDU is a request Bit-no selects a bit
APDU AND APDU within one octet. Bit-no
Header indicates = 0 selects bit 1 etc.
Complex The octet is selected by
VariableIdentifier AND Offset/Attribute.
VariableIdentifier
indicates BitAddressing
VariableIdentifier Code.Offset/Attribute Integer16 APDU is a request
size APDU AND
Integer32
DataFieldFormat.Variabl
e Identifier Format =
Complex AND
DataFieldFormat.Offset/
Attribute =
Offset/Attribute
VariableIdentifier ID -32 768 to APDU is a request
APDU AND
+32 767
DataFieldFormat.Variabl
e Identifier Format =
Simple
VariableIdentifier ID -8 388 608 to APDU is a request
APDU AND
+8 388 607
DataFieldFormat.Variabl
e Identifier Format =
Complex
Offset/Attribute -32 768  APDU is a request Negative values select
APDU AND attribute, positive
+32 767
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
VariableIdentifier.Code.
Offset/Attribute size =
Integer16
Offset/Attribute -2 147 483 648 to APDU is a request Negative values select
+2 147 483 647 APDU AND attribute, positive
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
VariableIdentifier.Code.
Offset/Attribute size =
Integer32
APDU is a response Negative values select
Offset/Attribute -32 768 to
APDU AND attribute, positive
+32 767
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
DataFieldFormat.Offset/
Attribute size= Integer16
Offset/Attribute -2 147 483 648 to APDU is a response Negative values select
+2 147 483 647 APDU AND attribute, positive
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
DataFieldFormat.Offset/
Attribute size= Integer32
Data Any
– 16 – IEC 61158-6-4:2019 © IEC 2019
Field name Subfield name Possible values Constraint (present if) Comment
RequestedLength 0 to 65 535 APDU is a request Indicates the length of
APDU AND data to Read, as the
ControlStatus.Instruction number of octets
indicates Load OR
Segmented Load
Sequence 0 to 2 APDU is a request Indicates whether this
APDU AND request is the first, one
ControlStatus.Instruction in the middle, or the last
indicates Segmented of a segmented
Load OR Segmented transfer.
Store
4.2 Data types
The notation for data types is the same as IEC 61158-6:2003, Type 1, for the following types:
• Integer, Integer8, Integer16, Integer32
• Unsigned, Unsigned8, Unsigned16
• Floating32, Floating64
5 Transfer syntaxes
5.1 APDU encoding
5.1.1 APDU Header encoding
5.1.1.1 APDU header structure
The abstract syntax of the APDU header is defined in 4.1.2. Subclause 5.1 describes the
encoding of the header. The APDU header consists of three fields, as shown in Figure 2.
One octet One octet 4 octets
ControlStatus Data Field Format Data Length

Figure 2 – AP
...

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

Frequently Asked Questions

IEC 61158-6-4:2019 is a standard published by the International Electrotechnical Commission (IEC). Its full title is "Industrial communication networks - Fieldbus specifications - Part 6-4: Application layer protocol specification - Type 4 elements". This standard covers: IEC 61158-6-4: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 third edition includes the following significant technical changes with respect to the previous edition: a) additional user parameters to services; b) additional services to support distributed objects; c) additional secure services.

IEC 61158-6-4: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 third edition includes the following significant technical changes with respect to the previous edition: a) additional user parameters to services; b) additional services to support distributed objects; c) additional secure services.

IEC 61158-6-4:2019 is classified under the following ICS (International Classification for Standards) categories: 25.040.40 - Industrial process measurement and control; 35.100.70 - Application layer; 35.110 - Networking. The ICS classification helps identify the subject area and facilitates finding related standards.

IEC 61158-6-4:2019 has the following relationships with other standards: It is inter standard links to IEC 61158-6-4:2023, IEC 61158-6-4:2014. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.

You can purchase IEC 61158-6-4:2019 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of IEC standards.