NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Where is "Immediately Goto Cleanup on Sequence Failure" stored?

1. When I set "Immediately Goto Cleanup on Sequence Failure" on the Station Options dialog, where is that property stored? I want to have the process model set it and not let operators set it.

2. If I am running the Batch model, and one socket fails, what is a good way to terminate the other socket(s), or make the other socket(s) jump to their own cleanups?

Thanks,

cc
0 Kudos
Message 1 of 4
(4,144 Views)
Hello cc,

For your first question, you can use the TestStand API to set the Engine.StationOptions.AlwaysGotoCleanupOnFailure property to True.  This has the same affect as setting the Station Options manually.

You second question is more tricky.  One way that you can have the other TestSockets go to their clean up is by sharing a FileGlobal.  If one TestSocket fails, then it would set this variable to true.  Then all of the other TestSockets would check this variable before each step to see if there is an error; if so, then they would branch to clean-up of that sequence.  You will most likely want to use the ProcessModelPreStep and ProcessModelPostStepFailure Engine callbacks in your process model.  They will fire at the appropriate time in your client sequence file (not in the process model where you defined them).  I hope this helps.  Have a greay day!
Best Regards,
Software Engineer
Jett R
Message 2 of 4
(4,061 Views)
Jett,

Thanks. I have one old example soln that is about the same as the fileGlobal soln. I think it uses Runstate.Root.Locals or Runstate.Root.Parameters for the variable instead of fileGlobal (no big diff) and uses PreStep for the If variable = Terminate then terminate calls. Thanks for verifying that that is a good solution!!

cc
0 Kudos
Message 3 of 4
(4,058 Views)
Hey CC,

Using a local variable in your process model is also a great option.  I only have two comments if you are going to go this route.  First, make sure your variable is declared in both "Single Pass -- Test Socket Entry Point" and "Test UUTs -- Test Socket Entry Point" entry points (not "Single Pass" and "Test UUTs").  Also, ensure that the "Shared" or "Shared At Run Time" flag is set for this variable.  After you do both of these actions, your variable will be located at RunState.Root.Local.YouVariableName and all TestSockets will shared the same memory space for this variable instead of having their own copy.  I hope this helps!
Best Regards,
Software Engineer
Jett R
0 Kudos
Message 4 of 4
(4,030 Views)