Go to Post "As president, I believe that robotics can inspire young people to pursue science and engineering. And I also want to keep an eye on those robots in case they try anything." Barack Obama - Ted Weisse [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 35 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 02-22-2011, 03:56 PM
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
Buying all the 221 Sprockets
AKA: @doctorfogarty @GarnetSq
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,525
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
[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
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
"Head Bot Coach" FRC Team 4901 Garnet Squadron

Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1102, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
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
Buying all the 221 Sprockets
AKA: @doctorfogarty @GarnetSq
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,525
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
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
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
"Head Bot Coach" FRC Team 4901 Garnet Squadron

Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1102, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
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 03:19 AM.

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


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