CNC learning hiccups. Is an interrupt-able M0 possible?



  • I'm working on getting better at CNC routing and I've noticed a possible need for a fourth type of stop. Interrupted stepper and spindle stop for CNC mode.

    I feel the need in a situation where a cut may be going not as expected and you want to stop it immediately without going through the hassle of re-probing the work-piece. It's very difficult to line it up perfectly and I never have yet.

    Waiting longer in these situations could lead to the need for an emergency stop and cut all power before the bit goes through the table and rips itself apart. So that's already covered, in both firmware and physically.

    I had this situation tonight. I made a rookie mistake and forgot to torque down the bit in the holder and 2 mins into a rough cut the bit started being pulled out of the holder and going deeper into the material. It was a straight line cut so a pause wouldn't have had an effect until the pass was finished and the machine was in pieces. The bit made it entirely through the work-piece and a few mm into my waste mdf only seconds from hitting the aluminum bed before I triggered an emergency stop and had to re-zero the work-piece, which was inevitably a few fractions of a mm off from before.

    I'm imagining a "Halt" button that could run M0 S1 for an interrupted immediate stop using the normal cancel.g or stop.g M0 normally does.

    Is it not possible to interrupt these buffered moves that have been stored without cutting power the Duet or M112?

    Is there some other solution that would work?

    Or do I just need to learn how to setup (and purchase) a proper probing bit that can hook up to the Duet (anyone know options)?
    I still don't get how that would get all three axes in every situation, especially if you mill out the point you first referenced.


  • administrators

    I guess M0 could be changed to stop the job immediately, like the power panic feature does. You might need to re-home the printer afterwards because steps could be lost, although I guess that is unlikely with CNC machines because of the low speeds.

    Perhaps a new M581 predefined trigger type would do the job?



  • M0 is not used for hard stops, so position is not lost. Linux cnc implements it similar to industrial cnc machines, and they have a decent description:
    2. M0, M1 Program Pause
    M0 - pause a running program temporarily. LinuxCNC remains in the Auto Mode so MDI and other manual actions are not enabled. Pressing the resume button will restart the program at the following line.



  • @tenaja said in CNC learning hiccups. Is an interrupt-able M0 possible?:

    M0 is not used for hard stops, so position is not lost. Linux cnc implements it similar to industrial cnc machines, and they have a decent description:
    2. M0, M1 Program Pause
    M0 - pause a running program temporarily. LinuxCNC remains in the Auto Mode so MDI and other manual actions are not enabled. Pressing the resume button will restart the program at the following line.

    I agree here. M00 and M01 are stop points durning a program operation and not to be used as hard stops requiring re-homing your machine.

    M01 is technically a optional stop that is only carried out if you have an op stop switch turned on on your machine control. Otherwise the program just moves right past it.

    As far as I known, we don't have that ability with the duet firmware. It would be a great feature when using the board as a CNC mill/lathe.


  • administrators

    Another option could be to use M0 with an additional parameter to terminate printing without waiting for movement to complete, and to terminate any moves currently in progress.

    I see that Marlin uses M410 to stop all steppers immediately. But the documentation doesn't specify any other effects of M410, such as aborting an SD card print, turning spindle motors off etc.


Log in to reply