Go to Post They really should put warning signs at all entrances: "WARNING! FIRST IS CONTAGIOUS!" - KenWittlief [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: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 03-07-2015, 03:50 PM
Omnicide Omnicide is offline
Registered User
FRC #1086
 
Join Date: Mar 2015
Location: Richmond, VA
Posts: 2
Omnicide is an unknown quantity at this point
PID help

I've been trying to get a PID working for our elevator and I've gotten no feedback at all (No error either)
My code for the PID is as follows:
Elevatorpid1 = new PIDController(1,1,1,potOne,elevating_motor1);
Elevatorpid1->SetInputRange(19,50);
Elevatorpid1->SetOutputRange(1,-1);
//Range is 1 to -1 because motor is inverted
Elevatorpid1->SetSetpoint(35);
Elevatorpid2 = new PIDController(1,1,1,potOne,elevating_motor2);
Elevatorpid2->SetInputRange(19,50);
Elevatorpid2->SetOutputRange(-1,1);
Elevatorpid2->SetSetpoint(35);

I use 2 different motors for the elevator, so I'm using 2 PIDControllers, which may be the wrong way. potOne is an AnalogInput (uses a potentiometer)
Later on in the code, I enable it with this:
Elevatorpid1->Enable();
Elevatorpid2->Enable();


the method Elevatorpid1->Get() always returns 0.000.
Where did I go wrong?
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 10:18 AM.

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