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
Relations
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 .
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.