Go to Post I think that's what they think you will think, therefore you are thinking what they want you to think. - Wetzel [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-02-2015, 20:46
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is offline
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 822
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Talon SRX closed loop tolerance band?

Is there a way to set a tolerance band for closed loop mode on the SRX?

+/- 10 encoder tics is plenty close enough for what we're doing and I'd rather not have the SRX trying to drive the motors when we're that close to the setpoint.
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2015, 11:17
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,112
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: Talon SRX closed loop tolerance band?

Quote:
Originally Posted by Ty Tremblay View Post
Is there a way to set a tolerance band for closed loop mode on the SRX?
I assume you have read the TALON SRX Software Reference Manual.

You can clear the Integral Accumulator when your code determines that the feedback value is "close enough" to the set point. Or you can just not use an Integral term at all, and rely on a well-chosen Proportional gain to get the motor near where you want without overshooting.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2015, 21:23
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Talon SRX closed loop tolerance band?

Quote:
Originally Posted by Alan Anderson View Post
I assume you have read the TALON SRX Software Reference Manual.

You can clear the Integral Accumulator when your code determines that the feedback value is "close enough" to the set point. Or you can just not use an Integral term at all, and rely on a well-chosen Proportional gain to get the motor near where you want without overshooting.
Bingo.

I'll just add a bit more. Traditionally it's the integral component of the PID response that causes continual movement even though you are close enough. So Alan is right suggesting clearing IAccum will likely meet your expection.

But if for some reason you wanted zero drive completely, you are always free to check GetCloseLoopErr() and if it's within tolerance, you can change the mode to kNoDrive in order to neutral the motors. (See section 5.1 for example accessor).

Also for things like drive servo in auton, normally you want to servo to PosX, then when you are close enough, move on to do the next servo/arm/whatever. Calling GetClosedLoopErr() is the best way to know if you are closed enough to your target.
Reply With Quote
Reply


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 07:06.

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