NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

passing arrays from labview as testable results

Hi,
 
I am relatively new to TestStand.  I have been passing return values from VIs as single dimension arrays and understand how to test them to be within limits.  However, several VIs need to return multidimensional arrays.  How would I test the elements in these other dimensions?  Some VIs also need to pass back more than one (single dimension) array.  If both arrays are 10 elements, would TestStand create one array of 20 elements in Step.NumericArray?
 
Thanks in advance for your help.
0 Kudos
Message 1 of 3
(3,278 Views)

There really isn't a built in mechanism within TestStand to accomplish what you're looking for. Luckily for us, TestStand is customizable to the extreme!

One question I had for you, how exactly are you Limit Testing this 2D array of data? One set of limits for each row? Testing the mean of each row?

There are a couple of options that come to mind. First of all, you could pass your 2D array back from an Action Step to some Local variable. Then, iterating over this Local variable you can do a Multiple Numeric Limit test on each row of the 2D array, which would in turn Limit test every element in your 2D array.

Your other option would be to create a Custom Step Type. This is going to be a bit tricker, but much cleaner and more useful if this type of testing is something you'll be doing fairly often. I would recommend starting with a copy of the Multiple Numeric Limit test and creating a new Edit Substep to set your Limits, and a new Post Step Substep that evaluates whether or not your step passes or fails based on the 2D array that was generated. This Post Step substep could be written in any language of your choosing.

To learn more about creating Custom Step Types, check out the TestStand Reference Manual, specifically Chapter 13: Creating Custom Step Types.

Hope this helps, let us know if you have any more questions.

 
Dan Weiland
0 Kudos
Message 2 of 3
(3,255 Views)

Dan,

Thanks for the information.  I was able to pass the 2D array to a local variable, and iterate over it like you suggested.

From what I've seen so far, TestStand can be a very powerful tool and I'm looking forward to learning more about it.

Thanks,

Ian FitzGerald

0 Kudos
Message 3 of 3
(3,249 Views)