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

    H1 command for an endstop switch (microswitch)

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    4
    15
    532
    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.
    • axiomundefined
      axiom @jay_s_uk
      last edited by

      @jay_s_uk Ungefähr 18.000.000 Ergebnisse (0,30 Sekunden)
      Deutsch
      Englisch

      Apparently it recognizes both, see the screenshot...I made different "K" assignments in config.g and both react. I only want to use the microswitch for the auto z-offset...since the puck is 15mm high, do I have to set the z-offset to -15? (see config.g but commented out)...so I thought I'd let the printhead go to a certain position, set the microswitch/puck darunger : G1 x300 y300 z30 and do the H1 command, and set the Z to 0 (G92 z0) then I run the capacitive sensor over the puck and read the offset via G30 S-1. Is this the right way or will I crash my bed?2e8e82c6-ff92-4381-bec2-b6b445c0b384-grafik.png
      ; Z-Probe two of them
      M558 K0 P1 C"!zprobe.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds
      M558 K1 P8 A2 S0.2 C"zstop" H5 F80 T3000
      G31 P1000 X-1 Y-61 Z2.9 ; set Z probe trigger value, offset and trigger height
      ;G31 P1000 X50 Y50 Z-15 ; Second Z-offset
      M557 X0:740 Y-27:611 S35 ; define mesh grid

      jay_s_ukundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @axiom
        last edited by

        @axiom so you mean probes and not endstops. That's different, you can have more than one. Just make sure you use the correct K value when using G30 and you'll be fine

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

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

          @axiom it sounds to me that your "endstops" are actually configured as Z probes. You can indeed have more than one Z probe.

          The usual way of homing using a Z probe is to use the G30 command, and you can provide a K parameter with this command to tell it which Z probe to use.

          If the microswitch triggers when the nozzle if 15mm higher than the bed then you should set the G31 Z parameter for that probe to 15. For historical reasons the Z parameter isn't the offset, it's the trigger height (the negative of the offset). Again, use the K parameter of the G31 command to specify which probe that command refers to.

          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

          axiomundefined 1 Reply Last reply Reply Quote 0
          • axiomundefined
            axiom @dc42
            last edited by

            @dc42 I have now made the following entry in cofig.g:
            ; Z-Probe two of them
            M558 K0 P1 C"!zprobe.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds
            M558 K1 P8 A2 S0.2 C"zstop" H5 F80 T3000
            G31 P1000 K0 X-1 Y-61 Z2.3 ; set Z probe trigger value, offset and trigger height
            G31 P1000 K1 X0 Y0 Z15 ; Second Z offset
            M557 X0:740 Y-27:602 S35 ; define mesh grid

            When I first go to z=50 (G1 z50= and enter G30 K1 via the console, I get the message: "Error: Probe already triggered at start of probing move"

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

              @axiom are you using the normally-open or normally-closed microswitch contacts?

              Your DWC screen shot indicates that Z probe K1 is registered as triggered (the value is 1000). Was that correct?

              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

              axiomundefined 1 Reply Last reply Reply Quote 0
              • axiomundefined
                axiom @dc42
                last edited by

                @dc42 I don't quite understand that...how do I recognize that?...if I bring the contacts of the microswitch (puck) together (bring them into contact...i.e. nozzle and puck) the display for the probe goes to zero.. .that's actually correct, isn't it?

                1 Reply Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator
                  last edited by

                  P1000 means triggered
                  P0 means not triggered

                  Z-Bot CoreXY Build | Thingiverse Profile

                  axiomundefined 1 Reply Last reply Reply Quote 0
                  • axiomundefined
                    axiom @Phaedrux
                    last edited by

                    @Phaedrux got it... just had to say "!" put in front of the name of the connection. G30 K1 works. But I would like to read the value and set this value minus the 15mm (height of the puck) as Z=0.

                    Phaedruxundefined 1 Reply Last reply Reply Quote 0
                    • Phaedruxundefined
                      Phaedrux Moderator @axiom
                      last edited by

                      @axiom said in H1 command for an endstop switch (microswitch):

                      But I would like to read the value and set this value minus the 15mm (height of the puck) as Z=0.

                      I don't understand what you mean exactly.

                      Z-Bot CoreXY Build | Thingiverse Profile

                      axiomundefined 2 Replies Last reply Reply Quote 0
                      • axiomundefined
                        axiom @Phaedrux
                        last edited by

                        @Phaedrux I would like to use it to automatically measure the z-offset...so I no longer have to put paper underneath it

                        1 Reply Last reply Reply Quote 0
                        • axiomundefined
                          axiom @Phaedrux
                          last edited by axiom

                          @Phaedrux so I need to be able to set the trigger value as z=0.

                          1 Reply Last reply Reply Quote 0
                          • Phaedruxundefined
                            Phaedrux Moderator
                            last edited by

                            What is the puck you mention? Can you show a photo of your setup?

                            Z-Bot CoreXY Build | Thingiverse Profile

                            axiomundefined 1 Reply Last reply Reply Quote 0
                            • axiomundefined
                              axiom @Phaedrux
                              last edited by

                              @Phaedrux Puck.jpg
                              The part with the blue cap is the capacitive sensor, the part on the glass plate on the heatbed is the "puck/microswitch". Contact with the printhead triggers it...that works

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