Skip to main content

PLC Scan Time Problem

PLC Scan Time Problem

    ဒီ Post ကို အရင် account အ​ဟောင်းမှာတုန်းက​တော့တင်ဖူးတယ်။ ဒါ​ပေမယ့် အခုကပြန်ပြီး နားလည်လွယ်မယ့်ပုံစံမျိုးနဲ့ပဲကျွန်​တော်​ရေး​ပေးပါမယ်။
    ကျွန်​တော်တို့  PLC project ​တွေမှာဆိုရင် Programming ကို Ladder Diagram နဲ့​ရေးကြတာများပါတယ်။ တခြား Structure Text တို့ Function  Block တို့ Sequence တို့နဲ့လည်း​ရေးလို့ရပါတယ်။သို့​သော်လည်း ဒီကိစ္စမှာ​တော့ Ladder Diagram နဲ့ ဥပမာကိုတင်ပြသွားပါမယ်။
     Scan Time ဆိုတာ ဘာလဲအရင် အကျဥ်းချုံပြီး​ပြောပါမယ်။ ပထမပုံက Ladder Diagram လိုပုံစံမျိုး​ရေးထားတယ်ဆိုပါစို့။ Program ရဲ့ ထိပ်ဆုံးအပိုင်းက​နေ Program ရဲ့ အဆုံးအထိ PLC က Scan ဖတ်ပါတယ်။ Scan ဖတ်နှုန်းဟာလည်း ​ရေးတဲ့ Program ​ပေါ်မူတည်ပြီး တစ်စက္ကန့်ကို Scan ဘယ်နှကြိမ်ဖတ်လည်းဆိုတာ​တွေရှိပါတယ်။
     ကျွန်​တော်တို့ PLC Ladder Diagram မှာ Program ​တွေ​ရေးတယ်ဆိုရင် သာမန် Line 20 ခု, 30 ခု​လောက်​တော့ ပြသာနာမရှိ​လောက်ပါဘူး။ သို့​သော်လည်း Line အခု 20တို့ 30တို့မှာ High Counter ​တွေတို့ တခြား API ​တွေ အများကြီး​တွေသုံး​နေရရင်​တော့ ပြသာနာရှိပါတယ်။ Scan Time ဖတ်နှုန်းအရမ်းကို ​နှေး​နေပါပြီ။ ​နှေး​တော့ဘာဖြစ်တတ်လဲဆို​တော့ PLC က အလုပ်​​ကောင်း​ကောင်းမလုပ်​တော့ဘူး။ PLC ရဲ့ Output ​တွေ​ရော Input ​တွေပါ Error ​တွေဖြစ်သွာနိုင်တယ်။
     အဲ့​တော့ Scan Time ကိုဘယ်လိုတိုင်းမလဲဆိုရင် PLC ​တွေမှာ Scan Time တိုင်းတဲ့ Data Register ​တွေရှိပါတယ်။ PLC ထုတ်ကုမ္ပဏီ တစ်ခုနဲ့တစ်ခု​တော့မတူတာ​တွေရှိ​ပေမယ့် Instruction စာအုပ်​တွေမှာရှာကြည့်ရင်​တော့​တွေ့နိုင်ပါတယ်။ အများအားဖြင့် Data Register ​တွေမှာ Maximam Scan Time, Minimum Scan Time နဲ့ Measured Scan Time ဆိုပြီး သုံးခုရှိပါတယ်။ PLC အားလုံးရဲ့  Recommand ​ပေးတဲ့ Scan Time က​​တော့ အနည်းဆုံး 150 ms ​လောက်ရှိရပါမယ်။ အဲ့​တော့ တစ်စက္ကန့်ကို ဘယ်​နုကြိမ် Scan ဖတ်လည်း တွက်ပြရရင် Program တစ်ခုရဲ့ Scan Time ဟာ 5 ms ရှိတယ်ဆိုပါ​တော့။ 5 msကို 1 sec နဲ့စားရင် 200 ဆိုပြီးရပါတယ်။ အဲ့တာက တစ်စက္ကန့်ကို အကြိမ် ၂၀၀​လောက် Scan ဖတ်တယ်လို့ဆိုလိုတာပါ။ စဥ်းစားကြည့်လိုက်ပါ။ အကယ်၍ Recommand​ ​ပေးထားတဲ့ 150 ms ဆိုရင် တစ်စက္ကန့်မှာ 6.6667 (Approximately 7 ) ကြိမ်​လောက်ဖတ်​နေရင် တစ်ခြား 150 ms အထက်မှာဆိုရင် ဘယ်လို Scan Time ဖတ်မလဲဆိုတာ စဥ်းစားကြည့်လိုက်ပါ​တော့။ 
    အဲ့​တော မသုံးလို့လည်းမရဘူး Programming Line ​(Rung) ​တွေ​ရော High Speed Counter ​ရောမဖြစ်မ​နေသုံးရမယ်ဆိုရင် Watchdog Timer သာခံပြီ​တော့သုံးလိုက်ပါ။ သုံးတာဥပမာ​ပြောရရင် PLC ရဲ့ Maximum Scan Time ဟာ 300 ms ​လောက်ရှိတယ်ဆိုပါ​တော့။ Watchdog Timer ကို Process အ​ပေါ်မူတည်ပြီ  User က 300ms ရဲ့ တစ်ဝက်  150ms စီနှစ်ပိုင်း ပိုင်းပြီးသုံးလို့ရသလို ​လေးပိုင်းပိုင်းပြီးသုံးလို့ရပါတယ်။
    အခုဥပမာ​လေးတစ်ခုနဲ့ ​ပြောပြပါမယ်။ ​ဆေးကုမ္ပဏီတစ်ခုမှာ​ဆေးပြားထုတ်တဲ့စက်တစ်ခုရှိတယ်။အဲ့​ဆေးပြားတစ်ခုချင်းစီကို PLC က ​ရေတွက်​ပေးမယ်ဆိုပါ​တော့။ ​ဆေးပြားတစ်ပြားကို Count လုပ်ဖို့ 2ms ကြာမယ်။
    ဆေးပြားတစ်ခုနဲ့ တစ်ခုကြားက ကွာဟချိန် Gape Time ဟာ 4ms ​လောက်ကြာမယ် လို့သတ်မှတ်ထားမယ်။
     ​ပထမဆေးပြားဟာ 2ms ​လောက်​ရေပြီး ​နောက် Gape Time 4ms ​လောက် စုစု​ပေါင်းကြာချိန်ဟာ 6ms ရှိမယ်။ 2ms အတွက် ​နောက်​ဆေးပြားနဲ့ပါထပ်​ပေါင်းရင် 8ms ​လောက်ရှိမယ်။
     အဲ့ဒီမှာ 2ms ​ဆေးပြားတစ်ခုဟာ Gape Time 4ms မပြည့်ချင်မှာ သွားပြီ ဝင်​ရောက်သွားခဲ့ရင် Program မှာ Scan Time ပြသာနာ​တွေဖြစ်သွားနိုင်ပါတယ်။ ဒါ​ကြောင့် 2ms ​ရေတွက်ပြီးတိုင်းမှာ WDT လို့​ခေါ်တဲ့ Watchdog Timer တစ်ခုထည့်ထားဖို့လိုပါတယ်။

