You are on page 1of 29

IEC 61131-3 Basic Information Table of contents

G Advantages of IEC61131-3 for programmers G History and international standards 1970 to 1995 G 5 parts of the IEC61131 standard G IEC61131-3 software models G The 5 languages of the IEC61131-3 G Function blocks and POUs G IEC data types, standard functions and standard function blocks G PLCopen certification G PLCopen compliance levels G PLCopen addresses

Matsushita Electric Works (Europe) AG


RW / March 00 1

Advantages of IEC 61131-3

Internationally accepted standard


Step by step all suppliers will have it in the future Uniform structures, languages and way of handling by all suppliers

It saves you time


Unique software model and data/type concept You only have to learn once for all PLC types Reduced misunderstandings and errors Standard functions and function blocks Reusability of tested software
Return to Table of Contents
Matsushita Electric Works (Europe) AG
RW / March 00 2

Advantages of IEC 61131-3

Supports safety and quality programming


Easy and comfortable structuring Data typing prohibits programming errors

Provides the best language for each problem


Consistent specifications for 5 programming languages Textual and graphical languages Availability of high-level language Possibility to combine different languages

Matsushita Electric Works (Europe) AG


RW / March 00 3

International Language Standardisation

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 IEC 61131-3 name change
70 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96

Source: Dr. J. Christensen


Matsushita Electric Works (Europe) AG

Return to Table of Contents


RW / March 00 4

The 5 Parts of The IEC 61131 Standard

Part 1 Part 2 Part 3 Part 4 Part 5

General overview, definitions Hardware


I/O signals, safety requirements, environment

IS IS IS

Programming Languages User Guidelines Communication

IS = International Standard

Return to Table of Contents


Matsushita Electric Works (Europe) AG
RW / March 00 5

IEC 61131 - Part 1 - General Overview

Definitions and glossary of terms used in the standard List of related / referenced IEC standards Principal functional characteristics of programmable controller systems

Matsushita Electric Works (Europe) AG


RW / March 00 6

IEC 61131 - Part 2 - Hardware

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

Matsushita Electric Works (Europe) AG


RW / March 00 7

IEC 61131 - Part 3 - Programming Languages

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

Matsushita Electric Works (Europe) AG


RW / March 00 8

IEC 61131 - Part 4 User Guidelines

Assists the user in: Utilizing the other parts of the programmable controller standard Specifying the requirements for applications Selecting and implementing systems

Matsushita Electric Works (Europe) AG


RW / March 00 9

IEC 61131 - Part 5 Communication Based on MMS (Manufacturing Message Specifications) (still in progress)

Matsushita Electric Works (Europe) AG


RW / March 00 10

IEC 61131-3 Software Model

Configuration A
Resource L Task1
Program P1

Resource L Task2
Program P2

Task3
Program P3

Task4
Program P4

FB1

FB2

FB3

FB4

global and direct adressed variables access paths


Task association Access path association

Return to Table of Contents


Matsushita Electric Works (Europe) AG
RW / March 00 11

Definition of Software Model Terms Configuration


A language element corresponding to a programmable controller system

Resource
A language element corresponding to a signal processing function and its human-machine interface and sensor actuator functions

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, several in - and outputs possible, can call other FBs and Functions

Matsushita Electric Works (Europe) AG


RW / March 00 12

The 5 Languages of IEC 61131-3

Instruction List LD ANDN ST A B C

Structured Text C:= A AND NOT B

Sequential Function Chart Step 1 N FILL

Transition 1 Ladder Diagram A B C C Step 3 Step 2 S Empty

Function Block Diagram AND A B

Transition 2

-| |--|/|----------------( )

Return to Table of Contents


Matsushita Electric Works (Europe) AG
RW / March 00 13

Ladder Diagram (LD)

Standardized, rationalized set of relay ladder programming symbols Based on well-known US style of programming, resembling US-type of electrical drawing standard

A B

-| |--|/|----------------( )

Matsushita Electric Works (Europe) AG


RW / March 00 14

Instruction List (IL)

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 ANDN ST

A B C

Matsushita Electric Works (Europe) AG


RW / March 00 15

Structured Text (ST)

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

Matsushita Electric Works (Europe) AG


RW / March 00 16

Function Block Diagram (FBD) 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 B C

chemistry

Matsushita Electric Works (Europe) AG


RW / March 00 17

Sequential Function Chart (SFC)


