NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Numeric Array Data and Properties from a VI following a SequenceFilePostStepFailure Call

Solved!
Go to solution

Hi,

I have created a test program with a SequenceFilePostStepFailure override that gets Numeric and string information from any VI that fails and then passes this data onto a Message Popup. This is to give the user some feedback as to what failed, the value measured and the limits the test is working to.

 

The problem I am having is with Multiple Numeric Data.

 

I want to get the data value that causes the multiple check to fail and along with the measurement name, pass this on also to the popup (I have a local variable that stores the values). I gotthis callback override example on from the Teststand examples folder and tried it out for my specific needs. It has numeric and string results handling but not array results handling.

 

I have been able to get the number of elements in the array using the line: -

Locals.StepDetails = Str(Parameters.Step.NumericArray.GetNumElements())

in my functions expression field. The precondition property runs the following code:-

PropertyExists("Parameters.Step.NumericArray") to determine whether the test step is outputting array results.

 

I just now need to pull out the specific array fields (measured value, low and high limits, comparison types etc.) that cause the test to fail along with the measurement name(s) so that I can put a message to the user.

 

John

0 Kudos
Message 1 of 7
(3,171 Views)

Hi John,

 

You can find what your looking for in the Parameters.Step.Result container from inside your callback. 

 

For the ones you mentioned:

Parameters.Step.Result.Measurement["<Measurement Name>"].Result.Data

Parameters.Step.Result.Measurement["<Measurement Name>"].Result.Limit.Low

Parameters.Step.Result.Measurement["<Measurement Name>"].Result.Limit.High

Parameters.Step.Result.Measurement["<Measurement Name>"].Result.CompExpr

 

Where <Measurement Name> is the name of the Numeric Limit Test from your Multiple Limit Test that you are interested in.  Default is "Measurement 0" for test 1.  You can find the Measurement Names on the Limits tab of the Step Settings.

 

Message 2 of 7
(3,152 Views)

Hi Steve,

 

Thanks for that.

 

That gives me half of the answer i.e. getting the measurements and limits out to the popup, but how do I get the measurement names themselves using an automated function. TestStand's help suggests it is possible but I need the expression I have created to do everything dynamically as failures happen.

 

There are lots of methods to call and as I mentioned I can use one of these to get the number of results in the array, but try as I might I cant get the correct format of any method to pull out the measurement names.

 

Regards

 

John

0 Kudos
Message 3 of 7
(3,145 Views)
Solution
Accepted by SercoSteveB

Go for,  NameOf(Parameters.Step.Result.Measurement[0]), where you are using a numeric value to index into your Measurement array

 

You could replace "<Measurement Name>" in the statements from my first post with a numeric index also.

Message 4 of 7
(3,141 Views)

Steve,

 

Perfect. Thank you!

 

That is now pulling out the name as I need it. Just need to do a bit more coding now to output only those array values that do actually fail and that will be it.

 

regards

 

John

0 Kudos
Message 5 of 7
(3,133 Views)

Awesome.  Use Parameters.Step.Result.Status to determine pass/fail.

Message 6 of 7
(3,126 Views)

Thanks for the help

 

John

0 Kudos
Message 7 of 7
(3,067 Views)