LabVIEW Idea Exchange

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

Save us from ourselves

Status: New

Can you venture a guess what's wrong with this diagram?

 

Break This.png

 

Well, you could, but there's no way you can be guaranteed to guess all of the problems.

 

The answer is that N3 will show the value of X+Y (not X*Y, since there's an add primitive under there which you can't see) and that N4 will show the value of Y.

 

The problem here is that LV allows us to let things overlap. This is great if you want to write obfuscated code, but has no practical use in the real world. So my idea - BREAK THE VI if nodes, wires or tunnels overlap "too much" *. Today, LV already gives you a warning for some of these, but most people don't have warnings turned on and don't look at them.

 

While having overlapping objects does not directly affect whether the VI can execute or not, and while I do realize that this is an extreme change in behavior, it is enough of a source of potential bugs that I feel this change is warranted. Maybe NI has some info about how much something like this would be useful or annoy users.

 

* No, I don't know what "too much" is and I normally don't overlap things myself, but it can happen accidentally and I do get code from other people which does have this to a degree.


___________________
Try to take over the world!
6 Comments
Albert.Geven
Trusted Enthusiast

Sometimes it helps to sweep the diagram (code cleanup) but most of the time ctrl-z is needed afterwards.

I agree that some student settings could be helpful, also on diagram size!

greetings from the Netherlands
PhillipBrooks
Active Participant

I would suggest that overlapping wires are more obvious when "Block Diagram : Show dots at wire junctions" is left on. I leave this on for this reason.

 

I recently saw another suggestion that mentioned that the tunnels and case selectors should be the size of the smallest terminal on a subvi; then you could wire staight through a structure (dare I even suggest a sequence structure?!)

 

If structure terminals were small enough and wouldn't allow overlaps, then maybe the "Clean up diagram" function could work a bit better.

 

Kudoed!

 

 

candidus
Member

I'm against the idea of breaking the VI if elements overlap "too much". A visual indication, e.g. a thicker border or changed color of the element on top and a warning should be enough.

tst
Knight of NI Knight of NI
Knight of NI

The problem I have is that these issues may be in a place where you're not looking. Breaking the VI immediately draws your attention to that area. My basic point was that even though there's nothing conceptually wrong with having overlapping* elements, I can't think of any good reason to allow them. Can you?

 

I have had to debug other people's VIs which had this issue in the past and I do occasionally accidentally create something similar myself, so it is something that I think I would find useful.

 

 

 

* Sorry, not "overlapping". "Overlapping too much". There are cases where you need some overlap if you want to keep the wires straight.


___________________
Try to take over the world!
MichaelAivaliotis
Active Participant

Just don't allow object overlapping at all. Don't break the VI, just don't allow it.



Michael Aivaliotis
VI Shots LLC
tst
Knight of NI Knight of NI
Knight of NI

Michael, that does make more sense (to a degree. I'm not sure how much I would like it), but neither will happen if people (i.e. you) don't vote for the idea.

 

 

 


___________________
Try to take over the world!