Dear all,
I have been following this post to compensate for nonlinear extrusion. I slightly modified the file to see what happens if I introduce the adjusted extrusion parameters also and to give some extra info while doing the experiment:Nonlinear_extrusion.txt
I wanted to calibrate my PETG first. So I ran the macro 3 times each for temperatures of 235, 245 and 255 degrees Celsius. You can see the results in the figure. Then I made a second-order fit for each of the three lines so that each line would be approximated with Bx^2 + Ax + C. It was my understanding that I could use
M592 D0 A0.0107 B0.00044 L0.45 ;Nonlinear extrusion: Bx^2 + Ax + C
To compensate for the Bx^2 and Ax. So I still needed to find a way to compensate for the C. As I already carefully calibrated my extruder steps per mm, and I could not find a gcode command for the extrusion multiplier, I decided to go for M221.
I ended up with the following starting gcode to compensate for each temperature:
{if temperature[0] < 240}
M221 D0 S103.97
M592 D0 A0.005 B0.0015 L0.45 ;Nonlinear extrusion: Bx^2 + Ax + C
{endif}
{if temperature[0] >= 240 and temperature[0] <= 250}
M221 D0 S102.71
M592 D0 A0.0107 B0.00044 L0.45 ;Nonlinear extrusion: Bx^2 + Ax + C
{endif}
{if temperature[0] > 250}
M221 D0 S102.95
M592 D0 A0.0093 B-0.00012 L0.45 ;Nonlinear extrusion: Bx^2 + Ax + C
{endif}
However, if I rerun my macro at 245 degrees Celsius with:
M221 S102.71
M592 D0 A0.0107 B0.00044 L0.45 ;Nonlinear extrusion: Bx^2 + Ax + C
I end up with the line labeled "245C, comp". It seems that the command M221 does not influence my result. I expected that if I insert e.g., M221 D0 S200, that if I command 50mm of extrusion, the printer would actually extrude 100 mm. Can somebody explain to me what I am doing wrong or if I am misunderstanding the way M221 works?