12-30-2011 03:17 PM
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:
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.
12-30-2011 03:33 PM
Here's one more I like to use:
Replace Line in File
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.
12-30-2011 05:24 PM
Here's another way to do it.
01-10-2012 11:07 AM
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?
01-10-2012 11:13 AM
That's fine. That's what's great about this forum. You learn something new every day.
01-10-2012 11:14 AM
I think I'm going to like this post! Two cool things already!
01-16-2012 12:43 PM
I like this too, but don't forget about the Micro-Nuggets thread.
01-16-2012 01:13 PM
01-16-2012 01:33 PM
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.
01-16-2012 03:22 PM
Mo-
perhaps its time for you to Kudos This Idea 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!