SAVE_CONFIG section ‘bltouch’ option ‘z_offset’ conflicts with included value

Struggling like hell with this.

SAVE_CONFIG section ‘bltouch’ option ‘z_offset’ conflicts with included value

I dont have any seperate .cfg files and save_config wont update my printer.cfg with the “do not edit below this line”

This is my second klipper installation on this machine, i have an e3max running perfectly.
Tried to get my e3pro running, however no dice.
printer (1).cfg (6.5 KB)

any help at all would be appreciated as i seem to have checked all the threads relating to this and cant figure it out on my own :frowning:

Hello @lukabert !

There is no SAVE_CONFIG section in your printer.cfg.

It wont auto generate.
If i tun save config it throws up that error

See SAVE_CONFIG section 'bltouch' option 'z_offset' conflicts with included value

Tried this last night.
I dont have any .cfg other than my printer.cfg and inputshaper.cfg which is commented out.
Going crazy with this.
Is there a workaround to get klipper to rrcognize a minus z offset value?

Please attach a recent klippy.log and try removing the comments on:

 x_offset: -50                          # modify as needed for bltouch location
 y_offset: -9                         # modify as needed for bltouch location
 z_offset: 0.0                    # modify as needed for bltouch or run PROBE_CALIBRATE

There cannot be a negative z-offset as this would mean your probe trigger is higher than the nozzle

apologies for the delay in the response and thank you so much for your help so far.
So i created a new printer.cfg and its still throwing up the same error.
I dont have any include commands in my printer.cfg and i dont have anywhere to pull them from in my directory.
I have included a klippy log which shows the save_config has been applied but it will not populate the auto-generated field in my printer.cfg.
Ive also included a copy of my new printer.cfg
klippylog excerpt.txt (6.3 KB)
new printer cfg.txt (5.8 KB)

Please always post the complete and unmodified log. Use zip if too big.

klippy log full.txt (544.3 KB)
Apologies, i assumed the excerpt would have sufficed

I became a bit blinded.
I was trying to be lazy and use probe_calibrate to set my z offset using the bl touch.
Its not ideal but i can set it manually, as long as my printer has its functionality i can live without probe_calibrate

try removing the blanks

i am a complete idiot, thank you so much.
forgot i printed a spacer for my cr touch previously to avoid the offset running into the negatives too.
all well and good now, thank you!

OK, I am running into this same problem now. I need the community’s help. I added the BL_touch to my setup. I can manually set the offset, but when I try to use probe_calibrate to fine tune and then save, it gives me the error.

The help document just says remove include… I don’t have anything included to my knowledge…

Please help.

Printer: Ender 6

Here is my entire printer.cfg file:

# This file contains pin mappings for the stock 2020 Creality Ender 6.
# To use this config, during "make menuconfig" select the STM32F103
# with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.

# Because this printer has factory wiring, mounts, and firmware for
# a BLTouch, but does not ship with one at this time, default values
# for the sensor have been specified, but disabled, in anticipation of
# future revisions or user modification. User should take care to
# customize the offsets, particularly z-offset, for their specific unit.

# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC

# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.

# See docs/Config_Reference.md for a description of parameters.

[virtual_sdcard]
path: ~/printer_data/gcodes

[display_status]

[pause_resume]

