![]() |
Position control without CAN?
Hello,
I'm curious to know if it's possible to keep something in a position even if force is applied (such as gravity) with only a Victor SP and encoder. Any help with the code is also welcome. Thanks! |
Re: Position control without CAN?
Yeah you can, use a PID control loop. https://wpilib.screenstepslive.com/s...rs-pid-control
|
Re: Position control without CAN?
Jacob's answer is good. You could also use a standalone PID controller (rather than wpilib's subsystem). Lots of teams have written PID controllers, but I'm going to stick in a plug for mine.
|
Re: Position control without CAN?
You only need PI control for keeping an arm in place. D isn't likely to help, so you can ignore it and keep its calibration constant at zero.
If you need to hold position against gravity, you might run into problems with overheating a stalled motor. A more sustainable solution is to use a counterweight or spring to oppose the force of gravity, so the motor doesn't have to be providing continuous torque at zero speed. |
| All times are GMT -5. The time now is 00:43. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi