Go to Post Don't let Dean's homework assignment enter into the equation; his homework is about spreading his organization and has nothing to do with you doing what you want to do. - jonathan lall [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
  #1   Spotlight this post!  
Unread 18-12-2007, 10:54
billbo911's Avatar
billbo911 billbo911 is online now
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Using a limit switch to limit motion

EDIT: Please ignore my comments below, they DO NOT apply to Vex, only to FRC. Thanks to Alan for pointing out my error.


All of these methods work well. Each has it's own advantages, but......

For the sake of sheer convenience, the default code already has built into it, motor limit switch inputs. If you simply set a motor to 127 when it hits the limit, you will never be able to back it out until you power down. So, the limits in code prevent the motor from turning in one direction, while allowing motion in the other. There is a pair of limits for each motor, one for each direction. All you need to do is connect a limit switch to the correct digital input and position the switch where it is needed.
These are documented in one of the IFI manuals for the RC/OI. Get all of the manuals when you go to IFI, they are well worth it!
__________________
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

Last edited by billbo911 : 18-12-2007 at 11:29. Reason: I missed a very important point. The question is for Vex.
  #2   Spotlight this post!  
Unread 18-12-2007, 11:09
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Using a limit switch to limit motion

Quote:
Originally Posted by billbo911 View Post
For the sake of sheer convenience, the default code already has built into it, motor limit switch inputs...These are documented in one of the IFI manuals for the RC/OI. Get all of the manuals when you go to IFI, they are well worth it!
How does one use the IFI-documented limit_switch() functions in EasyC?
  #3   Spotlight this post!  
Unread 18-12-2007, 11:27
billbo911's Avatar
billbo911 billbo911 is online now
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Using a limit switch to limit motion

Quote:
Originally Posted by Alan Anderson View Post
How does one use the IFI-documented limit_switch() functions in EasyC?
Dang... I need to clean my glasses. I completely missed that.
Worst of all, it makes all the difference in the world. I guess I need to edit my post.
Thanks for catching me with my pants down.
__________________
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
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a limit switch thunderbolt Programming 1 02-04-2007 19:36
limit switch wedellm Electrical 4 16-02-2007 13:01
Limit Switch Basics JWSnedden Programming 6 30-11-2006 19:48
Limit switch in easy c? chadbarbe Programming 6 02-02-2006 09:51


All times are GMT -5. The time now is 17:57.

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