Current Control Mode on Falcon 500 through CTRE's HERO Development Board

Hi there! I’ve been having trouble programming a Falcon 500 to run based on current-based PID from CTRE’s HERO development board (picture below). With the same board I can get a Velocity PID to work just fine. I’ve also been able to get a Current PID to work when connected to a roboRIO before, but I lost the code I used to achieve that, and I think I am missing a small but crucial piece of code to make it work. The code is written in C# but the CTRE.Phoenix library for this board is basically identical to the one used in FIRST.

Currently I’m just doing some tests, so my code is all written from this example code for the board I’m working with. The only things I’ve changed from that code is the motor controller object type (from TalonSRX to TalonFX), the controlmode in the “_talon.Set” function (from ControlMode.Velocity to ControlMode.Current), and replaced the variable “targetVelocity_UnitsPer100ms” in the same “_talon.Set” function with 1500 (milliamps).

After this, I set all of the PID constants (at bottom of the code) to zero, and started following the guide for Current-based PIDs here, but none of the PID values I tried would budge the motor at all.

Any tips, links, example code, or any other kind of help would be greatly appreciated!! I’ve been stuck on this for a while.

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