Skip to main content

PLC Program For Flow Totalizer with TIA Portal


    Flow Meter အတွက် Totalizer ကိုအကောင်ထည်ဖော်ဖို့အတွက် PLC Program တစ်ခုလုပ်ကြည့်ပါမယ်။ Flow Meter ရဲ့ Electrical Signal က 4-20mA Output ရှိတဲ့ဟာသုံးပါမယ်။ အဲ့ဒီ Flow Range ကလည်း 0 to 100 Liter per Hour Fuel Flow ရှိမယ်လို့ ယူဆကြည့်ပါ။

    ဒီ Logic ကိုသုံးခြင်းအားဖြင့် ကျွန်တော်တို့က Pipe ကနေ ဖြတ်သွားတဲ့ Total Fuel တန်ဖိုးကို တွက်ချက်နိုင်ပါတယ်။  ဒီမှာတော့ Totalizer ရဲ့တန်ဖိုးကို 5000 အထိသတ်မှတ်ထားတဲ့အတွက် 5000 Liters ကိုရောက်သွားတဲ့အခါမှာ သူ့က အလိုအလျောက် Reset ဖြစ်အောင် လုပ်နိုင်သလို RESET Button ကိုသုံးပြီးတော့ သူ့ရဲ့ တန်ဖိုးကို Reset ဖြစ်အောင်လုပ်နိုင်ပါတယ်။

    အထက်ဖော်ပြပါအကြောင်းအရာတွေကတော့ Totalizer အတွက် Problem တစ်ခုကို ယုတ္တိကျကျ ဖြေရှင်းဖို့အတွက်ရှင်းပြထားတာဖြစ်ပြီးတော့ 4-20 mA Analog Scaling မပါဘူးဆိုတာ မှတ်ထားစေချင်လိုပါတယ်။ အခု Program တွေက 4-20mA Analog Scaling လုပ်ပြီးသားအခြေအနေကနေ ရေးထားတဲ့ Program ဖြစ်ပါတယ်။

Problem Solution

 - ပထမဆုံး Flow Meter ရဲ့  Flow Rate က 100 Liters/ Hour ရှိတယ်လို့ယူဆပါ။

- Flow Rate က Liter per Hour ကို Liter per Second ပြောင်းဖို့အတွက် DIV ဆိုတဲ့ Instruction ကိုသုံးပြီးတော့ Calculation လုပ်ပါမယ်။

- အဲ့ဒီနောက် 1 Second Clock ကို သုံးပါမယ်။ ကျွန်တော်တို့က ဒီတန်ဖိုးတွေကို တခြား Memory Location မှာ Store လုပ်ပြီးတော့ စက္ကန့်တိုင်းမှာ တန်ဖိုးအသစ်တွေကို ထက်ထည့်ပြီး ပြန်မွမ်းမံပါမယ်။ 

-ဒီမှာကတော့ ကျွန်တော်တို့ရဲ့ Totalizer အတွက်အများဆုံးတန်ဖိုးကို 5000 Liters လို့မှတ်ယူပြီးတော့ အကယ်၍ Totalizer က 5000 Liters Maximum တန်ဖိုးရောက်ရင် RESET ဖြစ်သွားပါမယ်။

- ဒါကြောင့် ကျွန်တော်တို့ဟာ အဲ့ဒီ Maximum တန်ဖိုးနဲ့ Actual Value နှိုင်းယှဥ်မယ်။ ပြီးရင် အဲ့တာကို Automatic Reset လုပ်ရင်လုပ်, မလုပ်ရင် Reset Button ထည့်ပြီး Totalizer ရဲ့တန်ဖိုးကို Reset လုပ်ပါမယ်။

Inputs List 

Reset - I0.0

Memory

M0.5 - 1 Second clock Pulse

M1.2 - Positive Edge of Clock Pulse

MD10 - Memory Word For Final Output ( L/H ) of Flow Meter

MD18 - Memory Word For Final Output ( L/Sec ) of Flow Meter

MD22 - Total Liters Addition

MD26 - Total Fuel in Liter

Program Description 

    ဒီ Problem မှာ ကျွန်တော်က PLC S7-300 နဲ့ TIA Portal Software ကို Programming အတွက်သုံးပါမယ်။ Program အတွက် Network က 1 to 4 ရှိပါတယ်။ 
Network 1 

    ဒီမှာက DIV Instruction သုံးပြီးတော့ L/H ကနေ L/S ကိုပြောင်းပါမယ်။ L/H ကို 3600 နဲ့စားမှာပါ။ တစ်နာရီမှာ ၃၆၀၀ စက္ကန့်ရှိတဲ့အတွက်ပါ။
Network 2

    Clock Pulse 1sec ကို M0.5 သုံးပြီးတော့ စက္ကန့်တိုင်းမှာ တန်ဖိုးတွေကို ပေါင်းထည့်ပါမယ်။ ပြီးလို့ ရလာတဲ့  Result တွေကို MD22 မှာသိမ်းထားပါမယ်။
Network 3 

    MD22 ရဲ့  တန်ဖိုးကို Total Fuel in Liter ဆိုတဲ့ Display ပြဖို့အတွက် MD26 ကိုရွေးပါမယ်။
Network 4 

    ဒီ Network မှာ ကျွန်တော်တို့က Totalizer ကို Reset လုပ်ဖို့လိုအပ်ပါတယ်။ အကယ်၍ Total Fuel က Maximum တန်ဖိုးသတ်မှတ်ထားတဲ့ 5000ထက်ကျော်ရင် Totalizer က အလိုအလျောက် Zero တန်ဖိုး ဖြစ်သွားပါမယ်။ ဒါမှမဟုတ် Manually Reset လုပ်မယ်ဆိုရင် I0.0 ဆိုတဲ့ Reset Button ကို နိုပ်ပေးပြီး Reset လုပ်ရုံပါပဲ။

Reference : Instrumentationtools

Comments

Popular posts from this blog

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

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

What is Master Control Relay in PLC?

A PLC's Master Control Relay (MCR) is defined by experts as a unique relay utilized in ladder logic programming to regulate the operation of several rungs or parts of a ladder diagram. In essence, it uses certain conditions to determine whether to enable or disable particular software sections. All rungs between the MCR and the associated end instruction are executed when the MCR is turned on. These rungs cannot run if the MCR is deactivated because they are circumvented. Large portions of a program can be controlled with a single condition because to this functionality, which enhances program organization and efficiency. In first photo, Master Control Relay is used as normally opened coil, called Master Coil. As you can see when the "Start" is triggered, Master Coil will be closed contact and executes the multiple rungs. If "Stop" is triggered, Master Coil is disable the execution of the other rungs. Similarly, in second figure, I...