LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to maintain data in a boolean array

Solved!
Go to solution

@Gombak wrote:

 

There are 8 elements in the Boolean and 8 elements of the numeric control array as well


No, there are only five elements in the boolean array. Why don't you resize the container so eight elements show and see for yourself? (Only 5 are there, the others are greyed out). As I said, use "initialize array" to avoid all confusion. (you can also click the eight element on the boolean array diagram constant twice to make the array larger. (the first click makes the last boolean true and resizes the array, the second click makes it false again, but keeps the array at size=8)

 

 

(for those who are confused, he's now actually talking about my answer in this thread)

0 Kudos
Message 21 of 28
(819 Views)

yes I got what you mean by 5 elements .... you don't consider the ones with gray colour ...
I did resize them but the problem still the same I don't know why it works only for 5 elements 

 

I don't know where to use the initialize array .... I tried so that the output of the initialize array becomes the input for 1D search array ... but error occurs ... what is the purpose of the initialize array 

0 Kudos
Message 22 of 28
(814 Views)

... then show us your new code if you still have problems. you also might consider reading the help for some functions.

 

As I said, it is not sufficient to resize the array container, you also need to make the array longer. Did you?

 

0 Kudos
Message 23 of 28
(801 Views)

I removed the Boolean then put it again .... and I am using 12 elements of array but only 5 work 

0 Kudos
Message 24 of 28
(791 Views)

I was talking about the boolean array diagram constant. It still only has 5 elements. (see picture)

resizing an indicator has no effect, of course.

 

0 Kudos
Message 25 of 28
(785 Views)

An here's how you would use "initialize array" to create a boolean array with 8 FALSE elements.

 

 

0 Kudos
Message 26 of 28
(782 Views)

The array constant that you use to initialize the shift register has only 5 elements.  Rather than a constant you might be better off using Initialize Array. Then you only need to change the size constant to change the number of elements in the array.

 

You should also use the same representation for Array as you use for USER.  Because the Search array looks for exact matches, integer data types are a better choice.

 

Lynn

0 Kudos
Message 27 of 28
(780 Views)

altenbach ,johnsold
Thank you so much 
it solved the problem ... it is great 

0 Kudos
Message 28 of 28
(767 Views)