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

    Set Z height Max For clay Delta printer

    Scheduled Pinned Locked Moved Solved
    RepRapFirmware on other controllers
    2
    3
    253
    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.
    • JetClayundefined
      JetClay
      last edited by

      We are working with a custom Delta printer specialized for clay printing. Due to the nature of our workflow, we need to frequently adjust the Z-max height (M665 H) because we print onto different plaster plates. Our goal is to create a macro that helps us automate this process and makes it more agile. We've used ChatGPT to come up with several ideas, but we haven't been successful so far. Here's what we've tried:

      Steps We’ve Followed

      Using G32 Logic:

      We configured a bed.g file with G30 commands to probe specific points near the edges and the center of the bed.
      The idea was to use G32 to calculate the Z-max height and optionally update M665 H in config.g.
      Issue: Since we do not use a Z-probe (M558 P0), the G30 commands in bed.g could not run properly, and the process stalled.

      Manual Z-Height Calibration:

      We created a macro (SetZHeight.g) to enable manual jogging of the nozzle to the bed using M291 S2, followed by G92 Z0 to set Z=0.
      The macro also attempted to save the new Z=0 height using M500.
      Issue: The manual jog controls (M291 S2) did not activate during macro execution, so we couldn't perform the adjustment as intended.

      Directly Editing M665 H in config.g:

      We created a macro to overwrite M665 H in config.g by using M28 and M29 to edit the file dynamically.
      While this approach worked manually, it failed to automate the process because we couldn't reliably calculate or retrieve the new Z-max height (move.axes[2].max) during macro execution.

      Exploring Duet3D Documentation:

      We reviewed the Duet3D G-code documentation to find alternatives to unsupported commands like G33 (specific Delta calibration) and M565 (deprecated).

      Our Current Issue

      No Probe: Since we use M558 P0 (manual adjustment), many of the automated processes relying on G30 fail.

      Manual Jogging: We cannot activate jog controls (M291 S2) during macro execution, preventing manual Z adjustments in macros.
      Automation Challenges: Calculating and dynamically updating M665 H remains problematic without reliable access to move.axes[2].max.

      What We Need

      • A method to manually set Z=0 (e.g., by jogging the nozzle to the bed) and use that position to calculate the Z-max height (M665 H).
      • A way to automate updating the M665 H value in config.g or apply it dynamically without using a Z-probe.
      • A solution to enable jog controls (M291 S2) during macro execution or an alternative for precise manual adjustment.

      Our Printer and Firmware Details
      Printer Type: Custom Delta printer specialized for 3D printing clay.

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

        @JetClay one option may be to use G30 S-1 to do manual probing without setting the Z height to zero. Then run this:

        G10 L2 Z{sensors.probes[0].lastStopHeight}

        This will set the Z offset of the workplace to that height. Or you could use:

        G10 L2 Z{move.axes[2].userPosition}

        since the current Z position will be the same. Or even:

        G10 L20 Z0

        You can include

        G10 L2 Z0

        in your homedelta.g file to reset the offset to zero when you home the printer again.

        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

        JetClayundefined 1 Reply Last reply Reply Quote 0
        • JetClayundefined
          JetClay @dc42
          last edited by

          @dc42 said in Set Z height Max For clay Delta printer:

          @JetClay one option may be to use G30 S-1 to do manual probing without setting the Z height to zero. Then run this:

          G10 L2 Z{sensors.probes[0].lastStopHeight}

          This will set the Z offset of the workplace to that height. Or you could use:

          G10 L2 Z{move.axes[2].userPosition}

          since the current Z position will be the same. Or even:

          G10 L20 Z0

          You can include

          G10 L2 Z0

          in your homedelta.g file to reset the offset to zero when you home the printer again.

          Thank you very much for your response we finally made it work! we used this code

          ; SetZHeight.g - Manual Z height calibration & M665 H update
          M291 P"Ensure the nozzle is clean. Press OK to continue." R"Z-Height Calibration" S3

          G28 ; Home all axes completely before probing
          M665 ; Print current M665 values for reference

          ; Ensure previous height offsets are cleared
          G10 L2 Z0

          M291 P"Move the nozzle down until it just touches the bed. Press OK when done." R"Manual Adjustment" S3 S2

          G30 S-1 ; Perform manual probing without setting Z=0

          M291 P"Extracting new height offset..." R"Processing" S1

          ; Ensure latest calibration data is loaded before changing M665 H
          M501 ; Load saved config-override.g (M665 H value)

          ; Capture the last probe height and set Z offset
          G10 L2 Z{sensors.probes[0].lastStopHeight}

          ; Update M665 H dynamically based on last saved value
          M665 H{move.kinematics.homedHeight - sensors.probes[0].lastStopHeight}

          ; Save new M665 H for persistence
          M500 ; Save parameters to config-override.g

          M291 P"Calibration complete! The new Z height and M665 H value have been saved." R"Success" S1
          M501 ; override config file
          G28 ; Home axes

          Hope it works for maore people!

          1 Reply Last reply Reply Quote 3
          • T3P3Tonyundefined T3P3Tony marked this topic as a question
          • T3P3Tonyundefined T3P3Tony has marked this topic as solved
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA