Array to cluster function always returns a fix (but settable with the function rmb-menu) number of elements in the output cluster. If the array is too large, elements are stripped to the cluster length. If it is too short, missing elements are replaced with the default-default value of the datatype in the cluster to fill it to its length.
"Scott Miller" schrieb im Newsbeitrag news:email@example.com... > I hope someone can help me out. I've just noticed some curious > behavior that I can't explain, or find any references to on-line. > > When I convert a 1-D array (say of I32s) which has length N, to a > cluster I find that the cluster has N+1 elements, the last of which is > always 0. Am I missing something here? > > I'm using LabVIEW 6.0.2 on NT. > > Thanks in advance!
you have to set the cluster-size for converting an array into a cluster. Open the context-menu of array2cluster function, select cluster-size and enter your needed number of elements.
I guess I was working too many hours straight when I came across this problem, because I completely misread it, and then jotted off a post before really seeing what I was looking at. Stupid me!
However, I strongly feel that the need to explicitly specify the cluster size to convert to is a real LV deficiency. Given that I was converting a constant array, LV had all the foreknowledge to size the cluster automatically. LV usually handles polymorphism very smoothly, so I feel that it should here as well.
As far as the case of converting an array control, well that's more complicated since the size isn't known until run-time. In that case I would say that you should have to do an explicit specification.
Pr oper polymorphic sizing of converted clusters would be a great feature in future revisions of LV. Is that too much to ask?