12-16-2018 07:59 AM
Hello,
I would like to know how to "pre-expression" the number of steps in order to dynamically allocate the number of
Results.Measurement
Numeric Array
Data Source Array.
In my project I extract all the results from a csv file, including the number of steps or sequences, using NI - CVI. And it is this number of sequences that I can not preprogram in TestStand main sequence prior to calling CVI, ie I can only set during execution, after returning from the CVI with data.
Note in a regular array, I know how to dynamically set the dimensions, for eg:
In the pre-expression I write:
SetNumElements(Local.Array,Locals.testSize)
That is to say, an "empty" array in Locals, called Locals.Array, initially has NO dimensions, with the "empty" box ticked.
Then when I retrieve the size: "testSize" , say from a CVI call, the array will now be prerset to one dimensional Array of testSize from the pre-conditions,
However, this ploy is not accepted for:
pre-expression in Multiple Numeric Limit Test.
I tried writing a pre-expression:
Step.ExpectedNumMeas = Locals.testSize,
SetNumElements(Step.Results.Measurement,Locals.testSize),
SetNumElements(Step.NumericArray,Locals.testSize),
SetNumElements(Step.DataSourceArray,Locals.testSize)
This yielded nothing.
Any ideas?
Thanks.
Shmuel
02-04-2019 03:21 PM
I'm assuming that you have at least one measurement defined in the limits tab?
If I understand your question correctly, then you need to define the comparison type and limit for your dynamic array to make this work.
Also what do you mean not accepted? Like it won't run because sequence analyzer throws an error?
11-26-2019 02:34 AM
Problem solved. (A few months ago).
Close case.
12-18-2019 08:43 AM
Care to share what was wrong?
I've noticed that the Step.ExpectedNumMeas property only works when Step.UseIndividualDataSources = False.
I have yet to find a work around.
Thanks,
Joshua D.