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

IEC 61158-6-4:2007 defines the protocol provided to define the wire-representation of the service primitives defined in IEC 61158-5-4, and define the externally visible behaviour associated with their transfer. This standard specifies the protocol of the Type 4 fieldbus application layer, in conformance with the OSI Basic Reference Model (ISO/IEC 7498) and the OSI application layer structure (ISO/IEC 9545). This first edition and its companion parts of the IEC 61158-6 subseries cancel and replace IEC 61158-6:2003. This edition of this part constitutes a technical addition. This part and its Type 4 companion parts also cancel and replace IEC/PAS 62412, published in 2005. This edition of IEC 61158-6 includes the following significant changes from the previous edition:
- deletion of the former Type 6 fieldbus for lack of market relevance;
- addition of new types of fieldbuses;
- partition of part 6 of the third edition into multiple parts numbered -6-2, -6-3,... This bilingual version (2014-12) corresponds to the monolingual English version, published in 2007-12.

Réseaux de communication industriels - Spécifications des bus de terrain - Partie 6-4: Spécification des protocoles des couches d'application - Eléments de type 4

L'IEC 61158-6-4:2007 vise à définir le protocole mis en place pour définir la représentation filaire des primitives de service définies dans la norme CEI 61158-5-4, et définir le comportement visible de l'extérieur associé à leur transfert. La présente norme spécifie le protocole de la couche Application de bus de terrain de Type 4, en conformité avec le modèle de référence de base OSI (ISO/CEI 7498) et avec la structure de la couche Application OSI (ISO/CEI 9545). Cette première édition et les parties qui l'accompagnent de la sous-série CEI 61158-6 annulent et remplacent la CEI 61158-6:2003. L'édition de la présente partie constitue un ajout technique. La présente partie et les parties de type 4 qui l'accompagnent annulent et remplacent également la CEI/PAS 62412 publiée en 2005. Cette édition de la CEI 61158-6 inclut les modifications majeures suivantes par rapport à l'édition précédente:
- suppression du bus de terrain de type 6 précédent pour défaut de pertinence de commercialisation;
- ajout de nouveaux types de bus de terrain;
- fractionnement de la partie 6 de la troisième édition en plusieurs parties numérotées -6-2, -6-3,.. La présente version bilingue (2014-12) correspond à la version anglaise monolingue publiée en 2007-12.

General Information

Status
Published
Publication Date
13-Dec-2007
Technical Committee
Drafting Committee
Current Stage
DELPUB - Deleted Publication
Start Date
19-Aug-2014
Completion Date
26-Oct-2025
Ref Project

Relations

Overview

IEC 61158-6-4:2007 - "Industrial communication networks – Fieldbus specifications – Part 6-4: Application layer protocol specification – Type 4 elements" defines the application-layer protocol for Type 4 fieldbus systems. Aligned with the OSI Basic Reference Model (ISO/IEC 7498) and the OSI application layer structure (ISO/IEC 9545), it specifies the wire representation of the service primitives defined in IEC 61158-5-4 and the externally visible behaviour when those primitives are exchanged. This part is part of the IEC 61158 fieldbus series and replaces previous editions (including IEC 61158-6:2003 and IEC/PAS 62412).

Key topics and technical requirements

The standard is focused on practical protocol rules and includes detailed specifications for:

  • FAL syntax and APDU structure - abstract and transfer syntax for Fieldbus Application Layer (FAL) PDUs, including APDU header and body formats.
  • APDU encoding and variable object encoding - transfer syntaxes, packing rules, and data-field formats for arrays and structures.
  • Protocol state machines - behavior and state transitions for application protocol contexts (AP-context), FAL Service Protocol Machine (FSPM), Application Relationship Protocol Machine (ARPM), and Data-Link Layer Mapping Protocol Machine (DLPM).
  • Primitives and interactions - defined primitives exchanged between FAL User, FSPM, ARPM and the data-link layer; constraints and actions for request/response, send/acknowledge primitives.
  • Error handling and codes - standardized error codes and externally visible error behaviour.
  • Protocol options and mapping - guidance for selecting and mapping data-link services and handling protocol options for Type 4 implementations.

Applications and who uses it

IEC 61158-6-4 is intended for anyone implementing or integrating Type 4 fieldbus application layer functionality:

  • Protocol stack implementers - developers building FAL stacks for controllers, gateways, I/O modules.
  • Device manufacturers - vendors of PLCs, sensors, actuators and embedded devices that must interoperate on Type 4 fieldbuses.
  • System integrators and OEMs - teams specifying communication behaviour and ensuring cross-vendor interoperability.
  • Test labs and certification bodies - organizations validating conformance to application-layer behaviour and APDU formats.
  • Automation architects - engineers mapping application requirements to data-link layer services and designing robust error handling.

Practical uses include implementing APDU encoding, defining variable object formats, implementing the FSPM/ARPM/DLPM state machines, and ensuring consistent application-layer behaviour across devices in industrial automation networks.

Related standards

  • IEC 61158 series (Fieldbus specifications)
  • IEC 61158-5-4 (service primitives referenced by this part)
  • IEC/TR 61158-1 (fieldbus reference model)
  • ISO/IEC 7498 and ISO/IEC 9545 (OSI reference and application layer structure)
  • IEC 61784 (type combinations and intellectual property guidance)

Keywords: IEC 61158-6-4, Type 4 fieldbus, fieldbus application layer, FAL, APDU encoding, FSPM, ARPM, DLPM, industrial communication networks.

Standard
IEC 61158-6-4:2007 - Industrial communication networks - Fieldbus specifications - Part 6-4: Application layer protocol specification - Type 4 elements Released:12/14/2007 Isbn:283189476X
English language
36 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
IEC 61158-6-4:2007 - Industrial communication networks - Fieldbus specifications - Part 6-4: Application layer protocol specification - Type 4 elements Released:12/14/2007 Isbn:9782832219461
English and French language
75 pages
sale 15% off
Preview
sale 15% off
Preview