Graphical Graphicallanguage languagewhich whichprovides providesa a diagrammatic diagrammaticrepresentation representationof ofprogram program sequences sequences--> -->flowchart flowchart Based Basedon onthe theFrench FrenchGrafcet Grafcet(IEC (IEC848) 848) Main Mainstructure structureand andsuitable suitablefor forrapid rapid diagnostics diagnostics The Thebasic basicelements elementsare aresteps stepswith withaction action blocks blocksand andtransitions transitions Steps Stepsconsist consistof ofa apiece pieceof ofprogram programthat thatis is carried carriedout outuntil untila acondition conditionspecified specifiedin inthe the transition transitionis ismet met Programming Programmingof ofcomplex complextasks tasksby bydividing dividingin in smaller smallerparts parts Each Eachelement elementcan canbe beprogrammed programmedin inany any IEC-language IEC-language
Matsushita Electric Works (Europe) AG
RW / March 00 18

Step 1

FILL

Transition 1 Step 2 S Empty

Transition 2 Step 3

POU = Program Organization Unit


re a w oft

POUs 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 Replicated as: Program instance FB instance Comments Main program Subroutine with own memory, several in and outputs possible Subroutine without memory, only one output possible

Function

Function

Return to Table of Contents


Matsushita Electric Works (Europe) AG
RW / March 00 19

IEC 61131-3 Standard Data Types


(BOOL, BYTE, WORD, DWORD, LWORD) Bit string types Integer types (SINT, INT, DINT, LINT) Unsigned integer types (USINT, UINT, UDINT, ULINT) Real types (REAL, LREAL) Time types (TIME, DATE, TIME_OF_DAY, DATE_AND_TIME) Character types (STRING)

Vendor and user defined data types are possible

Return to Table of Contents


Matsushita Electric Works (Europe) AG
RW / March 00 20

IEC 61131-3 Standard Functions 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

Matsushita Electric Works (Europe) AG


RW / March 00 21

IEC 61131-3 Standard Function Blocks

Bistables 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

Matsushita Electric Works (Europe) AG


RW / March 00 22

PLCopen

Mission
PLCopen is a vendor- and product-independent worldwide organization that brings greater value to users of Industrial Control Systems through the pursuit of the IEC 61131-3 software development standard
Return to Table of Contents
Matsushita Electric Works (Europe) AG
RW / March 00 23

The Essence of Compliancy


without testing there is no standard

The IEC 61131 standard gives rules for compliancy Certification guides users towards real IEC 61131-3 programming systems (e.g. PLCopen certified list shows compliant products)

Matsushita Electric Works (Europe) AG


RW / March 00 24

PLCopen Compliancy Level To take away the confusion, PLCopen.... .... has defined 3 levels of compliancy with a defined set of features .... has defined an accreditation procedure .... has accredited test institutes .... developed test software, shared among members .... has defined a certification procedure .... and has members with certified products This assures compliancy now and in the future.

Matsushita Electric Works (Europe) AG


RW / March 00 25

PLCopen Compliancy Levels

Full Compliance Level (future goal) Portability of applications

Application Program FB Variable Code Body FB FB Variable Variable Code Code Body Body
Base Level (exists) Portability of minimal systems Portability Level (in progress) Portability of Function (Block) libraries

Application Program FB Variable Code Body FB FB Variable Variable Code Code Body Body

Return to Table of Contents


Matsushita Electric Works (Europe) AG
RW / March 00 26

Compliancy: Base Level Certified products can use this logo

Matsushita Electric Works (Europe) AG


RW / March 00 27

PLCopen, a worldwide organisation


10229 North Scottsdale Road, Suite B Scottsdale, AZ 85253-1437 USA Tel: 1-602-951-1107 Fax: 1-602-951-1963

P.O. Box 2077 NL 5300 CB Zaltbommel Netherlands

7th Floor Land Corp Bldg., Arai 2-1-1 Nakano-Ku, Tokyo 165 Japan Tel: 81-3-5380-5867 Fax: 81-3-5380-5862
email: yoshio@mugen.com

Tel: 31-418-541139 Fax: 31-418-515115 BBS: 31-418-518383


email: evdwal@plcopen.org

Return to Table of Contents


Matsushita Electric Works (Europe) AG
RW / March 00 28

Thank you very much for your attention!

Matsushita Electric Works (Europe) AG


RW / March 00 29

You might also like