LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to automatically jump to a certain frame in a stacked sequence?

I am working with stacked sequence structures.  I would like to have a condition in some of the frames, such that if the condition is false, the sequence proceeds normally, and if the condition is true, the sequence jumps to a certain frame.  Is this possible?
0 Kudos
Message 1 of 7
(6,316 Views)

Hello,

The purpose of the sequence stack was not for that. so, you should modify your code to a state machine.

But you can do a trick. use a case in each frame. And use that to escape the frames that you don't wanna do.

Software developer
www.mcm-electronics.com





PORTUGAL
Message 2 of 7
(6,313 Views)
No, but it might be a good idea to switch from a stacked sequence to a state machine.  State machaines are easier to use and sequence structures are generally frowned upon.  You can check out state machines here.
0 Kudos
Message 3 of 7
(6,311 Views)
Hi D. Luprek and drewsky,

besides "sequence structures are generally frowned upon": JUMPing around in code is generally frowned upon! Smiley Wink

Long long time ago I used BASIC for programming and heard comments like "BASIC is spaghetti code" or "using JUMPs (aka GOTO) isn't programming"
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(6,285 Views)
To paraphrase a famous book reviewer from the 1930's:

"Sequence structures should not be cast aside lightly - they should be thrown with great force,,,"

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 5 of 7
(6,264 Views)

Well said Mike..

Can I quote you on that? 😉

Message 6 of 7
(6,238 Views)

Go for it...

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 7
(6,207 Views)