MartinNYHC
Posts: 24
Joined: Thu Apr 16, 2020 3:45 pm
Location: Berlin, Germany

Tool change script

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
parallyze
Posts: 372
Joined: Fri Jun 05, 2015 4:18 am

Re: Tool change script

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 161 times

Return to “General Discussion and Tips”