Machine stop delay

Hi! Im using rambo v1.4 in my lowrider cnc, why when i stop on control board, machine will not stop immediately, there’s so much delay, is there anyway to adjust it?

The control board has to pre-load a certain number of move commands, and when you hit the stop, it flushes through the buffered commands before that stop happens. For an emergency stop, you generally want to cut power.

Some firmwares do have provisions for an emergency stop that will halt the motors as quickly as possible, but Marlin (so far as I am aware) isn’t one of them.

The firmware MUST read ahead into the file, so that it knows when to decelerate the tool and when it can continue on to the next motion smoothly within its jerk settings. Unfortunately a quick stop wasn’t a priority with the design.

If there are some long, straight moves in your tool path, it will take longer (Each one being a single command) but a curve in a mesh, like an STL will have many short move commands, which will process faster and stop sooner.

If you want the machine to stop because on an emergency, it’s probably best to wire an emergency stop button, which kills the power. At the very least, you will want to be able to kill the power to a spindle or laser. If you know where you want the code to stop, you can use an M00 command to force a button push at the LCD, or possibly other commands to pause the code and allow you to continue.

Marlin does have this functionality, but the V1 maintained firmware does not have this feature enabled, and it is only used for a small number of g-code commands. It is this section in configuration_Adv.h:

/**
 * Emergency Command Parser
 *
 * Add a low-level parser to intercept certain commands as they
 * enter the serial receive buffer, so they cannot be blocked.
 * Currently handles M108, M112, M410, M876
 * NOTE: Not yet implemented for all platforms.
 */
//#define EMERGENCY_PARSER

So uncomment the define, and if you are using an M112, or an M410 to stop, you should get an immediate stop. Note this pathway will not allow for a pause and continue.

On another topic exploring pausing and stopping, the idea of using a pin on the board to trigger a filament sensor event to pause the print has been suggested, but I don’t believe it has been tested.

1 Like

A while ago I implemented an “instant pause” function Instant Pause Function

I offered it as a pull request but it didn’t get merged into Marlin for over a year, and then for some reason just in the last few days thinkyhead decided to merge it as an option into Marlin bugfix-2.0.x. I’m not sure why.

Note: my instant pause feature is intended as pause/resume and not instant kill. If you just want to stop the program instantly and you don’t need to resume, then the emergency parser is the easier way to go.

2 Likes