Log in

View Full Version : Encoder Help.


mtnteam
13-02-2012, 12:38
I have an encoder hooked up along with a motor. The encoder reads the motor fine. But, I'm stuck on how to use the the output of the encoder with the motor. So lets say i press button 10 on the joystick. Than it tells the motor to only spin 1/4 a rotation, or 90 degrees. I've been trying every possible idea that i had. Any help is greatly appreciated.

//EDIT\\

I've noticed that In my Driver Station the VOLTS are not updating it stuck at 17.5 VOLTS or something like that. any ideas?

Ether
13-02-2012, 12:58
I have an encoder hooked up along with a motor. The encoder reads the motor fine. But, I'm stuck on how to use the the output of the encoder with the motor. So lets say i press button 10 on the joystick. Than it tells the motor to only spin 1/4 a rotation, or 90 degrees. I've been trying every possible idea that i had. Any help is greatly appreciated.

Use a PID (or any other feedback controller) with encoder signal as process variable, and the setpoint established as follows:

Every time the leading edge of a button press is detected, increment the setpoint by 90 degrees.

What are you using this for?

mtnteam
13-02-2012, 13:59
I'm using it for, to feed a ball to a shooter. Is there a example picture you could show me?

Ether
13-02-2012, 14:45
Is there a example picture you could show me?

Picture of what? PID? It's a vi in your FRC LabVIEW installation.

How to detect leading edge of a button press?
http://www.chiefdelphi.com/forums/showpost.php?p=1026930&postcount=3

mtnteam
13-02-2012, 15:40
an example on how the pid's are used with the motor.

Ether
13-02-2012, 16:34
an example on how the pid's are used with the motor.

Did you search the LabVIEW help and examples, and could not find what you need?

mtnteam
13-02-2012, 17:10
Correct. There is a Encoder with a motor example. But all its doing is reading the motor. I want to figure out how to use that information to set it so many turns or degrees.

Ether
13-02-2012, 17:12
Correct. There is a Encoder with a motor example. But all its doing is reading the motor. I want to figure out how to use that information to set it so many turns or degrees.

I don't know what you mean by "reading the motor". Could you explain.

Is there an example that shows how to control motor position using a PID?

mtnteam
13-02-2012, 18:28
I'm not seeing one at all. So i was wondering if you have an example you could show me.