04-09-2007 06:08 PM
Solved! Go to Solution.
04-09-2007 11:15 PM
If you never change any of the controls "N points 2" and "power 2" (yes you don't mention changing these!), the subVI graph4.vi never gets called with any data and thus does not contain any useful data on the front panel when you show it.
Could that be it?
04-10-2007 11:48 AM
>If you never change any of the controls "N points 2" and "power 2" (yes you don't mention changing these!)...
mhmmm,....no that is NOT the reason... Have you tried the VI???
Honnestly, I would not bother people on this forum for such a stupid mistake.
And I also expect people to know how to run a VI....
And to play in your game, you forgot -3) Turn on the PC, -2) log in windows, -1) open labview...
04-10-2007 12:10 PM
04-10-2007 01:02 PM
My first instict is to say "you can't".
FP of VI that are not open do not get updated. This is great because I would hate to have LV updating the FP's of all of the sub-VI I use. Talk about CPU hog.
But in your case...
If you monitor the FP.Open state and when it changes, try a an invoke node Get FP image....
That may force a screen refresh and accomplish what you are after.
Ben
04-10-2007 05:10 PM
titi:
Even stranger, running the example on my computer yields the same values from both subVIs. I am not sure about why you are experiencing something else on your end. Another way to get the most current value is do write all the data to a configuration file, not the best method because you will have to do a read from file at the beginning of your program and a write to file at the end.
Rudi N.
04-10-2007 05:44 PM - edited 04-10-2007 05:44 PM
"
"
I had a chance to play with this LV 8.2.1 BETA and things seem to almost make sense.
If I unzip and run your main, both VI work as you are hoping until I save the VI's. Once saved they act as I expected them to, ie no screen updates.
I adjusted your code as shown below and the sub-VI FP's get updated when run regardless of their visability.
I don't see a bug in this situation. Non-visable sub-VI FP are not supposed to update, so having to do a little extra to over-ride that is to be expected.
I hope this helps,
Ben
Message Edited by Ben on 04-10-2007 05:48 PM
04-10-2007 06:00 PM
@titi_nicolas wrote:
...
mhmmm,....no that is NOT the reason... Have you tried the VI???
...
Honnestly, I would not bother people on this forum for such a stupid mistake.
And I also expect people to know how to run a VI....
And to play in your game, you forgot -3) Turn on the PC, -2) log in windows, -1) open labview...![]()
Well, I DID run your VI and everything worked just fine, however I no longer have LabVIEW 7.1 so maybe your observation no longer applies to newer versions. It could also be because they were just upgraded as Ben noted. I did not study it in detail.
And Yes, as Ben noted, invisible VIs don't get updated for performance reasons (and not to waste extra data copies for the controls and indicators). LabVIEW is typically smart enought to update when needed, e.g. if the subVI tries to print its panel, etc.
I guess you haven't been in this forum for too long, but since controls can easily be operated in edit mode is is absolutely important to mention at which step you run the VI. (try to operate your controls with the computer turned off and you will see that it is not that easy :o). Also if you have been programming for any length of time, you should know that stupid mistakes happen all the time (at least to me and Ben :)). It is much easier to weed out the stupid mistakes with a quick question&answer than to spend hours searching for a deep and complex solution.
04-10-2007 06:04 PM - edited 04-10-2007 06:04 PM
Thanks Ben, your idea does exactly what I wanted.
thanks a lot!
Message Edited by titi_nicolas on 04-10-2007 06:06 PM
01-08-2009 10:03 AM
Same issue, alternate solution:
I have a subVI that runs frequently, and I want to show its front panel occasionally. Adding code to the subVI that runs all the time (as explained above) is a constraint in this case. An alternate solution would be to toggle the Defer Panel Updates property when the FP.State changes. If the front panel state is the same, do nothing. When "False", the Defer Panel Updates property node forces a panel update, even when the VI has not been shown. See attached.
-Jason