State logic

eastkodakguy

Member
Join Date
May 2002
Location
Fayetteville, Arkansas
Posts
96
A coworker of mine was telling me about state logic. I really didnt understand it very well and asked him how he learned it and some guy taught him. I was wondering if any of you know of any text books or websites that could help me read up on this? thanks
 
-I was wondering if any of you know of any text books or websites that could help me read up on this?_

Is he programming coffee machines? Candy distributing machines?

I know I'll get some heat from this reply. bonkhead

Any way, to learn more, search the WWW for Grafcet, SFC, or even better... if your up to it... Finite State Machine Theory. HOOOO!!! I like this one.
 
(off-topic)...

Hey Pierre, I like your new avitar! :cool:

I won't ask what kind of meat he's cooking... utoh (Cat burgers, I presume?) lolis

-Eric
 
Kalle - Since this was my post number 500 I figured I should qualify for the Master Burger Flipper Guru title... :)
 
-As far as PLC's are concerned, it's a fancy name for a simple concept.-Villaboy

The concept is simple but like in many other subjects, making things simple is complicated.

The application of State Logic is not a simple thing.
 
Hey Pierre.
I also like the new avatar - is that home movies from Arkansas?

The application of State Logic is not a simple thing.

If you try to do an entire project in only State Logic, then you're right, it's no only not simple, it's almost impossible.

But if you let State Logic do what it does best (sequenceing), and let ladder do what it does best (exception handling), then State is both good and simple.

Since not all PLCs support both (simulaneously), I prefer a "Ladder-ized" version of State.
 
I might be a little new at this game... but, it seems to me, if you can describe your system with a Karnaugh Map then you have a State-Machine System!

Pierre
--------------------------------------------------------------------------------
The application of State Logic is not a simple thing.
--------------------------------------------------------------------------------
That, I agree with!

Allen
--------------------------------------------------------------------------------
If you try to do an entire project in only State Logic, then you're right, it's no only not simple, it's almost impossible.
--------------------------------------------------------------------------------

That, I disagree with!


Granted, the larger the system, the more complicated the Karnaugh Map could become... 4x4, 5x5, 6x6,...etc.

The trick to handling larger systems is to make your Karnaugh Map Multi-Dimensional! You can develop manageable Karnaugh Maps to an infinite number of dimensions! It becomes easier if you create an additional dimension based on each module.

DAMN! I gotta get back and finish that 2-Guys/2-Gals/2-Rubbers thing! The challange, made by Kalle (almost a year ago!), was to execute the exercise with a Karnaugh Map. I've got the whole thing in my mind -if you can call it that- and it's just a matter of laying it down and and explaining the why's and wherefore's in such a way that it can be understood by all.

In fact, I already have the maps for the actual execution of the higher level processes in place. For example, my current maps indicate that it is time for "Guy-1 and Gal-1 do Horizontal Cha-Cha" or "Guy-1 and Gal-2 do Shake-n-Bake". It is a higher level map.

The details were gonna be left to those that had the imagination to continue the details of the process to the lower levels.

I was planning on leaving the details to imagination. Now I feel I have to do the whole thing! Just to show that a process can be described entirely by a Karnaugh Map!

The only thing that makes a Karnaugh Map more difficult is the case where there are data calculations. That DOES NOT prevent the Karnaugh Map from being effective - that only makes it a bit more difficult! That is, it adds a couple of elements to the grid - as in, "Do Calc such-n-Such" and "Calc is Done".

The Bottom Line is...
A complete Karnaugh Map describes a State-Machine !
 
I am not sure I agree with the last statement. A Karnaugh map seems to be a versatile tool in explaining logic. An imaginative mind such as yours (Terry) can no doubt make it look to be all...to others as in depth as you are within the field.

We dont all think binary..and its not all as simple as some try to make it sound. The fact that you didnt show a map for the 2 guy/2girl thing is one clue.

As much as I like the concept of State Logic ( for a good ol boy like me mite make things easy), it has holes in it that needs something.

Oh well, back to working on my Eurotherm drive problem with the Linked tags and no software, just the MMI.
 
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
 
Last edited:
Terry & Pierre:

I'm intrigued.

First let me confirm my (weak) understanding:
  • State Logic is exactly the same thing as Sequential Function Charts - no more and no less.
  • SFC's are nothing more than boxes, with bars underneath them, like so:

    +-------+
    | Action|
    +---+---+
    |
    -+- Transition
    |


    <tag>
  • Inside the boxes are Actions - outputs to turn on or off (by latch or by coil), timers to run, etc.
  • The Transition is the condition that causes the SFC to leave that box, and go to the next.
  • There can be parallel actions/transitions to advance the sequence, or do things simultaneously as well.

What I'm missing in my lessons (not hard, being self-taught) is the relationship between Karnaugh maps and SFCs. I've seen where K-maps are used to simplify truth tables, and thus ladder, but not to generate SFCs. Terry, if you're inspired to turn the condoms thing into such a lesson, it would be a goodness.

It's the exception stuff to the sequencing that made me make the "it can be nearly impossible" comment: You wind up with so many parallel branches that you can't see or keep track of what is supposed to be happening - E-stops, interlocks (which stop half the devices set OM in the Action, but not the other half), alarms, etc, have always wreaked (also wreck) havoc on SFCs that I've seen.

That's why I prefer the ladder-ized SFC - the SFC's "suggest" that an output be on, but the "regular" ladder handles the e-stop/interlock/alarm/manual mode exceptions. And I have more control of step control ("if on step 7,8 or 9 jump back to step 6 if this alarm occurs" - kind of stuff - I can't picture how that would be done in an SFC)
 
Last edited:
I absolutely agree with you Allen. I do not see how you can possibly use K-Maps to fully describe almost any PLC system in the real world.
There are many applications where the next state of the machine is not just determined by the current state, but of previous states. Static K-Maps cannot handle this.
Step-Transition disgrams (SFC, GrafCet etc.) are far more useful, but, as you rightly point out, have limitations. For more info on Step-Transition type programming I strongly suggest reading up on Yourdon methodology (or similar). A good read is 'Modern Structured Analysis"
 

Similar Topics

I'm trying to add on to a safety circuit and trying to make sure this is fail-safe. My safety scanner needs some muting when things aren't running...
Replies
8
Views
823
Hi, I have read a few threads here at plctalk on the GE State Logic Processor, an IC693CSE313B in my case. I have the Eclips software V3.01 but...
Replies
1
Views
1,989
Hello, I work at a facility where there are a number of older 9030's that we communicate with a Laptop with Eclipse software installed, which is...
Replies
9
Views
7,508
Hello All, I am using Cimplicity Machine Edition (TM) v4.50 Build 3173 and programming using State Logic, I have configured a CPX935. I have a...
Replies
7
Views
3,245
Hi all, Back in 1995 I was exposed to GE Fanuc’s State Logic as the client recommended solution to two batching projects; one using the 9030...
Replies
7
Views
4,467
Back
Top Bottom