L1 Introduct
L1 Introduct
Acknowledgement
1. Bo Svensson / HV
2. Anders Nilson / HV
3. Alto University Materials
4. plcopen.org
Course aims at
• Sustainability
– focus on program quality
– readability
– maintenance
– good programming practise
– e.g. the elevator model will be used several times,
but “the goal is not to make the elevator run”
• Supervisory control
• PLC in systems
• Communication in-between systems
3
HMI
Automation System Level 25 %
Bus
Bus
Servo control
1 2 1 2 3
3 4 4
Bus
PLC I/Os 1
4
2 3
PLC
External Logic
Process control
Bus Robot control
Process
Programming
Robot
PLC
4
PLC = hub
in in
Process PLC HMI
out out
5
Programmable Logic Controller (PLC)
• An industrial computer
– ruggedized and adapted for control of manufacturing processes
6
Origin of PLC
8
PLC vs. desktop computers
• Hardware
– PLC designed for long life, temperature, humidity, vibration, …
• Operating system
– PLC long-time stable and deterministic execution
• Cost
– no discrepancy in hardware
– software development most costly in both
• PLC are
– high-reliability automation controllers
– suitable for harsh environments
9
PLC programming
10
What is IEC?
11
http://www.iec.ch/
IEC members
12
IEC 61131 history
• 1979 working group for PLC standard
• 1982 the first draft of IEC 1131
• 1982 splitting in to 5 sub groups
• 1992 part 1 and 2 published
• 1993 part 3 published
• 1994 corrigendum to part 3
• 1997 changed name to IEC
• … 61131 (content not changed)
• 2003 part 3 edition 2
• 2013 part 3 edition 3
13
IEC 61131 parts
Part Title
1 General information
2 Equipment requirements and tests
3 Programming languages
4 Users guidelines
5 Messaging service specification
6 Functional safety
7 Fuzzy control programming
8 Guidelines for the application and implementation
of programming languages
9 Single-drop digital communication interface for
small sensors and actuators
14
Why IEC 61131-3
•There are more modern programming tools, why not use them?
Or
• My old programming environment,
that’s a powerful tool!
15
IEC 61131 part 3
17
IEC 61131-3 languages
18
LD – Ladder Diagram
19
FBD – Function Block Diagram
20
SFC – Sequential Function Chart
21
ST – Structured Text
• Function oriented
– arithmetic calculation
– processing numbers
– handling structured data types
22
IL – Instruction List
23
CFC – Continuous Function Chart
24
IEC 61131-3 weakness
• No requirements to be IEC 61131-3 compatible
• Lots of parameters are implementation dependent
– i.e. brand specific solutions
25
PLCopen – www.plcopen.org
• Founded 1992
• An organization active in Industrial Control, aiming at
– higher efficiency in application software development
– lower life-cycle costs
• Different levels for IEC 61131-3 Certification
• Open IEC 61131-3 function block interfaces
– motion control
– communication
– safety
26
IEC 61131-3 a living standard
27
IEC 61131-3 conclusion
28
TwinCAT3 (Beckhoff)
• An IEC 61131-3 Integrated Development Environment
– TwinCAT2 follows ed. 2 (2003)
– TwinCAT3 follows ed. 3 (2013)
• Free to download and use (test license)
• One software for programming and configuration
• Programming and run-time systems on one PC or separated
• Online monitoring and log of data
• HMI design
• Visual Studio integration
– use of C/C++ as programming language
– link to MATLAB/Simulink
• Data communication by means of open Microsoft standards (OPC, OCX, DLL, etc.)
29