LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

open subVI and don't close

Hello I have another problem with my application.
Again simple example:

I want subVI to open on button click and execute it onetimes, but don't close.
I used to try suspend when called but it opened the VI but didn't run them.
How to solute this situation.

I'm little distressed 🙂
Thanks
LW 7.1
LV 2011, Win7
0 Kudos
Message 1 of 33
(3,384 Views)

Hello,

You need to go to the VI Properties (Ctrl-I) of your subVI, go to the "Window Appearance" page, click "Customize", and deselect "Close Afterward if Originally Closed".  You can learn more about all the different window appearance options for a VI in the LabVIEW Help.

Good luck,

-D

Message 2 of 33
(3,377 Views)
It works well, thank you.
LV 2011, Win7
0 Kudos
Message 3 of 33
(3,355 Views)

Hiiiii, D

              I am also facing the problem of opening the file, execute and close it, let me giv you an explaination.......

                       Actually, i am calling a vi name counter, that vi is executes in the while loop, now what i supposed to do is to call that vi once and after it execute once, it should close its execution, but what is happening is... when i call the vi, it executes itself , give me an output and with the o/p it again start to execute while loop, which gives me another o/p instead of once, so whtat i should do???

here i am posting you both the vis. counter timer is a counter vi and call counter is calling the counter_Timer to execute, now as i required whenever i call the couner_Timer, it should execute and then should stop,instead it is giving o/p again and again....Smiley Surprised, which i dont require.

Thanks,

Nishant

 

Download All
0 Kudos
Message 4 of 33
(3,344 Views)
If you only want your subVI to execute once, why do you have it in a while loop?. The program is running exactly like it is supposed to as far as I can tell. It does only execute once which is the same thing as having no while loop at all in the main program. The only way for the while loop to keep running would be for the subVI to return a true and it simply can't do that.
0 Kudos
Message 5 of 33
(3,329 Views)
Hi,

The VI is working properly as Dennis correctly pointed out. Why don't you remove the while loop or wire False to the 'Loop Condition' terminal or we are missing something...

nudAlaKasiM
0 Kudos
Message 6 of 33
(3,309 Views)

Hiiii,

               First of all thanks to both of you, but if i remove the front panel from the counter vi, it will not continue iterations as there are shift registers on the while loop, and i also have tried to replace the while loopp with the For loop, but it wasn't worked for me, so can one of you tell me that what should be the alternate for while loop and for loop????

Thanks,

Nishant

0 Kudos
Message 7 of 33
(3,288 Views)
I'm really confused about what you want. If you don't want to call the subVI many times, don't have a while loop in the main. If you don't want a while loop in the subVI, don't put one in. You can have a while loop in the main with a shft register and call a subVI without one. Is that what you mean?
0 Kudos
Message 8 of 33
(3,268 Views)

Hiiii, Ceties

         Here you  can do one thing that you can change the Subvi node setup, change the properties to Show front panel when called and then whenever the vi called, it will execute and wont close if you do not check the property "Close afterwards if originally closed".

Thanks,

Nishant

0 Kudos
Message 9 of 33
(3,253 Views)
Hello I have one more problem. I updated my program and now I want to open subVI after (button click) and allow user to choose (via menubar) what to do with the graph (print, export to picture ect.).
Problem is that the applicatin freezes when I close the window. It works well when I close it with close button (but I don't want it on this VI).
Another problem is, that the button on the caller VI is after pressing still pushed, until I close the called subVi (and the button Mechanical action is setup correctly - Latch when pressed).
Thanks for help
LV 2011, Win7
0 Kudos
Message 10 of 33
(3,222 Views)