Extrusion Multiplier versus Custom "Before layer change G-code"
Clear all

Extrusion Multiplier versus Custom "Before layer change G-code"  

Active Member
Extrusion Multiplier versus Custom "Before layer change G-code"

Hi everyone,

I am printing very thin lines on the XL Multitool at first layer. I managed to get MUCH better detailed results when bumping up extrusion multiplier a litte bit in Filament Settings. But I want this increased extrusion multiplier only for the first layer - all other layers should have default extrusion multiplier of 1.0

I came up with a solution that uses a custom G-Code that is entered at "Printer Settings"-Tab at "Before layer change G-Code". I added this code:

G92 E0.0
{if (layer_num == 0)}M221 S120{endif}
{if (layer_num > 0)}M221 S100{endif}

This basically should set extrusion multiplier to 1.2 (120%) for layer_num 0 and all other layers are set to 1.0.

I experienced that this seems not to work on the PrusaXL as print results are still the same (slight underextrusion). It seems that my M221 Command for layer 0 is ignored and default extrusion multiplier 1.0 is used. I could prove this behaviour when I enter 1.2 at "Filament-Settings"-Tab for extrusion multiplier. This way I get different results and more filament is extruded resulting in a perfect print!

But I want to understand why this is the case.

I saw my custom g-code in the final g-code file but as said it seems to have no effect. Only changing extrusion multiplier at filament settings tab has the desired effect. As a side node I figured out, that Prusa removed the old Starting M221 Command for the PrusaXL. The following code is found for non XL profiles, f.e. for the MK3S at "Start G-code":

M221 S{if layer_height<0.075}100{else}95{endif}

Can anyone please push me in the right direction what am I doing wrong?


Posted : 17/11/2023 2:23 pm