OctoPrint-CalibrationCompanion icon indicating copy to clipboard operation
OctoPrint-CalibrationCompanion copied to clipboard

PID tuning both extruder / bed tuning"hangs" after reaching targeted bed temperature

Open ruedli opened this issue 3 years ago • 52 comments

Tried this 3 times now, on Prusa MK3S / MMU2S latest firmware. Plugin version 1.01 octoprint 1.7.0rc2

The extruder temperature seems to go though the tuning process, but the BED tuning never ends. I waited more than 25 minutes, no indication this will finish any time soon.

image

Let me know if further information is needed.

ruedli avatar Aug 17 '21 13:08 ruedli

Hi, why is the bed tuning "hanging" ? Does it seems to never end on the plugin interface, or on your printer screen ? On the logs side, it looks good: the 5 cycles are done and finishes with Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h The only thing is that the bed temperature seems to stay at 60°C after that the autotune has finished.

iFrostizz avatar Aug 17 '21 15:08 iFrostizz

Indeed, the progress bar is staying at 100% when the PID process is finished, and should go back to 0 instead. The only time when it goes at 0 is when a new PID autotune is started. But I don't understand how the bed temperature could stay at 60°C as if a "M190 ....." was sent to the printer, which the plugin is not doing. The only M190 that is in the code is in the start gcode, which is not triggered in this case. I'm not sure if this is a side effect of the M303 command, but if it's the case I will add the command to stop the bed heating. Your idea of displaying the PID constants is good, I'll do that for the next update as a notification at the end of the PID autotune.

iFrostizz avatar Aug 18 '21 16:08 iFrostizz

@ruedli That's a very good find, so it looks like the pid_tuning_finished boolean is set to true after that the PID tuning has been finished. I found that then: https://github.com/prusa3d/Prusa-Firmware/blob/538ce06bf036eb45b0b3bbef6fa50bd694f0c3a3/Firmware/ultralcd.cpp#L1330 Looks like the hotend(s) are all set to 0 °C in this line:

setAllTargetHotends(0); // reset all hotends temperature including the number displayed on the main screen but the: setTargetBed(0);

is indeed not called. So this sentence from you:

However it ALSO applies to extruder heating, not just bed heating

makes me doubt now... If it is the case, maybe that this is either not the place where the PID is finished in the code, or an error in the code... Maybe that it's a choice from the Prusa devs ? In this case, I don't really see why they have done that. If maybe you can confirm that the hotend is shut down, I will open an issue on their repo linking this issue. If not, I will simply set hotends and bed to 0°C in my plugin. I don't think that it would cause any UX issue.

Do you have the "PID cal. finished" message writter on your screen after the process by the way ?

iFrostizz avatar Aug 21 '21 16:08 iFrostizz

@iFrostizz I can test again tomorrow, but the fact that it sits in the lcd module makes me wonder. Either bad programming, or they are indeed just talking about targets set to display on the lcd. I mean: if you need to program temperature stuff, why rely on a call in the module that does lcd stuff? ultralcd did not come from marlin I believe, so there is potential for error here. ;-) After testing I can tell you more...

ruedli avatar Aug 21 '21 22:08 ruedli

@iFrostizz

And.... this leaves me to another observation, maybe storing the obtained PID values fails? I mean I get from the log 3 sets of PID, and instructions to store the last triple in the configuration file. When I do an M503, the reported PID values do not match the PID tuning.

image

Is there an easy explanation for this? Are you perhaps omitting the U1 option to use the result? Should another "issue" be opened for this observation?

I did a M301 P21.42 I2.15 D53.38 followed by an M500 and after that M503 shows the obtained PID values. Is this a bug in the plugin? I was under the impression that your pluging stores the obtained PID values, but it seems to skip the M301 (and perhaps the M304 for the bed as well).

Note that not all firmware supports U1, so relying on that might not be a good idea.

The result of the newly stored parameters is this, I guess these PID's are better then what I started with?

image

ruedli avatar Aug 22 '21 08:08 ruedli

Hi @ruedli, I ran a PID autotune from the plugin, we can see the 5 cycles here: image And at the end of the PID, the constants are stored (in the volatile memory) and the temperature target will drop at 0 °C automatically. image I'm using Marlin 2.0.7.2, which may be part of the changes from Marlin 1.x.x which is the based version of Prusa firmware.

The firmware for the Original Prusa i3 printers is proudly based on Marlin 1.0.x by Scott Lahteine

