Go to Post UFH has substance. It puts the I in FIRST. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 13 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 04-02-2015, 23:12
BananaKing1378's Avatar
BananaKing1378 BananaKing1378 is offline
BaNaNaK1Ng8o8
AKA: Banene
FRC #1378 (Hilo Banana Robotics)
Team Role: Human Player
 
Join Date: Jun 2014
Rookie Year: 2008
Location: Pluto
Posts: 7
BananaKing1378 is an unknown quantity at this point
PID Controller class not calculating output value

Hello! So to get to the point, the PIDController we are using is not calculating an output value.

We set the controller to read input from an encoder and output to a talon. In the code it looks like this:

LiftControl (0.1, 0.1, 0.1, &EnTwoSim, &TwoSim);

We followed example given by the WPILibrary website. We want the PID to basically hold the lift at a position when the driver has stopped pushing the button to move the lift. We thought to accomplish this by making the setpoint of the class to be equal to the encodervalue. This would make the error small by nature but the PID should make the motor "fight" against forces pushing against it by design.

We printed the value of the error, encoder value, setpoint, and output value to the dashboard. As expected the error is small, and the encoder value and setpoint are close. However, the output value remains at 0. I have tried to set the minimum and maximum output values but that did nothing. I looked at the PIDController class and saw that there is a protected function that calculates the output but it can only be accessed by a "Notifier" that is created when the PIDController object is initialized.

Anyway, I hope this wasn't too confusing and would greatly appreciate any help we could get on this issue. Thanks!
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 12:07.

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