10-18-2013 07:29 AM
I have a 18x18 2D array of numbers ( Locals.TestMeasurements ). I would like to pass the array by rows to a LabWindows app, but I can't find a function for specifying a row as a parameter without creating an additional 1D array for temporary storage. What I am looking for is something like
GetRow( Locals.TestMeasurements, Locals.Index ) where Locals.Index is my row specifier.
Any suggestions? It seems like this should exist in TestStand but I can't find the function. Thanks
Solved! Go to Solution.
10-18-2013 05:04 PM - edited 10-18-2013 05:06 PM
Locals.TestMeasurement[Locals.Index]
works for me. You might need TestStand 2012 or newer though.
Not sure which index you are treating as the row. If it's the second one you can do this:
Locals.TestMeasurement[0..][Locals.Index]
Assuming 0 is the lower bound for your first index.
For more details on what .. means. See the help for the range operator for expressions (Under Operators/Other in the Operators/Functions tab of the expression editing dialog).
Hope this helps,
-Doug
10-21-2013 08:35 AM
I had forgotten to mention that we are still using NI TestStand 2010. That solution doesn't work in this version, but it is good to know it is resolved in TS 2012. Thanks for the reply.
12-10-2013 09:17 AM
07-22-2020 11:59 AM
Here it is 2020, I am using 2017 SP1, I STILL can't do it. Spent an hour trying different combinations:
Making the first array the column then the row. Then, passing Array[index], Array[index][0..], Array[index][0..23], Array[0..][index], and Array[0..23][index]. So I said, screw it, and decided to just pass a 2d array and program around it.
Meanwhile, it is getting harder and harder to find TestStand solutions after National Instruments changed their name to NI. Did you guys forget to post the TestStand solutions?