Skip to content

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

@Peter-van-Tol

Description

@Peter-van-Tol

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions