EN 61131-3:2013
(Main)Programmable controllers - Part 3: Programming languages
Programmable controllers - Part 3: Programming languages
IEC 61131-3:2013 specifies the syntax and semantics of a unified suite of programming languages for programmable controllers (PCs). This suite consists of two textual languages, Instruction List (IL) and Structured Text (ST), and two graphical languages, Ladder Diagram (LD) and Function Block Diagram (FBD). This third edition cancels and replaces the second edition, published in 2003 and constitutes a technical revision. It includes the following significant technical changes: It is a compatible extension of the second edition. The main extensions are new data types and conversion functions, references, name spaces and the object oriented features of classes and function blocks.
Speicherprogrammierbare Steuerungen - Teil 3: Programmiersprachen
Automates programmables - Partie 3: Langages de programmation
La CEI 61131-3:2013 spécifie la syntaxe et la sémantique d'une suite unifiée de langages de programmation utilisés pour les automates programmables (AP). Cette suite est constituée de deux langages textuels, liste d'instructions (IL, Instruction List) et texte structuré (ST, Structured Text), et de deux langages graphiques, diagramme à contacts (LD, Ladder Diagram) et diagramme de bloc fonctionnel (FBD, Function Block Diagram). Cette troisième édition annule et remplace la deuxième édition publiée en 2003 et constitue une révision technique. La présente édition inclut les modifications techniques majeures suivantes: elle est une extension compatible de la deuxième édition et les principales extensions concernent de nouveaux types de données et de nouvelles fonctions de conversion, des références, des espaces de noms et des classes de caractéristiques orientées objet, et des blocs fonctionnels.
Programirljivi krmilniki - 3. del: Programski jeziki (IEC 61131-3:2013)
Ta del standarda IEC 61131 določa skladnjo in semantiko programskih jezikov za programirljive krmilnike, kot je določeno v 1. delu standarda IEC 61131. Funkcije programskega vnosa, preskušanja, nadzorovanja, operacijskega sistema itn. so opredeljene v 1. delu standarda IEC 61131. Ta del standarda IEC 61131 opredeljuje skladnjo in semantiko programskih jezikov za programirljive krmilnike (PCs). Niz sestavljata dva tekstovna jezika, seznam z navodili (IL) in strukturirano besedilo (ST) ter dva grafična jezika, lestvični diagram (LD) in funkcijski blokovni diagram (FBD). Za strukturiranje interne organizacije programov programirljivega krmilnika in funkcijskih blokov je določen dodaten niz grafičnih in enakovrednih elementov, imenovanih sekvenčni funkcijski diagram (SFC). Prav tako so določeni konfiguracijski elementi, ki podpirajo namestitev programov programirljivega krmilnika v sisteme programirljivega krmilnika. Dodatno so določene lastnosti, ki omogočajo komunikacijo med programirljivimi krmilniki in drugimi komponentami avtomatiziranih sistemov.
General Information
Relations
Standards Content (Sample)
SLOVENSKI STANDARD
01-julij-2013
1DGRPHãþD
SIST EN 61131-3:2004
Programirljivi krmilniki - 3. del: Programski jeziki (IEC 61131-3:2013)
Programmable controllers - Part 3: Programming languages (IEC 61131-3:2013)
Speicherprogrammierbare Steuerungen - Teil 3: Programmiersprachen (IEC 61131-
3:2013)
Automates programmables - Partie 3: Langages de programmation (CEI 61131-3:2013)
Ta slovenski standard je istoveten z: EN 61131-3:2013
ICS:
25.040.40 Merjenje in krmiljenje Industrial process
industrijskih postopkov measurement and control
35.240.50 Uporabniške rešitve IT v IT applications in industry
industriji
2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.
EUROPEAN STANDARD
EN 61131-3
NORME EUROPÉENNE
May 2013
EUROPÄISCHE NORM
ICS 25.040; 35.240.50 Supersedes EN 61131-3:2003
English version
Programmable controllers -
Part 3: Programming languages
(IEC 61131-3:2013)
Automates programmables - Speicherprogrammierbare Steuerungen -
Partie 3: Langages de programmation Teil 3: Programmiersprachen
(CEI 61131-3:2013) (IEC 61131-3:2013)
This European Standard was approved by CENELEC on 2013-03-27. CENELEC members are bound to comply
with the CEN/CENELEC Internal Regulations which stipulate the conditions for giving this European Standard
the status of a national standard without any alteration.
Up-to-date lists and bibliographical references concerning such national standards may be obtained on
application to the CEN-CENELEC Management Centre or to any CENELEC member.
This European Standard exists in three official versions (English, French, German). A version in any other
language made by translation under the responsibility of a CENELEC member into its own language and notified
to the CEN-CENELEC Management Centre has the same status as the official versions.
CENELEC members are the national electrotechnical committees of Austria, Belgium, Bulgaria, Croatia, Cyprus,
the Czech Republic, Denmark, Estonia, Finland, Former Yugoslav Republic of Macedonia, France, Germany,
Greece, Hungary, Iceland, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, the Netherlands, Norway, Poland,
Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, Switzerland, Turkey and the United Kingdom.
CENELEC
European Committee for Electrotechnical Standardization
Comité Européen de Normalisation Electrotechnique
Europäisches Komitee für Elektrotechnische Normung
Management Centre: Avenue Marnix 17, B - 1000 Brussels
© 2013 CENELEC - All rights of exploitation in any form and by any means reserved worldwide for CENELEC members.
Ref. No. EN 61131-3:2013 E
Foreword
The text of document 65B/858/FDIS, future edition 3 of IEC 61131-3, prepared by IEC TC 65 "Industrial-
process measurement, control and automation" was submitted to the IEC-CENELEC parallel vote and
approved by CENELEC as EN 61131-3:2013.
The following dates are fixed:
(dop) 2013-12-27
• latest date by which the document has
to be implemented at national level by
publication of an identical national
standard or by endorsement
• latest date by which the national (dow) 2016-03-27
standards conflicting with the
document have to be withdrawn
This document supersedes EN 61131-3:2003.
and conversion functions, references, name spaces and the object oriented features of classes abd function
blocks. See Annex B.
Attention is drawn to the possibility that some of the elements of this document may be the subject of
patent rights. CENELEC [and/or CEN] shall not be held responsible for identifying any or all such patent
rights.
Endorsement notice
The text of the International Standard IEC 61131-3:2013 was approved by CENELEC as a European
Standard without any modification.
In the official version, for Bibliography, the following notes have to be added for the standards indicated:
IEC 60848 NOTE Harmonised as EN 60848.
IEC 61499 series NOTE Harmonised in EN 61499 series.
- 3 - EN 61131-3:2013
Annex ZA
(normative)
Normative references to international publications
with their corresponding European publications
The following documents, in whole or in part, are normatively referenced in this document and are
indispensable for its application. For dated references, only the edition cited applies. For undated
references, the latest edition of the referenced document (including any amendments) applies.
NOTE When an international publication has been modified by common modifications, indicated by (mod), the relevant EN/HD
applies.
Publication Year Title EN/HD Year
IEC 61131-1 - Programmable controllers - EN 61131-1 -
Part 1: General information
IEC 61131-5 - Programmable controllers - EN 61131-5 -
Part 5: Communications
ISO/IEC 10646 2012 Information technology - - -
Universal Coded Character Set (UCS)
ISO/IEC/IEEE 60559 - Information technology - Microprocessor - -
Systems - Floating-Point arithmetic
IEC 61131-3 ®
Edition 3.0 2013-02
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
Programmable controllers –
Part 3: Programming languages
Automates programmables –
Partie 3: Langages de programmation
INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
COMMISSION
ELECTROTECHNIQUE
PRICE CODE
INTERNATIONALE
CODE PRIX XH
ICS 25.040; 35.240.50 ISBN 978-2-83220-661-4
– 2 – 61131-3 © IEC:2013
CONTENTS
FOREWORD . 7
1 Scope . 9
2 Normative references . 9
3 Terms and definitions . 9
4 Architectural models . 18
4.1 Software model . 18
4.2 Communication model . 19
4.3 Programming model . 20
5 Compliance . 22
5.1 General . 22
5.2 Feature tables . 22
5.3 Implementer’s compliance statement . 22
6 Common elements . 24
6.1 Use of printed characters . 24
6.1.1 Character set . 24
6.1.2 Identifiers . 24
6.1.3 Keywords . 24
6.1.4 Use of white space . 25
6.1.5 Comments . 25
6.2 Pragma . 26
6.3 Literals – External representation of data . 26
6.3.1 General . 26
6.3.2 Numeric literals and string literals . 26
6.3.3 Character string literals . 28
6.3.4 Duration literal . 29
6.3.5 Date and time of day literal . 30
6.4 Data types . 30
6.4.1 General . 30
6.4.2 Elementary data types (BOOL, INT, REAL, STRING, etc.) . 30
6.4.3 Generic data types . 33
6.4.4 User-defined data types . 34
6.5 Variables . 47
6.5.1 Declaration and initialization of variables . 47
6.5.2 Variable sections . 49
6.5.3 Variable length ARRAY variables . 51
6.5.4 Constant variables . 53
6.5.5 Directly represented variables ( % ) . 54
6.5.6 Retentive variables (RETAIN, NON_RETAIN) . 56
6.6 Program organization units (POUs) . 58
6.6.1 Common features for POUs . 58
6.6.2 Functions. 70
6.6.3 Function blocks . 99
6.6.4 Programs . 117
6.6.5 Classes . 118
61131-3 © IEC:2013 – 3 –
6.6.6 Interface . 137
6.6.7 Object oriented features for function blocks . 146
6.6.8 Polymorphism . 152
6.7 Sequential Function Chart (SFC) elements . 155
6.7.1 General . 155
6.7.2 Steps . 155
6.7.3 Transitions . 157
6.7.4 Actions . 160
6.7.5 Rules of evolution . 168
6.8 Configuration elements . 176
6.8.1 General . 176
6.8.2 Tasks . 180
6.9 Namespaces . 186
6.9.1 General . 186
6.9.2 Declaration . 186
6.9.3 Usage . 192
6.9.4 Namespace directive USING . 192
7 Textual languages . 195
7.1 Common elements . 195
7.2 Instruction list (IL) . 195
7.2.1 General . 195
7.2.2 Instructions . 195
7.2.3 Operators, modifiers and operands . 196
7.2.4 Functions and function blocks . 198
7.3 Structured Text (ST) .
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.