Go to Post lets get FIRST in every home around the world, and a robot in every school. - Rohith Surampudi [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 02-22-2011, 03:56 PM
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
All your auto points belong to us.
AKA: @doctorfogarty @UofSCFIRSTers @GarnetSq
FRC #4901 (4H Garnet Squadron Robotics)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: Columbia, SC
Posts: 1,132
JohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant future
Send a message via AIM to JohnFogarty Send a message via Yahoo to JohnFogarty Send a message via Skype™ to JohnFogarty
[FTC]: PID Control in Robot C

So say I want to push a button and this button using PID was to move a encoder to a certain position and since you are using PID it would keep it there. How do you implement PID in robotC code.
__________________
John Fogarty - University of South Carolina Electrical Engineering 16' - 16 Medals - Future Air Force Officer
(2008-13) 1102 - 1 Chairman's Award, 1 FRC Finalist Alliance, & 1 FTC Winning Alliance
(2009-13) 3864 - 1 FTC Inspire Award, 9 FTC Winning Alliances & 1 FTC World Championship
(2013) 1772 - 1 FRC Winning Alliance
(2014 - ???) 4901 - 1 FRC Winning Alliance
http://www.garnetsquadron.com/
Reply With Quote
  #2   Spotlight this post!  
Unread 02-22-2011, 10:50 PM
normalmutant's Avatar
normalmutant normalmutant is offline
Registered User
AKA: Nathan
FTC #3539 (Say Watt?)
Team Role: Alumni
 
Join Date: Apr 2010
Rookie Year: 2006
Location: Edison, NJ
Posts: 126
normalmutant has a spectacular aura aboutnormalmutant has a spectacular aura about
Re: [FTC]: PID Control in Robot C

Quote:
So say I want to push a button and this button using PID was to move a encoder to a certain position and since you are using PID it would keep it there. How do you implement PID in robotC code.
Here's basic encoder information. I think we gave it earlier when you were asking, though. http://say-watt.org/wp2/archives/391

PID wouldn't help much, from what I can tell. What you do is - when your arm or whatever thing is in the down position, set the encoder to 0, then when you press the button, have it move forward till the encoder click you want and tell it to stop.
I think that's how it works. I'm a hardware guy, so don't take my word for it. Email one of our coders at info@say-watt.org.
__________________
SAY-WATT.ORG
Reply With Quote
  #3   Spotlight this post!  
Unread 02-23-2011, 06:41 PM
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
All your auto points belong to us.
AKA: @doctorfogarty @UofSCFIRSTers @GarnetSq
FRC #4901 (4H Garnet Squadron Robotics)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: Columbia, SC
Posts: 1,132
JohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant futureJohnFogarty has a brilliant future
Send a message via AIM to JohnFogarty Send a message via Yahoo to JohnFogarty Send a message via Skype™ to JohnFogarty
Re: [FTC]: PID Control in Robot C

Quote:
Originally Posted by normalmutant View Post
Here's basic encoder information. I think we gave it earlier when you were asking, though. http://say-watt.org/wp2/archives/391

PID wouldn't help much, from what I can tell. What you do is - when your arm or whatever thing is in the down position, set the encoder to 0, then when you press the button, have it move forward till the encoder click you want and tell it to stop.
I think that's how it works. I'm a hardware guy, so don't take my word for it. Email one of our coders at info@say-watt.org.
That's not how PID functions. PID keeps you where you want to be. I've already been using PID on my FRC robot but that was LabVIEW. PID is what I want I just dont know how to write it in RobotC. I've already done it the way you are suggesting and it doesn't function the way I want.
__________________
John Fogarty - University of South Carolina Electrical Engineering 16' - 16 Medals - Future Air Force Officer
(2008-13) 1102 - 1 Chairman's Award, 1 FRC Finalist Alliance, & 1 FTC Winning Alliance
(2009-13) 3864 - 1 FTC Inspire Award, 9 FTC Winning Alliances & 1 FTC World Championship
(2013) 1772 - 1 FRC Winning Alliance
(2014 - ???) 4901 - 1 FRC Winning Alliance
http://www.garnetsquadron.com/
Reply With Quote
  #4   Spotlight this post!  
Unread 02-23-2011, 07:20 PM
normalmutant's Avatar
normalmutant normalmutant is offline
Registered User
AKA: Nathan
FTC #3539 (Say Watt?)
Team Role: Alumni
 
Join Date: Apr 2010
Rookie Year: 2006
Location: Edison, NJ
Posts: 126
normalmutant has a spectacular aura aboutnormalmutant has a spectacular aura about
Re: [FTC]: PID Control in Robot C

Okay - one of our programmers thinks he understands the problem.
When you stop the motor at the encoder click you want, you have to keep setting the power to 0 in an infinite loop. If you just set it once and stop, it won't continue to send power, thus making it fall.
...Next time i'll just ask him in the first place.
__________________
SAY-WATT.ORG

Last edited by normalmutant : 02-23-2011 at 07:39 PM.
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 06:07 AM.

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


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