+ All Categories
Home > Documents > IEC61131 3 Basics

IEC61131 3 Basics

Date post: 30-Dec-2015
Category:
Upload: bmshivakumar
View: 59 times
Download: 2 times
Share this document with a friend
Popular Tags:
29
RW / March 00 1 Matsushita Electric Works (Europe) AG Table of contents Advantages of IEC61131-3 for programmers History and international standards 1970 to 1995 5 parts of the IEC61131 standard IEC61131-3 software models The 5 languages of the IEC61131-3 Function blocks and POUs IEC data types, standard functions and standard function blocks PLCopen certification PLCopen compliance levels PLCopen addresses IEC 61131-3 Basic Information
Transcript
Page 1: IEC61131 3 Basics

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

Table of contents● Advantages of IEC61131-3 for programmers

● History and international standards 1970 to 1995

● 5 parts of the IEC61131 standard

● IEC61131-3 software models

● The 5 languages of the IEC61131-3

● Function blocks and POUs

● IEC data types, standard functions and standard function blocks

● PLCopen certification

● PLCopen compliance levels

● PLCopen addresses

IEC 61131-3 Basic Information

Page 2: IEC61131 3 Basics

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

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

Page 3: IEC61131 3 Basics

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

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

Page 4: IEC61131 3 Basics

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

International Language Standardisation

Source: Dr. J. Christensen

77 78 79 8180 93 94 9570 82 83 84 85 8786 88 89 90 91 92

NEMA Programmable Controllers Committee formed (USA)GRAFCET (France)

IEC 848, Function Charts

DIN 40719, Function Charts (Germany)NEMA ICS-3-304, Programmable Controllers (USA)

IEC SC65A/WG6 formedDIN 19 239, Programmable Controller (Germany)

MIL-STD-1815 Ada (USA)

IEC SC65A(Sec)67

Type 3 reportrecommendation

96

IEC 65A(Sec)38, Programmable Controllers

IEC 1131-3

IEC SC65A(Sec)49, PC Languages

IEC 64A(Sec)90

IEC 61131-3name change

Return to Table of Contents

Page 5: IEC61131 3 Basics

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

The 5 Parts of The IEC 61131 Standard

Part 1 General overview, definitions ISPart 2 Hardware IS

I/O signals, safety requirements, environment

Part 3 Programming Languages ISPart 4 User GuidelinesPart 5 Communication

IS = International Standard

Return to Table of Contents

Page 6: IEC61131 3 Basics

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

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

Page 7: IEC61131 3 Basics

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

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

Page 8: IEC61131 3 Basics

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

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

Page 9: IEC61131 3 Basics

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

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

Page 10: IEC61131 3 Basics

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

IEC 61131 - Part 5 Communication

Based on MMS (Manufacturing Message Specifications)(still in progress)

Page 11: IEC61131 3 Basics

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

IEC 61131-3 Software Model

Configuration A

FB2

Program P1 Program P2

Task1 Task2

Resource L

access paths

FB1 FB4

Program P3 Program P4

Task3 Task4

Resource L

FB3

global and direct adressed variables

Task associationAccess path association

Return to Table of Contents

Page 12: IEC61131 3 Basics

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

Definition of Software Model Terms

ConfigurationA language element corresponding to a programmable controller systemResourceA language element corresponding to a signal processing function and itshuman-machine interface and sensor actuator functionsTaskAn execution control element providing for periodic or triggered execution of agroup of associated program organization unitsProgramHighest level program organization unit, several in - and outputs possible, cancall FBs and FunctionsFBProgram organization unit, several in - and outputs possible, can call other FBsand Functions

Page 13: IEC61131 3 Basics

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

The 5 Languages of IEC 61131-3

Instruction List Structured Text Sequential Function Chart

Function Block Diagram Ladder Diagram

LD A

ANDN B

ST C

C:= A AND NOT B

A B C

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

ANDA C

B

Step 1 N FILL

Step 3

Step 2 S Empty

Transition 1

Transition 2

Return to Table of Contents

Page 14: IEC61131 3 Basics

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

Ladder Diagram (LD)

Standardized, rationalized set of relayladder programming symbolsBased on well-known US style ofprogramming, resembling US-typeof electrical drawing standard

A B C

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

Page 15: IEC61131 3 Basics

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

Instruction List (IL)

Single Accumulator based execution modelBased upon the German ‘Anweisungsliste’, AWLOnly one operation such as storing a value in theaccumulator register, is allowed per line

LD A

ANDN B

ST C

Page 16: IEC61131 3 Basics

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

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

Page 17: IEC61131 3 Basics

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

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

ANDA C

Bchemistry

Page 18: IEC61131 3 Basics

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

Sequential Function Chart (SFC)

� 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 IEC-language

� 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 IEC-language

Step 1 N FILL

Step 3

Step 2 S Empty

Transition 1

Transition 2

Page 19: IEC61131 3 Basics

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

POU = Program Organization Unit

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 thebody (instructions).

POU Type Replicated as: CommentsProgram Program instance Main programFunction Block FB instance Subroutine with own

memory, several in -and outputspossible

Function Function Subroutine withoutmemory, only oneoutput possible

software

Return to Table of Contents

Page 20: IEC61131 3 Basics

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

IEC 61131-3 Standard Data Types

Bit string types (BOOL, BYTE, WORD, DWORD, LWORD)

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

Page 21: IEC61131 3 Basics

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

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

Page 22: IEC61131 3 Basics

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

IEC 61131-3 Standard Function Blocks

Bistables (SR, RS, SEMA)Edge detection (R_TRIG, F_TRIG)Counters (CTU, CTD, CTUD)Timers (TP, TON, TOF, RTC)

Vendor and user defined functionblocks are possible

Page 23: IEC61131 3 Basics

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

PLCopen

Mission

PLCopen is a vendor- and product-independent world-wide organization that brings greater value to users of

Industrial Control Systems through the pursuit of the IEC61131-3 software development standard

Return to Table of Contents

Page 24: IEC61131 3 Basics

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

The Essence of Compliancywithout testing there is no standard

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

Page 25: IEC61131 3 Basics

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

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.

Page 26: IEC61131 3 Basics

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

PLCopen Compliancy Levels

ApplicationProgram

FB

Variable

CodeBody

FB

Variable

CodeBody

FB

Variable

CodeBody

ApplicationProgram

FB

Variable

CodeBody

FB

Variable

CodeBody

FB

Variable

CodeBody

Full Compliance Level(future goal)

Portability of applications

Portability Level (in progress)Portability of Function (Block) libraries

Base Level (exists)Portability of minimal systems

Return to Table of Contents

Page 27: IEC61131 3 Basics

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

Compliancy: Base Level

Certified productscan use this logo

Page 28: IEC61131 3 Basics

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

PLCopen, a worldwide organisationP.O. Box 2077NL 5300 CB ZaltbommelNetherlands

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

BBS: 31-418-518383

email: [email protected]

7th Floor Land Corp Bldg.,Arai 2-1-1Nakano-Ku, Tokyo 165Japan

Tel: 81-3-5380-5867Fax: 81-3-5380-5862email: [email protected]

10229 North Scottsdale Road,Suite BScottsdale, AZ 85253-1437USA

Tel: 1-602-951-1107Fax: 1-602-951-1963

Return to Table of Contents

Page 29: IEC61131 3 Basics

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

Thank you very muchfor your attention!


Recommended