Jump to content

Share your favorite tips and shortcuts


Recommended Posts

Alright... I'm starting a post to vet what becomes common wisdom once you've been using LabVIEW forever, but which newbies are sometimes uninformed of. The thought behind this post was that I just discovered something "new" the other day that I have never seen mentioned anywhere and have never stumbled upon before. I wound up asking myself, "How come I never knew this?"

So having found myself in the newbie category once again, hopefully people will share their favorite insights here and maybe this thread will become a quick and dirty list of tips, shortcuts and techniques that can help the newcomer quickly become a masterful LabVIEW programmer! :thumbup:

What are your favorites? I'll start with these:

- My personal favorite is probably Ctrl+Double-Clicking to go straight to the block diagram

- My second favorite technique is the LV2 functional global

- The "new" thing I stumbled across the other day was double clicking the font in the icon-editor. This brings up a dialog to set the font you want if you don't like the default.

Link to comment
  • Replies 123
  • Created
  • Last Reply

Top Posters In This Topic

Alright... I'm starting a post to vet what becomes common wisdom once you've been using LabVIEW forever, but which newbies are sometimes uninformed of.  The thought behind this post was that I just discovered something "new" the other day that I have never seen mentioned anywhere and have never stumbled upon before.  I wound up asking myself, "How come I never knew this?"

So having found myself in the newbie category once again, hopefully people will share their favorite insights here and maybe this thread will become a quick and dirty list of tips, shortcuts and techniques that can help the newcomer quickly become a masterful LabVIEW programmer!  :thumbup:

What are your favorites?  I'll start with these:

- My personal favorite is probably Ctrl+Double-Clicking to go straight to the block diagram

- My second favorite technique is the LV2 functional global

- The "new" thing I stumbled across the other day was double clicking the font in the icon-editor.  This brings up a dialog to set the font you want if you don't like the default.

5297[/snapback]

I'll chip in! In the same category of the icon editor:

Double-clicking the "Selection Box" selects the entire icon. (+del key =A fast way to delete the Default Icon)

Double-clicking the "Rectangle Box" puts a rectangle around the icon perimeter.

Double-clicking the "Filled Rectangle Box" puts a rectangle around the icon perimeter and fills the inside.

BTW, it wasn't until some months with 7.0 that I discovered the font trick myself, but it was only after I fought with the itty bitty font default that came with 7.0 :oops:

Barrie

Link to comment

2 of them that I use a lot, besides the Ctrl + Double Click on subVI.

1) Ctrl + Drag'n'Drop a Block (or a selection of blocks) duplicates it, even if it is a variable, property node, reference or whatever (and does not create a new one as with Ctrl+C, Ctrl+V)

2) This one I discovered accidentally while performing an operation in 1). If you hold down Ctrl + Turn the Mouse Wheel Up/Down inside Structures like Case, Event, etc. (where there may more than one case), LabView will loop through the structure showing each case as you move the wheel.

Please, notice that I use LabView 7.1. Don't know for other versions.

Link to comment

With the Auto Tool turned on, press and hold 'Shift+Ctrl'. This brings up the Scroll Window tool (the open hand). Now you can click and drag (anywhere on a blank area) the window contents around on the either the front panel or block diagram.

Of course none of us should ever need this short cut because none of our diagrams ever get larger than a single screen. :rolleyes:

Ed

Link to comment

Always leave some extra open (unused) connections on the connector pane. You'll save yourself a lot of time and pain :headbang: on that inevitbale day when you need to add some more I/O to a VI you swore you'd never need to expand.

You have to choose a new connector pane, possibly rearrange your control/indicator connections, and start relinking (and possibly rewiring) every instance where you call the subVI...

Link to comment
  • 4 weeks later...
I'll chip in! In the same category of the icon editor:

Double-clicking the "Selection Box" selects the entire icon. (+del key =A fast way to delete the Default Icon)

Double-clicking the "Rectangle Box" puts a rectangle around the icon perimeter.

Double-clicking the "Filled Rectangle Box" puts a rectangle around the icon perimeter and fills the inside.

BTW, it wasn't until some months with 7.0 that I discovered the font trick myself, but it was only after I fought with the itty bitty font default that came with 7.0  :oops:

Barrie

5299[/snapback]

In the icon editor category: If you have entered text and before you select another tool use the cursor keys to move the text around pixel by pixel to make it center nicely etc.

Link to comment

You can swap the inputs on most double input functions (comparison, numeric...) by holding ctrl down and hovering over the function. If both inputs are wired, you will see the arrow change to a sort of double loop and a click will swap the inputs. This is useful if you wired something to the wrong input (like in the divide function) or if you want to make your diagram cleaner after writing the code and you want to move the function above or below other wires\functions.

Shift+mouse scroll causes the scrolling to happen in large jumps. This is useful in case you have large diagrams (not that I have any, of course) and let's you have even less exercise.

