X-In/1-Out Non-Mixing Extruder Config

I am not at the computer in the printer room right now but in Cura there is a Printer Settings (or some such) plugin that you can add. With it you can set something like shared heater. Also in multi-extruder cases make sure that the extruder idle temp is the extrusion temp. And I use a gcode find&replace macro to remove M104 T[0-7] S0 but I think that may have been fixed in the current revisions of Cura.

In general I also filter out the Tn Gcodes and use the slicer to insert calls to TOOL_START=Tn and TOOL_END=Tn and use those macros to switch extruders and stuff. Makes it more controllable in Cura, IMHO anyway :wink:

1 Like

Hello. There is a printer with 5 extruder motors. I made the settings you gave, but I am getting the following error.

$ ACTIVATE_EXTRUDER EXTRUDER=extruder_stepper extruder3
!! Malformed command ‘ACTIVATE_EXTRUDER EXTRUDER=extruder_stepper extruder3’

am getting this error in extruders that I define as extruder_stepper. There are 2 hotends in my printer. I tried many ways and searched but couldn’t find it. Can you help me?

Try
ACTIVATE_EXTRUDER EXTRUDER="extruder_stepper extruder3"

Key are the " around extruder_stepper extruder3

@Sineos
$ ACTIVATE_EXTRUDER EXTRUDER="extruder_stepper extruder3"
!! The value 'extruder_stepper extruder3' is not valid for EXTRUDER
The method you gave did not work. I am sharing my extruder settings.

[extruder]
step_pin:PB5
dir_pin:PB4
enable_pin:!PB6
microsteps:16
rotation_distance: 8.21
;rotation_distance: 23.20	#Bondtech 5mm Drive Gears
;gear_ratio: 48:17
full_steps_per_rotation: 200	#200 for 1.8 degree, 400 for 0.9 degree
nozzle_diameter: 0.400
filament_diameter: 1.750
min_temp: -250
max_temp: 400
heater_pin: PB1
;sensor_type:  NTC 100K MGB18-104F39050L32
;sensor_type: Dyze500
sensor_type: ATC Semitec 104GT-2
;sensor_type: Generic 3950
sensor_pin: PC1
max_power: 1.0
control : pid  
pid_Kp=25.349 
pid_Ki=1.760 
pid_Kd=91.255
pressure_advance: 0.343 
pressure_advance_smooth_time: 0.040
min_extrude_temp: 50
pullup_resistor: 3150
max_extrude_only_accel: 60.0
max_extrude_only_velocity: 60.0
max_extrude_cross_section: 75.0
max_extrude_only_distance: 250.0

[tmc2209 extruder]
uart_pin: PB3
interpolate: True
run_current: 0.65
hold_current: 0.20
sense_resistor: 0.110
stealthchop_threshold: 0

[extruder1]
step_pin: mksruba32: PA0
dir_pin: mksruba32: PC15
enable_pin: !mksruba32: PC11
microsteps: 16
rotation_distance: 8.21
full_steps_per_rotation: 200	#200 for 1.8 degree, 400 for 0.9 degree
nozzle_diameter: 0.400
filament_diameter: 1.750
min_temp: -250
max_temp: 400
heater_pin: mksruba32: PC6
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: mksruba32: PC4
max_power: 1.0
control : pid  
pid_Kp=25.349 
pid_Ki=1.760 
pid_Kd=91.255
pressure_advance: 0.343 
pressure_advance_smooth_time: 0.040
min_extrude_temp: 50
;pullup_resistor: 3150
max_extrude_only_accel: 60.0
max_extrude_only_velocity: 60.0
max_extrude_cross_section: 75.0
max_extrude_only_distance: 250.0

[tmc2209 extruder1]
uart_pin: mksruba32: PC14
tx_pin: mksruba32: PA3
interpolate: True
run_current: 0.65
hold_current: 0.20
sense_resistor: 0.110
stealthchop_threshold: 0

[extruder_stepper extruder2]
extruder: extruder
step_pin: mksruba32: PE5
dir_pin: mksruba32: PE6
enable_pin: !mksruba32: PE3
microsteps:16
rotation_distance: 8.21
full_steps_per_rotation: 200
pressure_advance: 0.343 
pressure_advance_smooth_time: 0.040

[tmc2209 extruder_stepper extruder2]
uart_pin: mksruba32: PE4
tx_pin: mksruba32: PA4
interpolate: True
run_current: 0.65
hold_current: 0.20
sense_resistor: 0.110
stealthchop_threshold: 0

