LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Order the Flat/Stacked Sequence excecutes

Solved!
Go to solution

Strange loop structure.JPG

Normally, a flat sequence structure in a for loop will excecute from left to right until it gets to the end and then repeat the left to right code as many times as the for loop tells it too.

 

I want to be able to change the order/manner in which the sequence loops around, so that my stacked sequence excecutes in the "Z" patter shown above.  It needs to excecute from left to right until it gets to the end, and then bounce back (without repeating the last frame) and excecute right to left until it hits the beginning frame, bounce back again (without repeating the beginning frame), and excecute left to right until it hits the last frame, bounce back again, etc etc etc, as many times as I tell it to.

 

Any tips on how to achieve this?

0 Kudos
Message 1 of 3
(2,514 Views)
Solution
Accepted by topic author LarsUlrich

Forget about the flat/stacked sequence diagram. They are only a LAST resort.

If all your actions was i sub vi's then just call them one by one in a while loop. You can use a error cluster wire to force the dataflow between the sub vi's.

Otherwise go look for Statemashine. There are a lot of inputs on this site for state mashines in LabVIEW.

 

0 Kudos
Message 2 of 3
(2,511 Views)

@LarsUlrich wrote:

Any tips on how to achieve this?



Application Design Patterns: State Machines

Message 3 of 3
(2,505 Views)