NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop with Timeout

Solved!
Go to solution

Hello!

 

has anybody tried to implemented a custom test step which loops on failure until a timeout occurs? Unfortunatly, this is not one of the default looping option in TestStand.

 

I try to test an asynchronous system with signal delays and want to retry a teststep for a certain period of time before declaring it "failed".

 

Is there any way to do this? I have already tried a few this including executing a substep in the custom post action condition, which modifies the SeqeunceContext.NextStepIndex Property as shown in an NI example of a retry button in a custom operator interface. The code is run, the property is modified, but the step is not repeated. Can anybody help?

0 Kudos
Message 1 of 3
(3,199 Views)

Hi,

 

Can you post your example that you are trying?

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,195 Views)
Solution
Accepted by topic author hit74

Hi!

 

My question is obsolet now as I managed to get it working now.

 

I use four step variables called Timeout, StartTicks, StartTicksValid, and ExecutionTime. I then added two substeps, a prestep setting the StartTicks if invalid and a poststep calculating the elapsed time since setting the StartTicks. Then I use a custom loop expression comparing the execution time to the timeout and stopping if either there was one success or the time limit is exceeded. Success of the whole loop is then determined by looking at the number of passed loop steps, which has to be != 0.

 

Now I have to take a look again how to modify the report to contain the data I want. I do not want to get the intermediate result and the loop counts, but instead the execution time. This should be a RTFM job.

 

Thanks for your willingness to help.

 

hit74

 

 

0 Kudos
Message 3 of 3
(3,179 Views)