Issue with PID_CALIBRATE / heater_generic / SAVE_CONFIG

Basic Information:

[Elegoo Neptune 4 Pro] Printer Model:
[STM32F401 ZNP-K1 V1.0] MCU / Printerboard:

Describe your issue:

After tuning the PID settings for a generic heater [heater_generic heater_bed_outer], saving the configuration incorrectly updates the printer.cfg.

The SAVE_CONFIG section should label the heater as its full name;
#*# [heater_generic heater_bed_outer]

Currently, it just writes #*# [heater_bed_outer], causing the system to ignore the new PID settings. This also causes the previous PID values further up the printer.cfg to be left un-commented out.

Manual Fix: Rename the section from ## [heater_bed_outer] to # # [heater_generic heater_bed_outer] and manually comment out the old PID values further up the printer.cfg to ensure the new settings are used.

printer.cfg after running PID_CALIBRATE HEATER=heater_bed_outer TARGET=60

[heater_generic heater_bed_outer]
heater_pin:PC8
max_power:1.0
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin:PC2
control = pid
pid_kp = 75.301
pid_ki = 1.383
pid_kd = 1025.032
min_temp:0
max_temp:120
pwm_cycle_time: 0.0167

## <---------------------- SAVE_CONFIG ---------------------->
#
# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
##
#
# [heater_bed_outer]
## control = pid
#
# pid_kp = 73.372
## pid_ki = 0.807
#
# pid_kd = 1667.369

Hello @halfmanbear !

Where is the klippy.log that has been asked for?

Please attach it to your next post.

1 Like

Indeed, I can replicate this behavior. Seems a bug.

yes I think it’s this in pid_calibrate.py

heater_name = gcmd.get(‘HEATER’)

Think needs a condition if it’s a generic heater so ‘heater_generic’ can be prepended

I’ve created Fix PID_CALIBRATE command when used with heater_generic by KevinOConnor · Pull Request #6517 · Klipper3d/klipper · GitHub as a fix for this issue.

-Kevin

1 Like

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