Can I input a % output to a Talon SRX that is running closed loop velocity PID?

I’m trying to do some programming (Java) from home on our robot, so I can’t test this myself. I have recently figured out how to get the SRX motor controllers running the velocity control mode.

motor.set(TalonSRXControlMode.Velocity, kVelocity);

I want to know if I can put a percent output into the code later on in order to do some basic non-PID things, such as this:

motor.set(TalonSRXControlMode.PercentOutput, 0.20);

Will this destroy my PID closed loop when I try and go back to velocity control mode?

You will need to change the control mode. However, assuming you’ve set the PID constants to be saved in the SRX, just change back to velocity mode and send your normal velocity commands whenever you like.

What’s driving you to want to switch modes? Couldn’t you just command 20% of max velocity and get the same result?

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