LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the best way to run a VI many times with different sets of experimental parameters?

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.

0 Kudos
Message 1 of 2
(2,550 Views)

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.




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 2 of 2
(2,532 Views)