NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I am currently using Teststand 2010, I have a sequence in the Cleanupk the "terminate" button. I have tried all the precondition that I know and still unable to skip the step whenever the sequence is terminated. Any help would be greatly appreciated.

Solved!
Go to solution

Hi,

 

I am currently using Teststand 2010, I have a Step sequence in the Cleanup and I want to skip that step whenever a user click the "Terminate" button. I have tried all the precondition that I know, but still unable to skip the step. Is there any precondition/Post Action I could use to skip the step when I terminate the sequnce module? Any help would be greatly appreciated please see picture below.

 

Thanks,

 

WJ

WJSkip_sequence Step.jpg

0 Kudos
Message 1 of 5
(4,144 Views)
Solution
Accepted by topic author justin1269

Use a statement step at the beginning of your Cleanup step group.  In it put:

 

RunState.Execution.GetStates(LocalsExecutionRunState, Locals.TerminationState)

 

You will have to create both the locals as numbers.

 

Then in your precondition you can say:

 

Locals.TerminationState == 1

 

Refer to the TestStand help for more information on that method and to look at the different state meanings:

 

ExecutionTerminationStates Enumeration
The Execution.GetStates method returns one of these values to indicate whether the execution is terminating. If the execution is terminating, these values indicate how it is terminating.

ExecTermState_Aborting–(Value: 4) TestStand is aborting the running execution.
ExecTermState_KillingThreads–(Value: 5) TestStand is ending the threads in the execution.
ExecTermState_Normal–(Value: 1) The execution is not terminating.
ExecTermState_Terminating–(Value: 2) TestStand is terminating the running execution.
ExecTermState_TerminatingInteractive–(Value: 3) TestStand is terminating the running interactive execution.

Hope this helps,

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 5
(4,126 Views)

Here is an expression you can use as the step precondition without the need to make other changes:

 

#NoValidation,  // suppress the analyzer error for the non-existence of the temporary variable

Locals.SetValNumber("_terminationState", PropOption_InsertIfMissing, 0), // create a temporary variable
RunState.Execution.GetStates(0, Locals._terminationState ),  // get the termination state

(Locals._terminationState == ExecTermState_Terminating && ( Locals.DeleteSubProperty("_terminationState", PropOption_NoOptions), True))  ?  False : True 

Message 3 of 5
(4,106 Views)

Hi,

 

Thank you for your help, I was able to resolve the issue

 

Thanks,

WJ

0 Kudos
Message 4 of 5
(4,097 Views)

Hi,

 

Thank you for your help!

 

Thanks,

WJ

0 Kudos
Message 5 of 5
(4,095 Views)