Frequently Asked Questions

IEC 61158-6-4:2007 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:2007 defines the protocol provided to define the wire-representation of the service primitives defined in IEC 61158-5-4, and define the externally visible behaviour associated with their transfer. This standard specifies the protocol of the Type 4 fieldbus application layer, in conformance with the OSI Basic Reference Model (ISO/IEC 7498) and the OSI application layer structure (ISO/IEC 9545). This first edition and its companion parts of the IEC 61158-6 subseries cancel and replace IEC 61158-6:2003. This edition of this part constitutes a technical addition. This part and its Type 4 companion parts also cancel and replace IEC/PAS 62412, published in 2005. This edition of IEC 61158-6 includes the following significant changes from the previous edition: - deletion of the former Type 6 fieldbus for lack of market relevance; - addition of new types of fieldbuses; - partition of part 6 of the third edition into multiple parts numbered -6-2, -6-3,... This bilingual version (2014-12) corresponds to the monolingual English version, published in 2007-12.

IEC 61158-6-4:2007 defines the protocol provided to define the wire-representation of the service primitives defined in IEC 61158-5-4, and define the externally visible behaviour associated with their transfer. This standard specifies the protocol of the Type 4 fieldbus application layer, in conformance with the OSI Basic Reference Model (ISO/IEC 7498) and the OSI application layer structure (ISO/IEC 9545). This first edition and its companion parts of the IEC 61158-6 subseries cancel and replace IEC 61158-6:2003. This edition of this part constitutes a technical addition. This part and its Type 4 companion parts also cancel and replace IEC/PAS 62412, published in 2005. This edition of IEC 61158-6 includes the following significant changes from the previous edition: - deletion of the former Type 6 fieldbus for lack of market relevance; - addition of new types of fieldbuses; - partition of part 6 of the third edition into multiple parts numbered -6-2, -6-3,... This bilingual version (2014-12) corresponds to the monolingual English version, published in 2007-12.

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

IEC 61158-6-4:2007 has the following relationships with other standards: It is inter standard links to IEC 61158-6:2003, IEC PAS 62412:2005, IEC 61158-6:2003/COR1:2004, 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:2007 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.

Standards Content (Sample)


IEC 61158-6-4
Edition 1.0 2007-12
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
3, rue de Varembé
CH-1211 Geneva 20
Switzerland
Email: inmail@iec.ch
Web: www.iec.ch
About the IEC
The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
International Standards for all electrical, electronic and related technologies.

About IEC publications
The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
latest edition, a corrigenda or an amendment might have been published.
ƒ Catalogue of IEC publications: www.iec.ch/searchpub
The IEC on-line Catalogue enables you to search by a variety of criteria (reference number, text, technical committee,…).
It also gives information on projects, withdrawn and replaced publications.
ƒ IEC Just Published: www.iec.ch/online_news/justpub
Stay up to date on all new IEC publications. Just Published details twice a month all new publications released. Available
on-line and also by email.
ƒ Electropedia: www.electropedia.org
The world's leading online dictionary of electronic and electrical terms containing more than 20 000 terms and definitions
in English and French, with equivalent terms in additional languages. Also known as the International Electrotechnical
Vocabulary online.
ƒ Customer Service Centre: www.iec.ch/webstore/custserv
If you wish to give us your feedback on this publication or need further assistance, please visit the Customer Service
Centre FAQ or contact us:
Email: csc@iec.ch
Tel.: +41 22 919 02 11
Fax: +41 22 919 03 00
IEC 61158-6-4
Edition 1.0 2007-12
INTERNATIONAL
STANDARD
Industrial communication networks – Fieldbus specifications –
Part 6-4: Application layer protocol specification – Type 4 elements

INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
PRICE CODE
W
ICS 35.100.70; 25.040.40 ISBN 2-8318-9476-X

– 2 – 61158-6-4 © IEC:2007(E)
CONTENTS
FOREWORD.5
INTRODUCTION.7
1 Scope.8
1.1 General .8
1.2 Specifications.8
1.3 Conformance.8
2 Normative references .9
3 Terms, definitions, symbols, abbreviations and conventions .10
3.1 Referenced terms and definitions .10
3.2 Abbreviations and symbols.11
3.3 Conventions .11
4 FAL syntax description .13
4.1 FAL-AR PDU abstract syntax .13
4.2 Data types.15
5 Transfer syntaxes.15
5.1 APDU encoding.15
5.2 Variable object encoding and packing .19
5.3 Error codes .22
6 FAL protocol state machines .22
7 AP-context state machine.23
8 FAL service protocol machine (FSPM).24
8.1 Primitives exchanged between FAL User and FSPM .24
8.2 FSPM states.24
9 Application relationship protocol machine (ARPM).30
9.1 Primitives exchanged between ARPM and FSPM .30
9.2 ARPM States.30
10 DLL mapping protocol machine (DMPM).32
10.1 Data-link Layer service selection .32
10.2 Primitives exchanged between ARPM and DLPM .32
10.3 Primitives exchanged between DLPM and data-link layer .33
10.4 DLPM states.33
11 Protocol options .35
Bibliography.36

Figure 1 – State transition diagram .12
Figure 2 – APDU header structure .16
Figure 3 – Instruction subfield of ControlStatus.16
Figure 4 – Errorcode subfield of ControlStatus.16
Figure 5 – Remaining subfields of ControlStatus.17
Figure 6 – DataFieldFormat encoding .17
Figure 7 – Structure of request APDU body .17
Figure 8 – Structure of response APDU body.18
Figure 9 – Variable identifier.18

61158-6-4 © IEC:2007(E) – 3 –
Figure 10 – Code subfield of variable identifier .18
Figure 11 – Summary of FAL architecture .23
Figure 12 – FSPM proxy object state machine .25
Figure 13 – FSPM real object state machine.29
Figure 14 – ARPM state machine.30
Figure 15 – DLPM state machine .33