Positioning the cursor over the horizontal scroll bar and scrolling the mouse causes the display to scroll left and right.

Not exactly hidden, but something that's easy to miss - right clicking a subVI and entering SubVI Node Setup allows you to immediately set some of the window appearance properties.

For those who have office help installed - If you have an ActiveX property or method, you can right click it and select Help For property name and it will take you straight to the relevant place in the office help files.

A select function accept an error cluster, just like a case structure does.

Link to comment
2 of them that I use a lot, besides the Ctrl + Double Click on subVI.

1) Ctrl + Drag'n'Drop a Block (or a selection of blocks) duplicates it, even if it is a variable, property node, reference or whatever (and does not create a new one as with Ctrl+C, Ctrl+V)

2) This one I discovered accidentally while performing an operation in 1). If you hold down Ctrl + Turn the Mouse Wheel Up/Down inside Structures like Case, Event, etc. (where there may more than one case), LabView will loop through the structure showing each case as you move the wheel.

Please, notice that I use LabView 7.1. Don't know for other versions.

5303[/snapback]

An extra thing I miss here is the Ctrl + E to switch between Block diagram and front panel :thumbup:

Link to comment
Well, speaking of Icon editing: If you pick the font called: SMALL FONTS and use CAPS with size 8 then this looks great in the icon regardless of what you type.

5749[/snapback]

Wow. I use a custom font that I have developed myself for icons which I usually do by hand (I have it memorized) but I wind up using the default sometimes for speed even though I don't think it looks nearly as nice. The small font with caps is veryyyyyy similiar to the custom font I draw though--that should make a good (new) default font for me. Excellent tip.

Link to comment

Here's another thing that's the most obvious in the world but which I never found for a long time:

If you view the radix of a numeric on a control or indicator you can change the formatting by clicking the radix and selecting a new one (hex/oct/bin/decimal/etc). This comes in really handy sometimes while debugging since you can change the radix on the fly without having to stop everything and start over.

Speaking of which, a 'p' is used for SI notation... anybody know what 'p' is for?

Link to comment
  • 2 weeks later...

I know there are quite some folks who disable the autowiring feature because they want to stay in control of the wires (of course).

But did you know you can very easily toggle the autowiring on and off with the 'a' key? This in combination with the space-bar for changing the wires' direction (which y'all probably knew already) makes a quite powerfull combo and certainly saves me some mouseclicks now and then.

Link to comment

Conditional Breakpoints

My all time favorite debugging trick is setting "conditional breakpoints." In the pre-labview 7 days, I would put a case structure and set at least one of the cases with a breakpoint, and the other(s) without. This is good for capturing a complex setup in a "snapshot" when suspect value(s) slip down the pipeline. In a simple case, let's say a double precision number turns up with a "NaN" value, you could test for the "NaN", and if true, execute the true condition of a case statement which holds nothing but a breakpoint - unless, of course, you want something in the case statement beside the breakpoint.

post-2931-1126188674.jpg?width=400

post-2931-1126188694.jpg?width=400

In Labview 7.1.1, it appears that in the custom probes there is a "conditional * probe" (* = datatype probed) which does the same thing, although I would say that the nice thing about the previous example is that rather complex conditions can be selectively probed quite easily, the hard part being *knowing* the complex condition you want to probe.

post-2931-1126188767.jpg?width=400

post-2931-1126188776.jpg?width=400

Of course, True Labview Zen Masters would NEVER need probes, breakpoints, or debugging now, would they...

;)

-Pete Liiva

Link to comment
Yeah but for your specific example (testing for NaN) the native Conditional Double Probre doesn't work since (anything == NaN) will always return False, even (NaN == NaN). You have to wire your own custom probe to test for NaN using Not A Numbe/Path/Refnum. OK I'm picky.  :)

6044[/snapback]

Nice catch! I didn't realize that, although I hadn't really worked with the native conditional probes much yet.

It also now occurs to me that one advantage to the "old school" method over the "new native" is that you can save your breakpoint in the diagram and close up the sub-vi. As far as I've seen it in the past, probes always seem to need the diagram they are on to be open, which means their front panel is open, which can sometimes be less than desirable.

-Pete Liiva

Link to comment

Vektrex has a good list of useful shortcuts & tips.

The escape key will cancel a text entry, wiring change, item resize, move or other change if pressed before the mouse button is released.

Use Ctrl-Z to undo changes after the mouse button is released. I sometimes find it useful to have more than just the default 8 undo steps (I have it set to 50). To change it go to Tools -> Options... -> Block Diagram and remove the check next to "Use Default" and enter your own value.

Ctrl-Shift-Z is used to redo changes that have been undone.

Shift Key speed boost also works with objects being moved using the arrow keys

And while this has already been said "Double-clicking the "Filled Rectangle Box" puts a rectangle around the icon perimeter and fills the inside", it also provides a quick way to erase the existing icon.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.