PDA

View Full Version : Quad Encoder


dr who
12-19-05, 11:49 PM
I have installed my encoders and started testing, one question and this maybe stupid to some, but, i have two motors left and right, when testing QUAD0 (left motor) in forward motion gives me a negative output,
QUAD1 (right motor) in forward motion gives me positive output,
how do i change the QUAD0 output to provide me with a postive output??

The IO programming doc, tells me under Encodes "pin signed" Sets a pair of pins to the count-and-direction mode, which really tells me completely nothing. so does anyone have any information on this subject?

I am using the following syntax for testing, which works find for testing.

QUAD RESET
QUAD0 POSITION D.

QUAD1 POSITION D.

Thank in advance for your help.

Marcel...

RMDumse
12-20-05, 05:09 AM
The short answer is: Reverse the quadrature encoder's A/B connections to B/A and the count will go the opposite way.

dr who
12-20-05, 11:12 AM
That simple? i was thinking that you would need a negative value for the command, i did not know realize that you could just reverse the signals.
Blast, i hate it when that happens..

So thanks, i will give it go

Cheers Marcel...

RMDumse
12-23-05, 11:01 AM
Yes, when I bring up a new differential drive robot, it's always a "fiddle" with reversing quadrature lines, and reversing motor power lines, until everything is going the "right" direction. Or, in otherwords, so a positive voltage on the motors makes the wheel turn in the "forward" direction and the quadrature counts go "up" when the wheel turns that way. It's often easier to determine it by experiment than prefigure which way should be which. But usually left to right, both motor and quadrature lines will need to be opposite, if the drives are mounted as mirror images of each other.