LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Close vi window

Hello.
 
I have a quick question.  I have wrote a program consisting of several VIs.  How can I close one VI window from within itsefl?  If I use the "Quit LabView" function it shuts down all the windows which I don't need.
 
Thanks.
0 Kudos
Message 1 of 10
(6,785 Views)
Yes you can do that.
The "quit LabVIEW" is not the right way to do it because it will "stop all executing VIs and end the current instance of LabVIEW" has the Help says.
One, if not "the", way to do this is to use the VI server, see attached vi.



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 10
(6,776 Views)
Thanks Titou.  Id definitely seems to work.  I'm surprised there's no easier way though.
0 Kudos
Message 3 of 10
(6,766 Views)
Well... this is nor really complicated... Smiley Surprised... I think... and if you have a look to all the properties you can access you'll see how powerfull it is.
You can also do it form another VI, you merely need to know the name of the VI you want to access.

Let me add that depending on what you want to do there might be a simpler way which is to set the VI properties (hit "ctrl+i") such as "show up when called" and "close afterward if originally closed". Keep this in mind 😉



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 4 of 10
(6,765 Views)
I have simplified the program a bit.  It is totally suited for my purpose now.  If anyone needs it take it. 🙂
 
This VI simply closes itself.
 
Thanks to Titou again Smiley Wink
Message 5 of 10
(6,762 Views)
May I know the reason behind your closing the VI from within itself, without stopping its execution... ?! Smiley Surprised
 
Is that what your project needs ? Smiley Indifferent
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 6 of 10
(6,747 Views)

Hello what u want to acheive ....... from ur program

 

when i close ...its closing but later on when ur opening again it shows vi already in memory .....

Regards,

ramji

 

 

Message 7 of 10
(6,738 Views)
Of course.  The subprogram is supposed to take the short spectral scans and save the data.  It stops when the scan is done so I don't have to stop the process myself.  I don't mind that it runs in the background.  If anything it will be quicker to bring the window up when I need to take another scan 🙂  (although I did not look at how much memory it will take up but it shouldn't be much.  ..I think 🙂 )
 
Anyway, adding the stop procedure seems quite straightforward and I will do that if required.
 
Thanks for the interest and for constructive suggestions.  I'm only starting to work with labview so those will be extremely useful 🙂
Message 8 of 10
(6,729 Views)

Hi searching

you probably have realized by now that your program is ok on memory but hogs the cpu... one way to get around your problem is to use an event structure in your while loop that waits for a value change and has a timeout associated with it... hope this helps

0 Kudos
Message 9 of 10
(6,169 Views)
Probably too late to help since the message thread is closing in on 2 years old.Smiley Surprised
0 Kudos
Message 10 of 10
(6,145 Views)