from https://github.com/prusa3d/Prusa-Firmware#prusa-firmware-mk3

As far as I can see, I haven't found the part containing the #define Kp ... where the constants are waiting for an M500 to store them in the EEPROM on your screenshot. I also found a tutorial on this link: https://www.snazzyit.com/pid-calibration-for-prusa-i3-mk2s-mk3-3d-printer/ explaining how to PID tune a MK2s/MK3 (might be including MK3s from your observations), and the constants are not stored there neither. We need to use M301. So! I will probably also need to add the M301 ... command in the next update, as well as cooling down the extruder/bed before storing the data for Prusa users.

iFrostizz avatar Aug 23 '21 18:08 iFrostizz

@iFrostizz

As far as I can see, I haven't found the part containing the #define Kp ...

Yes, this is not displayed from my firmware.

Yes, the fork for Prusa from Marlin is quite dated. Over that period, the two branches quite diverted, so what works in one branch is not necessarily working in the other. I just did a PID by issuing an M303, using U1. It definitely does not store.. And you see: after the tuning your "target" temperature reported to octoprint is 0. Mine stays at the PID tuning temperature... I am still seeing 2 degrees of overshoot. Will reduce P a bit and see if that's better. Maybe the Prusa algorithm is flawed somehow. I can see in your graph that after each cycle the result is slightly better. For me that seems not the case.

ruedli avatar Aug 23 '21 20:08 ruedli

@ruedli Maybe trying Marlin 2.0 would be a solution... Anyway, thanks for that reporting this issue!

iFrostizz avatar Aug 24 '21 15:08 iFrostizz

@ruedli I merged the update some days ago in the "devel" branch if you wish to test it. If not, I will pull request into the main branch after adding more nozzle sizes in some days.

iFrostizz avatar Aug 30 '21 13:08 iFrostizz

@iFrostizz

Thank François,

I installed the 1.02 from the devel branch, but the temperature is NOT reset, nor are the PID values stored.

image

I ensured the mark was set for storing the PID parameters, however, I do not think they are actually stored. I did an M503 afterwards. I think the PIDs are not stored? Af far as I can see you reset the fan speed, but not the temperature, as I do not see an M104 S0. As soon as I manually provide that gcode, temperature goes down. Was that not supposed to be done in your devel branch?

As far as I can see, you are not setting the U1 parameter when you issue the PID autotune M303.

image

This are the parameters I think:

image

Here is the full log.

