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

End-stop being triggered twice #428

Closed
Protoneer opened this issue Apr 30, 2018 · 1 comment
Closed

End-stop being triggered twice #428

Protoneer opened this issue Apr 30, 2018 · 1 comment

Comments

@Protoneer
Copy link
Contributor

My issue is this: I have N/O limit switches on all axes. When one is tripped, the motion on that axis stops - as expected. However, the switch is still in the closed position when the axis movement stops. I reset and unlock via the buttons in grbl panel. When I move the axis off of the switch, when it re-opens I get another "End-Stop" event just like when it was first tripped. So for each end-stop switch closure, I am getting TWO stop events.

Is this the normal process or am I doing it wrong?

@chamnit
Copy link
Contributor

chamnit commented Apr 30, 2018

@Protoneer : Hey Bertus. Yes this is normal behavior. The issue comes from the fact that the AVR processor doesn't distinguish how the pin change interrupt is triggered. It's ambiguous. Code could be created to check the state change direction, but the pin input is often bouncing. I'd have to be some robust code with a clock to check the state multiple times over time. It's an annoyance for sure, but in practice, you shouldn't be hitting the end stop too often. It'll be addressed in the next version when there is more room and extra clocks/peripherals to deal with this appropriately.

@chamnit chamnit closed this as completed Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants