Page 1 of 1

Tool change script

Posted: Wed Nov 25, 2020 2:17 pm
by MartinNYHC
I would like to add some GCODE for my purge bucket and wondering how I can add gcode that will be executed BEFOR and AFTER the tool change.

<move to purge bucket>
<change tool>
<purge filament>
<wipe extruder>

Thanks, Martin

Re: Tool change script

Posted: Thu Nov 26, 2020 3:37 am
by parallyze
Should be doable like mentioned in this thread over here: viewtopic.php?t=7552

Example Tool Change Script:

Code: Select all

G1 X10 Y10 F[xy_travel_speed]

T[new_tool]

{IF NEWTOOL=0}G1 Y50 E2.0 F1800
{IF NEWTOOL=0}G1 X30 E2.0

{IF NEWTOOL=1}G1 X50 E2.0 F1800
{IF NEWTOOL=1}G1 Y30 E2.0
This will make the toolhead travel to X10/Y10, change the tool and do two small extrusion moves
depending on what the new tool is (blue T0, green T1):
multi_3.JPG
The IF NEWTOOL statements are optional, just adding movement commands there will apply to
each change, no matter what tool is selected.

Code: Select all

G1 X10 Y10 F[xy_travel_speed]

T[new_tool]

G1 Y50 F1800
G1 X30
G1 Y10
G1 X50
multi_4.JPG
Demo:
multi_test.factory
(4.11 KiB) Downloaded 162 times