how to temporally set a CAN Motor Controller to NOT follow

When declaring motor controllers we set our controlers to _slave.follow(_master); How can we temporally set the motor to independent if we wish to isolate them to test rotation and functionality without modifying the code.

It may look like. sudo code

  _masterTalon = new TalonSRX(1);
  _slaveTalon = new TalonSRX(2);


public void test_slaveTalon (double speed){

//Call this to reenable follow on slaveTalon when done
public void set_slaveTalonFollow(){

Set a different mode as described e.g. in section 3.3 of the software manual.

_slaveTalon.Set(ControlMode.PercentOutput, 0);

Will turn the slave talon off. (You will likely also want to set coast mode if it isn’t in that already.)


That makes sense. I was to close to the problem to see the answer. Seeing that the _slave was set to follow in its own method I missed the fact this is like calling a different control mode could possibly take the motor back.

The point of setting it to coast also points out a angle I missed. If there are multiple motors in the system all of them should be set to coast it only one is going to be powering the system.

On the topic, we find it a good practice to put every Talon back into follower mode at the start of auto and tele so that

A) if we do any individual controller testing systems act normally when we go back into tele control


B) anything really weird happens on the CAN bus, we’re safe (I’ve heard some horror stories of some weird FMS* stuff knocking peoples Talons out of follower mode) (its too easy to not do)

*not sure it was FMS, I never got a full explanation, only overheard talk of the issue

Thanks for mentioning that. It was on my radar already but having a list of preset and a configure method to set everything. Do you place this reset in the Autoinit() and teliopinit()

IIUC, the previous set call is continuously sent to the motor controllers periodically. This should include the Follower mode.