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

Limit switch alarm triggered also when releasing #1222

Open
SebastianKusykIFJ opened this issue Jul 18, 2023 · 8 comments
Open

Limit switch alarm triggered also when releasing #1222

SebastianKusykIFJ opened this issue Jul 18, 2023 · 8 comments

Comments

@SebastianKusykIFJ
Copy link

Hello,
I hit a limit switch, got error info from GRBL and resetted and unlocked it. However, when I started moving in the opposite direction, I also got the limit switch error when the switch was released and had to reset and unlock again. How to prevent this? Is it caused by switch bouncing / electrical oscillations or by GRBL itself? First I had NO wiring, changed to NC (and of course changed GRBL configuration - inverted limit pins), but it doesn't help. Also I have very long homing switch debounce time, 250 ms, but does this setting work only in homing mode or always for limit switches?

@GrahamJB
Copy link

GrahamJB commented Jul 18, 2023 via email

@SebastianKusykIFJ
Copy link
Author

How can I prevent this from happening? I want the limit switch error to appear only when it's pressed, not released. Does GRBL interpret every change in input state as limit switch error, disregarding whether it's change from 0 to 1 or vice versa? Or can it be fixed with some low-pass filter, i.e. RC?

@GrahamJB
Copy link

GrahamJB commented Jul 19, 2023 via email

@SebastianKusykIFJ
Copy link
Author

SebastianKusykIFJ commented Jul 19, 2023

But nothing stops instantaneously so it has kept moving a certain distance, depends on speed, inertia…., past the trigger point.

It doesn't change anything. After I read the "limit switch" message, click reset, click unlock, send a command to move in the opposite direction, it has more than enough time to stop moving. Even if it were moving, it wouldn't affect limit switch's state (of course unless it's crushed) - it can be either pressed or not, nothing else.

Also the trigger point, the position where the switch triggers, is not the same as the ‘un-trigger’ point, the position at which the switch releases.

I know the 'trigger' point is a bit deeper than 'un-trigger', but again: the switch is still pressed when I reset GRBL, then I start moving in the opposite direction and I release the limit switch - so why GRBL behaves like I pressed it, not released?

@GrahamJB
Copy link

GrahamJB commented Jul 19, 2023 via email

@lalo-uy
Copy link

lalo-uy commented Jul 19, 2023 via email

@SebastianKusykIFJ
Copy link
Author

Which parts of source code are responsible for limit switches? I tried to find it, but I couldn't.

@mar0x
Copy link

mar0x commented Jul 20, 2023

grbl/limits.c

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

4 participants