Table 1 – State machine description elements .12
Table 2 – APDU header .13
Table 3 – APDU body .14
Table 4 – Transfer syntax for Array.20
Table 5 – Transfer syntax for Structure .21
Table 6 – Common variable object attributes .21
Table 7 – Variable type identifiers.21
Table 8 – FIFO variable object attributes .22
Table 9 – Error codes .22
Table 10 – Primitives exchanged between FAL-User and FSPM .24
Table 11 – REQUEST.req FSPM constraints.25
Table 12 – REQUEST.req FSPM actions .26
Table 13 – RESPONSE.cnf FSPM constraints .27
Table 14 – RESPONSE.cnf FSPM actions .28
Table 15 – AR Send.ind proxy FSPM constraints .28
Table 16 – AR Send.ind proxy FSPM actions .28
Table 17 – AR Send.ind real FSPM constraints.29
Table 18 – AR Send.ind real FSPM Actions .29
Table 19 – Primitives issued by FSPM to ARPM .30
Table 20 – Primitives issued by ARPM to FSPM .30
Table 21 – Primitives issued by ARPM to ARPM .30
Table 22 – AR Send.req ARPM constraints.31
Table 23 – AR Send.req ARPM actions.31
Table 24 – AR Acknowledge.req ARPM constraints .31
Table 25 – AR Acknowledge.req ARPM actions .31
Table 26 – AR Send.ind ARPM constraints .31
Table 27 – AR Send.req ARPM actions.32
Table 28 – Primitives issued by ARPM to DLPM .33
Table 29 – Primitives issued by DLPM to ARPM .33
Table 30 – Primitives issued by DLPM to data-link layer .33
Table 31 – Primitives issued by data-link layer to DLPM .33
Table 32 – AR Send.req DLPM constraints .34
Table 33 – AR Send.req DLPM actions .34
Table 34 – AR Acknowledge.req DLPM constraints.34
Table 35 – AR Acknowledge.req DLPM actions.34
Table 36 – DL-UNITDATA.ind DLPM constraints.35

– 4 – 61158-6-4 © IEC:2007(E)
Table 37 – DL-UNITDATA.ind DLPM actions.35

61158-6-4 © IEC:2007(E) – 5 –
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 provides no marking procedure to indicate its approval and cannot be rendered responsible for any
equipment declared to be in conformity with an IEC Publication.
6) All users should ensure that they have the latest edition of this publication.
7) No liability shall attach to IEC or its directors, employees, servants or agents including individual experts and
members of its technical committees and IEC National Committees for any personal injury, property damage or
other damage of any nature 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.
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 IEC 61784 series. Use of the various protocol types in other
combinations may require permission of their respective intellectual-property-right holders.
International Standard IEC 61158-6-4 has been prepared by subcommittee 65C: Industrial
networks, of IEC technical committee 65: Industrial-process measurement, control and
automation.
This first edition and its companion parts of the IEC 61158-6 subseries cancel and replace
IEC 61158-6:2003. This edition of this part constitutes a technical addition. This part and its
Type 4 companion parts also cancel and replace IEC/PAS 62412, published in 2005.
This edition of IEC 61158-6 includes the following significant changes from the previous
edition:
a) deletion of the former Type 6 fieldbus for lack of market relevance;
b) addition of new types of fieldbuses;
c) partition of part 6 of the third edition into multiple parts numbered -6-2, -6-3, …

– 6 – 61158-6-4 © IEC:2007(E)
The text of this standard is based on the following documents:
FDIS Report on voting
65C/476/FDIS 65C/487/RVD
Full information on the voting for the approval of this standard can be found in the report on
voting indicated in the above table.
This publication has been drafted in accordance with ISO/IEC Directives, Part 2.
The committee has decided that the contents of this publication will remain unchanged until
the maintenance result 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.
NOTE  The revision of this standard will be synchronized with the other parts of the IEC 61158 series.
The 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.

61158-6-4 © IEC:2007(E) – 7 –
INTRODUCTION
This part of IEC 61158 is one of a series produced to facilitate the interconnection of
automation system components. It is related to other standards in the set as defined by the
“three-layer” fieldbus reference model described in IEC/TR 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 standard
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 standard is concerned, in particular, with the communication and interworking of sensors,
effectors and other automation devices. By using this standard together with other standards
positioned within the OSI or fieldbus reference models, otherwise incompatible systems may
work together in any combination.

– 8 – 61158-6-4 © IEC:2007(E)
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 standard 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 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 standard 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 standard specifies the protocol of the Type 4 fieldbus application layer, in conformance
with the OSI Basic Reference Model (ISO/IEC 7498) and the OSI application layer structure
(ISO/IEC 9545).
1.2 Specifications
The principal objective of this standard 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.
1.3 Conformance
This standard do not specify individual implementations or products, nor do they constrain the
implementations of application layer entities within industrial automation systems.

