LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating an Array of Clusters of Indicators Issue

It does look like the last value is repeated on the empty rows (did we just find a bug?), but it shouldn't be a problem (more than visually) since they're empty, they don't exist. If you were to use Index array and read out one outside the array i assume it's zeroed as it should?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 14
(821 Views)

Hello!

I'm new around here, first comment. But I just saw this and I found myself in the same situation some time ago.

 

What I would do: set the default value of your arrays with the elements not-initialized. When you want to display new data, clear it before with the invoke node "Reinit To Default".

 

I'm attaching one example.

 

Kind Regards,

Domingo

0 Kudos
Message 12 of 14
(809 Views)

Still your post has nothing to do with the current discussion which talks about arrays of clusters.

 

I will just add a few comments about your code.

 

You are way over-using the "Reinit to default" property. It is very rarely needed.

 

There is absolutely no reason to reinit the indicator to defaults if you write a new value to it a nanosecond later. Also writing an empty array to the "values to add" would be much more efficient by using  a local variable.

 

 

0 Kudos
Message 13 of 14
(757 Views)

Ah I see, thanks for pointing me that I didn't notice the full thing was a cluster.

 

In that case I could only recommend to use the number of rows property node (NumRows) to display from 1 to 4 when the array has less than 4 elements plus hiding the scroll bar.

 

When the array is bigger than 4 elements, then show the scroll bar (and put the NumRows in 4 if there weren't like this) thus, at least you get rid of a lot of non-initialize vectors elements. Still you will keep seeing the last elements as non-initialize (which can be workaround limiting the scroll position to not to show only the last element).

 

 

0 Kudos
Message 14 of 14
(742 Views)