LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

switching between arrays

Solved!
Go to solution

Hi I have two arrays and I am trying to hook up a control that chooses one or the other, I am having issues doing this. Could someone lend some help?

 I have my block diagram and front panel attached.

0 Kudos
Message 1 of 6
(2,676 Views)
Solution
Accepted by topic author Adam_Keller

Try using SELECT FUNCTION.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


Message 2 of 6
(2,668 Views)

Yep, the Select function is exactly what you are looking for.  It is hiding in the Comparison palette.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 6
(2,659 Views)

Perfect exactly what I was looking for!

Thanks for the quick replies!

0 Kudos
Message 4 of 6
(2,650 Views)

And if you have more than two arrays, use a case structure with N cases instead and hook it up to an enum, for example. 😄

0 Kudos
Message 5 of 6
(2,646 Views)

I would use Swap instead of Select in this case (I almost never use Select these days).  It is faster, especially for arrays and composite data types.  Added bonus: you can choose which output to use depending on the logic of the swap? input, often eliminating wire crossings or an added Not operation.

0 Kudos
Message 6 of 6
(2,625 Views)