61158-6-4 © IEC:2007(E) – 9 –
Conformance is achieved through implementation of this application layer protocol
specification.
2 Normative references
The following referenced documents are indispensable for the application 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.
IEC 61158-3-4, Industrial communication networks – Fieldbus specifications – Part 3-4: Data-
link layer service definition – Type 4 elements
IEC 61158-4-4, Industrial communication networks – Fieldbus specifications – Part 4-4: Data-
link layer protocol specification – Type 4 elements
IEC 61158-5-4, Industrial communication networks – Fieldbus specifications – Part 5-4:
Application layer service definition – Type 4 elements
ISO/IEC 10731, Information technology – Open Systems Interconnection – Basic Reference
Model – Conventions for the definition of OSI services
ISO/IEC 7498-1, Information technology – Open Systems Interconnection – Basic Reference
Model – Part1: The Basic Model
ISO/IEC 8822, Information technology – Open Systems Interconnection – Presentation
service definition
ISO/IEC 8824, Information technology – Open Systems Interconnection – Specification of
Abstract Syntax Notation One (ASN.1)
ISO/IEC 9545, Information technology – Open Systems Interconnection – Application Layer
structure
– 10 – 61158-6-4 © IEC:2007(E)
3 Terms, definitions, symbols, abbreviations and conventions
For the purposes of this document, the following definitions apply.
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 terms
For the purposes of this document, the following terms as defined in ISO/IEC 8824 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
61158-6-4 © IEC:2007(E) – 11 –
b) DL-Scheduling-policy
c) DLCEP
d) DLC
e) DL-connection-oriented mode
f) DLPDU
g) DLSDU
h) DLSAP
m) network address
n) node address
o) node
3.2 Abbreviations and symbols
Application Entity
AE
Application Layer
AL
Application Layer Entity
ALE
Application Protocol Data Unit
APDU
Application Relationship
AR
Application Relationship End Point
AREP
Application Service Element
ASE
Confirmation
Cnf
(as a prefix) Data-link-
DL-
Data-link Connection End Point
DLCEP
Data-link Layer
DLL
Data-link Entity
DLE
Data-link-management
DLM
Data-link Service
DLS
Data-link Service Access Point
DLSAP
DL-service-data-unit
DLSDU
FAL Management Entity
FME
Indication
Ind
Internet Protocol
IP
Protocol Data Unit
PDU
Request
Req
Response
Rsp
System Management Entity
SME
Confirm Primitive
.cnf
Indication Primitive
.ind
Request Primitive
.req
Response Primitive
.rsp
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 standard.