Reference: Instrumentationtools

Comments

Popular posts from this blog

IPv4 Vs IPv6 - What's the difference between IP Addresses

ကျွန်တော်တို့ IOT Project သို့မဟုတ် PLC တို့ HMIတို့ကို Ethernet နဲ့ချိတ်တဲ့အခါမှာ IP Address တို့ Subnet Mask တို့သတ်မှတ်ရတာတို့ကိုတွေ့ရမှာပါ။အခုကတော့ IP Addressအကြောင်းကိုမှ IPv4 နဲ့ IPv6 အကြောင်းကိုရေးမှာပါ။           IP Address ဆိုတာကတော့ ကျွန်တော်တို့ရဲ့အိမ်နံပါတ်လိုသဘောမျိုးလုပ်ထားပေးတဲ့ Internet Protocol တစ်ခုပါပဲ။ အိမ်တိုင်းအိမ်တိုင်းမှာသူရဲ့သက်ဆိုင်တဲ့နေရာလိပ်စာတွေရှိကြသလိုပဲ စက်တိုင်းမှာလည်းသူရဲ့ သက်ဆိုင်တဲ့ IP Address တွေရှိကြပါတယ်။ ဒါကတော့ IP Address အကြောင်းကိုရှင်းပြတဲ့ရိုးရှင်းတဲ့ ဥပမာတစ်ခုပါ။ ဒီမှာအဓိကထားပြီးရှင်းပြသွားမှာကတော့ IPv4 နဲ့ IPv6 ကိုရှင်းပြသွားမှာပါ။      What is IPv4 : simple meaning & features guide     ဒီ IPv4 မှာဘာတွေပါလဲဆိုတော့ Set Numbers လေးခုပါဝင်ပါတယ်။ ယေဘုယျအားဖြင့် ဘယ်လိုပုံစံနဲ့ရေးကြသလဲဆိုရင် 106.102.77.43 (ဒါကဥပမာပုံစံပါ။) လိုပုံစံမျိုးဖြစ်ပြီးတော့ မတူညီတဲ့ ကိန်းဂဏန်းလေးခုကို Cover လုပ်ပေးထားပါတယ်။ IPv4 ဘာကြောင့်ဖြစ်လာရလည်းဆိုရင် လွန်ခဲ့တဲ့ 1980 ဝန်းကျင်ကာလတွေမှာ I...

