Pages

Friday 20 July 2012

ဒူဒူႀကားဖူးတဲ႔ PLC (၁)

စက္ကရိယာေတြနဲ႔ processes ဆိုတဲ႔ ကုန္ထုတ္လုပ္ငန္းစဥ္ေတြကို၊ control အေနနဲ႔ ထိမ္းေႀကာင္းရာမွာ၊ relays ေတြ၊ timers ေတြနဲ႔ magnetic contractors ေတြလို၊ electromechanical devices ေတြကို အသံုးၿပဳခဲ႔ရာမွ၊  integrated circuits ေတြနဲ႔တည္ေဆာက္ထားတဲ႔ "PLC"  ေတြကို၊ အသံုးၿပဳလာႀက ပါတယ္။ PLC လို႔ေခါါတဲ႔ "Programmable Logic Controller" ေတြကို၊ microprocessor ေတြနဲ႔ တည္ေဆာက္ထားပါတယ္။


 Fig. PLC conceptual application diagram

PLC ေတြဟာ 'storing instructions' အေနနဲ႔၊ ထည္႔သြင္းထားတဲ႔အခၽက္အလက္ေတြကို၊ သိုေလွာင္ ထားၿပီး၊ sequencing, timing, counting, arithmetic, data manipulation နဲ႔ communication တို႔ကိုေဆာက္ရြက္ကာ၊ စက္ကရိယာေတြနဲ႔ processes ဆိုတဲ႔ ကုန္ထုတ္ လုပ္ငန္းစဥ္ေတြကို၊ control အေနနဲ႔ ထိမ္းေႀကာင္းေပးပါတယ္။ microprocessor ေတြနဲ႔ တည္ေဆာက္ထားတဲ႔အတြက္၊ CPU လို႔ေခါါတဲ႔ စက္မွဳလုပ္ငန္းသံုး industrial central process unit အၿဖစ္ သတ္မွတ္နိင္ၿပီး၊ input/ output connections ေတြမွတဆင္႔၊ field devices ေတြကို၊ interfacing circuitry အေနနဲ႔၊ ဆက္သြယ္ပါတယ္။
Automation နဲ႔ Instrumentation နည္းပညာေတြ၊ တိုးတက္လာတာနဲ႔အမၽွ၊ control system တခုလံုး အေပါါမွာရွဳၿမင္တဲ႔ သံုးသတ္ခၽက္၊ philosophical approach ေတြလည္း၊ ေၿပာင္းလဲလာသလို၊ hardware နဲ႔ software နည္းပညာေတြေႀကာင္႔ PLC ေတြရဲ႕ ဖြဲ႔စည္းတည္ေဆာက္ပံု design ေတြလည္းေၿပာင္းလဲ လာခဲ႔ပါတယ္။


 Fig. Basic PLC

