LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using STOP function

I have used the STOP function for breaking the execution of a subVI, but it also breaks the execution of the main VI that contains this subVI.
There isn't any other way for breaking the execution of the subVI whithout breaking also the main VI execution?
0 Kudos
Message 1 of 4
(2,967 Views)
Hello.
The only way you can stop a program is to program this or not use an enless while loop.
LabVIEW behaves not different from other languages
The button you call "stop" is in fact an ABORT !
greetings from the Netherlands
0 Kudos
Message 2 of 4
(2,967 Views)
Try opening a reference to the subVI and using the Invoke node method "Abort VI". This will stop the running of the subVI. Don't forget to close your reference when you are done. Using references and Invoke nodes, you can start and stop VIs, get or set the values of controls and indicators. All sorts of things. Have fun with it.

Rob
0 Kudos
Message 3 of 4
(2,967 Views)
Andres,

A subVI of a main is not intended to be stopped from its front panel. The only way this should happen is if you are spawning the subVI. In this case, your code in the subVI should have a mechanism for stopping the execution of that SubVI. If you have any outputs from the subVI, then when you stop the subVI, the data will then, and only then, be available to the main.

The abort button should definitely not be used in this case. I also don't recommend using VI Server, but this depends greatly on your specific need.

If you still aren't sure what to do, please explain exactly what you are trying to do, why you need to stop this subVI, and we can better help you.

Good luck
0 Kudos
Message 4 of 4
(2,967 Views)