M500 after PID autotune overwrites G31 in config-override.g
-
Will have to check with DC42 on whether this is the expected behaviour of M500.
-
The comment about changing the layer change G-Code in PrusaSlicer - what change do you make?
How are you keeping the "macro" from updating config_override.g on every layer change?
Frederick
-
@phaedrux I just tried with using M500 P31 to save the PID values and it worked just fine. G31 is no longer being overwritten.
As we use a macro for PID tuning is well I can simply store via M500 P31 and the problem should be solved.
Of course we cannot prevent users to run PID autotune outside our macro which then could be a potential issue. For now I think it should be OK though.
-
@fcwilt thanks for your tip!
Here is what I use in the "before layer change gcode" in Prusaslicer:
G92 E0.0 ; reset extruder position to 0 {if layer_z == layer_height+first_layer_height}M98 P"layer_change.g"{endif} ; execute layer_change.g ;[layer_z]
This only executes the macro on layer change from layer 1 to 2.
-
@flobler said in M500 after PID autotune overwrites G31 in config-override.g:
@fcwilt thanks for your tip!
Here is what I use in the "before layer change gcode" in Prusaslicer:
G92 E0.0 ; reset extruder position to 0 {if layer_z == layer_height+first_layer_height}M98 P"layer_change.g"{endif} ; execute layer_change.g ;[layer_z]
This only executes the macro on layer change from layer 1 to 2.
Thanks.
If for some reason in the future you would need to run code on other layer changes it would be easy using a RRF global variable to make the "first layer" test in your macro and simply have M98 P"layer_change.g" in the slicer.
This would also have the minor benefit of keeping all of your code together in your macro.
Frederick
-
@fcwilt That's a great point, thank you!
-
@phaedrux said in M500 after PID autotune overwrites G31 in config-override.g:
Will have to check with DC42 on whether this is the expected behaviour of M500.
What should be happening is:
- Once you save using M500 P31 then assuming you have one or more Z probes defined, a G31 line or lines will be written to config-override.g
- If you have M501 in config.g then that G31 command will be read at boot time and the "save G31 settings with M500 automatically" flag will be set. So subsequently, sending M500 without the P31 parameter will include saving G31 settings.
- If you delete config-override.g or you manually edit out the G31 lines from config-override.g and then reboot, M500 will no longer write the G31 settings unless you specify the P31 parameter.
-
see my post here:
https://forum.duet3d.com/topic/24830/config-override-parameters-gets-lost-after-saving/4
Looks like the same issue
-
@cr3d this is now fixed in the 3.4 source code.
-
@dc42 ok perfect
When will it be released... we have to pack an idex machine on the weekend and that should also be included ...
-
@cr3d I can provide an internal build for you to test with. Would that help? Which Duet do you have?
-
@dc42 Ok ... better than nothing
At this printer there is a Duet 2 Wifi EA + Duex 5
-
@cr3d the current internal build is at https://www.dropbox.com/sh/qkexrvhgsebbz0g/AAD9gfyS8UIU5Sau311WS1oLa?dl=0.
-
Quick answer -> now it works!
We can use M500 / M500 P10 / M500 P31 / M500 P10:31 and nothing gets deleted
Thank you!
-
Great, thanks everyone for the help! Looking forward to the fix!