Max_extrude_only_distance

Basic Information:

Printer Model: Voron 2.4
MCU / Printerboard: Spider V1.1
Host / SBC RPI3B
klippy.log
logs-20240725-204533.zip (1.7 MB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

Below is my cfg section about the extruder. I got an error after resume for colour change saying Extrude only move too long (-100.000mm vs 50.000mm)
But in my extruder section I cannot find anything that specifies this.

…# Extruder
#####################################################################

In E0-MOT Position

[extruder]
step_pin: PD5
dir_pin: !PD6
enable_pin: !PD4

Update value below when you perform extruder calibration

If you ask for 100mm of filament, but in reality it is 98mm:

rotation_distance = <previous_rotation_distance> * <actual_extrude_distance> / 100

22.6789511 is a good starting point

#rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears
rotation_distance: 21.5450035 #Bondtech 5mm Drive Gears

Update Gear Ratio depending on your Extruder Type

Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio)

Use 80:20 for M4, M3.1

gear_ratio: 50:17 #BMG Gear Ratio
microsteps: 16
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
nozzle_diameter: 0.400
filament_diameter: 1.75

In E0 OUT Position

heater_pin: PB15

Validate the following thermistor type to make sure it is correct

sensor_type: ATC Semitec 104GT-2
sensor_pin: PC0
min_temp: 10
max_temp: 300
max_power: 1.0
min_extrude_temp: 180
#control = pid
#pid_kp = 26.213
#pid_ki = 1.304
#pid_kd = 131.721

Try to keep pressure_advance below 1.0

pressure_advance: 0.051

Default is 0.040, leave stock

pressure_advance_smooth_time: 0.040

In E0-MOT Position

Make sure to update below for your relevant driver (2208 or 2209)

[tmc2209 extruder]
uart_pin: PD7
interpolate: false
run_current: 0.57
hold_current: 0.4
sense_resistor: 0.110
stealthchop_threshold: 0

Now I read up on this error and a suggestion was made by Hywellmartin on github Change Filament: Temporarily disable max_extrude_only_distance to change filament · Issue #857 · Klipper3d/klipper · GitHub
to add some lines to the cfg under the extruder. But I am not sure about this because I cannot even find this limiting statement.

What should I do. The retracting distance for my extruder is 100 mm already so clearly 50 is not enough.

Advise would be greatly appreciated.

first error message in klippy is line 24608. I tried resume twice so it will be there multiple times.

Kind regards,
3dcase (Kees)

Hello @3dcase !

You join this forum for a certain time. You may should know by now, that code snippets should be formatted as Preformatted Text with the feature in the forum editor.
Format
This makes code reading more easy and spaces and other character are not gone.

Also, this sequence should be in your klippy.log as well.

1 Like

I had time to look at your log.

First:

Git version: 'v0.12.0-75-g94719fe32-dirty'

The Klipper version is manipulated. Hard to say what has changed and what may be the cause of your issue.

For further information on [extuder], you may look here:

https://www.klipper3d.org/Config_Reference.html#extruder

Hi EddyMI3D,
First of all thanks for taking the time to look, much appreciated.
Secondly my apologies for the code snippit, you are right I have seen this as an issue and in the heat of the problem moment, and losing a print, it slipped my mind.

I know this klipper is dirty and I know I should build my own, truth is coding is totally not in my comfortzone and I am building up to it but still hesitant. It would help me decide very quickly if it stopped working but rather not :wink:

Where would this piece of extruder code normally be, and if I find it what would you recommend changing it to?

I promise to start my own klipper build soon, to be honest I am getting frustrated with what the builder of my machine has done with it!
We live and learn.

How do you change the filament, i.e. what commands etc do you use? Please describe the process.

I use prusa slicer to switch colour and in the config I wrote a M600 macro for it. I am not near my machine this weekend so I am hoping this code is also in my klippy which was attached. If not I have to attach it later on Monday night.
This colour change has worked for me before with the klipper macro, not sure what has changed tbh.
I recall I changed the length of retraction since the stealthburner is higher then these 50 mm by default.
Maybe that is why it threw this error this time but I cannot find this limiting code anywhere.
Is it always set at 50 even when you don’t call it in the cfg for extruder?

You should look into your workflow and slicer settings. Some things that you need to consider:

  • For the extruder movement in the M600 you are switching to G91, which will subtract it from the current position of the extruder. This should be OK
  • There is no G92 E0 that would null the extruder position
  • In doubt, Klipper’s max extrusion length is 50 mm, so may need to add max_extrude_only_distance: 100.0 in the [extruder] section

In theory, it should be something like this:

    SAVE_GCODE_STATE NAME=M600_state
    PAUSE # When using the default webif macros then it includes parking
          # You can also customize the parking positions: https://github.com/mainsail-crew/mainsail-config?tab=readme-ov-file#customize-macros
    G90 ; switch to absolute positioning
    M82 ; switch to absolute extrusion 
    G92 E0 ; reset extruder
    G1 E-100 F1000 ; retract
    RESTORE_GCODE_STATE NAME=M600_state

Why I prefer the “absolute” approach:

    G90 ; switch to absolute positioning
    M82 ; switch to absolute extrusion 
    G92 E0 ; reset extruder

Personally, I hate working in any relative mode, as it always requires keeping in mind that every action takes the current position as basis. Saving and restoring the gcode state will make sure that you continue with the mode you have started with, so it doesn’t matter that the macro might have switched to another mode.

2 Likes

The default value is 50 as noted here in the configuration reference for the extruder section. If you want to change this to a different value, you will need to add a line to your extruder section such as max_extrude_only_distance: 150

1 Like

Thank you so much Sineos, that is very well explained and as soon as I am back home I will implement these things.
As soon as I understand it to the point that I am confident enough I will build a new klipper on my spare pi.
Until then I will use this working dirty klipper that I have as a learning curve.

Very happy to report that everything seems ok now.
Cannot thank you enough for taking your time to help out beginners in klipper like me.
:hugs:

1 Like

Glad to hear that you are making progress. :+1:

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