LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

local variable versus 'properity value'

Highlighted
Hi,

can anybody explain me the (dis-)advantages of using 'properity:value'
instead of using a local variable when I want to read (write) a control
at a second location.

Thanks for any input
Urs Bögli
0 Kudos
Message 1 of 5
(1,150 Views)
Well one thing is a speed issue, the local will update much faster than the property node.... so if speed may be an issue i would use a local

Dan
0 Kudos
Message 2 of 5
(1,150 Views)
Hi Dan,

what is (are) the other issues?

Thanks
Urs

dan bookwalter schrieb:
> Well one thing is a speed issue, the local will update much faster
> than the property node.... so if speed may be an issue i would use a
> local
>
> Dan
0 Kudos
Message 3 of 5
(1,150 Views)
A property node will execute in the UI thread.

This requirement does not apply to the locals.

Ben
0 Kudos
Message 4 of 5
(1,150 Views)
First : Greetings from another "Bögli" on the Developer Exchange.

I don't think there are other issues. But, like Dan said, the property node will be much slower. This is because it will force LV to switch to the user interface every time you read the property.

I have just made a little test to give you some figures. Simple for loop with 1000000 iterations in which the value is read.

Local variable = 15 times slower than Terminal
Property node = 653 (!!!) times slower than Terminal

If performance is an issue, the property node is not the way to go !
0 Kudos
Message 5 of 5
(1,150 Views)