LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Jim_Kring

Option for Disabled Structures to Not Use Default Value for Unwired Output Tunnels

Status: New

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:

 

 

See this blog article, for more details:

 

http://thinkinging.com/2008/05/11/the-diagram-disable-structure-causes-bugs/

10 Comments
jdunham
Member
Absolutely.  This is a huge problem
TCPlomp
Trusted Enthusiast

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.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
PaulG.
Active Participant
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.
altenbach
Knight of NI

(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. 🙂

Ale914
Member
i completelly agree this caused me to waste a lot of time in a past project
Alessandro Ricco
Ray.R
Knight of NI

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.

 

Jim_Kring
Trusted Enthusiast
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.
Ray.R
Knight of NI

Thanks Jim,

 

You read my mind.  🙂

I wasn't sure if my post was clear, but it's exactly what you described. 

The default values would be whatever value is at the input tunnel.  The same as if they were wired through.  

 

R

tst
Knight of NI Knight of NI
Knight of NI

There's a similar idea for event structures here - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Output-tunnels-from-event-structure-should-default-to-...


___________________
Try to take over the world!
X.
Trusted Enthusiast
Trusted Enthusiast

Check Altenbach's suggestion here.