NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you set the Step.Result.Numeric for a Sequence Call (Numeric Limit Test) from within the called Sequence?

It sounds like you have inserted a Numeric Limit Test step that uses the sequence call adapter. This implies that you would like a single numeric value returned by your sequence call that is then evaluated by comparison to the limits of the sequence call step. Let me know if I have made any incorrect assumptions.

The solution is to add a Statement step within your called sequence that uses the expression

RunState.Caller.Step.Result.Numeric = 10

where you would substitute 10 with your measurement (e.g. Locals.MyMeasurment or RunState.PreviousStep.Result.Numeric).

Let me know if this does not make sense or does not suit you needs.
Message 2 of 4
(3,817 Views)
Thanks very much!
You were right on target.

I combined your solution with my own:

Passed the Caller's Step.Result.Numeric (by-ref) to the "Measurement" parameter of the target-sequence.
Then returned the measurement via
Parameters.Measurement = RunState.PreviousStep.Result.Numeric

Any performance or other issues with doing it this way?
0 Kudos
Message 3 of 4
(3,817 Views)
No. That is a good solution. The advantage is that some day you could move your sequence to be a deeper subsequence and as long as you passed the parameter deeper then your sequence will still work. In contrast if you use the method I mentioned then you could end up with a property path like

runstate.caller.runstate.caller.runstate.caller.runstate.caller.runstate.caller.step.result.numeric = 10

Yuck!
0 Kudos
Message 4 of 4
(3,817 Views)