NI Home > Community > NI Discussion Forums

LabVIEW

Reply
Active Participant
James_R
Posts: 214
0 Kudos

local vs property node

what is the difference between local variables and property nodes concerning best practices and performance  ??
 
 
Thanks
 
 
James
- James

Using LV 2012 on Windows 7 64 bit
Trusted Enthusiast
Darren
Posts: 2,853

Re: local vs property node

If possible, you always want to pass data to/from your front panel controls/indicators with wires.  If this won't suffice (parallel loops, e.g.), then you will want to use locals.  Try to avoid using the "Value" property unless you must write to your controls/indicators in a subVI.  The "Value" property is very slow compared to locals due to threading issues associated with property nodes.

Hope this helps,

-D

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Knight of NI
altenbach
Posts: 26,867

Re: local vs property node

Since you compare the two in one sentence, you must mean "Value property nodes". :smileywink:
 
As Darren said, property nodes are expensive. Check out my speed comparison VI in this old thread:
 
 
 
(Of course if you need to write to a signaling value property in order to fire an event, a local variable won't work. You need the property node.)

LabVIEW Champion . Do more with less code and in less time .

Active Participant
Travis_M.
Posts: 526

Re: local vs property node

[ Edited ]

Hello all,

To take it one step further, the speed hit comes from the fact that these items run in the UI thread along with all of your other user interface actions (speed), and copies are always made of the data (performance AND speed)!  Check out the "LabVIEW Performance and Memory Management" tutorial -- while a little old its concepts are still dead on and it does a great job of explaining the details of these issues.  If you need to pass data from/to parallel loops or sub-VIs consider putting the data in some sort of container (like a single element queue), and passing the container around.

Hope this adds just a little more insight!

Message Edited by Travis M. on 02-08-2006 02:21 PM

Travis M
LabVIEW R&D
National Instruments
Member
Rajmohan
Posts: 25
0 Kudos

Re: local vs property node

Really good Thread thanks

Member
vinod00
Posts: 14
0 Kudos

Re: local vs property node

Hello travis could you please pour in some more information on Property node concept and whn can it be best used?? Thanks in advance.