LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Size Function

Hi,

 

I have a query regarding the “Array Size Function” from the array palette.

 

I knocked up the attached Vi so I could identify how many levels of CC entries I have in the table. It appears to work fine, i.e increment when you add more levels to the table, however, if I then go back and delete some entries, my “Number of PVT Samples” indicator doesn’t decrement as I expected.

 

Any ideas why?

 

Also, is there a way to be able to use a button control to clear all entries from the table at once?

 

Many thanks

 

 

 

0 Kudos
Message 1 of 2
(1,959 Views)

A table is a string array at its heart.  The reason you have more elements after adding and deleting is the difference between an array with 0 elements and an array with 10 elements that are all empty.

 

If you want to clear a table, just wire an empty string array constant to a local variable of that table control.

 

Why are you using array to cluster then unbundle to get the number of array elements?  You should be using the Index Array function.  Then you only need one function instead of two.

 

0 Kudos
Message 2 of 2
(1,950 Views)