NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Repeat X times if Fail, only report once

Hi

 

How can I repeat some steps for a given amount of times if a measurements is not within the limits?

I also would like to have the limits defined in only one step, and the report should only contain the last measurement.

 

My Idea (pseudo code):

 

for (i = 0; i < 5; i++)

{

      setup step 1 (reboot DUT)

      setup step 2 (set relays...)

      measure-VI (Numeric Limit Test) // LowerLimit = 10, UpperLimit = 20, Result Recording DISABLED

      if (Step.Result.Status == "Passed")

      {

            break

      }

}

NumericLimitTest   // LowerLimit = 10, UpperLimit = 20, DataSource = Step.Result.Numeric, Result Recording ENABLED

 

 

The problem is, that i have to define the same limits twice 😞

What is the Proper way to solve this? Maybe with pre-defined Callbacks?

 

Thank you!

 

kind regards

 

micromanu

0 Kudos
Message 1 of 2
(166 Views)

Yes, you should use callbacks. There is a SequenceFilePostStepFailure callback for this purpose. Check this example:

 

\Examples\Fundamentals\Overriding Engine Callbacks\Overriding SequenceFilePostStepFailure Callback.seq

 

A discussion related to this topic:

https://forums.ni.com/t5/NI-TestStand/Using-SequenceFilePostStepFailure/td-p/1963219 

0 Kudos
Message 2 of 2
(109 Views)