Emergency stop on LR2

So right now I have my emergency stop installed after my power supply. the problem is the gantry drops with gravity when power is killed. is there a way to program it to kill the gcode and not disable power to the steppers?

I poked around a bit and found only one way that, in theory, will immediately stop your job but still leaves the the steppers powered. It involves enabling the emergency parser in the firmware and then using an Arduino board to repeatedly send M410 g-code commands. I tested this just now using my pendant, and it worked, but I don’t have the emergency parser enabled and I don’t have time right now to reflash my firmware with the emergency parser enabled to do a final test.

If you want to pursue this solution, I’ll be glad to provide more details and even the few lines of code for the Arduino.

Afterthought: This only provides you will the ability to block the Z axis before powering everything down, it does not allow you to drive your router.

Jamie had a patch to Marlin to also immediately pause with the signal of a switch.

The simplest “solution” is to put the router and the controller on a power strip. When you trip the switch, the router still drops, but it powers down. Still not great.

Interesting. Here is a link to Jamie’s topic on the subject for anyone who is interested.

1 Like

I just open my gcode file and insert these commands at the end before M05 then save.

M400
G0 Z40 F300
G0 X0 Y0 F500
M400
M0 ====TOOL CHANGE ===

G00 X0.0000 Y0.000 F2100

M05

This moves it back to your starting point and pauses. you can then place your blocks under the z rails and the hit the resume to end the program.

I like all of the options, Thank you. ideally I would love for the router not to plunge into the work piece if a start a cut and make a simple mistake in the CAM process and can still salvage or restart the cut. Im still very new to fusion 360 and estl.

You have to choose which option you want, or at least which option you want to try first, and you will have to the heavy lifting of making it work.

  • Richk’s solution of sending a M0 is the simplest, but the M0 does not necessarily happen immediately. There is a short queue of commands, and the M0 will be inserted at the back of the queue. So the machine will execute a few commands before stopping. If you are cutting some arbitrary curve, it will reach the M0 almost immediately. But if you are doing long straight cuts, it may not stop for awhile. Also you need to figure out a fast way to insert the M0. This solution does not require firmware changes.
  • Jeff’s suggestion of Jamie’s code involves merging in lines of code into multiple files and then reflashing the board. I don’t know much about github, but my guess is that you will have to merge in the lines of code by hand. And when you update your firmware, you will have to repeat the process of merging in the lines of code. You will also have to wire up a switch that, when pressed, connects a pin to ground, so you will need a switch and some Dupont wires.
  • My solution, involves simple firmware changes…changing a couple of #defines in configuration_Adv.h, but. you will need to purchase an Arduino, a switch, and probably some Dupont wires. You probably will have to do a bit of soldering. And you will need to learn how to flash the code to the Arduino. One the plus side, this solution can be expanded to support multiple g-code commands or even expanded to a pendant like this one.

So it is up to you to choose one and folks in this forum can assist you with information and answers.