Using extrusion_multiplier in GCODE

Using extrusion_multiplier in GCODE  

Active Member


I use this code at layer change to have a higher flow on the first layer. Unfortunately PS does not fall back to the EM value given in the Filament settings and needs a M221 S... Code for following layers.


G92 E0
{if layer_num == 0}
M221 S110
{if layer_num == 1}
M221 S90

My idea is to use the extrusion_muliplier variable here, but this by factor 100 to small. So instead of S90, I get S0.9

Is there any chance to use the EM value in the filament settings here? It happens very often, that I changed the EM value, but the printer settings are still using S90.


kind regards


Posted : 07/04/2021 2:01 pm
Honorable Member

Not sure I understand what you're trying to accomplish here but it seems the behavior you're seeing makes sense.

M221 S[percentage] expects percentage, eg M221 S90 for ninety percent. extrusion_multiplier is, well, a multiplier, so a value of 1 is 100%, 0.9 is 90 etc. 

I'm not a GCODE expert but I think M221 S{extrusion_multiplier * 100} might work (per

Posted : 07/04/2021 9:06 pm
Active Member

You are correct, that is the problem here. 

Thank you for the link, after a few test I found out, that the variable is an array, so this finally works for me


M221 S{extrusion_multiplier[0] * 100}

Posted : 08/04/2021 6:03 am

Please Login or Register