I am interested in locking the steppers for tool changes. I know SteveC mentioned that he has a post processor in Fusion 360 that sets that up for him, but I’m not using Fusion 360 yet (have a license, just no time to learn). I would like to know if anyone knows how to set something like that up in ESTLCAM (if possible). I would also be willing to just paste the gcode in where needed with notepad++, but I don’t know what the codes are for locking the steppers and changing the timeout. Ideally, the code would pause the machine (using @pause?), raise the tool to z45 or so, and lock the steppers until I hit resume. Also, is it possible to reset z height before resuming?
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)
M05
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 @isathome
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.
When I say “Force” I’m usually talking about overpowering the Z stepper using the knob. I don’t want to crash the bit if I hit the wrong button, so I usually do the final Z adjustment by hand, I’m able to overcome the 64oz-in motor by hand pretty easily.
Attached is the menu nest where I was able to change the Gcode for the tool change routine:
Depending on which procedure you end up with remember, if you do depend on having the steppers locked during the tool change, be sure to disable the lock timeout with M84 (at the start of your gcode). The default in Marlin is 60 seconds and I can tell you that I would never be able to fumble my way through a tool change without the steppers releasing in 60 seconds ! See my comments in https://www.v1engineering.com/forum/topic/fusion-360/#post-4102.
Also I’m kind of confused about the differences between M0, M1 and M25. The reprap wiki says for M0 and M1: “All motors and heaters are turned off”, which would be bad. I use M25 with an LCD and it works perfectly.
I’m not sure how ESTLCAM handles post processing but It should not be hard to do something similar to what I did for Fusion 360. If you use an LCD I think it is really easy to just have the tool automatically move to a convenient location (relative to your origin) for the tool change, beep and wait. Then after changing the tool you just select “resume printing”. No need to jog the head around manually. Please let me know if you need a better explanation. Also take a look at my Fusion 360 post file. It has some comments at the start.
Thanks Steve! I haven’t run into a problem with steppers turning off yet, (I think using Pause in Repetier has something to do with that, but I’m not sure…) but now I know I can prevent it for certain with M84 S0. That’s going into the start code! I haven’t personally tried any of the SD/LCD pause codes, but I’m going to tag this in case I add those later.
Some might like M226 Pnnn Snnn in Marlin, wait for Pin State, P is pin number, S is state. For some reason, the RepRapWiki recommends M226 over M25, but if it works, it works!
I really liked the bit insertion depth guide from your linked page - it could probably get me out of my Z height uncertainty!
Time to try some Fusion360…
Hey I am having problems with all my steppers unlocking (time out issue ) I see Stevec recommended to use M84 at the start of the gcode. If I am using estlcam do I put M84 in the start up gcode or can I put M84 in the tool change so it will only prevent time out if the job has a tool change?
Hi Kyle, M84 S0 will disable timeout until another M84 Stimeout is issued so I think putting “M84 S0” in the startup or before tool change will both work roughly the same. I don’t use estlcam but it should not matter.
I came here to post the exact same question (after searching first of course) and there is was. Thanks! I just nearly missed my Dewalt plunging into my workpiece tonight and thought “Damn, I gotta lock that stepper on the tool changes!”
I don’t understand the M84 Z; Disable Z Stepper though…does disable mean lock? I’d assume it to mean release? Just trying to understand the syntax as I’m sure it applies elsewhere.
Okay. I misundertood - thanks for clarifying. I want to leave it engaged so the cutter doesn’t drop on me if I miss the tool change lift. I was right beside the machine the other day when it lifted and I JUST caught the Z in time before it hit the material. I’m going to do a search for spindle control. I’m sure theres a way using a relay that I can actually cut the power to the Dewalt instead/as well.