04-11-2011 02:45 PM
I have 8 arrays on the front panel of my VI. I have created refnum for each array.
I am building an array of these refnums and passing this array to a subVI.
LabVIEW is typecasting some of the refnums and not others as evidenced by the red dot on the Build Array element.
The arrays of all of Doubles.
Why is this happening?
Solved! Go to Solution.
04-11-2011 03:32 PM - edited 04-11-2011 03:33 PM
An Array must contain elements of identical types differing only in value. In Fact the elements must have identical properties! Its likely that some of your double arrays have different dimentions (1D, 2D), display formats, or even that some are controls and others are indicators. The refnums will get coerced to the "Least generic common type." Sometimes that is OK but often dangerous if you work with any property other than "Value."
Grouping refnums into clusters can avoid these coersions.
04-11-2011 04:59 PM
The only thing different is that in 4 of the arrays I am displaying 2 digits past the decimal point and and 1 digit past the decimal point in the other 4 arrays.
I didn't think something as simple as this would make the difference.
Thanks!
04-12-2011 05:33 AM
Yet, it seems to be...
I just built up the VI as attached, and there is a coercion dot with only a digits of precision difference (both elements had 1.25 entered into them).
04-12-2011 08:15 AM
Thanks, Kathryn, for confirming.
The new LabVIEW things one learns each day.