LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a subVI without interfering?

I have a main VI that runs in a continuos while loop, outside of that while loop I bring up a subVI to display data that is gathered in the main VI. The problem occurs in the sense that I want the subVI to come up at the beginning (no problem) and to stay up everytime a user clicks a button on the main VI (problem), instead it dissappears into the background and te user always has to click on the menu below to bring it into view, any way to avoid this? Setting Priorities?
0 Kudos
Message 1 of 7
(3,141 Views)
You can use the property Front Panel Window:Is Frontmost. In the main VI, create a reference to the subVI and call the property as needed. For example, if a main VI button is wired to a case statement, put the property node inside the true case. If the property node is executed during every loop of the main VI, you'll be unable to switch windows.
0 Kudos
Message 2 of 7
(3,141 Views)
If you are using LabVIEW 6, then you can set the Properties of the VI so that the VI is Modal (always on top). Choose VI Properties, Window Appearance, Customize, Window is Modal. Otherwise, you can setup a property node using a reference to the subVI and select the property "Is Frontmost".

Rob
0 Kudos
Message 3 of 7
(3,141 Views)
That is exactly what I don't want. 🙂 I mean your suggestion is good if I wnated to have the subVI constatly on top, and the mainVI to be in the background, but I want to be able to control the mainVI with the subVIO just floatin gon top, not having to close the subVI to be able to click on the main one... is that any clearer?
0 Kudos
Message 4 of 7
(3,141 Views)
Why would you have to "close" the subVI to click on the Main VI? If you make ONE call to bring the subVI to the foreground, it just moves it to the foreground once...if you click in the Main VI, the focus will shift, but the subVI is still running...

Mark
0 Kudos
Message 5 of 7
(3,140 Views)
I think what he was complaining about was if the subVI was modal to the main. Then you wouldn't be able to shift focus back to the main. One call to bring the subVI to the foreground is the way to go.
0 Kudos
Message 6 of 7
(3,140 Views)
Hi Helper

if you download the LV Window Utilities VIs from the NI site, you can use
the function "Make window always on top.vi". I think this is what you are
looking for.

this is the link to the Window Utilities:

http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&74DDE683A1AFF698
8625683A000C0D73&cat=034E59A8530E09DF862568900018707A

if the link doesn't work, search for:

Windows API Function Utilities (32-bit) for LabVIEW

Good luck

Denis
0 Kudos
Message 7 of 7
(3,140 Views)