08-28-2007 10:18 AM
08-28-2007 11:00 AM - edited 08-28-2007 11:00 AM
Let me explain 😞 at least a small part of it ..)
andre.buurman@carya wrote:
How you get 75 different states. Shouldn't you be dividing fucntionality in multiple loops are so.
My SM almost never go beyond 10-15 states each.
Message Edited by Raghunathan on 08-28-2007 11:04 AM
08-28-2007 11:06 AM
08-28-2007 11:15 AM
It looks like your states 1-10 should be a single state since they run from one to the next with any branching.
RE: State machine design
I try to keep the number of states under about ten myself. While I am in the process of designing the state machine, I often step back and look at what I've drawn up. If I see a single transition into a group of states with a single transition out, I come up with a descriptive name for that group and all of those mini-states, go into a sub-VI for that state. That is where the design step in the development really helps out in the end.
Ben
08-28-2007 11:25 AM
08-28-2007 11:25 AM
@Ben wrote:
It looks like your states 1-10 should be a single state since they run from one to the next with any branching.
But they could take a long time to execute. To keep a state machine responsive and interruptable at any time, states should be kept short.
The argument can go both ways. 🙂
08-28-2007 11:29 AM
If they need to be interuptable, pass a control ref into the sub-VI so it can check the stop button.
Generally I keep the GUI sepearte from the state machine that does tha catual work.
To add to my previous post about desgining to keep the number of states small.
In reply #22 of this thread I included the complete design of an application that demonstrates using state machines within state machines.
I hope that helps illustrate,
Ben
08-28-2007 11:36 AM
08-28-2007 08:57 PM
Instead of setting a target on the number of states, I generally allow it to grow as demanded by the system.
@Ben wrote:
I try to keep the number of states under about ten myself.
08-29-2007 02:46 AM