NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Ignore Termination

I'd like to post this sequence and get some feed back as to why it executes the way that it does.
 
It is a very simple sequence that only has two labels and one subsequence call.  The functionality that I am experimenting with is the Ignore Termination of the sequence call that is in the main sequence.  The situation is if you place a breakpoint at the label in the main sequence callback and press the Terminate All button when paused,  what is experienced is that the report and status is still "passed" not "terminated".  This only happens if the "Ignore Termination" is set on the subsequence that is called in the cleanup section.  What I don't understand is why the main sequence status is switched back from terminated to passed after the subsequence is run.  Is this a bug?
 
This caused a lot of confusion when operators we stopping tests and passing reports were being generated.
0 Kudos
Message 1 of 9
(4,262 Views)

That's strange.

Probably due to the step's status being discarded therefore just leaving the Passed result.

I wonder if its always been like this.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 9
(4,246 Views)
It probably has always been like this.  I have never used "Ignore Termination" before and how it was discovered was one of my coworkers was running with the "tracing while terminating" turned off in the station options.  When executing in this mode and the user terminates, it doesn't look like the cleanup runs becaue the trace stops.  Also, in his main sequence the cleanup is handled by a single sequence call.  It was thought that by enabling the Ignore Termination was the solution to get the cleanup to run when in-fact it was always running but just not tracing (FYI, the sequence in the cleanup was set to not report results too).
 
 
0 Kudos
Message 3 of 9
(4,239 Views)
I don't think it should be behaving this way (we will look into it), however you also probably do not need the ignore termination setting for sequence calls in your cleanup. Even if the termination happens inside of the subsequence called by your sequence call, teststand will still execute the next step after that in your cleanup. You might need to change some of your station options to see this happening such as "Allow Break while Terminating" and "Allow Tracing while Terminating".


Hope this helps,
-Doug



Message Edited by dug9000 on 05-07-2008 04:02 PM
0 Kudos
Message 4 of 9
(4,231 Views)
Yes, we definitely do not need the "Ignore Termination".  We traced the source of our problem (where the report still states a pass even though it was terminated) to this misusage of the "Ignore Termination" property and are removing it from our sequences.  I started this post because even though we don't need to use it, the behavior seems a bit wrong as you have noticed.  Thanks for looking in to it.
0 Kudos
Message 5 of 9
(4,212 Views)

Can you guys explain a little more what this is actually doing?  The Help file is mildly cryptic and even what you guys are saying here aren't helping.  What I've done is called launched a new Execution, from there I have several Subsequences launched as Threads, Don't wait to Complete any of them, and I'm experimenting with setting the Ignore Termination.

 

This is all being run from the Sequence Editor.

 

To me...the way I expected this to work when I first saw the option was that any Terminate button clicks while viewing this Execution or any Terminate All clicks and these Threads would continue merily running, not bothering to Terminate.  It seems like from reading these comments here that it has nothing at all to do with this and only effects what the report will show.  Is this true?

 

 

0 Kudos
Message 6 of 9
(3,761 Views)

That is not what ignore termination does. It is for regular (not new-thread or new-execution) sequence calls. What it does is cancel the termination at the point of the sequence call. Termination still happens in the subsequence, but when it gets back to the sequence call it is effectively cancelled at that point and the status of the execution is no longer terminated.

 

There is a new API that was added to TestStand 2012 (which is now available on our website) that does something more like what you are asking. Here is the documentation for that new API:

 

TerminationOption Property
Syntax
Thread.TerminationOption

Data Type
ThreadTerminationOptions

Use the following constants with this data type:

ThreadTerminationOption_Never–(Value: 2) Specifies that a thread does not stop when its execution terminates. The thread must end on its own accord before its execution can end. Use this value to protect a thread so the thread does not stop and can complete its work even if its execution attempts to terminate.
ThreadTerminationOption_Normal–(Value: 0) Specifies that a thread stops when its execution terminates.
ThreadTerminationOption_Prompt–(Value: 1) Specifies that a thread does not stop when its execution terminates unless you set the Execution.OverrideNonTerminatableThreads property. If an execution attempts to terminate and the execution is running only threads that specify this option, the execution sends the UIMsg_NonTerminatableThreadsArePreventingTermination event. You can use this value to protect a process model worker thread so the thread does not stop if the user terminates the current UUT or batch.
Purpose
Specifies the behavior of a thread when its execution attempts to terminate. This property does not inhibit aborting. The default value is ThreadTerminationOptions_Normal.

Hope this helps,

-Doug

0 Kudos
Message 7 of 9
(3,753 Views)

HI dug,

 

Would you have any trepidation in upgrading from 2010 SP1 up to 2012 or expect any real problems to crop up from doing so?  I suppose its easy enough to put 2012 on the same box and just try it out?  I'm just wondering about the behind the scenes stuff, libraries, APIs, etc stepping on each others toes and causing some real headaches.

0 Kudos
Message 8 of 9
(3,749 Views)

The biggest changes for 2012 were to the process models. Though you can still use models based on the old process models if you like (you'd just need to copy all of the files for the models you are using to the corresponding location in the public directory). Generally, newer versions of TestStand should be backwards compatible with previous versions.

 

-Doug

Message 9 of 9
(3,733 Views)