Jump to content
  • 0

Counting the number of A/B-pulses between reset (Z) pulses.


Morten

Question

I am testing the signal quality from a quadrature encoder. How could I test for missing pulses?

I can get the scipt linlked at the bottom to work and it shows the interval between pulses well.

How could I modify it to instead check for missing Z-pulses?

 

I'm thinking something like: 

Pseudocode(very pseudo):

Store A+B edge count in variable V

If 

Z-pulse = 1

and

V =  4096

print"pulse count matches"

else

Z-pulse = 1

and

V < 4096

print "A+B pulses missed"

else

Z-pulse = 1

and

V > 4096

print "Z pulse missed"

 

Thank in advance,

Morten

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...