To you - I pledge my calculators, my codes, and my safety glasses. I'll be your Super Nerd forever!
Home
Go Back   Chief Delphi > Technical > Programming
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 Yesterday, 02:54
ollien ollien is offline
Registered User
FRC #5202
 
Join Date: Feb 2015
Location: United States
Posts: 358
ollien is just really niceollien is just really niceollien is just really niceollien is just really nice
Re: encoder PIDController and set

1. If your wheel RADIUS is 10cm, then you should set setDistancePerPulse(10 * (2 * pi)/PULSES_PER_REVOLUTION). GetDistance will then get the total distance in cm and getRate will get the total cm per second.

2. Use ppr. The reason your values don't make sense is because you used circumference instead of radius.

3. I was never too sharp on this, but I BELIEVE 4X will result in you getting your ppr, while 1X will get you your cpr. In other words, you will get 1440 pulses with 4X and 360 pulses with 1X. I might have them flipped though.

4. Depends on what your PID controller is controlling. If it's controlling speed, sure. This purely depends on if you're feeding rate or distance into your PID controller.

EDIT: Major math error on my part. It should be 10*(2*pi)/PULSES_PER REVOLUTION

Last edited by ollien : Yesterday at 03:23. Reason: I made a math error.
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 15:31.

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