LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Kill processes

I am unfortunatly communicating with an old legacy driver through DDE and an application that is running in its own process.  This is an industrial control system in labview.  The application provided by the manufacturer occasionally hangs which I have no control over.  I can detect this with a timeout in my wrapper function.  I need to relaunch the application and restart communication via DDE.  Unfortunatly when this crappy application hangs it leaves a process opened and I cant restart it until this application is killed.  What is the best method of detecting if a particular process is still running (I know the process name), and kill it then verify that it has been killed so I can then relaunch it? So I need two commands, 1 to detect if a process is running and 1 to kill a process.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 1 of 3
(2,953 Views)
Although I believe it can be done via Windows API, I made something similar in the past using the pskill utility from sysinternals (now on Microsoft's technet site).
A single batch file killed and restarted the external application. I did not care checking whether the app was still running or not, but I never ran into troubles.

Message Edited by pincpanter on 07-10-2007 04:25 PM

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 3
(2,947 Views)
Check out Close Process.vi :


http://forums.ni.com/ni/board/message?board.id=170&message.id=94151&requireLogin=False


If you delete the last part (keep EnumProcesses, ProcessAllAccess, EnumProcessModules (2X), GetModuleFileNameExA, and add the GetModuleFileNameExA output string in an array that is in a shift register, you should get a list of all processes.


Regards,


Wiebe.
0 Kudos
Message 3 of 3
(2,913 Views)