|
CANTalon getEncVel update rate
So, in order to aid with PID tuning we log our encoder readings to a file on the roboRIO. The subroutine that writes values to our log file is called from a command that is run by the scheduler in the main robot loop. Previously, we had used CANTalon.getEncVel to log the velocity readings - but we were constantly perplexed because, when doing this, the update rate of the recorded velocity value appeared to be significantly slower than the frequency of the main loop, resulting in plots which looked "step-like" (there'd be 5 constant data points, and then a change in value, and then 4 more data points at the new value, etc).
Today, on a hunch, we changed the logging function to call CANTalon.getSpeed, instead, and the problem went away.
Has anyone else noticed anything like this? It seems bizarre that any of the CANTalon methods would update at a rate slower than the roboRIO's 50hz main loop, given how fast the Talon control loop runs.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"
Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
Last edited by Oblarg : Yesterday at 21:15.
|