09-10-2015 09:33 PM
Hi guys, so here's my deal. I have a VI that has many parameters on the front panel that I set before I run it, because it is controlling several machines. It usually does fairly long runs (on the order of hours). I want to run the program many times, often with slightly different variables, but naturally this adds up in time and I also have to come back to switch the variables and run it again.
So, I can obviously save time if I make it so another VI runs this program, but with the parameters I'd like for that run, so I can get a handful of runs in while I sleep.
My question is, what's the best way to do this?
If I were to attempt it right now, I would try something like, have a big text file, with basically a list of the parameters, repeated, so it can go and read it and load those parameters. But that could be kind of annoying, I'd probably have to make a program to also write the config file in a form that it could be read, and deal with delimiters, and such... It's obviously doable but also the type of thing that would take me a day to figure out.
So I'm wondering, is there a better way?
Alternatively, I could probably save time overall by building an Ikea bed in the lab and living here.
09-10-2015 10:17 PM - edited 09-10-2015 10:24 PM
A text file containing a set of test paremeters is a common approach. You can use Excel or something similar to create a spreadsheet or test parameters, then save it as a CSV file and use LabVIEW's Read From Spreadsheet File VI to read it. Just specify the delimeter and it'll return a 2D array of a given type. You can then iterate through the array for each test to be run and pick out the required parameters.
You might also consider TestStand, which is designed for exactly what you're trying to achieve, plus provides detailed reporting and a whole host of other features.