Plc (programming)

24,087 views
23,768 views

Published on

To Download , http://filepost.com/files/1f27d5ad/PLC_(Programming).pptx/

Published in: Sports, Technology, Business
7 Comments
16 Likes
Statistics
Notes
  • Search more than 5000 IT certified Trainers at http://www.todaycourses.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Programming Languages --- http://amzn.to/1ZgAe7Z
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Programming Language Pragmatics, Third Edition --- http://amzn.to/1VqOTgR
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Concepts of Programming Languages (11th Edition) --- http://amzn.to/1SbeK9Q
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • thank you, file not found in download link
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
24,087
On SlideShare
0
From Embeds
0
Number of Embeds
379
Actions
Shares
0
Downloads
1,341
Comments
7
Likes
16
Embeds 0
No embeds

No notes for slide

Plc (programming)

  1. 1. 1
  2. 2. TYPES OF PLC LANGUAGESThe three types of programming languages used inPLCs are:• Ladder• Boolean• Grafcet 2
  3. 3. LADDER LANGUAGE 3
  4. 4. Enhanced functional block format 4
  5. 5. PLC Instruction Set Classifications 5
  6. 6. These instruction categories include:• ladder relay• timing• counting• program/flow control• arithmetic• data manipulation• data transfer• special function (sequencers)• network communication 6
  7. 7. BOOLEANSome PLC manufacturers use Boolean language, also calledBoolean mnemonics, to program a controller. 7
  8. 8. GRAFCET•Grafcet (Graphe Fonctionnel de Commande ÉtapeTransition) is a symbolic, graphic language, whichoriginated in France, that represents the controlprogram as steps or stages in the machine or process.•In fact, the English translation of Grafcet means “steptransition function charts.”•As the IEC 1131 standard’s sequential function charts(SFCs), which allow several PLC languages to be used inone control program. 8
  9. 9. 9
  10. 10. Grafcet translation 10
  11. 11. LADDER DIAGRAM FORMAT•A ladder rung is TRUE when it has logic continuity.•Logic continuity exists when power flows through the rungfrom left to right.•The execution of logic events that enable the output providethis continuity. 11
  12. 12. Illustration of several different continuity paths in a ladder rung 12
  13. 13. Monitoring device showing(a)Power continuity through the rung—inputs 11 and 12 are ON, turning output 40 ON.(b)Power continuity through only input 12, thus output 40 is not ON. 13
  14. 14. Functional block instructions(a) one enable line and one output(b) one enable line, a start timing command, and two outputs. 14
  15. 15. A functional block instruction that is always enabledTo make a block active at all times without any driving logic, theuser can omit all contact logic and place a continuity line in theblock during programming 15
  16. 16. The ladder rung matrix•It determines the maximum number of ladder contactelements that can be used to program a rung.•The size of this matrix differs among both PLC manufacturersand the programming devices used 16
  17. 17. Ladder matrix(a)functional block instructions(b)Enhanced ladder format functional instructions. 17
  18. 18. •One rule, which is present in almost all PLCs, preventsreverse (i.e., right-to-left) power flow in a ladder rung.•PLC logic does not allow reverse power to avoid sneakpaths.•Sneak paths occur when power flows in a reversedirection through an undesired field device, thuscompleting a continuity path.•If a PLC’s logic requires reverse power flow, the usermust reprogram the rung with forward power flow toall contact elements. 18
  19. 19. 19
  20. 20. 20
  21. 21. EXAMINE-ON/NORMALLY OPEN EXAMINE-OFF/NORMALLY CLOSED 21
  22. 22. OUTPUT COIL 22
  23. 23. LATCH/UNLATCH OUTPUT COIL 23
  24. 24. ONE-SHOT OUTPUT 24
  25. 25. TRANSITIONAL CONTACT 25
  26. 26. Ladder rung where all outputs turn ON in the same scan 26
  27. 27. Ladder rung where the outputs turn ON in different scans 27
  28. 28. TIMER INSTRUCTIONS 28
  29. 29. 29
  30. 30. Hardwired circuit with time-delay and instantaneous contacts 30
  31. 31. ON-DELAY ENERGIZE/ DE-ENERGIZE TIMER 31
  32. 32. OFF-DELAY ENERGIZE/ DE-ENERGIZE TIMER 32
  33. 33. COUNTER INSTRUCTIONS 33
  34. 34. Counter function block withup, down, and reset counter instructions 34
  35. 35. Automatically resetting counter 35
  36. 36. Program/flow control instructions•They direct the flow of operations, as well asthe execution of instructions, within a ladderprogram.•They perform these functions using branchingand return instructions, which are executedwhen certain already programmed control logicconditions occur. 36
  37. 37. 37
  38. 38. 38
  39. 39. Example of an MCR instruction 39
  40. 40. Example of a jump to instruction 40
  41. 41. PLC with assigned subroutines at the end of the program 41
  42. 42. User-created subroutine area 42
  43. 43. ARITHMETIC INSTRUCTIONS 43
  44. 44. Arithmetic Instructions(a) Coil (b) contact (c) block format. 44
  45. 45. DATA MANIPULATION INSTRUCTIONS 45
  46. 46. DATA TRANSFER INSTRUCTIONS 46
  47. 47. SPECIAL FUNCTION INSTRUCTIONS 47
  48. 48. A sequencer (SEQ) block 48
  49. 49. Sequencer instruction block 49
  50. 50. DIAGNOSTICSA diagnostics (DIAG) block instruction compares twomemory blocks. 50
  51. 51. PID functional block 51
  52. 52. 52
  53. 53. Operation of a network output coil and a network contact instructions. Note that contact 20 in PLC #2 is a local contact 53
  54. 54. Network Send/Receive 54
  55. 55. BOOLEAN MNEMONICSIt is a PLC language based primarily on the Boolean operatorsAND, OR, and NOT. 55
  56. 56. INTRODUCTION TO THE IEC 1131The International Electrotechnical Commission(IEC) SC65B-WG7 committee developed the IEC1131 standard in an effort to standardizeprogrammable controllers.One of the committee’s objectives was tocreate a common set of PLC instructions thatcould be used in all PLCs. 56
  57. 57. It defines two graphical languages and two text-basedlanguages for use in PLC programming.The graphical languages use symbols to program controlinstructions, while the text-based languages usecharacter strings to program instructions.Graphical languages• ladder diagrams (LD)• function block diagram (FBD)Text-based languages• instruction list (IL)• structured text (ST) 57
  58. 58. The five IEC 61131-3 Programming languagesFunction Block Diagram (FBD) graphical languages Sequential Flow Chart (SFC) AUTO CALC1 START STEP DI CALC PUMP V IN1 OUT >=1 DO T1 MAN_ON V N ACTION D1 D1_READY STEP A ACT IN2 D ACTION D2 D2_READY T2 N ACTION D3 D3_READY STEP BLadder Diagram (LD) D ACTION D4 D4_READY CALC1 T3 AUTO CALC PUMP IN1 OUT ACT textual languages Structured Text (ST) IN2 VAR CONSTANT X : REAL := 53.8 ; MAN_ON Z : REAL; END_VAR VAR aFB, bFB : FB_type; END_VAR bFB(A:=1, B:=„OK‟);Instruction List (IL) Z := X - INT_TO_REAL (bFB.OUT1); A: LD %IX1 (* PUSH BUTTON *) IF Z>57.0 THEN aFB(A:=0, B:=“ERR”); ANDN %MX5 (* NOT INHIBITED *) ELSE aFB(A:=1, B:=“Z is OK”); ST %QX2 (* FAN ON *) END_IF 58
  59. 59. 59
  60. 60. Limit switch addressed(a) a standard PLC environment (b) an IEC 1131-3 environment 60
  61. 61. •Ladder diagram language (LD) uses astandardized set of ladder programmingsymbols to implement control functions.•Instruction list (IL) is a low-level languagesimilar to the machine or assembly languageused with microprocessors. This type oflanguage is useful for small applications, as wellas applications that require speed optimizationof the program or a specific routine in theprogram. 61
  62. 62. 62
  63. 63. •Structured text (ST) is a high-level language that allowsstructured programming, meaning that many complextasks can be broken down into smaller ones. STresembles a BASIC- or PASCAL-type computer language.Structured text programming is particularly suited toapplications involving data handling, computationalsorting, and intensive mathematical applicationsutilizing floating-point values.ST is also the best language for implementing artificialintelligence (AI) computations, fuzzy logic, and decisionmaking. 63
  64. 64. 64
  65. 65. SEQUENTIAL FUNCTION CHARTS (SFC)Sequential functional chart, or SFC, is a graphical“language” that provides a diagrammaticrepresentation of control sequences in a program.Basically, sequential function chart is a flowchart-like framework that can organize the subprogramsor subroutines (programmed in LD, FBD, IL, and/orST) that form the control program. 65
  66. 66. The SFC programming framework contains three mainelements that organize the control program:• steps A step is a stage in the control process.• transitions After the PLC executes a step/action, it must receive a transition before it will proceed to the next step.• actions Each step may or may not have an action associated with it. An action is a set of control instructions prompting the PLC to execute a certain control function during that step. 66
  67. 67. Sequential function chart of a mixing process 67
  68. 68. Comparison of an SFCdiagram and a flowchart 68
  69. 69. Macrostep within an SFC program 69
  70. 70. Graphic symbols used in SFCs 70
  71. 71. (a) Level 1 SFC level 2 SFC 71
  72. 72. PROGRAMMING NORMALLY CLOSED TRANSITIONS 72
  73. 73. DIVERGENCES AND CONVERGENCESA divergence is when an SFC element has many links going out ofit, while a convergence is when an element has many linkscoming into it. 73
  74. 74. OR Divergences and Convergences 74
  75. 75. AND Divergences and Convergences 75
  76. 76. 76
  77. 77. General PLC architecture RS 232 Ethernet Real-Time flash serial port ethernet CPU ROM Clock EPROM controller controller extension bus parallel bus buffers fieldbus analog- digital- external Digitalcontroller digital analog Digital Output I/Os Input converters converters signal power signal relays conditioning amplifiers conditioningfield bus direct Inputs and Outputs 77
  78. 78. I/O bus network block diagram 78
  79. 79. Connection between a PLC, a local area network, and an I/O bus network 79
  80. 80. TYPES OF I/O BUS NETWORKSI/O bus networks can be separated into two differentcategories—one that deals with low-level devices thatare typical of discrete manufacturing operations andanother that handles high-level devices found inprocess industries.These bus network categories are:• device bus networks• process bus networks 80
  81. 81. I/O bus network classification diagram 81
  82. 82. Network and protocol standards 82
  83. 83. InterBus-S I/O network interface connected to a Siemens PLC 83
  84. 84. An InterBus-S network with ahost controller interface to a PLC 84
  85. 85. ASI bit-wide device bus network 85
  86. 86. I/O bus network using theCANbus and ASI networks 86
  87. 87. Process bus configuration 87
  88. 88. Bridge connecting low-speed and high-speed Fieldbus networks 88
  89. 89. Profibus hierarchy 89
  90. 90. DeviceNet I/O bus port connections 90
  91. 91. 91
  92. 92. 92

×