|
Re: Limit Switchers Logic Problem
Quote:
Originally Posted by Bomberofdoom
What you want to do is:
- If no limit switches are pressed, do whatever the joystick says.
- if left limit switch is pressed, two cases:
a.If joystick wants to move lazy susan left, keep motors at 0.
b.If joystick wants to not move or move right(or the "else" case for a.), do as joystick wants.
- if right limit siwthc is pressed, two cases:
a.If joystick wants to move lazy susan right, keep motors at 0.
b.If joystick wants to not move or move left(or the "else" case for a.), do as joystick wants.
- if both limit switches are pressed (  ), stop motors - sirious error! (or someone is cheating  )
There's a way where you can put all of these in one big case structe, and in each case ("true" and "false") have another case structre with "true" or "false".
|
This is exactly what the vi. I posted earlier in this thread will do. It does not do the button latching he is requesting, that will need to be defined prior to my vi.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
|