NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling TS_TerminateAll from a thread

I started a UI in a thread in TS. There is a button on the UI. When I click on the button, the TS_TerminateAll will be called to terminate all execution. and then, it will call ProcessCleanup to close the instruments. However, I'm having some problem in the code in ProcessCleanup. Is it a proper way to call TS_TerminateAll in a thread?

Thanks

Eric

0 Kudos
Message 1 of 3
(3,264 Views)
Hello Eric,

There shouldn't be any problem calling TS_TerminateAll.  Is this button used to allow the operator to abort the test in progress?    What specific problem are you having with the code in ProcessCleanup?


Matt L.
0 Kudos
Message 2 of 3
(3,218 Views)
Matt,
 
Thanks for you response. There was actually no problem with terminating the sequence in a thread. I did not have "Allow Break While Terminating" enabled and I thought ProcessSetup.Main did not get executed during termination. I copied the ProcessSetup.Main to ProcessSetup.Cleanup and it was creating the problem since the cleanup code was executed twice. Anyway, there is no problem to terminate the sequence in a thread. Thank You.
 
Eric
0 Kudos
Message 3 of 3
(3,212 Views)