Automatically stop the spindle on program error

Occasionally I feel the urge to edit gcode directly. I try to avoid it because I know how hazardous it can be. If you rely on making a manual change to gcode after it is posted then you run the risk of forgetting to make that change or making a mistake when you make the change…in either case really bad things can happen. My advice to everyone it to avoid editing gcode if at all possible…and if you feel you must, be very very careful. The other day, I made a mistake in the gcode and a syntax error caused the program to error out at the end. This error caused it to never execute the code that turns the spindle off. I was lucky I didn’t lose a finger taking the dust boot off.

Would it make sense to stop the spindle if the program stops due to any sort of “invalid gcode” type error?

Anything to keep people safe out there. You just know some fool like me is going to do it…

1 Like

@softwareguru Perhaps a better approach would be for gSender to validate g-code before running it and flagging any errors.

@softwareguru

Apparently this feature already exists but may be disabled by default . See the last section on Safety.
It would be interesting to see what it would tell you for that g-code you ran.

Older versions have the check function available. At least the one that I run does, as chuck mentions.

I might add that safety and software is never a reliable combination. Electronics cannot provide fool proof safety measures and should always be looked at with a vigilant eye. I would suggest to adopt behaviour that mitigate encountered hazardous situations by default. Like shutting down power to certain moving parts of the machine or even disabeling it completely when engaging these dangerous parts. If such is too inconveniant or impossible, install indicators that cannot be missed.

Safety is a maintenance job one should not rely on others to do or believe others get right for every unthinkable situation. Especially when tinkering around, like most of us like to do in some way or form.

Safety first is not a sound bite. It’s a growing pile of habbits triggered by lucky missasters and bad fibe feelings. A hand on the estop when starting a program, to be able to stop the machine when things go wrong at the start, sure, but also to make sure the button is where it’s supposed to be, when needed during possible emergencies later on. (Mine is not fixed to one spot at the machine.) That button does not stop the router though, so I installed a hardwired switch away from the machine (cad office) that will stop power supply to all moving parts of the machine.

When running the machine I have a camera feed of my machine-bed running in a window next to my cad software. A fire extinguisher next to my chair. During long laser jobs, a feed on my security system at home, circuit breakers nearby to kill the machine.

It’s not 100% save because that number is beyond reach, but it is my safety and as hardwired as I can get it to be. It’s for my machine, in my situation, designed by me with my habbit pile in mind. Because at the end of the day, it’s not a sienci engineer, no software guru, nor their ceo who is at risk in my garage.

Did I high horse here? Yeeaah about that..

sorry.

1 Like

@Spamming_Eddie All good points.

One of the things I worry about is the spindle starting while I’m changing end mills. Especially when I have the large wrenches in place. When I do that on my router (or any other tool for that matter), I unplug it in case there’s a faulty switch. An unplugged machine cannot start by itself. On my Altmill, my only option would be to power off the spindle. Otherwise, I have to trust the software and hardware.

With a touch screen, covered in dust, it’s easy to accidentally touch the start button and have the spindle start and gantry move. I’ve wondered if that dust could trigger something on the screen. So I’m extra careful when changing bits. Sometimes I close the file that I need to run. Sometimes I just close gSender.

I also had a Bluetooth keyboard with touchpad connected but sitting on a shelf. And it had junk piled on it as well. That could also have triggered a command accidentally.

You can’t ever be too careful.

1 Like

I have triggered false starts and found a way to at least make it a two step process before the machine flies off.

Insering a pause into start event window thing was about my limit using gcode. Its simple and it works triggering an “yousure?“ window that requires an aditional (mouse) click.

There was a time I covered the switch on my router with a small block of wood before engaging with the bussines part. I would only remove it after setting zero for all axis as an indicator that all was good to go. I now have the habbit to check on screen and have enough trust in the switch to stay put. A spindle I would not trust one bit xcuse the bad pun. I might disconnect the spindle cable from the spindle, if that would not throw the controller into termoil.

I would defenitly find a way to disable it, hard, not soft.

Thanks for pointing that out chuck…excellent feature too I might add. Ought to be on by default though I would think (after all, who would want to run a program that doesn’t pass the sniff test?).

I’ll look for that tomorrow in the settings.

cheers