Professional Documents
Culture Documents
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
Fiction?
Imagine
*
*
*
*
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
IEC 61131-3
The best thing that happened
to industrial control
Sugar Lantic on Automation Maillist
Page 5 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Title
Valid till
61131- 1, Ed 2.0
General information,
2003-05
2013
61131- 2, Ed 3.0
2007-07
2012
61131- 3, Ed 3.0
2012+5
61131- 4, Ed 2.0
2004-07
2010
61131- 5, Ed 1.0
Communications,
2000-11
2013
61131- 6, Ed 1.0
61131- 7, Ed 1.0
2000-08
2013
61131- 8, Ed 2.0
2003-09
2008
61131- 9, Ed 1.0
2012+5
2012+5
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Programming Languages
www.PLCopen.org
PLCopen
for efficiency in automation
01010101 10101010
Historically
Reference to a physical memory location
Reference to a physical Input
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Configuration
Resources
Tasks
www.PLCopen.org
PLCopen
for efficiency in automation
Communication Function
Page 14 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Resource
Resource
Communication Function
Page 15 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Resource
Task
Task
Task
Communication Function
Page 16 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Resource
Task
Task
Task
Task
Program
Program
Program
Program
Execution
control path
Communication Function
Page 17 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Variable
access path
Resource
Task
Task
Task
FB
Function
Block
Program
Program
FB
Program
FB
Program
FB
Variable
FB
Execution
control path
Access path
Communication Function
Page 18 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Variable
access path
Resource
Task
Task
Task
FB
Function
Block
Program
Program
FB
Program
FB
Program
FB
Variable
FB
Execution
control path
Access path
Communication Function
Page 19 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Task 1
Resource
Task
Endless Loop:
Task 2
Events based
Read inputs
Do Calculations
Task 3
Events based
Program
Set Outputs
Time based
Task 4
www.PLCopen.org
PLCopen
for efficiency in automation
DCS
PC based
Control
Page 21 printed at 1/12/2015
Embedded
IEC 61131-3
Drives
LON nodes
SoftLogic
www.PLCopen.org
PLCopen
for efficiency in automation
RPM =2000
www.PLCopen.org
PLCopen
for efficiency in automation
&
Variables
* Programs
www.PLCopen.org
PLCopen
for efficiency in automation
Functions ..
* Standard functions
ADD, SQRT, SIN, COS, GT, MIN, MAX, AND, OR, etc.
www.PLCopen.org
PLCopen
for efficiency in automation
FUNCTION_BLOCK
Type Local
Hysterisis
REAL
XIN1
REAL
REAL
XIN2
BOOL
EPS
www.PLCopen.org
PLCopen
for efficiency in automation
FUNCTION_BLOCK
Type Local
Hysterisis
REAL
XIN1
REAL
REAL
XIN2
BOOL
EPS
www.PLCopen.org
PLCopen
for efficiency in automation
FUNCTION_BLOCK
Type Local
Hysterisis
REAL
XIN1
REAL
REAL
XIN2
BOOL
EPS
www.PLCopen.org
PLCopen
for efficiency in automation
FUNCTION_BLOCK
Type Local
Hysterisis
REAL
XIN1
REAL
REAL
XIN2
BOOL
EPS
www.PLCopen.org
PLCopen
for efficiency in automation
Hysterisis
XIN1
Q
XIN2
EPS
BOOL
Q
1
0
EPS
EPS
XIN2
Page 29 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Hysterisis
XIN1
Q
XIN2
EPS
Q
1
BOOL
FUNCTION_BLOCK HYSTERISIS
VAR_INPUT
XIN1, XIN2 : REAL;
EPS : REAL; (* Hysterisis band *)
END_VAR
VAR_OUTPUT
Q : BOOL := 0
END_VAR
IF Q THEN
IF XIN1 < (XIN2-EPS) THEN
Q := 0 (* XIN1 decreasing *)
END_IF;
ELSIF XIN1 > (XIN2 + EPS ) THEN
Q := 1; (* XIN1 increasing *)
END_IF;
END_FUNCTION_BLOCK
0
EPS
EPS
XIN2
Page 30 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Automation
application
INPUT
OUTPUT
IN_OUT
EXTERNAL
FUNCTION_BLOCK
PROGRAM
Type
Type
Local
Local
GLOBAL
INPUT
FUNCTION
Type
Local
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Step 1
FILL
Transition 1
Step 2
Empty
Transition 2
Step 3
www.PLCopen.org
PLCopen
for efficiency in automation
Step 1
FILL
Transition 1
Step 2
Empty
Transition 2
Step 3
www.PLCopen.org
PLCopen
for efficiency in automation
Empty
FILL
Transition 1b
Step 2 b
Transition 2a
Empty
Transition 2b
Step 3
www.PLCopen.org
PLCopen
for efficiency in automation
Programming Languages
www.PLCopen.org
PLCopen
for efficiency in automation
ANDN
ST
Structured Text
Ladder Diagram
A B
-| |--|/|----------------( )
www.PLCopen.org
PLCopen
for efficiency in automation
Common Elements
Programming Languages
Bottom Up
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
System Integrator
Education
Programming
Maintenance
Page 41 printed at 1/12/2015
Installation
www.PLCopen.org
PLCopen
for efficiency in automation
Cable manufacturing
www.PLCopen.org
PLCopen
for efficiency in automation
Benefits
Reduced waste of human resources (in training,
debugging, maintenance and consultancy)
www.PLCopen.org
PLCopen
for efficiency in automation
Benefits
www.PLCopen.org
PLCopen
for efficiency in automation
Benefits
www.PLCopen.org
PLCopen
for efficiency in automation
Benefits
www.PLCopen.org
PLCopen
for efficiency in automation
Benefits
www.PLCopen.org
PLCopen
for efficiency in automation
Benefits
www.PLCopen.org
PLCopen
for efficiency in automation
Benefits
Software
Library
Function Block
"Heating"
Function
"LIMIT"
Function
"TEST"
Function Block
"Turning"
Function Block
"Feeding"
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Managing Complexity
100 10,000 1mio 100mio Lines of Code
www.PLCopen.org
PLCopen
Why Structuring ?
The ever increasing role of Software on system quality:
errors cost money
Requirements increased dramatically: 100 lines of codes now
10,000 lines
SW development: not a one-man job anymore, but a team
with different know how and background
Commissioning, Installation, Maintenance, and Improvements
are essential parts of the development process
Page 55 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Advantages of Structuring
Better Overview
Better Basis for (internal) Communication
Better Focus to problem solving
Basis for reusable software
Self-documenting
Page 56 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Limited functionality
Larger functionality
Little documentation
Well documented
www.PLCopen.org
PLCopen
for efficiency in automation
Focused to error
prevention
Find errors as early as
possible
A structured approach,
clear specifications,
clear phases
Periodic reviews during
all stages of the project
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Non-predictable quality
Unsystematically
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Different backgrounds
Based on Functional Requirements
Page 62 printed at 1/12/2015
www.PLCopen.org
PLCopen
Installation
Maintenance..
Waterfall model
Page 63 printed at 1/12/2015
www.PLCopen.org
PLCopen
V-model
Link between
Specification
and testing
www.PLCopen.org
PLCopen
for efficiency in automation
Sub-system
Design
Module
Development
Sub-system
Integration
and Testing
System
Installation
and Testing
Component
Development
Library
Construction
Catalogue
Management
Page 65 printed at 1/12/2015
Component
Design
Component
Identification
www.PLCopen.org
PLCopen
for efficiency in automation
System
Design
Sub-system
Design
Module
Development
Sub-system
Integration
and Testing
System
Installation
and Testing
Component
Development
Library
Construction
Catalogue
Management
Page 66 printed at 1/12/2015
Component
Design
Component
Identification
www.PLCopen.org
PLCopen
for efficiency in automation
Sub-system
Design
Module
Development
Sub-system
Integration
and Testing
System
Installation
and Testing
Component
Development
Library
Construction
Catalogue
Management
Page 67 printed at 1/12/2015
Component
Design
Component
Identification
www.PLCopen.org
PLCopen
for efficiency in automation
2.
3.
4.
5.
6.
www.PLCopen.org
PLCopen
for efficiency in automation
Automation
application
INPUT
OUTPUT
IN_OUT
EXTERNAL
FUNCTION_BLOCK
Type
Local
PROGRAM
INPUT
Type
Local
FUNCTION
GLOBAL
Type
Local
www.PLCopen.org
PLCopen
for efficiency in automation
Decomposition
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
A hierarchy of abstraction
Topdown
www.PLCopen.org
PLCopen
for efficiency in automation
Top-
Bottom
down
up
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Fermentation Process
Agitator
Feed valve
Acidic reagent
Alkali reagent
Temperature
sensor
pH sensor
Heater band
Harvest valve
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Step 1 :
Identification of external Interfaces to the System
Feedback from the temperature sensor
Feedback from the pH sensor
Feedback from the valve positions
Feedback from the motor (speed)
www.PLCopen.org
PLCopen
for efficiency in automation
Step 2:
Definition of the main signals between System and Plant
In this example there is no coupling to the plant, but it could
have been, like:
coupling to main vessels with liquids
coupling to transportation system / filling station after
harvesting
www.PLCopen.org
PLCopen
for efficiency in automation
Step 3:
Definition of all Operator interactions, overrides and
supervisory data
For the operator we define:
a Start button
a Stop button
a Duration input
www.PLCopen.org
PLCopen
for efficiency in automation
Step 4:
Brake down from top in logical partitions
MainSequence - filling, heating, agitating, fermenting, harvesting, cleaning.
ValveControl - operating valves used to fill and empty the vessel's
TemperatureControl - for controlling the temperature
AgitatorControl - agitator motor control
pHControl - PH-control
Page 80 printed at 1/12/2015
www.PLCopen.org
PLCopen
for efficiency in automation
Step 5:
Definition of the required POUs
(Programs and Function Blocks)
Using the definitions above and
www.PLCopen.org
PLCopen
for efficiency in automation
SetPoint
TempSensor
PV
Cool
pHSensor
pHControl
AddAcid
MainSequence
Start
Stop
Duration
Start
Temp
Stop
pH
Duration
Agitation
AddAcid
SetPoint
PV
AddAlkali
AddAlkali
AgitateControl
MotorSpeed
FillState
SetPoint
MotorSpeed
PV
AgitateSpeed
ValveControl
Fill
State
Fill
ValvePositions
Harvest
Harvest
www.PLCopen.org
PLCopen
for efficiency in automation
MainSequence in
Sequential Function
Chart, SFC
Presenting the main
process states
S1
Initialisation
S2
Filling
S3
Heating
S4
Fermenting
S5
Harvesting
S6
Cleaning
www.PLCopen.org
PLCopen
for efficiency in automation
can be programmed
in any of the four
www.PLCopen.org
PLCopen
for efficiency in automation
ANDN
ST
-| |--|/|----------------( )
www.PLCopen.org
PLCopen
for efficiency in automation
Step 6:
Definition of scan cycle time requirements
for the different parts of the application
In this example we have only one cycle in continuous mode
The remaining time can be used for other cycles like:
. the filling / transportation system
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
Conclusion
The Software development process has changed:
more requirements..
more functionalities..
more code..
more people involved..
more requirements / wishes
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
www.PLCopen.org
PLCopen
for efficiency in automation
More Information...
www.PLCopen.org
Free-of-Charge electronic Newsletter PLCopening (in english)
email: evdwal@PLCopen.org
www.PLCopen.org