-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
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
M428 axis filters #27015
base: bugfix-2.1.x
Are you sure you want to change the base?
M428 axis filters #27015
Conversation
…ate the previous offset value rather than resetting it inM428.cpp this pull request adds two functions to M428: 1- by sending M428 <axis char> marlin will set the homing offset in the current position for the mentioned axis, <axis char> can be one or more axis like X, Y, Z, A, .... or XYABC. 2- by sending M428 P XYZ for example, marlin will add the last offset value for the mentioned axis to the current position and set it as the new homing offset, this function can be useful to set the physical zero position for the mentioned axis, and without using P marlin will just replace the old home offset value based the current position. example: G1 Z5 ;will move Z axis to position 5 M428 Z; will set the position 5 as the new zero and will deduct 5 from the overall length G28 Z ; home Z axis G1 Z0 ; will move Z axis to the physical position that used to be called 5 before. now here we have two ways to set the homing offset again: G428 ; will set the offset to 0 therefore the last offset will be just replaced. G428 P ; will update the homing offset and make the current position as the physical zero position no matter what is the current offset in the memory.
Updated this to preserve the existing behavior of |
What happens if you run |
Using "M428 P X" will add the current position to the offset not only replace the old offset value, so no matter how many times we use "M428 P X" then the current physical position will be zero , so in this case we are using "M428 P X" to set the sero position of the X axis not only to update the offset, and I think it makes more sence because in general we use offset to set the zero point for an axis or more. Running "M428 P X" has no sence unless we use G28 in between, because there is no aim of setting the sero point of an axis several times unless we home the axis first, because sometimes the homing position is the MAX position and reseting the offset also means changing the overall lenght of the axis. |
This pull request adds two functions to M428:
By sending M428 marlin will set the homing offset in the current position for the mentioned axis, can be one or more axis like X, Y, Z, A, .... or XYABC.
By sending M428 P XYZ for example, marlin will add the last offset value for the mentioned axis to the current position and set it as the new homing offset, this function can be useful to set the physical zero position for the mentioned axis, and without using P marlin will just replace the old home offset value based the current position.
Example:
now here we have two ways to set the homing offset again:
Description
Requirements
Benefits
Configurations
Related Issues
#27011