# Z Offset. Im going CRAZY!

**URL:** https://klipper.discourse.group/t/z-offset-im-going-crazy/17198
**Category:** General Discussion
**Created:** [June 21, 2024, 7:32am UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198 "2024-06-21T07:32:22Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 21, 2024, 7:32am UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/1 "2024-06-21T07:32:22Z")

</div>

### Basic Information:

Printer Model: Ender 3v2  
 MCU / Printerboard: 4.2.2  
 Host / SBC: Pi 4  
[klippy.log](https://klipper.discourse.group/uploads/short-url/abGsLly4uqKB3Ez1mURItxCEc05.log) (3.7 MB)

klippy.log

### Describe your issue:

…

Hey guys, noob here

For the life of me I cant fiqure out what Im doing wrong. Ive read the Docs, guides, watched videos. It just doesnt play ball.

I have run the PROBE\_CALIBRATE command (BLTOUCH) and dialed the head down using paper as my gauge. Accept the prompt and save the config. It restarts and I get

Klipper reports: ERROR

Option ‘z\_offset’ in section ‘bltouch’ must be specified

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted.

The few times I have thought I got it correct the print starts with the head way to high.

Can someone please explain to me like Im a child what I am doing wrong?

---

<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: [June 21, 2024, 12:22pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/2 "2024-06-21T12:22:35Z")

</div>

Hello @IamDan !

> [@IamDan](#):
>
> save the config

How do you save the config?

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 21, 2024, 1:00pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/3 "2024-06-21T13:00:23Z")

</div>

Save\_config in the console

---

<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: [June 21, 2024, 2:57pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/4 "2024-06-21T14:57:50Z")

</div>

I’m just a bit confused:  
Sometimes you have `y_offset` in `[bltouch]`, sometimes not. Do you delete it?

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 21, 2024, 8:28pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/5 "2024-06-21T20:28:16Z")

</div>

I’ve never touched the y offset. I’m starting to think I should have stayed with marlin 🤦

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 24, 2024, 12:39am UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/6 "2024-06-24T00:39:22Z")

</div>

Should I delete the printer.cfg and start again?

---

<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: [June 24, 2024, 3:15am UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/7 "2024-06-24T03:15:01Z")

</div>

> [@EddyMI3D](#):
>
> have `y_offset` in `[bltouch]`

Sorry, I meant `z_offset`.

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 24, 2024, 3:34am UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/8 "2024-06-24T03:34:25Z")

</div>

Yes, I did delete it and replace it. Im basically clutching at straws and trying combinations of everything. Should the values at the bottom of my config (probe\_calibrate results) be copied into the z\_offset position? Do I leave z\_offset at 0?

---

<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: [June 24, 2024, 11:59am UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/9 "2024-06-24T11:59:32Z")

</div>

> [@IamDan](#):
>
> Yes, I did delete it and replace it.

When you calibrate the probe and the z\_offset, you should not do anything with the values in the config.  
Klipper stores the actual value in an area below the config lines.

```auto
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
...
...
#*#
#*# [bltouch]
#*# z_offset = 1.740
#*#
...
...

```

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 24, 2024, 7:38pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/10 "2024-06-24T19:38:47Z")

</div>

The problem is that after a PROBE\_CALIBRATE it will comment out the bltouch z\_offset, add its own value at the bottom and then proceed to complain that there is no z\_offset value

---

<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: [June 24, 2024, 7:47pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/11 "2024-06-24T19:47:48Z")

</div>

Can you upload the complete

```auto
#*# <---------------------- SAVE_CONFIG ---------------------->

```

block?

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 24, 2024, 7:50pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/12 "2024-06-24T19:50:44Z")

</div>

