取消
显示结果 
搜索替代 
您的意思是: 

switching between arrays

已解决!
转到解答

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 项奖励
1 条消息(共 6 条)
3,444 次查看
解答
已被主题作者 Adam_Keller 接受

Try using SELECT FUNCTION.


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

 Make your LabVIEW experience more CONVENIENT.


2 条消息(共 6 条)
3,436 次查看

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



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
3 条消息(共 6 条)
3,427 次查看

Perfect exactly what I was looking for!

Thanks for the quick replies!

0 项奖励
4 条消息(共 6 条)
3,418 次查看

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 项奖励
5 条消息(共 6 条)
3,414 次查看

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 项奖励
6 条消息(共 6 条)
3,393 次查看