What does G28 actually reset?

Basic Information:

Printer Model: T-Rex 3
MCU / Printerboard: Vivedino 1.1
klippy.log

klippy.zip (199.0 KB)

Fill out above information and in all cases attach your klippy.log file. Pasting your printer.cfg is not needed

Describe your issue:

No Issue - just a question for clarification.

In the docs I can read G28 is used to reset the kinematics after certain procedures (FORCE_MOVE , SET_KINEMATIC_POSITION, SCREWS_TILT_CALCULATE).

So, is this reset established with G28 alone, or also with G28 X/Y/Z ?

And what is reset?
Everything including BED_MESH, Z_TILT_ADJUST, SKEW compensation and more?
Or just the home positions?

Klipper docs don’t tell you much about G28. You may have a look here G-code - RepRap and here Auto Home | Marlin Firmware
For reset, maybe Reset (computing) - Wikipedia

Thank you very much for your reply @hcet14 .

I’m just wandering how to setup my startcode with Z_TILT and loading a BED_MESH without a G28 command after these will delete those settings.

Actually RepRap and Marlin don’t say anything about that too.

Maybe I’ll have to investigate the sources.

I have been reading it, somewhere in the Klipper docs, but I can’t find it right now.
Klipper is pretty “picky” with G28.
Like How to go out of print area for tool change? - #16 by DanS (last quote) you may probably ask @Sineos to answer your question correct :wink:

1 Like

Thanks for believing that I know everything, but unfortunately my knowledge about Klipper’s homing process is very basic and I do not know if anything is reset or if only the axes are “zeroed”

TBH never bothered but since @EddyMI3D brought it up, it is an interesting question

2 Likes

That’s a bit of a “tricky question” as G28 is one of those arcane g-code commands that isn’t particularly well defined.

In practice, the command is used to establish the actual X, Y, and Z positions of the toolhead. That is, the software internally tracks where the toolhead is, and it updates that internal position when ever it moves the toolhead to a new position. But when the machine is first powered on the software doesn’t know the actual X Y and Z position, so one “homes the printer” to establish that information.

Thus the G28 doesn’t really “reset” anything - it just moves the toolhead to a position that has a “known” position.

Moving the toolhead to a known position (typically carriage positions just next to the endstop switches) may undo a calibration by Z_TILT_ADJUST or QUAD_GANTRY_LEVEL. Those tools alter the Z carriage positions to better align them relative to the bed, while “homing” aligns the carriages to their endstops. So, “homing” can in effect undo the impact of those tools - it isn’t “resetting” them in a software sense though.

Hope that helps,
-Kevin

2 Likes

@koconnor wrote also this homing: Support lazy homing in G28 command by jschuh · Pull Request #6057 · Klipper3d/klipper · GitHub

1 Like