hardware လို႔ေခါါတဲ႔ integrated electronics နည္းပညာေတြေႀကာင္႔ PLC ရဲ႕ scan time လို႔ေခါါတဲ႔၊ လုပ္ေဆာင္ခၽက္ေတြ ပိုမိုလၽွင္ၿမန္လာၿခင္း၊ PLC ရဲ႕ အရြယ္အစားပိုမိုေသးငယ္လာၿပီး၊ ေစၽးနံွဳးသက္သာ လာၿခင္း၊ PLC မွာ input/ output လို႔ေခါါတဲ႔ I/O unit ေတြ ပိုမိုထည္႔သြင္းလာနိဳင္ၿခင္း၊ PLC ရဲ႕ interfacing circuitry မွာ PID loop ေတြ၊ ထည္႔သြင္းလာနိဳင္ၿခင္း၊ PLC ကို 'protocol' မၽားစြာၿဖင္႔ ခၽိတ္ဆက္ အသံုးၿပဳလာနိဳင္ၿခင္းနဲ႔ special interface devices ေတြ ၿဖစ္တဲ႔ thermocouples ေတြနဲ႔ strain gauges ေတြလို၊ fast response input ေတြ နဲ႔လည္း၊ တိုက္ရိုက္ခၽိတ္ဆက္ကာ၊ အသံုးၿပဳလာနိဳင္တာေတြ႔ရပါတယ္။ ဒါ႔အၿပင္ software လို႔ေခါါတဲ႔ computer programming နည္းပညာေတြေႀကာင္႔၊ PLC မွာ high level computer language ေတြၿဖစ္တဲ႔ "BASIC", "C" နဲ႔ "Pascal" တို႔လို၊ language ေတြကိုသံုးကာ၊ 'storing instructions' အေနနဲ႔ program ေတြကို၊ ထည္႔သြင္းေရးဆြဲ လာနိဳင္တာကိုလည္းေတြ႔ရပါတယ္။ PLC ေတြမွာ 'storing instructions' အေနနဲ႔ program ေတြကို၊ ထည္႔သြင္းေရးဆြဲတဲ႔အခါ၊ IEC 1131-3 standard ကုိိ အေျခခံထားတဲ႔ languages ေတြနဲ႔၊ object oriented programming tools ေတြကို၊ အသံုးၿပဳႀကပါတယ္။ programming device ေတြၿဖစ္ႀကတဲ႔ personal computers ေတြနဲ႔ mini-programming units ေတြနဲ႔ ခၽိတ္ဆက္ၿပီး၊ storing instructions ေတြ၊ ထည္႔သြင္းႀကပါတယ္။ 'IEC 1131-3' ဟာ sequential function chart ေတြကို အသံုးၿပဳထားတဲ႔၊ "graphic representation language" ၿဖစ္ပါတယ္။

အေသးဆံုး PLC ေတြမွာ၊ I/O unit (၃၂) ခုခန္႔ပါဝင္ၿပီး၊ ႀကီးမားတဲ႔ PLC ေတြမွာေတာ႔ I/O unit (၈၀၀၀) ခုခန္႔အထိ ပါဝင္ေလ့ရိွပါတယ္။ PLC ေတာ္ေတာ္မၽားမၽားကို၊ စက္မွဳလုပ္ငန္းသံုးအၿဖစ္၊ ရည္ရြယ္ တည္ေဆာက္ထားတာတဲ႔အတြက္၊ industrial used I/ O systems ေတြကို၊ ထည္႔သြင္းထားသလို၊ programming လုပ္နိဳင္တဲ႔ features ေတြနဲ႔ LAN ဆိုတဲ႔ 'Local Area Network' ေတြနဲ႔ခၽိတ္ဆက္နိဳင္မယ္႔၊ "interfaces" ေတြ ကိုလည္း၊ ထည္႔သြင္းထားပါတယ္။ 'BASIC' ႏွင့္ 'C' တုိ႔လို high-level language ေတြ လက္ခံႏုိင္တဲ႔ PLC ေတြကုိ၊ peripheral device ေတြနဲ႔ခၽိတ္ဆက္ၿပီး၊ ပုိမို လြယ္ကူစြာနဲ႔ program ေရးသား ထည္႔သြင္းနိဳင္ ပါတယ္။ PLC ေတြဟာ၊ အခၽက္အလက္ data ေတြကုိ၊ ပုိမိုလြယ္ကူစြာ ကိုင္တြယ္နုိင္သလို၊ 'manipulating' ကိုလည္း၊ ေဆာင္ရြက္ေပးနိဳင္ပါတယ္။ program ေရးသားထည္႔သြင္းရာမွာ၊ 'ladder diagram instruction' ေတြကိုအသံုးၿပဳၿပီး၊ functional block ေတြ၊ instruction list ေတြနဲ႔ structured text ေတြအၿပင္၊ 'advanced functional block instruction' ေတြကိုပါထည္႔သြင္းထားပါတယ္။ ခ်ိဳ႕ယြင္းခ်က္မ်ားရွာေဖြၿခင္း diagnostics နဲ႔ ၿပစ္ခၽက္ရွာေဖြၿခင္း fault detection တို႔ကိုလည္းေဆာင္ရြက္နိဳင္ၿပီး၊ PLC မွာၿဖစ္ေပါါေနတဲ႔ faults ေတြ အပါအဝင္၊ machines ေတြနဲ႔ field devices ေတြမွာ၊ ၿဖစ္ေပါါေနတဲ႔ faults ေတြနဲ႔ process အတြင္းမွာ၊ ၿဖစ္ေပါါေနတဲ႔ faults ေတြကိုလည္း၊ သိနိဳင္ပါတယ္။ လက္ရိွအသံုးၿပဳေနတဲ႔ PLC ေတြဟာ၊ complex calculation ေတြၿဖစ္ႀကတဲ႔  gauging ၊ balancing နဲ႔ statistical computation ေတြကို၊ တြက္ခၽက္ေပးနိဳင္သလို၊ data handling, manipulation instruction, data storage, data tracking, data retrieve နဲ႔ data acquisition တို႔ကိုလည္း၊ ပိုမို တုိးတက္ေကာင္းမြန္စြာ၊ ေဆာင္ရြက္ေပးနိဳင္တာကိုလည္း၊ ေတြ႔ရပါတယ္။


 Fig. PLC conceptual application diagram

