11-13-2008 04:12 PM
Hello All,
I am a n00b at both TestStand and LabView. Below is what I want to do, but it is not obvious to me where to get help or look to find the answers:
I have a FPGA project, with host vi's and fpga vi's.
I have managed to put the host vi in the main sequence in TestStand, and run it.
So now, when I run the sequence in TestStand, the host VI control panel pops up, and I can adjust the inputs in the VI.
But, I want to automate this. I want TestStand to read a file with a list of many many inputs. Then, open the host VI, and change the inputs according to the file every one minute.
I have a feeling that I am going about this completely wrong, because this implies that all TestStand is doing is just opening my host VI, which makes using TestStand pointless.
11-14-2008 10:43 AM
Hello Bladhart,
The controls on the front panel of your VI can be given values from TestStand as long as they are identified on the connector pane of that VI. A code module called in TestStand can make use of the Parameter Table on the Module tab to dictate what data is passed to and from that module. You can pass constants by simply typing those values in the column called Value.
Even more, you can pass Local or FileGlobal variables in that same column. This helps to address your second goal of passing values from a file. You will probably need to create a different code module to read that file and store its various contents in either Local or FileGlobal variables (depending on the scope that you will need). This code module should be called before the existing VI you described. In this fashion, you can pass those previously loaded variables to the VI and accomplish your end goal.
11-14-2008 12:26 PM
Thanks for the reply.
Now, is it possible to make the variables change with respect to time (so it enters different numbers every minute?)
11-14-2008 02:42 PM
Bladhart,
It may be possible, but I would advise against it for two reasons. First of all, it will most likely require that you launch an application that runs constantly in the background and interacts with TestStand through its API. It would have to manage the timing mechanism, file i/o, and aforementioned communication with TestStand. This can be fairly complex and will also impact the performance of your overall test application.
Second, it does not seem like the best programming practice to change the variables at pre-determined time intervals. A different approach that you might consider would be to have an early step in your sequence file call a code module which pulls data from the different files into TestStand variables as we discussed before. Then, you could either loop through a subset of steps (including the "load" step just described) or run your sequence file in its entirety several different times to achieve different test results based on each of the different variable values.
This is one way of accomplishing something very similar to your goal, but it is easier, more efficient, and arguably somewhat better programming practice.
11-14-2008 05:05 PM
Matt,
I understand what you are saying, and I agree that it would probably be a lot better to just not go down this road altogether. The second suggestion is probably a much better choice.
But, the main problem here is that the VI cannot be closed while I load up some new values into the controls. The VI is an FPGA host VI, and I am trying to test the system's dynamic response. Something just popped into my head, and tell me if this is completely stupid, but is it possible to use another VI to change the values of the controls of the FPGA VI in general? (using or not using TestStand)
11-18-2008 01:48 PM