LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you recommend a bettery way to unbundle this cluster?

Can you recommend a better way to unbundle the cluster shown below?  There is a boolean data type in the cluster along with the doubles so converting

it directly to an array does not work.  Is there some way I can unbundle a certain number of the cluster elements and convert those directly to an array?

 

For instance, cluster elements 0 through 30 ?

 

Thanks,

 

Dave

Untitled.jpg

0 Kudos
Message 1 of 15
(4,022 Views)

Use this function

 

Cluster To Array Function

Owning Palette: Cluster, Class, & Variant VIs and Functions

 

It will take you cluster and transfort into a array

Message 2 of 15
(4,014 Views)

If you want to have only the first 30 elements as dbl, can you put into a cluster inside the mains cluster?

Message Edited by CFiset on 11-16-2009 12:53 PM
0 Kudos
Message 3 of 15
(4,013 Views)

Since you have that pesky boolean, try this (using flatten to string).

 

UnbundleCluster.png

Message Edited by Darin.K on 11-16-2009 12:50 PM
Message 4 of 15
(4,010 Views)

I like Darren's solution (kudos Smiley Happy), and it can be made to work with your original method.

 

However, if you can change your original cluster into a cluster of clusters, and put the "pesky boolean" in its own cluster, then Cluster to Array works fine...

 

Message Edited by Broken Arrow on 11-16-2009 01:04 PM
Message Edited by Broken Arrow on 11-16-2009 01:04 PM
Richard






Message 5 of 15
(3,985 Views)

Can you change the boolean to a 0, 1 numeric and include it in the Cluster?  Then Cluster to Array.  Just index it out or use Split array.

 

Lynn 

Message 6 of 15
(3,975 Views)

Broken Arrow wrote:

I like Darren's solution (kudos Smiley Happy)


Oh Darin is none other than Darren ?

Message Edited by Mathan on 11-16-2009 01:08 PM
Message 7 of 15
(3,965 Views)
I presented my solution in the spirit of cleaning up somebody else's dirtywork.  If that cluster is your own creation, please consider reworking it.  And if it is your own handywork, at least you were sensible enough to make it a typedef so the conversion will be a piece of cake, right?  Smiley Wink
Message 8 of 15
(3,958 Views)

Mathan wrote:

Broken Arrow wrote:

I like Darren's solution (kudos Smiley Happy)


Oh Darin is none other than Darren ?

Message Edited by Mathan on 11-16-2009 01:08 PM

Ooops. Smiley Surprised Sorry 'bout that Darin.

Richard






0 Kudos
Message 9 of 15
(3,944 Views)

Thank you all!  I am going to go with the cluster inside a cluster idea but I still appreciate seeing yours Darin.  It's great to see these perspectives on solving LV problems.

 

Regards,

 

Dave

0 Kudos
Message 10 of 15
(3,936 Views)