PLC တခုမွာ CPU လို႔ေခါါတဲ႔ central processing module unit နဲ႔ I/ O လို႔ေခါါတဲ႔ Input/ output interface module unit ဆိုၿပီး၊ အဓိကအစိတ္အပိုင္း၊ (၂) ခုပါရိွပါတယ္။ CPU မွာေတာ႔ processor, memory နဲ႔ power supply ဆိုတဲ႔ component (၃) ခု ပါဝင္ပါတယ္။ power supply module ကေတာ႔ PLC တခုလံုအတြက္၊ လိုအပ္မယ္႔ power ကုိ လုံေလာက္စြာ၊ ပံ့ပုိးေပးပါတယ္။ process အတြင္းမွာရိွတဲ႔ limit switches ေတြ၊ pressure traducers ေတြ၊ push buttons ေတြ၊ motor starter ေတြ၊ solenoid ေတြ၊ sensors ေတြနဲ႔ actuators ေတြၿဖစ္ႀကတဲ႔ field devices ေတြကို၊ wires ေတြအသံုးၿပဳၿပီး၊ Input/ output interface unit ေတြနဲ႔ ခၽိတ္ဆက္ထားပါတယ္။ field devices ေတြဟာ၊ discrete devices ေတြလို႔ေခါါတဲ႔၊ analog input/ output devices ေတြၿဖစ္ပါတယ္။

  
Fig. Input/ Output interface


Fig. PLC

I/ O interface module unit ဟာ၊ information provider ေတြၿဖစ္ႀကတဲ႔၊ inputs ေတြနဲ႔ controllable devices ေတြၿဖစ္ႀကတဲ႔ outputs ေတြအႀကား၊ အျပန္အလွန္ဆက္သြယ္ႏိုင္ေအာင္ ၾကားခံအျဖစ္ ေဆာင္ရြက္ေပးပါတယ္။ external device မ်ားထံမွလက္ခံရရိွလာတဲ႔ data ေတြကုိ incoming signal လို႔ေခါါၿပီး၊ ရရိွလာတဲ႔ အမ်ိဳးမ်ိဳးေသာ incoming signals ေတြနဲ႔၊ external device သုိ႔ေပးပုိ႔မယ္႔ အမ်ိဳးမ်ိဳးေသာ၊ outgoing signals ေတြကို၊ conditioning အေနနဲ႔ လိုအပ္သလိုၿပဳၿပင္၊ စီမံၿခင္းၿဖစ္ပါတယ္။


Fig. Operation cycle

