From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop VI

Hello all 

I would like to Create button to force stop an close VI. But only VI where button is. When I use STOP function is stopping current VI and VI background. Any other function can i use ? 

0 Kudos
Message 1 of 7
(2,814 Views)

@plpablo wrote:

Hello all 

I would like to Create button to force stop an close VI. But only VI where button is. When I use STOP function is stopping current VI and VI background. Any other function can i use ? 


No.

 

You'll a concurrent loop to set a queue, notifier, channel wire, etc. and stop each loop in the running Vi when the value changes. Or use a control reference and pass it though all the code to let the loops stop.

 

Only other alternative is to start the VI dynamically. Then it will be running top level, and then it can be stopped with the abort method.

0 Kudos
Message 2 of 7
(2,801 Views)

 

Download All
0 Kudos
Message 3 of 7
(2,777 Views)

@plpablo wrote:


Probably because the VI is already running. Then you need to make it reentrant, and configure Open VI Reference to open a clone.

0 Kudos
Message 4 of 7
(2,758 Views)

If you attach your code, so that we can really see what you are doing, we can better suggest how to safely shut down and stop your VI (or multiple VIs).  Note that if you have multiple VIs, as in a LabVIEW Project, you should compress the folder containing them and attach the resulting .zip file.

 

Bob Schor

0 Kudos
Message 5 of 7
(2,751 Views)

@plpablo wrote:

Hello all 

I would like to Create button to force stop an close VI. But only VI where button is. When I use STOP function is stopping current VI and VI background. Any other function can i use ? 


I have faced the same issue. Can anyone help me?

0 Kudos
Message 6 of 7
(2,714 Views)

@plpablo wrote:

 


Don't wait until done the VI executes, just make it false and let it run. Use below shown logic it'll work,

Run VI.png

0 Kudos
Message 7 of 7
(2,708 Views)