Go to Post But please take into account that each year, the GDC has to come up with a rule book that will spend the next three months being picked apart by 40,000 of the brightest, most creative minds on the planet. I think they do an outstanding job of it. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 05-02-2006, 15:35
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,795
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Motor Limits

The limit switches will be listed as "micro switches" in a catalog or at Radio Shack. Digikey and Mouser both have tons of different types. On a really important application, back up a pot with a limit switch set (mounted) to the absolute farthest travel you can allow. The pot works but might not stop a fast moving motor in time to prevent damage.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #17   Spotlight this post!  
Unread 05-02-2006, 23:36
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: Motor Limits

Okay, so we got his code from Salad

Quote:
If your motor was hooked to pwm01 you'd use...

Limit_Switch_Max(rc_dig_in01, &pwm01);
Limit_Switch_Min(rc_dig_in02, &pwm01);
Where in the code would you put this? And is this all you would need to get it to work properly?
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
  #18   Spotlight this post!  
Unread 06-02-2006, 00:15
ForgottenSalad's Avatar
ForgottenSalad ForgottenSalad is offline
In search of a home...
AKA: Michael Wessler
no team
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Bethlehem, NH
Posts: 136
ForgottenSalad will become famous soon enoughForgottenSalad will become famous soon enough
Send a message via AIM to ForgottenSalad
Re: Motor Limits

Quote:
Originally Posted by Idaman323
Okay, so we got his code from Salad

Code:
If your motor was hooked to pwm01 you'd use...

Limit_Switch_Max(rc_dig_in01, &pwm01);
Limit_Switch_Min(rc_dig_in02, &pwm01);
Where in the code would you put this? And is this all you would need to get it to work properly?
I don't exactly know why that code wasn't working for us (although it's probably something stupid and obvious that I'm missing) but all it was doing was slowing down our motors when they hit the limit switches instead of stopping them. If someone would please clear that up it would be greatly appreciated by me and I'm sure by Idaman as well.

NOTE: Yes, our speed controllers are calibrated.

Last edited by ForgottenSalad : 06-02-2006 at 01:57.
  #19   Spotlight this post!  
Unread 06-02-2006, 08:02
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,307
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Motor Limits

That should be the code to stop them. We have it in the code, but haven't tested it yet.

When hit, the limit switch should only stop your motor from moving in one direction, unless their was an error made programming it.

What pwms and inputs are you using when it's not working properly? I keep hearing bad things about pwms 13-16, if you're using one of those try a different one.
  #20   Spotlight this post!  
Unread 06-02-2006, 20:56
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: Motor Limits

Hmm, does that get put some where in the user_routines.c file? If so, what section of it? I woudl liek to see how it works with our motors. Thanks
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
  #21   Spotlight this post!  
Unread 07-02-2006, 00:08
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,307
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Motor Limits

The call to the limit switch function can be put where ever you like it (this will be in a function called in user_routines.c or directly in there), just make sure that it is called AFTER the other code you use to set pwm values. It makes no sense to limit your motor so it can't drive further, then to command it to drive beyond it afterwards, since the last command will be the one the motor sees.
Closed Thread


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 20:59.

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