100% found this document useful (1 vote)
350 views

The 3 Edition of Iec 61131-3: Plcopen

The document discusses the 3rd Edition of IEC 61131-3, which defines programming languages for programmable logic controllers. It provides an overview of the parts and standards within IEC 61131. It describes many new features being added in the 3rd edition, including object-oriented extensions like classes, inheritance, interfaces, and polymorphism. It also summarizes changes to functions, function blocks, data types, and other elements to integrate these object-oriented capabilities and enhance compatibility while extending the standard.

Uploaded by

aassafi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
350 views

The 3 Edition of Iec 61131-3: Plcopen

The document discusses the 3rd Edition of IEC 61131-3, which defines programming languages for programmable logic controllers. It provides an overview of the parts and standards within IEC 61131. It describes many new features being added in the 3rd edition, including object-oriented extensions like classes, inheritance, interfaces, and polymorphism. It also summarizes changes to functions, function blocks, data types, and other elements to integrate these object-oriented capabilities and enhance compatibility while extending the standard.

Uploaded by

aassafi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

PLCopen 1 printed at 27-Sep-11

PLCopen
for efficiency in automation
The 3
rd
Edition
of IEC 61131-3
Eelco van der Wal
Managing Director PLCopen
PLCopen 2 printed at 27-Sep-11
PLCopen
for efficiency in automation
Overview of the IEC 61131
and
why a 3
rd
edition?
Living standards
PLCopen 3 printed at 27-Sep-11
PLCopen
for efficiency in automation
IEC 61131 Parts
Project Title Valid till
61131- 1, Ed 2.0 General information, 2003-05 2013
61131- 2, Ed 3.0 Equipment requirements and tests, 2007-07 2012
61131- 3, Ed 3.0 Programming languages (Currently CDV - Committee Draft for Voting) 2012+5
61131- 4, Ed 2.0 User guidelines (TR), 2004-07 2010
61131- 5, Ed 1.0 Communications, 2000-11 2013
61131- 6, Ed 1.0 Functional safety for PLC (Currently CDV - Committee Draft for Voting) 2012+5
61131- 7, Ed 1.0 Fuzzy control programming, 2000-08 2013
61131- 8, Ed 2.0 Guidelines applic. & implem. progr. languages (TR), 2003-09 2008
61131- 9, Ed 1.0
Single-drop digital communication interface for small sensors
and actuators (SDCI) aka IO-Link(Currently CD - Committee Draft)
2012+5
PLCopen 4 printed at 27-Sep-11
PLCopen
for efficiency in automation
Why include Object Orientation?
Main reason:
To link better to the scared resources
of engineers in the future
We should better adopt to them
then vice versa
PLCopen 5 printed at 27-Sep-11
PLCopen
for efficiency in automation
3
rd
edition fully compatible
with 2
nd
edition + extensions
The OOP features are selectable
and usable over time
And many other enhancements
and proposals to reduce like delete IL
PLCopen 6 printed at 27-Sep-11
PLCopen
for efficiency in automation
Fully compatible extensions:
Rules for implicit type conversions
Functions for endianess, type conversion
References (no pointer arithmetic)
Object oriented extentions:
FB / Class: Method, Inheritance, Interface, Polymorphism
Namespaces
Etc.
PLCopen 7 printed at 27-Sep-11
PLCopen
for efficiency in automation
6.1.5 Comments New: Single line comment / / text
6.2.1 Numeric literals New: I NT#16#7FFF =decimal value 32767
New: Typed double-byte string and char (using single quote
character)
6.2.3 Duration literal New: Nanosec
6.3 Data Types Clar: Harmonization with variables, Subclause reorganized
6.3.2 Elementary data types New: (Enum) Type with named values
6.3.3 Generic data type Corr: Hierarchy
0 User-defined data type
Declaration and initialization
New: Enumdata type
New: Named values
New: OVERLAP, OVERLAYED
New: Relative location for structure elements
New: Directly derived data type
New: REF_TOdeclaration and operations
New: Structured data type with relative addressing AT and OVERLAP
New: Directly represented components of a structure - partly specified
using *
New: Initialization of a variable with user-defined data type
Details walkthrough (1/7)
PLCopen 8 printed at 27-Sep-11
PLCopen
for efficiency in automation
Details walkthrough (2/7)
6.4.1 Variables General Clar: Harmonization with data types
Subclauses and tables reorganized
New: Variable with user-defined data type
6.4.1 Declaration and initialization Clar: Declaration and initialization
6.4.3 Variable-length array New: ARRAY [ *, *, *] OF I NT;
Std FBs for upper and lower bound
6.4.4 Overlayed variables New: OVERLAYED
6.4.5 Directly repres. variable Clar.
6.4.6 Retentive variabless Clar: RETAI N
6.5.1 Common features of POUs New: Overview of common features . Subclauses reorganized
Clar: Assignment and expression
New: Partial access of ANY-Bit
Clar: Call representation (execution sequence)
Clar: Execution control EN ENO
New: Implicit explicit; Conversion rules
PLCopen 9 printed at 27-Sep-11
PLCopen
for efficiency in automation
Details walkthrough (3/7)
6.5.2 Function Clar: Harmonization of rules with function blocks
Subclauses reorganized
Clar: Overview, Delaration, call representation, call rules.
Clar: Features tables: Function declaration and call
6.5.2.3 Function call Clar: Results: VAR_EXTERNAL, VAR_I N_OUT
New: Function without function result
Clar: Feature Table 21 restructured
Clar: Initialization of Input and output a feature
6.5.2.4 Typed overloading Corr: WORD_TO_I NT vs. TO_I NT
6.5.2.5.2 Type conversion New: Implicit and explicit conversion
New: TRUNCvs. TRUNC_**
New: Conversion of Numerical, bit, etc.
New: Conversion of Time =implementation dependent
6.5.2.5.7 Functions of time and date New: Concatenate and split
6.5.2.5.8 Function for endianess New: Endianess conversion functions
6.5.2.5.10 Functions New: Validate
PLCopen 10 printed at 27-Sep-11
PLCopen
for efficiency in automation
Details walkthrough (4/7)
6.5.3 Function block Clar: Harmonization of rules for function
Subclauses reorganized
Clar: Overview, Delaration, call representation, call rules.
Clar: Features tables: Function block declaration and call
New: Error if no value specified for in-out and FB instance
6.5.3.2 FB type declaration New/Clar: Text and feature table: Rules for FB I/O var usage
Clar: Feature table: FB decl. restructured (Harmonization)
New: In feature table: Init. of inputs and outputs (was missing)
New: FB result like Function
New: Feature table: FB instance decl (was missing)
6.5.3.3 FB instance declaration Clar: Text and feature table
6.5.3.4 FB call Clar: Textual and graphical repr., feature table (Harmomized with
function)
6.5.3.5.2 Bistable elements New: Additionally long name: SR SET1, RESETvs. S1, R...
6.5.3.5.4 Counters Del: Long input names: LOAD, RESET
PLCopen 11 printed at 27-Sep-11
PLCopen
for efficiency in automation
Details walkthrough (5/7)
6.5.4 Object oriented ext. of FB
concept
New: FB with optional OO-extensions
New: CLASS as special case of OO FB
New: Function block inherits from base class
- VAR_IN_OUT of a (base) FB type may be assigned an instance of a
derived FB type,
- A reference to a (base) FB type may be assigned the address of an
instance of a derived FB type
OO FB Clar: Feature Table restructured
Classes - Feature New: CLASS as subset of OO FB and feature table
Methods New: METHODfor FB
Interfaces New: I NTERFACE, method prototypes, FB I MPLEMENTS
Inheritance New: EXTENDS for Interface and FB
6.5.7.3.2 FB inheritance New: FI NAL, SUPER
6.5.7.3.6 Type check and cast New: Type check, derivation check, cast
6.6.5 SFC - Evaluation rules Corr: Simult. seq. divergence and convergence
6.8 Namespaces New: NAMESPACE, I NTERNAL ACCESS, PUBLI C ACCESS
PLCopen 12 printed at 27-Sep-11
PLCopen
for efficiency in automation
Details walkthrough (6/7)
7.2 Instruction list DEL: Proposal:
This language is a) often implementation specifically realised and b)
outdated as an assembler like language. Therefore it will not be
contained in the next version of this part of the standard.
New: Method call with formal and nonm-formal list
New: IL FB call Counter RESET (Long name)
7.2.3 IL function and FB call New: Harmonized with the general call rules.
7.3.2 Structured Text New: Feature table
New: Statements: ;, CONTI NUE
8.1.2 Representation of lines and
blocks
Clar: Feature table >Figure Example (not normative anymore)
8.2.4 Ladder Diagram New: Contacts for Compare (typed and overloaded)
PLCopen 13 printed at 27-Sep-11
PLCopen
for efficiency in automation
Details walkthrough (7/7)
Annex A Syntax New: updatenewelement (open)
Annex B Delimiter and kexword New: update new element (open)
Annex C Implement. dependencies New: update new element (open)
Annex D Error conditions New: update new elements (open)
Annex E Extension of 3
rd
Edition New: Text, Figure and Table (This table (here) will go to an Annex
Annex Interoperability with IEC
61499 devices
Del:
Annex Examples Del: Move to next edition of part 8 - Guidelines
PLCopen 14 printed at 27-Sep-11
PLCopen
for efficiency in automation
Some examples
PLCopen 15 printed at 27-Sep-11
PLCopen
for efficiency in automation 1. Objects
Creation of Objects:
through declaration of Variables
Usage of Objects:
Call of Methods
PLCopen 16 printed at 27-Sep-11
PLCopen
for efficiency in automation
2. Classes
Definition of the Operations:
Method = Action of the FB with
own Variables + Return value
Definitions of the instance
data: Variablens of the FB
Classes define Data and
Operations for the relevant
instances of the objects
PLCopen 17 printed at 27-Sep-11
PLCopen
for efficiency in automation
3. Sub (1): Inheritance
zustzliches Datum
zustzliche Operation
bei unverndertem Start u.
GetState
Spezialfall von Pump
EXTENDS deklariert, dass Spezialfall vorliegt
Neuer FB hat zumindest alle Daten u. Operationen des alten durch
Vererbung
Erweitern und anpassen (statt Copy&Modify)
PLCopen 18 printed at 27-Sep-11
PLCopen
for efficiency in automation
3. Sub(2): Interfaces
INTERFACE = Oberklasse, so allgemein, dass weder Daten noch
Op.-Implementierungen feststehen (rein abstrakte Klasse)
Vllig unabhngig definierte FBs knnen Spezialflle davon sein
eine Hierarchie
Interface definiert die Methodenschnittstelle, FBs implementieren
diese (IMPLEMENTS)
PLCopen 19 printed at 27-Sep-11
PLCopen
for efficiency in automation
3. Sub(3): Polymorphie
ein Array / eine POE fr
Instanzen verschiedener FBs
einheitlicher Aufruf der jeweils
passenden Implementierung
(dynamisches Binden)
Interface als Typ
Referenz auf FB-Instanz
i m1( Dr i veCAN1)
i m1( Dr i veAnal og1)
PLCopen 20 printed at 27-Sep-11
PLCopen
for efficiency in automation
Comparison
Spracheigenschaften IEC 3
rd
Edition C++ J ava C#
Multi languages + + - - -
OOP/procedural mixed - + + - -
Classes ~ (FB) + + + +
Methods ~ (Aktionen) + + + +
Interfaces - + - + +
Polymorphi - + +/- + +
Referenzsemantik - + (Interfaces) - + +
Constructor / Destructor - + + + +
Properties - + - - +
Dyn. Memory (new) - - + + +
Access control ~ (Variablen) ~ (Variablen) + + +
PLCopen 21 printed at 27-Sep-11
PLCopen
for efficiency in automation

You might also like