Z-lift with tool change (Prusa slicer)

I’m using Prusa Slicer and I want a z-lift (Z-hop) just before a tool change when printing a dual color/material object.
At the moment it simply moves the head straight over the print area scraping the just printed layer.
It does a z-hop before it moves after a retraction but that doesn’t happen with a tool change when it does retracts the filament before it parks the head. This baffles me.
Does anyone have an idea how to do this?

Im thinking maybe add to the beginning of the tool change gcode:

G91
G1 Z{numeric value}
G90

let me know if works! :face_with_monocle:

Nop, that didn’t work. A strange thing happens when I place either at the beginning or end of the change code, there is no extrusion when the first head starts to move on the first layer…
When I remove the extra code extrusion functions normally.
here’s what Tool Change code there already is in Prusa Slicer:

; <<< Tool Change T[previous_extruder]
;***** Update : 20221222

; Tool Change T[next_extruder] >>>
; ----- current_extruder: [current_extruder]
; ----- previous_extruder: [previous_extruder]
; ----- next_extruder: [next_extruder]
; ----- toolchange_z: [toolchange_z]
; ----- layer_z: [layer_z]
; ----- layer_num: [layer_num]

{if next_extruder != current_extruder }
T{next_extruder}
M2000 S200 V250 A6000
M204 S6000
M109 S{if layer_num<1}[first_layer_temperature]{else}[temperature]{endif} C3 W1 ;wait T{next_extruder}
{endif}
M105 ;report temperature

Hi! Can you attach your edited version that does not work. Maybe you did some mistake.

Who knows what this c3 w1 means? Some snapmaker fork additions? Did not find info at marlin docs

Well I tried this as was suggested:

; <<< Tool Change T[previous_extruder]
;***** Update : 20221222

; Tool Change T[next_extruder] >>>
; ----- current_extruder: [current_extruder]
; ----- previous_extruder: [previous_extruder]
; ----- next_extruder: [next_extruder]
; ----- toolchange_z: [toolchange_z]
; ----- layer_z: [layer_z]
; ----- layer_num: [layer_num]

G91
G1 Z2
G90
{if next_extruder != current_extruder }
T{next_extruder}
M2000 S200 V250 A6000
M204 S6000
M109 S{if layer_num<1}[first_layer_temperature]{else}[temperature]{endif} C3 W1 ;wait T{next_extruder}
{endif}
M105 ;report temperature

Found this on this same forum:

M109 S190 C3 W1, wait for the temperature to 190, within 1 second to detect the temperature within the range of ±3 will directly pass. Without these parameters, PID would up to 200 before passing.

Maybe there is a way to change the red marked line. I‘m having the same issue and am trying to resolve this :sweat_smile:

for anyone still looking for this just add
G1 Z{layer_z+“Desired Z hop distance here”} ;
to the tool change G code