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.
10-03-2014 05:06 AM
hello..to to pass variables among various V.Is in a single struct i have had to adopt to a system where by i have a cluster composed of an integer element and a refnum that points to an array of clusters...however ,the execution of various operations seems to have slowed down greatly. the .PNG image i have attached shows an example of how am currently accessing these variables..I would like to ask if there is any improvements i can make to help speed up the duration of execution ..thank you
10-03-2014 05:21 AM
Yes it'll be slow, as control refnums will work on the front panel control in the UI thread. Why dont you wire the cluster array and index it directly instead?
/Y
10-03-2014 06:47 AM
Yeah, using property nodes to get/set values is terribly slow. And I am talking 1000s times slower. That is why that is one of my pet peeves with some people's code.
I agree that you should just have the actual array in your cluster. It'll make like so much easier on you. Either that or use a Data Value Reference.
10-03-2014 07:42 AM
thank you both for ideas,,they should solve my prob..i was hoping i could just optimise the current structure but i guess i have to change it
10-03-2014 11:44 PM
If you typedef'd the cluster, it might not be too big of a deal. The only thing that would happen - other than making the front panel all out of whack for each VI using it - would be that you'd have to deal with the data directly instead of getting it from a value property node.