Recv: T:44.2 /0.0 B:36.0 /0.0 T0:44.2 /0.0 @:0 B@:0 P:25.8 A:38.5 Recv: T:44.2 /0.0 B:36.0 /0.0 T0:44.2 /0.0 @:0 B@:0 P:25.8 A:38.2 Recv: T:44.0 /0.0 B:35.8 /0.0 T0:44.0 /0.0 @:0 B@:0 P:25.7 A:38.4 Recv: T:43.9 /0.0 B:35.9 /0.0 T0:43.9 /0.0 @:0 B@:0 P:25.8 A:38.4 Recv: T:43.8 /0.0 B:35.9 /0.0 T0:43.8 /0.0 @:0 B@:0 P:25.8 A:38.3 Recv: T:43.6 /0.0 B:35.9 /0.0 T0:43.6 /0.0 @:0 B@:0 P:25.8 A:38.0 Send: M106 S255 Recv: ok Recv: T:43.6 /0.0 B:35.7 /0.0 T0:43.6 /0.0 @:0 B@:0 P:25.8 A:38.1 Send: M303 E0 C10 S215 Recv: PID Autotune start Recv: T:43.33 @:127 Recv: T:44.81 @:127 Recv: T:49.02 @:127 Recv: T:54.14 @:127 Recv: T:59.53 @:127 Recv: T:65.43 @:127 Recv: T:71.72 @:127 Recv: T:77.01 @:127 Recv: T:83.05 @:127 Recv: T:88.21 @:127 Recv: T:93.97 @:127 Recv: T:99.53 @:127 Recv: T:104.54 @:127 Recv: T:109.95 @:127 Recv: T:115.38 @:127 Recv: T:119.84 @:127 Recv: T:125.09 @:127 Recv: T:129.38 @:127 Recv: T:134.44 @:127 Recv: T:139.06 @:127 Recv: T:143.49 @:127 Recv: T:148.24 @:127 Recv: T:152.94 @:127 Recv: T:156.91 @:127 Recv: T:161.18 @:127 Recv: T:165.20 @:127 Recv: T:169.30 @:127 Recv: T:173.70 @:127 Recv: T:177.41 @:127 Recv: T:181.45 @:127 Recv: T:185.77 @:127 Recv: T:189.20 @:127 Recv: T:193.16 @:127 Recv: T:196.88 @:127 Recv: T:199.93 @:127 Recv: T:204.15 @:127 Recv: T:207.50 @:127 Recv: T:210.99 @:127 Recv: T:214.74 @:127 Recv: T:217.66 @:0 Recv: T:219.84 @:0 Recv: T:220.25 @:0 Recv: T:219.11 @:0 Recv: T:217.29 @:0 Recv: T:214.90 @:127 Recv: T:212.34 @:127 Recv: T:210.73 @:127 Recv: T:211.30 @:127 Recv: T:213.39 @:127 Recv: T:215.89 @:0 Recv: T:218.39 @:0 Recv: T:219.58 @:0 Recv: T:219.17 @:0 Recv: T:217.86 @:0 Recv: T:215.57 @:0 Recv: bias: 116 d: 116 min: 210.73 max: 219.79 Recv: T:213.39 @:116 Recv: T:211.04 @:116 Recv: T:210.52 @:116 Recv: T:211.67 @:116 Recv: T:213.75 @:116 Recv: T:216.35 @:0 Recv: T:218.39 @:0 Recv: T:218.59 @:0 Recv: T:217.81 @:0 Recv: T:216.15 @:0 Recv: bias: 117 d: 117 min: 210.26 max: 218.91 Recv: T:213.49 @:117 Recv: T:211.72 @:117 Recv: T:211.09 @:117 Recv: T:212.29 @:117 Recv: T:214.22 @:117 Recv: T:216.67 @:0 Recv: T:218.39 @:0 Recv: T:218.59 @:0 Recv: T:217.60 @:0 Recv: T:215.57 @:0 Recv: bias: 116 d: 116 min: 211.09 max: 218.80 Recv: Ku: 38.32 Tu: 19.66 Recv: Classic PID Recv: Kp: 22.99 Recv: Ki: 2.34 Recv: Kd: 56.51 Recv: T:213.44 @:116 Recv: T:211.41 @:116 Recv: T:211.35 @:116 Recv: T:212.50 @:116 Recv: T:214.74 @:116 Recv: T:217.14 @:0 Recv: T:218.33 @:0 Recv: T:218.33 @:0 Recv: T:217.34 @:0 Recv: T:215.10 @:0 Recv: bias: 115 d: 115 min: 210.94 max: 218.70 Recv: Ku: 37.74 Tu: 19.67 Recv: Classic PID Recv: Kp: 22.64 Recv: Ki: 2.30 Recv: Kd: 55.68 Recv: T:212.40 @:115 Recv: T:211.09 @:115 Recv: T:211.25 @:115 Recv: T:212.40 @:115 Recv: T:215.05 @:0 Recv: T:217.14 @:0 Recv: T:218.28 @:0 Recv: T:217.81 @:0 Recv: T:216.35 @:0 Recv: bias: 116 d: 116 min: 210.73 max: 218.33 Recv: Ku: 38.85 Tu: 19.15 Recv: Classic PID Recv: Kp: 23.31 Recv: Ki: 2.43 Recv: Kd: 55.78 Recv: T:214.53 @:116 Recv: T:211.98 @:116 Recv: T:211.46 @:116 Recv: T:212.03 @:116 Recv: T:213.85 @:116 Recv: T:215.73 @:0 Recv: T:218.28 @:0 Recv: T:218.65 @:0 Recv: T:217.92 @:0 Recv: T:215.94 @:0 Recv: bias: 115 d: 115 min: 211.09 max: 218.85 Recv: Ku: 37.74 Tu: 19.67 Recv: Classic PID Recv: Kp: 22.64 Recv: Ki: 2.30 Recv: Kd: 55.67 Recv: T:213.80 @:115 Recv: T:211.41 @:115 Recv: T:210.94 @:115 Recv: T:211.93 @:115 Recv: T:214.06 @:115 Recv: T:216.51 @:0 Recv: T:217.86 @:0 Recv: T:218.54 @:0 Recv: T:217.55 @:0 Recv: T:215.99 @:0 Recv: bias: 115 d: 115 min: 210.78 max: 218.85 Recv: Ku: 36.28 Tu: 19.93 Recv: Classic PID Recv: Kp: 21.77 Recv: Ki: 2.18 Recv: Kd: 54.22 Recv: T:213.70 @:115 Recv: T:211.51 @:115 Recv: T:211.09 @:115 Recv: T:212.08 @:115 Recv: T:214.06 @:115 Recv: T:216.46 @:0 Recv: T:218.18 @:0 Recv: T:218.59 @:0 Recv: T:217.60 @:0 Recv: T:215.57 @:0 Recv: bias: 116 d: 116 min: 210.73 max: 218.70 Recv: Ku: 37.07 Tu: 19.67 Recv: Classic PID Recv: Kp: 22.24 Recv: Ki: 2.26 Recv: Kd: 54.68 Recv: T:213.44 @:116 Recv: T:211.51 @:116 Recv: T:211.61 @:116 Recv: T:212.76 @:116 Recv: T:214.84 @:116 Recv: T:217.24 @:0 Recv: T:218.96 @:0 Recv: T:218.59 @:0 Recv: T:217.45 @:0 Recv: T:215.26 @:0 Recv: bias: 113 d: 113 min: 211.20 max: 218.96 Recv: Ku: 37.08 Tu: 19.93 Recv: Classic PID Recv: Kp: 22.25 Recv: Ki: 2.23 Recv: Kd: 55.43 Recv: T:212.86 @:113 Recv: T:210.89 @:113 Recv: T:211.04 @:113 Recv: T:212.55 @:113 Recv: T:214.38 @:113 Recv: T:216.98 @:0 Recv: T:217.92 @:0 Recv: T:218.28 @:0 Recv: T:217.03 @:0 Recv: T:215.21 @:0 Recv: bias: 114 d: 114 min: 210.89 max: 218.28 Recv: Ku: 39.25 Tu: 19.68 Recv: Classic PID Recv: Kp: 23.55 Recv: Ki: 2.39 Recv: Kd: 57.92 Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h Recv: ok Send: M500 Recv: T:214.8 /215.0 B:31.2 /0.0 T0:214.8 /215.0 @:114 B@:0 P:24.7 A:37.6 Recv: echo:Settings Stored Recv: ok Send: M106 S0 Recv: ok Recv: T:212.1 /215.0 B:31.3 /0.0 T0:212.1 /215.0 @:0 B@:0 P:24.8 A:37.6 Recv: T:210.0 /215.0 B:31.2 /0.0 T0:210.0 /215.0 @:0 B@:0 P:24.8 A:37.6 Recv: T:208.3 /215.0 B:31.1 /0.0 T0:208.3 /215.0 @:0 B@:0 P:24.9 A:37.5 Recv: T:206.4 /215.0 B:31.1 /0.0 T0:206.4 /215.0 @:0 B@:0 P:24.8 A:37.7 Recv: T:204.7 /215.0 B:31.1 /0.0 T0:204.7 /215.0 @:0 B@:0 P:24.8 A:37.6

