NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access results of a multiple numeric limit step type using a <none> adapter

I'm trying to store the results (pass/fail) of each measurement in a multi numeric limit step type.  The adapter I'm using is a <none> since the data exists from previous steps stored in local variables.  I'm using a post expression to store the results in an array of Booleans in the local variables.  Here is an example of the post expression

 

Locals.PassFailStatus[1] = Step.Result.Measurement["name"].Status

 

where "name" is the name of the limit test.  This doesn't work and I'm having trouble finding how to access the results of the step.  Please help

0 Kudos
Message 1 of 7
(4,505 Views)

You say you're storing the step's status to an array of booleans, but the Status property is a string - something to keep in mind.

 

The problem you're running into is that when the post-expression executes, Step (in the context of the current step) does not have Status populated yet.

 

Is there a reason you can't just use Locals.ResultList? You can't look up elements by name but you can by index: Locals.ResultList[2].Status would return the status of the third reporting step in which was executed.

Message Edited by Asbo on 05-26-2010 09:28 AM
0 Kudos
Message 2 of 7
(4,494 Views)

I have report generation disabled.  I assumed the post expression executed after the step finish execution.  not sure how useful that is now.  Ideally I'd like to just reference the results list as you stated but I can't figure out how to do that.  What's giving me a hard time is I'm using the <none> type adapter since the data and limits exist in properties.  I don't know how to access the results of a <none> step type for a multiple limits test.

0 Kudos
Message 3 of 7
(4,487 Views)

Unfortunately you wont have anything in the ResultsList if you have Record Result disabled.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 7
(4,481 Views)

What are you trying to do:

 

Are you trying to figure out how to get the measurement into your multinumeric limit step so that it can evaluate the limits properly?

 

Or

 

Are you trying to get the results of the multinumeric limit step to do something with them afterwards? If so, what are you trying to do with them and why is the normal result list mechanism not sufficient for your purposes?

 

-Doug

0 Kudos
Message 5 of 7
(4,477 Views)
No I want to know what has pass or failed according to the limits.  I see from my watch window the values are being passed correctly.  I want the output stored into an array so I can use it in another step to apply a code based on which portions have passed and/or failed
0 Kudos
Message 6 of 7
(4,468 Views)

I would do the following ( if possible ).  Remove your Multiple Numeric Limit tests and replace them with Numeric Limit tests ( one for each measurement ).  Again, this may not be feasible due to the volume of tests you have may have.

 

Change the post expression on the new Numeric Limit Test to the following:

 

Locals.PassFailStatus[0] = (CheckLimits(Step.DataSource == "Step.Result.Numeric" ? Step.Result.Numeric : (Step.Result.Numeric = Evaluate(Step.DataSource)), Step.Limits.High, Step.Limits.Low,Step.Comp) == "Passed" )

 

I am assuming a 'TRUE' in your boolean array PassFailStatus is Pass test result.

 

Increment the [Index] within Locals.PassFailStatus[Index] for each test.  You could probably set something up programatically to update this index if you do not want to do this by hand.

 

Thanks,

 

Paul Holzrichter.

0 Kudos
Message 7 of 7
(4,449 Views)