LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modal VI does Not Stay on Top

I have a 2 thread program (LV 6.1)that includes a user interface in thread 1 and a data acquistion loop in thread 2. When thread 2 initiates data collection, it pops up a non-modal status bar. If this bar pops up at the same time that a user opens a new modal window, the modal window is either not displayed or falls behind other windows and is not visible or accessible. Hence the program locks up since the user cannot access or close the modal window. The only way to solve the problem is to kill the program with the WinXP TaskManager. Data collection is run with high priority while the user interface is run with normal priority. All user interface screens are run with wait for front panel activity. Is there a way to to keep the mod
al window on top or to restore it without crashing the program?
T-Ray
0 Kudos
Message 1 of 3
(2,859 Views)
hi,

create a reference to your modal vi in the vi itself using the vis name and set the "isfrontmost" property of the frontpanel object to TRUE (the property has been renamed from 6.1 to 7.x, i don't remember the right spelling, but you should find it).

greetings
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 3
(2,859 Views)
T-Ray wrote:
> I have a 2 thread program (LV 6.1)that includes a user interface in
> thread 1 and a data acquistion loop in thread 2. When thread 2
> initiates data collection, it pops up a non-modal status bar. If this
> bar pops up at the same time that a user opens a new modal window, the
> modal window is either not displayed or falls behind other windows and
> is not visible or accessible. Hence the program locks up since the
> user cannot access or close the modal window. The only way to solve
> the problem is to kill the program with the WinXP TaskManager. Data
> collection is run with high priority while the user interface is run
> with normal priority. All user interface screens are run with wait
> for front panel activity. Is there a way to to k
eep the modal window
> on top or to restore it without crashing the program?

There is also a possible problem which seemed to have gotten introduced
in LabVIEW 6.0 or 6.1 and is afaikr fixed in 7. If you debug an
application once, the VIs ar all forced to be not modal (which is a very
good thing to not lock you out during single stepping and such). But for
some reasons this "force non-modal" operation stays enabled after that
for the entire rest of the LabVIEW session. Quiting LabVIEW and
restarting fixes that. It is only a small annoyance during debugging but
much prefarable to not being able to get at the diagram in which a
breakpoint requires your attention.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 3
(2,859 Views)