Send: M503 Recv: echo:Steps per unit: Recv: echo: M92 X100.00 Y100.00 Z400.00 E415.00 Recv: echo:UStep resolution: Recv: echo: M350 X16 Y16 Z16 E16 Recv: echo:Maximum feedrates - normal (mm/s): Recv: echo: M203 X200.00 Y200.00 Z12.00 E120.00 Recv: echo:Maximum feedrates - stealth (mm/s): Recv: echo: M203 X100.00 Y100.00 Z12.00 E120.00 Recv: echo:Maximum acceleration - normal (mm/s2): Recv: echo: M201 X1000 Y1000 Z200 E5000 Recv: echo:Maximum acceleration - stealth (mm/s2): Recv: echo: M201 X960 Y960 Z200 E5000 Recv: echo:Acceleration: P=print, R=retract, T=travel Recv: echo: M204 P1000.00 R1250.00 T1000.00 Recv: echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s) Recv: echo: M205 S0.00 T0.00 B0.00 X8.00 Y8.00 Z0.40 E4.50 Recv: echo:Home offset (mm): Recv: echo: M206 X0.00 Y0.00 Z0.00

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! vvvvvvvvv !!!!!!!!!!!!!!!!!!!!!!

Recv: echo:PID settings: Recv: echo: M301 P20.50 I2.08 D50.42

image

ruedli avatar Aug 31 '21 09:08 ruedli

