In article <954328830.573287@dibbs3.eur.cis.philips.com>,
"Remco Breen" wrote:
>
> zhljh@my-deja.com wrote in message <8brnmh$dlg$1@nnrp1.deja.com>...
> >In article <38E138DB.2A27164A@usa.alcatel.com>,
> >"Kevin B. Kent" wrote:
> >> zhljh@my-deja.com wrote:
> >>
> >> > Now, I meet a problem: I can popup the subvi node setup dialog to
> >enable
> >> > "show front panel when called", which implements the first one,
but
> >I
> >> > can not close the front panel until originally closed(main
> >> > program stops). How can I close the subvi's front panel(after it
> >> > finishes running) even when the main program is still running?
> >
> >
> >
> >
> >> Select the "close front panel if originally closed" option.
> >> in addition to the "Show front panel when called"
> >>
> >> Kevin Kent
> >
> >
> >I have tried this, in this way, the subvi's front panel is closed
only
> >after the main program stops. In fact, what I want is to close the
> >subvi's front panel even the main program is still running.
> >
> >
> >zhljh
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Before you buy.
>
> Another option would be to open a VI reference (found under
"application
> control") and tie that to a property node and select the property
"front
> panel.open". Change it to a control and attach a boolean false to it
when
> you like to close.
>
> RB.
>
I think a more elegant way of closing the SUB VI is to start off the way
that Remco states regarding opening a VI reference. Only in the Sub VI,
you should program a Terminate control (such as an Abort button to exit
from a While loop... or something similar) and via the VI reference,
select the 'Set Control Value' method to gracefully stop the Sub VI
execution. Of course the Sub VI will have to set the close if originally
closed attrib set.
There is a great source of example LabVIEW apps at:
http://digital.ni.com/explprog.nsf/web%2Fswgrp?OpenView&Start=1&Count=50
0&Expand=3.7#3.7
In particular, see "Stopping a Running SubVI from the Main VI Using VI
Server" example. It demostrates this techniques better than I can
explain it. Hope this help.
Rick
Sent via Deja.com http://www.deja.com/
Before you buy.