Charles Chickering Posted December 19, 2008 Report Share Posted December 19, 2008 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 Quote Link to comment
asbo Posted December 20, 2008 Report Share Posted December 20, 2008 You should use while loops instead of for loops so that i and i2 are not initialized. Quote Link to comment
Charles Chickering Posted December 20, 2008 Author Report Share Posted December 20, 2008 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 Quote Link to comment
Clio75 Posted April 17, 2009 Report Share Posted April 17, 2009 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.