LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Performance of Control Reference vs. Data Member in a GOOP design

I am doing some GOOP programming an was wondering if anyone could make a suggestion on the best way to implement passing a UI control value to the object. Right now the object has a data member which is the UI control reference. During a loop it reads its value. Would it be better for the UI to call a method that updates an actual control data member in the object?
0 Kudos
Message 1 of 4
(2,745 Views)
If I understand your question correctly, it is always better to update an indicator using a terminal rather than the value property. According to NI the value property is the slowest and by far most inefficient way of updating an indicator.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,745 Views)
I am not really looking to update an indicator but a "value" that controls the state of the object. Right now the "value" is controlled by the front panel control. I pass a control reference and read the value, but it sounds like this is not the best method.
0 Kudos
Message 3 of 4
(2,745 Views)
> I am not really looking to update an indicator but a "value" that
> controls the state of the object. Right now the "value" is controlled
> by the front panel control. I pass a control reference and read the
> value, but it sounds like this is not the best method.

Adding a bit of context, within a VI diagram, the best way to access the
value of a control is through the terminal, second best (for those cases
where you need access in multiple locations) the local variable, third
best (typically considered last) the property node's value.

Your other post lists a fourth, which I'll place below the property node
-- the Get and Set data method.

Despite the warnings, if your access to the UI elements is fast enough,
use the property nodes
. If you need to speed things up, take the data
values from the UI and place them in your GOOP object. The UI can
either be the primary element and the GOOP ones a cached value, or you
can do it the other way where the GOOP object is the primary value and
the UI is updated as time allows.

Anyway, property nodes sound like they will work fine for your application.

Greg McKaskle
0 Kudos
Message 4 of 4
(2,745 Views)