LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating cluster values, is there a better way?

Is there a better way to do this? Mainly the middle part where the array comes out of the for loop and gets indexed then bundles by name.

 

I tried using cluster to array and then array to cluster but then I lose the cluster labels and that messes everything up in the rest of the main program.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 29
(4,657 Views)

I would suggest that you go back to using Cluster to Array and Array to Cluster.  You can reinstitute your labels using a Type Cast operation.

 

TypeCastCluster.png

 

You can simply wire your control (or a local variable) into the Type Cast Function.  It will also make your life much easier if all of those paths are contained in their own cluster within your Paths cluster.

 

 

Message 2 of 29
(4,640 Views)

When I try this I get broken arrow and the error list says:

 

You have connected to a polymorphic terminal that cannot accept this data type.

 

I set the cluster size to 17 in the array to cluster...

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 29
(4,589 Views)

The typecast function is a polymorphic instance without a case for this type of cluster (with file path constants).

 

You can implement the desired behavior by using a 'flatten to string' and 'unflatten from string' as shown here:

 

2009-11-25_111141.png

 

-Bob

Message 4 of 29
(4,574 Views)
So with this and pictures I can chalk up at least two datatypes that Type Cast is not happy with.  Good to know.
0 Kudos
Message 5 of 29
(4,560 Views)

What others come to mind?

 

I'd like to list as many unsupported data types as we can so an AE can document these for R&D, and this thread will serve to help those searching the forums for a solution/workaround in the future if we tag it appropriately.

 

-Bob

Message Edited by B O B on 11-25-2009 11:47 AM
0 Kudos
Message 6 of 29
(4,553 Views)

It would appear that I do not have 'flatten to string' and 'unflatten from string' (unless they are buried in LV-2009)

 

I do have 'Variant To Flattened String' and 'Flattened String To Variant'

 

But this does not work "You have connected terminals of two different types"

Message Edited by RTSLVU on 11-25-2009 10:00 AM
Message Edited by RTSLVU on 11-25-2009 10:00 AM
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 29
(4,547 Views)
Flatten/Unflatten are 'buried' in the Data Manipulation Subpallete in the Numeric palette.
Message 8 of 29
(4,516 Views)

Darin.K wrote:
Flatten/Unflatten are 'buried' in the Data Manipulation Subpallete in the Numeric palette.

 

Thanks, I looked all over for that.

 

I even tried the "search palettes" and turned up nothing...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 29
(4,511 Views)

Now that I found the flatten and unflatten it looks fine and runs but gives me a runtime error.

 

 

Message Edited by RTSLVU on 11-25-2009 10:42 AM
Message Edited by RTSLVU on 11-25-2009 10:44 AM
========================
=== Engineer Ambiguously ===
========================
Download All
0 Kudos
Message 10 of 29
(4,497 Views)