NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How To Loop Whole Sequence?

Probably missing the obvious here but I can't find a way to loop a whole sequence in TestStand Sequence Editor (I am using 4.1.1). At the moment I can run selected steps e.g. the whole of Main but not spanning more than one of Setup, Main or Cleanup - is there a way to do so? If I select all, run selected steps and loop selected steps are greyed out. I am using a custom process model based on standard sequential model.

 

0 Kudos
Message 1 of 16
(8,210 Views)

Hey,

 

What is your goal with this?  Why can't you use the Test UUT's entry point?  That will loop on your sequence.

 

You cannot span interactive execution (run selected steps) accross step groups (Main, Setup, Cleanup). 

 

You could use a GoTo step.  Just put it as the last step in your Cleanup group and set the Destination Step as the first step in your Setup group.  Then you will be able to go Execut>>Run Sequence.

 

Hope this helps some,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 16
(8,207 Views)

Hi, thanks for reply.

 

Goal is to have a whole sequence functionality Setup, Main, Cleanup cycle either indefinately (N times would be nice too) - without re-entering serial numbers - basically to prove repeatability without having to initiate executions every iteration.

 

Originally intention was to cycle Main only but some sequences have been developed so that certain initialisations in setup have to be rerun each pass - otherwise main does not work.

 

I had already tried the goto first setup idea but it does not appear to terminate cleanly - I am guessing due to the goto in cleanup.

 

0 Kudos
Message 3 of 16
(8,187 Views)

what about modifying the Pre UUT sequence   in the process model

 

this is where the sequence waits for the user to enter the serial number

 

just make sure that you set the "ContinueTesting" variable  to true

 

if you wish to count the number of  iterations the  "UUTLoopIndex"  variable may do this for you.

 

 

Colin

 

 

Message 4 of 16
(8,183 Views)

If all you need to do is loop on the MainSequence (without a process model and/or callbacks) you can create an additional sequence in your file (call it what ever...), drop a sequence call step, point it to the MainSequence, then right click on the step and run the "Loop on Selected Steps".

 

Otherwise Colinr has the best solution that I have used in the past.  Edit the content and control in the PreUUT callback to loop continuously as an operator would...

 

Message Edited by paulmw on 07-21-2009 09:54 PM
Message 5 of 16
(8,158 Views)

Just use the while flow control.

 

In the while loop parameters have a veriable locals.loopindex and set the condition to locals.loopindex<=desired number of iterations. 

 

While

 

Code here or seq

 locals.loopindex++

end

 

 

Glenn Ellis
0 Kudos
Message 6 of 16
(7,962 Views)

glennjammin wrote:

Just use the while flow control.

 

In the while loop parameters have a veriable locals.loopindex and set the condition to locals.loopindex<=desired number of iterations. 

 

While

 

Code here or seq

 locals.loopindex++

end

 

 


 

Using a while loop will not work for CIM1's request.  Similar to jigg's point on interactive executions, you can not have a while loop span across step groups (Main, Setup, Cleanup).  Plus, I think CIM1 is actually looking for automating the whole process model loop and following Colin's suggest would work best for that.

 

Message Edited by paulmw on 09-15-2009 11:59 AM
0 Kudos
Message 7 of 16
(7,939 Views)
You are right.  I didn't consider the setup and cleanup steps.
Glenn Ellis
0 Kudos
Message 8 of 16
(7,931 Views)

I wish there was a more simple way to accomplish this. It is something that is fundamental in many of the other test environments.  Thanks for the advice given here, it confirmed my suspicion.

0 Kudos
Message 9 of 16
(7,153 Views)

pgan,

What are you talking about?  Simpler?  I have my own suspicions and I'll see if they get confirmed...

0 Kudos
Message 10 of 16
(7,150 Views)