PLC ဟာ operation အေနနဲ႔ input field device မွ input data ကုိလက္ခံၿခင္း သုိ႔မဟုတ္ data ကုိ input interface unit မွတဆင့္ဖတ္ယူၿခင္း၊ memory အတြင္းသိုေလွာင္သိမ္းဆည္းထားတဲ႔၊ control program သုိ႔မဟုတ္ instruction အတိုင္း execute ဒါမွမဟုတ္ perform ဆိုတဲ႔ 'control action' ေတြကို၊ ေဆာင္ရြက္ေပးၿခင္းနဲ႔ output interface unit မွတဆင့္၊  write သို႔မဟုတ္ update အေနနဲ႔ output field device သို႔ output signal ထုတ္ေပးၿခင္း တို႔ကို၊ လုပ္ေဆာင္ပါတယ္။ အစီအစဥ္အတုိင္း input ကိုလက္ခံရယူကာ၊ ဖတ္ယူၿခင္း 'reading'၊ memory အတြင္း သိုေလွာင္ သိမ္းဆည္းထားတဲ႔၊ program အတိုင္းေဆာင္ရြက္ၿခင္း 'execute' နဲ႔ output ထုတ္ေပးၿခင္း 'update' တို႔ကို၊ “scanning" လုိ႔ေခါါပါတယ္။

စက္ကရိယာေတြနဲ႔ processes ဆိုတဲ႔ ကုန္ထုတ္လုပ္ငန္းစဥ္ေတြကို၊ control အေနနဲ႔ ထိမ္းေႀကာင္းေပးနိုင္ဖို႔ PLC based system နဲ႔ hardwired relay system တို႔ကို၊ ေရြးခၽယ္တဲ႔အခါ၊ အသံုးၿပဳမယ္႔ 'control logic' ဟာ၊ မႀကာခဏၿပဳၿပင္ေၿပာင္းလဲရန္ လိုအပ္ၿခင္းရိွ၊ မရိွ၊ ၿမင္႔မားတဲ႔ high reliability စြမ္းေဆာာင္ရည္လုိအပ္ျခင္းရိွ၊ မရိွ၊ တတ္ဆင္အသံုးၿပဳမယ္႔ ေနရာ အက်ယ္အဝန္း၊ ေနာင္ တခၽိန္မွာ ပိုမိုၿမင္႔မားတဲ႔  reliability စြမ္းေဆာာင္ရည္လိုအပ္လာနိဳင္ၿခင္းရိွ၊ မရိွ၊ တိုေတာင္းတဲ႔အခၽိန္ ခဏတာအတြင္း၊ control logic တခုလုံးကုိ ျပဳျပင္ရန္လုိအပ္မႈရိွ၊ မရိွ၊  အျခားစက္ကရိယာေတြမွာလည္း၊ တူညီတဲ႔ control logic တမ်ိဳးတည္းနဲ႔၊ အသံုးၿပဳရန္  လိုအပ္ၿခင္းရိွ၊ မရိွနဲ႔  ေနာက္တခ်ိန္မွာ ထပ္မံ တုိးခ်ဲ႕ရန္လိုအပ္ၿခင္းရိွ၊ မရိွတို႔အၿပင္၊ စုစုေပါင္း ကုန္ကၽစရိတ္အစရိွတဲ႔ အခၽက္အလက္ေတြအေပါါ အေၿခခံၿပီး၊ နိွဳင္းယွဥ္ႀကပါတယ္။ အသံုးၿပဳမယ္႔ 'control logic' ဟာ၊ flexibility အေနနဲ႔ မႀကာခဏ ၿပဳၿပင္ေၿပာင္းလဲရန္လိုအပ္ၿခင္းနဲ႔ future growth အေနနဲ႔ ေနာင္တခၽိန္မွာ ပိုမိုၿမင္႔မားတဲ႔ reliability စြမ္းေဆာာင္ရည္ လိုအပ္လာနိဳင္ၿခင္း၊ အစရိွတဲ႔ အခၽက္အလက္ေတြရိွပါက၊ "PLC" ကိုသာအသံုးၿပဳသင္႔ၿပီး၊ အကယ္၍ အလြန္တိုေတာင္းတဲ႔ cycle time ဒါမွမဟုတ္ အလြန္ၿမန္တဲ႔ scan time ကိုလိုအပ္လၽွင္ေတာ႔ electromechanical device ၿဖစ္တဲ႔ "relays" ေတြကိုသာ၊ အသံုးၿပဳသင္႔ပါတယ္။

