1、Hong Wang 2019/5/16,PLC Engineer Training,“Agenda”,the activities - introduction PLCopen the basis - introduction IEC 61131-3 the example - 7 steps to success,PLCopen: changing the world of industrial automation,Eelco van der Wal Managing Director PLCopen,PLCopen Mission,We want to be the leading as
2、sociation resolving topics related to control programming to support the use of international standards in this field.,Programming in its environment,Organization,TECHNICAL PROMOTIONAL COMMITTEES,PLCopen Standardization in Industrial Control programming,TC1: Standards,IEC 61131-3 is enhanced with Co
3、rrigendum & Amendments Development of joint PLCopen position for IEC Communication of information from IEC to PLCopen Improvement proposals Focused to update, published 2003,TC2: Functions,Definition of Function Block libraries & calling conventions for example Motion Control Library: the integratio
4、n of different technologies: logic and motion,TC2 TF Motion Control,Part 1 FBs released Nov. 2002 Part 2 Extensions - released June 05 Part 3 User Guidelines released April 2004 (on-going) Part 4 Interpolation under construction Part 5 Homing extensions V 0.99 for comments Over 20 companies certifie
5、d Check website for full list,TC3 : Certification without testing there is no standard,The IEC 61131 standard only gives basic rules for compliance Certification gives guidance for users towards real IEC 61131-3 programming systems (e.g. PLCopen certified list shows compliant products),TC3: PLCopen
6、Compliance Levels,Conformity Level & Reusability Level Re-usability of Function (Block) libraries,Base Level Portability of minimal systems,Compliance: Results,PLCopen Compliance Level,To take away the confusion, PLCopenhas defined 2 levels of compliance with a defined set of featureshas defined an
7、accreditation procedurehas accredited test institutesdeveloped test software, shared amongst membershas defined a certification procedureand has members with certified productsThis assures compliance now, and in the future.,Compliance: Results and Status Base Level (May 05),Accreditation installed:
8、two institutes accredited Base Level definition ready for IL, ST, FBD, LD and SFC Base Level Test software ready for IL, ST, FBD and SFC. LD in preparation Conformity Level and Reusability Level ready for ST first products certified 26 software packages certified (see website for status),TC4: Commun
9、ication,Communications interfaces Interfaces to add-on packages Application interchange format Mapping of Profibus has been done Mapping of CANopen has been done,TC5: Safety,Support for safe programming techniques Focus to IEC 61508 “Functional Safety of Safety Related systems” Guidelines for the us
10、e of the IEC standard Basis for easier commissioning In combination with the Function Blocks First results published April 2005,TC6 : XML,Opening up the development environments by specifying XML formats for IEC 61131-3,TC6: XML,Definition of XML schemes for all the IEC languages Representation of g
11、raphical information Interface to other tools Basis for distribution of Function Block libraries Released as V. 1.0 official release, in June 2005 Consists of a technical doc, the XML schema, and explanation.,TC6 - XML,Development tool,Other Development tool,Other Development tool,Producer of graphi
12、cal and logical information,Consumer of graphical and logical information,XML,XML,XML,XML,Coupling XML Schemes,PLCopen Schema,Supplier Schema,Differences,TC6 XML : status,Official release June 2005 Available on website www.plcopen.org for free dowload First implementations expected this year,General
13、 Promotion,PC1: General Promotion PC3: Promotion North America PC4: Promotion Japan PC5: Promotion China,PC2: Common training program,The effect of training is often underestimated Standardization can be very useful and provide a better interface between study and reality PC2 defined common basics f
14、or trainingfor instance: a IEC 61131-3 training guideline is published Training facilities fulfilling basic requirements can be certified and listed / referenced to (see website for listing),PLCopen as a World-wide association,Office in Japan,Main Office in Europe,Office in North America,Office in C
15、hina,IEC 61131-3“The best thing that happened to industrial control”Sugar Lantic on Automation Maillist,Fiction?,Imagine * you are in industrial control * working with 4 different brands of controls * using different dialects in their programming languages * struggling to match the level of your sof
16、tware engineers with the operators and maintenance people on the factory floor * & seeing that your competitor does better Why? Whats wrong ?,Out of the jungle,The current variety of problems can be vastly reduced via standardization. and such a standard is available,the future is here,TC1 : Standar
17、ds links to IEC 61131-3 Harmonizing the way people look to control,IEC 61131 and PLC Open MissionPLC Open is a vendor and product independent world-wide organization that brings greater value to users of Industrial Control Systems through the pursuit of the IEC 61131-3 software development standard,
18、Goals of IEC 61131.3 and PLC OpenPLC 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 institutesUltimate Goal: Por
19、tability of PLC programsProgram once run on any hardware platform not hardware specific or dependent,What is the IEC 61131 standard ? IEC 61131 is an international standard for programmable controllers consisting of 7 parts: Part 1: General information Part 2: Equipment characteristics Part 3: Progr
20、amming languages Part 4: User guidelines Part 5: Communication Part 7: Fuzzy logic Part 8: Technical report,International Language Standardization,Source: Dr. J. Christensen,77,78,79,81,80,93,94,95,70,82,83,84,85,87,86,88,89,90,91,92,DIN 19 239, Programmable Controller (Germany),Type 3 report recomm
21、endation,96,IEC 61131-3 name change,IEC 1131 versus IEC 61131,The good news is there is no difference It is an international harmonization of all the IEC standards and the localized versions,Advantages of IEC 61131-3,International accepted standard Step by step all suppliers will support it Uniform
22、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,Advantages of IEC 611
23、31-3,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 Availabi
24、lity of high level language Possibility to mix different languages,IEC 61131-3 Programming languages / Industrial Control Programming,Standardizing the way people work with controls,IEC 61131-3 Programming languages / Industrial Control Programming,.with support for peoplewith different backgrounds,
25、The 7 parts of the IEC 61131 Standard,- 1 General overview, definitions IS- 2 Hardware IS- 3 Programming Languages IS- 4 User Guidelines IS- 5 Messaging Service Specification IS- 7 Fuzzy Logic IS- 8 Technical ReportIS = International Standard,IEC 61131 - Part 1 - General Overview,Definitions and glo
26、ssary of terms used in the standard List of related / referenced IEC standards Principal functional characteristics of programmable controller systems,IEC 61131 - Part 2 - Hardware,Electrical, mechanical and functional requirements for Programmable Controllers and associated peripherals Service, sto
27、rage and transportation conditions Information to be supplied by manufacturer Test methods and procedures for verification of compliance of programmable controllers and associated peripherals,IEC 61131 - Part 3 - Programming Languages,Software-, communication- and programming-model Definition of fiv
28、e 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,IEC 61131 - Part 4 User Guidelines,Assists th
29、e user in: Utilizing the other parts of the programmable controller standard Specifying the requirements for applications Selecting and implementing systems,IEC 61131 - Part 5 Communication,Based on MMS (Manufacturing Message Specifications) (still in progress),IEC 61131 - Part 7 Fuzzy Logic,Provide
30、s the definition of fuzzy control sets,IEC 61131 - Part 8 Technical Report,Provides guidelines for the application and implementation of programming languages for programmable controller,The IEC 61131-3 Standard,IEC 61131-3: The Common Elements,IEC 61131-3 : Common Elements Variables & Data Types,Hi
31、storically Reference to a physical memory locationReference to a physical Input,IEC 61131-3 : Common Elements Variables & Data types,Temperature_Sensor_1 : IntegerSymbolic representation via labels Restricted area for I/O mapping Hardware independent software code Result: higher transparency & reada
32、bility And less errors,IEC 61131-3 Elementary Data Types,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 s
33、ingle 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 chann
34、el 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 Bo
35、olean 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)
36、 %ID2.1.7 is the 7th channel of the board #1 in the equipment #2 (integer input),IEC 61131-3 : Common Elements,Software ModelConfiguration Resources Tasks,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,Task
37、4,Resource L,FB3,global and direct addressed variables,Task association,Access path association,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 huma
38、n-machine 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 cal
39、l FBs and Functions FB Program organization unit Function Block, several in - and outputs possible, can call other FBs and Functions,Configuration,Communication Function,IEC 61131-3 Software Model,Configuration,Communication Function,Resource,Resource,IEC 61131-3 Software Model,Communication Functio
40、n,IEC 61131-3 Software Model,Execution control path,IEC 61131-3 Software Model,IEC 61131-3 Software Model,IEC 61131-3 vs conventional PLC,Common Elements: Tasks,IEC 61131-3,Common Elements : Tasks,Windows CE 3.0IEC 61131-3 tasksSCADA & HMI tasksI/O Communication tasksOPC,Multi functional Operator Pa
41、nel,I/O Communication bus,Task 1,Task 2,Task 3,Task 4,Time based,Events based,Events based,Time based,Conventional PLC vs IEC 61131-3,IEC61131-3,IEC 61131-3 : Common Elements,COMMON ELEMENTS a.o.Data Types & VariablesConfiguration, Resources, TasksProgramming Organization Units, POUsFunctionsFunctio
42、n BlocksPrograms,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 the body (instructions).,OB - Organization Block FC - Function FB - Function Block,Memory,Functions ,*
43、Standard functionsADD, SQRT, SIN, COS, GT, MIN, MAX, AND, OR, etc.* Your own defined functions: FUNCTION SIMPLE_FUN : REALVAR_INPUTA, B : REAL;C : REAL := 1.0;END_VARSIMPLE_FUN := A*B/C;END FUNCTION,. & Function Blocks,Standard Function Blocks Additional supplied Function Blocks Your own defined Fun
44、ction Blocks All FBs are highly re-usable in same program, different programs or project,Function Block example,Programs : design via building bricks,Structure & Advantages of POUs,Create own Function Block Libraries (per application area) FBs are tested and documented Make libraries (world wide) ac
45、cessible Re-use as much as possible Change programming to creating networks of FBs Save 40% on next project,The IEC 61131-3 Standard,The IEC 61131-3 Programming Languages,Instruction List Structured Text Sequential Function Chart,Function Block Diagram Ladder Diagram,LD A ANDN B ST C,C:= A AND NOT B
46、,A B C -| |-|/|-( ),Ladder Diagram (LD),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 progr
47、am 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 -| |-|/|-( ),Instruction List, or IL is a low level language. It is highly effective for
48、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.,LD I
49、X1 (* push button *) ANDN MX5 (* command is not forbidden *) ST QX2 (* start motor *),Instruction List (IL),High level language, Syntaxed structured Syntax resembles traditional programming codesuch 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(),