Go to Post FIRST games are complex and rely on design and intellectual capability much more than the average sport. - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 30-04-2012, 00:23
Tanaythan's Avatar
Tanaythan Tanaythan is offline
Programmer
AKA: Tanay Nathan
FRC #3256 (Warriorborgs)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2010
Location: San Jose
Posts: 27
Tanaythan is an unknown quantity at this point
Re: Robodox Guide to velocity control using PID

I've been thinking of a different way to control the velocity of a spinner using PWM and the basic GetRate() function of an encoder. It starts of with a while loop and the shooter motor.
Code:
while(encoder->GetRate() <= setpoint) {jag->Set(i); i+= .001}
This way, it ramps up, but the only fear I have of this method is that I am unfamiliar with the way GetRate() works. If it gets back data per second, then we have a problem with this formula. If it works like the CANJaguar feature, there should be no problems with this method.

Note: We used CANJaguars this year and plugged the encoder into the Jaguar itself to use the Speed PID feature.
__________________
Tanay Nathan
Programmer
Team #3256 Warriorborgs
Reply With Quote
 


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 17:39.

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