05-08-2000 12:06 PM
05-08-2000 01:57 PM
05-08-2000 05:11 PM
05-10-2000 09:19 AM
05-26-2000 01:58 AM
04-14-2007 08:39 AM
04-14-2007 09:37 AM
A good place to start is here.
"
So, mechanically, does a state machine only require a while loop and a case?
"
It also requires a mechanism to deterime the next state. This is often implemented using a Shift Register. I have seen queues used for this but that is rare.
"
Does each case in the switch box correspond to a state?
"
If "switch box" = case then yes. You could combine two identical states as one case but that would be very confusing.
"
How do you direct which state to go to next?
"
That is where the SR comes into play. When each state completes, it should place the next state in the SR.
"
Do you need to have a shift register?
"
To keep it simple, yes.
I have written about my thought on State Diagrams in the LabVIEW Champions Blog if you are interested.
Let us know if you have more questions.
Ben
04-14-2007 09:44 AM
04-14-2007 10:55 AM - edited 04-14-2007 10:55 AM
"
If I wanted to run them independently but simultaneously ... without ...complex code?
"
I would advise you to start by sketching up a quick state diagram.
Do you have access to the State Diagram Editor?
The SDE has a single step mode that is great for these types of complex systems. You set up your application to read all of its inputs and decide if it should stay in the current state or if a transition to a different state is required. Here is a quick example.
Other-wise you can code it up manually just the way the link I provided earlier said.
Ben
Message Edited by Ben on 04-14-2007 10:56 AM
04-14-2007 11:11 AM