-
Notifications
You must be signed in to change notification settings - Fork 65
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
Implement two phase homing cycle with slow second approach #690
Implement two phase homing cycle with slow second approach #690
Conversation
Moved repetitive fragments of motion code into their own function
After testing the new homing cycle for a while it seems to be performing fine. It also seems to give better accuracy on my machine though this is just based on my observation with no objective measurements. |
I just noticed that the homing offset now gets applied twice, fixing it. |
Should be fine now, final pull off moves until it no longer contacts the switches (like in the short cycle) and the kinematics moves the axis rest of the way. |
Thanks. I will try to test it and review it tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current default behavior of µCNC is:
Rapid approach -> Slow pull off
The modification this proposes to do is a long homing cycle
Rapid approach -> Rapid pull off -> Slow approach -> Slow pull off
The new option should reflect that.
Tested the code
This is working but it's causing issues with the option ENABLE_XY_SIMULTANEOUS_HOMING
With this option enabled the axis locking on retraction is not working correctly.
- By default the short homing cycle is used - Fixed simultaneous xy homing locking up in long cycle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing with several options enabled the code seemed to work correctly.
I'm still not comfortable with the modification on the io_control.c file and potential unintended effects that may arise. I will have to look at the code with a bit more time and run some debugging.
There is also a typo on the motion_control.c file but does not cause any issue.
I liked your idea as it introduces a code compression opportunity. I've come up with a slightly different code implementation that works without modifying io_control and can make code even smaller and simpler to read.
I'm going to give the green light to this PR and then adjust it accordingly with the comments above.
Thanks for the PR.
As the title says, this pull request implements a two phase homing cycle. The first phase approaches limit switches at the rapid homing feed rate and backs off. The second phase approaches limit switches at homing seek feed rate and then pulls off into the final position. This code is not tested yet, I'll get around to it tomorrow.