controllers ေတြကို၊ single loop controllers နဲ႔ multi loop controllers ဆိုၿပီးခြဲၿခားနိဳင္ပါတယ္။ single loop controllers ေတြဟာ sensor တခုတည္းမွ၊ valve သို႔မဟုတ္ actuator တခုတည္းကိုသာ၊ control လုပ္ၿပီး၊ multi loop controllers ေတြကေတာ႔ sensor အမၽားအၿပားကိုအသံုးၿပဳကာ၊ valve သို႔မဟုတ္ actuator အရည္အတြက္အေၿမာက္အမၽားကို၊ control လုပ္နိဳင္ပါတယ္။ PLC ဆိုတဲ႔ programmable logic controllers ေတြမွာ user command ကို I/O memory လို႔ေခါါတဲ႔၊ internal PLC memory area အတြင္းသို႔၊ program အေနနဲ႔တခုၿပီး တခုေပးသြင္း နိဳင္ေစဖို႔စီစဥ္ တည္ေဆာက္ထားပါတယ္။ ေပးသြင္း ထားတဲ႔ user command ေတြကို၊ I/O memory မွာ၊ execution တနည္းအားၿဖင္႔ process လုပ္ဖို႔၊ အခၽိန္အတိုင္းအတာတခု ယူရပါတယ္။ အလားတူ ၿပင္ပမွ sensors သို႔မဟုုတ္ switches ေတြမွ၊ data ေတြဟာ၊ basic I/O unit မွတဆင္႔ internal PLC memory area အတြင္းကို၊ ဝင္ေရာက္ေပးသြင္းေစဖို႔ တည္ေဆာက္ထားပါတယ္။ basic I/O unit မွ data ေတြ internal I/O memory အတြင္းသို႔ဝင္ေရာက္ဖို႔ specific time သို႔မဟုတ္ exchange time ဆိုတဲ႔အခၽိန္ အတိုင္းအတာ တခုလိုအပ္ၿပီး၊ I/O refresh လို႔ေခါါပါတယ္။


Fig. PLC processing cycle

PLC တခုလံုး processing လုပ္ၿခင္းကို၊ processing cycle လို႔ေခါါပါတယ္။ processing cycle ဟာ အခၽိန္အတိုင္းအတာတခုႀကာၿမင္႔ပါတယ္။၊ processing cycle ဆိုတဲ႔ cycle time မွာ၊ over head processing time (self-diagnosis), user program execution time, I/O refresh processing time နဲ႔ peripheral service processing time တို႔ပါဝင္ၿပီး၊ " cycle time = Overhead Processing Time + Total Command Execution Time + I/O Refresh Time + Peripheral Service Time" လိို႔ု႔ သတ္မွတ္ပါတယ္။ time cycle ဟာ အခၽိန္အတိုင္းအတာ တခုအေနနဲ႔ႀကာၿမင္႔တဲ႔တခါ၊ အၿပင္ဖက္မွေပးသြင္းလိုက္တဲ႔ data ေတြကို၊ update လုပ္တဲ႔ updating time နဲ႔ I/O response time တို႔ဟာလည္း အခၽိန္အတိုင္း အတာတခုႀကာၿမင္႔မွာၿဖစ္ပါတယ္။ time cycle အခၽိန္တိုေတာင္းတဲ႔အခါ I/O response time ဟာလည္း တိုေတာင္းၿပီး၊ processing ရဲ႕အခၽိန္အတိုင္းအတာဟာ၊ ပိုၿမန္လာမွာ ၿဖစ္ပါတယ္။ time cycle ေၿပာင္းလဲတဲ႔ အခါမွာေတာ႔ command execution time နဲ႔ I/O refresh time တို႔ပါလိုက္ပါေၿပာင္း လဲပါတယ္။