```auto
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh 60 Deg C]
#*# version = 1
#*# points =
#*# 0.240000, 0.055000, 0.022500, 0.047500, 0.102500
#*# 0.232500, 0.075000, 0.062500, 0.100000, 0.162500
#*# 0.187500, 0.042500, 0.042500, 0.077500, 0.135000
#*# 0.217500, 0.060000, 0.042500, 0.047500, 0.065000
#*# 0.187500, 0.050000, 0.047500, 0.060000, 0.090000
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 15.0
#*# max_x = 188.0
#*# min_y = 15.0
#*# max_y = 191.0

# Client variable macro for your printer.cfg
#[gcode_macro _CLIENT_VARIABLE]
#variable_use_custom_pos : False ; use custom park coordinates for x,y [True/False]
#variable_custom_park_x : 0.0 ; custom x position; value must be within your defined min and max of X
#variable_custom_park_y : 0.0 ; custom y position; value must be within your defined min and max of Y
#variable_custom_park_dz : 2.0 ; custom dz value; the value in mm to lift the nozzle when move to park position
#variable_retract : 1.0 ; the value to retract while PAUSE
#variable_cancel_retract : 5.0 ; the value to retract while CANCEL_PRINT
#variable_speed_retract : 35.0 ; retract speed in mm/s
#variable_unretract : 1.0 ; the value to unretract while RESUME
#variable_speed_unretract : 35.0 ; unretract speed in mm/s
#variable_speed_hop : 15.0 ; z move speed in mm/s
#variable_speed_move : 100.0 ; move speed in mm/s
#variable_park_at_cancel : False ; allow to move the toolhead to park while execute CANCEL_PRINT [True/False]
#variable_park_at_cancel_x : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
#variable_park_at_cancel_y : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
## !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!!
#variable_use_fw_retract : False ; use fw_retraction instead of the manual version [True/False]
#variable_idle_timeout : 0 ; time in sec until idle_timeout kicks in. Value 0 means that no value will be set or restored
#variable_runout_sensor : "" ; If a sensor is defined, it will be used to cancel the execution of RESUME in case no filament is detected.
## Specify the config name of the runout sensor e.g "filament_switch_sensor runout". Hint use the same as in your printer.cfg
## !!! Custom macros, please use with care and review the section of the corresponding macro.
## These macros are for simple operations like setting a status LED. Please make sure your macro does not interfere with the basic macro functions.
## Only single line commands are supported, please create a macro if you need more than one command.
#variable_user_pause_macro : "" ; Everything inside the "" will be executed after the klipper base pause (PAUSE_BASE) function
#variable_user_resume_macro: "" ; Everything inside the "" will be executed before the klipper base resume (RESUME_BASE) function
#variable_user_cancel_macro: "" ; Everything inside the "" will be executed before the klipper base cancel (CANCEL_PRINT_BASE) function
#gcode:

[gcode_macro START_PRINT]
gcode:
    {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
    {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
    # Start bed heating
    M140 S{BED_TEMP}
    # Use absolute coordinates
    G90
    # Reset the G-Code Z offset (adjust Z offset if needed)
    SET_GCODE_OFFSET Z=0.0
    # Home the printer
    G28
    # Move the nozzle near the bed
    G1 Z5 F3000
    # Move the nozzle very close to the bed
    G1 Z0.15 F300
    # Wait for bed to reach temperature
    M190 S{BED_TEMP}
    # Set and wait for nozzle to reach temperature
    M109 S{EXTRUDER_TEMP}

[gcode_macro END_PRINT]
gcode:
    # Turn off bed, extruder, and fan
    M140 S0
    M104 S0
    M106 S0
    # Move nozzle away from print while retracting
    G91
    G1 X-2 Y-2 E-3 F300
    # Raise nozzle by 10mm
    G1 Z10 F3000
    G90
    # Disable steppers
    M84

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 69.463
#*# pid_ki = 1.209
#*# pid_kd = 997.664

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*# [bltouch]
#*# z_offset = 2.500

```

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 24, 2024, 7:52pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/13 "2024-06-24T19:52:04Z")

</div>

Is it normal that if I run PROBE\_CALIBRATE again that it will add a new block while keeping the old?

---

<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: [June 24, 2024, 7:57pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/14 "2024-06-24T19:57:13Z")

</div>

Issue is, you have multiple

```auto
#*# <---------------------- SAVE_CONFIG ---------------------->

```

blocks.

Only the first one is valid.  
Also you have config code after the first

```auto
#*# <---------------------- SAVE_CONFIG ---------------------->

```

block. That’s not proper too.

Delete all lines that start with `#*#` - only those - and add this at the very end:

```auto
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh 60 Deg C]
#*# version = 1
#*# points =
#*# 0.240000, 0.055000, 0.022500, 0.047500, 0.102500
#*# 0.232500, 0.075000, 0.062500, 0.100000, 0.162500
#*# 0.187500, 0.042500, 0.042500, 0.077500, 0.135000
#*# 0.217500, 0.060000, 0.042500, 0.047500, 0.065000
#*# 0.187500, 0.050000, 0.047500, 0.060000, 0.090000
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 15.0
#*# max_x = 188.0
#*# min_y = 15.0
#*# max_y = 191.0
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 69.463
#*# pid_ki = 1.209
#*# pid_kd = 997.664
#*#
#*# [bltouch]
#*# z_offset = 2.500

```

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 24, 2024, 8:05pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/15 "2024-06-24T20:05:17Z")

</div>

Thankyou! that appears to have cleared the error. Unfortunatly I start work in an hour and woont be able to test it for another 9 or so hours

---

<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: [June 24, 2024, 8:06pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/16 "2024-06-24T20:06:02Z")

</div>

Have fun at work - take care.

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 24, 2024, 8:06pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/17 "2024-06-24T20:06:57Z")

</div>

Fun and work? HAHA

Thanks again I really do appreciate all your help

---

<div class="post-metadata">

### Author: ![IamDan](https://avatars.discourse-cdn.com/v4/letter/i/3d9bf3/32.png) [@IamDan](https://klipper.discourse.group/u/IamDan)
#### Post date: [June 25, 2024, 6:40am UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/18 "2024-06-25T06:40:10Z")

</div>

I just want to say thanks agin for your help. The first layers are going down nicely

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)
#### Post date: [July 25, 2024, 4:40pm UTC](https://klipper.discourse.group/t/z-offset-im-going-crazy/17198/19 "2024-07-25T16:40:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
