LabVIEW Idea Exchange

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

Error wire sink to bottom of structures when cleaning up

Status: New

Referencing the below snippets, when the clean up tool is run, it moves the error cluster from the bottom of the VI up to the top.  I would prefer for the error line to have more weight and sink to the bottom.

 

I'm sure someone will point out that if the contents of this case structure had error lines going into a subVI, it would force the error line to go to the bottom, but there are times where the error line should go through a case structure only for the purpose of enforcing a sequence of events.

 

There are times where a simple VI could be cleaned up by the clean up tool, but cannot because of this reason.

 

I'm suprised no one else has posted this before, it seems rather basic and a necessity to me.

 

 

before.png

BEFORE CLEAN UP: Error line appropriately at the bottom.

 

 

after.png

AFTER CLEAN UP: Error line moved to the top.

3 Comments
garrettmarsh
Member

Out of curiosity, I tried replicating this behavior, and I was somewhat surprised at the results (I was using 2011 SP1 so I may be behind the times). It seems there is a relation to the order in which the BD objects (nodes, wires, and tunnels) were created.

 

If you delete the error controls and all the associated wires, then create a new set of error controls and wire them up as before, what happens when you run cleanup? I found that they are sorted "correctly"... If others can replicate this, then I think this exercise offers an interesting peek into the behind-the-scenes of the cleanup tool.

garrettmarsh
Member

I'm also going to challenge the premise that the error wire should always be on bottom. I've never heard of this being an important best practice, and I couldn't find anything in the LV Style Guide to support it (although maybe I missed something). In my own experience, the are plenty of times the error wire should not run along the bottom. For example, in a SubVI handling VI server calls, it would go reference, error, then everything else (top to bottom). In a QSM, it's usually near the middle, with some shift registers running below, through the case structure. 

 

So it seems like a personal preference more than a rule to be universally enforced.

What do you think?

LordNobady
Member

I think it is not important if the error is at the bottom or not. But a set of strait true wires must stay in the same sequence. The cleanup is in this case just throwing things up without a reason. ( and that is very wrong. ) You place the error there for a reason. Moving things for no reason is one of the reasons I don't use it much.


Learning LabVIEW since January 2013