LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

local variable or property node what should i go for

what should i prefer Local variable or property node, since previously i use more number of property node value, if i use local variable instead of property node, what will be the effect.
0 Kudos
Message 1 of 4
(4,177 Views)
I believe it is more efficient to use a local variable than a property Value node. However it is best to avoid both as much as possible as they make for difficult to understand code and inexplicable race conditions (that are difficult to debug due to the confusing code).
Jeff


Using Labview 7 Express
Message 2 of 4
(4,175 Views)

The prefered methods for updating a front panel object in order of preference are

1) Terminal

2) Local

3) Property node

The terminal is the fast and LabVIEW has special functionality to keep it quick and efficient.

Locals require extra copies of the data AND can create the possibility of race conditions.

Property nodes also present the possibility of race conditions and also require a context switch to the User Interface thread to make the change.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 4
(4,171 Views)
Property nodes are synchronous and terminals and locals are not. This, combined with the UI thread switch, makes property nodes orders of magnitude slower than terminals and locals. Every time you write a Value property node, the node waits until the action is complete. Terminals and locals, however, are cached for the next UI update cycle. The value is changed in memory, but the front panel is updated at about 60Hz. This allows much more efficient usage.
Message 4 of 4
(4,131 Views)