– 12 – 61158-6-4 © IEC:2007(E)
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 standard. The service specification defines the services that are
provided by the ASE.
This standard 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 (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
Current transaction
# 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 The actions that are taken when the above events
transition or
applies 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.
61158-6-4 © IEC:2007(E) – 13 –
&& 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
Write
Read
And
Or
Test-And-Set
Segmented Read
Segmented Write
ControlStatus Errorcode Described in Figure ControlStatus.Instruction
3 to Figure 5 = Errorcode
ControlStatus Addressing method Variable Object ControlStatus.Instruction
<> Errorcode
Flat
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
– 14 – 61158-6-4 © IEC:2007(E)
Field name Subfield name Possible values Constraint (present if) Comment
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 Integer16 APDU is a response Indicates the size of the
size 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-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.The
Complex 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 - +32 767 APDU is a request
APDU AND
DataFieldFormat.Variabl
e Identifier Format =
Simple
VariableIdentifier ID -8 388 608 – APDU is a request
APDU AND
+8 388 607
DataFieldFormat.Variabl
e Identifier Format =
Complex
61158-6-4 © IEC:2007(E) – 15 –
Field name Subfield name Possible values Constraint (present if) Comment
Offset/Attribute -32 768 - +32 767 APDU is a request Negative values select
APDU AND attribute, positive
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
VariableIdentifier.Code.
Offset/Attribute size =
Integer16
Offset/Attribute -2 147 483 648 - 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
Offset/Attribute -32 768 - +32 767 APDU is a response Negative values select
APDU AND attribute, positive
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
DataFieldFormat.Offset/
Attribute size= Integer16
Offset/Attribute -2 147 483 648 - 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
RequestedLength 0-65 535 APDU is a request Indicates the length of
APDU AND data to Read, as the
ControlStatus.Instruction number of octets
indicates Read OR
Segmented Read
Sequence 0-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
Read OR Segmented transfer.
Write
4.2 Data types
The notation for data types is the same as IEC 61158 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. This subclause describes the
encoding of the header. The APDU header consists of three fields, as shown in Figure 2.

– 16 – 61158-6-4 © IEC:2007(E)
One octet        One octet  4 octets
ControlStatus DataFieldFormat DataLength

Figure 2 – APDU header structure
5.1.1.2 ControlStatus
ControlStatus is coded into one octet. The interpretation of this octet depends on the
instruction subfield. The coding of the instruction subfield is shown in Figure 3.
8 7 6 5 4 3 2 1
000 Errorcode
001 Store
010 Load
011 And
100 Or
101 Test-And-Set
110 Segmented Load
111 Segmented Store
Figure 3 – Instruction subfield of ControlStatus
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
= 0 00 ( = Errorcode)
00000 No response
00001 Time out
00011 Wait too long
00100 FIFO full or empty
00101 Data fo rmat error
00110 Variable Object ID e rror
00111 Route error
01000 Write p rotection
01001 Info lengt h 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
Figure 4 – Errorcode subfield of ControlStatus
If the instruction is <> 000 (<> Errorcode), the remaining five bits of ControlStatus holds the
subfields addressing method, ActualDataError and HistoricalDataError. The coding of these
fields is shown in Figure 5.
61158-6-4 © IEC:2007(E) – 17 –
8 7 6 5 4 3 2 1
<> 000 (<> Errorcode)
Addressing method
0: Variable object
1: Flat
ActualDataError
0: No ActualError
1: Actua lError
HistoricalDataError
0: No HistoricalError
1: HistoricalErr or
Figure 5 – Remaining subfields of ControlStatus
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: Off set/Att ribute
Varia ble I dentifi er Format
0: Simpl e
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. This subclause describes the
encoding. The interpretation of the APDU Body is indicated by the APDU header.
A request APDU body may consist of up to four of five possible fields, as shown in Figure 7.
2 or 4 octets     0, 2 or 4 octets    0 – Max PDU size octets  0-2 octets       0 or 1 octet
Var iable I dentifi er Offset/Attribute Data RequestedLength Sequence

Figure 7 – Structure of request APDU body
A response APDU body may consist of up to two fields, as shown in Figure 8.

– 18 – 61158-6-4 © IEC:2007(E)
0, 2 or 4 octets 0 – Max PDU size octets
Offset/Attribute Data
Figure 8 – Structure of response APDU body
5.1.2.2 Variable identifier
The Variable Identifier can be either simple or complex. If it is simple, it consists of only one
subfield, ID, which is of type Integer16. If it is complex, it consists of two subfields, code (1
octet) and ID (3 octets) as shown in Figure 9.
1 octets    3 octets
Code ID
Figure 9 – Variable identifier
The coding of the Code subfield of the variable identifier is shown in Figure 10.
8 7 6 5 4 3 2 1
Bit-no (0-7)
Don't care
Offset/Attribute size
0: Integer16
1: Integer32
Bitaddressing
0: No BitAddressing
1:BitAddressing
Figure 10 – Code subfield of variable identifier
5.1.2.3 Offset/attribute
The Offset/Attribute subfield of the APDU body may or may not be present. If present,
Offset/Attribute is an Integer16 or an Integer32. A negative value selects an attribute of the
Variable object. A positive value selects a part of the data value of the Variable object, by
indicating the offset in octets to the starting octet of the data block to be transferred, relative
to the first octet of the variable.
5.1.2.4 RequestedLength
The RequestedLength subfield may or may not be present.
If the APDU is a request APDU, and the ControlStatus.Instruction subfield of the APDU
Header indicates Read or Segmented Read, the RequestedLength subfield is present. It
indicates the octet length of the requested data or attribute.
The RequestedLength subfield is an Unsigned8 or an Unsigned16. As there is no Data
subfield in the APDU if there is a RequestedLength subfield, the size of RequestedLength is
implicitly given by the DataLength parameter. If the value of RequestedLength is less than
256, RequestedLength shall be of type Unsigned8.

61158-6-4 © IEC:2007(E) – 19 –
5.1.2.5 Data
The Data subfield of the APDU body holds either:
a) Data, coded and packed as described in 5.2, or
b) an attribute of a variable object, coded and packed as described in 5.2.
As there is no RequestedLength subfield in the APDU if there is a Data subfield, the size of
the data subfield is implicitly given by the DataLength parameter.
5.1.2.6 Sequence
The Sequence subfield is one octet, with the following legal values.
0: Indicating, that this is the first request of a segmented Read or Write.
1: Indicating, that this is one of the following requests of a segmented Read or Write.
2: Indicating, that this is the last request of a segmented Read or Write.
5.2 Variable object encoding and packing
5.2.1 Encoding of simple variables
5.2.1.1 Encoding of a Boolean value
a) The encoding of a boolean value shall be primitive. The ContentsOctets shall consist of a
single octet.
b) If the boolean value is FALSE, bit 1 of the ContentsOctets shall be 0 (zero). If the boolean
value is TRUE, bit 1 of the ContentsOctets shall be 1 (one).
5.2.1.2 Encoding of an Integer value
As defined in Type 1, Transfer syntax 1, Encoding of an Integer Value.
5.2.1.3 Encoding of an Unsigned value
As defined in Type 1, Transfer syntax 1, Encoding of an Unsigned Value, types Unsigned8
and Unsigned 16.
5.2.1.4 Encoding of a Floating Point value
As defined in Type 1, Transfer syntax 1, Encoding of a Floating-Point Value.
5.2.2 Encoding of constructed variables
5.2.2.1 Encoding of a String value
a) The encoding of a variable length String value shall be primitive.
b) The Length field shall indicate as a binary number the number of elements in the String
value.
c) The Length field shall be in the first octet.
5.2.2.2 Encoding of a BitString value
a) The encoding of a BitString value shall be primitive.
b) There is no Length field in the BitString.
c) The value of the BitString, commencing with the first bit and proceeding to the trailing bit,
shall be placed in bits 1 to 8 of the first octet, followed by bits 1 to 8 of the second octet,
followed by bits 1 to 8 of each octet up to and including the last octet of the
ContentsOctets.
– 20 – 61158-6-4 © IEC:2007(E)
d) Unused bits, if any, shall be placed in bits 2-8 of the last octet.
5.2.3 Alignment
5.2.3.1 General
This section describes, how fields and elements of constructed variables are aligned and
transferred.
The general alignment is two.
• Fields and elements of basic type, and with a size of 1 octet, shall be transferred
immediately after the previous field or element.
• Fields and elements with a size of more that 1 octet, shall be transferred with an even
offset relative to the first octet of the constructed variable.
• Fields and elements of constructed type shall be transferred with an even offset relative to
the first octet of the constructed variable.
5.2.3.2 Array elements transfer syntax
Table 4 shows an example of transfer syntax for a variable "ArrayVar" of type
ARRAY[1.2] of ARRAY[1.3] of Integer8.
Table 4 – Transfer syntax for Array
1. octet ArrayVar[1,1]
2. octet ArrayVar[1,2]
3. octet ArrayVar[1,3]
4. octet ArrayVar[2,1]
5. octet ArrayVar[2,2]
6. octet ArrayVar[2,3]
5.2.3.3 Structure fields transfer syntax
Table 5 shows an example of transfer syntax for a variable "StructVar" of type
STRUCTURE
Field1: Integer8;
Field2: STRUCTURE
Sub1: Integer16;
Sub2: BitString[8];
END;
Field3: Integer8;
Field4: BitString[8];
Field5: Integer8;
END;
61158-6-4 © IEC:2007(E) – 21 –
Table 5 – Transfer syntax for Structure
1. octet StructVar.Field1
2. octet Dummy
3. octet StructVar.Field2.Sub1, Most significant octet
4. octet StructVar. Field2.Sub1, Least significant octet
5. octet StructVar.Field2.Sub2
6. octet StructVar.Dummy
7. octet StructVar.Field3
8. octet StructVar.Dummy
9. octet StructVar.Field4
10. octet StructVar.Field5
5.2.4 Variable object attributes
All variable objects may have the optional attributes defined in
...


IEC 61158-6-4 ®
Edition 1.0 2007-12
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 des protocoles des couches d'application –
Élé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é Fax: +41 22 919 03 00
CH-1211 Geneva 20 info@iec.ch
Switzerland www.iec.ch
About the IEC
The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
International Standards for all electrical, electronic and related technologies.

