PID Tuning
-
@noblebran M301 https://duet3d.dozuki.com/Wiki/Gcode#Section_M301_Set_PID_parameters sets the PID parameters, but we use M307 to model the heater process parameters; it's more flexible. See this note in the M301 description:
Note: PID parameters are computed automatically when the M307 command is used to define the heater model, or from the default heater model if no M307 command is provided. You can use M301 to override those computed PID parameters, but this is not recommended because it prevents RepRapFirmware from using different PID parameters depending on the heating phase.
I'm not sure, but you may see the current parameters in use if you send M301.
Ian
-
@jay_s_uk I don't know, I literally am new to reprap, I have used smoothieware with the little monster printer and the board went up in smoke so I decided to go to the Duet. My apologies for asking.
-
@64bit It saved the RRF, not the PID.
-
@droftarts Thank you, I will try M307... I appreciate the response.
-
@noblebran The output for PID tuning is an M307 line with R, C and D values so what you describe is expected.
What command did you use to tune the hotend/bed? -
@jay_s_uk I used "m303 h1 s210". I get the PID values when I type in M307 H1, but they don't seem to save as it doesn't help with the heating, it still fails and heats too fast (over runs by 15c+ and then faults).
-
@noblebran if you use a part cooling fan, I suggest using
M303 T0 S210
instead and then the fan is ran during the tuning process so its affect can be taken into account.What output did you get in the console when you ran the tuning? Does it match whats shown with the output of M307 H1?
Are you running the correct voltage heater cartridge for your system? What wattage is it? -
@jay_s_uk thank you, I do have the part cooling fans running during tuning. I am, I am running a 40 watt heat cartridge, I bought everything from e3d and its been great. Never had an issue.
m307 h1
Heater 1 model: heating rate 3.658, cooling time constant 136.6, dead time 14.00, max PWM 1.00, calibration voltage 0.0, mode PID
Computed PID parameters: setpoint change: P3.5, I0.080, D34.2, load change: P3.5, I0.124, D34.2I am running it now to see if it matches.
-
@jay_s_uk now I get this:
Auto tuning heater 1 completed after 3 idle and 5 tuning cycles in 659 seconds. This heater needs the following M307 command: M307 H1 B0 R3.539 C260.4 D14.22 S1.00 V23.1 Send M500 to save this command in config-override.g
m307 h1 Heater 1 model: heating rate 3.539, cooling time constant 260.4, dead time 14.22, max PWM 1.00, calibration voltage 23.1, mode PID Computed PID parameters: setpoint change: P3.5, I0.058, D35.3, load change: P3.5, I0.106, D35.3
They seem to be slightly different but my heat temp still goes above 250 when aiming for 210.
-
@noblebran yep, that looks pretty normal.
AddM307 H1 B0 R3.539 C260.4 D14.22 S1.00 V23.1
to your config.g or send M500 (ensuring M501 is at the end of your config.g) and check that config-override.g matches -
@noblebran said in PID Tuning:
They seem to be slightly different but my heat temp still goes above 250 when aiming for 210.
did you tune as H1 or T0?
-
@jay_s_uk I tuned as H1 as my fan was already on.
-
@noblebran you're best of tuning using T0 as the PWM power will be adjusted automatically to take into account whether the fan is on or not
-
@jay_s_uk said in PID Tuning:
M307 H1 B0 R3.539 C260.4 D14.22 S1.00 V23.1
I had that in my config already, that is why I am so confused...
-
@jay_s_uk I will do that.
-
@jay_s_uk said in PID Tuning:
@noblebran you're best of tuning using T0 as the PWM power will be adjusted automatically to take into account whether the fan is on or not
Still after all the tuning, I am running the T0 as mentioned and look at this graph. I have seen literally no changes.
Crazy, huh???
-
@noblebran what type of hotend are you running? thats stupidly fast heat up
is your config.g correct for your thermistor? -
@jay_s_uk its all e3d volcano, just replaced everything with this build. Granted it is extremely warm and humid where I am right now.
This is what I am using for the thermistor:
M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp
I believe that is correct?
-
@noblebran if you're using an E3D thermistor, no
M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.060000e-8
Can you confirm what you purchased?
-
@noblebran said in PID Tuning:
@jay_s_uk its all e3d volcano, just replaced everything with this build. Granted it is extremely warm and humid where I am right now.
This is what I am using for the thermistor:
M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp
I believe that is correct?
I do not have the e3d thermistor then. It is just a regular type k thermistor. I will order a new one, but I ran it on smoothieware for years and never had an issue. odd I how I don't have a problem now, I am buying a new block that allows the use of a cartridge but the one I have now isn't big enough for a cartridge.
Do you know of anyway to compensate or reduce the power to the cartridge to allow it to heat up less?
The cartridge is 12v also, not sure if that matters. I would think if it is 24v (set up that way) wouldn't it burn up?