LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Property node VS local variable on VI Analyzer

Solved!
Go to solution

Hi I am Preparing my CLD Exam. I got this issue...

 

I learned that their are two methods to update the front panel icon using local variable and property node value

It is not a good method to update an indicator using these but if we want update a control then their is no other option...

 

NI CLD recommends to use property node instead of local variable but when I run my code on VI Analyzer it created an occurance

stating that it is better to use local variable for good performance...

 

???????

 

Thanks & Regards

Varaprasath M
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 1 of 4
(3,610 Views)
Solution
Accepted by topic author Varaprasath

Yes, the text is correct. Property nodes are useful for accessing things like visibility and strings[] in ring controls, but for Value it's alot slower than a Local variable.

One of the benefits is that it has error wired so you can force dataflow, and since property nodes are executed in order you can use an expanded property node to know in which order things happen, especially compared to a free local and free property node in which case you'd be forced to use a sequence structure, which ofc is a bad solution.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 4
(3,595 Views)

Property Node Value:

- Can operate with (Signaling) option to create a value change event handled by an event structure. Variable cannot trigger this event

- Has error in and -out to put it into dataflow nicely and skip update in case of errors

- As it executes in the UI thread, it is the least (read: slowest) performant option to update front panel elements

 

Variable:

- Executes very fast

- Cannot be put into dataflow as it has no inputs for reading variable and no outputs for writing; "easy source for race conditions"

- Reading variable creates a copy of the data, so could waste memory

 

Depending on the aspect you are looking at, you will prefer one over the other. NI Style Guides concur in one point: Don't use either of them if possible.

Or to put it otherwise: Use variables and/or property node value only if it is really mandatory.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 4
(3,592 Views)

Ya Thanks... which one should I use it for CLD exam

Thanks & Regards

Varaprasath M
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 4
(3,562 Views)