The TalonFX is the motor controller used to control Kraken X60's and Falcon 500's
{% embed url="https://wcproducts.com/products/kraken" %}
{% hint style="warning" %}
If you are using Falcon 500 v2 (which are effectively discontinued) make sure that you apply the loctite fix described here!
https://content.vexrobotics.com/vexpro/Falcon/217-6515-753-Falcon500-V2-Upgrade.pdf
{% endhint %}
They are commonly used as drive motors since they can be more powerful and efficient than REV NEO's.
import com.ctre.phoenix6.hardware.TalonFX;
import com.ctre.phoenix6.controls.DutyCycleOut;
TalonFX motor = new TalonFX(10);
motor.setControl(new DutyCycleOut(1.0)); // 100% full speed positive.
This device can be upgraded via CTRE Tuner X.
{% embed url="https://v6.docs.ctr-electronics.com/en/latest/docs/tuner/index.html" %} Tuner X install and documentation {% endembed %}
{% embed url="https://pro.docs.ctr-electronics.com/en/stable/docs/hardware-reference/talonfx/index.html" %} Official Documentation source {% endembed %}
Pay close attention to the LED status code to help you debug this at any time. Remember that any settings changed in Tuner X for the Talon FX are overwritten on startup of YAGSL.
- Set all TalonFX's to unique CAN ID's.
- Update all TalonFX's to the latest firmware.
- The TalonFX rotates the motor counterclockwise positive. (Invert the TalonFX programmatically if it does not rotate counterclockwise positive).
- Tune the PID value's for one drive motor.
- Tune the PID value's for one steering/azimuth/angle motor.
The following example is one for a module configuration file, e.g. frontleft.json
, frontright.json
, backleft.json
, and backright.json
.
{
"drive": {
"type": "talonfx",
"id": 5,
"canbus": null
},
"angle": {
"type": "talonfx",
"id": 6,
"canbus": null
},
"encoder": {
"type": "cancoder",
"id": 11,
"canbus": null
},
"inverted": {
"drive": false,
"angle": false
},
"absoluteEncoderOffset": -18.281,
"location": {
"front": -12,
"left": -12
}
}