@ruedli Sorry for that, I forgot to set the temperature at 0. Did you activated the checkbox below the PID configuration to store the values automatically?

iFrostizz avatar Aug 31 '21 09:08 iFrostizz

@iFrostizz Yes, I did. I think the checkbox resulted in a M500 code sent, but not the flag with the M303

ruedli avatar Aug 31 '21 11:08 ruedli

@ruedli Okay, I know why. Another "Marlin 1.x.x doesn't like marlin 2.x.x" because how I handled it was to wait for the line "Recv: Kp: xx Ki: xx Kd:xx", and wait for the PID to actually finish to send the lastly found values. In your case, you are getting this instead:

"Recv: Kp: xx"
"Recv: Ki: xx"
"Recv: Kd: xx"

in separated lines. I will find a workaround

iFrostizz avatar Aug 31 '21 19:08 iFrostizz

I hope that it is fixed now. If it worked, you cannot miss it... A message should appear image

iFrostizz avatar Aug 31 '21 20:08 iFrostizz

@iFrostizz

Hi François

Almost, but not there yet ;-)

Temperature goes down, there is an attempt to store the Pid values, but the values were undefined and consequently failed.

This is the log now, as well as the M503 output to verify what was stored: all zeroes.

Recv: T:88.8 /0.0 B:21.5 /0.0 T0:88.8 /0.0 @:0 B@:0 P:23.6 A:32.4 Recv: T:88.2 /0.0 B:21.4 /0.0 T0:88.2 /0.0 @:0 B@:0 P:23.6 A:32.3 Send: M303 E0 C5 S215 Recv: PID Autotune start Recv: T:87.02 @:127 Recv: T:87.75 @:127 Recv: T:90.83 @:127 Recv: T:94.62 @:127 Recv: T:99.54 @:127 Recv: T:104.82 @:127 ........ Recv: T:217.76 @:0 Recv: T:215.94 @:0 Recv: bias: 115 d: 115 min: 210.63 max: 218.75 Recv: Ku: 36.04 Tu: 20.19 Recv: Classic PID Recv: Kp: 21.63 Recv: Ki: 2.14 Recv: Kd: 54.59 Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h Recv: ok Recv: T:214.6 /215.0 B:21.5 /0.0 T0:214.6 /215.0 @:115 B@:0 P:24.1 A:33.9 Send: M500 Recv: echo:Settings Stored Recv: ok Send: M106 S0 Recv: ok Send: M301 E0 Pundefined Iundefined Dundefined Recv: ok p:0.00 i:0.00 d:0.00 c:1.00 Recv: ok Send: M500 Recv: echo:Settings Stored Recv: ok Send: M104 S0 Recv: ok Send: M301 E0 Pundefined Iundefined Dundefined Recv: ok p:0.00 i:0.00 d:0.00 c:1.00 Recv: ok Send: M500 Recv: echo:Settings Stored Recv: ok Send: M104 S0 Recv: ok

Recv: T:212.4 /0.0 B:21.5 /0.0 T0:212.4 /0.0 @:0 B@:0 P:24.1 A:33.7 21.6 /0.0 T0:201.3 /0.0 @:0 B@:0 P:24.1 A:33.5 Recv: T:199.5 /0.0 B:21.6 /0.0 T0:199.5 /0.0 @:0 B@:0 P:24.1 A:33.8

Output from the M503:

Recv: echo:PID settings: Recv: echo: M301 P0.00 I0.00 D0.00

Conclusion: Almost, but not there yet ;-)

ruedli avatar Sep 01 '21 18:09 ruedli

The message after calibration pops up, then disappears after a few seconds. As far as I could see, it did not have correct PID values though. Is that my settings, or do you intend it to popup and disappear that way?

ruedli avatar Sep 01 '21 18:09 ruedli

Very probably an error in the code that is picking up the values from the received gcode commands. It is meant to fade out, but maybe that it makes more sense to let it "pinned" ?

iFrostizz avatar Sep 01 '21 20:09 iFrostizz

@ruedli I hope that it's fine now..

edit: I see that at the end of your logs:

Send: M301 E0 Pundefined Iundefined Dundefined
Recv: ok p:0.00 i:0.00 d:0.00 c:1.00
Recv: ok
Send: M500
Recv: echo:Settings Stored
Recv: ok
Send: M104 S0
Recv: ok
Send: M301 E0 Pundefined Iundefined Dundefined
Recv: ok p:0.00 i:0.00 d:0.00 c:1.00

