Page 1 www.PLCopen.org
PLCopen®
for efficiency in automation
IEC 61131 Basics
Presented by
Bill Lydon, Director PLCopen North America
Automation Industry Consultant
blydon@PLCopen-NA.org
Page 2 www.PLCopen.org
PLCopen®
for efficiency in automation
Why standard software?
Standardization
Improves Productivity
Quality & Reliability
Page 3 www.PLCopen.org
PLCopen®
for efficiency in automation
Percentage of Software development costs in
production systems (source: McKinsey)
0%
20%
40%
60%
80%
100%
1970 1980 1990 2000
Mechanic Electric Software
Page 4 www.PLCopen.org
PLCopen®
for efficiency in automation
Software Functions Increasing
Complexity Increases Exponentially
Page 5 www.PLCopen.org
PLCopen®
for efficiency in automation
“… the never ending story of software ”
enhancements…..
new requirements ...
new functionalities ….
new wishes ...
Typically software enhancements &
maintenance cost are 2 times the
initial development investment.
Page 6 www.PLCopen.org
PLCopen®
for efficiency in automation
Conceptual
Design
Specification
Functional
Design
Verification
CodingTesting
Refining
Commissioning
Maintenance
Standard Software Advantages
Page 7 www.PLCopen.org
PLCopen®
for efficiency in automationStandard Software Advantages
 Improved Software Reliability – Common Design
Architecture
 Improved Productivity
 Common Base of Understanding & Training
 Improves Maintenance Efficiency
• Emergency Bug Fixes & Corrective Bug Fixes
• Adding Features & Functions
• Mandatory Changes ( Law, Safety,...)
• Enhancements
• Studies show software maintainers spend about 50% their time
understanding the code.
Lifecycle Maintenance = 2 X Initial Development
Page 8 www.PLCopen.org
PLCopen®
for efficiency in automation
IEC 61131-3 - International Electrotechnical Commission (IEC)
Open Programmable Logic Controller Standard
1st published 1993 - 3rd edition published 2013
 Defined application program development environment
 Strong data typing for error prevention
 1 Structuring Tool – Sequential Function Chart (SFC)
 4 programming languages: 2 Textual & 2 Graphical
 Program Organization - Program Structuring & Reuse
What is IEC 61131-3 ?
Page 9 www.PLCopen.org
PLCopen®
for efficiency in automation
IEC 61131-3 Strong Data Types
 BOOLEAN
 REAL
 INTEGER
 STRING
 TIME
 ARRAY
 STRUCTURES
 USER DEFINED
Page 10 www.PLCopen.org
PLCopen®
for efficiency in automation
Languages
 Instruction List (IL)
 Structured Text (ST)
 Ladder Logic/Diagram (LD)
 Function Block (FB)
 Sequential Function Chart (SFC)
