Go to Post ...next years game will hopefully make my head hurt, this years did. - Michael Leicht [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 02-02-2017, 17:54
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: 551
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Setting PID constants in code for TalonSRX Velocity Control

Quote:
Originally Posted by KrazyCarl92 View Post
Depending on your application, you may actually want:

_talon.configPeakOutputVoltage(0.0f, -12.0f);

in the case that you only want it to spin in the 'reverse direction' and never apply 'forward' voltage. If you realize you're driving your car faster than you want on the highway usually you just let off the gas, not throw the engine into reverse.
Capping the output to one direction is perfectly legitimate. However depending on the Fgain, you may not get a direction change caused by being under the target velocity. This happens when the F term provides most of the motor output, and the PID simply tweaks the output to approach the target speed.

This is ideal for applications where you want both directions, such as drive wheels. Here's an example of a team using speed servo all the time on four mecanum wheels...
https://www.chiefdelphi.com/forums/s...+talon+sp eed

Notice our velocity walkthrough in the Talon SRX Software Reference Manual does not require you to enforce only driving in one direction.
Reply With Quote
 


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 15:29.

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