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

    Z probe homes, but won't run mesh bed compensation

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    9
    364
    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.
    • flyschaundefined
      flyscha
      last edited by

      Hi All!

      I'm looking for some guidance please! I'm having an issue with my new build that's using a Duet 3 6HC and a Superpinda Z probe on 3.4.6 firmware. I'd also like to mention my previous build works great with the Duet 2 Wifi & Superpinda on 2.04 firmware. I've tried what seems to be endless combinations between Endstops, Z-Probe, homez, and homeall settings on the 6HC, but at best I can only get the Z to home. I've tried to copy settings from the Duet 2 Wifi for this situation, but there seems to be quite a bit different between older and newer firmwares.

      When using the config below with the Z endstop line commented out, the Z will not home. I then get the following error:
      G28
      Error: Failed to enable endstops

      When I comment the Z endstop line back in, everything homes just fine. But then when I try to run mesh compensation, nothing happens and I get the following error:
      G29
      Error: G29: Z probe 0 not found

      Here is what I have currently:

      config.g:
      ; Drives
      M569 P0.1 S0 ; X Motor Left goes forward
      M569 P0.3 S0 ; Y Motor goes reverse
      M569 P0.4 S1 ; Z Motor Left goes forward
      M569 P0.0 S1 ; Extruder Motor goes forward
      M569 P0.2 S0 ; X Motor Right goes forward
      M569 P0.5 S1 ; Z Motor Right goes forward
      M584 X0.1:0.2 Y0.3 Z0.4:0.5 E0.0 ; set drive mapping
      M350 X16:16 Y16 Z16:16 E16 I1 ; configure microstepping with interpolation
      M92 X200.00:200.00 Y200.00 Z400.00:400.00 E420.00 ; set steps per mm
      M566 X900.00:900.00 Y900.00 Z130.00:130.00 E450.00 ; Set maximum instantaneous speed changes (mm/min)was 900,900,30,3000
      M203 X10000:10000 Y10000 Z2000:2000 E3000 ; Set maximum speeds (mm/min)E was 5000
      M201 X5000:5000 Y5000 Z500:500 E250.00 ; Set accelerations (mm/s^2)was 600,600,250,250
      M906 X1200:1200 Y1200 Z1000:1000 E650 I0 ; Set motor currents (mA) and motor idle factor in percent
      M84 S200 ; Set idle timeout

      ; Axis Limits
      M208 X0 Y0 Z0 S1 ; set axis minima
      M208 X250 Y265 Z240 S0 ; set axis maxima

      ; Endstops
      M574 X2 S1 P"io7.in" ; configure switch-type (e.g. microswitch) endstop for high end on X via pin io7.in
      M574 Y2 S1 P"io8.in" ; configure switch-type (e.g. microswitch) endstop for high end on Y via pin io8.in
      ;M574 Z1 P"io3.in" ; low end Z-probe triggered via signal wire on pin io3.in

      ; Z-Probe
      M558 P5 C"io3.in" H0.50 F600:120 T20000 R0.80 A2 ; Set Z probe type to effector, the axes for which it is used and the dive height + speeds
      G31 P1000 X0 Y0 Z0 ; Set Z probe trigger value, offset and trigger height (more negative is further from the bed).
      M557 X0.00:246 Y0.00:204.0 S82.00:68.00 ; Define mesh grid

      homez.g
      G91 ; relative positioning
      G1 H2 Z5 F6000 ; lift Z relative to current position
      G1 H1 Z-245 F1800 ; move Z down until the endstop is triggered
      G1 H2 Z5 F1000 ; go back up a few mm
      G1 H1 Z-10 F250 ; move slowly to Y axis endstop once more (second pass)
      G92 Z0 ; set Z position to axis minimum (you may want to adjust this)

      homeall.g
      G91 ; relative positioning
      G1 H2 Z5 F6000 ; lift Z relative to current position
      G1 H1 X255 Y215 F3000 ; move quickly to X and Y axis endstops and stop there (first pass)
      G1 H2 X-5 Y-5 F6000 ; go back a few mm
      G1 H1 X255 Y215 F360 ; move slowly to X and Y axis endstops once more (second pass)
      G1 H2 X-6.5 Y-14 F1800; move X/Y to attack position before Z homes
      G1 H1 Z-245 F1800 ; move Z down stopping at the endstop
      G1 H2 Z5 F1000 ; go back up a few mm
      G1 H1 Z-10 F250 ; move slowly to Y axis endstop once more (second pass)
      G92 X0 Y0 Z10 ; set Z position to axis minimum (you may want to adjust this)

      Any help or direction would be much appreciated!

      Thanks!

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

        @flyscha

        Well you cannot have a Z endstop on io3.in AND a Z probe on io3.in.

        You can have a Z endstop on one input AND a Z probe on another input.

        Your homeZ.g file is trying to home Z using the Z endstop. With no Z endstop configured (no M574) you will get that error about failing to enable endstops. The firmware is trying to enable the Z endstop but it's not configured.

        When you configure the Z endstop with the M574 then you get the error about Z probe not found since you are trying to use the same input, io3.in.

        When you have a working Z endstop you can home Z first and then move it to a safe position, say Z=10, and then home X and Y without any code moving Z.

        I'm guessing you used the configuration tool? It generates code like in your homeALL.g

        When you have the Z endstop unless you are trying to save every last second when homing all it's simpler to code your homeX.g, homeY.g and homeZ.g files and have homeALL.g just do the following:

        M98 P"homeZ.g" 
        M98 P"homeX.g"
        M98 P"homeY.g"
        

        Frederick

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

        flyschaundefined 1 Reply Last reply Reply Quote 0
        • flyschaundefined
          flyscha @fcwilt
          last edited by

          @fcwilt

          Thanks so much for the quick reply! I really appreciate all the feedback.

          It makes perfect sense as to what you're saying about not being able to have io3.in assigned as the endstop AND a Z probe. That being said, I'm confused as to what to do since my goal is to use the Superpinda to act as both the Z endstop and the Z probe.

          I have 2 other machines, one uses a Precision Piezo and the other uses a Superpinda. Both of them utilize those Z probes as what I consider to be endstops without issue, but they're on the older Duet 2 Wifi boards on 2.04 firmware.

          Here's how the other machine with Duet 2 Wifi/Superpinda/2.04 firmware is set up (which works perfectly):

          ; Endstops
          M574 X1 Y1 S0 ; Set active low and disabled endstops
          M574 Z1 S2 ; Set endstops controlled by probe

          ; Z-Probe
          M558 P5 I0 H1 F300 T6000 ; Set Z probe type to effector, the axes for which it is used and the dive height + speeds
          G31 P500 X0 Y0 Z2.225 ; Set Z probe trigger value, offset and trigger height (more negative is further from the bed).
          M557 X9.00:252.5 Y035.00:244.0 S81.166667:69.666667 ; Define mesh grid

          Do you have any idea what I could do to achieve this function on the 6HC board?

          Thanks so much!

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

            @flyscha

            From the docs on M574:

            Snnn 1 = switch-type (eg microswitch) endstop input, 2 = Z probe (when used to home an axis other than Z), 3 = single motor load detection, 4 = multiple motor load detection (see Notes).

            The configurator loves to toss that M574 Zn S2 line it but it rarely applies.

            You can get by with just a Z probe to home Z.

            You home X and Y "normally" using G1 H1 moves and then you finish by using an absolute G1 command followed by a G30 command to set the Z=0 Datum.

            I don't like that setup because you are moving X and Y without really knowing the Z position. Which is why all of my printers have a Z endstop and a Z probe. Adding a Z endstop involves a micro-switch or an optical sensor and a few feet of wire plus a spare input on your controller. Assuming you have the input you are talking a couple of dollars in parts.

            Frederick

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

            flyschaundefined 1 Reply Last reply Reply Quote 0
            • flyschaundefined
              flyscha @fcwilt
              last edited by

              @fcwilt

              Again, thank you so much for the input! As a last resort I'll toy with the G1& H1 moves in the homing files if the below can't be figured out.

              I have extra optical endstops and open i/o ports on the board, so having both types would not be a problem, hardware-wise!

              I have considered looking into being able to home both of my Z motors individually (it's a cartesian build) to make sure they stay equal, side to side. I guess my brain just isn't wrapping around how the Z-probe and the Z endstops would work together and allow each of their functions to happen individually without them interfering with each other. Unless of course it was a BLtouch type Z probe with a retractable pin.

              Any insight on that would be great!

              Much appreciated!

              droftartsundefined fcwiltundefined 3 Replies Last reply Reply Quote 0
              • droftartsundefined
                droftarts administrators @flyscha
                last edited by droftarts

                @flyscha to use a probe rather than endstop for Z homing, comment out the M574 for the Z endstop, and change your homeall.g and homez.g to use G30, rather than G1 Z… H2 moves. See my post here for example : https://forum.duet3d.com/post/326438

                Ian

                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

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

                  @flyscha

                  When you have both a Z endstop and a Z probe the each do different jobs.

                  The Z endstop takes care of homing Z.

                  The Z probe takes care of setting the Z=0 Datum and probing the bed as needed for using the Mesh Bed Compensation feature and/or the Auto Bed Leveling feature.

                  That's basically it.

                  Then what you need to know is when do you need to set the Z=0 Datum.

                  You need to do that:

                  • before creating the heightmap needed for using the Mesh Bed Compensation feature.
                  • before loading the heightmap to actually use the Mesh Bed Compensation feature.
                  • after leveling the bed if you use the Auto Bed Leveling feature (which needs multiple Z steppers).
                  • before starting a print if you don't use the Mesh Bed Compensation feature.

                  I can explain in greater detail or post examples of the macros you would need to do some or all of the above.

                  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
                  • droftartsundefined
                    droftarts administrators @flyscha
                    last edited by

                    @flyscha There's no problem using the Z probe for Z homing; most people do this. If you have a Z probe and a Z endstop (and yes, they should be on different io pins, they can't share), use the Z endstop for something the Z probe can't do, ie home at the max end of Z. Why? Disaster recovery. See this very similar discussion (between @fcwilt and I): https://forum.duet3d.com/post/327874

                    I have considered looking into being able to home both of my Z motors individually (it's a cartesian build) to make sure they stay equal, side to side. I guess my brain just isn't wrapping around how the Z-probe and the Z endstops would work together and allow each of their functions to happen individually without them interfering with each other. Unless of course it was a BLtouch type Z probe with a retractable pin.

                    I do this. Basically, you just use the Z probe; they don't really work together. There's a whole wiki page on it, too: https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_auto_levelling
                    You can also do it with multiple endstops, see the end of the page.

                    Ian

                    Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                    flyschaundefined 1 Reply Last reply Reply Quote 0
                    • flyschaundefined
                      flyscha @droftarts
                      last edited by

                      @fcwilt @droftarts

                      Thanks so much to the both of you for all of your input, directions, and suggestions! After stuffing myself with turkey today, I was able to get the Z probe set up for Z homing, at least as a temporary solution. My Z motors are falling out of alignment with each other just from constant Duet restarts after config file changes, so I’ll be getting individual Z endstops set up ASAP.

                      Thanks again!

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