LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum cluster size?

The definition of insanity is doing the same thing over and over again, under the same exact conditions, expecting different results each time. You keep asking the same question over and over again, expecting a different answer if you just ask it one more time. The answer is the same as before. The TypeCast will only work if you provide a valid cluster, which means it has to be created in the first place with the appropriate number of elements. You cannot do this dynamically unless you resort to scripting. How many times do we need to say this? Really.
0 Kudos
Message 11 of 16
(1,303 Views)

Sorry, let me be more clear.  IF the "convert array to cluster" function were able to accept more than 256 elements (or if i was using an array of less than 256 elements) I would happily go into the converter's properties and tell it how many elements it should create in the cluster.  This is way more convenient than me having to define the cluster and build every element in the clsuter usign brute force.  Does this make sense?  This VI would not be used at run time, it would be used earlier to create and save the type def.  I am not asking the same question over and over again.

 

You mentioned that the type cast node should be used to create cluster from an array of greater than 256 elements.  However, it sounds like to do that, the cluster HAS to be defined by hand first.  Ideally, i would like to combine the automatic cluster population with the Array to Cluster converter with that of the type cast node (which you said is the proper use for converting an array to a clsuter of larger than 256 elements).

Message Edited by PhilipJoeP on 05-21-2009 09:53 AM
0 Kudos
Message 12 of 16
(1,281 Views)

Philip,

 

Please check your other thread.

 

I found and posted the scripting code to create your cluster programatically.

 

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 13 of 16
(1,274 Views)

Thanks Ben, 

 

I did see it and this is a great solution to the multiple problems i was having.  Thanks for sticking in there and being patient with me.

0 Kudos
Message 14 of 16
(1,268 Views)

One way to get you there through manual methods.

 

Initialize an array of 256 elements with the datatype you want.  Wire it to the Array to cluster function set for 256 elements.  Wire that to an indicator.  Run it.

 

Go to the block diagram and change the indicator to a Constant.

 

Now you have a constant with 256 elements. 

 

Do the same thing for the number of remaining elements you need.  Drag and drop the values from this cluster into the bottom of the first cluster.  If they happen to be out of order, use the  Arrange Vertically in AutoSizing to sort them out.

Message Edited by Ravens Fan on 05-21-2009 11:50 AM
Message 15 of 16
(1,255 Views)

Ravens Fan wrote:

One way to get you there through manual methods.

 

Initialize an array of 256 elements with the datatype you want.  Wire it to the Array to cluster function set for 256 elements.  Wire that to an indicator.  Run it.

 

Go to the block diagram and change the indicator to a Constant.

 

Now you have a constant with 256 elements. 

 

Do the same thing for the number of remaining elements you need.  Drag and drop the values from this cluster into the bottom of the first cluster.  If they happen to be out of order, use the  Arrange Vertically in AutoSizing to sort them out.

Message Edited by Ravens Fan on 05-21-2009 11:50 AM

This was another option I was thinking about... I dismissed this idea because it may be a bit tedious.  But then again, it is an exponetial growth.  256 - 512 - 1024 -2048 - etc... so this might not be that bad.  Thanks for the post!

0 Kudos
Message 16 of 16
(1,251 Views)