LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

enable disable flat sequence?

I have a flat sequence structure with several frames.

How do I enable or distable any one or more of the frames?

For example, if my flat sequence has 5 frames, I like to be able to disable 2 & 4 which would allow 1, 3, 5 to run in that order.

Or disable 5, and have 1, 2, 3, 4 run, etc.

0 Kudos
Message 1 of 7
(2,963 Views)

There is the diagram disable structure.

 

This is another reason we try to stay away from sequence structures.  A simple state machine would avoid this issue.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(2,961 Views)

I used to use stacked sequence structure and found it difficult to follow my wires.

However, with flat sequence structure, it is very easy to follow my code and debug.

Are you then suggesting that I should enclose the content of each frame by a Disable Structure and wire the input to a boolean on the front panel?

0 Kudos
Message 3 of 7
(2,959 Views)

Diagram disable structures can not be changed programmatically. For what you are attempting to do, you can just surround the contents of each frame with a case structure and control each case structure from the front panel (if that is what you are trying to do).

 

It would really be better to build without using a sequence at all. A state machine is much more flexible.

 

Rob

0 Kudos
Message 4 of 7
(2,951 Views)

It really depends on what you are doing.  If you can sequence everything with data flow (usually via the error wire), that would be most preferred.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(2,950 Views)

It may be a good time to consider changing your architecture.  The longer you wait, the harder it will be.

0 Kudos
Message 6 of 7
(2,944 Views)

Murchak,

 

There really is no reason to ever use a Sequence structure except in the situations where you need to force data flow.  And with that, I have never used more than one frame.  What's the purpose of using multiple frames?  Use the wires, it does the same thing.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 7 of 7
(2,932 Views)