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

Experimenting with the emergency button

Scheduled Pinned Locked Moved
General Discussion
3
6
395
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.
  • undefined
    zecchi
    last edited by 2 Sept 2020, 10:05

    Hi to everyone,
    I'm trying to set my red mushroom emergency button to do what i want.
    First of all this the code:

    in config.g file:
    M581 T2 E1 S1 ; run macros "trigger2" for emergency stop

    in trigger2.g macro:
    M106 P0 S1 ;fan 0 on
    M106 P2 S1 ;fan 2 on
    M81 ;24V power supply off
    M112 ;shut down motors and heaters

    I've two power supplies, one 24v for the heat bed and motors, one 12v/5v for fans and cpu. So, even if i shut down the 24v power supply (via SSR) , fans and cpu can work (in order to cool the hotend).

    There'sonly one problem: after m112 command I'd like restart the machine rotating the emergency button, but i'm not able to do so becouse the only thing i can do is press "reset machine" in DWC.

    Any help is appreciate 😊

    1 Reply Last reply Reply Quote 0
    • undefined
      dc42 administrators
      last edited by 2 Sept 2020, 16:21

      I haven't tested it, but I think it should be possible to set up another trigger that runs M999 when it receives the opposite transition from the button.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      undefined 2 Replies Last reply 2 Sept 2020, 18:15 Reply Quote 0
      • undefined
        zecchi @dc42
        last edited by 2 Sept 2020, 18:15

        @dc42 thank you, I'll try with this solution tomorrow.

        undefined 1 Reply Last reply 6 Sept 2020, 19:19 Reply Quote 0
        • undefined
          Nathan @zecchi
          last edited by 6 Sept 2020, 19:19

          @zecchi did it function as you expected?

          undefined 1 Reply Last reply 8 Sept 2020, 19:36 Reply Quote 0
          • undefined
            zecchi @Nathan
            last edited by 8 Sept 2020, 19:36

            @Nathan actually I've had small issues with fans, but now is all ok, so I will try in the next days.

            In my opinion there should be a sort of interaction between the two macros for this reason:
            Let's suppose the emergency button has been pushed, then the printer is switched off before the emergency button has been released. When the printer is restarted (switched on) there may be some problems due to the emergency button state.

            I'm a PLC programmer, and usually, to solve this kind of problems, we use rising edge (or falling edge). But for me g-code is completely new and I don't know how to use properly commands ( like M581). For now it's ok, I will try with dc42's solution.

            1 Reply Last reply Reply Quote 0
            • undefined
              zecchi @dc42
              last edited by 9 Sept 2020, 19:23

              @dc42 your solution seems work.

              I was wondering if M112 has an "automatic reboot", infact when I press the emergency button and wait few seconds DWC seems already rebooted.

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