NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

terminate and restart a sequence from a step

I am running a parallel thread which acts as a pseud-operator interface.  I would like to be able to terminate and restart a sequence from a step that is launched in parallel.
 
If anybody has any ideas I would greatly appreciate it.

A.
0 Kudos
Message 1 of 5
(3,735 Views)

Hi,

The problem is, as soon as you terminate the parallel thread, then you are going to terminate both threads.

Better to have two executions, the OI execution startiing the sequence execution. That way you can use the Execution.Terminate method and the Execution.ReStartEx method to met your requirement.

 

Regards

Ray Farmer

Regards
Ray Farmer
Message 2 of 5
(3,732 Views)
Thanks for the response Ray, I'm trying to figure out how to implement.
 
I currently have a Operator Interface that is minimised, and that automatically loads and launches a sequence file.
 
The sequence file launches a parallel execution sequence that is modal , and acts as a pseudo operator interface.  What I need is when the user clicks on a button on this interface, the original sequence then terminates and restarts.  The step s written in LabVIEW code.
 
How do you get a handle to the starting sequence?  I'm not sure if you're suggesting leave the LabVIEW step code in a loop and terminate and Restart from that point.

A.
0 Kudos
Message 3 of 5
(3,721 Views)

Hi,

What you could do is pass the RunState.Execution as a parameter to the other parallel execution. Then in the parallel execution, using this reference, you can then perform the Execution.Terminate and the Execution.ReStartEx methods.

Regards

Ray Farmer

Regards
Ray Farmer
Message 4 of 5
(3,705 Views)
Hi,
 
I have attached a small example (TS3.5). In this example I made the sequence that launches the user panel (in this case a MessagePopUp step) launch the parallel test Sequence. Rather that the Test Sequence Launch the user panel.
 
Regards
Ray Farmer
Regards
Ray Farmer
Message 5 of 5
(3,692 Views)