M104/M109 just operate where you are and that is not what you want. M104 is no problem as it has no delay but M109 waits, so use memory position
- M401 - Store x, y and z position.
- M402 - Go to stored position. If X, Y or Z is specified, only these coordinates are used. F changes feedrate for that move.
To move away from print so it does not ooze on it. For example
T[current_extruder];
M104 T[previous_extruder] S170 ;lower current extruder temperature
M401
M104 T[current_extruder] S[temperature[current_extruder]] ;reset printing temperatureG1 X0 Y200 F12000 ; fast move away
M109 T[current_extruder] S[temperature_[current_extruder]] ;reset printing temperature
M402 F12000
So now it heats at 0, 200 and then continues. Eventually you could even remove the M401/M402 if the next move is to wipe tower.