Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   PID Subsystems Question (http://www.chiefdelphi.com/forums/showthread.php?t=99854)

warfaj 11-01-2012 17:42

PID Subsystems Question
 
Is there any way of running multiple PID instances simultaneously from the same PID subsystem?
Let me clarify:
I want to run my drive train with a PID Subsystem but I need to set different set points for each side of the drive train. I also need to set different PID inputs. Is there any way for me to do this in one PID Subsystem? The PID constants are the same for both sides of the drive train.

PS. I know I can do this with two PID Subsystems but I think it would be better to have a single DriveTrain subsystem.

Thanks in advance.

Jared Russell 11-01-2012 17:48

Re: PID Subsystems Question
 
I would simply make a new subclass of Subsystem that includes the desired functionality. You can copy as much or as little of the PIDSubsystem code as you would like.

BradAMiller 13-01-2012 16:23

The PIDSubsystem is just an encapsulation of a regular subsystem and a PIDController object. You can make your own Subsystem as was suggested that just has two PIDController objects in it. For common cases the PIDSubsystem works pretty well, but not always.

Brad

youxinche95 15-01-2012 23:40

Re: PID Subsystems Question
 
I actually created a pid class with that passes the kP, kI, kD in the constructor and updates the target and current.

It works pretty well, and saves me lots of writing, because programmers are lazy :D

good luck!


All times are GMT -5. The time now is 10:56.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi