Go to Post The moral of this story: A healthy respect for the customer, dedication to your job, and a positive outlook can make even the most trivial and monotonous job into a wonderful experience. - Molten [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
  #1   Spotlight this post!  
Unread 15-01-2015, 15:45
marcusb258 marcusb258 is offline
Registered User
FRC #2601
 
Join Date: Jan 2013
Location: New York
Posts: 4
marcusb258 is an unknown quantity at this point
PIDController help

We've been experimenting with the PIDController class in WPILib. So far, we were able to get our motors spinning, but because of the amount of switching back and forth around the setpoint, the motors end up cycling a lot, dangerously. In order to remedy this, we attempted to use the setAbsoluteTolerance and setPercentTolerance methods from the PIDController, however, they appear to have no effect. For example, when setting the percent tolerance to 15, and with a setpoint of 200, the loop would continue to run even with a value of 195. Absolute tolerance showed the exact same problems. Does anyone know why these methods have no effect on the loop?

We DO have a quick fix, manually checking the error in the loop against a preset tolerance, but we would like to see if we can get it running in the built-in class.

If it helps, we're running this on a CANTalon with a USDigital encoder set to 4x mode. The loop is running on the RoboRio, not the talon.

Code:
https://github.com/steelhawks/PIDtest


Thanks!
 


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

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