05-07-2012 09:20 AM
Dear all,
I have the a sequence structure needled into a case structure needled into another sequence structure. You can see the figure I attached. Is there a simple and quick way to add the cases of the sequence structure inside to the sequence structure outside? About the case structure I can either delete it either copy it inside all the cases of the resulting sequence structure.
Thanks for the support
05-07-2012 09:41 AM
@FabioBone wrote:
simple and quick way to add the cases of the sequence structure inside to the sequence structure outside? About the case structure I can either delete it either copy it inside all the cases of the resulting sequence structure.
I really don't understand what you are asking here.
But looking at your screenshot with where you have a 40 frame stacked sequence structure and also a 5-frame, it looks like you've already started down the wrong path with your program architecture.
Search the forums and LabVIEW examples for "state machine".
05-07-2012 09:48 AM
That program will be a hard and valuable lesson to fix. 🙂
Sub vi's and state machines are your friend.
I guess there's also some code copies in the frames?
/Y
05-07-2012 10:56 AM
You have received good advice about state machines.
Although it may not work (depending on how the rest of the code is written), you can replace the sequence stuctures with case structures. Certainly things like sequence locals will leave you with a lot of broken wires. Then gradually combine the case structures into one for the state machine. You might be better off developing a state machine from the Desing Patterns or Examples.
Lynn