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

Arduino Due flashed as ramps 1.6 homing fail #18

Open
Kickpunchy opened this issue Aug 25, 2023 · 18 comments
Open

Arduino Due flashed as ramps 1.6 homing fail #18

Kickpunchy opened this issue Aug 25, 2023 · 18 comments

Comments

@Kickpunchy
Copy link

My NC Limit switches trigger alarm when machine is jogged to limit. However, homing cycle crashes through z max limit. Tried with UGS and gsender.

@terjeio
Copy link
Contributor

terjeio commented Aug 25, 2023

Switches are wired correctly? Trigger each separately and check with $LIM command.

@Kickpunchy
Copy link
Author

yes, switches are wired correctly.

@terjeio
Copy link
Contributor

terjeio commented Aug 26, 2023

Homing works for me in my test setup. How are the switched wired (to min or max inputs or both)?

@Kickpunchy
Copy link
Author

Both

@terjeio
Copy link
Contributor

terjeio commented Aug 26, 2023

Are you homing towards max?

@Kickpunchy
Copy link
Author

Yes

@terjeio
Copy link
Contributor

terjeio commented Aug 26, 2023

Ok, that explains it. You have to home towards min.

@Kickpunchy
Copy link
Author

Really? OMG I did not even think of trying that(neither did anybody on Reddit)

@Kickpunchy
Copy link
Author

I was kinda hoping and dreading I was just a dumbdumb

@Kickpunchy
Copy link
Author

So, just home all axises towards min?

@terjeio
Copy link
Contributor

terjeio commented Aug 26, 2023

Yes.

@Kickpunchy
Copy link
Author

Thanks I appreciate it

@breiler
Copy link

breiler commented Aug 27, 2023

It was a long time ago that I tried grblHAL and I would like to understand this for the next person asking.

In the classic gnea/grbl there was only one input for each axis. It would not matter where you put your limit switches, as long as you configured the homing direction correctly. Default in GRBL $23=0 means that all limit switches needs to be placed in the positive direction for each axis.

And this has changed in grblHAL?

I am assuming that this is @Kickpunchy:s original post on reddit with the configuration that was used:
https://www.reddit.com/r/hobbycnc/comments/15ycwoc/homing_cycle_crashes_through_z_max_limit_switch/

@terjeio
Copy link
Contributor

terjeio commented Aug 27, 2023

In the classic gnea/grbl there was only one input for each axis.

As you state legacy Grbl has no notion of min and max limit switches, grblHAL has, the core can even differentiate between limit switches and home switches. grblHAL uses the min limit inputs for homing if the driver does not support separate inputs for homing. No driver currently support separate homing inputs but that may change in the future.

It would not matter where you put your limit switches, as long as you configured the homing direction correctly.

This still applies, as long as the switches in the homing direction is connected to the min inputs. I guess I selected the min inputs since homing by default sets the home position in negative space.

And this has changed in grblHAL?

I believe not. Note that very few driver/board combinations has both min and max limit inputs - this is new in the Grbl world and may cause confusion?

@breiler
Copy link

breiler commented Aug 27, 2023

This still applies, as long as the switches in the homing direction is connected to the min inputs. I guess I selected the min inputs since homing by default sets the home position in negative space.

If the configuration says that homing should be done on the positive end of each axis ($23=0) but you'd need to wire the switches to the min-inputs, which normally should be put on the negative ends of each axis I'd say that it is a bit confusing.

Is it ok if I make a note of it on the wiki here on $21 that the min inputs should be used?
https://github.com/grblHAL/core/wiki/Additional-or-extended-settings

@terjeio
Copy link
Contributor

terjeio commented Aug 27, 2023

Is it ok if I make a note of it on the wiki here on $21 that the min inputs should be used?

Let me think about this a bit. Currently only the Arduino Due and the LPC176x drivers has max inputs available at the driver level so I could change the behaviour to remove confusion without affecting too many users. In addition only the limit switches used for homing should have interrupt disabled during homing if hard limits is enabled.

@terjeio
Copy link
Contributor

terjeio commented Sep 3, 2023

I have now committed an update that significantly changes how limit switches are used for homing.
If both min and max are available the switch used for homing will be in the configured direction, depending on the driver the opposite switch will still have hard limits enabled if configured. Some drivers will also keep hard limits enabled for switches belonging to axes not involved in the executing homing cycle. It is my intention to update all drivers to support this.
A new command, $HSS, will output the current switch status in a [HOMES:<min>,<max>] report. This can be used to check if wiring is correct. E.g. if the X min switch and Y max switch is triggered the output will be [HOMES:X,Y].

@Kickpunchy The Due driver should be fully compliant with this change. If you have time can you please verify?

@breiler I think this change warrant a new Wiki page dedicated to homing. What do you think?

@breiler
Copy link

breiler commented Sep 4, 2023

I think that a page specifically for homing is a good idea. =)

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

3 participants