Li354 plc lects 2011a

406
-1

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
406
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Li354 plc lects 2011a

  1. 1. I.LI354 Programmable Logic Controller Докторант . Д. Пү рэвмагнай 1
  2. 2. Үйлдвэрлэлийн Технологи, Дизайны Сургууль Шинжлэх Ухаан Технологийн Их Сургууль Д. Пү рэвмагнай Add. Монгол, Улаанбаатар, Багатойруу Tel: +976-96638295 E-mail: 2 magnai@must.edu.mn, magnai320@yahoo.com
  3. 3. Сэдэв: 1. Удирдатгал 2. Түүх 3. PLCийн шинж чанар 4. PLC ийн ерөнхий фунцүүп 5. PLCийн ажиллах зарчим 6. PLCийн ангилал 7. PLCийн программчлал 8. Advantages and Disadvantages 9. PLCийн хэрэглээ PLCs’ Applications 10. PLCийн техник хангамж PLC hardwares 11. Жишээ 3
  4. 4. 4
  5. 5. Process Control & Automation 5
  6. 6. Технологийн процессын автоматжуулалтын үе шат PLC CONTROL ELECTRONIC CONTROL HARD WIRED CONTROL MANUAL CONTROL 6
  7. 7. MANUAL CONTROL БУЮУ ГАР УДИРДЛАГА Энэ үед удирдлага болон тохируулгын бүхий л үйл явц хүний үйлдлээр хийгддэг. Гар удирдлагатай тохиолдолд хүнээс шалтгаалах алдаанаас хамааран бүтээгдэхүүний чанар харилцан адилгүй байх ба бүтээгдэхүүний өртөг өндөр байдаг 7
  8. 8. HARD WIRED БУЮУ РЕЛЕЙН ЛОГИК УДИРЛАГА 8 Автоматжуулалтын хөгжилийн эхний үед тоолууртай релей ашилагдаж байсан. Удирдлагын программыг өөрчлөх тохилдолд Програмп тохируулан релей тоолууруудын холболтыг өөрчлөх шаардлага үүсдэг байсан. Энэ бүх үйлд ажиллагааг өнөө үеп PLC хийх болсон
  9. 9. ELECTRONICS CONTROL БУЮУ ЭЛЭКТРОН УДИРДЛАГА Энэ үед удирдлагын хэлхээнд логик үйлдэлүүд гүйцэтгэдэг элементүүдийг хэрэглэж эхэлсэн. Хуучиг биметал мотоын таймер ашигладаг байсан бол түүнийг электрон тоолуураар сольсон Ингэснээр: • Îðîí çàéã õýìíýñýí • Ýíåðãè õýìíýñýí • Çàñâàð ¿éë÷èëãýý áàãàññàí 9
  10. 10. PROGRAMMABLE LOGIC CONTROLLER БУЮУ ПРОГРАММЧЛАГДАХ ЛОГИК УДИРДЛАГА PLC бол микропроцессор дээр суурилсан логик зарчимаар ажилладаг автомат удирдлага юм. 10
  11. 11. PLC-ийн тухай Programmable logic controller (PLC) буюу программчлагдах логик контроллер нь төрөл бүрийн технологийн процессыг автоматжуулахад ашиглагддаг дижитал компьютер юм.  Энэхүү автомат систем нь хуучин зуу эсвэл мянган релей болон таймер ашигладаг байсныг ганц PLC-ээр сольж программчилах боломжийг бүрдүүлж байгаа юм.  11
  12. 12. Түүх : •1960-аад оноос үүсэж жхжлсжн бөгөөд •PLC нь 1970 оноос эхлэн үйлдвэрлэлийн удирдлагад өргөнөөр ашиглаж эхэлсэн. • PLC нь анх Америкийн машин үйлдвэрлэгчийн (General motors) захиалгаар зохиогдсон. •1980-аад оноос үнэ нь бууж эхэлсэн • Одоо маш олон үйлдвэрлэлд өргөнөөр ашиглаж байна. 12
  13. 13. Уламжлалт төхөөрөмжүүд Devices Релей Relays Контактор Contactors Мотор асаагуур Motor Starters Гар үйлдэлт унтраалга Manually operated switches Механик үйлдэлт унтраалга Mechanically operated switches Цахилгаан үйлдэлт унтраалга Electrically operated switches 13
  14. 14. Релей Relays Удирдлагын үндсэн элемент Original control elements Одоо бол туслах элементээр ашиглаж байна. Now used as auxiliary devices The PLC is not designed to switch high currents or voltages CR1-1 CR1 14
  15. 15. Manually Operated Switches Даралтат товчлуур Pushbuttons Хэвийн нээлттэй Normally open Хэвийн хаалттай Normally closed Selector switches Maintained or spring return 15
  16. 16. Механик үйлдэлтэй Унтраалга Mechanically Operated Switches Хязгаарын унтраалга Limit Switches Температурын унтраалга Temperature Switches Даралтын унтраалга Pressure Switches Түвшиний унтраалга Level Switches 16
  17. 17. Цахилгаан үйлдэлтэй унтраалга Electrically Operated Switches Фотоэлектрик унтраалга Photoelectric Switches Орон зайн унтраалга Proximity Switches 17
  18. 18. PLC-ийн шинж чанар Characteristics of PLC (1) Универсал байдал, уян хатан ба энгийн монтажтай Versatility, flexibility and simple wiring (2) Хүчтэй функцүүдтэй Strong function and expanpsion (3) Өндөр найдвартай High reliability and strong antiinterference (4) Программчлагддаг ба Programming and wiring can synchronously 18
  19. 19. PLC-ийн шинж чанар Characteristics of PLC (1)Универсал байдал, уян хатан ба цахилгааны энгийн монтажтай PLC ийг удирдлагын системд төрөл бүрийн байдлаар ашиглаж болдог. Тухайн PLC –г өөр төрлийн удирдлагад ашиглахыг тулд техникийн өөрчлөл хийх шаардлагагүй бөгөөд зөвхөн программчлалын хувьд өөрчлөлт хийх шаардлагатай "soft wiring" 19
  20. 20. PLC-ийн шинж чанар Characteristics of PLC (2) Хүчтэй функцүүдтэй Strong function and expanpsion Удирдлагын программчлал Аналоги-Тоон болон Тоон-Аналоги хувиргалт Өгөгдөл дамжуулах процесс буюу сүлжээ 20
  21. 21. PLC-ийн шинж чанар Characteristics of PLC (3) Өндөр найдвартай High reliability and strong anti-interference Hardware: Цахилгаан соронзон хамгаалалт, щүүлтүүр, оптик холболт, хөндлөнгийн нөлөөлөлөөс хамгаалах. Software: Мэдээлэл хамгаалах, программчлалыг шалгах систем 21
  22. 22. PLC-ийн үндсэн функц Аналоги удирдлага Логик удирдлага PLC Closed-loop удирдлага 22 Тооцоолуур Network Сүлжээ
  23. 23. (1) Логик удирдлага. Энэ бол хамгийн үндсэн функц. Үүнд: ба, эсвэл, үгүйсгэх хэлбэр гэсэн функцүүд ашигладаг ба унтраалга, релейн зарчимийг авч явдаг 23
  24. 24. (2)Аналоги удирдлага Үйлдвэрлэлийн процест маш олон төрлийн хэмжигдэхүүнүүдийн өөрчлөлтүүдийг ашигладаг жишээлбэл: температур, даралт, хурд гэх мэт Эдгээр хэмжигдэхүүнүүд нь бүгд аналоги сигнал юм. RTD аналоги гаралт, оролтын модулуудыг ашигладаг. Энд PLC ийг өргөн ашигладаг. 24
  25. 25. (3) Closed-loop удирдлага PLC зөвхөн запгай удирдлага хийхээс гадна битүү хэлхээний удирдлага хийдэг. Битүү хэлхээний удирдлага хийснээр PID хуулиар удирдах боломжтой болж байгаа юм. 25
  26. 26. (4) Хугацаа, байрлал болон тоолуурын удирдлага PLC ийн хугацааны удирдлагын функцүүдийг ашигладаг эндээ импульсийн гаралтын тохируулгууд хийж өгдөг 26
  27. 27. Network сүлжээ (5) Network Communications PLC ийг сүлжээнд холбосноор технологийн процессийг хүссэн газраасаа хянах, удирдах боломж бий болж байгаа юм. 27
  28. 28. 28
  29. 29. 29
  30. 30. PLC-ийн ажиллах зарчим 30
  31. 31. PLC-ийн ангилал (1) Оролт гаралтын байдлаар I/O points (2)Бүтэцээр нь By construction 31
  32. 32. PLC-ийн ангилал By I/O points (1)Оролт гаралтын тоогоор Оролт гаралтын портуудын тоогоор нь: Micro: 32 I/O Small: 256 I/O Medium: 1024 I/O Large: 4096 I/O 32
  33. 33. PLC-ийн ангилал (2) Бүтцийн хувьд By construction  Compact PLCs  Modular PLCs 33
  34. 34. PLC-ийн ангилал (1) Compact Monolithic construction Monoprocessor Fieldbus connection Fixed casing No process computer capabilities (no MMC) Fixed number of I/O (most of them binary) (2) Modular PLC Modular construction (backplane) One- or multiprocessor system Fieldbus and LAN connection DIN-rail Large variety of input/output boards Connection to serial bus 34
  35. 35. Compact эсвэл modular ? € field bus extension compact PLC (fixed number of I/Os) modular PLC (variable number of I/Os Limit of local I/O # I/O modules 35
  36. 36. Programming languages PLC программчлал (1) Ladder logic диаграмм (2) Statement list (3) Функцийн блок диаграмм Function block diagram 36
  37. 37. PLC программчлал Ladder diagram ladder diagram нь хамгийн түгээмэл программчлалын хэл The instructions are represented :by graphic symbols Contacts, Coils & Boxes Statement list 37 Function block
  38. 38. Давуу тал PLC нь бусад компьютерийг бодвол төрөл бүрийн орчин ажиллах боломжтой оролт гаралт ихтэй Siemens PLC 38
  39. 39. Давуу талууд:  Flexibility:  Correcting Errors:  Space efficient:  Low cost:  Testing:  Visual observation:  Number of contacts many:  Resistant character test :  Simplifies the control system components  Security :  Documentation:  Can make changes by reprogramming in seconds. 39
  40. 40. PLC-ийн хэрэглээ 40
  41. 41. PLC:Location in the control architecture Engineer station Operator station Supervisor Station Enterprise Network gateway direct I/O Field Stations data concentrators, not programmable, but configurable 41 CPU I/O COM 2 Sensor Bus (e.g. ASI) gateway COM FB gateway small PLC PLC Field Bus COM CPU COM I/O I/O I/O COM CPU Field Bus COM CPU I/O I/O I/O I/O directly connected I/O Control Station with Field Bus COM1 PLC CPU COM1 COM 2 I/O I/O I/O I/O large PLCs CPU COM1 I/O I/O I/O I/O I/O Control Bus (e.g. Ethernet) Field Devices
  42. 42. PLC-ийн бүрэлдэхүүн: 42
  43. 43. PLC-ийн үндсэн бүтэц Power CPU Input Devices Input module Arithmetic unit Output module Control unit Нэмэлт Peripheral I/O Interfaces 43 MEMORY EPROM RAM Өргөтгөл Extension I/O Interfaces Output Devices
  44. 44. 44
  45. 45. 45
  46. 46. • CPU: дотоод төв процессороор микропроцессор ашигладаг • Power supply unit: Тэжээлийн эх үүсвэрийн хувьд ерөнхий хувьсах A.C. хүчдэлийг тогтмол бага хүчдэл D.C. болгон хувиргаж ашигладаг. 46
  47. 47. • Оролт гараотын хэсэг Input-output sections: Энд процессор гадаад төхөөрөмжөөс мэдээлэл хүлээн авах ба холбогдсон гадаад төхөөрөмжүүдэд мэдээлэл дамжуулна. 47
  48. 48. • Нэмэлт модуль Expansion Modules: The S7-200 PLCs are expandable. Нэмэлт модуль нь оролт гаралтын портуудыг өргөтгөх зориулалттай. Энэ модуль нь үндсэн төхөөрөмжтэйгээ туузан холбогч /ribbon connector/ ашиглан холбогддог. 48
  49. 49. • Санах ойн байгууламж Memory unit: төхөөрөмжийн удирдлагад зориулагдсан программыг хадгалахад зориулагдсан. 49 • Программчлах төхөөрөмж Programming device: энэ төхөөрөмжийг ашиглан программыг компьютороос санах ойд бичнэ.
  50. 50. •PLCs invented to Replace Relays and HARD WIRING: Prior to PLCs, many of these control tasks were solved with contactor or relay controls. 50
  51. 51. PLC системийг маш олон компаниуд гаргадаг: Siemens, Allen Bradley, Omron, Schneider, гэх мэт 51
  52. 52. 52
  53. 53. S7-200 configuration 53
  54. 54. S7 200 family 54
  55. 55. S7-200 configuration inputs 55
  56. 56. S7-200 configuration outputs 56
  57. 57. S7-200 configuration I/O numbering 57
  58. 58. Analogue I/O Typical analogue signals from 0-10 VDC or 4-20 mA= They are used to represent changing values such as temperature, weight and level 58 speed,=
  59. 59. Instructions :Standard instructions .They are used in most programs Examples: timer, counter, math, logical, incr., decr. and move :Special instructions They are used to manipulate data .Shift, table, conversion, real time instruction :High speed instructions They allow for events and interrupts to occur independently of .the PLC scan time Examples: High speed counters and interrupts 59
  60. 60. Input Instructions Bit Logic instruction Normally Open contact Normally Closed contact Normally Open Immediate contact Normally Closed Immediate contact Positive Transition contact Negative Transition contact Not contact 60
  61. 61. Input contacts example 61
  62. 62. Output instructions Output Instruction Output Immediate instruction No Operation instruction Set (N bits) instruction Reset (N bits) instruction Set Immediate (N bits) instruction Reset Immediate (N bits) instruction 62
  63. 63. Output, Set & Reset example 63
  64. 64. Starting a motor 64
  65. 65. Hard-wired DOL(direct-on-line ) starting O.L. contact Circuit Breaker Contactor Thermal Overload Star t Stop Aux. contact Contact coil Induction Motor 65 Induction Motor
  66. 66. Using PLC Before start Starting After start 66
  67. 67. Stopping 67
  68. 68. Input & Output connections 68
  69. 69. Timer instructions On-Delay Timer Retentive On-Delay Timer Off-Delay Timer 69
  70. 70. On-Delay & Retentive On-Delay timers They count time when the enabling input (IN) is ON. When the current value (Txxx) is > the preset .time (PT), the timer bit is ON The On-Delay timer current value is cleared when (IN) is OFF, while the current value of the Retentive .On-Delay Timer is maintained You can use the Retentive On-Delay Timer to .accumulate time for multiple periods of the input ON 70
  71. 71. Off-Delay timer The Off-Delay Timer is used to delay turning an output OFF for a .fixed period of time after the input turns OFF When (IN) turns ON, the timer bit turns ON immediately, and the . current value is set to 0 When (IN) turns OFF, the timer counts till PT and the timer bit .turns OFF and the current value stops counting If the input is OFF for a time shorter than PT, the timer bit .remains ON 71
  72. 72. Timers numbers & resolutions 72
  73. 73. Timer examples On-Delay Retentive On-Delay Off-Delay 73
  74. 74. Hard-wired on-delay timer 74
  75. 75. le 75
  76. 76. TONR example 76
  77. 77. Timer example 77
  78. 78. Memory types  You can access data in many CPU memory areas - process image input register - process image output register - variable memory area - Bit memory area - sequence control relay memory area - special memory bits - local memory area - Timer memory area - counter memory area - Analog inputs 78 (I) (Q) (V) (M) (S) (SM) (L) (T) (C) (AI)
  79. 79. Memory addressing )Accessing a Bit of Data in the CPU Memory (Byte.bit Addressing 79
  80. 80. Memory addressing You can access data in many CPU memory areas (V, I, Q, M, S, L, :and SM) as .bytes, words, or double words by using the byte-address format 80
  81. 81. Memory types  Process-image input register (I) : Format Bit I[byte address].[bit address] I0.1 Byte, Word, Double Word I[size][starting byte address] IB4  Process-image output register (Q) :Format Bit Byte, Word, Double Word  Q[byte address].[bit address] Q1.1 Q[size][starting byte address] QB5 Variable memory area (V) :You can use V memory to . store intermediate results of the control logic operations • . store other data pertaining to your process or task • :Format Bit Byte, Word, Double Word 81 V[byte address].[bit address] V10.2 V[size][starting byte address] VW100
  82. 82. Memory types  Sequence control relay area (S) They are used to organize machine operations or steps into equivalent program segments. SCRs allow logical segmentation of the control :Format Bit S[byte address].[bit address] S3.1 Byte, Word, Double Word S[size][starting byte address] SB4  Special memory bits (SM) The SM bits provide a means for communicating information between the CPU and your program. You can use these bits to select and control some :of the special functions of the S7-200 CPU, such as A bit that turns on for the first scan cycle• Bits that toggle at fixed rates• Bits that show the status of math or operational instructions • :Format Bit SM[byte address].[bit address] SM0.1 Byte, Word, Double Word SM[size][starting byte address] SMB86 82
  83. 83. Memory types  Local memory area (L) The S7-200 PLCs provide 64 bytes of local (L) memory of which 60 can be used as scratchpad memory or for passing formal parameters to subroutines. Format: Bit L [byte address].[bit address] L0.0 Byte, Word, Double Word L [size] [starting byte address] LB33 83
  84. 84. Memory types Analog inputs (AI) The S7-200 converts a real-world, analog value (such as temperature or voltage) into a word-length (16-bit) digital value. You access these values by the area identifier (AI), size of the data (W), and the starting byte address. Since analog inputs are words and always start on even-number bytes (such as 0, 2, or 4), you access them with evennumber byte addresses (such as AIW0, AIW2, or AIW4),as shown in Figure Analog input values are read-only values. Format: AIW [starting byte address] AIW4 84
  85. 85. Memory types •Analog outputs (AQ) The S7-200 converts a word-length (16-bit) digital value into a current or voltage, proportional to the digital value (such as for a current or voltage). You write these values by the area identifier (AQ), size of the data (W), and the starting by address. Since analog outputs are words and always start on even-number bytes (such as 0, 2, or 4), you write ), them with even-number byte addresses (AQW0, AQW2, AQW4 Format: AQW [starting byte address] AQW4 85
  86. 86. Replacing Relay by PLC First step- We have to translate all of the items we're using into symbols the plc understands A contact symbol A coil symbol 86
  87. 87. Second step - We must tell the plc where everything is located. In other words we have to give all the devices an address. Final step - We have to convert the schematic into a logical sequence of events. 87
  88. 88. Ladder Diagram and Programming: Load: The load (LD) instruction is a normally open contact A Load (contact) symbol LoadBar: The LoadBar instruction is a normally closed contact. A LoadBar (normally closed contact) symbol 88
  89. 89. Out :The Out instruction is sometimes also called an Output Energize instruction. The output instruction is like a relay coil An OUT (coil) symbol OutBar: The outbar instruction is like a normally closed relay coil An OUTBar (normally closed coil) symbol 89
  90. 90. Logic elements 90
  91. 91. Programming a PLC : In order to create or change a program, the following items are needed:  PLC  Programming Device  Programming Software  Connector Cable 91
  92. 92. You can use a personal computer as a programming device 92
  93. 93. Testing a program  Once a program has been written it needs to be tested and debugged. One way this can be done is to simulate the field inputs with an input simulator.  The program is first downloaded from the PC to the CPU. The selector switch is placed in the RUN position. The simulator switches are operated and the resulting indication is observed on the output 93
  94. 94. Examples of Ladder diagram(Example One): We can simulate this same circuit with a ladder diagram: 94
  95. 95. Examples of Ladder: SIEMENS PLCs • SIEMENS S7-200, CPU 222. • 8 Inputs, 6 Outputs. • 256 Counters & Timers. 95
  96. 96. Examples of Ladder diagram(Example two):: Siemens PLC 96
  97. 97. Examples two This Exam gives a complete understanding of input, output, OR and AND commands in ladder diagram, and Timer. Here it is shown that if input I0.0 and I0.1 are on then output Q0.0 will turn on and this part explains the AND command. Output Q0.0 can also be activated if input I0.2 is on, which shows the OR command. In network two it is shown that when input I0.3 is activated a timer will count 3 seconds (300ms×10ms=3 s) and then this timer will activate the output Q0.1 . 97
  98. 98. Example three In this assignment you are asked to imagine a parking lot. These are one entrance and one exit in this parking garage. You are asked to draw the ladder diagram of this system by considering the requirements mentioned here. Both the entrance and exit gates are open with remote control and you can assume that there is a infrared sensor to get the signal from the remote control and since this sensor is connected to PLC, as it gets the signal it is processed in PLC and entrance or exit gate will open. There are two infrared sensors one is placed toward the entrance and the other one is placed toward the exit so they will not interfere. Since you need the system to keep the gate open after someone presses the remote control button, you may need a latching switch for both entrance and exit. In addition you need the gates to be open only for 20 second and the timing increment of your PLC is 10ms. Moreover since you do not want the gate to damage your car if it takes more than 20 seconds to pass the gates, there are 2 sensor placed at entrance and exit gate (one for entrance and one for exit) to keep the gate open when a car is passing through. 98
  99. 99. Examples Continued 99
  100. 100. Example Solution I0.0 Q0.1 SET I0.1 T33 2000 10ms 100 M0.1 Q0.1 Reset I0.0 T33 I02 Q0.1
  101. 101. Solution Description In this example as I mentioned there should be a latching system to keep the gate open and close it after a car passes through. Here I00 is the infrared sensor that takes the command from the remote control. As it get the command it opens the gate Q01 and at the same time it will activated the 20 second timer T33 I0.0 Q0.1 SET 101 I0.0 T33 2000 10ms
  102. 102. Solution Description Continued After 20 second the timer activate the switch I01 which will reset the output Q01, in other words it will close the gate. But this example does not finish here. A sensor is required to keep the gate open if a car is still in the gate way. So an other infrared sensor I02 is used here to keep the gate open and it is connected to Q01. I0.1 Q0.1 Reset T33 102 M0.1 I0.2 Q0.1
  103. 103. Example four Automatic water sprinkler system of a garden This example is based on Automatic water sprinkler system of a garden. It delivers water to grass, flowers and trees. Watering of whole garden depends upon humidity and temperature conditions which are adjustable. 103
  104. 104. Example Picture 104
  105. 105. Example Continued This example is one of the most complicated examples in this presentation. Here the water sprinkler system (Q0.0) starts to work when either temperature sensor(I0.0) or humidity sensor (I0.1) send a signal to it. In this scenario grass will be water first (water the grass Q0.1) fro 4 second (it is assumed very small for simplicity) and then flowers will be water (water the flowers Q0.2) for 10 second and at last trees will be watered (water the trees Q0.3) for 18 seconds. Since it is required to avoid pressure drop in the water line ,each section is separated and here the order to water this garden is given: First grass, second flowers and third trees. 105
  106. 106. Example Continued Here you can see that either temperature sensor I0.0 or humidity sensor I0.1 can turn on the sprinkler system (Q0.0). If the humidity or temperature falls below a specific point the system will start working. 106
  107. 107. Example Continued 107
  108. 108. Example Continued In this Example it is needed to water the grass for 4 seconds. Since the increment is 10 ms, it is written 400ms in the timer. The input is assume to be the Q0.0 which was the switch for sprinkler system. Here it is assumed that if the sprinkler is on, the output Q0.1 will also become on and it will remain on for 4 seconds. If you take a look at the ladder diagram you will see that the input Q0.0 turn the timer on and it will count 4 seconds until it breaks the second line. 108
  109. 109. 109
  110. 110. Example Continued Since the input switch Q0.0 turn on all the timers in this ladder diagram at the same time it is required to add the time for watering of each section with the time elapsed in the previous sequence. For example although it is required to water the flowers for only 10 second but in the timer it is written 1400ms with the increment 10 ms which will eventually be equal to 14 second. Now if you subtract 14 seconds from 4 second (the time required for the first section) you will get the required time which is 10 seconds. There is one more important parameter here. In the ladder diagram it is written if the first section is done start the second section. You can see this in the second line of the ladder diagram. The output here is Q0.2 which is assumed for watering flowers. 110
  111. 111. Example Continued 111
  112. 112. Example Continued This part is like the second part. Watering the trees is started when previous section are finished. The time for this section is 18 second which is added to 14 seconds counted before and now it is written as 3200 ms with 10ms increment. You can see when both Q0.1 and Q0.2 are off the third part (Q0.3) is started. 112
  113. 113. Example five This example is based on a parking lot with a PLC which counts the number of cars that enter and exit and if the parking lot is about to be full, PLC sends a signal to a electronic board to say that the parking is full. The system is also utilizing a infrared sensor to open the gates with remote control.(The capacity of this parking lot is assumed to be 5 cars.) 113
  114. 114. Solution 114
  115. 115. Example Continued In this example input I0.0 open the entrance gate and input I0.1 opens the exit gate. I0.0 and I0.1 are both infrared sensors which will be activated by remote control. In addition sensor I0.2 count the number of cars entering the parking lot and sensor I0.3 counts the cars leaving . The switch I0.4 is used to reset the system. If a total number of 5 cars enter this parking lot, counter C1 send a signal to the electronic board Q0.2 to show that the parking is full. 115
  116. 116. Programmable logic control  A PLC has many "input" terminals, through which it interprets "high" and "low" logical states from sensors and switches.  It also has many output terminals, through which it outputs "high" and "low" signals to power lights, solenoids, contactors, small motors, and other devices lending themselves to on/off control.  In an effort to make PLCs easy to program, their programming language was designed to resemble ladder logic diagrams.  Thus, an industrial electrician or electrical engineer accustomed to reading ladder logic schematics would feel comfortable programming a PLC to perform the same control functions. 116
  117. 117. Program design of PLC Design objective PLC selection and resource allocation I/O address assignment Wiring Programming 117
  118. 118. Layout of Intersection Trafic Lights North G Y R G Y R West R Y G R Y G South 118 East
  119. 119. I/O address assignment Serial number 1 I0.0 Start swich 2 I0.1 Stop 3 I0.2 emergency stop button 4 Q0.0 North-South Green 5 Q0.1 North-South Yellow 6 Q0.2 North-South Red 7 Q0.3 East-west Green 8 Q0.4 East-west Yellow 9 119 address Notes Q0.5 East-west Red
  120. 120. AC220 N L Q0.0 I0.0 I0.1 Q0.1 I0.2 Q0.2 24V(L+) Hardware Wiring PLC CPU224 Q0.3 AC/DC/ RLY Q0.4 1M Q0.5 M 1L 2L 120 AC220 AC220

×