LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using icon shape for tunneling generic wires

Not a question, but maybe a helpfull idea.
 
I often have the problem that I need to wire around some SubVi icon.  Typically the wires attaching to the top connector, being a Object wire, or a DAQmx channel, or something like that, that is used by a long line of SubVI's, but not by all of them.
 
I've started to sneakily wire underneath those SubVI's that don't use the top wire, because it's often clearer to keep the lines straight.  Still, it's not very nice to do that, especially when others might read the code one day, because it's not really clear that the icon is only lying on top of that wire.  (Although mostly you could guess from the context)
 
I've thought about making some SubVI icons smaller, so that I have space for the top wires.   But it somehow looks ugly and makes the code harder to read.
 
 
I've thought of something else...   I made a 'tunnel' in the icon, so that you can see that the wire is going underneath.   Very small change, and I think it's quite nice this way. 
 
Here's an example of a delay VI's with a tunnel for top wires:
 
 
Any of you doing something similar?   Does it work in the long run?
 
It's a pity that I need to redesign icons for this little trick.   I think it would be really usefull if you could define such tunnel on any SubVI when needed.  A right-click, that allows to add this thing to any icon... 

Message Edited by Anthony de Vries on 04-05-2007 05:41 PM

Message 1 of 12
(3,266 Views)

Hi Anthony,

I always like to see people thinking creatively. Smiley Happy

Let me share my thoughts on this particular idea.

1) Since it is concidered bad style to wire under objects, a lot of old timers will freak out.

2) VI Anayzer will fail the code.

I have read Albert Gevens railing on a similar subject. If I understand him correctly, he is pushing for a change in the wire-in-out strategy such that the only wires passing thru a sub-VI are wires that that actually change the contents of the wire. I tend to agree with this thought myself. In the code snippet you posted, I would urge you move the wire above the line of VI's. This will make it clear which VI's use the ref and which do not.

Re: the smaller icons

That method will elliminate the need for "tunnel" and will with-stand VI anayzer and the "Grumps".

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 12
(3,246 Views)

Here's how it would look with smaller icons.

Message Edited by Dennis Knutson on 04-05-2007 10:08 AM

0 Kudos
Message 3 of 12
(3,243 Views)

Ofcourse, I do know how I should do things... Smiley Happy

But if you compare, which one is easier to read?    (By human anyway...    would need smarter validators for my tunnels...Smiley Very Happy

    

or

Message Edited by Anthony de Vries on 04-05-2007 06:20 PM

Download All
Message 4 of 12
(3,229 Views)
I think that would be a great new feature
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 5 of 12
(3,220 Views)
I also like to see people thinking creatively about LabVIEW wiring.  However, for this particular suggestion, I feel the risks outweigh the benefits.  For the code snippet shown above, I think it would make the most sense to reduce the height of the timing subVI (the one with the hourglass) since it looks like something that would be inserted frequently between other VIs on the error wire.  As for the other suggestion of running the wire along the top and just branching off when needed, that wouldn't work in the screenshot shown above, because that wire is a LabVIEW Class wire, which passes a value (not a reference), and thus, could very well be modified by the subVIs through which it is passing.  In the past, however, I have used that trick with reference-based APIs (like VI Server).
 
The main reason I don't like the "wire under" idea is that you simply can't tell through visual inspection whether or not that wire is truly connected to the conpane of the subVI.  It's the same reason I don't like it when people wire under structures...you never know what other objects might be connected to that wire that are lurking underneath the structure.  I feel that in all cases, the only block diagram objects covering any part of a wire should be the source and sink(s) of that wire.  If you find yourself bending wires around objects to wire them together, you may have a case like the one shown above where a smaller icon size is in order, or perhaps you are performing two parallel tasks which should perhaps not be in the same line, but perhaps should be two "rows" of subVIs that are chained together with the error cluster (the mental image I have is the traditional DAQ example of configuring and running simultaneous AI/AO).
 
-D
Message 6 of 12
(3,196 Views)
Thanks for the interest/replies guys.   I wonder... have any of you similar tricks like these for your own work?    How do you handle the clutter of wires.
 
Like you, Sir Knutson...  Was that a quick photoshop edit, or do you actually use such small icon VI's? 
 
 
Darren,  What do you mean with those two rows of subVI's?    Would you have the error line going up and down between those two rows?      Interesting idea....     Normally, I have my error line absolutely straight, and then bring in the rest.    Haven't thought about making my object's and reference lines straight, and zig-zagging my error line in between.
0 Kudos
Message 7 of 12
(3,144 Views)

Hi Anthony,

"Was that a quick photoshop edit, ..."

Please forgive me if you already knew this but it is possible to create icons that are less than 32 X 32 pixels. Just make sure all thrre versions of the icon at the small size.

Another idea that may serve you is using an Action Engine .

Instead of running the wire out of one VI into another, implement each of the various sub-VI's as action in the AE and just keep your wire in the shift register.

Just trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 12
(3,129 Views)
Yes, I actually use such small icons and have for years. As Ben pointed out, it's very easy to do. I normally use a modified wait msec fucntion that was done years before the Delay function was added. It's about half the size of the Delay icon I modified.
0 Kudos
Message 9 of 12
(3,123 Views)
I just learned something recently and could be useful if you want to get the icon from an express vi to modify it and make it smaller (among other things)
 
if you right click on the express vi and click open front panel  it will make a subvi out of the express vi and you can modify not only the code but also the icon
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 10 of 12
(3,105 Views)