10-07-2010 09:13 AM
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.
Solved! Go to Solution.
10-07-2010 09:18 AM
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.
10-07-2010 09:29 AM - edited 10-07-2010 09:30 AM
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...
10-07-2010 09:35 AM - edited 10-07-2010 09:35 AM
@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?
10-07-2010 09:41 AM
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.
10-07-2010 09:43 AM - edited 10-07-2010 09:45 AM
No, no issue with my code 🙂
@smercurio_fc: 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.
10-07-2010 09:46 AM
@johanneshoer wrote:
No, no issue with my code 🙂
Yeah, we've heard that one before...
@smercurio_fc: 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.
10-07-2010 09:55 AM
Yes! All right, it works now! 🙂
Thank you very much!
10-08-2010 08:04 AM
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.