NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Numeric Limit Test - Unknown number of steps

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

 

 

0 Kudos
Message 1 of 4
(3,323 Views)

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?

0 Kudos
Message 2 of 4
(3,203 Views)

Problem solved. (A few months ago).

Close case.

0 Kudos
Message 3 of 4
(2,965 Views)

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.

0 Kudos
Message 4 of 4
(2,926 Views)