About IEC publications
The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
latest edition, a corrigenda or an amendment might have been published.

IEC Catalogue - webstore.iec.ch/catalogue Electropedia - www.electropedia.org
The stand-alone application for consulting the entire The world's leading online dictionary of electronic and
bibliographical information on IEC International Standards, electrical terms containing more than 30 000 terms and
Technical Specifications, Technical Reports and other definitions in English and French, with equivalent terms in 14
documents. Available for PC, Mac OS, Android Tablets and additional languages. Also known as the International
iPad. Electrotechnical Vocabulary (IEV) online.

IEC publications search - www.iec.ch/searchpub IEC Glossary - std.iec.ch/glossary
The advanced search enables to find IEC publications by a More than 55 000 electrotechnical terminology entries in
variety of criteria (reference number, text, technical English and French extracted from the Terms and Definitions
committee,…). It also gives information on projects, replaced clause of IEC publications issued since 2002. Some entries
and withdrawn publications. have been collected from earlier publications of IEC TC 37,

77, 86 and CISPR.
IEC Just Published - webstore.iec.ch/justpublished
Stay up to date on all new IEC publications. Just Published IEC Customer Service Centre - webstore.iec.ch/csc
details all new publications released. Available online and If you wish to give us your feedback on this publication or
also once a month by email. need further assistance, please contact the Customer Service
Centre: csc@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é.

Catalogue IEC - webstore.iec.ch/catalogue Electropedia - www.electropedia.org
Application autonome pour consulter tous les renseignements
Le premier dictionnaire en ligne de termes électroniques et
bibliographiques sur les Normes internationales,
électriques. Il contient plus de 30 000 termes et définitions en
Spécifications techniques, Rapports techniques et autres
anglais et en français, ainsi que les termes équivalents dans
documents de l'IEC. Disponible pour PC, Mac OS, tablettes
14 langues additionnelles. Egalement appelé Vocabulaire
Android et iPad.
Electrotechnique International (IEV) en ligne.

Recherche de publications IEC - www.iec.ch/searchpub
Glossaire IEC - std.iec.ch/glossary
Plus de 55 000 entrées terminologiques électrotechniques, en
La recherche avancée permet de trouver des publications IEC
en utilisant différents critères (numéro de référence, texte, anglais et en français, extraites des articles Termes et
comité d’études,…). Elle donne aussi des informations sur les Définitions des publications IEC parues depuis 2002. Plus
projets et les publications remplacées ou retirées. certaines entrées antérieures extraites des publications des

CE 37, 77, 86 et CISPR de l'IEC.
IEC Just Published - webstore.iec.ch/justpublished

Service Clients - webstore.iec.ch/csc
Restez informé sur les nouvelles publications IEC. Just
Published détaille les nouvelles publications parues. Si vous désirez nous donner des commentaires sur cette
Disponible en ligne et aussi une fois par mois par email. publication ou si vous avez des questions contactez-nous:
csc@iec.ch.
IEC 61158-6-4 ®
Edition 1.0 2007-12
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 des protocoles des couches d'application –

Éléments de Type 4
INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
COMMISSION
ELECTROTECHNIQUE
PRICE CODE
INTERNATIONALE
CODE PRIX W
ICS 25.040.40; 35.100.70 ISBN 978-2-8322-1946-1

– 2 – IEC 61158-6-4:2007 © IEC 2007
CONTENTS
FOREWORD . 5
INTRODUCTION . 7
1 Scope . 8
1.1 General . 8
1.2 Specifications . 8
1.3 Conformance . 8
2 Normative references . 9
3 Terms, definitions, symbols, abbreviations and conventions . 10
3.1 Referenced terms and definitions . 10
3.2 Abbreviations and symbols . 11
3.3 Conventions . 11
4 FAL syntax description . 13
4.1 FAL-AR PDU abstract syntax . 13
4.2 Data types . 15
5 Transfer syntaxes . 15
5.1 APDU encoding . 15
5.2 Variable object encoding and packing . 19
5.3 Error codes . 22
6 FAL protocol state machines . 22
7 AP-context state machine . 23
8 FAL service protocol machine (FSPM) . 24
8.1 Primitives exchanged between FAL User and FSPM . 24
8.2 FSPM states . 24
9 Application relationship protocol machine (ARPM) . 30
9.1 Primitives exchanged between ARPM and FSPM . 30
9.2 ARPM States . 30
10 DLL mapping protocol machine (DMPM) . 32
10.1 Data-link Layer service selection . 32
10.2 Primitives exchanged between ARPM and DLPM . 32
10.3 Primitives exchanged between DLPM and data-link layer . 33
10.4 DLPM states . 33
11 Protocol options . 35
Bibliography . 36

Figure 1 – State transition diagram . 12
Figure 2 – APDU header structure . 16
Figure 3 – Instruction subfield of ControlStatus . 16
Figure 4 – Errorcode subfield of ControlStatus . 16
Figure 5 – Remaining subfields of ControlStatus . 17
Figure 6 – DataFieldFormat encoding . 17
Figure 7 – Structure of request APDU body . 17
Figure 8 – Structure of response APDU body . 18
Figure 9 – Variable identifier . 18

Figure 10 – Code subfield of variable identifier . 18
Figure 11 – Summary of FAL architecture . 23
Figure 12 – FSPM proxy object state machine . 25
Figure 13 – FSPM real object state machine . 29
Figure 14 – ARPM state machine . 30
Figure 15 – DLPM state machine . 33

