NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Find execution for socket in UI for parallel model

TestStand 2010 sp1 and labview 2011 to start.


I'm trying to find a way to incorporate the terminate/restart functionality in my LabVIEW GUI for a parallel model.  What I've done so far is rather than use the built in modelsupport2, I need my own GUI with a lot of the same functionality.  I launch the GUI from the process model and pass in RunState.Engine.GetInternalOption(InternalOption_ApplicationManager) to the get the application manager reference.  I use that to register a user event for the socket and to pass a notifiication (using engine and sync manager) to TestStand to start a socket.


What I'd like to do now is have the ability to terminate/restart a socket.  I believe I've found the method within the execution class, but I don't know how to specify which execution to invoke that on.  Is there a way to get a list of the executions?  and, will I know which execution goes to which socket?


I'm not running this UI as the main UI.  It is launched from within TestStand just like the modelsupport2.dll UI.  Just not sure how to specify an execution to invoke the method on.  



0 Kudos
Message 1 of 8

Hi Sir Mutt,


The forum post titled "Getting Test Socket Status in Batch Mode" may be of some use when trying to control the Socket executions. In the forum SachaE describes the process of modifying the process model to make the FileGlobals.TestSocketExecutions parameter shared between executions. After the property of the FileGlobals.TestSocketExecutions has been modified it is accessible during Run-Time as Runstate.Root.FileGlobals.TestSocketExecutions[] 


While the forum post discusses the Batch Process Model, I would expect the technique to also work for the Parallel Process Model. As usual it is best to create a copy of the Process Model for your application instead of modifying the original or at least keep a backup.

0 Kudos
Message 2 of 8

Thanks Milan.  Good stuff.  I'm so close I can taste it.  I am able to use that routine to terminate the execution.  But, it doesn't just terminate it.  It gives a popup that asks if I want to terminate Execution, Abort Execution, or Automatically Close Execution when Done. 


I saw a QueryCloseExecution in the documentation along with the CloseExecution documentation in the help.  It appears like it would allow the option to dictate what action is taken, but that option isn't available under the application manager methods.  How to make that popup not show up? 

0 Kudos
Message 3 of 8

I think I cured my ills.  For the execution, I used the GetExecutionManager method of the application manager then used it to terminate the execution.  I'm hoping I can also use the restart and such in there to start it back up. 

0 Kudos
Message 4 of 8

Hi Sir Mutt,


That is good to hear! It looks like the Execution class has a RestartEx method so hopefully that provides the functionality your are looking for. 

0 Kudos
Message 5 of 8

Bad news.  I'm not quite out of the woods.  Everything runs fine from the sequence editor.  But when I run from my GUI, I run into issues.  Socket 1 will run without issue, but socket 0 will not abort.  Attached are two screen shots with probes attached.  For some reason, socket 0 returns nothing for the execution manager, but socket 1 works as I'd expect.  I have no idea why socket 0 doesn't play nice.


My GUI has an application manager, sequence file manager and execution manager running, but what gets passed in to this GUI is from TestStand.  I don't see that there should be a difference in functionality here.

Download All
0 Kudos
Message 6 of 8

Is this worked for you. if so please can you give me a sample i am trying to get side by side  two test socket index but some i can't get both of them on the display.


0 Kudos
Message 7 of 8

Basically I am using LabView Teststand User Interface which i would like to use batch file which is the following test socket index side by side. but the execution view for test index 0 and execution view for test socket index 1 will only show both of them test socket 0 execution. does you have a sample. i will be appreciate.



0 Kudos
Message 8 of 8