Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    RRF 3.4 emergency stop causes board to hang

    Scheduled Pinned Locked Moved
    CNC
    4
    7
    454
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • steve123undefined
      steve123
      last edited by steve123

      Ran into a problem with configuring an emergency stop today. By config.g contains the following configuration g-code:

      ; CNC Emergency Stop
      M950 J0 C"io8.in"                           ; Define io8.in as input pin 0 (P0) for use as an emergency stop input
      ;M581 P0 T0 S1 R0                     ; Trigger an emergency stop (T0) when input pin 0 (P0) edge occurs
      ;M582 T0
      

      If you edit config.g, uncomment the last two lines and reload it, and if the emergency stop button is not connected I observed that the firmware continually loops and the GUI is unresponsive. I surmise the firmware detects the estop condition and then reloads config.g which causes another estop condition. I had to power cycle the board in order to be able get control back so I could edit the board and disable the estop function.

      oliofundefined 1 Reply Last reply Reply Quote 0
      • oliofundefined
        oliof @steve123
        last edited by

        @steve123 you can try inverting io8.in by prepending a ! if you have a normally open button for the emergency stop.

        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

        steve123undefined 1 Reply Last reply Reply Quote 0
        • steve123undefined
          steve123 @oliof
          last edited by

          @oliof Thanks for the feedback, yes, I think I will do that. Notwithstanding doing so, I think the looping is something that suggests a RRF bug?

          fcwiltundefined 1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt @steve123
            last edited by

            @steve123 said in RRF 3.4 emergency stop causes board to hang:

            @oliof Thanks for the feedback, yes, I think I will do that. Notwithstanding doing so, I think the looping is something that suggests a RRF bug?

            Well if you define the input pin such that it is active on power up it and it does an emergency stop it is going to do it over and over - as it should.

            To recover in such a case just hold the button down making the input inactive on power up. While holding the button down you can edit the input pin configuration as needed.

            Good luck.

            Frederick

            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

            steve123undefined 1 Reply Last reply Reply Quote 1
            • steve123undefined
              steve123 @fcwilt
              last edited by

              @fcwilt said in RRF 3.4 emergency stop causes board to hang:

              Well if you define the input pin such that it is active on power up it and it does an emergency stop it is going to do it over and over - as it should.

              Is that really the case? Shouldn't an emergency stop event first stop the machine and then pause? It doesn't seem appropriate to me to reload config.g when performing an emergency stop unless the user somehow confirms to do so?

              To recover in such a case just hold the button down making the input inactive on power up. While holding the button down you can edit the input pin configuration as needed.

              That is a good work around for the issue. Nevertheless, I suggest the constant reloading might not be intended or desired.

              fcwiltundefined infiniteloopundefined 2 Replies Last reply Reply Quote 0
              • fcwiltundefined
                fcwilt @steve123
                last edited by

                @steve123 said in RRF 3.4 emergency stop causes board to hang:

                Nevertheless, I suggest the constant reloading might not be intended or desired.

                There seems to be some difference in behavior. According to the docs a T0 trigger does the equivalent of a M112.

                From the docs:

                M112: Emergency Stop
                Any moves in progress are immediately terminated, then RepRap shuts down. All motors and heaters are turned off. It can be started again by pressing the reset button or power cycling the board.

                Notice the reference to hitting reset or power cycling to get things going again.

                Have you observed this to be true?

                Frederick

                Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                1 Reply Last reply Reply Quote 0
                • infiniteloopundefined
                  infiniteloop @steve123
                  last edited by infiniteloop

                  @steve123

                  I suggest the constant reloading might not be intended or desired.

                  Right, but you provoke this behaviour with three methods:

                  1. define a pin which is triggered on both edges (up and down)
                  2. test for that event immediately after defining it in config.g
                  3. couple this with a reset of RRF (which presumably leads to a signal change of the pin on reboot)

                  First thing to note: you should not check the trigger in config.g with M582.

                  Second, you need a well defined signal to trigger an event: What level do you expect io8.in to represent if your switch is "open", i.e. disconnected? High, low, or something in between?
                  To overcome this issue, it is good practice to activate the pull-up of the pin and then switch to GND. This has the additional effect that you now only have to check the trigger signal on the falling edge.

                  Third, I strongly recommend not to trigger such a fundamental event directly. If you invoke a macro (which in turn calls M112), you can take optional measures against repetitive stops (i.e. implement a global variable), in case you encounter a similar behaviour as now.

                  Put something like this or similar into config.g:

                  M950 J0 C“^io8.in“ ; define io8.in as input pin 0 (P0), activate pullup (normally high)
                  M581 P0 S0 T3 R0 ; call macro „trigger3.g“ if button pulls P0 to GND
                  

                  Create the macro "trigger3.g" in the /sys directory:

                  ; trigger3.g - Emergency Stop
                  M112 ; do it
                  

                  Note of caution: Usage is at your own risk. Untested, my Duet is currently out of reach.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA