Unable to infer active extruder stepper

I have been running a 2 in one out Non-Mixing Extruder Config with SHARED_HEATER on the 2nd extruder successfully for a while. Apparently SHARED_HEATER is being deprecated and replaced with [extruder_stepper] object. I’ve followed several different examples to try to get this to work, X-In/1-Out Non-Mixing Extruder Config, https://www.reddit.com/r/klippers/comments/tpya6o/does_anyone_know_of_a_3to1_or_2to1_mixing_hotend/
Neither of which seems to address the problem I’m having. The firmware switches between T0 and T1 manually as expected however it will not switch when initiated by gcode generated by SupeSlicer. In SuperSlicer the change from T0 to T1 works as expected but the errors out on the change from T1 to T0

08:50:09
Unable to infer active extruder stepper
08:47:51
pressure_advance: 0.880000
pressure_advance_smooth_time: 0.040000
08:47:51
Extruder stepper now syncing with 'extruder'
08:47:51
Extruder stepper now syncing with ''
08:47:51
Switching to extruderI.
08:47:45
pressure_advance: 0.000000
pressure_advance_smooth_time: 0.040000
08:44:53
pressure_advance: 0.800000
pressure_advance_smooth_time: 0.040000
08:43:53
Retries: 1/20 Probed points range: 0.001591 tolerance: 0.005000

Printer.cfg:

[extruder]
max_extrude_cross_section: 50.0
max_extrude_only_distance: 1010.0
step_pin: PG12
dir_pin: !PG11
enable_pin: !PG13
microsteps: 16
rotation_distance: 7.64
nozzle_diameter: 0.600
filament_diameter: 1.750
heater_pin: PB1 # Heat0
sensor_pin:  PC1 # T0 Header
sensor_type: EPCOS 100K B57560G104F

[gcode_macro T0]
gcode:

    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder MOTION_QUEUE=
    # Activate stepper in extruder
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder

[extruder_stepper belted_extruder]
extruder:
step_pin: PD6
dir_pin: !PD5
enable_pin: !PD7
microsteps: 16
rotation_distance: 7.64

[gcode_macro T1]
gcode:
   
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    # Activate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder MOTION_QUEUE=extruder

   [gcode_macro ACTIVATE_EXTRUDER]
description: Replaces built-in macro for a X-in, 1-out extruder configuration SuperSlicer fix
rename_existing: ACTIVATE_EXTRUDER_BASE
gcode:
    {% if 'EXTRUDER' in params %}
      {% set ext = params.EXTRUDER|default(EXTRUDER) %}
      {% if ext == "extruder"%}
        {action_respond_info("Switching to extruder.")}
        T0
      {% elif ext == "belted_extruder" %}
        {action_respond_info("Switching to belted_extruder.")}
        T1
      {% else %}
        {action_respond_info("EXTRUDER value being passed.")}
        ACTIVATE_EXTRUDER_BASE EXTRUDER={ext}
      {% endif %}
    {% endif %}


[delayed_gcode activate_default_extruder]
initial_duration: 1
gcode:
    ACTIVATE_EXTRUDER EXTRUDER=extruder

SuperSlicer Filament Settings > Custom Code > Start G-code:
Filament1:
SET_PRESSURE_ADVANCE ADVANCE=0.8 SMOOTH_TIME=0.040 EXTRUDER=[tool_name]
Filament2:
SET_PRESSURE_ADVANCE ADVANCE=0.88 SMOOTH_TIME=0.040 EXTRUDER=[tool_name]
Can anyone take a look at this and explain how this works manually but when called by slicer gcode it fails? I don’t understand what ambiguity is introduced so that clipper doesn’t know that extruder is being referenced/called by the gcode.

That error occurs when a SET_PRESSURE_ADVANCE command is issued without an explicit EXTRUDER= parameter. Somehow it will be necessary to find all occurrences of that command and ensure the parameter is specified explicitly.

-Kevin

This is the tool change gcode for the above error with the moves and feeds removed

;HEIGHT:0.300000
;TYPE:Wipe tower
;WIDTH:0.750000
;--------------------
; CP TOOLCHANGE START
; toolchange #2
; material : PLA -> PLA
;--------------------
; CP TOOLCHANGE UNLOAD
;WIDTH:0.900000
SET_PRESSURE_ADVANCE ADVANCE=0
; Filament-specific end gcode
ACTIVATE_EXTRUDER EXTRUDER=extruder
; Filament gcode
; PLA PA
SET_PRESSURE_ADVANCE ADVANCE=0.8 SMOOTH_TIME=0.040 EXTRUDER=extruder
; CP TOOLCHANGE LOAD
; CP TOOLCHANGE WIPE
; CP TOOLCHANGE END

SET_PRESSURE_ADVANCE ADVANCE=0 should be changed to SET_PRESSURE_ADVANCE ADVANCE=0 EXTRUDER=extruder in this case, or whatever the correct extruder is?

Thank you for the help, changing SET_PRESSURE_ADVANCE ADVANCE=0 to SET_PRESSURE_ADVANCE ADVANCE=0 EXTRUDER=<tool name> does fix the problem however I’m not sure where that command is coming from. This is probably more a SuperSlicer question now.

Hi, do you know if there is a way to configure orcaslicer in order to include the name of the extruder when commanding set_pressure_advance?

I have my filaments configured with the pressure_advance configuration, so these override the one existing in the printer. In this way, when a slicer commands the other extruder to print (via T0, T1…), it also includes the set_pressure_advance command to change this value.

If everything works properly, as T0 or T1 have already been commanded, this will apply to the active extruder, and everything will work well.
Neverthless, i’d like to ensure that these calls also include the desired extruder to call.

I atach some images in order to explain what i’m saying.

Also, thanks in advance!!

image
image

Please do not zombiefy old threads.

When you wrote your post, you should have seen this on the right:

grafik

Please open a new thread.

2 Likes