Jump to content


Photo
- - - - -

Controlling Looping in Test Stand


  • Please log in to reply
3 replies to this topic

#1 Charles Chickering

Charles Chickering

    Active

  • Members
  • Pip
  • 19 posts

Posted 19 December 2008 - 07:28 PM

I've got a Test Stand app that I need to modify the error handling on and have ran into a road block. Basically, I have a series of nested loops and when I encounter an error on a step, I need to go back to the beginning of the sequence and start over but I want all the loops to pick up where they left off. I'll try to give a text based example:

Sequence Start
Init Test
Init Database
Init Instruments
For i = 1 to 10
For i2 = a to e
Do x
Next
Next

if an error occurs at Do x where i = 5 and i2 = c then I want to go back to Sequence Start, Execute all steps but on the loops I want i to start at 5 and i2 to start at c. Furthermore if the condition passes normal looping must resume, if the condition fails three times then the program must terminate. Is this possible to do? Any help is appreciated as I'm new to TestStand.

Thanks,

Charles Chickering



#2 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 20 December 2008 - 01:42 PM

You should use while loops instead of for loops so that i and i2 are not initialized.



#3 Charles Chickering

Charles Chickering

    Active

  • Members
  • Pip
  • 19 posts

Posted 20 December 2008 - 02:30 PM

QUOTE (asbo @ Dec 19 2008, 09:21 AM)

You should use while loops instead of for loops so that i and i2 are not initialized.


In some cases this would be possible but I don't understand how it would help me. In other cases I'm using for each loops and, to my limited knowledge of TestStand, there is no while loop equivalent.

Thanks,

Charles



#4 Clio75

Clio75

    Very Active

  • Members
  • PipPipPip
  • 87 posts
  • Location:Norway, Sandefjord
  • Version:LabVIEW 2009
  • Since:2001

Posted 17 April 2009 - 10:09 AM

QUOTE (Charles Chickering @ Dec 18 2008, 10:07 PM)

Sequence Start
Init Test
Init Database
Init Instruments
For i = 1 to 10
For i2 = a to e
Do x
Next
Next

if an error occurs at Do x where i = 5 and i2 = c then I want to go back to Sequence Start, Execute all steps but on the loops I want i to start at 5 and i2 to start at c. Furthermore if the condition passes normal looping must resume, if the condition fails three times then the program must terminate. Is this possible to do? Any help is appreciated as I'm new to TestStand.

Thanks,

Charles Chickering


Hello

I'm also new to Teststand. And I had a similar looping sequence.
I don't know if you have found any solutions on your problem.

I'm using Teststand 4.1.1

In TS4.1.1 I can sett the step to loop e.g. 4 times(fails) or 1(or more)Pass(es) before moving on to the next test.
This is located under Step -> properties -> Looping.
Pass fail count
Stop after x count of pass or after maximum y times.

I hope this helps.


BR
Clio75
----------------------------------
LW 2010, TS 2010