User | Kudos |
---|---|
8 | |
6 | |
4 | |
3 | |
2 |
The behavior of the Diagram Disable Structure is puzzling me a bit, and it seems somewhat inconsistent.
It seems primarily designed for testing alternative parts of code. At least one subdiagram must be enabled or the VI will be broken.
For this type of use DDS is easy to use: just go to the frame you want to enable, invoke the context menu and click "Enable this subdiagram." Simple and straightforward.
However, I wonder what the "Disable this subdiagram" menu item, that appears for all the already enabled subdiagrams, can be used for. Using it the VI becomes automatically broken.
This behavior is correct if there is at least one output tunnel. DDS cannot forecast which subdiagram I intend to enable, and since one have to be enabled to provide value(s) to its output tunnel(s), the VI cannot be executed. IMHO in this cases the "Disable this subdiagram" menu item, should be greyed out.
However, IMHO, another common use of the DDS is disabling part of a diagram momentarily useless, for testing purposes. For example the code for writing a big log file already tested, while debugging other parts of the VI. In this case, and in all cases where no wires at the DDS output are present, the VI can be safely executed even if all its subdiagrams are disabled. It would be great to have the possibility of directly enabling and disabling the front subdiagram. In this cases the DDS could even have just this subdiagram.
However, currently, to disable the (momentarily) useless code you must go to a blank frame and enable it. Why this convoluted path?
My proposal is:
when no output tunnels are present, the DDS could have all its subdiagram disabled, and the VI should stay runnable. To make clear this possibility, in this case only the "Disable This Subdiagram" context-menu item should be enabled.
Cheers.
Marco.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.