05-24-2012 07:50 PM
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.
05-24-2012 07:53 PM
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.
05-24-2012 08:01 PM
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?
05-24-2012 08:14 PM
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
05-24-2012 08:15 PM
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.
05-24-2012 08:46 PM
It may be a good time to consider changing your architecture. The longer you wait, the harder it will be.
05-24-2012 11:14 PM
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.