[extruder_stepper extruder3]
extruder: extruder1
step_pin: mksruba32: PE1
dir_pin: mksruba32: PE2
enable_pin: !mksruba32:PB7
microsteps:16
rotation_distance: 8.21
full_steps_per_rotation: 200

[tmc2209 extruder_stepper extruder3]
uart_pin: mksruba32: PE0
tx_pin: mksruba32: PD13
interpolate: True
run_current: 0.65
hold_current: 0.20
sense_resistor: 0.110
stealthchop_threshold: 0

[extruder_stepper extruder4]
extruder: extruder1
step_pin: mksruba32: PB5
dir_pin: mksruba32: PB6
enable_pin: !mksruba32: PC12
microsteps:16
rotation_distance: 8.21
full_steps_per_rotation: 200

[tmc2209 extruder_stepper extruder4]
uart_pin: mksruba32: PC13
tx_pin: mksruba32: PD14
interpolate: True
run_current: 0.65
hold_current: 0.20
sense_resistor: 0.110
stealthchop_threshold: 0
1 Like

@Sineos
The macro I created
Thanks…

[gcode_macro T0]
gcode:
    # Deactivate second extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder4 MOTION_QUEUE=
    # Activate first extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder

[gcode_macro T1]
gcode:
    # Deactivate first extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder4 MOTION_QUEUE=
    # Activate second extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder1

[gcode_macro T2]
gcode:
    # Deactivate first extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder4 MOTION_QUEUE=
    # Activate second extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER="extruder_stepper extruder2" MOTION_QUEUE="extruder_stepper extruder2"

[gcode_macro T3]
gcode:
    # Deactivate first extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder4 MOTION_QUEUE=
    # Activate second extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder3 MOTION_QUEUE=extruder_stepper extruder3

[gcode_macro T4]
gcode:
    # Deactivate first extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder3 MOTION_QUEUE=
    # Activate second extruder stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder_stepper extruder4 MOTION_QUEUE=extruder_stepper extruder4

[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("Extruder")}
        T0
      {% elif ext == "extruder1" %}
        {action_respond_info("Extruder1")}
        T1
        {% elif ext == "extruder_stepper extruder2" %}
        {action_respond_info("Extruder2")}
        T2
        {% elif ext == "extruder_stepper extruder3" %}
        {action_respond_info("Extruder3")}
        T3
        {% elif ext == "extruder_stepper extruder4" %}
        {action_respond_info("Extruder4")}
        T4
      {% else %}
        {action_respond_info("EXTRUDER value being passed.")}
        ACTIVATE_EXTRUDER_BASE EXTRUDER={ext}
      {% endif %}
    {% endif %}

Never tried such a setup but generally constructs like above need to be put in "

Blockquote Next, remap the built-in ACTIVATE_EXTRUDER gcode macro so it can be used in your slicer:

[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 %}

My printer has 2 hotends. One is 2 in 1 out and the other is 3 in 1 out. How should I edit this code? Extruder as follows;

Extruder
Extruder1
belted_extruder2
belted_extruder3
belted_extruder4

I tried a few times but couldn’t find a solution. I edited the motion macro code as follows and it worked, but I couldn’t figure out ACTIVATE_EXTRUDER.

[gcode_macro T0]
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=
    # Activate stepper in extruder
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder

[gcode_macro T1]
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=
    # Activate stepper in extruder
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder1

[gcode_macro T2]
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=
    # Activate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=extruder

[gcode_macro T3]
gcode:
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=
    # Activate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=extruder1

[gcode_macro T4]
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    # Activate stepper in extruder
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=extruder1

@koconnor

@craagle Did you get your setup working yet?

From the looks of things, you have two “motion system”; Extruder and Extruder1. and you also have three additional belted_extruders.

I didn’t notice, but what belted_extruders are hooked up to which Extruder?

Hi @jjarosz

Thank you for your interest. I set up Extruder and belted_extruder2 as the first group, and Extruder1 as belted_extruder 3 and 4 as the second group. Extruder and belted_extruder2 are working now, but I haven’t tried the other group yet.

@craagle, sorry for the delay, but here is an example that might fit your printer with:

extruder + belted_extruder2
extruder1 + belted_extruder3 + belted_extruder4

[gcode_macro T0]
descripton: extruder motion system and extruder stepper
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=
    # Activate stepper in extruder
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder

[gcode_macro T1]
description: extruder motion system and belted_extruder2 extruder_stepper
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=
    # Activate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=extruder
    
[gcode_macro T2]
description: extruder1 motion system and extruder1 stepper
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=
    # Activate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder1
    
