Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

quadrature encoder index reseting the counter

I did not reset any more and zeroed only at the start of each measurement.

 

If you need to zero, I would recommend to check if the value has changed by more than half of the total increment count and to add or substract one increment depending on the direction, because one increment is exactly missing after zeroing the counter.

0 Kudos
Message 11 of 14
(2,213 Views)

I just read through the posted Word doc more closely and caught on to the exact nature of the problem as illustrated at the end in Figure 10.  According to that figure, the counter value is reset to 0 during the Z-index phase but then remains at 0 rather than incrementing at the next quadrature state transition.  I don't have any explanation for this, but can only report that it is not typical.

 

I've done a lot of encoder measurements with and without Z-indexing, and haven't encountered this kind of missing increment problem.  Given that large # of successful uses, I'm not quick to suspect a problem with the data acq board.   I wonder some about the Z-index pulse though.

 

I've used Z-index pulses that were generated by the same encoder that put out the A,B signals.  As such, their spatial (and therefore timing) relationships were sync'ed, and these have worked flawlessly for me.  It sounds like this app gets a Z-index from some other source in that there are 256 per rev rather than the typical 1 per rev.  When the Z-index isn't synced to the A,B phases, there are a couple possible problems I mentioned earlier in the thread.   One would involve missing a full quadrature cycle of counts (1, 2, or 4 counts, depending on position measurement mode).

 

To Zardin:  what problem are *you* having?  I'm not sure what's going on with P. Horn's situation, but it isn't typical and don't want you to suppose that his workarounds are the preferred approach for all situations.

 

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 12 of 14
(2,199 Views)

Hello,

I will try to explain my problem, my english is poor.

We need to comprove an encoders in quadrature. That have a 4096 pulses and B signal is advanced in front the A signal.  The measurement need be reset with Z signal.  The Z signal is not syncronized.

Normally the Z signal start when A Hight and B Hight and I don't have any problem, but sometimes when we do the comprobation with slow velocity the Z signal start lightly before and start when A Low and B Hight,  when that happens the measure is 4095. I tried to change to A Low and B Hight but the measurement continue been 4095, the other configurations are worse.

I only have this problem when rotate in clock wise direction.

May be the problem can be solutionated reseting with rising slope and not for level independly of the other signals. How can I do that?

I hope explain me.

Thanks

0 Kudos
Message 13 of 14
(2,182 Views)

Unfortunately, there isn't a way to reset the count based only on an external rising edge.  The Z-index reset is the only hardware method available, and it is dependent on level rather than than edges, and requires sync'ing with the states of encoder signals A and B.

 

I consider it a flaw in the design of the feature set and first griped about it years ago.

 

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 14 of 14
(2,177 Views)