From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
IMO, the Diagram Disable Structure causes bugs, because the output tunnels of the Diagram Disable Structure are set to "Use Default if Unwired", and the default values are very often not desireable, as can be seen in the screenshot, below:
This could be extended to normal case structures. I think Ben has made the propostion to have a 'Default Values' case with for every tunnel a default value if the value is not wired in the executing case.
Indeed. I hate the default value cases anywhere. Convenient and easy to use but opens your code up to too many opportunities for errors. I suggest making it selectable - globally - in Tools>Options.
PaulG.
LabVIEW versions 5.0 - 2020
“All programmers are optimists” ― Frederick P. Brooks Jr.
(Ton, you might remember my suggestion from very (very!!!) long ago as quoted here. I still think is is a good idea and I might write it up as an idea here ;))
Back to this thread:
In many cases it might be sufficient to simply have a group of data types (such as references, etc.) that are simply not allowed to have default outputs at exit tunnels because it would never make sense. An unwired output for these specific types would give a broken arrow no matter what the tunnel setting is. Such rules would probably solve 90% of the problems mentioned above without causing options bloat. 😉
Personally, I like default output tunnels in many situations, especially for booleans, strings and numerics. It simplifies coding. 🙂
It would be great if it could look at the input tunnels and make an association with the output tunnels and make those values become default. For non-matching tunnels, then they would not have default values.
Ray: I agree that it would be nice if some smarts were added. I'd like it if LabVIEW could automagically wire the input tunnels to output tunnels if the vertical position and data type is the same -- and, perhaps this could be scoped to only happen for the error cluster and reference wires.