Solved When do retraction settings take effect?
-
When do M207 retraction settings take effect during a print?
I'm adjusting retraction distance, using simple tower test prints, but thought I'd be clever and embed M207 commands that adjust retraction for each layer, using PrisaSlicer embedded layer change gcode:
M207 S{layer_z/20} R0 F3600 Z0.1
The gcode is generated fine, with the M207 as expected, but the printer ignores the commands for many layers.
For example, the first layer starts:
; Filament start gcode M207 S1.2 R0 F3600 Z0.1 ; set firmware retraction parameters M572 S1.0 ; set pressure advance ;;; ; printer layer change to 0 = 0.2mm M207 S0.01 R0 F3600 Z0.1 G1 Z0.200 F7200.000 ;;; G10 ; retract G1 X-0.002 Y26.114 G11 ; unretract G1 F1800.000 G1 X-15.634 Y26.113 E0.49015 G1 X-17.219 Y25.908 E0.05009 G1 X-18.750 Y25.481 E0.04984
So the 'Filament start gcode' is my starting point and contains a retraction of 1.2mm. However, before the first plastic is extruded there's an M207 that sets a retraction of 0.01mm. The second layer has a retraction of 0.0175mm, etc.
However, when printing, it is very obvious (from holding the filament as it feeds into the extruder) that the first several layers print with a retraction of around 1mm, and presumably the 1.2mm that is set initially, even though it is aparently countermanded two lines later in the gcode file. Some way up the towers the retraction does reduce markedly, but I can't really tell what it reduces to.
(It's a delta, with something like a 500mm bowden. Board: Duet 3 MB6HC (MB6HC), DSF Version: 3.1, Firmware: RepRapFirmware for Duet 3 MB6HC 3.1.1 (2020-05-19b2). I'm really struggling to get retraction sorted. Drives, speeds etc. in config.g are:
M569 P0.5 S1 ; physical drive 0.5 goes forwards M584 X0.0 Y0.1 Z0.2 E0.5 ; set drive to axis mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X160.00 Y160.00 Z160.00 E830.00 ; set steps per mm M592 D0 A0.0007 B0.0010 ; configure non-linear extrusion, though negligible correction ; Speeds M566 X1200.00 Y1200.00 Z1200.00 E800.00 ; set maximum instantaneous speed changes (mm/min) M203 X40000 Y40000 Z40000 E7880 ; set maximum speeds (mm/min) M201 X1200 Y1200 Z1200 E800 ; set accelerations (mm/s^2) M906 X1260 Y1260 Z1260 E1000 I30 ; set motor currents (mA) and motor idle percentage
-
M207 commands embedded in the GCode stream take effect at the next G10 /G11 command in that stream; except that if M207 occurs between G10 and G11 commands and the Z hop changes, then the G11 command will undo the original amount of Z hop, not the new amount.
-
Aha! User error - a pressure advance line had crept back in to my settings and that was giving me large amounts of retraction. Presumably it got less higher up the print because it happened to be printing slower.
Thanks.
-
I'm glad you got it sorted. I'll mark this as solved