From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 03/13/2006

Here's a wiring nugget for you.  If you have a function on your block diagram with two inputs, you can switch the position of the inputs very easily.  If you hover over one of the inputs with your wiring tool (this also works with the auto tool), and you hold down the Ctrl key, your wiring tool will turn into what I call the "switcheroo" tool, which kinda looks like a curly wire.  Anyway, with this tool visible, if you simply left click, you'll see the inputs to your function switch places.  And for you LabVIEW trivia buffs, I'm pretty sure this feature was introduced long ago by none other than Jeff Kodosky himself.
 
-D

P.S. - Check out past nuggets here.
Message 1 of 15
(15,492 Views)
Oh, yeahhh, the switcheroo tool! I probably use it at least a dozen times per day on average. 🙂
 
Ever notice how if you e.g. insert a divide operation into a wire, the input is invariably on the wrong terminal. Instead of breaking the wire and rewiring both inputs, I just wire the other input, then swap them.
 
Now here's a tiny room for improvement in the switcheroo functionality that could be implemented: Make it work even if only one of the inputs is connected! For example if ony one input is wired, the tool would switch then wire to the other input. 🙂

Message Edited by altenbach on 03-13-2006 09:59 AM

Message 2 of 15
(15,467 Views)

Good suggestion, altenbach.  I'll put that one on the books and maybe we'll see it implemented in a future LabVIEW version.

-D

Message 3 of 15
(15,457 Views)

Hi Darren,

While you putting that one in the books, please take it one notch farther so it will swap inputs to a "Select".

Christian wrote;

"Ever notice how if you e.g. insert a divide operation into a wire, the input is invariably on the wrong terminal. "

Urs Lauterburg shared on Info-LabVIEW that it is possible to determine which of the two inputs gets wired when doing an insert. The trick is to hold the cursor a little above or below the wire.

If the cursor is slightly below, it wires to the top input. Vise versa for the bottom.

Ben

Since that one came from Urs (Mr "Whatever happened to supporting the Mac?"), lets call that tidbit a "golden apple" Smiley Wink
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 15
(15,440 Views)
The inserting behavior is pretty subtle.  If the cursor is slightly below the wire, the empty terminal is above the wire.  And vice versa if the cursor is slightly above.  It would be nice if there were some sort of visual indicator of how the inserted function will behave... ghosting, perhaps?

Edit: Ben beat me too it.  This is what I get for waiting till after lunch to finish my comment.

Message Edited by jasonhill on 03-13-2006 12:33 PM

Message 5 of 15
(15,433 Views)
Hey Thanks Darren !

That is a great one... I didn't know that I'm going to play alot with it from now on.

I hope you'll keep feeding us with these "tasty nuggets" for a long time Smiley Very Happy

BTW : Jason's idea (ghost) also sounds great !!

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 6 of 15
(15,429 Views)
Darren,

It is the Option key on the Mac. Both LV 7.1.1 and LV 8.

Lynn
Message 7 of 15
(15,422 Views)
I knew about the switcheroo before, but until today I never noticed the insert selection from the right click menu.  This forum is invaluable.
- tbob

Inventor of the WORM Global
Message 8 of 15
(15,410 Views)


@Ben wrote:

Urs Lauterburg shared on Info-LabVIEW that it is possible to determine which of the two inputs gets wired when doing an insert. The trick is to hold the cursor a little above or below the wire.

If the cursor is slightly below, it wires to the top input. Vise versa for the bottom.


Ben,
 
Of course I am fully aware of this. I get the intended terminal in at least 99% of the cases. 😉
 
But... the true story is that I am typically don't really know what I have to divide by what, or what I am doing, so I just swap until the result looks right. But admitting that would make me look stupid....:o)
Message 9 of 15
(15,392 Views)


@altenbach wrote:
the true story is that I am typically don't really know what I have to divide by what, or what I am doing, so I just swap until the result looks right. But admitting that would make me look stupid....:o)


LOL!!

aLWAYS GOOD TO READ THESE.

OOps.  Caps lock !

Now, it would be nice to have a feature which lets you select two terminals and switch them, instead of disconnect terminal, then connect to the right location.   Or maybe there is...???....???  (future nugget?)

0 Kudos
Message 10 of 15
(14,925 Views)