07-09-2018 01:09 PM
I want to run a sequence of 100 tests then collect the results into an array and then search a 2D Array of predefined fault signatures table to match the best pattern and therefore conclude that the 100tests that were run look like a specific faults signature.
How do I implement this in Teststand?
07-09-2018 01:49 PM
Hi,
What type of data is in the array? Is it numeric?
Regards,
Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)
Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor
07-11-2018 08:40 AM
Any model preferences or would a simple step looping approach be sufficient?
The simplest way would be to populate an array (e.g. in Locals) with your results from the post expression. As "i" you can use the step loopcounter or the loopcounter of any for or while loop you are using.
E.g. this post-expression example for a 10 loop multiple numeric limit test with 2 results and a "none"-adaptor:
Step.NumericArray[0] = Random(0,10),
Step.NumericArray[1] = Random(0,10) ,
Locals.DataDump[RunState.LoopIndex][0] = Step.NumericArray[0],
Locals.DataDump[RunState.LoopIndex][1] = Step.NumericArray[1]
(Didn't work out how to write the whole NumericArray at once into data dump.)
After all tests are done just throw the array as a whole into a VI where you do your numbercrunching. Of course it is also possible to analyze 2D arrays with TS-expressions if you are into that sort of pain...
Should be rather straightforward in a sequential model.
In the parallel model you'll need to use TemporaryGlobals, or StationGlobals and do some locking to avoid race conditions.