Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Position control without CAN? (http://www.chiefdelphi.com/forums/showthread.php?t=143935)

narmality_rules 15-02-2016 20:51

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!

JacobD 15-02-2016 21:00

Re: Position control without CAN?
 
Yeah you can, use a PID control loop. https://wpilib.screenstepslive.com/s...rs-pid-control

SamcFuchs 15-02-2016 21:39

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.

Alan Anderson 16-02-2016 01:01

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