Jump to content

Share your favorite tips and shortcuts


Recommended Posts

sure, just pass the VI path as command-line argument.

<labview version dir>\labview.exe -pref "%l" "VI1_Path" "VI2_Path" "VI3_Path"

Yes but that will open the same VIs for all INI files.

To open both INI file and project VIs I usually use a shorcut with a specific command line.

The file association is not required with this shortcut technique.

Link to comment
  • Replies 123
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

If you work with a grid on your BD (or FP) then the following may prove handy to know. Do you get frustrated when you want to move things around but in doing so all your lovely straight wires on the BD become crooked again? Well with a single keystroke, this bothersome behaviour can be avoided.

Simply hold down the <SHIFT> key before clicking on an object or a selection and move with confidence ! Your movements will be constrained to Left/Right or Up/Down.

"Before moving a selection.png" , "After moving a selection - shift unused.png" , "After moving a selection while holding down shift"

post-1272-1142479087.png?width=400

post-1272-1142479100.png?width=400

post-1272-1142479109.png?width=400

regards

Peter

Link to comment
If you work with a grid on your BD (or FP) then the following may prove handy to know. Do you get frustrated when you want to move things around but in doing so all your lovely straight wires on the BD become crooked again? Well with a single keystroke, this bothersome behaviour can be avoided.

Simply hold down the <SHIFT> key before clicking on an object or a selection and move with confidence ! Your movements will be constrained to Left/Right or Up/Down.

"Before moving a selection.png" , "After moving a selection - shift unused.png" , "After moving a selection while holding down shift"

post-1272-1142479087.png?width=400

post-1272-1142479100.png?width=400

post-1272-1142479109.png?width=400

regards

Peter

If only that worked for "nudging" with the arrow keys -- I use the arrow keys so often (for small moves) that the snap to grid feature is too much of an annoyance to use.

Link to comment
If only that worked for "nudging" with the arrow keys -- I use the arrow keys so often (for small moves) that the snap to grid feature is too much of an annoyance to use.

It does :yes: Hold down <SHIFT> while nudging with the arrow keys and it snaps to the grid.

regards

Peter

Link to comment
OK, so even I can learn a few new tricks... :shifty:

[LV8] By default when you click and drag a block diagram object, you get an outline of the object under you mouse pointer. If you tap the spacebar while you're draging, you will see the actual image of the object under your pointer. Now isn't that cute! :wub:

There is a non-cosmetic reason for this too. If you are moving an object that is not wired up to anything, by pressing the spacebar and revealing its image again, LV gets ready to automatically wire it up if a type matched source or sink is within the designated number of pixels.

regards

Peter

Link to comment

If you have Automatic Wire Routing enabled (in the BD options) the LV help file says to:

Press the <A> key. LabVIEW temporarily disables automatic wire routing for the current wire.

but did you also know that by pressing the spacebar while the dotted wire shows will rotate the right angle in the route by 180 degrees ?(works for both auto and manual wire routing options)

regards

Peter

Link to comment

This is something I found out by accident. Probably old news to most.

If you wire where an existing path already exists, your new wire path takes the place of the old one. Normally I would delete and rewire, or select and nudge, or right click and 'Clean Up Wire'.

I was going to include a picture to help explain, but I couldn't figure out how to include anything that wasn't a URL.

David

And I meant that to be in the 'Tips and Tricks' thread. Showing off my newbie status today...

Link to comment

When you do a post you have the option to attach a file, look below the text box on the edit page. Make your image, save to file, then use the browse button on the edit page

Like This:

post-45-1143162024.jpg?width=400

This is me, adding this image, of me adding this image, into LAVA (can you say recursive :P )

Then you'll get the option to add it into your post

Like this:

post-45-1143162256.jpg?width=400

Select Add into Post, and voila !

That'll be 5 cents please ...

Link to comment
C'mon Pete - I know that you've got a plethora of more keyboard shortcuts ;) Have you ever thought of putting them all into a new thread?

Nah, 'cause all of the shortcuts are listed in the LV help file in one place anyway. Just type in "keyboard shortcuts" for the index keywords.

regards

Peter

Link to comment
This is something I found out by accident. Probably old news to most.

If you wire where an existing path already exists, your new wire path takes the place of the old one. Normally I would delete and rewire, or select and nudge, or right click and 'Clean Up Wire'.

Here is the image then. Thanks for your help!

post-1519-1143480931.gif?width=400

Link to comment
  • 1 month later...
  • 1 month later...

You can change the color of a block diagram, sequence structure, case structure etc

Select the color you want the front panel first then Press CTRL E to bring up the block diagram

The tool is available for a color change at least once on any structure you wish.

Link to comment
You can change the color of a block diagram, sequence structure, case structure etc

Select the color you want the front panel first then Press CTRL E to bring up the block diagram

The tool is available for a color change at least once on any structure you wish.

You can also use Shift Right-Click to bring up the tool pallete. From there you can select any mouse tool, including painting.

This is also useful on the Front Panel, when you need to get the wiring tool back for placing controls in the connector pane.

Link to comment

Hold the CTRL-key down when you have the painting tool selected and it changes to the get color tool.

Good when you are matching colors in different controls or indicators.

Hold the CTRL key down, click on the object you want to match in color, release the CTRL key and click on the object you want to color.

Link to comment
You can change the color of a block diagram, sequence structure, case structure etc.

Some purists might complain about colors on the BD, but I do sometimes use an alternating light grey background in heavily nested for or while loops. I also sometimes use a yellow background in a loop or case to remind me of critical points in the code, or cases that should not occur.

The other thing I've started doing (artistic license only) is to label my loops, change the background and forground of the label to the dark grey of the loop, Move the label into the inside upper left and use a font that is bold and white. I just like how it looks :)

post-949-1151059890.jpg?width=400

Link to comment
The other thing I've started doing is to label my loops, change the background and forground of the label to the dark grey of the loop, Move the label into the inside upper left and use a font that is bold and white.

One of my colleagues did that for a cRIO program he did a few years ago - when I saw his code I thought it was actually a special FPGA loop that indicated prioririews or such (I hadn't done any FPGA at that stage :D ) - now I use the same technique all the time. I think labelling loops is important to help initiate those who aren't familiar with your coding style and the architectures you use.

Link to comment
I think labelling loops is important to help initiate those who aren't familiar with your coding style and the architectures you use.

I also like to label my For Loops using a For Each syntax that reflects the array elements that I am iterating over. For example:

For Each Device

For Each Config Section

For Each Config Key

For Each File

This allows one to quickly understand the intent of the loop. I sometimes take it a step further and describe the work that is done inside the For Loop, such as:

For Each Device: Initialize Device

For Each Config Section: Get Key Names

For Each Config Key: Read Key Value

For Each File: Get File Date and Delete if Old

If there is more work than can be describe in a single statement, I make sure to comment each block of work inside the For Loop.

The same sort of thing can be done for While Loops. For example:

While TCP connection is valid: Read TCP Data

While No EOF Detected: Read Line from File

Cheers,

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.