NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Single Pass vs Restart Execution Type

Solved!
Go to solution

Hello,

 

I'm working with a custom operator interface and a custom process model in my application, but I don't really have full control over every aspect of the operator interface source code. So my problem statement is that I would like some of my OI plugins to start fresh with default values if the operator choses a New Test Execution (which is really like clicking Execute-> Single Pass in the sequence editor) but I would like to retain certain values in the plugin if they chose the Restart Execution (which is really like clicking Execute->Restart in the sequence editor). I've been searching and searching for a way that my process model might be able to key off of a parameter or something of that sort to know if the current execution is the result of a new execution or a restart. Has anyone ever done this?

 

Thanks!

0 Kudos
Message 1 of 3
(827 Views)
Solution
Accepted by topic author bartelma

You could take advantage of the Execution being a property object to attach a flag to it (see attached sequence). Note that I didn't store the flag under Execution.RuntimeVariables because that is cleared upon completion.

 

Alternatively, you could just look at the value of Execution.Id. If it is the same as before, the execution was restarted. Otherwise it will be different.

Message 2 of 3
(808 Views)

Thanks a ton James! The Execution.ID is exactly what I was looking for and works perfectly for my needs. I was able to set an expression in my PreUUT Process Model Callback that sends the Execution.ID to my plugin and I confirmed that if I start a new test it increments that value every time, but if I press the Restart button it stays the same. Brilliant!

0 Kudos
Message 3 of 3
(794 Views)