View Single Post
  #4   Spotlight this post!  
Unread 16-01-2011, 23:45
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Multiple outputs

Quote:
Originally Posted by MotorHead View Post
Read each button and put into a binary array. Then convert the array to a number. Your select case can then test for which number shows up. If you are watching four buttons, there would be a possible 16 cases. But since you probably only need to detect if one button is pressed, your test cases would be 1, 2, 4, 8.
If I really had to do something like this, I would make a subvi, using a typedef'ed enum. This enum would then be used on the case selector with the output options/code. This would allow future changes pretty easily.

Quote:
Originally Posted by Joe Ross View Post
One way I like to do this is to use multiple selects. ... This assumes that only one button will be pressed at a time.
I have to say that this would become hard to follow whenever extra code is added. It would also be very difficult to scale, and modify into the future. (Like on competition day)
__________________
Mike B
Reply With Quote