1 / 84

PROGRAMACIÓN DE PLCs

Learn about PLC programming and the traditional ladder diagram used to represent electrical sequences of operations.

jjanssen
Download Presentation

PROGRAMACIÓN DE PLCs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PROGRAMACIÓN DE PLCs

  2. EL PLC Y EL DIAGRAMA LADDER • The ladder diagram has and continues to be the traditional way of representing electrical sequences of operations. These diagrams represent the interconnection of field devices in such a way that the activation, or turningON, of one device will turn ON another device according to a predetermined sequence of events.

  3. EL LADDER PROGRAM

  4. SOL6 LS1 FS2 Ejemplo de Direccionamiento L1 L2 L1 L2 PB1 I:1/2 O:3/1 I:1/1 I:1/3 | | | | | | ( ) ELEMENTO PB1 LS1 FS2 SOL6 DIRECCIÓN I:1/1 I:1/2 I:1/3 O:3/1

  5. IEC 61131-3 Software: changing the world of industrial automation -the status, the structuring tools, the activities and the libraries

  6. IEC 61131-3Harmonizing the way people look to control the future is here

  7. 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 software engineers with the electrical engineers / maintenance on the factory floor & seeing that your competitor does better Why? What’s wrong ?

  8. Out of the jungle The current variety of problems can be vastly reduced via standardization ... and such a standard is available

  9. IEC 61131-3 “The best thing that happened to industrial control”

  10. The 5 parts of the IEC 61131 Standard - 1 General overview, definitions IS - 2 Hardware IS - 3 Programming Languages IS - 4 User Guidelines - 5 Messaging Service Specification IS = International Standard

  11. IEC 61131-3 Programming languages /Industrial Control Programming The interface between the programmer and the control system

  12. IEC 61131-3 Programming languages /Industrial Control Programming ...with support for people with different backgrounds

  13. Common Elements Programming Languages The IEC 61131-3 Standard

  14. What is this? 01010101 10101010 IEC 61131-3 : Common ElementsVariables & Data Types • Historically • Reference to a physical memory location • Reference to a physical Input

  15. IEC 61131-3 : Common ElementsVariables & Data types • Temperature_Sensor_1 : Integer • Symbolic representation via labels • Restricted area for I/O mapping • Hardware independent code • Higher transparency & readability • Less errors

  16. IEC 61131-3 : Common Elements Software Model • Configuration • Resources • Tasks

  17. IEC 61131-3 Software Model Configuration Communication Function

  18. IEC 61131-3 Software Model Configuration Resource Resource Communication Function

  19. Configuration Resource Resource Task Task Task Task IEC 61131-3 Software Model Communication Function

  20. Configuration Resource Resource Task Task Task Task Program Program Program Program Communication Function IEC 61131-3 Software Model Execution control path

  21. Configuration Variable access path Resource Resource Task Task Task Task FB Function Block Program Program Program Program Variable FB FB FB FB Global and direct variables Execution control path Access path Communication Function IEC 61131-3 Software Model

  22. Configuration Variable access path Resource Resource Task Task Task Task FB Function Block Program Program Program Program Variable FB FB FB FB Global and direct variables Execution control path Access path Communication Function IEC 61131-3 vs conventional PLC

  23. Endless Loop: Resource Task Read inputs Do Calculations Set Outputs Program Conventional PLC vs IEC 61131-3 Task 1 Time based Task 2 Events based Task 3 Events based Task 4 Time based

  24. DCS PC based Control PLCs SoftLogic LON nodes Embedded Drives Common Elements: Tasks IEC 61131-3

  25. RPM =2000 Common Elements : Tasks & Datatypes Multi –functional Operator Panel Windows CE 3.0 IEC 61131-3 tasks SCADA & HMI tasks I/O Communication tasks OPC I/O Communication bus

  26. COMMON ELEMENTS • a.o. • Data Types & Variables • Configuration, Resources, Tasks • Programming Organization Units • Functions • Function Blocks • Programs IEC 61131-3 : Common Elements

  27. Functions ….. * Standard functions ADD, SQRT, SIN, COS, GT, MIN, MAX, AND, OR, etc. * Your own defined functions: FUNCTION SIMPLE_FUN : REAL VAR_INPUT A, B : REAL; C : REAL := 1.0; END_VAR SIMPLE_FUN := A*B/C; END FUNCTION

  28. Hysterisis REAL XIN1 BOOL Q XIN2 REAL EPS REAL …. & Function Blocks • Standard Function Blocks

  29. Hysterisis REAL XIN1 BOOL Q XIN2 REAL EPS REAL …. & Function Blocks • Standard Function Blocks • Additional supplied Function Blocks

  30. Hysterisis REAL XIN1 BOOL Q XIN2 REAL EPS REAL …. & Function Blocks • Standard Function Blocks • Additional supplied Function Blocks • Your own defined Function Blocks

  31. Hysterisis REAL XIN1 BOOL Q XIN2 REAL EPS REAL …. & Function Blocks • Standard Function Blocks • Additional supplied Function Blocks • Your own defined Function Blocks • All FBs are highly re-usable in same program, different programs or project

  32. Hysterisis REAL XIN1 BOOL Q XIN2 REAL EPS REAL Q 1 0 EPS EPS XIN2 Function Block example

  33. FUNCTION_BLOCK HYSTERISIS VAR_INPUT XIN1, XIN2 : REAL; EPS : REAL; (* Hysterisis band *) END_VAR VAR_OUTPUT Q : BOOL := 0 END_VAR IF Q THEN IF XIN1 < (XIN2-EPS) THEN Q := 0 (* XIN1 decreasing *) END_IF; ELSIF XIN1 > (XIN2 + EPS ) THEN Q := 1; (* XIN1 increasing *) END_IF; END_FUNCTION_BLOCK Hysterisis REAL XIN1 BOOL Q XIN2 REAL EPS REAL Q 1 0 EPS EPS XIN2 Function Block example

  34. Start : BOOL; Emergency : BOOL; Limit : INT; Automation application INPUT EXTERNAL OUTPUT IN_OUT FUNCTION_BLOCK PROGRAM Type Local Type Local GLOBAL INPUT FUNCTION Type Local Programs : hierarchical design

  35. Advantages POU’s • Create own Function Block Libraries (per application area) • FBs are tested and documented • Make libraries (world wide) accessable • Re-use as much as possible • Change programming to creating networks of FBs • Save 40% on next project

  36. IEC 61131-3 : Common Elements COMMON ELEMENTS a.o. Data Types Variables Program Organization Units * Functions * Function Blocks * Programs Configuration, Resources, Tasks Sequential Function Chart * Steps * Transitions * Actions Blocks

  37. Step 1 N FILL Transition 1 Step 2 S Empty Transition 2 Step 3 Sequential Function Chart, SFC • Powerful graphical technique for describing the sequential behavior of a control program • Used to partition a control problem • Shows overview, also suitable for rapid diagnostics

  38. Step 1 N FILL Transition 1 Step 2 S Empty Transition 2 Step 3 Sequential Function Chart, SFC • Powerful graphical technique for describing the sequential behaviour of a control program • Used to partition a control problem • Shows overview, also suitable for rapid diagnostics • The basic elements are STEPS with ACTION BLOCKS and TRANSITIONS • Support for alternative and parallel sequences

  39. Step 1 N FILL Transition 1a Transition 1b Step 2 b S Empty Transition 2a Transition 2b Step 3 SFC : alternative sequences Step 2 a S Empty

  40. Common Elements Programming Languages The IEC 61131-3 Standard

  41. LD A ANDN B ST C C:= A AND NOT B A B C -| |--|/|----------------( ) AND A C B The IEC 61131-3 Programming Languages Instruction List Structured Text Function Block Diagram Ladder Diagram

  42. Ladder Diagram (LD) • Standardized, rationalized set of relay ladder programming symbols • Based on well-known North american style of programming, resembling US-type of electrical drawing standard A B C -| |--|/|----------------( )

  43. Instruction List (IL) • Single Accumulator based execution model • Based upon the German ‘Anweisungsliste’, AWL • One operation such as storing a value in the accumulator register, is allowed per line LD A ANDN B ST C

  44. 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

  45. AND A C B 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 chemistry

  46. Top Down Common Elements Programming Languages Bottom Up The IEC 61131-3 Standard

  47. IEC Programming Environments Many of them offer: • graphical programming screens • support for multiple windows • mouse operation • pull-down menus • built-in hypertext help function • software verification during design

More Related