NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Flow control

Solved!
Go to solution

Hi All,

Let's say I have some step which should establish connection with UUT. The step is not stable and fails sometimes. I want to adjust some parameter automatically and run the step  again. If the step passed after adjustment go to next test but if it failed after three attempts go to the cleanup. The question is: what is a proper way to implement this situation ?

Thanks

0 Kudos
Message 1 of 4
(3,093 Views)

Hi Airspan,

 

You can this by using post-expressions and step-looping.

 

1). Change the Step Settings >> Looping tab to Pass/Fail Count of 1 Pass and a maximum of 3 tries:

 

Looping.PNG

 

2). Add a post-expression and change the parameter to use the local adjustment value:

 

PostExpression.PNG

 

I've attached an example sequence to show you how this works.

 

I hope this helps,

 

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 2 of 4
(3,082 Views)

Charlie,

Thank you for quick response.

Actually my real situation is following:

I have a step <Wait For Sync> (PassFail)  which is waiting for sync signal from UUT for some period of time.

if  <Wait For Sync> failed I want to call some step (<RequestSyncSignal>)  which will request of UUT to send sync signal again and repeat <Wait For Sync> after that.

After three failed loops of Wait For Sync go to Clean up else go to the next test . As far as I understand Post-Expression cannot help me with this...Isn't it?

BR,

 

 

 

 

0 Kudos
Message 3 of 4
(3,065 Views)
Solution
Accepted by topic author airspan

Airspan,

 

You're right - as this uses multiple steps, step looping and post-expression aren't the best solution.

 

In this case, I would suggest using a Do..While loop until the sync is successful or it has had three attempts and failed:

 

SyncWithDoWhileRetry.PNG

 

I've attached an example.

 

Best regards,

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 4 of 4
(3,061 Views)