NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

goto cleanup on failure programmatically

Solved!
Go to solution

Hi all,

 

I try to manage the "goto cleanup on sequence failure" mode programmatically (without using station options).

For that, I'm using callback SequenceFilePostStepFailure and I perform a Terminate.

So the sequence terminates directly after failure but the sequence state is "Terminated".

I'd like to have state "Failed"

 

How can i do that?

Thanks for your help

 

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

I don't think you need the Terminate.  Remove that step and it should just go to cleanup in all sequences until PostUUT and it should be a failed status.

0 Kudos
Message 2 of 3
(3,001 Views)
Solution
Accepted by topic author maxmont

Hi,

 

By default, with failure doesn't go to cleanup and finish main sequence directly.

To do that, I found the solution. It's necessary to perform : 

     - Locals.RunState.StepGroup= "Cleanup",
     - Locals.RunState.NextStepIndex = 0

 

 

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