Looks like the M301 has been sent twice, tough the Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h has been received once. Could that be your error from copy/paste ?

iFrostizz avatar Sep 01 '21 20:09 iFrostizz

I'll try again.. Going through some SW problems myself, trying to make my OctoPlugout mqtt aware...

ruedli avatar Sep 01 '21 20:09 ruedli

OK, think you nailed it now. And.. pinned dialog is better ;-)

Verified the settings, they were stored...

Nasty one, but glad we could work it out!

Cheers Ruud

Recv: bias: 67 d: 67 min: 212.55 max: 217.34 Recv: Ku: 35.61 Tu: 19.67 Recv: Classic PID Recv: Kp: 21.36 Recv: Ki: 2.17 Recv: Kd: 52.53 Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h Recv: ok Send: M500 Recv: T:214.9 /215.0 B:21.2 /0.0 T0:214.9 /215.0 @:67 B@:0 P:23.9 A:28.7 Recv: echo:Settings Stored Recv: ok Send: M106 S0 Recv: ok Send: M301 E0 P21.36 I2.17 D52.53 Recv: ok p:21.36 i:2.17 d:52.53 c:1.00 Recv: ok Send: M500 Recv: echo:Settings Stored Recv: ok Send: M104 S0

ruedli avatar Sep 01 '21 21:09 ruedli

Ooopsss...

After the extruder tuning I did a (bed only) tuning. It ruined the PID settings for the extruder...

This seems OK:

ecv: B:60.36 @:0 Recv: B:60.34 @:0 Recv: B:60.23 @:0 Recv: B:60.13 @:0 Recv: bias: 57 d: 57 min: 59.44 max: 60.60 Recv: Ku: 124.83 Tu: 48.26 Recv: Classic PID Recv: Kp: 74.90 Recv: Ki: 3.10 Recv: Kd: 451.82 Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h Recv: ok Recv: T:33.0 /0.0 B:59.9 /60.0 T0:33.0 /0.0 @:0 B@:57 P:27.0 A:38.1 Send: M500 Recv: echo:Settings Stored Recv: ok Send: M301 E-1 P74.90 I3.10 D451.82 Recv: ok p:74.90 i:3.10 d:451.82 c:1.00 Send: M500 Recv: ok Send: M140 S0 Recv: echo:Settings Stored Recv: ok

But when I check my settings with M503 I get:

ecv: echo:PID settings: Recv: echo: M301 P74.90 I3.10 D451.82 Recv: echo:PID heatbed settings: Recv: echo: M304 P88.01 I3.90 D496.19

Not sure how the extruder ones got changed... Did not do anything manually. Can you reproduce this?

image

ruedli avatar Sep 01 '21 21:09 ruedli

The OTHER window in which I had octoprint open (not on the calibration tab) reported this:

image

No idea where it picked this up, but this is where the wrong settings came from after bed-only-tuning

ruedli avatar Sep 01 '21 21:09 ruedli

Well, it looks like I'm sending M301 for the bed and for the extruder too. And the gcode to send is M304, the index for extruders is between 0 to ... So at this point, I'm not sure about the behavior of the firware if it's sending M301 E-1 ..., maybe that's flushing the values like that ?

iFrostizz avatar Sep 01 '21 21:09 iFrostizz

I pushed the update, could you please try ?

iFrostizz avatar Sep 01 '21 21:09 iFrostizz

I am now issuing both extruder/bed tuning. The be tuning finished. On the window of the calibration I have:

image

But on the OTHER window I have:

image

That's a bit strange isn't it?

ruedli avatar Sep 01 '21 21:09 ruedli

It is, could I see your logs please ?

iFrostizz avatar Sep 01 '21 21:09 iFrostizz

