LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder quadrature Count issues

Hello,

I'm interfacing a servo motor through an SCB-68 Board with an R series FPGA and my computer. I have a pulse generaton programme to control the stepper motor which works fine. I have hooked up the encoder and used the general example vi   "Quad ctr - R series.lvproj" with the inputs changed to my inputs on the board.

Now it seemed to work fine, but then I changed the direction of the servo motor. The pulse count does not rise the same when going counterclockwise as opposed to clockwise. I.e if i do one whole revolution both clockwise and counterclockwise i get a different amount of pulses outputted. Does anyone have any idea why this might be? I've tried the SCTL in simulation and the pulse count is fine if i manually change the A and B channels. Also, i've tried a dc motor with a different encoder and the same problem arises.

Any help would be greatly appreciated,

Sam 

0 Kudos
Message 1 of 6
(3,607 Views)

How large is the difference between the forward and reverse counts? When in reverse, does the count actually increment slower than in forward, or does it miss counts? 

0 Kudos
Message 2 of 6
(3,587 Views)

If there is a planetary gearbox or couplings between your encoder and your motor you can expect a count difference when you change direction.

 

Ben64

0 Kudos
Message 3 of 6
(3,581 Views)
How much is it off by? Is it always a consistent number of pulses off? Just to verify it is the same channel you're reading correct, so there's no possibility its a phase issue since pulses are often out of phase on these encoders so you can determine direction.
0 Kudos
Message 4 of 6
(3,578 Views)

It's a quadrature pulse so channels A and B are 90 deg out of phase. Going clockwise one revolution is 15000 pulses (which seems about right for the motor) and going anti clockwise it is around 7000 pulses. There is a reduction gear ratio of 304:1. It is always a consistent number of pulses off it doesn't change. The data sheet for the encoder is useless (it is a crap encoder).

Going anti clockwise the pulse count increments slower than when going forwards, I don't think it is missing pulses though.

Thanks for the quick reply guys 

0 Kudos
Message 5 of 6
(3,569 Views)

Hmmm... If the reverse count is very close to half of the forward count it could be a bug in the LabView vi.

 

You might try creating a very simple vi that just tracks the quadrature outputs of the encoder. If you can confirm that the grey code counts 'forward' in one direction (as in 00, 01, 11, 10, etc.) and 'backward' in the other direction (00, 10, 11, 01, etc.) then the input from the encoder is probably fine and it could be an issue with the implementation of the counting algorithm. 

 

If the reverse count is different from the quadrature grey code, then it could be an issue with your external setup. 

0 Kudos
Message 6 of 6
(3,558 Views)