03-27-2014 01:23 PM
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.
Solved! Go to Solution.
03-27-2014 05:36 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-27-2014 05:45 PM
03-27-2014 05:53 PM
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-28-2014 08:22 AM
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.
03-28-2014 08:52 AM
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?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-07-2014 08:36 AM
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!
04-07-2014 08:51 AM
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