LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Closing a window in LV

I am only considering the Windows 9x platforms in the below. I am also
assuming that the under VI setup the options for "open front panel when
called" and "close afterward" are selecting for the following sub-vi.

Does anyone know the details of how Labview inteprets a user closing a
window? I can think of two scenarios off hand.

The first is a sub-vi that pops up as a window to display certain
information via indicators. This sub-vi is set to act as a non-modal
window so that the data flow continues on the diagram while this sub-vi
is displaying its information. I could see that one could have a button

on the sub-vi's panel to send a false to end its loop and thus close the

window, or the user may click the X in the upper rig
ht of window to
close the sub-vi. Does this pass any data "behind the scenes" to the
diagram? I could imagine that the sub-vi was called via VI-server so
that it is not immediately recalled during the next loop of the main VI
in the instance that the sub-vi is wired in line. Does anyone know of
any nuance here?

The second is a sub-vi that pops up as a dialog and halts the flow of
data on the diagram. I could imagine that this dialog takes some input
(i.e. button click) to close this dialog from Labview logic and with the

control button press ending a loop. But what if a user just merely
clicks the X in the upper right of the window? It appears that the
Window closes and allows Labview to continue data flow in the diagram.

Thanks,

Don
0 Kudos
Message 1 of 2
(2,406 Views)
Closing a window using the X in the upper corner can have unpredictable
results. If a loop is running wait for a front panel control the VI will
keep running after the X is pressed only you won't be able to see it!
Essentially when you click the X you are telling the VI to close the front
panel, there is no other effect. To allow this to be a usable feature you
must open a VI reference to the VI being displayed and use a property node
to check to see if the front panel is open. Then you can wire this front
panel open property in with your VI control for exit using logic and decide
for yourself want you want to happen when the X is selected.

I can send an example, email me directly.

Jim Morrison
Rendezvous Bay Software

Don wrote:

> I am only considering the Windows 9x platforms in the below. I am also
> assuming that the under VI setup the options for "open front panel when
> called" and "close afterward" are selecting for the following sub-vi.
>
> Does anyone know the details of how Labview inteprets a user closing a
> window? I can think of two scenarios off hand.
>
> The first is a sub-vi that pops up as a window to display certain
> information via indicators. This sub-vi is set to act as a non-modal
> window so that the data flow continues on the diagram while this sub-vi
> is displaying its information. I could see that one could have a button
>
> on the sub-vi's panel to send a false to end its loop and thus close the
>
> window, or the user may click the X in the upper right of window to
> close the sub-vi. Does this pass any data "behind the scenes" to the
> diagram? I could imagine that the sub-vi was called via VI-server so
> that it is not immediately recalled during the next loop of the main VI
> in the instance that the sub-vi is wired in line. Does anyone know of
> any nuance here?
>
> The second is a sub-vi that pops up as a dialog and halts the flow of
> data on the diagram. I could imagine that this dialog takes some input
> (i.e. button click) to close this dialog from Labview logic and with the
>
> control button press ending a loop. But what if a user just merely
> clicks the X in the upper right of the window? It appears that the
> Window closes and allows Labview to continue data flow in the diagram.
>
> Thanks,
>
> Don
0 Kudos
Message 2 of 2
(2,406 Views)