NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass/ fail count loop issue

Hello,

 

In order to log the step's name once a step is failing, I used the "ProcessModelPostStepFailure" callback sequence to be executed once and insert the default "step's name" using Parameters.Step.Name.

The problem with this is that some step have a loop. For exemple if the pass/ fail count loop has a maximum of 3 iterations, the 1st and 2nd loop fail which saves the step name of that step and in the 3rd iteration, the step passes and the step name is already stored.

There is no problem when the whole test passes but the issue is when the whole sequence fails but doesn't fail because of that step (Since that step passes at the 3rd iteration), so basically the insertion of the failing step is wrong.

Is there any callback sequence when the step passes to set the variable into its default value or is there any solution based on the maximum of the pass/fail loop index ?

 

Thank you,

 

Chaima 

0 Kudos
Message 1 of 3
(3,115 Views)

Hi ChaimaA,

 

I'm a little unclear on what your desired behavior is. Do you want the whole sequence to fail if a single iteration of the single step loop fails?

 

I think an easier way of going about this would be to use a boolean local variable to record whether or not an iteration of the step has failed, and then add another step recording the details you want based on the current status of that boolean.

 

Does that make sense?

Lindsey Nestor
Program Manager, Hardware Services
National Instruments
0 Kudos
Message 2 of 3
(3,080 Views)

Hi, 

I am having similar problems, I run a test sequence where we can have the third of 3 loops pass as set up in the loop options after the first 2 failed. The sequence is a pass (this is correct in our sequence as it is how we set the test up), but as stated at the start of this chain, the failure chain is set on the first loop, so should the test fail later, it will call the first loop as the fail cause, not the test which caused the fail to occur.

I need to know the step chain, result and limits of the final failure, is there a way to do this?

Thanks

0 Kudos
Message 3 of 3
(2,492 Views)