PID tune not being saved in printer.cfg?

Basic Information:

Printer Model: OrangeStorm Gigs
MCU / Printerboard:
Host / SBC
klippy.log
klippy.zip (4.0 MB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:


I had an error while printing.

Heater extruder not heating at expected rate
See the ‘verify_heater’ section in docs/ Config_Reference.mo
for the parameters that control this check.
Once the underlying issue is corrected, use the
“FIRMWARE_RESTART” command to reset the firmware, reload the
config, and restart the host software.
Printer is shutdown

I thought maybe I should try a PID tune. but as I do it, I am not seeing any changes being made to the file. for instance.
[heater_generic heater_bed3]
gcode_id:M110
heater_pin:PA0
max_power:1.0
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin:PC0
smooth_time: 0.1
control: pid
pid_Kp: 75.212
pid_Ki: 0.833
pid_Kd: 1697.917
min_temp: 0
max_temp: 130
#control = pid
#pid_Kp = 70.591
#pid_Ki = 1.055
#pid_Kd = 1180.632

the value the “#” before it is the value before and after saving and restarting after the PID tune for that plate. the value without the “#” is the value the PID tune told me and I manually added. Also the only place I even see anything about the extruder temp in the file is commented out at the bottom. I am guessing it is getting the data somewhere else, just not like the build plate. any ideas? thanks

Look at the bottom of your printer.cfg

It helps if you remove any tune settings from anywhere, even comment, but leave the one at the bottom in that commented section.

at the bottom of the printer config I have this, but it does not match the values I see set anywhere else. except the lest one that I manually added seems to be there. (removed bed mesh data and input shaping)

## DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#
#
## [extruder]
#
# control = pid
## pid_kp = 33.500
#
# pid_ki = 6.204
## pid_kd = 45.225
#
#

## [heater_bed]
#
# control = pid
## pid_kp = 75.416
#
# pid_ki = 0.842
## pid_kd = 1688.369
#
#
## [heater_bed1]
#
# control = pid
## pid_kp = 74.945
#
# pid_ki = 0.756
## pid_kd = 1857.698
#
#
## [heater_bed2]
#
# control = pid
## pid_kp = 73.969
#
# pid_ki = 0.773
## pid_kd = 1769.702
#
#
## [heater_bed3]
#
# control = pid
## pid_kp = 75.212
#
# pid_ki = 0.833
#*# pid_kd = 1697.917

Remove any dups from the cfg files even includes that are already at the bottom of the printer.cfg (these should be the only entries) save all that you made changes to, then restart Klipper, then rerun PID tune for the heaters. You should see new numbers there at the bottom after a SAVE

what I don’t understand is where is it getting the data to set the extruder temp? it shows an auto generated setting, so it is getting that from somewhere. as it is right now, I am unable to complete a print. I get that error somewhere during the print. sometimes it is 30% this last one made it 75% is there a possible issue with the thermistor?

The command is
PID_CALIBRATE HEATER=device TARGET=temp

Replace device with extruder or heater_bed
Replace temp with the temperature to calibrate.

Since I print mainly ABS or ASA I calibrated my bed at 100C with this command

PID_CALIBRATE HEATER=heater_bed TARGET=100

I did those and saved the data before, but it did not actually update the printer config file. I think my printer config file is slightly different then most as I have 4 build plates and can have 4 extruders. I hesitate to just put the settings in manually. I am also wondering why it has been working fine for over 100 hours printing and now it won’t complete anything. I did not change anything from the last prints that succeeded to now all the ones that are failing. I am actually trying to print the same exact file that was the last successful print. maybe something is corrupted in it though.

If you have multiple cfg files and using include you might want to check all of them.

See Missed scheduling of next digital out event
The Heater extruder not heating at expected rate seems only a direct symptom.

i did just find another config file for each extruder. however the PID section for having a single extruder is missing from the file. the other 3 files for adding multiple extruders each have a pid section in them. I copied that part into the one for the single extruder. not I am doing another calibrate and will get those numbers into the file and see if that helps.

Have you checked that there is only one SAVE_CONFIG block at the end of the printer.cfg?

so the calibration says my PID should be

pid_kp : 32.222
pid_ki : 6.318
pid_kd : 41.083

the printer settings had it at

pid_kp : 26.213
pid_ki : 1.304
pid_kd : 131.721

I don’t know what the numbers mean but looks like a big difference.

Yes there is only 1 save config in the printer.cfg

that looks interesting. is there a way to set it at a different timing? I wouldn’t think it should have to be change all of a sudden but maybe that would fix it.

hmm. maybe manually adding that PID section wasn’t the right thing to do. this time when I tried to save the pid with the option I get this error.

{‘error’: ‘WebRequestError’, ‘message’: “SAVE_CONFIG section ‘extruder’ option ‘control’ conflicts with included value”}

yep took it back out and now it saves… and it also shows updated in the bottom comment section, so i guess it is working after all. printer isn’t though…

1 Like