View Single Post
  #2   Spotlight this post!  
Unread 24-02-2013, 14:17
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Shooter Motors to run continuously.

There are a couple of ways to do this.

One way is to simply have
  • one button control a Case statement that sets the motor output in True to 1, but does absolutely nothing in the False case.
  • A second button do the same thing, but set the motor output to zero, but also does absolutely nothing in the False case.
  • You can tied the two case statements together to force an order in the event both buttons are pushed simultaneously, but it isn't necessary in this particular application
A second cleaner way is to use a feedback node to remember the previous value and only change the value when one of the buttons is pushed.
I'll sketch an example up. This fits into your existing scheme the easiest.
Attached Thumbnails
Click image for larger version

Name:	TwoButtonOnOff.png
Views:	48
Size:	21.5 KB
ID:	14158  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 24-02-2013 at 14:39.
Reply With Quote