Go to Post The only thing "an eye for an eye" has ever settled is two eyeless people. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2016, 20:51
narmality_rules's Avatar
narmality_rules narmality_rules is offline
Jack of all trades
AKA: Graham Cochrane
FRC #0296 (Northern knights)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Montreal
Posts: 5
narmality_rules is an unknown quantity at this point
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!
  #2   Spotlight this post!  
Unread 15-02-2016, 21:00
JacobD's Avatar
JacobD JacobD is offline
Registered User
AKA: Jacob
FRC #1672 (Mahwah Robo T-Birds)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2013
Location: New Jersey
Posts: 97
JacobD is an unknown quantity at this point
Re: Position control without CAN?

Yeah you can, use a PID control loop. https://wpilib.screenstepslive.com/s...rs-pid-control
__________________
SolidWorks CAD
AutoCAD
Java
  #3   Spotlight this post!  
Unread 15-02-2016, 21:39
SamcFuchs's Avatar
SamcFuchs SamcFuchs is offline
Programmer
AKA: Sam Fuchs
FRC #0236 (TechnoTicks)
Team Role: Programmer
 
Join Date: Aug 2015
Rookie Year: 2014
Location: Old Lyme, Connecticut
Posts: 58
SamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud of
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.
__________________
Sam Fuchs
236 TechnoTicks, Old Lyme, CT

2015 - Programming, Electrical
2016 - Lead Programmer, Co-Driver
2017 - Lead Programmer, Co-Driver
  #4   Spotlight this post!  
Unread 16-02-2016, 01:01
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi