View Single Post
  #1   Spotlight this post!  
Unread 19-02-2016, 22:37
Caboose's Avatar
Caboose Caboose is offline
Programmer - LabVIEW, C++, C#, Java
AKA: James Parks
FRC #0900 (Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: NC
Posts: 71
Caboose has a spectacular aura aboutCaboose has a spectacular aura about
Question Help with Armabot RS7 Talon SRX Feed-Forward Tuning

Hoping someone could help with this...

Using CTRE math in the `Speed Closed Loop.lvproj` to calculate the F value of a Armabot RS7 encoder with 12CPR on a 775pro, we are having an issue with the produced F value being too small to run the motor at the desired value.

CTRE Code.
Code:
VelocityNativeUnits = Change In Sensor / 100mS
also
VelocityNativeUnits = RPM / 600 * SensorUnitsPerRotation

Fgain = 100% X 1023 / VelocityNativeUnits , 
       where VelocityNativeUnits  is measured at 100% throttle

Mag Encoder has 4096 units per rotation.

Example: VelocityRPM is 10198 at 100% throttle
                 => VelocityNativeUnits = (10198 / 600 * 4096) = 69618
                 => Fgain = (1023 / 69618)  = 0.01469
We are setting the CPR using the Talon SRX API VI. And multiply the CPR by 4 to get the SensorUnitsPerRotation.


Since the CPR is being set the `Sensor Velocity` is returned as RPM. So to get the VelocityNativeUnits we use the second equation.

Running the motor in %vbus at 10% we get a VelocityNativeUnit of 31 so we use the equation Fgain = (1023 * 0.1) / 31 = 3.3. Trying to run this Speed mode this applies a throttle of 1%.

Am I doing something obviously wrong?
__________________
navX Labview Library

"Robots are aluminum shavings, held together by zip-ties."

myManga

Last edited by Caboose : 20-02-2016 at 14:48. Reason: Clarification of title.
Reply With Quote