Home / Forum / Getting Started / Locking the steppers for tool changes / Reply To: Locking the steppers for tool changes

Profile photo of Matthew KennedyMatthew Kennedy
Post count: 17
#5282 |

The following is for Repetier, you could change @Pause for M00 if you have an LCD on your RAMPS, or if you’re using Octoprint.
As I have Repetier set up, it keeps the steppers energized during a pause and after a completed job.

My Gcode for a pause (Pulled from the texts section of ESTLCam setup, where it’s now added automatically)

G0 Z2 F350 ; Raise it up some, I drive manually to an area beyond my spoil board to change the tool, since I don’t start at a consistent home…
@pause Change tool: <t> <n> ; This command displays the text “Change Tool” as well as the desired tool # and Name.
;After the tool is changed, I take it back to my home position to make sure the coords are correct, especially the Z displacement of the tool.
G0 Z2 F350
G0 X0 Y0 F1200
G0 Z0.5 F350
@pause Set Home ; During this pause, I manually force or drive the head to the home mark, then the G92 should reset RAMPS to 0, 0, 0 and @isathome resets the repetier
;coordinates the same. I’ve also added that to a repetier script, but haven’t used it yet. I’ll probably change this when I add home stops and a touch plate.
G92 X0 Y0 Z0
M03 ; I think this is Spindle On, I’m leaving it for now, as I want to add a relay to control the spindle and dust collection some day…

If you don’t want to change your coords, and you’re sure the new bit is exactly the same length as the previous, once you’ve changed bits, you can just G1 back to your desired Z level. The next plunge in the code should send it back to the correct depth.

Hope this helps!