Go to Post Use checklists. If it's good enough for NASA, it's good enough for FIRST. - Rick TYler [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-17-2012, 10:58 AM
heya101 heya101 is offline
Registered User
FRC #3699
 
Join Date: Mar 2011
Location: Minnesota
Posts: 11
heya101 is an unknown quantity at this point
Multiple Inputs for a Motor

So our team wanted a backup system for our shooter which would be controlled by the throttle(knob) on the joystick. I can wire this up fine, but I'm wondering how I'd incorporate the code for when I want the shooter to set its speed automatically by the distance, since the motors would then receive two conflicting inputs.

Say the throttle is set at 0 speed, but I press the button for the automatic shooting, saying we need about .5 speed to get in the basket, how would I have the code make this override the throttle input?
Reply With Quote
  #2   Spotlight this post!  
Unread 03-17-2012, 11:44 AM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 9,126
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Multiple Inputs for a Motor

Quote:
Originally Posted by heya101 View Post
Say the throttle is set at 0 speed, but I press the button for the automatic shooting, saying we need about .5 speed to get in the basket, how would I have the code make this override the throttle input?
The button selects either the "button speed" or the "non-button speed".
Attached Thumbnails
Click image for larger version

Name:	button select speed.png
Views:	28
Size:	15.1 KB
ID:	12335  
Reply With Quote
  #3   Spotlight this post!  
Unread 03-17-2012, 11:47 AM
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Re: Multiple Inputs for a Motor

Just copy and paste this into wherever. Wire up your auto-shooter speed to BOTTOM (I did this too quickly), and manual speed control to TOP. That way, when button is pressed, the Auto Speed control is overridden.
Attached Thumbnails
Click image for larger version

Name:	motoor speed choice.png
Views:	18
Size:	13.6 KB
ID:	12336  
__________________
Mentoring:
1) Educating students on the ability to learn and have fun at the same time.
2) Giving back to those who made you who you are.

2009-2011 Student 2405 Electrical/Programming & Asst. Captain
2012-???? Mentor 2405 Programming/Jack-of-all-Trades
Reply With Quote
  #4   Spotlight this post!  
Unread 03-17-2012, 11:48 AM
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Re: Multiple Inputs for a Motor

You're fast, Ether!
__________________
Mentoring:
1) Educating students on the ability to learn and have fun at the same time.
2) Giving back to those who made you who you are.

2009-2011 Student 2405 Electrical/Programming & Asst. Captain
2012-???? Mentor 2405 Programming/Jack-of-all-Trades
Reply With Quote
  #5   Spotlight this post!  
Unread 03-17-2012, 12:35 PM
heya101 heya101 is offline
Registered User
FRC #3699
 
Join Date: Mar 2011
Location: Minnesota
Posts: 11
heya101 is an unknown quantity at this point
Re: Multiple Inputs for a Motor

Thanks a lot, was exactly what I was looking for.
Reply With Quote
Reply


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


All times are GMT -5. The time now is 10:10 PM.

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


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