တခါတရံ 'interrupt tasks' ၿဖစ္ေပါါတဲ႔အခါ၊ interrupt programs အေနနဲ႔ process လုပ္ၿပီးမွ၊ processing cycle ကိုစတင္ပါတယ္။ interrupt tasks ေတြမွာ power off interrupt, scheduled interrupts, I/O interrupts, internal timer ေႀကာင္႔ၿဖစ္ေပါါလာတဲ႔ interrupts နဲ႔ external interrupts တို႔ပါဝင္ပါတယ္။ power off interrupt ကို၊ power break interrupt tasks လို႔သတ္မွတ္နိဳင္သလို၊ power break ၿဖစ္ေနစဥ္မွာ၊ PLC ဟာ execution လို႔ေခါါတဲ႔ process အၿဖစ္လုပ္ေဆာင္ေနမွာၿဖစ္ ပါတယ္။ အလားတူ scheduled interrupt tasks မွာလည္း၊ specific schedule ေပါါမူတည္ၿပီး၊ အခၽိန္ အတိုင္းအတာတခုအထိ process အေနနဲ႔၊ လုပ္ေဆာင္ေနမွာၿဖစ္ပါတယ္။ I/O interrupt tasks ကေတာ႔ input unit မွာ start-up လုပ္စဥ္၊ အခၽိန္အတိုင္းအတာတခုအထိ process အၿဖစ္ရိွေနတဲ႔ interrupt ၿဖစ္ပါတယ္။ special I/O unit, CPU bus unit နဲ႔ INNER board တို႔မွ၊ အေႀကာင္းတစံုတခုေႀကာင္႔ requests လုပ္တဲ႔အခါ၊ အခၽိန္အတိုင္းအတာ တခုအထိ process အၿဖစ္ ရိွေနတဲ႔ interrupt ကိုေတာ႔၊ external interrupt tasks လို႔ေခါါပါတယ္။ PLC မွာရိွတဲ႔ I/O units အတြင္းသို႔၊ user programs ေတြကို၊ I/O signals အၿဖစ္ေပးသြင္းတဲ႔အခါ၊ PLC ရဲ႕ I/O memory မွာ ပထမဆံုး၊ address အေနနဲ႔ first assign အၿဖစ္ေပးသြင္းရၿပီး I/O allocation လို႔ေခါါပါတယ္။ CPU unit ဟာ အၿခား units ေတြမွ ဆက္သြယ္ေပးပို႔လာတဲ႔ data ေတြနဲ႔အတူ၊ I/O refresh ၿပဳလုပ္စဥ္မွာ၊ I/O allocation information ေတြကို အသံုးၿပဳပါတယ္။

I/O allocation information ေတြကို၊ PLC ဟာ "Registered I/O Table" အၿဖစ္သိမ္းဆည္းထား ပါတယ္။ I/O allocation ကို I/O registration လို႔လည္းေခါါၿပီး၊ online automatic registration နဲ႔ offline automatic registration ဆိုၿပီးေတြ႔ရပါတယ္။ programming tools ေတြကိုသံုးကာ၊ online မွတဆင္႔ registration ၿပဳလုပ္ၿခင္းဟာ၊ online automatic registration ၿဖစ္ၿပီး၊ programming tools ေတြကိုသံုးကာ type လုပ္ၿပီး၊ registration ၿပဳလုပ္ၿခင္းဟာ၊ offline automatic registration ၿဖစ္ပါတယ္။ တခၽိဳ႕ PLC ေတြမွာေတာ႔ registration I/O table ေပးသြင္းရန္မလိုအပ္သလို၊ တခၽိဳ႕ PLC ေတြမွာ offline automatic registration အေနနဲ႔၊ registration I/O table ေပးသြင္းလို႔မရတာကို လည္းေတြ႔ရပါတယ္။


Reference and Image credit to : Programmable Controllers (၁) - ကိုထြန္း, Programmable Logic Controllers - ကိုေကာင္းၿမတ္ညြန္႔, http://www.plcdev.com/, http://plc-installation.blogspot.sg/, http://www.omron.com.au, PLC – Theory and Implementation by L.A. Bryan and E.A. Bryan, 1997, Second Edition, An Industrial Text Company Publication, Atlanta, Georgia, US., SYSMAC PLC - OMRON Technical Guide, Programmable Controller Maintenance/ Inspection - NECA, May 2002 Edition, OMRON SYSMAC CS Series PLC User Manual Setup, 2010 Edition.

Remark : All images herein this website are for use of educational purpose only. The owner of this web site is not responsible for the consequences in case of violation to copyright, trademark, patent or other intellectual property rights of any third party.

No comments:

Post a Comment