maanantai 13. tammikuuta 2014

Quick Drop Plugin to Launch Your Own Templates in LabVIEW

Would it be nice to start faster a new VI with proper structure and not with the blank block diagram?

You can use this Quick Drop PLugin to create your own new VI which will use your own template:

Copy that VI Snipet png file to your computer and drag and drop it to your block diagram (if it does not work directly from your browser). 

Edit the path (Templates\ForLoopStateMachine.vit) where your template file is located. Then click CTRL+I and go to "Documentation" page and add this text there "Default Shortcut - [q]". 



You can replace the char "q" with some other if you prefer. Then save that file to your "C:\Program Files\National Instruments\LabVIEW 2013\resource\dialog\QuickDrop\plugins" folder.

How to Use? 
Then use it with Quick Drop: CTRL+Space and CTRL+ q (or what ever char you wanted to use)

It will then open you a new VI with default icon and the template that you wanted to use. For example I use this kind of structure a lot:


Enjoy!


maanantai 30. joulukuuta 2013

Strip Multiple Paths

I just have to share this simple tip for Strip Multiple Paths operation (Thanks Altenbach) :)




perjantai 15. marraskuuta 2013

Concatenate Strings vs Format Into String

Why you should use Format Into String function instead of Concatenate Strings function? Here are couple of examples why.

This is a very common use case of Concatenate Strings function:

And this is how you should do it with Format into String:

It will produce the same result. Much cleaner and faster code. Just imagine if there were 10 or more inputs.

Here is another nice thing that you can do with Format into String function. Example: You need to create a function that will change binary numbers to string that has 8 digits like here:
1011 -> 00001011
10111 -> 00010111
101 -> 00000101

Yeah it's quite easy job for any programmer. But did you know that you can use Format into String function too?

Yeah it was that easy :) And it can do so much more. You should always try to avoid Concatenate Strings function and use Format into String function instead. It's a very good function when you learn to use it. It will produce much cleaner code and it's very efficient too.

sunnuntai 10. marraskuuta 2013

Quick Drop Keyboard Shortcuts

So what are "Quick Drop Keyboard Shortcuts"? You all might already use the Quick Drop (CTRL+Spcae) tool with LabVIEW to find functions really fast. Quick Drop Keyboard Shortcuts let you do some more actions really fast. For example select some function or VI and click CTRL(keep it down all the time)+SPACE(Release it)+D. It will automatically add all controls and indicators to your function:



There are some special Quick Drop Keyboard Shortcuts from community which you can download for free:
https://decibel.ni.com/content/docs/DOC-9573

... or you can even create your own really easily with VI scripting:
http://labviewartisan.blogspot.fi/2009/08/write-your-own-quick-drop-keyboard.html

If you have your own cool "Quick Drop Keyboard Shortcut" then please add it to the list ;-)

torstai 7. marraskuuta 2013

How to abort all VI's from LabVIEW Memory

My first tip is related to situation when you want to abort all VI's from memory. This might happen for example when playing with some weird UI stuff or dynamically loaded VIs :)


If you want to abort also reentrant clones then you will need to have this code:

Enjoy!