# What does G28 actually reset?

**URL:** <https://klipper.discourse.group/t/what-does-g28-actually-reset/6991>\
**Category:** General Discussion\
**Created:** [March 2, 2023, 7:51pm UTC](https://klipper.discourse.group/t/what-does-g28-actually-reset/6991 "2023-03-02T19:51:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [March 2, 2023, 7:51pm UTC](https://klipper.discourse.group/t/what-does-g28-actually-reset/6991/1 "2023-03-02T19:51:24Z")

</div>

### Basic Information:

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

[klippy.zip](https://klipper.discourse.group/uploads/short-url/oTGjoMHa3RbcCVxlMp8iPMZPzbm.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?

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [March 3, 2023, 2:45pm UTC](https://klipper.discourse.group/t/what-does-g28-actually-reset/6991/2 "2023-03-03T14:45:55Z")

</div>

Klipper docs don’t tell you much about G28. You may have a look here [G-code - RepRap](https://reprap.org/wiki/G-code#G28:_Move_to_Origin_.28Home.29) and here [Auto Home | Marlin Firmware](https://marlinfw.org/docs/gcode/G028.html)  
For reset, maybe [Reset (computing) - Wikipedia](https://en.wikipedia.org/wiki/Reset_(computing))

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [March 3, 2023, 3:00pm UTC](https://klipper.discourse.group/t/what-does-g28-actually-reset/6991/3 "2023-03-03T15:00:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [March 3, 2023, 3:12pm UTC](https://klipper.discourse.group/t/what-does-g28-actually-reset/6991/4 "2023-03-03T15:12:23Z")

</div>

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](https://klipper.discourse.group/t/how-to-go-out-of-print-area-for-tool-change/6075/16) (last quote) you may probably ask @Sineos to answer your question correct 😉

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [March 3, 2023, 4:52pm UTC](https://klipper.discourse.group/t/what-does-g28-actually-reset/6991/5 "2023-03-03T16:52:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![koconnor](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koconnor](https://klipper.discourse.group/u/koconnor)\
**Post date:** [March 5, 2023, 2:54am UTC](https://klipper.discourse.group/t/what-does-g28-actually-reset/6991/6 "2023-03-05T02:54:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [March 5, 2023, 4:03pm UTC](https://klipper.discourse.group/t/what-does-g28-actually-reset/6991/7 "2023-03-05T16:03:03Z")

</div>

@koconnor wrote also this [homing: Support lazy homing in G28 command by jschuh · Pull Request #6057 · Klipper3d/klipper · GitHub](https://github.com/Klipper3d/klipper/pull/6057#issuecomment-1446905889)
