State diagrams

scott1873

Member
Join Date
Apr 2003
Location
scotland
Posts
11
Are there any programmers out there who actually use state diagrams? If so do they know of any good websites/information that will help explain how they work?

thanks,

Scott
 
When I am analysing a particularly complex part of a machine (multiple inputs/outputs interacting at the same time) I may do a state diagram to help me identify illogical, error or unreachable states. With a partial diagram I can ask the machine designers things like "if it's doing this action and this input turns on what do I do?" and modify the diagram appropriately. Many times it will help me find things to which they answer "hmm, we didn't think of that". Thankfully most of our machines are fairly straightforward wwith very limited interactions going on.
 
Implementing state diagrams in ladder is easy. Most of the serious projects I see in this part of the world use some variation on the technique especially in our dairy industry.

Having got my head around it some years ago I tend to write most of my logic using this format.

The attached program is a simplistic example. The basic technique shown in this program is the guts of the idea , but it can be extended to include many more powerful features such as, state timers and holds, fault monitors, state messaging, etc.
 
Mealy and Moore

I use state machines all the time.

Hardware people are familiar with both

Mealy and Moore Diagrams.

The Mealy and Moore diagrams are a good way of documenting a process even if you use the techniques below.

PLC programmers use SFC when doing IEC programming. Automatio direct also has state programming only they call it stage programming ( A mistake ). C and basic programmer use a state number and switch or case statements.
 
KMAPS?!!?!? ARRRGGGHHHH!!

I just finished the Logic Design class: K-Maps to the left of me, Excitation tables to the right, and WAY too many inputs to try to process... I did get a B though. It would have been an A if work wasn't always getting in the way of studying (boss expects to be able to ship machines while I'm going to school. Who knew?? ;) :confused: <shrugs> )

Speaking of which, How does everyone here handle when there are many input states to be processed (like 10)? I was going to try but the excitation table is HUGE. (210=1024 cells!) and when some of the outputs are going to be treated as inputs (like Q-->Q+) the table is even larger.
 
In real life our FPGA( field programmble gate array ) designer uses his design software to optimize his equations. The FPGA designer only has to make sure the equation if correct, but not optimized.

In the PLC world you had better learn the K maps and find other simplifying techniques like De Morgran's theorem, before doing the K-maps.
 
A big mistake that many programmers make is to think that the K-Map is for "static" conditions only. Wrong. A K-Map can be designed to describe and control "dynamic" conditions as well.

testsubject said...
I was going to try but the excitation table is HUGE. (210=1024 cells!) and when some of the outputs are going to be treated as inputs (like Q-->Q+) the table is even larger.

Another mistake that many programmers make is either not thinking modular at all, or, if they do, defining the module much larger than it really is.
 
Terry Woods said:
A big mistake that many programmers make is to think that the K-Map is for "static" conditions only. Wrong. A K-Map can be designed to describe and control "dynamic" conditions as well.

testsubject said...
I was going to try but the excitation table is HUGE. (210=1024 cells!) and when some of the outputs are going to be treated as inputs (like Q-->Q+) the table is even larger.

Another mistake that many programmers make is either not thinking modular at all, or, if they do, defining the module much larger than it really is.

That is the real trick to it, you know? I eventually reduced it by breaking the inputs up into smaller groups but even so, there still was a lot of interaction between modules. I was very impressed during the class because I could see the utility of using KMAPs right away. Now I just need some more practice using them to be really useful.
 
Peter Nachtwey
It derived from the evolution of network Petry??? Which was discovered first.
Adequate tool for dynamic conditions forward and reverse, correct?

Terry Woods
A big mistake that many programmers make is to think that the K-Map is for "static" conditions only. Wrong. A K-Map can be designed to describe and control "dynamic" conditions as well.

Exact. But it must warning that not consider as part of a sequence, Yes, one part isolated.
Depends on the aplication, dynamic conditions must consider forward and reverse state bits.

If necessary ask, last time put sample.
 
Moin all,

just as a tiny completion. There is a functional difference in state diagrams and SFC networks (IEC 61131.)

In state diagrams the actions are usually part of a state. When a state looses it's token (== is no longer active) the actions will not be executed any more.

In SFC the actions are connected to steps (== states) by action associations. If an action is set/activated by an action association in one step, the action continues to be executed even when the step is no longer active, as long as there is another action association which will reset/deactivate the step.

Used correctly this is an extremely powerful method. E.g. you can activate a PID loop in step 5 and deactivate it in step 78.

BTW, I know not all PLC vendors unstood this :)

Friedrich Haase
 
I've used state diagrams in the past when when I used to write parsers and scanners and when I thought the control system was sufficiently complicated wnough to warrant them. I even had a piece of software that you could use to maintain them graphically and it would crank out sequential psuedo-code but haven't used it in years and doubt that I could even find it.
 
Good points.

dandrade said:
Peter Nachtwey
It derived from the evolution of network Petry??? Which was discovered first.


I don't know which was discovered first. For those that don't know I posted a link. Moore, Mealy, and Petri state machines are all similar with fine differences.

Petri Networks
The above example is for a communication device of some kind

More Petri Nets

One can google Petri Networks to find more. SFC must have borrowed from Petri Networks.

Friedrich Haase said:

In SFC the actions are connected to steps (== states) by action associations. If an action is set/activated by an action association in one step, the action continues to be executed even when the step is no longer active, as long as there is another action association which will reset/deactivate the step.

You are right. I hadn't though of it in that way before. My eyes are openned a little wider.
 

Similar Topics

I hope ANYONE can provide or guide me to some good papers, materials or references which had discussed the state diagrams method for PLC software...
Replies
16
Views
4,753
Can any one advise to the process to carry out when converting ladder logic to state flow diagrams?
Replies
1
Views
3,771
Help! I need to represent a control system with a state diagrams. Does anyone have any sample of state diagrams for a chiller or AHU system. I...
Replies
0
Views
3,567
We have a new machine that uses an armor block to transfer input signals for conveyor position that continuously alarms out on no position change...
Replies
0
Views
83
Good Morning , I installed an AC Tech ESV 1 HP Drive on a small bucket conveyor. Before it had a DC Motor on it . It now has a Baldor 1 HP...
Replies
1
Views
203
Back
Top Bottom