Take a look at the three options here. You can choose coast, brake, or hold.
http://help.vexcodingstudio.com/#cpp/namespacevex/classvex_1_1motor/setStopping
I’m interested to know if you can turn the internal PID off completely which is a bit different to coast mode.
With IQ motors, you can’t which I guess was a conscious decision made by VEX for simplicity.
Ok that looks good, I haven’t seen that yet and just wondered how it would/not work for my flywheel if when you shut off the power they ground to a screeching halt.
@calvc01 I can confirm, there is no disable switch on the internal PID.
@robotguy When you use stop without arguments it will use the default stopping mode set by setStopping(brakeType mode). Commands that stop themselves upon reaching some goal like rotateTo and rotateFor always end by holding and are not affected by setStopping. But rotateTo and rotateFor are not likely the commands to use for a flywheel, so you should be unaffected by that quirk.
You can just use direct PWM/power mode to control the motors without PID.
What’s the command for that Tabor?
I am not sure if it exists in VCS. Its here on the PROS docs
https://pros.cs.purdue.edu/v5/api/cpp/motors.html#move-voltage
Thanks. I’m not sure there is an equivalent in VCS.
Yup I looked into it and neither RMS nor VCS expose the functionality. I guess its a PROS only feature.
I’d definitely want to thoroughly test that command with a motor I didn’t care about first to make sure it doesn’t also bypass the internal current limitations.
That’s what the beta motors are for. I’ll give it a good whirl next week with PROS.
Driving using VCS feels really odd and I’m pretty sure it’s because of the PID. Without it, a slight negative input on the stick gives a slight negative value to the motor which just slightly increases the braking.
With the PID in the same circumstances, the motor tries it’s hardest to get to that slightly negative speed rather than just applying a bit of braking. It makes driving a whole different experience.
In times past I’ve played around with manipulating joystick inputs to produce similar results: a small deadband, outside of which the motor immediately jumps to a value empirically determined to just barely overcome static friction. With velocity PID being the norm for V5, all it takes now is the usual good-practice deadband followed by whatever scaling function you prefer. It’s really quite nice to drive once you get used to it. And, perhaps most importantly, it keeps your motors from whining at you! Velocity PID definitely makes deadbands more important than they used to be.
Yes, the velocity PID will make controllers feel different, but that’s just a slight relearning like you might relearn from one version of a video game to a new version. You have to relearn your different buttons and joystick commands anyway because the new robot is unlikely to be controlled identically to your previous one. So that shouldn’t be a big deal.
This does bring up two issues:
- As @John TYler mentioned, you’ll want to set a deadband for your sticks.
- If you’re using buttons, you want to pay close attention to how you have setStopping if it applies. It won’t always apply. For instance, maybe pressing a button moves motors until a certain point. But if pressing buttons provides the motors some speed value, with the final else being 0, you want to be sure you know what the motors will do with that 0.
The
pros::Motor::move_voltage()
function still obeys the current and temperature limits of the motors.