05-18-2021 02:39 AM
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
05-27-2021 08:07 AM
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