LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping a running exe

hi need help.
i have a vi with two button
1. button enable - run the exe automatically
2. button disable-stop/terminate the running exe
i can do the first button(run the exe) but i cant do the second button
0 Kudos
Message 1 of 6
(4,933 Views)
i have a vi with two button  <=====  Is this the VI that is the executable? 
1. button enable - run the exe automatically  <=====  Is the executable a LabView VI?
2. button disable-stop/terminate the running exe
i can do the first button(run the exe) but i cant do the second button  <===  ????
 
I ask because the last sentence makes it sound as if you have a VI that has two button and it is not an executable.  It calls an executable... 
Is that so?
 
Before suggesting anything, I would need to know what type of executable we are talking about...
 
Can you provide more description?
 
RayR
Message 2 of 6
(4,929 Views)

hi joe i attach the vi i have done wit this. im not sure this is a correct way to do this but i tried.

the exe tht should run is actually done  in visualbasic6.

wen the user click on the enable button the .exe will run automatically.

wen user click disable button the running exe should terminate from running.

thk u..

 



Message Edited by jeyanthi on 06-17-2008 08:43 PM
0 Kudos
Message 3 of 6
(4,926 Views)

Hi Jeyanthi,

Keep the Enable button inside its event case.

Also, change both the button events from Mouse Down to Value Change.

See the modified attachment.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 4 of 6
(4,903 Views)
Hi Jeyanthi,

The System Exec VI will run your executable in a separate process from LabVIEW.  LabVIEW by itself cannot kill the process, however, you can use a second System Exec to call a Windows command which will.  See the following link:
http://digital.ni.com/public.nsf/allkb/80432B061C5A4C888625705400737BE8?OpenDocument

Regards,

Jeremy_B

Applications Engineer
National Instruments
Message 5 of 6
(4,875 Views)
Thanks Jeremy,
 
THis will be quite useful.  Unless there are hooks in the software of Active-X class available for external control, it is difficult to kill a rogue executable..  
0 Kudos
Message 6 of 6
(4,869 Views)