Table 1 – State machine description elements . 12
Table 2 – APDU header . 13
Table 3 – APDU body . 14
Table 4 – Transfer syntax for Array . 20
Table 5 – Transfer syntax for Structure . 21
Table 6 – Common variable object attributes . 21
Table 7 – Variable type identifiers . 21
Table 8 – FIFO variable object attributes . 22
Table 9 – Error codes . 22
Table 10 – Primitives exchanged between FAL-User and FSPM . 24
Table 11 – REQUEST.req FSPM constraints . 25
Table 12 – REQUEST.req FSPM actions . 26
Table 13 – RESPONSE.cnf FSPM constraints . 27
Table 14 – RESPONSE.cnf FSPM actions . 28
Table 15 – AR Send.ind proxy FSPM constraints . 28
Table 16 – AR Send.ind proxy FSPM actions . 28
Table 17 – AR Send.ind real FSPM constraints . 29
Table 18 – AR Send.ind real FSPM Actions . 29
Table 19 – Primitives issued by FSPM to ARPM . 30
Table 20 – Primitives issued by ARPM to FSPM . 30
Table 21 – Primitives issued by ARPM to ARPM . 30
Table 22 – AR Send.req ARPM constraints . 31
Table 23 – AR Send.req ARPM actions . 31
Table 24 – AR Acknowledge.req ARPM constraints . 31
Table 25 – AR Acknowledge.req ARPM actions . 31
Table 26 – AR Send.ind ARPM constraints . 31
Table 27 – AR Send.req ARPM actions . 32
Table 28 – Primitives issued by ARPM to DLPM . 33
Table 29 – Primitives issued by DLPM to ARPM . 33
Table 30 – Primitives issued by DLPM to data-link layer . 33
Table 31 – Primitives issued by data-link layer to DLPM . 33
Table 32 – AR Send.req DLPM constraints . 34
Table 33 – AR Send.req DLPM actions . 34
Table 34 – AR Acknowledge.req DLPM constraints . 34
Table 35 – AR Acknowledge.req DLPM actions . 34
Table 36 – DL-UNITDATA.ind DLPM constraints . 35

– 4 – IEC 61158-6-4:2007 © IEC 2007
Table 37 – DL-UNITDATA.ind DLPM actions . 35

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 provides no marking procedure to indicate its approval and cannot be rendered responsible for any
equipment declared to be in conformity with an IEC Publication.
6) All users should ensure that they have the latest edition of this publication.
7) No liability shall attach to IEC or its directors, employees, servants or agents including individual experts and
members of its technical committees and IEC National Committees for any personal injury, property damage or
other damage of any nature 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.
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 IEC 61784 series. Use of the various protocol types in other
combinations may require permission of their respective intellectual-property-right holders.
International Standard IEC 61158-6-4 has been prepared by subcommittee 65C: Industrial
networks, of IEC technical committee 65: Industrial-process measurement, control and
automation.
This first edition and its companion parts of the IEC 61158-6 subseries cancel and replace
IEC 61158-6:2003. This edition of this part constitutes a technical addition. This part and its
Type 4 companion parts also cancel and replace IEC/PAS 62412, published in 2005.
This edition of IEC 61158-6 includes the following significant changes from the previous
edition:
a) deletion of the former Type 6 fieldbus for lack of market relevance;
b) addition of new types of fieldbuses;
c) partition of part 6 of the third edition into multiple parts numbered -6-2, -6-3, …

– 6 – IEC 61158-6-4:2007 © IEC 2007
This bilingual version (2014-12) corresponds to the monolingual English version, published in
2007-12.
The text of this standard is based on the following documents:
FDIS Report on voting
65C/476/FDIS 65C/487/RVD
Full information on the voting for the approval of this standard can be found in the report on
voting indicated in the above table.
The French version of this standard has not been voted upon.
This publication has been drafted in accordance with ISO/IEC Directives, Part 2.
The committee has decided that the contents of this publication will remain unchanged until
the maintenance result 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.
NOTE  The revision of this standard will be synchronized with the other parts of the IEC 61158 series.
The 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.

INTRODUCTION
This part of IEC 61158 is one of a series produced to facilitate the interconnection of
automation system components. It is related to other standards in the set as defined by the
“three-layer” fieldbus reference model described in IEC/TR 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 standard
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 standard is concerned, in particular, with the communication and interworking of sensors,
effectors and other automation devices. By using this standard 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:2007 © IEC 2007
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 standard 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 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 standard 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 standard specifies the protocol of the Type 4 fieldbus application layer, in conformance
with the OSI Basic Reference Model (ISO/IEC 7498) and the OSI application layer structure
(ISO/IEC 9545).
1.2 Specifications
The principal objective of this standard 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.
1.3 Conformance
This standard 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 referenced documents are indispensable for the application 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.
IEC 61158-3-4, Industrial communication networks – Fieldbus specifications – Part 3-4: Data-
link layer service definition – Type 4 elements
IEC 61158-4-4, Industrial communication networks – Fieldbus specifications – Part 4-4: Data-
link layer protocol specification – Type 4 elements
IEC 61158-5-4, Industrial communication networks – Fieldbus specifications – Part 5-4:
Application layer service definition – Type 4 elements
ISO/IEC 10731, Information technology – Open Systems Interconnection – Basic Reference
Model – Conventions for the definition of OSI services
ISO/IEC 7498-1, Information technology – Open Systems Interconnection – Basic Reference
Model – Part1: The Basic Model
ISO/IEC 8822, Information technology – Open Systems Interconnection – Presentation
service definition
ISO/IEC 8824, Information technology – Open Systems Interconnection – Specification of
Abstract Syntax Notation One (ASN.1)
ISO/IEC 9545, Information technology – Open Systems Interconnection – Application Layer
structure
– 10 – IEC 61158-6-4:2007 © IEC 2007
3 Terms, definitions, symbols, abbreviations and conventions
For the purposes of this document, the following definitions apply.
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 terms
For the purposes of this document, the following terms as defined in ISO/IEC 8824 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
m) network address
n) node address
o) node
3.2 Abbreviations and symbols
Application Entity
AE
Application Layer
AL
Application Layer Entity
ALE
Application Protocol Data Unit
APDU
Application Relationship
AR
Application Relationship End Point
AREP
Application Service Element
ASE
Confirmation
Cnf
(as a prefix) Data-link-
DL-
Data-link Connection End Point
DLCEP
Data-link Layer
DLL
DLE Data-link Entity
Data-link-management
DLM
Data-link Service
DLS
Data-link Service Access Point
DLSAP
DL-service-data-unit
DLSDU
FAL Management Entity
FME
Indication
Ind
Internet Protocol
IP
Protocol Data Unit
PDU
Request
Req
Response
Rsp
System Management Entity
SME
Confirm Primitive
.cnf
Indication Primitive
.ind
Request Primitive
.req
.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 standard.

