02-09-2023 02:41 PM
I am passing a cluster reference to a subvi. In the subvi I would like get/change values of individual elements of the cluster. How do I get/change value an element by name? When I use unbundle by name I get wire error.
Thank you.
Girish
02-09-2023 02:48 PM
You can feed that reference into a property node and use the Value property to read/write data.
02-09-2023 03:09 PM
When I connect to a property node, I don't get the list of elements in the cluster.
I have elements like baud rate, parity etc. which do not show up in the choice list. What is the property Value anyway?
Girish
02-09-2023 03:23 PM
The reference is a pointer to some cluster on a front panel. The Value property is the value of that cluster. You should be able to right-click what you have and change to read and then unbundle the Value output of the property node.
02-09-2023 04:22 PM - edited 02-09-2023 04:23 PM
You need to use the type def to tell the subVI what's in your cluster.
02-09-2023 06:23 PM
@ZYOng wrote:
You need to use the type def to tell the subVI what's in your cluster.
That's true for generalized cluster references, but not for "Strict" references. It depends on the reference and how it was copied around.
02-10-2023 01:02 PM
@girish53 wrote:
When I connect to a property node, I don't get the list of elements in the cluster.
I have elements like baud rate, parity etc. which do not show up in the choice list. What is the property Value anyway?
Girish
Change that Value property to "Read", then wire it to an unbundler.
02-13-2023 05:33 AM
@Kyle97330 wrote:
@ZYOng wrote:
You need to use the type def to tell the subVI what's in your cluster.
That's true for generalized cluster references, but not for "Strict" references. It depends on the reference and how it was copied around.
This is a possible race condition though, generally not 100% safe as other code accessing the cluster (read or write) can act on the data in the time period between reading and writing via property node in your diagram.