Thread: encoder uneven
View Single Post
  #4   Spotlight this post!  
Unread 21-02-2012, 13:13
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: encoder uneven

Quote:
Originally Posted by therealman1 View Post
Have you looked at the output of the encoder and is it sufficiently noise free and accurate?

it is not noise free. that is the main problem.

4x 2x or 1x ?
4x
What is the encoder speed? There is a limit to how fast the FPGA can count.

Try using 1x. You don't need 4x for the high speed of a shooter wheel.

If that signal isn't quiet enough, then do this:

instead of using GetRate(), read the encoder counts (still using 1x) instead, subtract the previous counts [see footnote] , and divide that by the sample time. Then scale appropriately.


Quote:
anything else?
Yes:

Quote:
What device is the PID controlling?
shooter drive motors. two jags, connected by a splitter cable
Are these identical motors, and are their outputs mechanically linked so they are at the same speed?

Quote:
Is the PID in cRIO or a Jaguar?
cRIO
Home-brew or WPI library?


Quote:
What are your P, I, and D gains?
we are setting them. we varry p, while i and d remain at 0

Speed, linear position, or angle?
speed
Are you integrating the output of the PID?


Quote:
What scaling are you using for the setpoint and process variable?
all parts are -1-1
What do you mean by "-1 -1"


footnote: or do this: read the encoder counts, divide that by the sample time, then reset the encoder counts to zero. I don't know how long it takes the encoder counts to overflow


Last edited by Ether : 21-02-2012 at 13:37.
Reply With Quote