– 12 – IEC 61158-6-4:2007 © IEC 2007
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 standard. The service specification defines the services that are
provided by the ASE.
This standard 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 (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
Current transaction
# 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 The actions that are taken when the above events
transition or
applies 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
Write
Read
And
Or
Test-And-Set
Segmented Read
Segmented Write
ControlStatus Errorcode Described in Figure ControlStatus.Instruction
3 to Figure 5 = Errorcode
ControlStatus Addressing method Variable Object ControlStatus.Instruction
<> Errorcode
Flat
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
– 14 – IEC 61158-6-4:2007 © IEC 2007
Field name Subfield name Possible values Constraint (present if) Comment
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 Integer16 APDU is a response Indicates the size of the
size 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-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.The
Complex 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 - +32 767 APDU is a request
APDU AND
DataFieldFormat.Variabl
e Identifier Format =
Simple
VariableIdentifier ID -8 388 608 – APDU is a request
APDU AND
+8 388 607
DataFieldFormat.Variabl
e Identifier Format =
Complex
Field name Subfield name Possible values Constraint (present if) Comment
Offset/Attribute -32 768 - +32 767 APDU is a request Negative values select
APDU AND attribute, positive
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
VariableIdentifier.Code.
Offset/Attribute size =
Integer16
Offset/Attribute -2 147 483 648 - 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
Offset/Attribute -32 768 - +32 767 APDU is a response Negative values select
APDU AND attribute, positive
DataFieldFormat.Offset/ values select part of
Attribute = constructed variable
Offset/Attribute AND
DataFieldFormat.Offset/
Attribute size= Integer16
Offset/Attribute -2 147 483 648 - 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
RequestedLength 0-65 535 APDU is a request Indicates the length of
APDU AND data to Read, as the
ControlStatus.Instruction number of octets
indicates Read OR
Segmented Read
Sequence 0-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
Read OR Segmented transfer.
Write
4.2 Data types
The notation for data types is the same as IEC 61158 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. This subclause describes the
encoding of the header. The APDU header consists of three fields, as shown in Figure 2.

– 16 – IEC 61158-6-4:2007 © IEC 2007
One octet         One octet         4 octets
ControlStatus DataFieldFormat DataLength

Figure 2 – APDU header structure
5.1.1.2 ControlStatus
ControlStatus is coded into one octet. The interpretation of this octet depends on the
instruction subfield. The coding of the instruction subfield is shown in Figure 3.
8 7 6 5 4 3 2 1
000 Errorcode
001 Store
010 Load
011 And
100 Or
101 Test-And-Set
110 Segmented Load
111 Segmented Store
Figure 3 – Instruction subfield of ControlStatus
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 Data format error
00110 Variable Object ID error
00111 Route error
01000 Wri te protection
01001 Info lengt h 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
Figure 4 – Errorcode subfield of ControlStatus
If the instruction is <> 000 (<> Errorcode), the remaining five bits of ControlStatus holds the
subfields addressing method, ActualDataError and HistoricalDataError. The coding of these
fields is shown in Figure 5.
8 7 6 5 4 3 2 1
<> 000 (<> Errorcode)
Addressing method
0: Variable object
1: Flat
ActualDataError
0: No ActualError
1: ActualError
HistoricalDataError
0: No HistoricalError
1: HistoricalError
Figure 5 – Remaining subfields of ControlStatus
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. This subclause describes the
encoding. The interpretation of the APDU Body is indicated by the APDU header.
A request APDU body may consist of up to four of five possible fields, as shown in Figure 7.
2 or 4 octets      0, 2 or 4 octets    0 – Max PDU size octets       0 - 2 octets        0 or 1 octet
Variable Identifier Offset/Attribute Data RequestedLength Sequence

Figure 7 – Structure of request APDU body
A response APDU body may consist of up to two fields, as shown in Figure 8.

– 18 – IEC 61158-6-4:2007 © IEC 2007
0, 2 or 4 octets    0 – Max PDU size octets
Offset/Attribute Data
Figure 8 – Structure of response APDU body
5.1.2.2 Variable identifier
The Variable Identifier can be either simple or complex. If it is simple, it consists of only one
subfield, ID, which is of type Integer16. If it is complex, it consists of two subfields, code (1
octet) and ID (3 octets) as shown in Figure 9.
1 octets             3 octets
Code ID
Figure 9 – Variable identifier
The coding of the Code subfield of the variable identifier is shown in Figure 10.
8 7 6 5 4 3 2 1
Bit-no (0-7)
Don't care
Offset/Attribute size
0: Integer16
1: Integer32
Bitaddressing
0: No BitAddressing
1: BitAddressing
Figure 10 – Code subfield of variable identifier
5.1.2.3 Offset/attribute
The Offset/Attribute subfield of the APDU body may or may not be present. If present,
Offset/Attribute is an Integer16 or an Integer32. A negative value selects an attribute of the
Variable object. A positive value selects a part of the data value of the Variable object, by
indicating the offset in octets to the starting octet of the data block to be transferred, relative
to the first octet of the variable.
5.1.2.4 RequestedLength
The RequestedLength subfield may or may not be present.
If the APDU is a request APDU, and the ControlStatus.Instruction subfield of the APDU
Header indicates Read or Segmented Read, the RequestedLength subfield is present. It
indicates the octet length of the requested data
...

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