Skip to main content

Function Block Overview


Function Block ဆိုတာဘာလဲ?

    Function Block ​ခေါ် အတို​ကောက် FB ဆိုတာက Process ရဲ့  Programming ​တွေကို ရိုးရှင်း​အောင်​​ရေးသားတဲ့နည်းတစ်မျိုးပါပဲ။ တစ်နည်း​ပြောရရင်, Programmer က​ရေးထားတဲ့ Programming Length ​တွေ, Programming ရှုပ်​ထွေးမှု​တွေကို ​လျော့ချ​ပေးတဲ့နည်းတစ်မျိုးပါပဲ။

How does Function Block(FB) work?

    Function Block ဆိုတာ သူ့ကိုတည်​ဆောက်ပြီးတာနဲ့အလွယ်တကူ Main Program မှာအသုံးပြုလို့ရတဲ့ပုံစံတစ်ခုပါ။ Function Block တည်​ဆောက်ဖို့ ဘယ် Programming ​တွေလိုလဲ​မေးရင်, IEC 61131-3 ကသတ်မှတ်ထားတဲ့ Programming Language​ ငါးခုထဲကမှ Sequential Flow Chart (SFC) ကလွဲလို့ ကျန်တဲ့ Ladder Diagran, Instruction List (IL) , Function Block (FB) နဲ့ Structured Text (ST or STL) တို့ကိုသုံးပြီး​တော့ ​ရေးရပါတယ်။​
     အောက်ကပုံကိုကြည့်မယ်ဆိုရင် Function Block ကို Ladder Diagram နဲ့​ဆောက်ထားပါတယ်။ သူ့ရဲ့  Input, Output ​တွေကို Tag_Name ​တွေကို သူနဲ့သက်ဆိုင်တဲ့ Data Type ထဲမှာသိမ်းရပါတယ်။ Tag_Name ဆိုတာက အခုပြထားတဲ့ Ladder Diagram ထဲကလိုမျိုးနာမည်​တွေကို​ပြောတာပါ။ ​အဲ့ဒီ​နောက် Function Block ​ဆောက်ပြီးတာနဲ့သူရဲ့ Input, Output ​တွေကို Main Programထဲက Address သတ်မှတ်ထားတဲ့ Variables ​တွေနဲ့​တွဲ​ပေးရပါမယ်။ ဥပမာ, အခုပုံထဲမှာ Function Block ထဲမှာ Run_FB ကို Variable သတ်မှတ်ထားတဲ့ Pump1_Run ( %I0.0.0 ) နဲ့တွဲပြီးသုံးလိုက်တာပါ။

Where is Function Block (FB) used?

    Function Block ကို ဘယ်မှာအသုံးများလဲဆိုရင်​တော့, တူညီတဲ့လုပ်ငန်းစဥ်လုပ်​နေတဲ့ အရာ​တွေမှာပဲသုံးတာများပါတယ်။ နားလည်​အောင်​ပြောပြရရင်, ​Star Motor 5ခုသုံးထားတဲ့ Process ရှိတယ်ဆိုပါ​တော့။ Motor တစ်ခုချင်းစီက Process လုပ်​ဆောင်ချက်​တွေက အတူတူပါပဲ။ ဒါ​ပေမယ့် Ladder Diagram မှာ Motor တစ်လုံးအတွက်​ရေး​လိုက်,​နောက်တစ်လုံး​​ရေးလိုက် နဲ့ Programming​ရေးပြီး I/O Address ​တွေလိုက်သတ်မှတ်​နေရတာ အချိန်ကုန်​စေပါတယ်။ ​နောက်တစ်ခုက စက်ပျက်ခဲ့လို့ Troubleshooting သမားက Ladder Diagram ​ကို အ​ပေါ်​အောက်လိုက်ပြီးစစ်​နေရတာလည်း သူ့အတွက် ဒုက္ခ​​ရောက်လှပါတယ်။
      ဒါ​ကြောင့် Function Block ​ဆောက်ပြီးတာနဲ့ Main Program က​နေပြီး​တော့ သူ့ကိုယူသုံးပြီး Variable ​တွေကို အဆင်သင့်ထည့်​ပေးလိုက်ရုံပါပဲ။

Reference : Instrumentationtools, Hegamurl

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

4-20mA Formulas

As seen in the accompanying image, the voltage output of a 4–20 mA transmitter can be transformed to a specific range, from 0 to a maximal amplitude Vmax: I [mA] = ( ( (V − Vmin) / ( Vmax − Vmin) ) × 16 ) + 4 (Voltage to Current) V [Voltage] = ( (I − 4 ) / 16) × ( Vmax − Vmin ) + Vmin (Current to Voltage) PV [units] = ( (I − 4 ) / 16) × ( PVmax − PVmin ) + PVmin (Current to Process Variable) Where, I is the current. V is the voltage. PV is the Process Variable. min is the Lower Range Value of the respective signal. max is the Upper Range Value of the respective signal. Keep in mind that the min and max values and units must match. For Voltage to Current, As an illustration, The output voltage of an analog output card is 3V, and its total range is 0–6V. Determine the corresponding 4–20 mA current value. I = ( ( (V − Vmin) / ( Vmax − Vmin) ) × 16 ) + 4 I = ( ( (3 − 0) / ( 6 − 0) ) × 16 ) + 4 I = 12A Reference : Instrumentationtools

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