NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine if the TestStand abort button is hit

During debug, you can prematurely hit the Terminate (stop) or Terminate All (abort) buttons.

 

If you hit the Terminate button, TestStand will execute the PostUUTcallback.

If you hit the Terminate All (abort) button, TestStand will neither execute PostUUT//ProcessCleanup callbacks

 

I would like to know how to detect if the Terminate All (abort) button is hit because I need to force some cleanup in the main sequence that is normally handled in the PostUUT callback.

 

Also, I notice if I hit the Terminate button and I have a breakpoint in the cleanup of the  main sequence, the breakpoint is ignored. Is this a configuration problem?

 

Thanks

Kevin

0 Kudos
Message 1 of 3
(2,678 Views)

If you're in a custom operator interface (not the sequence editor) you can look for the corresponding UI Messages:

UIMsg_AbortingExecution

UIMsg_TerminatingExecution

http://www.ni.com/tutorial/4532/en/

 

There is a setting for the breakpoint behavior:

Station Options » Execution Tab » Honor Breakpoints while Terminating

 

Hope this helps,

Trent

 

 

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 2 of 3
(2,638 Views)

This is good but I need a concrete example of how this is coded in the main sequence. 

 

Also, there is an example "Determining the Termination Status of a TestStand Execution" at

https://forums.ni.com/t5/Example-Programs/Determining-the-Termination-Status-of-a-TestStand-Executio...

 

I modified the example to explicitly display the termination status (see attached) but I could only get

ExecTermState_Terminating and ExecTermState_Normal  states.

 

I couldn't generate a ExecTermState_Aborting state by clicking the Editor's Abort button (don't know how to create an abort state.  All I got was a ExecTermState_Terminating state)

 

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