Here's a little story 'bout just these kind of things. God I start to sound like my father...
A Client had about 100 analysers systems in the field, from America to China. His systems where a masterpiece of chemical engeneering knowledge. They would analyse 5 different gazes from 50 sample lines. All gazes where going trough the same lines which where switched in the main panel with selenoid valves. For the one who know about these things it's just not a simple task. The chemical interaction between all the materials (pump seals, tubings, sensors, etc) is a real mess to deal with. But his systems where well proven and he was a happy camper!
So the marketing guru says... could we go to 9 gazes?
Mister Big says, why not, but I'll have to consult with our EE to see if the hardware can do this. This would be a real cost effective way to make more pesos out of the same boxes. Not the new ones but all of those systems in the feild.
We all know those marketing guys... He started to sell those things before they even got trough all the hardware "challenges".
Under pressure, the EE told them he could do it whit what was already in the boxes... BIG MISTAKE!
So after they fired him ... so the story goes, the owner of that eng. firm called me (I new him from way back) and asked me to look into it.
The only solution he had was to fly to every systems, replace all PLCs with bigger ones, reprogram them... there was big costs involved.
See, the system could only handle 2000 steps and they alreday had used 1550.
There apeared to be no end to this tunnel but that was because nobody tought of ...
no it's not Peter Parker, its;
K-Map
I had to tell him if I was in on this project. Could it be done?
There was big money in this...
I got the purchase order and started on my truth taable ASAP.
With the Multi-dimensional Karnaugh map well defined, I started to write the State Logic program and 1998 Steps and one month later my pants where all wet. I was a happy camper.
Has for my client, he still his a client and he sold many packages,... a smal box with DIO extension module, a few selenoid and tubing, an EEPROM and Voila! No airfare, no mess.
This long story to tell you this.
I loved Karnaugh because he makes me look so brillant at times....
Seriously, this was a complicated program and I firmly beleive it could only be done in this size PLC with the use of K-Maps and State Logic.
I use K-Maps for 2 reasons:
Uno- In smaller programs, to check if my logic is good
Secundo- To minimize the size of a PLC program when really needed
I use State Logic all the time but like rsdoran does, in a ladder form.
I would not dare use these if I did not really have to... it drains my braim a lot.
TW-A complete Karnaugh Map describes a State-Machine !
You bet Sir it is.
BTW, State Logic is the way to parallel processing in PLC, i know you'll like this one
PS: Did ya know they had Chicken/Ranch/Mushroom Pizza in Arkansas