IEC 61131-3:1993
(Main)Programmable controllers - Part 3: Programming languages
Programmable controllers - Part 3: Programming languages
Automates programmables - Partie 3: Langages de programmation
S'applique à la représentation imprimée et affichée, à l'aide des caractères ISO/CEI 646, des langages de programmation devant être utilisés pour les automates programmables. Spécifie la syntaxe et la sémantique.
General Information
- Status
- Published
- Publication Date
- 21-Mar-1993
- Technical Committee
- SC 65B - Measurement and control devices
- Drafting Committee
- WG 7 - TC 65/SC 65B/WG 7
- Current Stage
- DELPUB - Deleted Publication
- Start Date
- 22-Jan-2003
- Completion Date
- 26-Oct-2025
Relations
- Effective Date
- 05-Sep-2023
Overview
IEC 61131-3:1993 - "Programmable controllers - Part 3: Programming languages" is the international standard that specifies the programming languages, program organization, data types and software model used for programmable logic controllers (PLCs). Published by the IEC, this part of the IEC 61131 series defines both textual and graphical programming languages (IL, ST, LD, FBD, SFC), common language elements (identifiers, literals, data types, variables), program organization units (functions, function blocks, programs), and configuration/task models. The standard also includes formal syntax/semantics annexes, examples and software compliance testing guidance.
Keywords: IEC 61131-3, PLC programming languages, programmable controllers, ladder diagram, structured text, function block diagram, sequential function chart.
Key Topics
- Programming languages covered
- Textual: Instruction List (IL), Structured Text (ST)
- Graphical: Ladder Diagram (LD), Function Block Diagram (FBD), Sequential Function Chart (SFC)
- Common language elements
- Character set, identifiers, keywords, comments, spacing
- Numeric, string, time literals and their external representation
- Data and variables
- Elementary and derived data types, generic types, type declaration and initialization, variable representation and scope
- Program organization
- Functions, Function Blocks, Programs, and Configuration/Resource/Task models for execution and scheduling
- SFC specifics
- Steps, transitions, actions, rules of evolution and compatibility
- Execution and evaluation
- Network evaluation order, execution control elements, use of EN/ENO, and evaluation semantics for textual/graphical languages
- Support material
- Annexes with formal specification, delimiters/keywords, implementation-dependent parameters, error conditions, examples and software compliance testing guidance
Applications and Who Uses It
IEC 61131-3 is essential for:
- Automation engineers and PLC programmers: to select and apply standardized languages (LD, FBD, ST, IL, SFC) and to design portable, maintainable control code.
- Control system integrators and machine builders: for interoperable software design, modular function block reuse, and structured program organization across projects.
- Tool and compiler developers: implementing editors, compilers, debuggers and simulation tools that conform to the standard’s syntax, semantics and compliance tests.
- Quality and compliance teams: using the standard’s compliance and testing guidance to validate PLC software behavior and portability.
Practical benefits include improved code portability between vendors, clearer documentation of control logic, reuse of tested function blocks, and standardized approaches to tasking, timing and I/O organization.
Related Standards
- Other parts of the IEC 61131 series (hardware, communications, etc.) - Part 3 focuses specifically on programming languages and software model aspects relevant to PLC systems.
Frequently Asked Questions
IEC 61131-3:1993 is a standard published by the International Electrotechnical Commission (IEC). Its full title is "Programmable controllers - Part 3: Programming languages". This standard covers: S'applique à la représentation imprimée et affichée, à l'aide des caractères ISO/CEI 646, des langages de programmation devant être utilisés pour les automates programmables. Spécifie la syntaxe et la sémantique.
S'applique à la représentation imprimée et affichée, à l'aide des caractères ISO/CEI 646, des langages de programmation devant être utilisés pour les automates programmables. Spécifie la syntaxe et la sémantique.
IEC 61131-3:1993 is classified under the following ICS (International Classification for Standards) categories: 25.040.40 - Industrial process measurement and control; 35.060 - Languages used in information technology; 35.240.50 - IT applications in industry. The ICS classification helps identify the subject area and facilitates finding related standards.
IEC 61131-3:1993 has the following relationships with other standards: It is inter standard links to IEC 61131-3:2003. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.
You can purchase IEC 61131-3:1993 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)
XK
©
- 2 - 1131-3 IEC:1993(E)
CONTENTS
Page
FOREWORD. 7
Clause
1 General . 9
1.1 Scope . 9
1.2 Normative references . 9
1.3 Definitions . 10
1.4 Overview and general requirements . 15
1.4.1 Software model . 15
1.4.2 Communication model . 17
1.4.3 Programming model . 19
1.5 Compliance . 21
1.5.1 Programmable controller systems. 22
1.5.2 Programs. 23
2 Common elements . 24
2.1 Use of printed characters . 24
2.1.1 Character set. 24
2.1.2 Identifiers. 25
2.1.3 Keywords . 26
2.1.4 Use of spaces . 26
2.1.5 Comments . 26
2.2 External representation of data . 26
2.2.1 Numeric literals . 26
2.2.2 Character string literals . 27
2.2.3 Time literals . 28
2.3 Data types . 30
2.3.1 Elementary data types . 30
2.3.2 Generic data types . 31
2.3.3 Derived data types . 32
2.4 Variables . 36
2.4.1 Representation . 36
2.4.2 Initialization . 38
2.4.3 Declaration . 39
2.5 Program organization units . 44
2.5.1 Functions. 44
2.5.2 Function blocks . 61
2.5.3 Programs. 76
©
1131-3 IEC:1993(E) - 3 -
Clause Page
2.6 Sequential Function Chart (SFC) elements . 77
2.6.1 General . 77
2.6.2 Steps . 77
2.6.3 Transition . 79
2.6.4 Actions . 83
2.6.5 Rules of evolution. 92
2.6.6 Compatibility of SFC elements . 101
2.6.7 Compliance requirements . 101
2.7 Configuration elements . 102
2.7.1 Configurations, resources, and access paths . 103
2.7.2 Tasks. 105
3 Textual languages . 115
3.1 Common elements . 115
3.2 Language IL (Instruction List) . 115
3.2.1 Instructions . 115
3.2.2 Operators, modifiers and operands . 116
3.2.3 Functions and function blocks . 117
3.3 Language ST (Structured Text) . 118
3.3.1 Expressions. 118
3.3.2 Statements . 121
4 Graphic languages . 124
4.1 Common elements . 124
4.1.1 Representation of lines and blocks . 124
4.1.2 Direction of flow in networks . 125
4.1.3 Evaluation of networks . 126
4.1.4 Execution control elements . 128
4.2 Language LD (Ladder Diagram). 130
4.2.1 Power rails . 130
4.2.2 Link elements and states . 130
4.2.3 Contacts . 131
4.2.4 Coils . 131
4.2.5 Functions and function blocks . 131
4.2.6 Order of network evaluation . 131
4.3 Language FBD (Function Block Diagram) . 134
4.3.1 General . 134
4.3.2 Combination of elements . 134
4.3.3 Order of network evaluation . 134
Annexes
A Specification method for textual languages. 135
A.1 Syntax . 135
A.2 Semantics . 137
©
- 4 - 1131-3 IEC:1993(E)
Annexes (concluded)
B Formal specifications of language elements . 138
B.0 Programming model. 138
B.1 Common elements . 138
B.2 Language IL (Instruction List) . 148
B.3 Language ST (Structured Text) . 149
C Delimiters and keywords . 151
D Implementation-dependent parameters . 154
E Error conditions . 156
F Examples . 157
F.1 Function WEIGH . 157
F.2 Function block CMD_MONITOR. 158
F.3 Function block FWD_REV_MON . 161
F.4 Function block STACK_INT . 166
F.5 Function block MIX_2_BRIX . 171
F.6 Analog signal processing . 174
F.7 Program GRAVEL. 183
F.8 Program AGV. 191
G Index . 195
H Software compliance testing . 207
Tables
1 Character set features . 25
2 Identifier features . 25
3 Comment feature . 26
4 Numeric literals . 27
5 Character string literal feature .28
6 Two-character combinations in character strings . 28
7 Duration literal features. 29
8 Date and time of day literals .29
9 Examples of date and time of day literals . 30
10 Elementary data types .31
11 Hierarchy of generic data types . 32
12 Data type declaration features . 34
13 Default initial values . 34
14 Data type initial value declaration features . 35
15 Location and size prefix features for directly represented variables. 37
16 Variable declaration keywords . 40
17 Variable type assignment features . 41
18 Variable initial value assignment features . 43
19 Graphical negation of Boolean signals . 45
20 Use of EN input and ENO output . 47
21 Typed and overloaded functions . 49
22 Type conversion function features . 52
23 Standard functions of one numeric variable . 53
24 Standard arithmetic functions . 54
25 Standard bit shift functions .55
©
1131-3 IEC:1993(E) - 5 -
Clause Page
26 Standard bitwise Boolean functions . 56
27 Standard selection functions. 57
28 Standard comparison functions . 58
29 Standard character string functions . 59
30 Functions of time data types . 60
31 Functions of enumerated data type . 60
32 Examples of function block I/O parameter usage . 62
33 Function block declaration features . 65
34 Standard bistable function blocks . 71
35 Standard edge detection function blocks . 72
36 Standard counter function blocks . 73
37 Standard timer function blocks . 74
38 Standard timer function blocks – timing diagrams . 75
39 Program declaration features . 76
40 Step features . 79
41 Transitions and transition conditions . 81
42 Declaration of actions . 84
43 Step/action association . 86
44 Action block features . 87
45 Action qualifiers . 88
46 Sequence evolution . 94
47 Compatible SFC features . 101
48 SFC minimal compliance requirements . 101
49 Configuration and resource declaration features . 104
50 Task features . 108
51 Examples of instruction fields . 115
52 Instruction List (IL) operators . 117
53 Function block invocation features for IL language . 118
54 Standard function block input operators for IL language . 118
55 Operators of the ST language . 120
56 ST language statements . 121
57 Representation of lines and blocks . 126
58 Graphic execution control elements . 129
59 Power rails . 130
60 Link elements. 131
61 Contacts. 132
62 Coils . 133
Figures
1 Software model . 16
2 Communication model . 18
3 Combination of programmable controller language elements . 21
4 Examples of function usage. 44
5 Use of formal parameter names . 46
6 Examples of function declarations . 48
7 Examples of explicit type conversion with overloaded functions . 50
8 Examples of explicit type conversion with typed functions . 52
9 Function block instantiation example . 62
10 Examples of function block declarations . 64
11 Graphical use of function block names as variables . 66
©
- 6 - 1131-3 IEC:1993(E)
Clause Page
12 Examples of use of input/output variables . 69
13 Semaphore usage example . 70
14 ACTION_CONTROL function block – External interface . 89
15 ACTION_CONTROL function block body . 90
16 Action control example .91
17 SFC evolution rules . 98
18 SFC errors . 99
19 Configuration example. 102
20 Examples of CONFIGURATION and RESSOURCE declaration features . 105
21 Synchronization of function blocks . 112
22 EXIT statement example . 123
23 Feedback path example . 128
24 Boolean OR examples . 134
©
1131-3 IEC:1993(E) - 7 -
INTERNATIONAL ELECTROTECHNICAL COMMISSION
________
PROGRAMMABLE CONTROLLERS –
Part 3: Programming languages
FOREWORD
1) The formal decisions or agreements of the IEC on technical matters, prepared by technical committees on which
all the National Committees having a special interest therein are represented, express, as nearly as possible, an
international consensus of opinion on the subjects dealt with.
2) They have the form of recommendations for international use and they are accepted by the National Committees in
that sense.
3) In order to promote international unification, the IEC expresses the wish that all National Committees should adopt
the text of the IEC recommendation for their national rules in so far as national conditions will permit. Any
divergence between the IEC recommendation and the corresponding national rules should, as far as possible, be
clearly indicated in the latter.
This part of International Standard IEC 1131 has been prepared by sub-committee 65B:
Devices, of IEC technical committee 65: Industrial-process measurement and control.
The text of this standard is based on the following documents:
DIS Report on Voting
65B(CO)85 65B(CO)87
Full information on the voting for the approval of this standard can be found in the Voting
Report indicated in the above table.
IEC 1131 will consist of the following parts, of which this is the third under the general title:
Programmable controllers.
Part 1: 1992, General information.
Part 2: 1992, Equipment requirements and tests.
Part 3: 1993, Programming languages.
Part 4, User guidelines (under consideration).
Part 5, Messaging service specification (under consideration).
Annexes A, B, C, D and E form an integral part of this part of IEC 1131.
Annexes F, G and H are for information only.
A type 2 technical report (TR) will provide "pre-standardization" guidance for the
implementation and application of the programming language defined in this part of IEC 1131,
including such issues as operating system/program interaction and requirements for
programming support environments.
©
1131-3 IEC:1993(E) - 9 -
PROGRAMMABLE CONTROLLERS –
Part 3: Programming languages
1 General
1.1 Scope
This part of IEC 1131 applies to the printed and displayed representation, using characters of
the ISO/IEC 646 character set, of the programming languages to be used for Programmable
Controllers as defined in Part 1 of IEC 1131. Graphic and semigraphic representation of the
language elements which are defined in this part is allowed, but is not defined in this part.
The functions of program entry, testing, monitoring, operating system, etc., are specified in
Part 1 of IEC 1131.
1.2 Normative references
The following normative documents contain provisions which, through reference in this text,
constitute provisions of this part of IEC 1131. At the time of publication, the editions indicated
were valid. All normative documents are subject to revision, and parties to agreements based
on this part of IEC 1131 are encouraged to investigate the possibility of applying the most
recent editions of the normative documents indicated below. Members of IEC and ISO
maintain registers of currently valid International Standards.
IEC 50: International Electrotechnical Vocabulary (IEV)
IEC 559: 1989, Binary floating-point arithmetic for microprocessor systems
IEC 617-12: 1991, Graphical symbols for diagrams – Part 12: Binary logic elements
IEC 617-13: 1978, Graphical symbols for diagrams – Part 13: Analogue elements
IEC 848: 1988, Preparation of function charts for control systems
ISO/AFNOR: 1989, Dictionary of computer science, ISBN 2-12-486911-6
ISO/IEC 646: 1991, Information technology – ISO 7-bit coded character set for information
processing interchange
ISO 8601: 1988, Data elements and interchange formats – Information interchange –
Representations of dates and times
©
- 10 - 1131-3 IEC:1993(E)
ISO 7185: 1990, Information technology – Programming languages – Pascal
ISO 7498: 1984, Information processing systems – Open systems interconnection – Basic
reference model
1.3 Definitions
For the purposes of this part of IEC 1131, the following definitions apply. Definitions applying to
all parts of IEC 1131 are given in part 1.
NOTES
1 Terms defined in this subclause are italicized where they appear in the bodies of definitions.
2 The notation "(ISO)" following a definition indicates that the definition is taken from the ISO/AFNOR Dictionary
of computer science.
3 The ISO/AFNOR Dictionary of computer science and the International Electrotechnical Vocabulary should be
consulted for terms not defined in this standard.
absolute time:
1.3.1 The combination of time of day and date information.
access path:
1.3.2 The association of a symbolic name with a variable for the purpose of
open communication.
1.3.3 action: A Boolean variable, or a collection of operations to be performed, together with
an associated control structure, as specified in 2.6.4.
1.3.4 action block: A graphical language element which utilizes a Boolean input variable to
determine the value of a Boolean output variable or the enabling condition for an action,
according to a predetermined control structure as defined in 2.6.4.5.
1.3.5 aggregate: A structured collection of data objects, forming a data type. (ISO)
1.3.6 argument: Synonymous with input parameter or output parameter.
1.3.7 array: An aggregate that consists of data objects, with identical attributes, each of
which may be uniquely referenced by subscripting. (ISO)
1.3.8 assignment: A mechanism to give a value to a variable or to an aggregate. (ISO)
1.3.9 based number: A number represented in a specified base other than ten.
1.3.10 bistable function block: A function block with two stable states controlled by one or
more inputs.
1.3.11 bit string: A data element consisting of one or more bits.
©
1131-3 IEC:1993(E) - 11 -
body:
1.3.12 That portion of a program organization unit which specifies the operations to
be performed on the declared operands of the program organization unit when its execution is
invoked.
1.3.13 call: A language construct for invoking the execution of a function or function block.
1.3.14 character string: An aggregate that consists of an ordered sequence of characters.
1.3.15 comment: A language construct for the inclusion of text in a program and having no
impact on the execution of the program. (ISO)
1.3.16 compile: To translate a program organization unit or data type specification into its
machine language equivalent or an intermediate form.
configuration:
1.3.17 A language element corresponding to a programmable controller
system as defined in IEC 1131-1.
1.3.18 counter function block: A function block which accumulates a value for the number
of changes sensed at one or more specified inputs.
1.3.19 data type: A set of values together with a set of permitted operations. (ISO)
1.3.20 date and time: The date within the year and the time of day, represented according
to ISO 8601.
1.3.21 declaration: The mechanism for establishing the definition of a language element. A
declaration normally involves attaching an identifier to the language element, and allocating
attributes such as data types and algorithms to it.
1.3.22 delimiter: A character or combination of characters used to separate program
language elements.
1.3.23 direct representation: A means of representing a variable in a programmable
controller program from which a manufacturer-specified correspondence to a physical or
logical location may be determined directly.
1.3.24 double word: A data element containing 32 bits.
1.3.25 evaluation: The process of establishing a value for an expression or a function, or for
the outputs of a network or function block, during program execution.
1.3.26 execution control element: A language element which controls the flow of program
execution.
©
- 12 - 1131-3 IEC:1993(E)
falling edge:
1.3.27 The change from 1 to 0 of a Boolean variable.
1.3.28 function: A program organization unit which, when executed, yields exactly one data
element (which may be multi-valued, e.g., an array or structure), and whose invocation can be
used in textual languages as an operand in an expression.
1.3.29 function block instance (function block): An instance of a function block type.
function block type:
1.3.30 A programmable controller programming language element
consisting of: (i) the definition of a data structure partitioned into input, output, and internal
variables; and (ii) a set of operations to be performed upon the elements of the data structure
when an instance of the function block type is invoked.
1.3.31 function block diagram: One or more networks of graphically represented functions,
function blocks, data elements, labels, and connective elements.
1.3.32 generic data type: A data type which represents more than one type of data, as
specified in 2.3.2.
global scope:
1.3.33 Scope of a declaration applying to all program organization units
within a resource or configuration.
1.3.34 global variable: A variable whose scope is global.
1.3.35 hierarchical addressing: The direct representation of a data element as a member
of a physical or logical hierarchy, e.g., a point within a module which is contained in a rack,
which in turn is contained in a cubicle, etc.
1.3.36 identifier: A combination of letters, numbers, and underline characters, as specified
in 2.1.2, which begins with a letter or underline and which names a language element.
1.3.37 initial value: The value assigned to a variable at system start-up.
1.3.38 input parameter (input): A parameter which is used to supply an argument to a
program organization unit.
1.3.39 instance: An individual, named copy of the data structure associated with a function
block type or program type, which persists from one invocation of the associated operations to
the next.
1.3.40 instance name: An identifier associated with a specific instance.
1.3.41 instantiation: The creation of an instance.
©
1131-3 IEC:1993(E) - 13 -
integer literal:
1.3.42 A literal which directly represents a value of type SINT, INT, DINT,
LINT, BOOL, BYTE, WORD, DWORD, or LWORD, as defined in 2.3.1.
1.3.43 invocation: The process of initiating the execution of the operations specified in a
program organization unit.
1.3.44 keyword: A lexical unit that characterizes a language element, e.g., "IF".
1.3.45 label: A language construction naming an instruction, network, or group of networks,
and including an identifier.
language element:
1.3.46 Any item identified by a symbol on the left-hand side of a
production rule in the formal specification given in annex B of this part of IEC 1131.
1.3.47 literal: A lexical unit that directly represents a value. (ISO)
1.3.48 local scope: The scope of a declaration or label applying only to the program
organization unit in which the declaration or label appears.
1.3.49 logical location: The location of a hierarchically addressed variable in a schema
which may or may not bear any relation to the physical structure of the programmable
controller’s inputs, outputs, and memory.
long real:
1.3.50 A real number represented in a long word.
1.3.51 long word: A 64-bit data element.
1.3.52 memory (user data storage): A functional unit to which the user program can store
data and from which it can retrieve the stored data.
1.3.53 named element: An element of a structure which is named by its associated
identifier.
1.3.54 off-delay (on-delay) timer function block: A function block which delays the falling
(rising) edge of a Boolean input by a specified duration.
1.3.55 operand: A language element on which an operation is performed.
1.3.56 operator: A symbol that represents the action to be performed in an operation.
1.3.57 output parameter (output): A parameter which is used to return the result(s) of the
evaluation of a program organization unit.
1.3.58 overloaded: With respect to an operation or function, capable of operating on data of
different types, as specified in 2.5.1.4.
©
- 14 - 1131-3 IEC:1993(E)
power flow:
1.3.59 The symbolic flow of electrical power in a ladder diagram, used to
denote the progression of a logic solving algorithm.
1.3.60 program (verb): To design, write, and test user programs.
1.3.61 program organization unit: A function, function block, or program.
NOTE - This term may refer to either a type or an instance.
1.3.62 real literal: A literal representing data of type REAL or LREAL.
1.3.63 resource: A language element corresponding to a "signal processing function" and
its "man-machine interface" and "sensor and actuator interface functions", if any, as defined in
IEC 1131-1.
retentive data:
1.3.64 Data stored in such a way that its value remains unchanged after a
power down / power up sequence.
1.3.65 return: A language construction within a program organization unit designating an
end to the execution sequences in the unit.
1.3.66 rising edge: The change from 0 to 1 of a Boolean variable.
1.3.67 scope: That portion of a language element within which a declaration or label
applies.
1.3.68 semantics: The relationships between the symbolic elements of a programming
language and their meanings, interpretation and use.
1.3.69 semigraphic representation: Representation of graphic information by the use of a
limited set of characters.
1.3.70 single data element: A data element consisting of a single value.
1.3.71 step: A situation in which the behavior of a program organization unit with respect to
its inputs and outputs follows a set of rules defined by the associated actions of the step.
1.3.72 structured data type: An aggregate data type which has been declared using a
STRUCT or FUNCTION_BLOCK declaration.
1.3.73 subscripting: A mechanism for referencing an array element by means of an array
reference and one or more expressions that, when evaluated, denote the position of the
element.
1.3.74 symbolic representation: The use of identifiers to name variables.
1.3.75 task: An execution control element providing for periodic or triggered execution of a
group of associated program organization units.
©
1131-3 IEC:1993(E) - 15 -
time literal:
1.3.76 A literal representing data of type TIME, DATE, TIME_OF_DAY, or
DATE_AND_TIME.
1.3.77 transition: The condition whereby control passes from one or more predecessor
steps to one or more successor steps along a directed link.
1.3.78 unsigned integer: An integer literal not containing a leading plus (+) or minus
(-) sign.
1.3.79 wired OR: A construction for achieving the Boolean OR function in the LD language
by connecting together the right ends of horizontal connectives with vertical connectives.
1.4 Overview and general requirements
This part of IEC 1131 specifies the syntax and semantics of a unified suite of programming
languages for programmable controllers (PCs). These consist of two textual languages, IL
(Instruction List) and ST (Structured Text), and two graphical languages, LD (Ladder Diagram)
and FBD (Function Block Diagram).
Sequential Function Chart (SFC) elements are defined for structuring the internal organization
of programmable controller programs and function blocks. Also, configuration elements are
defined which support the installation of programmable controller programs into programmable
controller systems.
In addition, features are defined which facilitate communication among programmable
controllers and other components of automated systems.
The programming language elements defined in this part may be used in an interactive
programming environment. The specification of such environments is beyond the scope of this
part; however, such an environment shall be capable of producing textual or graphic program
documentation in the formats specified in this part.
The material in this part is arranged in "bottom-up" fashion, that is, simpler language elements
are presented first, in order to minimize forward references in the text. The remainder of this
subclause provides an overview of the material presented in this part and incorporates some
general requirements.
1.4.1 Software model
The basic high-level language elements and their interrelationships are illustrated in figure 1.
These consist of elements which are programmed using the languages defined in this part,
that is, programs and function blocks; and configuration elements, namely, configurations,
resources, tasks, global variables, and access paths, which support the installation of
programmable controller programs into programmable controller systems.
©
- 16 - 1131-3 IEC:1993(E)
Configuration
Resource Resource
Task Task Task Task
Program Program Program Program
FB FB FB FB
Global and directly represented variables
Access paths
Communication function (see IEC 1131-5)
Execution control path
or Variable access paths
FB
Function block
Variable
NOTES
1 This figure is illustrative only. The graphical representation is not normative.
2 In a configuration with a single resource, the resource need not be explicitly represented.
Figure 1 – Software model
A configuration is the language element which corresponds to a programmable controller
system as defined in IEC 1131-1. A resource corresponds to a "signal processing function"
and its "man-machine interface" and "sensor and actuator interface" functions (if any) as
defined in IEC 1131-1. A configuration contains one or more resources, each of which contains
one or more programs executed under the control of zero or more tasks. A program may
contain zero or more function blocks or other language elements as defined in this part.
©
1131-3 IEC:1993(E) - 17 -
Configurations and resources can be started and stopped via the "operator interface",
"programming, testing, and monitoring", or "operating system" functions defined in IEC 1131-1.
The starting of a configuration shall cause the initialization of its global variables according to
the rules given in 2.4.2, followed by the starting of all the resources in the configuration. The
starting of a resource shall cause the initialization of all the variables in the resource, followed
by the enabling of all the tasks in the resource. The stopping of a resource shall cause the
disabling of all its tasks, while the stopping of a configuration shall cause the stopping of all its
resources. Mechanisms for the control of tasks are defined in 2.7.2, while mechanisms for the
starting and stopping of configurations and resources via communication functions are defined
in IEC 1131-5.
Programs, resources, global variables, access paths (and their corresponding access
privileges), and configurations can be loaded or deleted by the "communication function"
defined in IEC 1131-1. The loading or deletion of a configuration or resource shall be
equivalent to the loading or deletion of all the elements it contains.
Access paths and their corresponding access privileges are defined in 2.7.1.
The mapping of the language elements defined in this subclause on to communication objects
is defined in IEC 1131-5.
1.4.2 Communication model
Figure 2 illustrates the ways that values of variables can be communicated among software
elements.
As shown in figure 2a, variable values within a program can be communicated directly by
connection of the output of one program element to the input of another. This connection is
shown explicitly in graphical languages and implicitly in textual languages.
Variable values can be communicated between programs in the same configuration via global
variables such as the variable x illustrated in figure 2b. These variables shall be declared as
GLOBAL in the configuration, and as EXTERNAL in the programs, as specified in 2.4.3.
As illustrated in figure 2c, the values of variables can be communicated between different parts
of a program, between programs in the same or different configurations, or between a
programmable controller program and a non-programmable controller system, using the
communication function blocks defined in IEC 1131-5 and described in 2.5.2.3.5. In addition,
programmable controllers or non-programmable controller systems can transfer data which is
made available by access paths, as illustrated in figure 2d, using the mechanisms defined
in IEC 1131-5.
©
- 18 - 1131-3 IEC:1993(E)
Program A
FB1 FB2
FB_X FB_Y
a b
Figure 2a – Data flow connection within a program
Configuration C
Program A
...










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