Emergency stop / external reset



  • Hi! i'm trying to implement emergency stop mushroom button...
    two questions that i was not able to find answers in wiki / forum

    1. DWC "Emergency stop button" behaviour.... is it equivalent to hardware reset pin 44 on expansion 50 pin slot?
      if not - what is the difference

    2. which pins out this 50 can be used for M581 ? reading wiring diagram did not help.

    thanks!



  • The easiest way to implement an external reset/emergency stop, is to configure it as an External Trigger (https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_Configure_external_trigger)

    The forced emergency stop using the easiest method is (inside your config.g file):
    M581 T0 E1 S1

    The parameters:
    T0 = emergency stop on trigger; T1 = pause print; T{N} = runs the macro "sys/trigger{N}.g" (useful if you want to do things in a specific order, before pausing or sending the emergency stop).
    X, Y, Z, E0, E1 = select the endstop pin to monitor for trigger; typically one would use E0 or E1.
    S1 or S0 = sets it as raising edge (S1) or falling edge (S0). Set this based on your switch type (NO or NC); typically one would use a NC switch to GND as this will cause a trigger if the switch is removed (providing a safe fallback).
    C0 or C1 = when it may trigger: C0 is anytime; C1 is only during a print.

    If the switch is reliable and works as expected, you can add https://duet3d.dozuki.com/Wiki/Gcode#Section_M582_Check_external_trigger for it inside your config.g - useful if you need the button to be reset before the Duet can restart (useful if using the PS_ON features).


  • administrators

    @c310 said in Emergency stop / external reset:

    Hi! i'm trying to implement emergency stop mushroom button...
    two questions that i was not able to find answers in wiki / forum

    1. DWC "Emergency stop button" behaviour.... is it equivalent to hardware reset pin 44 on expansion 50 pin slot?
      if not - what is the difference

    2. which pins out this 50 can be used for M581 ? reading wiring diagram did not help.

    thanks!

    1. No, it is a software reset, however it works very quickly - assuming that you have network connection of course.

    2. You can use any free endstop connector on the Duet. If you don't have a DueX board connected to the expansion connector, you can use any of the five En_STOP pins (n = 2-6). They are labelled on the underside of the Duet.



  • @jacotheron said in Emergency stop / external reset:

    M581 T0 E1 S1

    thank you @jacotheron and @dc42 for detailed explanation. i connected mushroom button to E1 and added
    M581 T0 E1 S1 C0 to config.g

    while testing i found very strange behaviour:

    1. printer is idle

    2. i press mushroom button

    3. DWC goes to HALTED state and shows that board is reloading 0_1548539717289_74eec02d-fdd0-489b-b941-3e8d5fb9eee9-изображение.png

    4. than it offers to confirm firmware reset 0_1548539875044_dee9bf3d-2e6f-424e-a64f-3b623907274b-изображение.png

    regardless of what i press (yes or no) it restarts. the only difference i see - when pressing Yes i get one more orange dialogue (emergency stop please wait....)

    Is there a method to hide this confirmation window that is useless in fact ?


  • administrators

    It's reporting that after the first reset attempt, DWC was still unable to connect. Normally it connects after the first attempt and that dialog isn't produced. Are you using DWC 2.0RC? If so, it may be a DWC 2.0 bug.



  • @dc42 said in Emergency stop / external reset:

    C was still unable to connect. Normally it connects after the first att

    thank you for the hint. I fixed it by setting 20 sec delay for Reconnect Delay on Halt
    strangely it takes so much time to reload...

    versions:
    Firmware Electronics: Duet WiFi 1.02 or later
    Firmware Version: 2.02(RTOS) (2018-12-24b1)
    WiFi Server Version: 1.22
    Web Interface Version: 1.22.6


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.