LabVIEW Shortcut Menu Plug-Ins

Showing results for 
Search instead for 
Did you mean: 

NI.Wire.Drill.llb (for wiring from a caller deep into a VI hierarchy)

Author: AristosQueue (NI)

Here is a situation all G programmers face on large projects:

We* have a new UI element or config value added to our top-most VI, and we realize that we need to pass that value down to some deep subVI. The caller diagram is N levels away in the call hierarchy. We know what we should do for clean, maintainable LabVIEW code: go add a parameter to every level of the hierarchy and wire all the way down, but we feel sick to our stomachs thinking about all that wiring. And then comes the temptation... so easy... just bundle it into some unrelated cluster that is already present. Or, worse, stick it in a global VI or LV2-style global. Or a named queue. Anything just to avoid all that work. And sometimes, we give in.

* I use "We" because I include myself in the at fault group. And I've seen code from enough others to know I am not alone!

Sometimes the data needs to go the other direction... a value computed in some deep subVI needs to be passed long distance up the call chain. And, again... sometimes we do the right thing. But sometimes we give in.

And so, my G compatriots, I offer you The Wire Drill. You start on one VI... you right-click a terminal and choose Start Wire Drill:


And then you go to a different VI in your VI hierarchy -- either up the call chain or down -- and you pick another terminal and choose Finish Wire Drill:


And, with a mighty (but completely silent) whirl, the drill springs to work. It cuts a path through your VI hierarchy -- including dynamic dispatch VIs -- and drags that long wire behind it through as many levels of VI Hierarchy as it takes.


The "Reset And Start New Wire Drill" option is there if you realize that you actually want a different start point without finishing the current one. The plug-in currently picks a less-than-optimal location on the VI conpane -- Darren has pointed me to some code that, with some extraction, may be useful for finding a good location. And the error messages are mostly good but maybe can be better. And if your source and sync are different types, the wire will be the sync's type, not the source's. These minor blemishes may be improved in the future, but I believe that even so, the wire drill may be of use to some of us today.

Attachement is saved in LabVIEW 2015. For install instructions, go here.