#I don't know how to use the z-offset `save` button interface

14 messages · Page 1 of 1 (latest)

worthy lintel
#

Everytime I press "SAVE", then "SAVE CONFIG" in the interface, it returns this error in the console. So I guess I don't know how to use it. Can someone explain me ? Thx

worldly nymph
#

Can you send the printer.cfg and all other cfg files you include

worthy lintel
worldly nymph
#

Ok as a quick note, you do nothing wrong, it is a Klipper problem! Klipper can only comment stuff that is in the printer.cfg but your probe is in macros_euclide.cfg, we need to help Klipper one time and than it is able to handle it.

#

I will write a step by step description how to solve it, but it is to late for me today.

worthy lintel
#

oh, thanks a lot ! @worldly nymph No problem, I'm happy with knowing the cause, and even better if you can solve it, but don't worry I'm not in a hurry !

worthy lintel
#

temporarily I've put the probe section inside the printer.cfg.
Btw the behaviour of the zoffset interface is really weird : when you "increase" it in the interface, it actually behaves like it decreases the z-offset, and indeed if the Zoffset added in the interface is "+0.1mm" and save, then the new-zoffset will ben the former minus 0.1 mm ..... really really weird behaviour

worldly nymph
#

Putting the probe (temporary) in the printer.cfg is one way to do it. After you saved the first value you can put it back. In the following I will show you what needs to be changed by hand.

#
  1. open macros_euclid.cfg
  2. comment z_offset in your probe section. It will look like
[probe]
##    Euclid Probe
pin: ^PG11                   # use pin PA0 and enable internal pullup resistor as this is an NC switch  use ! to invert if needed
x_offset: 44                 # probe is offset 44mm from nozzle in X direction
y_offset: -9                 # probe is -9mm from nozzle in Y direction
#z_offset: 2.135             # TODO A MODIFIER ; trigger point is 9.5mm below nozzle. larger numbers move effective Z0 CLOSER to the nozzle
                             # atm, avec la buse avec bout en acier trempe, c'est du 2.02 avec du PLA
                             # je vais mettre du 2.25 pour du TPU
speed: 5                     # probing speed of 5mm/second ideal is <10mm/sec  
samples: 2                   # number of probes to perform per sample
samples_result: average      # normalization method: see config reference
sample_retract_dist: 3.0
samples_tolerance: 0.0075
samples_tolerance_retries: 3```
3) make a copy of printer.cfg (thats only needed if somethings goes wrong, we messing around in an area where a mistake cause klipper start to fail)
4) open printer.cfg
5) add the z_offset in the save config area ***(formatting is key here, so be carfully what you do)***
you add 
```ini
#*#
#*# [probe]
#*# z_offset = 2.135``` 
at the end of the file. The result will look like 
```ini
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [skew_correction bertha]
#*# xy_skew = 0.012
#*# xz_skew = 0.0
#*# yz_skew = 0.0
#*#
#*# [bed_mesh meshbed_35deg]
#*# version = 1
#*# points =
#*#       -0.058568, -0.115756, -0.159193, -0.167006, -0.107943, -0.032631
#*#       0.033932, -0.019818, -0.049506, -0.043256, 0.024869, 0.091744
#*#       0.028619, -0.013568, -0.032318, -0.026381, 0.040182, 0.096432
#*#       0.158619, 0.112994, 0.090182, 0.070182, 0.103932, 0.151119
#*#       0.155494, 0.113307, 0.082369, 0.047994, 0.080494, 0.128307
#*#       0.087994, 0.052994, 0.031119, -0.002318, 0.025182, 0.091119
#*# x_count = 6
#*# y_count = 6
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 45.0
#*# max_x = 340.0
#*# min_y = 45.0
#*# max_y = 367.95
#*#
#*# [probe]
#*# z_offset = 2.135```
6) restart klipper (if klipper starts normally all is fine and your formatted it correct )
7) change the babysteps
8) hit save to probe and SAVE_CONFIG
9) check that the value in the printer.cfg has changed
10) delete the copy of the printer.cfg
Than you are done. That methode is needed for any value that you try to modify and where the original value is outside of the printer.cfg. In your case the saving of a PID tune would fail in the exactly same way. That is the big disadvantage of include files as implemented in klipper today.
worldly nymph
#

What we do in step 2 is what klipper fails to do and therefor you get an error