NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we force a terminate on a .NET call when we Abort

Hi,
 
I have a sequence with a few .NET calls. These .NET are very long. Sometimes, we just want to abort the sequence, and finish this current call. Is there any way to do so (kind of a kill current step)?
 
Thank you
Alex
0 Kudos
Message 1 of 2
(2,970 Views)
Killing threads can leave the process in a bad state. An alternative that TestStand provides is a way for your code modules that run for a long time to more cooperatively execute within TestStand. If you pass the sequence context into such code modules you can use the SequenceContext.RunState.Thread.ExternallySuspended property SequenceContext.RunState.Execution.InitTerminationMonitor(), and SequenceContext.RunState.Execution.GetTerminationMonitorStatus() methods to improve the behavior of your code modules while running from a TestStand sequence.

The SequenceContext.RunState.Thread.ExternallySuspended property can be used to allow TestStand to show an execution as suspended even while your code module is still running.

The SequenceContext.RunState.Execution.InitTerminationMonitor(), and SequenceContext.RunState.Execution.GetTerminationMonitorStatus() methods give your code module a way to monitor when TestStand needs them to abort so that they can return control back to TestStand.

Please see the online help for these APIs for more information. If you still have questions about this please let us know.

Hope this helps,
-Doug
0 Kudos
Message 2 of 2
(2,956 Views)