LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

booelan array with different dimensions error

Hi there

 

I'm relativley new to Labview and have been trying to learn how to use it for a university project. I have ideas in my mind but am not quite sure how to execute some of them in Labview. Recently i've been playing around with boolean array in hope that I'll be able to control an array of LEDs on an arduino board.

 

Basically I'm trying to work out how I can set up an array of numbers where each element will correspond to a boolean operation eg turning an LED on or off. Trying to learn some basics, I have created a simple VI that has an array of one number (between 0-255) which is then convert to booealn and controls an array of 8 LEDs (on the front panel).  I'm trying to up the ante and have an array of two numbers or more controlling two or more rows of 8 LEDs. It seems simpled enough to me but I cant get it to work. I get the error "you have connected to arrays of different dimensions". If I change the dimensions I that error goes away, but then I get a new error saying "you have connected two terminals of different types" and that "The type of the source is 1D (sub)array of unsigned long [32-bit integer (0 to 4,294,967,295)]" and "The type of the sink is unsigned long [32-bit integer (0 to 4,294,967,295)]".

 

I'm really having trouble figuring this one out, can anyone please provide with me some assistance. I have provided the VI for you to inspect.

 

Cheers

Dimitri

0 Kudos
Message 1 of 7
(3,592 Views)

If you use index array on a 2D array and leave one of the indices disconnected, you get an entire row or colum. To get a single element, wire both indices.

0 Kudos
Message 2 of 7
(3,587 Views)

Hi altenbach

 

Thanks for your reply. I have tried wiring the column index but I still recieve "The type of the source is 1D (sub)array of unsigned long [32-bit integer (0 to 4,294,967,295)].The type of the sink is unsigned long [32-bit integer (0 to 4,294,967,295)]."

 

Am I going about what I'm trying to do the right way??

 

 

0 Kudos
Message 3 of 7
(3,556 Views)

You need to wire both indices.

0 Kudos
Message 4 of 7
(3,545 Views)

i've tried wiring both indices to 0 and I get the original error saying "you have connected to arrays of different dimensions"

0 Kudos
Message 5 of 7
(3,534 Views)

If I understood you right, you want to have an array of numbers, to convert into binary representation. Therefore you need ONE dimentional array of numbers, and TWO dimentional array of booleans (one row for each number). 

If so - check out the attachment

0 Kudos
Message 6 of 7
(3,506 Views)

@dmtzbz wrote:

i've tried wiring both indices to 0 and I get the original error saying "you have connected to arrays of different dimensions"


Well, I don't. Please show is your code again.

 

0 Kudos
Message 7 of 7
(3,489 Views)