PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
“There are three classes of people: those who see.
Those who see when they are shown.
Those who do not see.
”
Leonardo da Vinci ( Italian draftsman, Painter , Sculptor , Architect and Engineer whose genius epitomized the Renaissance humanist ideal. 1452 1519 )
"Any sufficiently advanced technology is indistinguishable from magic.“
Arthur Charles Clarke
March 31 st and April 1 st , 2009
Page 1 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
The goal of this presentation is to provide the attendees with information and a review of the IEC 61131-3 control system automation software standard which is an open (nonpropriety) based standard applicable to the implementation of a PLC Open system including the application of Field Bus technology. The attendees will gain knowledge involving the
IEC 61131-3 software standard utilizing RTU/PLC/DCS.
IEC = International Electro-technical Commission
A World organization that prepares and publishes international standards for all electrical and electronic related technologies
Founded in 1906 * Over 50 participating countries * Different levels of membership
March 31 st and April 1 st , 2009
Page 2 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
IEC 61131 is an international standard for programmable controllers consisting of 5 parts:
Part 1: General information
Part 2: Equipment characteristics
Part 3: Programming languages
Part 4: User guidelines
Part 5: Communication
March 31 st and April 1 st , 2009
Page 3 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
March 31 st and April 1 st , 2009
Page 4 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
PLC Open Certification and compliance testing
Definition of several levels of IEC 61131-3 compliance
(Base Level, Portability Level, Full compliance Level)
Establish strict test procedures
Establish certification tests at independent test institutes
Ultimate Goal: Portability of PLC programs
Program once run on any hardware platform not hardware specific or dependent
March 31 st and April 1 st , 2009
Page 5 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Advantages of IEC61131-3 for programmers
History and international standards 1970 to 1995
7 parts of the IEC 61131 standard
IEC 61131-3 software models
the 5 languages of the IEC 61131-3
FBs (Function blocks) and POUs (Programmable Organizational Units)
IEC data types, standard functions and standard function blocks
PLCopen certification
March 31 st and April 1 st , 2009
Page 6 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
PLCopen compliance levels
PLCopen training logo
PLCopen address
"Concern for man himself and his fate must always form the chief interest of all technical endeavors, concern for the great unsolved problems of the organization of labor and the distribution of goods--in order that the creations of our mind shall be a blessing and not a curse to mankind.
Never forget this in the midst of your diagrams and equations ." Albert Einstein
March 31 st and April 1 st , 2009
Page 7 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
International accepted standard
• Step by step all suppliers will support it
• Uniform structures, languages, and the way of handling
It saves you time
• Unique software model and data/ type concept
• You only have to learn it once for different controller types
• Reduced misunderstandings and errors
• Standard functions and function blocks
• Reusability of tested software
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
Page 8 of 38
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Supports safety and quality programming
• Easy and comfortable structuring
• Data typing prohibits programming errors
Provides the best language for each problem
• Consistent specifications of 5 languages
• Two textual and two graphical languages
• One structuring language, providing an overview
• Availability of high level language
• Possibility to mix different languages
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
Page 9 of 38
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
NEMA Programmable Controllers Committee formed (USA)
GRAFCET (France)
DIN 40719, Function Charts (Germany)
NEMA ICS-3-304, Programmable Controllers (USA)
IEC SC65A/WG6 formed
DIN 19 239, Programmable Controller (Germany )
IEC 65A(Sec)38, Programmable Controllers
MIL-STD-1815 Ada (USA)
IEC SC65A(Sec)49, PC Languages
IEC SC65A(Sec)67
IEC 848, Function Charts
IEC 64A(Sec)90
IEC 1131-3
Type 3 report recommendation
70 77 78 79 80 81 82 83 84 85
Source: Dr. J. Christensen
March 31 st and April 1 st , 2009
Page 10 of 38
86 87 88 89 90 91 92 93 94 95
IEC 61131-3 name change
96
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Part 1
Part 2
Part 3
Part 4
Part 5
Part 7
Part 8
General overview, definitions IS
Hardware IS
Programming Languages
User Guidelines
Communication
IS
IS
IS
Fuzzy Logic
Technical Report
IS
IS = International Standard
March 31 st and April 1 st , 2009
Page 11 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Definitions and glossary of terms used in the standard
List of related / referenced IEC standards
Principal functional characteristics of programmable controller systems
Page 12 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Electrical, mechanical and functional requirements for
Programmable Controllers and associated peripherals
Service, storage and transportation conditions
Information to be supplied by manufacturer
Test methods and procedures for verification of compliance of programmable controllers and associated peripherals
March 31 st and April 1 st , 2009
Page 13 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Software-, communication- and programming-model
Definition of five interlinked programming languages
Syntax and semantics of two textual and two graphical languages: Instruction List (IL), Structured Text (ST), Ladder
Diagram (LD) and Function Block Diagram (FBD)
Sequential Function Chart (SFC) for program structuring
March 31 st and April 1 st , 2009
Page 14 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Assists the user in:
Utilizing the other parts of the programmable controller standard
Specifying the requirements for applications
Selecting and implementing systems
Page 15 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Based on MMS (Manufacturing Message Specifications)
(still in progress)
Page 16 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Provides the definition of fuzzy control sets
Page 17 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Provides guidelines for the application and implementation of programming languages for programmable controller
Page 18 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
Page 19 of 38
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Configuration A
Resource L Resource L
Task1 Task2 Task3 Task4
Program P1 Program P2
FB1 FB2
Program P3
FB3 FB4
Program P4 global and direct addressed variables access paths
Task association
Access path association
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Page 20 of 38
OB1
Other
OBs
March 31 st and April 1 st , 2009
FC
FB
FC
FB
FB
FC
OB - Organization Block
FC - Function
FB - Function Block
Memory
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Configuration
A language element corresponding to a programmable controller system
Resource
A language element corresponding to a signal processing function and its humanmachine interface and sensor actuator functions, like a CPU in your system
Task
An execution control element providing for periodic or triggered execution of a group of associated program organization units
Program
Highest level program organization unit, several in - and outputs possible, can call
FBs and Functions
FB
Program organization unit Function Block, several in - and outputs possible, can call other FBs and Functions
March 31 st and April 1 st , 2009
Page 21 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
• Character set
• Data types
• Variables
(English.........)
(BOOL, WORD, INTEGER.................)
(VAR, VAR_input, VAR_output..........)
• POUs,
Program Organisation Units (Function, Function Block...)
• SFC Elements
(Steps, Transitions.................................)
• Configuration elements:
(Tasks)
•
Basis for software re-use
Mile High Industrial and Automation Conference
Page 22 of 38
March 31 st and April 1 st , 2009
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Page 23 of 38
7
10
11
12
8
9
13
14
16
17
18
19
20
No. Keyword Data Type Bits
4
5
6
1
2
3
BOOL
SINT
INT
DINT
LINT
USINT
Boolean
Short integer
Integer
Double integer
Long integer
Unsigned short integer
16
32
1
8
64
8
15
UINT
UDINT
ULINT
REAL
LREAL
TIME
DATE
TIME_OF_DAY or TOD
DATE_AND_TIME or DT
STRING
BYTE
WORD
DWORD
LWORD
Unsigned integer
Unsigned double integer
Unsigned long integer
Real numbers
Long reals
Duration
Date (only)
Time of day (only)
Date and time of day
Character string
Bit string of length 8
Bit string of length 16
Bit string of length 32
Bit string of length 64
March 31 st and April 1 st , 2009
16
32
64
32
64
8
16
32
64
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Directly represented variables – Hardware Addressable Inputs and Outputs
The identifier of a directly represented variable always begins with "%" character.
Below are the naming conventions of a directly represented variable for a channel of a single board. "s" is the slot number of the board. "c" is the number of the channel.
%IXs.c
free channel of a Boolean input
%IDs.c
free channel of an integer input
%ISs.c
free channel of a message input
%QXs.c
free channel of a Boolean output
%QDs.c
free channel of an integer output
%QSs.c
free channel of a message output
Below are the naming conventions of a directly represented variable for a channel of a complex equipment.
"s" is the slot number of the equipment. "b" is the index of the single board within the complex equipment.
"c" is the number of the channel.
%IXs.b.c
free channel of a Boolean input
%IDs.b.c
free channel of an integer input
%ISs.b.c
free channel of a message input
%QXs.b.c free channel of a Boolean output
%QDs.b.c free channel of an integer output
%QSs.b.c free channel of a message output
Below are examples:
%QX1.6 is the 6th channel of the board #1 (Boolean output)
%ID2.1.7 is the 7th channel of the board #1 in the equipment #2 (integer input)
March 31 st and April 1 st , 2009
Page 24 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Instruction List Structured Text Sequential Function Chart
LD A
ANDN B C:= A AND NOT B
Step 1 N FILL
ST C
Transition 1
Function Block Diagram Ladder Diagram Step 2 S Empty
AND
A C
B
A B C
-| |--|/|----------------( )
Transition 2
Step 3
March 31 st and April 1 st , 2009
Page 25 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Standardized, rationalized set of relay ladder programming symbols
Based on well-known US-style of programming, resembling electrical drawing standard
A B C
-| |--|/|----------------( )
Page 26 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Ladder Diagram (LD) is a graphic representation of Boolean equations, combining contacts (input arguments) with coils (output results). The LD language enables the description of tests and modifications of Boolean data by placing graphic symbols into the program chart. LD graphic symbols are organized within the chart exactly as an electric contact diagram. LD diagrams are connected on the left side and on the right side to vertical power rails.
A and not B equals C
-| |--|/|----------------( )
March 31 st and April 1 st , 2009
Page 27 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Single Accumulator based execution model
Based upon the German ‘Anweisungsliste’, AWL
Only one operation such as storing a value in the accumulator register, is allowed per line
LD A
ANDN B
ST C
March 31 st and April 1 st , 2009
Page 28 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Instruction List, or IL is a low level language. It is highly effective for smaller applications or for optimizing parts of an application. Instructions always relate to the current result (or
IL register).
The processor indicates the operation that must be made between the current value and the operand. The result of the operation is stored again in the current result.
Page 29 of 38
LD IX1 (* push button *)
ANDN MX5 (* command is not forbidden *)
ST QX2 (* start motor *)
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
High level language, block structured
Syntax resembles PASCAL
Complex statements and nested instructions possible
Support for
• Iteration loops (REPEAT-UNTIL; WHILE-DO)
• Conditional execution (IF-THEN-ELSE; CASE)
• Functions (SQRT(), SIN())
C:= A AND NOT B
March 31 st and April 1 st , 2009
Page 30 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
High level language, Syntaxed structured
Syntax resembles traditional programming code such as C++, JAVA, PASCAL
Complex statements and nested instructions possible
Support for
Iteration loops (REPEAT-UNTIL; WHILE-DO)
Conditional execution (IF-THEN-ELSE; CASE)
Advanced Math Functions (SQRT(), SIN())
Applications with complex calculations and data processing examples would involve two phase flow calculations, gas calculations, etc.
C:= A AND NOT B
March 31 st and April 1 st , 2009
Page 31 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Graphical language, widely used in Europe
Allows program elements which appear as blocks to be
"wired" together in a form analogous to a circuit diagram
Used in many applications that involve the flow of information or data between control components
AND
A C
B
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
Page 32 of 38
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Graphical language, widely used in Distributed
Control Systems (DCS) and Analog intensive control systems
Allows program elements which appear as blocks (Function Blocks) to be connected together in a form analogous to a circuit diagram
Most applications apply to analog control
Used in many applications that involve the flow of information or data between control component
Examples include PID and analog scaling
March 31 st and April 1 st , 2009
Page 33 of 38
AND
A C
B
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Graphical language which provides a diagrammatic representation of program sequences --> flowchart
Based on the French Grafcet (IEC 848)
Main structure and suitable for rapid diagnostics
The basic elements are steps with action blocks and transitions
Steps consist of a piece of program that is carried out until a condition specified in the transition is met
Programming of complex tasks by dividing in smaller parts
Each element can be programmed in any of the
IEC- languages such as LD or ST or IL or FB mix or match any of the languages
Step 1 N FILL
Transition 1
Step 2 S Empty
Transition 2
Step 3
March 31 st and April 1 st , 2009
Page 34 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Technological programming language for describing
Structured program draft
Description of the process with steps and transitions
Clear, easy to understand by the process, production and operations staff
Application examples
Presses and Packaging technology
Production lines
Process technology (start up
– shutdown)
OEM equipment machinery technology
Rotating Machinery e.g. compressors, pumps
March 31 st and April 1 st , 2009
Page 35 of 38
Step 1
Transition
Step 2
Transition
Action 1
Action 2
Action 1
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
POU’s enable re-use of software from macro level (Programs) to micro level (FB and Functions).
A POU consists of a header (variable declaration) and the body (instructions).
POU Type
Program
Function Block
Function
Replicated as: Comments
Program instance Main program
FB instance Subroutine with own memory, several in - and outputs possible
Function Subroutine without memory
Page 36 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Bit string types
Integer types
(BOOL, BYTE, WORD, DWORD, LWORD)
(SINT, INT, DINT, LINT)
Unsigned integer types
(USINT, UINT, UDINT, ULINT)
Real types
(REAL, LREAL)
Time types
Character types
(TIME, DATE, TIME_OF_DAY, DATE_AND_TIME)
(STRING)
Vendor and user defined data types are possible
• Direct derived, sub range, enumeration
• Array, structure
March 31 st and April 1 st , 2009
Page 37 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Bit string functions (AND, OR, XOR, NOT, SHL, SHR, ROL, ROR)
Numerical functions (ADD, SUB, MUL, DIV, MOD, EXPT, ABS,
SQRT, LN, LOG, EXP, SIN, COS, TAN, ASIN,
ACOS, ATAN)
Type conversions (e.g. USINT_TO_DINT, BOOL_TO_BYTE)
Selection functions (SEL, MIN, MAX, LIMIT, MUX)
Comparison functions (GT, GE, EQ, LT, LE, NE)
String functions (LEN, LEFT, RIGHT, MID, CONCAT,
INSERT, DELETE, REPLACE, FIND)
Vendor and user defined functions are possible
March 31 st and April 1 st , 2009
Page 38 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Bitable
Edge detection
Counters
Timers
(SR, RS, SEMA)
(R_TRIG, F_TRIG)
(CTU, CTD, CTUD)
(TP, TON, TOF, RTC)
Vendor and user defined function blocks are possible
Page 39 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Page 40 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
PLCopen was founded on June 15, 1992 in Giessen, Germany.
Target was to promote IEC 61131-3, inform customers and give more weight to the IEC 61131-3 standard.
PLCopen
Standardization in Industrial
Control programming
Page 41 of 38
TC6
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
without testing there is no standard
The IEC 61131 standard gives rules for compliancy
Certification gives guidance for users towards real IEC
61131-3 programming systems (e.g. PLCopen certified list shows compliant products)
Page 42 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
To take away the confusion, PLCopen....
.... has defined 2 levels of compliance with a defined set of features
.... has defined an accreditation procedure
.... has accredited test institutes
.... developed test software, shared amongst members
.... has defined a certification procedure
.... and has members with certified products
This assures compliance now, and in the future.
March 31 st and April 1 st , 2009
Page 43 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Application
Program
FB
FB
FB
Variable
Variable
Variable
Code
Code
Body
Body
Conformity Level &
Reusability Level
Re-usability of Function (Block) libraries
Base Level
Portability of minimal systems
Application
Program
FB
FB
FB
Variable
Variable
Variable
Code
Code
Body
Body
March 31 st and April 1 st , 2009
Page 44 of 38
Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Certified products can use these logo ’s
Page 45 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
Page 46 of 38
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference
Page 47 of 38
PLCopen for efficiency in automation
IEC 61131.3 the Industrial Programming Standard
Information at www.PLCopen.org
P.O. Box 2015
NL 5300 CA Zaltbommel
The Netherlands
Tel: +31-418-541139
Fax: +31-418-516336
March 31 st and April 1 st , 2009 Mile High Industrial and Automation Conference