Page 11 www.PLCopen.org
PLCopen®
for efficiency in automation
A B C
-| |--|/|----------------( )---[Function[---
Ladder Diagram (LD)
Standardized set of relay ladder programming
symbols and terminology
• Electrical Flow
• Large base of users
• Boolean equations
• Function Blocks
• Easy rules
Page 12 www.PLCopen.org
PLCopen®
for efficiency in automationLadder Diagram (LD)
Page 13 www.PLCopen.org
PLCopen®
for efficiency in automation
LD A
AND B
ST C
• Single accumulator based execution model
• Low Level Programming
• One operation such as storing a value in the
accumulator register, is allowed per line
Instruction List (IL)
Single statements, or instructions, written and
executed in a line-by-line format.
Page 14 www.PLCopen.org
PLCopen®
for efficiency in automationInstruction List (IL)
Page 15 www.PLCopen.org
PLCopen®
for efficiency in automation
C:= A AND NOT B
If A = FALSE THEN ...
CASE Select OF ....
• High level language, block structured
• Syntax resembles PASCAL, C, C+
• Complex statements and nested instructions
possible
• Support for
• Iteration loops (REPEAT-UNTIL; WHILE-DO)
• Conditional execution (IF-THEN-ELSE; CASE)
• Functions (SQURT(); SIN())
Structured Text (ST)
Page 16 www.PLCopen.org
PLCopen®
for efficiency in automationStructured Text (ST)
Page 17 www.PLCopen.org
PLCopen®
for efficiency in automation
AND
A C
B
• Graphical Language
• Program elements appear as blocks to be
“wired” together
Function Block Diagram (FB)
Function Examples: ADD, SQRT, SIN, COS, AND, OR, CASE, etc.
Page 18 www.PLCopen.org
PLCopen®
for efficiency in automationFunction Block Diagram (FB)
Page 19 www.PLCopen.org
PLCopen®
for efficiency in automation
Inputs Outputs
Function Block
• Explicit Data
• Variables
• Tag Names
• Logic
• Actions/Calculations
Self Contained Building Blocks
Function Block
Inherent Data Integrity Checks
Page 20 www.PLCopen.org
PLCopen®
for efficiency in automation
Inputs Outputs
Function Examples
• AND, OR, XOR, GATE…
• PID, SELECT, LIMIT…
• SQUARE ROOT, COS…
• ADD, SUB, DIV, MUL…
Function Block
Self Contained Building Blocks
Page 21 www.PLCopen.org
PLCopen®
for efficiency in automationFunction Block
Inputs Outputs
Send/Receive Email
Serve UP WEB Pages
Send Messages (SMS)
Send SOAP Messages
Send XML Messages
OPC UA Communication
PEER to PEER
Self Contained Building Blocks
Page 22 www.PLCopen.org
PLCopen®
for efficiency in automation
BUILD
YOUR OWN
FUNCTIONS
Function Block
Encapsulation
Page 23 www.PLCopen.org
PLCopen®
for efficiency in automationFunction Block
Built from standard blocks ...
Inputs Outputs
User Created
Object
Encapsulation
Page 24 www.PLCopen.org
PLCopen®
for efficiency in automationFunction Block
Ladder Logic Instruction List Structured Text
Build your own function blocks
with Ladder Logic, Instruction
List, or Structured Text
Standardization
Reuse Tested Code
Easily Understood
Self Documenting
Password Protect
Inputs Outputs
Your Own
Function Block
Page 25 www.PLCopen.org
PLCopen®
for efficiency in automationSequential Function Chart (SFC)
Step 1
Transition
Step 2
Transition
Action 1
Action 2
Action 1
• Sequential Controls
• Procedural Controls
• Structured
• Describes Process
• Logic Driven
• Partition Control Functions
• Rapid Visual Diagnostics
Page 26 www.PLCopen.org
PLCopen®
for efficiency in automation
• Serial & Parallel Processes
• Process Synchronization
• Application examples
• Startup Sequences
• Shutdown Sequences
• Presses
• Productions Lines
• Process Automation
• Packaging technology
• Machine tools
• Batch Process Control – S88
• Flexible Manufacturing
Sequential Function Chart (SFC)
Page 27 www.PLCopen.org
PLCopen®
for efficiency in automation
• Multiple Automation and Control Disciplines
• Process Design
• Logic Simulation
• Automatic Documentation
• Engineering Tools
• Online Debug Environment
• Breakpoints
• Watch Windows
• Strip chart Recorder
• Integrated HMI
IDE - Integrated Design Environment (IDE)
IEC 61131 Controller
Page 28 www.PLCopen.org
PLCopen®
for efficiency in automation
Page 29 www.PLCopen.org
PLCopen®
for efficiency in automationPLCopen Extensions
 Vendor Independent, Not for Profit Organization
 Extends IEC 61131-3 Functionality
Page 30 www.PLCopen.org
PLCopen®
for efficiency in automation
More Information...
www.PLCopen.org
Electronic Newsletter
Application Examples
Specifications
Compliant Products
Bill Lydon, Director PLCopen North America
Automation Industry Consultant
blydon@PLCopen-NA.org
Page 31 www.PLCopen.org
PLCopen®
for efficiency in automation

IEC 61131 Basics

  • 1.
    Page 1 www.PLCopen.org PLCopen® forefficiency in automation IEC 61131 Basics Presented by Bill Lydon, Director PLCopen North America Automation Industry Consultant blydon@PLCopen-NA.org
  • 2.
    Page 2 www.PLCopen.org PLCopen® forefficiency in automation Why standard software? Standardization Improves Productivity Quality & Reliability
  • 3.
    Page 3 www.PLCopen.org PLCopen® forefficiency in automation Percentage of Software development costs in production systems (source: McKinsey) 0% 20% 40% 60% 80% 100% 1970 1980 1990 2000 Mechanic Electric Software
  • 4.
    Page 4 www.PLCopen.org PLCopen® forefficiency in automation Software Functions Increasing Complexity Increases Exponentially
  • 5.
    Page 5 www.PLCopen.org PLCopen® forefficiency in automation “… the never ending story of software ” enhancements….. new requirements ... new functionalities …. new wishes ... Typically software enhancements & maintenance cost are 2 times the initial development investment.
  • 6.
    Page 6 www.PLCopen.org PLCopen® forefficiency in automation Conceptual Design Specification Functional Design Verification CodingTesting Refining Commissioning Maintenance Standard Software Advantages
  • 7.
    Page 7 www.PLCopen.org PLCopen® forefficiency in automationStandard Software Advantages  Improved Software Reliability – Common Design Architecture  Improved Productivity  Common Base of Understanding & Training  Improves Maintenance Efficiency • Emergency Bug Fixes & Corrective Bug Fixes • Adding Features & Functions • Mandatory Changes ( Law, Safety,...) • Enhancements • Studies show software maintainers spend about 50% their time understanding the code. Lifecycle Maintenance = 2 X Initial Development
  • 8.
    Page 8 www.PLCopen.org PLCopen® forefficiency in automation IEC 61131-3 - International Electrotechnical Commission (IEC) Open Programmable Logic Controller Standard 1st published 1993 - 3rd edition published 2013  Defined application program development environment  Strong data typing for error prevention  1 Structuring Tool – Sequential Function Chart (SFC)  4 programming languages: 2 Textual & 2 Graphical  Program Organization - Program Structuring & Reuse What is IEC 61131-3 ?
  • 9.
    Page 9 www.PLCopen.org PLCopen® forefficiency in automation IEC 61131-3 Strong Data Types  BOOLEAN  REAL  INTEGER  STRING  TIME  ARRAY  STRUCTURES  USER DEFINED
  • 10.
    Page 10 www.PLCopen.org PLCopen® forefficiency in automation Languages  Instruction List (IL)  Structured Text (ST)  Ladder Logic/Diagram (LD)  Function Block (FB)  Sequential Function Chart (SFC)
  • 11.
    Page 11 www.PLCopen.org PLCopen® forefficiency in automation A B C -| |--|/|----------------( )---[Function[--- Ladder Diagram (LD) Standardized set of relay ladder programming symbols and terminology • Electrical Flow • Large base of users • Boolean equations • Function Blocks • Easy rules
  • 12.
    Page 12 www.PLCopen.org PLCopen® forefficiency in automationLadder Diagram (LD)
  • 13.
    Page 13 www.PLCopen.org PLCopen® forefficiency in automation LD A AND B ST C • Single accumulator based execution model • Low Level Programming • One operation such as storing a value in the accumulator register, is allowed per line Instruction List (IL) Single statements, or instructions, written and executed in a line-by-line format.
  • 14.
    Page 14 www.PLCopen.org PLCopen® forefficiency in automationInstruction List (IL)
  • 15.
    Page 15 www.PLCopen.org PLCopen® forefficiency in automation C:= A AND NOT B If A = FALSE THEN ... CASE Select OF .... • High level language, block structured • Syntax resembles PASCAL, C, C+ • Complex statements and nested instructions possible • Support for • Iteration loops (REPEAT-UNTIL; WHILE-DO) • Conditional execution (IF-THEN-ELSE; CASE) • Functions (SQURT(); SIN()) Structured Text (ST)
  • 16.
    Page 16 www.PLCopen.org PLCopen® forefficiency in automationStructured Text (ST)
  • 17.
    Page 17 www.PLCopen.org PLCopen® forefficiency in automation AND A C B • Graphical Language • Program elements appear as blocks to be “wired” together Function Block Diagram (FB) Function Examples: ADD, SQRT, SIN, COS, AND, OR, CASE, etc.
  • 18.
    Page 18 www.PLCopen.org PLCopen® forefficiency in automationFunction Block Diagram (FB)
  • 19.
    Page 19 www.PLCopen.org PLCopen® forefficiency in automation Inputs Outputs Function Block • Explicit Data • Variables • Tag Names • Logic • Actions/Calculations Self Contained Building Blocks Function Block Inherent Data Integrity Checks
  • 20.
    Page 20 www.PLCopen.org PLCopen® forefficiency in automation Inputs Outputs Function Examples • AND, OR, XOR, GATE… • PID, SELECT, LIMIT… • SQUARE ROOT, COS… • ADD, SUB, DIV, MUL… Function Block Self Contained Building Blocks
  • 21.
    Page 21 www.PLCopen.org PLCopen® forefficiency in automationFunction Block Inputs Outputs Send/Receive Email Serve UP WEB Pages Send Messages (SMS) Send SOAP Messages Send XML Messages OPC UA Communication PEER to PEER Self Contained Building Blocks
  • 22.
    Page 22 www.PLCopen.org PLCopen® forefficiency in automation BUILD YOUR OWN FUNCTIONS Function Block Encapsulation
  • 23.
    Page 23 www.PLCopen.org PLCopen® forefficiency in automationFunction Block Built from standard blocks ... Inputs Outputs User Created Object Encapsulation
  • 24.
    Page 24 www.PLCopen.org PLCopen® forefficiency in automationFunction Block Ladder Logic Instruction List Structured Text Build your own function blocks with Ladder Logic, Instruction List, or Structured Text Standardization Reuse Tested Code Easily Understood Self Documenting Password Protect Inputs Outputs Your Own Function Block
  • 25.
    Page 25 www.PLCopen.org PLCopen® forefficiency in automationSequential Function Chart (SFC) Step 1 Transition Step 2 Transition Action 1 Action 2 Action 1 • Sequential Controls • Procedural Controls • Structured • Describes Process • Logic Driven • Partition Control Functions • Rapid Visual Diagnostics
  • 26.
    Page 26 www.PLCopen.org PLCopen® forefficiency in automation • Serial & Parallel Processes • Process Synchronization • Application examples • Startup Sequences • Shutdown Sequences • Presses • Productions Lines • Process Automation • Packaging technology • Machine tools • Batch Process Control – S88 • Flexible Manufacturing Sequential Function Chart (SFC)
  • 27.
    Page 27 www.PLCopen.org PLCopen® forefficiency in automation • Multiple Automation and Control Disciplines • Process Design • Logic Simulation • Automatic Documentation • Engineering Tools • Online Debug Environment • Breakpoints • Watch Windows • Strip chart Recorder • Integrated HMI IDE - Integrated Design Environment (IDE) IEC 61131 Controller
  • 28.
    Page 28 www.PLCopen.org PLCopen® forefficiency in automation
  • 29.
    Page 29 www.PLCopen.org PLCopen® forefficiency in automationPLCopen Extensions  Vendor Independent, Not for Profit Organization  Extends IEC 61131-3 Functionality
  • 30.
    Page 30 www.PLCopen.org PLCopen® forefficiency in automation More Information... www.PLCopen.org Electronic Newsletter Application Examples Specifications Compliant Products Bill Lydon, Director PLCopen North America Automation Industry Consultant blydon@PLCopen-NA.org
  • 31.
    Page 31 www.PLCopen.org PLCopen® forefficiency in automation