[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
gcode:
  PAUSE_BASE
  _TOOLHEAD_PARK_PAUSE_CANCEL

[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
  ##### read extrude from  _TOOLHEAD_PARK_PAUSE_CANCEL  macro #####

  {% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %}
  #### get VELOCITY parameter if specified ####
  {% if 'VELOCITY' in params|upper %}
    {% set get_params = ('VELOCITY=' + params.VELOCITY)  %}
  {%else %}
    {% set get_params = "" %}
  {% endif %}
  ##### end of definitions #####
  {% if printer.extruder.can_extrude|lower == 'true' %}
    M83
    G1 E{extrude} F2100
    {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
  {% else %}
    {action_respond_info("Extruder not hot enough")}
  {% endif %}
  RESUME_BASE {get_params}

[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
variable_park: True
gcode:
  ## Move head and retract only if not already in the pause state and park set to true
  {% if printer.pause_resume.is_paused|lower == 'false' and park|lower == 'true'%}
    _TOOLHEAD_PARK_PAUSE_CANCEL
  {% endif %}

  TURN_OFF_HEATERS
  CANCEL_PRINT_BASE

[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
description: Helper: park toolhead used in PAUSE and CANCEL_PRINT
variable_extrude: 1.0
gcode:
  ##### set park positon for x and y #####
  # default is your max posion from your printer.cfg

  {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  {% set z_park_delta = 2.0 %}
  ##### calculate save lift position #####
  {% set max_z = printer.toolhead.axis_maximum.z|float %}
  {% set act_z = printer.toolhead.position.z|float %}
  {% if act_z < (max_z - z_park_delta) %}
    {% set z_safe = z_park_delta %}
  {% else %}
    {% set z_safe = max_z - act_z %}
  {% endif %}
  ##### end of definitions #####
  {% if printer.extruder.can_extrude|lower == 'true' %}
    M83
    G1 E-{extrude} F2100
    {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
  {% else %}
    {action_respond_info("Extruder not hot enough")}
  {% endif %}
  {% if "xyz" in printer.toolhead.homed_axes %}
    G91
    G1 Z{z_safe} F900
    G90
    G1 X{x_park} Y{y_park} F6000
    {% if printer.gcode_move.absolute_coordinates|lower == 'false' %} G91 {% endif %}
  {% else %}
    {action_respond_info("Printer not homed")}
  {% endif %}
  
[stepper_x]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 260
position_max: 260
homing_speed: 50

[stepper_y]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop: 260
position_max: 260
homing_speed: 50

[stepper_z]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
#position_endstop: 0.0                     # disable to use BLTouch
#endstop_pin: ^PA7                         # disable to use BLTouch
endstop_pin: probe:z_virtual_endstop    # enable to use BLTouch
position_min: -5                        # enable to use BLTouch
position_max: 400

[safe_z_home]                           # enable for BLTouch
 home_xy_position: 150.7, 137
 speed: 100
 z_hop: 10
 z_hop_speed: 5

[bltouch]                               # enable for BLTouch
 sensor_pin: ^PB1
 control_pin: PB0
 x_offset: -20.7
 y_offset: -7
 z_offset: 3.775
 speed: 3.0

[bed_mesh]                              # enable for BLTouch
 speed: 100
 mesh_min: 10, 10
 mesh_max: 239, 239
 algorithm: bicubic
 probe_count: 5, 5

[screws_tilt_adjust]
screw1: 53,45
screw1_name: front left screw
screw2: 243,45
screw2_name: front right screw
screw3: 243,235
screw3_name: rear right screw
screw4: 53,235
screw4_name: rear left screw
horizontal_move_z: 10
speed: 250
screw_thread: CW-M4

[extruder]
max_extrude_only_distance: 1000.0
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 22.857
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
pid_Kp: 26.949
pid_Ki: 1.497
pid_Kd: 121.269
min_temp: 0
max_temp: 260

[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_Kp: 327.11
pid_Ki: 19.20
pid_Kd: 1393.45
min_temp: 0
max_temp: 100

[fan]
pin: PA0

[filament_switch_sensor e0_sensor]
switch_pin: PA4

[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command

[printer]
kinematics: corexy
max_velocity: 500
max_accel: 2000
max_z_velocity: 10
max_z_accel: 100

[firmware_retraction]
retract_length: 6.5
# The length of filament (in mm) to retract when G10 is activated,
# and to unretract when G11 is activated (but see
# unretract_extra_length below). The default is 0 mm.
retract_speed: 25
# The speed of retraction, in mm/s. The default is 20 mm/s.
unretract_extra_length: 0
# The length (in mm) of *additional* filament to add when
# unretracting. (Default is 0)
unretract_speed: 25
# The speed of unretraction, in mm/s. The default is 10 mm/s.
[gcode_macro G29]
gcode:
    G28
    BED_MESH_CALIBRATE

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 	  -0.190000, -0.220000, -0.140000, -0.132500, -0.142500
#*# 	  -0.145000, -0.102500, -0.100000, -0.102500, -0.117500
#*# 	  -0.060000, -0.072500, 0.010000, -0.017500, -0.045000
#*# 	  -0.125000, -0.052500, -0.092500, -0.090000, -0.090000
#*# 	  -0.142500, -0.142500, -0.175000, -0.155000, -0.155000
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 10.0
#*# max_x = 239.0
#*# min_y = 10.0
#*# max_y = 239.0

@Sineos Those spaces are the problem. They are present in the original (example) file that was copied for the Ender 6, but if they are there then it won’t save_config. The knowledge base article (which looks like you wrote it, at SAVE_CONFIG section 'bltouch' option 'z_offset' conflicts with included value should be updated with this possible fix as well, it would have saved me hours of searching and needlessly asking this question. Maybe something like “Make sure that the configuration section for BL-Touch does not have any preceding spaces. Example…”

Thanks!

Not really; they are only present if you carelessly uncomment the relevant sections and leave the blanks dangling.

Generally, I agree to add this error scenario, as the error message itself does not clearly indicate the cause.

Done. See SAVE_CONFIG section 'bltouch' option 'z_offset' conflicts with included value