UNSOLVED M997 issue - outputs remain enabled



  • We need to request a firmware modification before releasing our printers- it may be a bug, or there may be a way around it we haven’t stumbled upon.

    We use the Duet 3 with attached SBC.

    As you may or may not know, our z-axis is belt driven and powered by steppers with integrated electromagnetic brakes. Under all conditions but one, this works flawlessly. However, when running M997 to update the firmware, power is cut to the steppers but out3 remains enabled (the pin we use for energizing the electromagnetic brake). Executing M999 properly disables out3. We are assuming the other outputs behave the same way.

    We would like to request this be looked into or any workarounds that would protect against this. Thanks



  • What problem arises from the brake remaining enabled?

    Thanks.

    Frederick



  • The gantry drops, crashing into the bed..



  • @oozeBot said in M997 issue - outputs remain enabled:

    The gantry drops, crashing into the bed..

    So when the output is enabled the brake is disabled?

    Frederick



  • @fcwilt correct- they remain enabled at all times when the z-steppers are powered up allowing the steppers to freely move and hold the gantry with their holding torque.



  • @oozeBot said in M997 issue - outputs remain enabled:

    @fcwilt correct- they remain enabled at all times when the z-steppers are powered up allowing the steppers to freely move and hold the gantry with their holding torque.

    So you need a way to specify in the configuration the state of a fan output after M997?

    Frederick



  • M997 results in the upgrade of the firmware followed by a soft-reboot. When M997 is executed, the stepper drivers are disabled, but the outputs remain in state. In our use case, this makes M997 very dangerous as the gantry will drop. We are requesting this be reviewed as I can't think of any reason the outputs remain in state as the soft-reboot disables them moment's later.. until config.g is reprocessed.



  • @oozeBot said in M997 issue - outputs remain enabled:

    M997 results in the upgrade of the firmware followed by a soft-reboot. When M997 is executed, the stepper drivers are disabled, but the outputs remain in state. In our use case, this makes M997 very dangerous as the gantry will drop. We are requesting this be reviewed as I can't think of any reason the outputs remain in state as the soft-reboot disables them moment's later.. until config.g is reprocessed.

    What you may be seeing is the output pins on the processor being reset to inputs - that is not uncommon behavior.

    Depending on the output circuitry connected to the pin this could result in the output going active.

    When I do a M999 on my MB6HC (no SBC) the fans turn on for a moment before the config file is fully processed.

    Frederick



  • That's not the case. When I issue M42 P3 S0 to disable out3 prior to running M997, the gantry does not drop. This means that there technically is a work-around, but it is not ideal.



  • @oozeBot said in M997 issue - outputs remain enabled:

    That's not the case. When I issue M42 P3 S0 to disable out3 prior to running M997, the gantry does not drop. This means that there technically is a work-around, but it is not ideal.

    What are the odds that if they changed the default behavior on M997 to work with your system someone else would have a problem because they were relying on the existing behavior. 😉

    IF it was possible it might be best to allow configuring the default behavior to cover all the possibilities. It might be best (again if possible) to allow configuration of that behavior on a pin by pin basis.

    Perhaps @dc42 could weigh in on this issue and clarify what exactly happens with M997.

    If for some reason they cannot make the change perhaps a hardware solution that senses the steppers being disable would be possible.

    Good luck.

    Frederick


  • administrators

    As @fcwilt says, it could be dangerous on other machines if RRF arbitrarily changed the state of outputs when updating firmware.

    I think the real solution is for us to add a mechanism to allow axis brake outputs to be configured, so that brakes are automatically released when an axis is enabled, and vice versa. This is already on the firmware wishlist.


Log in to reply