11-19-2013 01:20 AM - edited 11-19-2013 01:36 AM
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...
???????
Solved! Go to Solution.
11-19-2013 01:41 AM
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
11-19-2013 01:46 AM
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
11-19-2013 10:15 AM
Ya Thanks... which one should I use it for CLD exam