LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open front panel of sub vi when called - how?

Solved!
Go to solution

Hello,

I have a VI with several sub VIs.

I want some of the sub VI front panels to be opened, if they are not yet opened and if they are called but I want them to stay in the background.

 

There are two SubVI Node setups: "Open Front Panel when loaded" and "show front panel when called"

Both are not what I want. If I select "show front panel when called", then the front panels are opened but flickering because they are called often and alternately.  

 

 

 

 

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 1 of 9
(11,261 Views)

I'm not exactly clear on what you're trying to do, but you can use the VI Server to check the state of the front panel and determine whether to open/load the VI. The "Front Panel Window:Open" property will tell you if the window is open.

Message 2 of 9
(11,259 Views)

Ok, I'll try to explain again.

 

User Starts Main VI and then he selects "generate signals" and "display signals" in the main VI ---> both SubVIs are opened.

I could do that by using "show front panel when called" but that makes the front panel flickering (if two or more SubVIs are opened) and CPU load goes up.

 

I have never used VI Server. I will study your attachment and hopefully I know what to do then...

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 3 of 9
(11,248 Views)

 


@johanneshoer wrote:

Ok, I'll try to explain again.

 

User Starts Main VI and then he selects "generate signals" and "display signals" in the main VI ---> both SubVIs are opened.

I could do that by using "show front panel when called" but that makes the front panel flickering (if two or more SubVIs are opened) and CPU load goes up.


This sounds more like an issue with the actual code in the subVI(s). Do you have a Greedy Loop?

 

Message 4 of 9
(11,241 Views)

When you use Show front panel when called, are you also checking the Close afterwards is originally closed?  This would cause the front panels to open and close every time they are called.

0 Kudos
Message 5 of 9
(11,233 Views)

No, no issue with my code 🙂

@: With your example I can see if a subVI is opened or not, but how can I open the subVI during run time if it is not opened?

 

@Matthew Kelton: No, they are not closed afterwards. Problem is that the subVIs are opened alternately all the time, which makes them flickering.

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 6 of 9
(11,230 Views)

 


@johanneshoer wrote:

No, no issue with my code 🙂


Yeah, we've heard that one before... Smiley Wink

 

 

 


@: With your example I can see if a subVI is opened or not, but how can I open the subVI during run time if it is not opened


Just call the method with it set to "write" (right-click and select "Change to Write"). I don't recall if LV 7.0 has a Front Panel:Open method. Check the LabVIEW manual.

 

Message 7 of 9
(11,224 Views)
Solution
Accepted by topic author johanneshoer

Yes! All right, it works now! 🙂

Thank you very much!

open_subVI.PNG

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 8 of 9
(11,210 Views)

The recommended practice is to use the VI methods Front Panel.Open and Front Panel.Close.  While the property also works, it can lead to such issues as the front panels hidden or iconized when "shown".  Using the methods allows you to specify this behavior.  See the LabVIEW help for details.

 

NOTE: Very old (e.g. 6i) versions of LabVIEW do not have these methods.

Message 9 of 9
(11,169 Views)