Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. .Shadow 0
    3. Posts
    • Profile
    • Following 0
    • Followers 1
    • Topics 1
    • Posts 4
    • Best 1
    • Controversial 0
    • Groups 0

    Posts made by .Shadow 0

    • RE: Tool Z Offset measuring script

      Update:

      My script works with a few little tweaks and the thought that you safe the z offset for your main tool modules in your config an if you change your tool through a script it performs the z probe of the tool and saves it internally. If i use a tool more frequently like Tool4 i can safe it in the override with M500. After a restart the main tool should be taken from the config and other tools must be changed trhough the script.

      The working script looks like so:

      T-1 ;deselect any tool
      G28 ;home all
      M400 ;wait for current movement to finish
      
      G1 Z65 F800 ;move bed to a save height (65 as high as the filament storage) where no tool can interfere
      
      T4 P0 ;select tool 4 without running macros (P0)
      
      G1 X295 Y72.9 F4000 ;move TCP over the probe
      
      M400
      
      G30 K2 H-0.8 S-2  ;Probe the tool Z offset at the current XY position and change it so Z is 0
      M500
      
      T-1	P0 ;deselect tool
      G28 U V	Z ;home U and V
      

      The endstop switches where set as new z probes:

      ; Tool Probes
      M558 K1 P8 C"duex.e5stop" H80 F200 ; Set left z probe with an expected 80mm probing height a probing speed of 200 mm/min
      M558 K2 P8 C"duex.e6stop" H80 F200 ; Set right z probe with an expected 80mm probing height a probing speed of 200 mm/min
      

      I might put an output of the probed offset in the console so people can copy it from there

      posted in Gcode meta commands
      .Shadow 0undefined
      .Shadow 0
    • RE: Tool Z Offset measuring script

      @mikeabuilder Thank you very much, the printer was in use and i still had´nt the chance to test my code or your code. But now i know where you got these functioncalls from and i understand how i can modify my code to get the z offset if he does´nt override the config value for it automatically.
      I am btw completly new to it and now it opens a whole new world with much more abilities to get data from the printer.

      Again thank you very much for your competent help 🙂
      I will report my status in a few days or tomorrow if it´s possible.

      posted in Gcode meta commands
      .Shadow 0undefined
      .Shadow 0
    • RE: Tool Z Offset measuring script

      @mikeabuilder Line 11 could be like u said, however in the documentation od duet3d the G30 S-2 command in Line 15 should "Probe the bed at the current XY position. When the probe is triggered, adjust the Z offset of the current tool to make the current position Z=0." (G30 on Duet Documentation)

      Your way an doing it looks very good and i will look more into it and might test my code and yours. Until now i had´nt the time to test it properly

      Thank you for your answer so far i will update this post after my tests.

      posted in Gcode meta commands
      .Shadow 0undefined
      .Shadow 0
    • Tool Z Offset measuring script

      Currently i am working on my bachelor thesis and on a tool Z offset measuring script based on a Voron 2.4 Z endstop. I wanted to know where the G30 S-2 is stored or if it is stored somewhere in the memory. If it is hidden in the memory is there a way to save it in the config or with M500 in the override?

      My script looks like this:

      T-1					;deselect any tool
      M400					;wait for current movement to finish
      
      M574 (Z0) S1 P"..."  		;configure active high endstop switch for none on Z ;Z0 might be too much could be deletet
      
      T4					;select tool 4
      
      G1 Z50 F500				;move bed to a height where no tool can interfere
      G1 X... Y...			;move TCP over the probe
      
      M558 P5 K2 C"..." H60 F120  	; Probe Z to an expected 60mm with a speed of 120
      
      M400
      
      G30 K2 H... S-2 			;Probe the tool Z offset at the current XY position and change it so Z is 0
      
      (M500)
      
      G91 					;set relative positioning
      G1 Z20				;move the bed 20mm down
      
      T-1					;deselect tool
      

      Would be wonderful to get a confirmation or a better way to do it

      posted in Gcode meta commands
      .Shadow 0undefined
      .Shadow 0