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

    Saftey Door Switches for BIG printers

    Scheduled Pinned Locked Moved Unsolved
    General Discussion
    6
    26
    1.4k
    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.
    • A Former User?
      A Former User
      last edited by A Former User

      I'm not sure how you'd go about it but I supect you'd set a M581 trigger for one flank to say trigger1.g that include

      ;trigger1.g - called when doors open
      M220 S20 
      ;cancel T1 
      M581 P"nil" T1 C0
      ;and arm T2
      M581 P"1.io0.in" T2 C0
      M581 P"1.io1.in" T2 C0
      M581 P"1.io2.in" T2 C0
      

      and in trigger2.g you set it back to 100 and change the trigger back to the original

      ;trigger2.g - called when doors close
      M220 S100 
      ;cancel T2 
      M581 P"nil" T2 C0
      ;and arm T1
      M581 P"!1.io0.in" T1 C0
      M581 P"!1.io1.in" T1 C0
      M581 P"!1.io2.in" T1 C0
      

      or something to that effect that causes the trigger to change function so it can respond differently to opening and closing.

      https://duet3d.dozuki.com/Wiki/Gcode#Section_M220_Set_speed_factor_override_percentage

      I suppose you could refactor it to use only trigger1.g and use conditional logic to check if the sensors.GpIn[n] is high or low as well.

      CR3Dundefined 1 Reply Last reply Reply Quote 0
      • CR3Dundefined
        CR3D @A Former User
        last edited by

        @bearer

        Ok this sounds good! πŸ™‚ Thank you

        But this will work for a running Print or always?
        For example if the printer is homed, someone opens the door and moves the axes manually. Will this also be slowed down?

        Christian from CR-3D
        Homepage:
        www.cr-3d.de

        Facebook:
        https://www.facebook.com/cr3d.official

        Our Discord Server
        https://discord.gg/SxRaPNuRdA

        Thingiverse Profile:
        https://www.thingiverse.com/cr-3d_official/about

        1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User
          last edited by

          hmm, docs doesn't specify so I'd presume its valid for all moves, but it'll probably be some amount of time between the switch triggering and command getting applied to the moves in the queue.

          if you test it and find M220 to not do the trick, you could also look into changing the actual speed limit with M203.

          1 Reply Last reply Reply Quote 0
          • CR3Dundefined
            CR3D
            last edited by CR3D

            Hi all...

            I tested the example from @bearer and it works for the first step...

            There are still a few small things:

            1). I get an error message when I call trigger2.g and trigger3.g! Shown here in the picture

            90b109fe-a588-4bc5-a54e-86937eb6c277-image.png

            Here the code:

            ; trigger2.g
            ;called wenn door was closed and gets opend
            
            M220 S20 
            ;cancel T2 
            M581 P"nil" T2 
            ;and arm T3
            M581 P1 S0 T3 R0
            M581 P2 S0 T3 R0
            M581 P3 S0 T3 R0
            
            ;trigger3.g - called when doors close
            
            M220 S100 
            ;cancel T3 
            M581 P"nil" T3 
            ;and arm T1
            M581 P1 S1 T2 R0
            M581 P2 S1 T2 R0
            M581 P3 S1 T2 R0
            

            it seems to have something to do with the "nile". Why does this error appear?

            as I said but it currently works when I open the door the speed decreases and when I close the door it increases again

            2). can you improve the response time? That he does this immediately and not only when the buffer is empty? similar to the emergency stop?

            Thank you! πŸ™‚

            Christian from CR-3D
            Homepage:
            www.cr-3d.de

            Facebook:
            https://www.facebook.com/cr3d.official

            Our Discord Server
            https://discord.gg/SxRaPNuRdA

            Thingiverse Profile:
            https://www.thingiverse.com/cr-3d_official/about

            A Former User? 1 Reply Last reply Reply Quote 0
            • A Former User?
              A Former User @CR3D
              last edited by

              @CR3D said in Saftey Door Switches for BIG printers:

              can you improve the response time? That he does this immediately and not only when the buffer is empty?

              not sure if M25 (pause) is faster with respect to response time? i.e. pause, change speed and resume, but it might be subject to the same latency and/or not affect the moves already planned.

              1 Reply Last reply Reply Quote 0
              • CR3Dundefined
                CR3D
                last edited by

                @bearer

                No I meant if you can speed up the response time of command M581 a little?

                Otherwise I am very happy with the function now!

                Any ideas about the error message with the ""?

                Christian from CR-3D
                Homepage:
                www.cr-3d.de

                Facebook:
                https://www.facebook.com/cr3d.official

                Our Discord Server
                https://discord.gg/SxRaPNuRdA

                Thingiverse Profile:
                https://www.thingiverse.com/cr-3d_official/about

                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators
                  last edited by dc42

                  The error message is misleading; however if you read https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_RepRapFirmware_3_01RC2_and_later you will see that the line

                  M581 P"nil" T3

                  is not valid in RRF 3.01RC2 and later. If you want to delete trigger 3, use:

                  M581 T3 P-1

                  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

                  1 Reply Last reply Reply Quote 0
                  • A Former User?
                    A Former User
                    last edited by

                    whops, i'm clearly outdated.

                    anyways i don't think the delay is in the trigger and M581, its likely M220 waiting for moves already planned to finish before the new speed is applied?

                    1 Reply Last reply Reply Quote 0
                    • CR3Dundefined
                      CR3D
                      last edited by

                      @dc42 Thank you!

                      @bearer Yes I think this too! πŸ™‚

                      Christian from CR-3D
                      Homepage:
                      www.cr-3d.de

                      Facebook:
                      https://www.facebook.com/cr3d.official

                      Our Discord Server
                      https://discord.gg/SxRaPNuRdA

                      Thingiverse Profile:
                      https://www.thingiverse.com/cr-3d_official/about

                      1 Reply Last reply Reply Quote 0
                      • FS-TOOLSundefined
                        FS-TOOLS @dc42
                        last edited by

                        @dc42 Hello everyone, I'm experiencing the same issue as CR3D. My setup consists of a Duet3 6XD mainboard and two 3HC boards, using the following firmware (RepRapFirmware for Duet 3 MB6XD 3.4.5). The I0 pins are on the second 3HC board (adress 2) I've made the same settings in the config.g as described here. In the homeall.g, I've implemented the same meta command, but without success. I'm getting undefined errors. Could this be due to the higher firmware version? If so, how should I integrate this? ```
                        config.g
                        ccf0f9be-c4d4-417a-aa95-5509e6837035-image.png
                        homeall.g

                        94dbe692-b35b-484f-ac76-ca0b80eb6e30-image.png

                        Best regards

                        Fabian
                        .

                        1 Reply Last reply Reply Quote 0
                        • FS-TOOLSundefined FS-TOOLS referenced this topic
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA