LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array column extraction

Solved!
Go to solution

Hello

 

How can i extract different column (combinations) from an array.

I would like to have a 3 boolean array and would like to extract column 1 and 3  by pressing boolean 1 and 3 to ON state.

 

 

index array.PNG

0 Kudos
Message 1 of 8
(4,105 Views)

You can do something like this. Use boolean array to number to select different cases.array selection.png

 

edit:

didnt want to confuse you with array selection, changed the booleon array.  Arrays start at 0 so if you wanted 1 and 3 it would look like this.

array selection.png



-Matt
Message 2 of 8
(4,081 Views)

Thank you so much. It works great apart from the fact that i have to create 8 cases, which would be a problem if the size of my boolean array increases?

 

Is there a solution for that?

Thanks again

0 Kudos
Message 3 of 8
(4,060 Views)

Here is another option if you want maintainability on it.

 

array selection.png



-Matt
Message 4 of 8
(4,053 Views)

@Wolleee wrote:

Here is another option if you want maintainability on it.

 

array selection.png


.

 

You may also need a transpose array if you want the final array to be set in columns, since build array will create new rows.

Message 5 of 8
(4,051 Views)

I guess conditional autoindexing has been made exactly for this purpose... No case, no build array, no shift register. My 2011 can not make them, so I can not show...

Message 6 of 8
(4,031 Views)
Solution
Accepted by topic author zezendapuss

@Alexander_Sobolev wrote:

I guess conditional autoindexing has been made exactly for this purpose... No case, no build array, no shift register. My 2011 can not make them, so I can not show...


Very true,

 

Here is a cleaner example using alexander's suggestion, if you have the conditional tunnel mode available.

 

array selection.png



-Matt
0 Kudos
Message 7 of 8
(4,026 Views)
Solution
Accepted by topic author zezendapuss

Slightly different variation.

 

Message 8 of 8
(4,020 Views)