Example of PLC ladder diagram for Filing and Heating Liquid in Tank

In the previous post, I wrote PLC program about Mixing and Heating process. Today, I'm going to write about Filling and Heating process in tank. It sounds like the same topic in previous post. Actually, it is different. We'll see the sequences and processes.  Here is the given sequences according to the Author : 1. Fill the tank up to 80%. When the tank is filled, turn ON the heater to raise the temperature up to 70 deg. 2. When this temperature is reached, turn OFF the heater & open the outlet valve. 3. When the level in the tank falls below 10%, close the output valve. In this situation, I do the ladder diagram via Sysmac Studio which is the product of Omron. I just remind you again, most of the control processes are used with Mitsubishi, Siemen and sometimes Delta's PLC due to cost effectively. I'm going to show you how it works with Sysmac Studio. In this case, I'm only using Name Tags. Before I'm talking about ladder diagram, I would like to tell about ...

Indirect Addressing

Indirect Addressing      တကယ်တမ်း​တော့ ဒီစာကို​ရေးဖြစ်တာကလည်း ဆရာရဲ့ Project Problem တစ်ခုချ​ပေးပြီ ​ဖြေရှင်းရင်းနဲ့ ​တွေ့လာတာပါ။ အဲ့​တော့ အဲ့ဒီဟာက ဘယ်​နေရာမှာ ဘယ်လိုသုံးတာလဲ,ဘာ​တွေသုံးတယ်,ဘယ်လို Program နဲ့​ရေးတာလဲဆိုတာ အဓိကထားပြီး​တော့ ​ပြောပြ​ပေးသွားမှာမယ်။ သူ့အ​ကြောင်းသိဖို့အရင် Index Register ကိုအရင်​ပြောပါမယ်။ What is Index Register?     Index Register ဆိုတာက Process Register လို့လဲ​ခေါ်ပြီး​တော့ Program ကို Operand ​တွေရဲ့ Address ကို Program က Run ​နေတဲ့အချိန်မှာ Modify လုပ်တာပါ၊ PLC မှာရှိတဲ့ Register ​တွေက PLC ထုတ်တဲ့ Company အမျိုးအစား​ပေါ်မူတည်ပြီး​တော့ ​သုံးစွဲတာမတူကြ​ပေမယ့် သ​ဘောတရားက​တော့အတူတူပါပဲ။ အခု ဥပမာ​ပေးမှာက Delta PLC နဲ့ ဥပမာ​ပေးပါမယ်။     Delta မှာရှိတဲ့ Index Register က​တော့ E နဲ့ F ဆိုပြီးသတ်မှတ်ထားပါတယ်။ E နဲ့ F ကိုတစ်လုံးချင်း သုံးရင်​တော့ 16 bit အ​နေနဲ့သုံးလို့ရပါတယ်။ Eနဲ့F ဟာတွဲခဲ့ရင်​တော့ 32 bit ဖြစ်သွားပါပြီ။ E ဟာ Lower 32 bit ဖြစ်လာပြီး​တော့ F ဟာ Higher 32 bit ဖြစ်လာပါတယ်။     ဒုတိယပုံက...