Go to Post Robots can be fixed, glory is forever - Brandon Holley [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 30-01-2010, 18:42
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Best way to check multiple Boolean values?

In your program you need to check which button out of a couple of buttons, say, on a joystick, is currently pressed. Depending on which one it is you return a different value. So basically checking which of the multiple boolean values is true. What are some ways to do this, specifically in LabVIEW?

There's always the old "check one, if false, check the next, repeat." (a whole bunch of if...else statements in C). But in LabVIEW this means putting a lot of Case structures within themselves, which is a major pain especially if there are a lot of values/buttons to check.

Is there maybe a way to put all the button values into an array, search for a true or 1, and return which index it was? I don't think there's a "search array" VI.
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Way Of Scoring? KingBK General Forum 18 05-01-2009 21:08
Best way to detect a bot dpeterson3 Electrical 24 04-01-2009 14:56
Best Way to Get Points SSMike Rules/Strategy 54 09-01-2008 16:46
Best way to start Torboticsmember Programming 4 06-02-2007 12:27
Best way to make money! SPDEXL Fundraising 17 21-07-2003 01:19


All times are GMT -5. The time now is 11:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi