NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Looping Sequence, customized pass/fail condition?

Hi,

 

I have a sequence with several test steps and various data aquiring steps inbetween.

Now the sequence is supposed to be called a fixed number of iterations (e.g. 5 times) and pass/fail is specified as follows:

fail, if all iterations of one specific test step fails in all 5 iterations.

else pass.

 

Any ideas for an elegant solution not involving duplified code?

0 Kudos
Message 1 of 4
(4,119 Views)

I think you are looking for something like the attached sequence.

Please note that this is a very manual way to address your request. The "clean" solution would be to work with SequenceFilePostStepFail callback to determine if the sequence should fail. This would give you the option to perform this kind of "sequence failing procedure" for any step you are looping on....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(4,081 Views)

Here's an idea:

 

1) In your sequence, uncheck the "Step Failure Causes Sequence Failure" Run Option on all steps except for the one you care about. This will make it so that the sequence only fails if that step fails and failure of the other steps has no effect on sequence failure.


2) The place were you call the sequence use the Step looping options. First select "Fixed number of loops" to get the basic expressions for fixed looping, then specify custom. Then change the Loop Status Expression to something like the following:

 

RunState.LoopNumPassed == 0 ? "Failed" : "Passed"

 

Hope this helps,

-Doug

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

Hey guys, thanks a lot for your input. 🙂

 

Doug: In my specific case this is a feasible solution for some of the tests, but not for all of them due to the way the data is acquired. I get a bunch of data and then have to perform multiple (different) tests on the same data.

Norbert: Unfortunately I can't open your sequence because my TestStand version is too old. As for your suggestion with the SequenceFilePostStepFailure callback, I have looked into that. However I also have a customized ProcessModelPostResultListEntry callback an am not yet confident enough in my TestStand skills to get all that stuff to work together the way I want in a reasonable timeframe.

 

What I am aiming towards right now is to completely separate the data acquisition and testing parts of the affected sequences. Then loop the data acquisition part, write the relevant data into arrays and test those with "Multiple Numeric Limit Test" steps in a non-looped testing part.

0 Kudos
Message 4 of 4
(4,057 Views)