LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Help]: Exit stacked sequence in advance

I am using a stacked sequence structure. Within one sequence, if I find a condition is met, I want exit the whole sequence structure without executing following sequences. Is there a simple way to do this?  Thanks a lot.
Dejun
0 Kudos
Message 1 of 4
(3,533 Views)
Simple is a relative term.  I would highly recommend not using sequence structures as, usually, it can hide code (stacked) and the same can be accomplished using data flow.  If you cant get around using it (or just dont want to) Smiley Happy then the below would be one obvious solution...
 
 
0 Kudos
Message 2 of 4
(3,530 Views)
Taking you recommendation, I will use data flow. Thanks.
0 Kudos
Message 3 of 4
(3,514 Views)
You cannot exit a sequence structure, stacked or flat.  Every sequence must execute.  You could use case statements as shown by Chaos to skip code in the succeeding sequence frames.  The best option is to use a state machine.  You can cause an exit at any time without having to create special case structures just to skip code.  Search for examples on state machines.  If you can't find one, I may have a template somewhere that I can dig up.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 4
(3,503 Views)