Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Encoders With Motor Speeds (http://www.chiefdelphi.com/forums/showthread.php?t=133712)

2386programming 30-01-2015 12:34

Encoders With Motor Speeds
 
Hello, my team is programming the drive train for this years robot and all the gear boxes move at different speeds. We are trying to figure out a way to get a value from the encoders for inches per second per say, and then send readings to our talons making all the wheels spin at the same speed.

notmattlythgoe 30-01-2015 12:35

Re: Encoders With Motor Speeds
 
Quote:

Originally Posted by 2386programming (Post 1436114)
Hello, my team is programming the drive train for this years robot and all the gear boxes move at different speeds. We are trying to figure out a way to get a value from the encoders for inches per second per say, and then send readings to our talons making all the wheels spin at the same speed.

Are you using the new Talons or the older ones?

2386programming 30-01-2015 12:39

Re: Encoders With Motor Speeds
 
We're using the old ones.

notmattlythgoe 30-01-2015 12:40

Re: Encoders With Motor Speeds
 
Quote:

Originally Posted by 2386programming (Post 1436121)
We're using the old ones.

What programming structure are you using? Iterative, Sample, or Command?

2386programming 30-01-2015 12:41

Re: Encoders With Motor Speeds
 
We're using an iterative structure

notmattlythgoe 30-01-2015 12:49

Re: Encoders With Motor Speeds
 
Quote:

Originally Posted by 2386programming (Post 1436124)
We're using an iterative structure

What you'll want to do is look at the Encoder class and make sure to configure the distancePerPulse. Then you will pass that encoder into a PIDController along with the motor you want to control with it.

Code:

PIDController leftFrontWheel = new PIDController(p, i, d, leftFrontEncoder, leftFrontTalon);

2386programming 30-01-2015 16:38

Re: Encoders With Motor Speeds
 
Great thank you! Is there any way that you could help and explain how a PID controller actually works in layman's terms?

Ether 30-01-2015 17:07

Re: Encoders With Motor Speeds
 
Quote:

Originally Posted by 2386programming (Post 1436261)
Great thank you! Is there any way that you could help and explain how a PID controller actually works in layman's terms?

Watch this video.




All times are GMT -5. The time now is 11:41.

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