Skip to main content

Minterm vs Maxterm

Note : This post is only for education purpose.

When you use the PLC program, you might see some equations in programming more or the less. Most of of the projects, in PLC work based on logical control such as ON and OFF. Sometimes we need to use some mathematics equation to control the process or system. Like Minterm and Maxterm, they are important parts of Boolean Algebra which can solve somehow in digital circuit and practical problems.

According to experts definition, Minterm means that is the product of N distinct literals where each literal occurs exactly once. The output of the minterm functions is 1. Minterm is represented by m. In the other hand, Maxterm is the sum of N distinct literals where each literals occurs exactly once. The output of the maxterm functions is 0. Maxterm is represented by M.

A sum of minterms is called the Sum Of Products (SOP) and a product of maxterms also called Product of Sum (POS).

Example of SOP is shown as below;
A’B + AC + BC

And then Example of POS is shown as below;
(A+B). (C+D)

For SOP there are crucial steps for Obtaining Minterms from Values.

1. We shall take the variable without complementing it if the Boolean variable's value is 1. For instance, if A is 1, we don't need to change A'.
2. 1. We shall take the variable complementing it if the Boolean variable's value is 0. For instance, if A is 0, we need to change A'.

Unlike SOP, POS has also have crucial steps for Obtaining Maxterms from Values but there is a little bit difference.

1. We shall take the variable without complementing it if the Boolean variable's value is 0. For instance, if A is 0, we don't need to change A'.
2. 1. We shall take the variable complementing it if the Boolean variable's value is 1. For instance, if A is 1, we need to change A'.

So how do we use this things to PLC program?

By using Karnaugh Map, also known as K-Map, can use in the program as Ladder diagram or Structure Text Language (STL). Using K-map, we can simply minimize Boolean equations with three or four variables without the need for any Boolean algebra theories. It is a tool for making Boolean expressions simpler in digital logic. The truth table values are used to organize the grid, which aids in the simplification of logic. I'm not going to show how to solve the equation but it want to show how it is very important in some degree in Logical Control.
As shown in figure, there are two tables. Using K-Map with these tables obtains equations which can easily use in the program. As you can imagine, without using K-Map, it might be difficult to think how to write the program and get the desire outputs.
 
Reference : geeksforgeeks, sanfoundry

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

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 ​တွေ အများကြီး​တွေသုံး...

Sequential Flow Chart (SFC)

Sequential Function Chart (SFC)     IEC 61131-3 အရ , PLC Programming Language ၅ခုရှိပါတယ်။ အဲ့ထဲက ၃ခုက Graphical ဖြစ်ပြီး​တော့, ကျန်တဲ့ ၂ ခုဟာ Textual Language ​တွေဖြစ်ပါတယ်။     Graphical Language ၃ခု က​တော့ Ladder Diagram, Function Block Diagram, နဲ့ Sequential Function Chart (SFC) တို့ဖြစ်တယ်။ Textual Language ၂ခုက​တော့ Standard Text နဲ့ Instruction List တို့ဖြစ်တယ်။     အထက်​ဖော်ပြပါ Language ​တွေမှာ သူတို့ရဲ့ ကွဲပြားခြားနားတဲ့အားသားချက်ကိုယ်စီနဲ့ ကွဲပြားခြားနားတဲ့ တာဝန်​တွေကို ထမ်း​ဆောင်နိုင်ပါတယ်။      အခုက Sequential Function Chart (SFC) ကိုပဲ အဓိကထားပြီး​ပြောပြသွားမှာပါ။ SFC မှာ Process Operation ရဲ့  Execution ကို ဆင့်ကဲ့ပုံစံမျိုးနဲ့ တည်​ဆောက်ထားပါတယ်။ Subroutines ​တွေကို ထိန်းချုပ်ဖို့အတွက် Ladder Diagram, Function Block Diagram, Instruction List, Standard Text တို့ကိုလည်း SFC မှာသုံးနိုင်ပါတယ်။ What is Sequential Function Chart?     SFC ဟာ Sub-Program ​တွေပါဝင်တဲ့ Program ရဲ့  Int...