From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-06-2014 04:24 AM
Hi,
I am trying to avoid local variables, and instead using property nodes, because they are supposed to be better in terms of performance. But creating a property node takes a lot of time. I have to click delicately on front panel item (or else find it in the block diagram) and then browsing through a maze of menus and submenus.
Is there some shortcut where I can just select an object and use some key combinations to create a property node (the property by default could be the last used property of that object)?
I don't remember if there is some special sub-forum or thread dedicated to the tips and tricks (I checked the wiki page for that), so posting here.
Thanks ahead!
Solved! Go to Solution.
08-06-2014 04:29 AM
Local variables perform better than property nodes last I heard.
08-06-2014 04:32 AM
I am trying to avoid local variables, and instead using property nodes, because they are supposed to be better in terms of performance
and how do you know that.
I assume that you are talking about value property node.
No they are not good as compared to local variables.
value property node will force a switch to UI thread.
and if you are using Dtatypes like arrays etc consider using SEQ , DVR, AE etc...
08-06-2014 05:22 AM - edited 08-06-2014 05:22 AM
Well well well...
I am feeling completely dumbfounded on this one
For a majority period I used only local variables, and wires whenever possible. The wiring is still my first preference, but from my current program, I am stressing more on using Value property nodes instead of local variables, because, in reading one thread I "read" a post by an experienced member mentioning that "value property nodes" use less memory and local variables are more expensive because they constantly update the user interface. And since local variables were what I used usually, this explanation kind of made me change my approach (because I felt like I should be doing the opposite of what I am doing).
Now, after your quick replies, I stormed through forums and I see the opposite of what I "thought I read" is true and is written everywhere. So either I read and interpreted incorrectly, or the person made a switch while writing or the sentence was written in a way I made an error in reading. Anyways, I have noone to blame but myself.
Thanks for correcting me on this one.
Nevertheless, my original question continues - is there a quick shortcut to create property nodes (or local variables 🙂 ), by just selecting the object and applying some key combinations?
08-06-2014 05:25 AM
@Neos wrote:
and if you are using Dtatypes like arrays etc consider using SEQ , DVR, AE etc...
Yes, I do use a lot of arrays. And I use Queues. What are SEQ, DVR, AE etc.?
Can you please elaborate on that? Or some quick example if you have.
08-06-2014 05:41 AM - edited 08-06-2014 05:42 AM
At first in responce to your original question i do not know any other shortcut method to create property nodes.
Now you can go through some legendary posts
I am not able to attach links from my PC
Please search for the following in forums
Single element queue
Dr Damiens Development Single Element Queue Reference Objects
Action engines
Community Nugget 4-08-2007 Action Engines
08-06-2014 05:48 AM
And yes using local or global variable create a seperate memory space.
Generally that would not be a much memory issue for smaller data types ( like Boolean , numeric )
But for large Datatypes you should try using a single copy and you will be able to manage race conditions also.
08-06-2014 05:53 AM
By single copy or single element queue, do you mean using wires and shift registers instead of local variables?
If yes, then yes, I use like that only. As many wires as possible while keeping the diagram as neat as possible.
Yes, I have read some of those posts, and Damien's nuggets. I didn't recognize those abbreviations. 😉
Thanks again.
08-06-2014 06:13 AM
This is the sort of place where Quick Drop comes in handy.
You can drop a property node relatively quickly using it, but you'd still have to create and wire a reference to it.
You could create your own Quick Drop plugin with some scripting so that it does this automatically, and I bet someone out there has already tried to do something similar. Not for the faint of heart, but if you find yourself using something that repeatedly then it's usually worth finding a tool to make it quicker/easier/neater.
08-06-2014 09:13 AM
Vaibhav,
The Single Element Queue is a standard queue except that you wire a value of 1 to the max queue size input.
A queue with limited size will dispose of the oldest element when the queue has reached the maximum size and a new element is written (enqueued). With a single element queue the queue contains either zero or one element. If it has zero elements, Enqueue and Dequeue act like a normal queue. If it has one element and another Enqueue occurs, the previous element is lost and the new element is in the queue. So the Single Element Queue can contain no more than one element at a time.
One advantage of this structure over local variables or property nodes is that it is not linked to any front panel control or indicator. It is purely a data structure.
Lynn