LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating Front Panel - Property Node vs. Invoke Method

I would like to know the difference(s) between these two methods of updating front panel "objects".  I have been foraging around for answers and none have jumped right out at me.  Does anyone have any insight, opinions, or warnings to offer?  Maybe there is an even better way? 
----------------------------------
LabVIEW 8.0.1; WinDoze XP
aut viam inveniam aut faciam
Download All
0 Kudos
Message 1 of 4
(4,115 Views)
To be effective, you should Defer Panel Updates before you change things. As for the obvious difference that one requires you to create references, while the other allows you to use strings, what is it that you're trying to figure out? I'm pretty sure both ways cause a switch to the user thread since you're invoking the VI server on an object that has a GUI component.
0 Kudos
Message 2 of 4
(4,087 Views)

I guess I was wondering if one method was more efficient than the other.  I was also unclear as to whether the Invoke Method actually forced a switch to the UI thread; though I intuitively figured it did.

I am still  confused about how the Defer Panel Updates property works.  The help is vague, as usual.  It does state "When you set this property to TRUE, LabVIEW redraws any front panel objects with pending changes then defers all new requests for front panel updates."  This led me to believe that the property should be set after making changes.  This still leaves the question "how do I force a Panel Update when I want ?"; do I toggle this property?  That seems retarded.

Essentiallly what I'm trying to do is use a single "server" to manage some number of "dumb" front panels rather than duplicate code in each VI that may get loaded at run-time.  Maybe this is a bad approach; don't know; I'm still searching for all the pieces to this puzzle.

Thanks for your input.

----------------------------------
LabVIEW 8.0.1; WinDoze XP
aut viam inveniam aut faciam
0 Kudos
Message 3 of 4
(4,074 Views)
From what I understand, setting a front panel object's value via a property node forces a panel update.

This means you have to wait for it to happen. Front panel updates are typically low priority so a lot of updates will slow down your application doing it this way.

In fact, an associate of mine recently compared local variables vs property nodes.
He said local variables were HUNDREDS of times faster. (I suspect this depends on what type of object you are updating.)
I think you can change the value in a local variable dozens of times before the front panel updates (again, depending on the type and relative thread priorities).

I realise this isn't exactly "Property Node vs. Invoke Method", but it may shed some light on the subject.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 4 of 4
(4,064 Views)