LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Broken_Arrow

Change CLUSTER SIZE to a Wired Input

Status: New

Cluster Size as a Wired Input:

 

  • Easier to see
  • More implicit
  • Nearly impossible to forget to set it (if it were a required input).

 Cluster Size.gif

Richard






30 Comments
RavensFan
Knight of NI
Probably not since the size of the array most of the time would be determined programmatically.  The only way the compiler would know the size of the array would be if the incoming array was constant folded all the way up to this function.
Vaibhav
Active Participant

Finally came a moment when I thought "oh, I should be setting the size programmatically." And remembered that I have already seen this in the Idea Exchange. 

 

Kudos for this "idea." 

 

It is already a good thing that we can set cluster size explicitly by double-click. But I need this wired input. Right now, I am creating clusters of different sizes in a case structure. The drawback is that there are as many outputs as cases (each case having a different size of cluster). If I can wire the input, I "expect" I could keep only that number in the case structure and the "Array to Cluster VI" could be outside (thus just a single node). But perhaps this would be "setting the size run time and not edit time" and it won't be allowed.  

Can I change the number programmatically (all the possible numbers having been specified already with the constants being inside a case structure), as in the image? No?  

ClusterSize.png

 

In that case, it really doesn't matter (since it doesn't give extra power) how you pass the number. And I would just like the number to be displayed in the node itself, as already given in the idea by Ravens Fan. This will save some space and also the node looks more interactive. 

 

 

 

Message Edited by Vaibhav on 10-16-2009 09:25 PM
Message Edited by Vaibhav on 10-16-2009 09:26 PM
Vaibhav
Broken_Arrow
Active Participant

That would be very cool but probably impossible.

Richard






Tom_Hawkins
Member
I'd go with the 'cluster size' dialogue popping up as soon as you drop the function on the diagram. If you cancel that dialogue, the function either disappears again or produces a broken wire until you set the size - and produces a specific error message in the error list.
hoayling
Member
It would be great if Array to Cluster can auto resize,,,
JÞB
Knight of NI

Cluster.PNG

I love the idea.  My preferance would be to implement it similar to the delay in the feedback node.  (in fact this was the where I grabed the picture piece and erased the arrow)


"Should be" isn't "Is" -Jay
Minions
Active Participant

I like this idea as it would allow for programmatically re-sizing the cluster size.  Just perform an array size prior to this new [Array to Cluster] function and pass that into the function.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
RavensFan
Knight of NI

But as it has already been said, this is impossible.  The size of the cluster is determined during edit time when the LabVIEW editor is compiling the VI.  There is no way you can programmatically change the cluster size because that would break the VI.

myle00
Member

Love this idea. I was searching if this is doable. The reason is that I have a a labview project that provides a interface for a dll. In the dll I have a lot of defines some of which are sizes of clusters that needs to be passed in. I'd like to be able to define a enum in labview for these sizes and then wire the enum constant to the cluster function in the block diagram and the cluster size will be automatically adjusted to required size. This way I can centrally control the proper sizes and when the dll gets updated I can change the enum value and everything gets updated!

tst
Knight of NI Knight of NI
Knight of NI

I'd like to be able to define a enum in labview for these sizes and then wire the enum constant to the cluster function in the block diagram and the cluster size will be automatically adjusted to required size. This way I can centrally control the proper sizes and when the dll gets updated I can change the enum value and everything gets updated!


You should be able to do that today by creating a polymorphic VI, which is basically a group of VIs, which you drop as a single VI and choose one of them at edit-time. Usually, selecting the relevant VI is done automatically, based on the data types you wire into the VI, but you can also show a selector ring, which would basically function like the enum you want.

 

If you have a lot of these VIs, you can try looking into automatic generation of the poly-VI, but be aware that this area is relatively advanced and I believe there are no good automated tools for this. This might or might not help you - http://lavag.org/files/file/136-polymorphic-vi-editor-v100-lv2009/

 


___________________
Try to take over the world!