ecv: B:60.53 @:0 Recv: B:60.45 @:0 Recv: B:60.34 @:0 Recv: B:60.23 @:0 Recv: B:60.14 @:0 Recv: B:60.00 @:0 Recv: bias: 55 d: 55 min: 59.48 max: 60.54 Recv: Ku: 132.30 Tu: 45.37 Recv: Classic PID Recv: Kp: 79.38 Recv: Ki: 3.50 Recv: Kd: 450.17 Recv: B:59.91 @:55 Recv: B:59.80 @:55 Recv: B:59.63 @:55 Recv: B:59.58 @:55 Recv: B:59.55 @:55 Recv: B:59.48 @:55 Recv: B:59.52 @:55 Recv: B:59.53 @:55 Recv: B:59.69 @:55 Recv: B:59.70 @:55 Recv: B:59.81 @:55 Recv: B:59.89 @:55 Recv: B:60.14 @:0 Recv: B:60.25 @:0 Recv: B:60.31 @:0 Recv: B:60.57 @:0 Recv: B:60.54 @:0 Recv: B:60.54 @:0 Recv: B:60.54 @:0 Recv: B:60.48 @:0 Recv: B:60.38 @:0 Recv: B:60.16 @:0 Recv: B:60.16 @:0 Recv: B:60.06 @:0 Recv: bias: 56 d: 56 min: 59.47 max: 60.63 Recv: Ku: 122.92 Tu: 47.73 Recv: Classic PID Recv: Kp: 73.75 Recv: Ki: 3.09 Recv: Kd: 439.98 Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h Recv: ok Send: M500 Recv: T:23.8 /0.0 B:60.0 /60.0 T0:23.8 /0.0 @:0 B@:56 P:26.1 A:39.3 Recv: echo:Settings Stored Recv: ok Send: M303 E0 C5 S215 Recv: PID Autotune start Recv: T:23.72 @:127 Recv: T:25.75 @:127 Recv: T:30.73 @:127 Recv: T:35.50 @:127 Recv: T:42.00 @:127 Recv: T:47.61 @:127 Recv: T:54.00 @:127 Recv: T:60.67 @:127 Recv: T:66.07 @:127 Recv: T:72.39 @:127 Recv: T:78.54 @:127 Recv: T:83.82 @:127 Recv: T:89.70 @:127 Recv: T:95.42 @:127 Recv: T:100.31 @:127 Recv: T:105.98 @:127 Recv: T:110.74 @:127 Recv: T:116.10 @:127 Recv: T:121.33 @:127 Recv: T:125.89 @:127 Recv: T:130.88 @:127 Recv: T:135.94 @:127 Recv: T:139.99 @:127 Recv: T:145.13 @:127 Recv: T:149.73 @:127 Recv: T:153.96 @:127 Recv: T:158.41 @:127 Recv: T:162.43 @:127 Recv: T:166.76 @:127 Recv: T:171.00 @:127 Recv: T:174.81 @:127 Recv: T:178.96 @:127 Recv: T:183.21 @:127 Recv: T:186.82 @:127 Recv: T:190.63 @:127 Recv: T:194.51 @:127 Recv: T:197.60 @:127 Recv: T:201.61 @:127 Recv: T:205.00 @:127 Recv: T:208.66 @:127 Recv: T:212.60 @:127 Recv: T:215.89 @:0 Recv: T:218.59 @:0 Recv: T:220.50 @:0 Recv: T:219.90 @:0 Recv: T:218.28 @:0 Recv: T:216.51 @:0 Recv: T:213.96 @:127 Recv: T:211.35 @:127 Recv: T:210.89 @:127 Recv: T:212.34 @:127 Recv: T:214.84 @:127 Recv: T:217.34 @:0 Recv: T:219.17 @:0 Recv: T:219.22 @:0 Recv: T:218.07 @:0 Recv: T:216.51 @:0 Recv: bias: 116 d: 116 min: 210.89 max: 219.53 Recv: T:213.96 @:116 Recv: T:211.46 @:116 Recv: T:210.73 @:116 Recv: T:211.41 @:116 Recv: T:213.80 @:116 Recv: T:215.94 @:0 Recv: T:217.97 @:0 Recv: T:218.39 @:0 Recv: T:217.76 @:0 Recv: T:215.78 @:0 Recv: bias: 116 d: 116 min: 210.73 max: 218.65 Recv: T:213.49 @:116 Recv: T:211.72 @:116 Recv: T:211.51 @:116 Recv: T:212.81 @:116 Recv: T:214.74 @:116 Recv: T:217.03 @:0 Recv: T:218.70 @:0 Recv: T:218.65 @:0 Recv: T:217.45 @:0 Recv: T:215.31 @:0 Recv: bias: 113 d: 113 min: 211.15 max: 218.91 Recv: Ku: 37.08 Tu: 19.92 Recv: Classic PID Recv: Kp: 22.25 Recv: Ki: 2.23 Recv: Kd: 55.41 Recv: T:213.33 @:113 Recv: T:211.35 @:113 Recv: T:211.04 @:113 Recv: T:212.34 @:113 Recv: T:214.38 @:113 Recv: T:216.61 @:0 Recv: T:218.49 @:0 Recv: T:218.85 @:0 Recv: T:218.02 @:0 Recv: T:215.89 @:0 Recv: bias: 114 d: 114 min: 210.94 max: 218.85 Recv: Ku: 36.67 Tu: 20.20 Recv: Classic PID Recv: Kp: 22.00 Recv: Ki: 2.18 Recv: Kd: 55.54 Recv: T:213.59 @:114 Recv: T:211.51 @:114 Recv: T:211.09 @:114 Recv: T:212.19 @:114 Recv: T:214.53 @:114 Recv: T:216.93 @:0 Recv: T:218.65 @:0 Recv: T:218.96 @:0 Recv: T:218.02 @:0 Recv: T:216.46 @:0 Recv: bias: 113 d: 113 min: 210.99 max: 219.06 Recv: Ku: 35.64 Tu: 20.74 Recv: Classic PID Recv: Kp: 21.39 Recv: Ki: 2.06 Recv: Kd: 55.44 Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h Recv: ok Recv: T:214.5 /215.0 B:45.9 /0.0 T0:214.5 /215.0 @:113 B@:0 P:26.4 A:37.7 Send: M500 Recv: echo:Settings Stored Recv: ok Send: M106 S0 Recv: ok Send: M301 E0 P73.75 I3.09 D439.98 Recv: ok p:73.75 i:3.09 d:439.98 c:1.00 Recv: ok Send: M500 Recv: echo:Settings Stored Recv: ok Send: M104 S0 Recv: ok Send: M301 E-1 P73.75 I3.09 D439.98 Recv: ok p:73.75 i:3.09 d:439.98 c:1.00 Recv: ok Send: M500 Recv: echo:Settings Stored Recv: ok Send: M140 S0 Recv: ok Send: M301 E0 P21.39 I2.06 D55.44 Recv: ok p:21.39 i:2.06 d:55.44 c:1.00 Recv: ok Send: M500 Recv: echo:Settings Stored Recv: ok Send: M104 S0 Recv: ok Send: M301 E-1 P21.39 I2.06 D55.44 Recv: ok p:21.39 i:2.06 d:55.44 c:1.00 Recv: ok Send: M500 Recv: echo:Settings Stored Recv: ok Send: M140 S0 Recv: ok Recv: T:211.9 /0.0 B:45.5 /0.0 T0:211.9 /0.0 @:0 B@:0 P:26.3 A:37.6 Recv: T:209.6 /0.0 B:45.5 /0.0 T0:209.6 /0.0 @:0 B@:0 P:26.4 A:37.7 Recv: T:208.0 /0.0 B:45.4 /0.0 T0:208.0 /0.0 @:0 B@:0 P:26.4 A:37.4 Recv: T:206.3 /0.0 B:45.3 /0.0 T0:206.3 /0.0 @:0 B@:0 P:26.3 A:37.6 Recv: T:204.3 /0.0 B:45.1 /0.0 T0:204.3 /0.0 @:0 B@:0 P:26.5 A:37.3 Recv: T:202.6 /0.0 B:45.0 /0.0 T0:202.6 /0.0 @:0 B@:0 P:26.4 A:37.3 Recv: T:200.7 /0.0 B:44.9 /0.0 T0:200.7 /0.0 @:0 B@:0 P:26.4 A:37.3 Recv: T:199.2 /0.0 B:44.7 /0.0 T0:199.2 /0.0 @:0 B@:0 P:26.4 A:37.4 Recv: T:197.8 /0.0 B:44.8 /0.0 T0:197.8 /0.0 @:0 B@:0 P:26.4 A:37.4 Recv: T:196.4 /0.0 B:44.5 /0.0 T0:196.4 /0.0 @:0 B@:0 P:26.4 A:37.4

ruedli avatar Sep 01 '21 21:09 ruedli

This one seems wrong...

Send: M301 E0 P73.75 I3.09 D439.98

ruedli avatar Sep 01 '21 21:09 ruedli

I see... The PID applying command should be sent just after that the PID is finished. Here, the buffer is full and the command is queued.

iFrostizz avatar Sep 01 '21 21:09 iFrostizz

I'll wait for another version to try, but this is still a problem I guess. Don't rush, make sure it works at your place first ;-)

ruedli avatar Sep 01 '21 21:09 ruedli