LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing a ring text control in a subvi from a reference to a cluster

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

girish53_0-1676566579125.png

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

0 Kudos
Message 1 of 10
(1,449 Views)

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.

paul_cardinale_0-1676567558164.png

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 10
(1,441 Views)

It will be more useful if you attach your code so that we can understand your question better.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 3 of 10
(1,440 Views)

Thank you very much. That worked.

Girish

0 Kudos
Message 4 of 10
(1,397 Views)

I am trying to do the reverse for storing the values back in the main vi. I am doing something like this

girish53_0-1676581136775.png

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

 

0 Kudos
Message 5 of 10
(1,386 Views)

Check if errors are coming out of the property nodes.

(Note: Always include good error handling in your code.)

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 10
(1,377 Views)

Note, this:

paul_cardinale_2-1676584196004.png

 

does exactly the same as this:

paul_cardinale_1-1676584141132.png

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 10
(1,374 Views)

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

0 Kudos
Message 8 of 10
(1,366 Views)

@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.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 9 of 10
(1,360 Views)

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

0 Kudos
Message 10 of 10
(1,333 Views)