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

Add the posibility of setting home offset for seperate axis , and upd… #27015

Open
wants to merge 1 commit into
base: bugfix-2.1.x
Choose a base branch
from

Conversation

Elias-Ta
Copy link

@Elias-Ta Elias-Ta commented Apr 25, 2024

This pull request adds two functions to M428:

  1. 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.

  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 what marlin consider as zero which is the physical position that used to be called 5 before.

now here we have two ways to set the homing offset again:

G428 Z   ; will set the offset to 0 therefore the last offset will be just replaced. 
G428 P Z   ; 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.

Description

Requirements

Benefits

Configurations

Related Issues

#27011

…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.
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

Successfully merging this pull request may close these issues.

None yet

1 participant