Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module ENCODER: width of Z-index pulse not taken into account #75

Open
3 tasks
Peter-van-Tol opened this issue Jan 17, 2024 · 0 comments
Open
3 tasks
Assignees
Labels
enhancement New feature or request

Comments

@Peter-van-Tol
Copy link
Owner

Currently the width of the Z-index pulse is not taken into account. As soon as a rising flank is detected the count value is reset. This leads to a different index position depending on whether the encoder is moving clockwise or counter-clockwise. The behavior of the clock-pulse should be dependent on the direction:

  • when rotating CW, the index pulse should be detected with a rising flank;
  • when rotating CCW, the index pulse should be detected with falling flank.

Proposed changes:

  • Add signal direction with width 2. Possible values are b'00 (reset, not moved), b'01 (CW), b'10 (CCW);
  • Store direction of movement;
  • When Z-signal has changed, compare flank with direction.
@Peter-van-Tol Peter-van-Tol self-assigned this Jan 17, 2024
@Peter-van-Tol Peter-van-Tol added the enhancement New feature or request label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant