LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping Sub-Vi's

Hello,

How can I stop a sub-vi from running with a boolean switch, located in my
main program
0 Kudos
Message 1 of 5
(2,683 Views)
Can you use a local variable of the boolean switch or are there any reasons
that you can't use them?

"greg" wrote:
>>Hello,>>How can I stop a sub-vi from running with a boolean switch, located
in my>main program
0 Kudos
Message 2 of 5
(2,683 Views)
I do not believe that a local variable connected to a boolean in the main
program can be used inside the sub-vi. What I have is my sub-vi running inside
a while loop, and the sub-vi's output is a true or false and it only outputs
the true or false when it is done executing. So, i have had trouble stopping
it.

"Nico Zalbertus" wrote:
>>Can you use a local variable of the boolean switch or are there any reasons>that
you can't use them?>>"greg" wrote:>>>Hello,>>How can I
stop a sub-vi from running with a boolean switch, located>in my>main program
0 Kudos
Message 3 of 5
(2,683 Views)
A global variable will work. You could also use an occurrence or one of the
other synchronization functions. If you start the sub-vi with VI Server,
you can also stop it by passing a value via VI Server.

"greg" wrote:
>>I do not believe that a local variable connected to a boolean in the main>program
can be used inside the sub-vi. What I have is my sub-vi running inside>a
while loop, and the sub-vi's output is a true or false and it only outputs>the
true or false when it is done executing. So, i have had trouble stopping>it.
>>"Nico Zalbertus" wrote:>>>Can you use a
local variable of the boolean switch or are there any reasons>that>you can't
use them?>>"greg" wrote:>>>Hello,>>How
can I>stop a sub-vi
from running with a boolean switch, located>in my>main program
0 Kudos
Message 4 of 5
(2,683 Views)
Sorry, you are right! I misunderstood it.
Sometimes I use the application control Quit
Labview but that is not very professional.

Best regards
N.Zalbertus


"greg" wrote:
>>I do not believe that a local variable connected to a boolean in the main>program
can be used inside the sub-vi. What I have is my sub-vi running inside>a
while loop, and the sub-vi's output is a true or false and it only outputs>the
true or false when it is done executing. So, i have had trouble stopping>it.
>>"Nico Zalbertus" wrote:>>>Can you use a
local variable of the boolean switch or are there any reasons>that>you can't
use them?>>"greg" wrote:>>>Hello,>>How can I>stop a sub-vi
from running with a boolea
n switch, located>in my>main program
0 Kudos
Message 5 of 5
(2,683 Views)