08-04-2016 09:57 AM
Hi,
I want to make a duplicate of a cluster and then write to it. These clusters are in an array which i build up throughout my program. I take the first element and then write to it before appending to the end of the array but I want to set all variable to default before i start writing. To do this i'm using invoke nodes but for some reason this won't work and the values arent set back to default. Do I have to use an invoke node for every variable in the cluster or is there a way to do it all at once?
I have added the VI but also a picture in case this handy too.
Thank you
Stephen
Solved! Go to Solution.
08-04-2016 10:03 AM
The only place where I see you do a reinitialize to default, you don't even use that cluster in your subVI. Nothing is wired to it and that indicator is not connected in the connector pane for you to do anything with it after the subVI.
You have a lot of controls saved in that zip, but only the one subVI. It is unclear on how you are trying to use this.
08-04-2016 10:12 AM
The controll come from thhe cluster structure I'm using which is relatively complex with quite a few type defs etc. I can't help them being daved in the duplicate.
Also the indicator is there so I can use the reference from it. The indicator was made from the cluster coming out of the index array which is being opened up. Maybe this is completely the wrong way.
What I want to do is to initialse the cluster I take from the index array before I open it in the unbundle array.
08-04-2016 10:23 AM
You have a reference to the indicator called "Data Set Information". That indicator just sits down to the lower right. Nothing goes into it. It doesn't connect to anything else. You are just initializing a front panel indicator that never changes. You say "it was made from the cluster coming out of the index array". I don't know exactly what you mean be that. But if that is just a copy of another part of your code, you just made a new independent indicator that has nothing to do with where it came from.
If you want to put a new element at the end of your array where some elements are default values and some are updated, Just wire a constant with default values into the top of the Bundle by Name node, and use the controls like you are doing to update those values that you don't want to have as default. Right now you are taking index 0, whatever values they are at the moment, and updating the 5 named elements in the cluster.
08-04-2016 10:33 AM - edited 08-04-2016 10:33 AM
Cool, that should work.
Thanks