Karnaugh diagram

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
Hey,

I know how to make a Karnaugh map.

But, making the formula seems to be a problem.

I know that u have to fish after 1's. I have to draw cirkels over 1's. And it has to be groups of 1, 2, 4, 8, ... bits...

How do I know which 1's I can take togheter in a Circle ? Sometimes I see that they overlap circles also...

Please help ?
 
How many variables in your map ? Why not just code the ladder logic as required - you may lose the interlock reasoning by reducing the logic with a map.
 
Great find, Rod, I remember doing 4,5-variable K-maps on paper, what a pain :-D

Combo, to answer your question, each group you select becomes a term of the final equation. You need to have all of the 1's (high outputs) circled within groups, and no more than that (or you will have redundancy - good in some cases, but not for the basic and stable PLC logic). In a 4-variable K-map (as in the app Rod pointed out), you can see what can be a group and what cannot. Basically, all the groups have to be rectangular or square (and they can also wrap around the edges as long as they satisfy that condition), you cannot have S- or L- shaped groups. Once you have all the 1's covered, you take each group, and see which of the 4 variables remain in a constant state for all the members of the group. The constants become your terms (ex. top left corner, group of 4, you have A and C which are always in a 0-state. So, that group becomes the term (NOT A) AND (NOT B). Each subsequent group (term) is OR'ed with the previous terms to create the final equation.

Hope that makes it a little bit clearer (and that's just the basics, you can get much more out of a K-map, such as debouncing filters, which you don't need in PLC programming anyway since your inputs are properly debounced by the input modules).

Finally, Simon, if you don't use "don't-cares" in a K-map, your final equation is logically (by Boolean Algebra rules) identical to what you start with, only much simpler. Only problem would is that it wouldn't normally show the logic of the rung as well.
 
Originally posted by bkpsu:

Finally, Simon, if you don't use "don't-cares" in a K-map, your final equation is logically (by Boolean Algebra rules) identical to what you start with, only much simpler. Only problem would is that it wouldn't normally show the logic of the rung as well.

I think that is part of Simon's point. Most people can look at the original conditions of the logic prior to reduction and understand the intent of the designer. The logic will display the fundamental design idea.

Once you optimize the logic with a Karnaugh map the visual intent is lost. You will need to make sure you comment the loic very carefully to capture the original intent.

In addition, if you have a complex OR design you may not be able to modify one path without affecting the others once the logic is optimized. You will need to rerun the Karnaugh Map from the original data with the new condition.
Keith
 
bkpsu said:
... Only problem would is that it wouldn't normally show the logic of the rung as well.

Good point.
I used to use K-maps in my early PLC programming days. What I found out however is that I tended to confuse Bubba, and talking a confused Bubba through a problem over the phone at 3:00 am is not a life-habit I wanted to nurture.

I figure that the memory in a PLC is set - so why bother to conserve it unless I am writting a huge program (even then the time cost involved is not worth the cost difference of a processor memory upgrade). In fact, I often will include extra contacts on a rung, especially output rungs, which might already be covered by another permissive on the rung, just to make things easier on Bubba because I know the first place he is going to look is the output rung.

Just yesterday I was back in a PLC program that I wrote over a decade ago on which I used K-Maps. I wrote a nice efficient program that even I couldn't read ten years later - some functions developed with the K-maps were not at all obvious.

K-maps do have their rare place. Apply them wisely.
 
Replyyyy

Wel,

For the first time a posted a question for school. Not for any projects @ work. In the evening I go to school. It was a question for digital techniques.

I didn't understand how to build the formula, but now I understand, it's an easy tool in comparison with bolian algebra. But, like u all said, not very usefull for PLC where u have enough memory these days.

With IC's it's better to use these KV Maps I think, there u can not use as much functions as u want. But, once this lesson is passed, I'll never look back on KV I think, I'm still an Automation & Drives guy, not an electronic engineer.

Thanks all for your help and sorry for my poor english
 

Similar Topics

Ya got me looking and here is a freebie I found. http://www.puz.com/sw/karnaugh/karnaugh_12.htm Thanks for making me remember something from...
Replies
10
Views
6,202
  • Poll
Hi folks, while doing an effort to learn Java, I recently developped a Java applet to simplify Boolean functions by means of a Karnaugh chart. I...
Replies
14
Views
6,952
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
217
Hi, I have attached herewith one image which our programmer has been used in S7 1500 PLC. Now we need to use the same instructions in S7 1200 PLC...
Replies
4
Views
120
Hi everyone, I need a solution based on the cause and effect diagram, especially a macro sheet or VBA script in Excel, which will help me generate...
Replies
0
Views
75
Back
Top Bottom