06-20-2012 08:15 AM
Hi does anyone know how to repeat parts of a stacked sequence? For example, if I want to only repeat frames 7-12, how would I go about doing that? I've been looking at state machines but still trying to understand it. I thought there might be an easier way to do it somehow with a while loop but unsure how I would go about doing that. Thanks!
Jon
Solved! Go to Solution.
06-20-2012 08:20 AM
You need to try and understand the state machine. It is used to do exactly what you are looking to do.
06-20-2012 08:55 AM
To add to Tim's reply:
The stacked sequence structure can only be repeated at whole, so it will not supply the functionality you are looking for (this is only one of the many reasons why sequence structures should not be used).
The state machine on contrary enables you to select for each iteration what the next action should be. So each sequence frame is a case (state) in the state machine. The transition code defines the next case to be executed. So you can virtually "jump around" in the software steps you have currently implemented in your sequence frames.
hope this helps,
Norbert
06-20-2012 09:01 AM
Great, thanks for the answer and explanation guys. I'll dig a little deeper into the state machine and get that figured out. Thanks!
Jon
06-20-2012 09:06 AM
Once you get some code come back and we will be happy to help you through it.
06-20-2012 12:03 PM
If anyone is just starting to learn state machine basics there is a great website:
http://blog.shienandy.com/2008/12/labview-state-machine-basic-example.html
Does a great job with step-by-step video example!
06-20-2012 01:09 PM
Stacked sequence bad... state machine good.
06-20-2012 02:04 PM
Thanks for your offer for help Tim but the website I previously talked about regarding state machine really helped me out. Got my program working perfectly...so far. Thanks!
Jon