[gcode_macro T3]
description: extruder1 motion system and belted_extruder3 extruder_stepper
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=
    # Activate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=extruder1
    
[gcode_macro T4]
description: extruder1 motion system and belted_extruder4 extruder_stepper
gcode:
    # Deactivate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder2 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder3 MOTION_QUEUE=
    # Activate stepper in my_extruder_stepper
    SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder4 MOTION_QUEUE=extruder1

The description field tells you what stepper and motion system are activated with each T# command.

[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_extruder2" %}
        {action_respond_info("Switching to belted_extruder2.")}
        T1
      {% elif ext == "extruder1" %}
        {action_respond_info("Switching to extruder1.")}
        T2
      {% elif ext == "belted_extruder3" %}
        {action_respond_info("Switching to belted_extruder3.")}
        T3
      {% elif ext == "belted_extruder4" %}
        {action_respond_info("Switching to belted_extruder4.")}
        T4
      {% else %}
        {action_respond_info("EXTRUDER value being passed.")}
        ACTIVATE_EXTRUDER_BASE EXTRUDER={ext}
      {% endif %}
    {% endif %}

This is an example ACTIVATE_EXTRUDER macro as well.

If you use, please test and advise of your results.

-JJ

Hi @jjarosz

I tried the example you gave and I did not get positive results. Since I couldn’t find a solution, I changed my device to a single hotend. At the moment, I am adhering to your solution plan.

I couldn’t use dual hotend with your solution. We need to work for this. Thank you very much for your support.

is there a way to run both extruders at the same time so that material is mixed? like the Marlin m165 gcode, run multiple extruders in relation to each other.

@SphaeroX it looks like the Dev team may have built the ground work to support mixing extruders, you would have to put it together between macros and slicer config, much like I did with this document.

Check out these two articles:

Basically start with what was built in 950 with stepper_extruder module and figure out a way to integrate 5210 SET_EXTRUDER_ROTATION_DISTANCE.

1 Like

So if I have understood correctly, then I can determine the rotation distance via the GCode. For example, if I had a total of 30, I could say extruder 1: 15 and extruder 2: 15.

So far so good, but how do I get the two to rotate at the same time?

You would have to activate two extruder_stepper objects at the same time.

The document I created only has one active at a time.

Then I will probably use Marlin, although I actually always use Klipper. With Marlin you make a GCode and you’re done, stress-free.

M165 A0.2 B0.4 C0.3 D0.1

Hello! I’ve used this config on my Ender 3 Pro, but am encountering an unknown problem where both extruders move at once.
Here is a link to a reddit post I’ve made on the issue

Thank you in advance!

@Xcaldoug I looked at your printer.cfg you posted and there does not seem to to be any config issues. I also checked out your klippy.log file and that looks as if you have more issues that need attention than trying to get the extruder steppers working.

Also, are you using the Creality Sonic Pad by chance? If so, that could be the root cause of your issues. Creality is not using the stock Klipper code and/or the Klipper version might be lower than what is needed for [extruder_stepper] to even work.

Check the top of my post to see the earliest version of Klipper that I have this working under.

Hi, my configuration including macros is here:

MULTI HOTEND

If a hotend of type 2 IN 1 OUT (or xx IN 1 OUT) is used, the filament is automatically replaced outside the printing area.

By default, it is set to the endstop position + 20 mmm. Also tested on IDEX.

The variable for the currently installed filament is saved on the SD card, so that the last configuration is set when the printer is turned on.

The macro is here: MULTI_HOTEND.cfg

This macro is automatically called from the : SETTINGS_TOOL macro

For printers on the IDEX system from the macro: ACTIVATE_CARRIAGE

The macros listed on my Github are universal for configurations
printers for 2 to 4 extruders including dual carriage (IDEX)

This is an example of printer HW configuration for IDEX and 2 IN/1 OUT

# shared heater and sensor HE0 + HE1 and HE2 + HE3

[duplicate_pin_override]
pins: PF6, PB0, PA0, PC5
     

# ---- carriage X ----

[extruder]
...
heater_pin: PF6 # HE0
sensor_pin: PB0 # TH0
...


[extruder1]
...
heater_pin: PF6 # shared HE
sensor_pin: PB0 # shared TH
...


# ---- dual carriage ----
 
[extruder2]
...
heater_pin: PA0 # HE 2
sensor_pin: PC5 # TH 2
...


[extruder3]
...
heater_pin: PA0 # shared HE
sensor_pin: PC5 # shared TH
...

-Petr