LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

From LabVIEW application verify TestStand is not running

Solved!
Go to solution

I have a machine that runs a TestStand program for testing. I want to write an application in LabVIEW to move files across the network to my TestStand machine. In the application before doing the file transfer I need to test to see if TestStand is running and if it is, I would like to shut it down using my application. If anyone can help that would be great.

0 Kudos
Message 1 of 8
(3,275 Views)
Solution
Accepted by sdrochek3

It isn't clear if your TestStand is running on a remote machine.  I think it is but if it isn't you can just taskkill it.  If it isn't running then it will return an error that you ignore.

 

You can still use this on a machine on the network but you need to modify the command line function to provide the /S system, the /U domain and user, and the /P password.

Message 2 of 8
(3,247 Views)
If TestStand is running and in the middle of a sequence, you want to kill it? You don't fear the wrath of the production people? I would never have dared to be so presumptuous.;-)
0 Kudos
Message 3 of 8
(3,244 Views)
Yeah I wouldn't kill a program doing any thing. And to be honest I was working on something more robust and politely asking to exit nicely but I had this lying around.

Besides I didn't see you post a working solution yet.
0 Kudos
Message 4 of 8
(3,239 Views)

I think a better solution would be to have the test station (TestStand) check the server for updates and pull the required files.  This is much safer.  Checking that teststand is shut down is not great, what if it is just starting up?  And if you have code which could kill TestStand, there is a chance it could run at the wrong time.  It is probably not efficient to close TestStand to do file updates, it should be possible to transfer the files and refresh any settings which need to be changed using the teststand API.

0 Kudos
Message 5 of 8
(3,208 Views)

I still don't think we have enough information to make a clear solution.  Mine was just a quick one that isn't right for all situations.  Heck it might only be good for a few situations.  

 

Is the TestStand software running on another computer on the network?

 

Is it possible the TestStand software is running a test or sequence when we what to shut it down?

 

Can the TestStand sequence be modified to help facilitate the task?

0 Kudos
Message 6 of 8
(3,201 Views)

Your post with the Taskkill application.vi is what I was after. The code I write will not be ran when TestStand is actually running a sequence but I wanted to make sure that if TestStand was opened, i need it to close before updating the files since the data in the files is held in memory once TestStand is running. Thank you for your solution!

0 Kudos
Message 7 of 8
(3,135 Views)

Taskkill is imho a no-go!

 

Please note that TestStand recommends you a re-boot once you killed threads and tasks associated to any test application. This is not just for fun! Killing tasks can greatly reduce stability and reliability of the system!

 

Second: Killing a running program can, depending on its purpose, create hardware damages.

Imagine a test routine powering up some DUT using a power supply. During test, the DUT is going to be tested for overpower. During that test, you kill the task controlling the power supply. Viola: roasted DUTs!!!!!

 

Third: As TestStand is an ActiveX Server, it is attached to the process which spawns the Engine. So killing "SeqEdit.exe" does NOTHING on a machine running TS using another UI......

 

Fourth: Killing the process of the UI does not kill processes which are spawned by it as "service". So there is, again depending on the implementation, a high chance of getting zombie processes which can essentially do anything including killing your system.....

 

Wrap up: Killing tasks is good for task you KNOW that are stuck. Killing tasks is a no-go for any other task!

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 8
(3,123 Views)