# X-in/1-out non mixing extruders problem with \`max\_extrude\_cross\_section\`

**URL:** <https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruders-problem-with-max-extrude-cross-section/20587>\
**Category:** General Discussion\
**Created:** [December 11, 2024, 3:54am UTC](https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruders-problem-with-max-extrude-cross-section/20587 "2024-12-11T03:54:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![balzes](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@balzes](https://klipper.discourse.group/u/balzes)\
**Post date:** [December 11, 2024, 3:54am UTC](https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruders-problem-with-max-extrude-cross-section/20587/1 "2024-12-11T03:54:52Z")

</div>

### Basic Information:

Printer Model: Zonestar Z9V5-MK4 (non-mixing E4 4to1 extruder)  
 MCU / Printerboard: stock ZM3E4 V2.1 with clone of STM32 (APM32 F103VET6 by Geehy)  
 Host / SBC: PC Ubuntu / and the same errors on RPi-4B 8Gb  
 klippy.log  
[klippy.log](https://klipper.discourse.group/uploads/short-url/8mWMK44wUgD9LXbusx4m2VRi4zc.log) (209.9 KB)

### Describe your issue:

Tried to reproduce something similar to [X-In/1-Out Non-Mixing Extruder - Automate SuperSlicer & PrusaSlicer Filament Swaps](https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruder-automate-superslicer-prusaslicer-filament-swaps)  
and after getting stuck for a week in loop of `Move exceeds maximum extrusion` / `Stepper too far in past` trying to think what could be better.

### Background:

All slicer based on Slic3r (Prusa, Orca, SuperSlicer) if enabled `Single extruder multi-material` and `Wipe tower` generate similar G-Code block on filament change ( retract to cool zone, perform `ramming` to avoid blob on the end, retract to parking position, extrude new material till the hot end) and  
to avoid creating blob due too bleeding, they move printhead left-right during material “extruding” from parking position till the hot-end:

```auto
G1 X66.200 Y20.260 Z0.3
G4 S0
M220 S100
; CP TOOLCHANGE LOAD
G1 E5.6 F180 ; <= ok, only extruding
G1 X101.200 E19.6 F2000 ; <= problematic, as both extrudes and moves along X
G1 X66.200 E2.8 F2100
; CP TOOLCHANGE WIPE
G1 X126.200 E3.26 F1584
G1 X125.450 Y20.760 E0.049
G1 X66.200 E3.2192
G1 X66.950 Y21.260 E0.049
G1 X125.450 E3.1785
G1 X66.950 F2000

```

For my understanding Klipper allows “extrude only” moves using `max_extrude_only_distance` setting, but if the move combines X/Y/Z movement it starts checking `max_extrude_cross_section` and fails on “unparking” move that combines wiping to prevent bleeding.  
This forces disabling `max_extrude_cross_section` on multi-extruder printer.  
And as a result it won’t highlight places where it might be violated, causing `Stepper too far in past`.

In addition, such conditions causing `Stepper too far in past` might be not only part of a G-Code itself, but might be caused by high `Pressure Advance` settings combined with default (0.04s) `SMOOTH_TIME` and medimum speeds/accelerations (that was solved by both increasing `SMOOTH_TIME`:

```auto
pressure_advance = 0.6
pressure_advance_smooth_time = 0.1

```

and reducing print speed.

### Proposal

1. make `max_extrude_cross_section` macro controlable so it might be posible to disabled it by setting high number before tool changing and enabled back after.
2. is it possible to limit PA compensation to avoid it generating something above board capabilities? and maybe some easy way to debug it? I didn’t find in manual how to plot command graph after PA compensation.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [December 11, 2024, 9:34am UTC](https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruders-problem-with-max-extrude-cross-section/20587/2 "2024-12-11T09:34:33Z")

</div>

I’m not sure if your conclusions are correct in any sense.  
Especially the `Stepper too far in past` error seems more like a consequence of your code modifications than something related to the items discussed in your post.

---

<div class="post-metadata">

**Author:** ![balzes](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@balzes](https://klipper.discourse.group/u/balzes)\
**Post date:** [December 11, 2024, 3:55pm UTC](https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruders-problem-with-max-extrude-cross-section/20587/3 "2024-12-11T15:55:32Z")

</div>

@Sineos

the first code is from slicer without modifications (up to macros, but `; CP TOOLCHANGE LOAD` section is as-is)  
you can see it with lower rates at [link](https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruder-automate-superslicer-prusaslicer-filament-swaps/5285) above

> Blockquote  
> Due to the long length of 140mm, this process, Klipper may throw a _Move exceeds maximum extrusion (##.###mm^2 vs 0.640mm^2)_ error, or similar.

Regarding PA, attaching log of running:

```auto
G28 ; home
G91 ; relative coordinates

SET_PRESSURE_ADVANCE ADVANCE=0.1 SMOOTH_TIME=0.04
G1 X8 E2 F8000

SET_PRESSURE_ADVANCE ADVANCE=0.2 SMOOTH_TIME=0.04
G1 X8 E2 F8000

SET_PRESSURE_ADVANCE ADVANCE=0.3 SMOOTH_TIME=0.04
G1 X8 E2 F8000

SET_PRESSURE_ADVANCE ADVANCE=0.4 SMOOTH_TIME=0.04
G1 X8 E2 F8000

SET_PRESSURE_ADVANCE ADVANCE=0.5 SMOOTH_TIME=0.04
G1 X8 E2 F8000

SET_PRESSURE_ADVANCE ADVANCE=0.6 SMOOTH_TIME=0.04
G1 X8 E2 F8000 ; fails on `Stepper too far in past`

```

[klippy\_smooth\_0.04.log](https://klipper.discourse.group/uploads/short-url/hSjvgOlns4pfVDM74mjlyYvanpW.log) (151.4 KB)

tried on the same failing line increase smooth to 0.4 and 0.8 and it still fails so maybe this command is too harsh, but on real print, smooth time is what helped me.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [February 9, 2025, 3:56pm UTC](https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruders-problem-with-max-extrude-cross-section/20587/4 "2025-02-09T15:56:15Z")

</div>

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