|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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
![]() 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? Last edited by Caboose : 20-02-2016 at 14:48. Reason: Clarification of title. |
|
#2
|
||||
|
||||
|
Re: Armabot RS7 Talon SRX Feed-Forward Tuning
Use the self-test to confirm the native velocity as seen by the Talon.
Also I would avoid using the config-encoder-cpr VI and use native units in your LV app, see section 21.25 for the details |
|
#3
|
||||
|
||||
|
Re: Armabot RS7 Talon SRX Feed-Forward Tuning
This seems to work, thanks.
|
|
#4
|
|||
|
|||
|
Re: Armabot RS7 Talon SRX Feed-Forward Tuning
We were bitten by the div by four sensor feature. It didn't cause issues with our F calculation, but we noticed it and thought is was rollover.
I've been meaning to ask you why that feature exists in the LV version. Do we need these things exposed? Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|