Hello,
I was wondering if anyone has a good idea on how to count the number of rotations that an absolute rotary encoder went through.
http://www.usdigital.com/products/encoders/absolute/rotary/shaft/ma3
For example, if the encoder goes through a whole revolution clockwise, a rotation counter increments, and if it goes 1 revolution counter clockwise, the counter decrements.
I'm having a hard time figuring out a method to identify whether the encoder is going clockwise or counterclockwise, and if so if it has been a full rotation or not.
I'm thinking of setting up a marker, say if the last five readings were smaller than this marker then the encoder is moving clockwise. If the last five readings were bigger than the marker, than the encoder is going counterclockwise. But there are cases where this would not catch.
Any insight is appreciated.
I was wondering if anyone has a good idea on how to count the number of rotations that an absolute rotary encoder went through.
http://www.usdigital.com/products/encoders/absolute/rotary/shaft/ma3
For example, if the encoder goes through a whole revolution clockwise, a rotation counter increments, and if it goes 1 revolution counter clockwise, the counter decrements.
I'm having a hard time figuring out a method to identify whether the encoder is going clockwise or counterclockwise, and if so if it has been a full rotation or not.
I'm thinking of setting up a marker, say if the last five readings were smaller than this marker then the encoder is moving clockwise. If the last five readings were bigger than the marker, than the encoder is going counterclockwise. But there are cases where this would not catch.
Any insight is appreciated.