Programming Current Limiting for TalonFX - Java

Hi,
I was wondering how you configure current limiting on the new TalonFXs?

I’ve been trying the typical

        motor.enableCurrentLimit(true);
        motor.configContinuousCurrentLimit(35);
        motor.configPeakCurrentDuration(250);
        motor.configPeakCurrentLimit(50);
        motor.configOpenloopRamp(.4); 

and it doesn’t work
I think I need to use motor.configGetSupplyCurrentLimit(); but I don’t know what to pass through it.

Thanks in advance.

1 Like

The Talon FX Class uses the new Current Limiting API. It’s a single call that takes a “CurrentLimitConfiguration” object with all of your current limiting parameters.
https://phoenix-documentation.readthedocs.io/en/latest/ch13_MC.html#new-api-in-2020

The calls mentioned in the documentation are here:
configSupplyCurrentLimit
configStatorCurrentLimit

The Supply Current Limit is the current limit you’re used to - the current going into the motor controller that you typically want to limit to prevent breaker trips.

The Stator Current Limit is new for Talon FX/Falcon to be able to limit the current draw of the motor itself.

4 Likes

Thank you that helped. Marked

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.