Move exceeds maximum extrusion (occasionally)

Basic Information:

Printer Model: Artilerry Sidewinder X1
MCU / Printerboard: MKS Gen L
klippy.log
klippy.zip (84.1 KB)

Hi occasionally I get the following error code when starting a print:

Move exceeds maximum extrusion (12.507mm^2 vs 2.000mm^2)
See the 'max_extrude_cross_section' config option for details

My purge line goes up, makes a small move to the right and goes back again. The error occurs after the initial first purge line right move, before the printer is supposed to turn right and continue to draw the purge line on its way back.

I have trouble understanding the issue as this is the same purge line I have used on Marlin. Also I have used this purge line with Klipper for couple of weeks successfuly. Suddenly I am getting this error, occasionally on print start. But NOT always.

So my workaround is to start the print again, and again, until until it works. For some reason it is not 100% reproducible. Why could that be?

This is my start script:

[gcode_macro START_PRINT]
gcode:
    {% set BED_TEMP = params.BED_TEMP|default(60) %}
    {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200) %}
    RED
    M190 S{BED_TEMP} 
    G28
    G1 Z10.0 F3000 
    PURGE_LINE BED_TEMP={BED_TEMP} EXTRUDER_TEMP={EXTRUDER_TEMP}
    CYAN

This is my purge line:

[gcode_macro PURGE_LINE]
gcode:
    {% set BED_TEMP = params.BED_TEMP|int %}
    {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|int %}
    G90 ; added this because I thought it might resolve the issue, but it doesn't
    G92 E0 ; reset Extruder
    RED ; Turn on red LED
    M190 S{BED_TEMP}
    G1 X10 Y25 Z25.0 F5000.0
    M109 S{EXTRUDER_TEMP - 20}
    G1 X10 Y25 Z0.3 F5000.0
    G1 X10 Y260.0 Z0.3 F1500.0 E25 ; first line
    M104 S{EXTRUDER_TEMP}
# issue happens around here
    G1 X15 Y260.0 Z0.3 F1500.0 E26 ; small move to the right
    G1 X15 Y25 Z0.3 F1500.0 E51 ; and back
    G92 E0 ; reset Extruder
    G1 Z1.0 F3000

This command is requesting your printer to move +5mm in X
with speed 1500mm/m=25mm/s, so it’s requesting to do 0.2 second move and in same time interval purge 1mm of 1.75mm filament (on input) - which is 2.404… mm squared.

So if recalculate speed of filament to 1 second - you was asking to purge with speed 2.404*5=12.02, then system is trying to add there additional stuff from pressure advance and you will be at ~12.5mm.sq/s

But you extruder configuration is telling that:

max_extrude_cross_section = 2.0

Here is description from documentation:

#max_extrude_cross_section:
#   Maximum area (in mm^2) of an extrusion cross section (eg,
#   extrusion width multiplied by layer height). This setting prevents
#   excessive amounts of extrusion during relatively small XY moves.
#   If a move requests an extrusion rate that would exceed this value
#   it will cause an error to be returned. The default is: 4.0 *
#   nozzle_diameter^2

So you can decrease amount of filament in that command or reduce speed
Another option is to increase max_extrude_cross_section if you extruder can handle such rate.

But i doubt that your extruder can extrude with 0.3 layer hight at speed 5000mm/m
:slight_smile:

2 Likes

Thank you for the awesome breakdown.

I think the intention of

G1 X10 Y260.0 Z0.3 F1500.0 E25 ;first line
G1 X15 Y260.0 Z0.3 F1500.0 E26 ; move to the right

was to extrude 1mm of filament on the small move. Because E26 - E25 = E1. And probably that is how it has always worked? Since I have never had issues with this code strangely (and even now it works mostly).

Do I need to change to relative extrusion or something like that? Sorry I am quite new to understanding gcode :slight_smile:

EDIT:
The third command to move the nozzle back again is:

G1 X15 Y25 Z0.3 F1500.0 E51

It says E51, which makes sense as E51 - E26 (the move before) would be 25E, the same length like the first move again.

Why It did work previously - most probably somewhere is a bug, from my point of view klipper should catch it always :slight_smile:

To extrude 0.5mm wide 0.3 mm height extrusion (for 0.4 nozzle) you need 0.15mm.sqr/milimeter
Extruder always operate with Input side, now you have 1.75mm filament which equals to ~2.404mm.sq/mm - so we need to recalculate our output from nozzle back to input
0.15 * 5mm = 0.75 - on output, 0.75/2.404 = 0.311 - on input
so for your 5mm move I would decrease E move to +0.311
with speed 1500 it will give you 0.311*5=1.55mm.sq/s - below your limit.

About your long lines: your code is putting 25mm of 1.75 filament to 235mm move,
at 0.3 layer height you are putting out 0.852 wide extrusion line - this is very thick line for 0.4mm nozzle, it look good for 0.6mm nozle, for 0.4 I would reduce it to 0.6-0.5 width.
for 0.6 width it would be 0.6 * 0.3 * 235 / 2.404=17.6
for 0.5 width it would be 0.5 * 0.3 * 235 / 2.404=14.66

So I would reduce long lines also to 15mm on input.

So I would change those commands this way:

G1 X10 Y260.0 Z0.3 F1500.0 E15 ; first line, width ~0.5+ at 0.3 height
M104 S{EXTRUDER_TEMP}
G1 X15 Y260.0 Z0.3 F1500.0 E15.31 ; small move to the right with reduced width to 0.5
G1 X15 Y25 Z0.3 F1500.0 E30.31 ; and back, , width ~0.5+ at 0.3 height

1 Like

Oh man you’ve saved me a bunch of headaches! Couldn’t wrap my head around it before.

Thanks for the great explanations, I have now completely understood what was going wrong. With your approach I have fixed the underlying issue. Now that I look on my older purge lies, indeed I see the 5mm part was muuch thicker than the long lines… For some reason it worked but probably not very healthy for my extruder:)

I think I will have to report a bug on klipper. If Klipper would have been consistently warning me, definitely I would have fixed this earlier^^

Thank you again, you are a great help to the community :slight_smile:

Glad that it did help you and you did understand how everything behave in relation to speeds/flows/etc … Just don’t forget if some day you will change your nozzle size or height from your bed - you need to recalculate E values again.

BTW In another topic I’m collecting interest in new feature which I already implemented and if there enough interest I will try to push it to official release.

That feature is allowing to switch to another mode of operation where you don’t need to supply E values at all, you just once specify height and width of output and klipper will do the rest to maintain it regardless which speed do you use.
I think your story is another great example why that feature should exist.
So if you will have a minute, read first description (it’s looong topic to read) and if you think you would like to have it - vote for it (post some message).
Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.