From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Post your Favorite User-made VIs!

Hey Everyone!

 

I'm looking to see some code! I want to see your favorite, most useful, most clever, or most interesting VIs. These can be anything from simple ones that you use on a daily basis to a really cool, complex program that's taken you much longer than you'd care to admit.

 

Give me unique or strange ways to use Variants! Using queues to make a sandwich? Show me! Something that you feel should be in the default pallette, but isn't? Post it here!

 

Don't forget to give a simple explaination of what it does, how it works, and why it's useful!

 

I'll start off with something simple and useful.

Pick Items from 2D Array:

Pick Items from 2D Array Snippet.png

This VI searches through a specific column in a 2D array, returning any rows where the column matches "Search for". Makes use of the "Flatten to String" vi and OpenG's "Conditional Auto-Indexing Tunnel".

 

I use this VI when I have a 2D array of DC-IV curves with different gate voltages, and I only want the IV sweep that is associated with Vg = 0.

Message 1 of 12
(2,813 Views)

Here's one more I like to use:

Replace Line in File

Replace Line in File Snippet.png

It's not all that pretty, but it's super useful. Does exactly what it sounds like. It overwrites a line in a text file.

 

To use, you may want to change your EOL Constant.

0 Kudos
Message 2 of 12
(2,810 Views)

Here's another way to do it.

 

Replace Line in File.png

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
Message 3 of 12
(2,802 Views)

Well dang. I didn't know that you could right click on Read Text from File and change it to Read Lines! I guess I should read the documentation more often, eh? Smiley Very Happy

0 Kudos
Message 4 of 12
(2,733 Views)

That's fine.  That's what's great about this forum.  You learn something new every day.Smiley Happy

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
Message 5 of 12
(2,728 Views)

I think I'm going to like this post! Two cool things already!

0 Kudos
Message 6 of 12
(2,726 Views)

I like this too, but don't forget about the Micro-Nuggets thread.

=====================
LabVIEW 2012


Message 7 of 12
(2,661 Views)
Yeah, I know about the Micro-Nuggets thread. It's a great thread, I've learned a lot from there. However, I wanted this one to be for larger files, perhaps even full programs (if licences allow). I guess it's just not as popular... oh well. On to the next topics!
0 Kudos
Message 8 of 12
(2,651 Views)

That's what I thought, and did not intend to imply this thread is a bad idea, but I thought that the right click on read from text file and select read lines would be a good addition to the micro-nuggets thread. I'm not sure if it is there or not.

=====================
LabVIEW 2012


0 Kudos
Message 9 of 12
(2,640 Views)

Mo-

perhaps its time for you to Kudos This Idea Smiley Very Happy  The timing palatte could use some gap-fillers that extend some functionality.  Between that and the best vi I ever wrote I've offered several tricky litte tidbits.  I use frequently.

 

Attached is another one I like.  The Delay.vi from the link in the Idea is used as a sub.vi so you might want the time function first.

 

I use Close Modals FPs.vi by placing it early in initialization code of projects I'm developing.  While debugging apps its not uncommon to accidentally leave a Modal VI open.  The Modal blocks action on any running vi's FP and then you are forced to run the task manager to force LabVIEW to close (Blowing off all your latest changes , Probes, open FP's and BDs that you just carefully arrainged so sad)  This vi closes those vi's.  My asprin consumption has gone down dramatically and my hair is even regrowing!

 

 


"Should be" isn't "Is" -Jay
Message 10 of 12
(2,624 Views)