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

    H1 command for an endstop switch (microswitch)

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    4
    15
    509
    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.
    • 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