02-16-2023 10:59 AM
I have a cluster in the main vi that contains text rings. I pass the cluster reference to a subvi. I would like to initialize a local text rings in the subvi with the text rings passed via the cluster reference. I tried something like this
where tcolheader and vcolheader are text rings. But that did not work. In the front panel the local text rings are empty.
Any suggestions?
Thank you.
Girish
02-16-2023 11:13 AM
The Value of a ring is just a numeric index into the set of strings; you cannot access the set of strings via the ring's value. The strings are a property of a ring control; you can access them via a reference the control.
02-16-2023 11:13 AM
It will be more useful if you attach your code so that we can understand your question better.
02-16-2023 02:16 PM
Thank you very much. That worked.
Girish
02-16-2023 03:05 PM
I am trying to do the reverse for storing the values back in the main vi. I am doing something like this
Green line is the reference to the cluster in the main vi, timecol and var are text rings in the subvi, controls 1 and 2 are the corresponding text rings in the cluster in the main vi. As shown above I set the values of text rings in the main vi with the current values of the rings in the subvi. When the subvi is closed, the values in the main vi do not change. The values array in the cluster gets updated correctly as shown in the wiring at the top.
Don't know why the text rings do not get updated.
Thank you.
Girish
02-16-2023 03:46 PM
Check if errors are coming out of the property nodes.
(Note: Always include good error handling in your code.)
02-16-2023 03:50 PM
Note, this:
does exactly the same as this:
02-16-2023 04:30 PM
Unfortunately the numerical array in the cluster is named values. It is different from value property. The diagram sent by me is accurate. In fact the values array is correctly assigned in the main vi cluster after the subvi is completed.
I added error tracking in the diagram I had sent, but didn't see any errors.
Girish
02-16-2023 04:39 PM
@girish53 wrote:
Unfortunately the numerical array in the cluster is named values. It is different from value property. The diagram sent by me is accurate. In fact the values array is correctly assigned in the main vi cluster after the subvi is completed.
I added error tracking in the diagram I had sent, but didn't see any errors.
Girish
Regardless of the naming of your numeric array, the unbundling and rebundling accomplishes nothing.
If you post actual VIs instead of pictures, I might be able to help you.
02-17-2023 10:42 AM
I was able to figure out the mistake I was making in storing the values back in the main vi. Thank you for your help.
Girish