LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to stop vi with a control from inside subpanel?

I am not sure if it can work so i am asking for your opinions.
i build a simple vi with a stop control, Then i wire to this vi  inside subpanel.
There's no stop control on the subpanel. Will this work?
It stops suddenly as if it is a simple vi with while loop attached to true constant.
see the attached.
Clement
Download All
0 Kudos
Message 1 of 16
(5,211 Views)
Hi Clement,    

While there's a missing sub-vi "load and run", I'm guessing the top-level VI launches the sub-vi without waiting for it to finish running, then the top-level VI terminates immediately.  If load-and-run uses the "run" method, there's a boolean input that will make it wait until Wav.vi finishes - but then the sub-panel wouldn't get the VI reference until after Wav stopped!.  There's probably more than one way to accomplish what you're trying, maybe the attached VIs will give you an idea. ;^)

 

Cheers!
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Download All
Message 2 of 16
(5,206 Views)
Hi U can find LoadAndRun.vi in C:\Program Files\National Instruments\LabVIEW 7.1\examples\general\controls\subpanel.llb\LoadAndRun.vi
Of course the name is different  but the functiion remains unchanged. Thanks
Clement
0 Kudos
Message 3 of 16
(5,192 Views)
Hi tbd,
Oh I see reference of the control!.
Thanks! Phew.
Clement
0 Kudos
Message 4 of 16
(5,188 Views)

Hi astroboy,

i found all needed vi´s and i can start the program, but i don´t understand your question. What do you want to do?

Mike

0 Kudos
Message 5 of 16
(5,186 Views)
tbd's vi is working and  just as expected, It really meet my needs.
You see in the Labview's examples. they teach that we can
 put vi  into the subpanel and it can be stopped from outside. But how about stopping it from inside?
There I found tbd's help.
Message 6 of 16
(5,182 Views)
Hi tbd. I have some question to ask. What if I have multiple Vis to run in the subpanel,
where can I find property of the sub-vi to find out whether it is closed of running so that ?
if it is closed, so that it can continue to open another subvi.
I know I have to wire all multiple subvis to subpnl's method, right.
Thanks in advance.
 Clement
Message 7 of 16
(5,175 Views)
Hi tbd. I am sorry for bad grammar in my previous post.
Just a question to ask. What if I have multiple Vis to run in the subpanel,
where can I find property of the sub-vi to find out whether it is closed or still running?
If it is closed, then it can continue to open another subvi.
I know I have to wire all multiple subvis to subpnl's method, right?
Thanks in advance.
 Clement
Message 8 of 16
(5,168 Views)

Hi Clement,

      I don't really understand your question, Clement.  Since Sub-VI's like Wav2.vi, register and unregister themselves, the Sub-panel management is handled automatically.  If you simply want to wait until a Sub-VI finishes, before continuing with execution, then put the VI in a sequence, or connect some indicator on it's connector-pane to a subsequent VI/sequence/case/etc.  Knowing when a VI has finished executing shouldn't be difficult!

Cheers.

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 9 of 16
(5,146 Views)
Hi tbd. Thanks. I have found ways to, using the correct functions as sometimes, I can be blurred as to which to use method or property functions.
Here's the attached.


One new thing about  your help example, is that I can create a subpanel with it's own control reference and method property in another vi.
All the given examples (with Labview Software) show subpanel control and it's method in the same vi.
I appreciate your help.


and Thanks again
Clement
0 Kudos
Message 10 of 16
(5,113 Views)