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

Probe accuracy macro

Scheduled Pinned Locked Moved
General Discussion
3
6
1.2k
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.
  • undefined
    alexic
    last edited by 23 Sept 2020, 14:23

    I am looking for a way to test a few Z probe types for their accuracy but to my surprise I could not find a command or example macro for this. In klipper or marlin there are dedicated functions for this.

    I know from the probe calibration page that I can raise Z a few millimeters then lower Z until the probe is triggered and the height will be reported, but could I store this value in a list and repeat the command 10 times? Then (not necessarily but would be nice) do some math calculations with the numbers to determine mean value, standard deviation.

    Any of you have an idea of this can be implemented?

    undefined 1 Reply Last reply 23 Sept 2020, 17:41 Reply Quote 0
    • undefined
      jay_s_uk
      last edited by 23 Sept 2020, 14:24

      have a look at this thread
      https://forum.duet3d.com/topic/6962/m48-measure-z-probe-repeatability-and-print-to-serial-output?_=1600667938818

      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
      • undefined
        Kolbi @alexic
        last edited by 23 Sept 2020, 17:41

        @alexic If you really want to play with the probe repeatability numbers in a spreadsheet, you could do something like this:

        ; Probe repeatability testing
        ; Directory "0:/macros/probe-results/" must exist to save results
        ; Upon completion, download zip file of the results directory, make a file listing of the directory in the form of a text file, save that file
        ; as a .csv file, import into spreadsheet - setting "-" as the deliminator.
        G32 ; Home and level
        G1 Z5 ; Move Z to 5mm height
        G1 X100 Y100 F2000 ; Move to center of bed
        while iterations <=49 ; Perform 50 passes
        G30 Z-99999 S-1 ; Execute Z Probe
        echo "" ^ move.axes[2].machinePosition ^ "," ^ iterations ; Echo the probe result and iteration number to console
        M28 {"0:/macros/probe-results/"^ move.axes[2].machinePosition ^"-"^iterations} ; Create a file, named as the probe result and iteration number in the
        ; 0:/macro/probe-results/ directory.
        M29 ; Close file
        G1 Z5 ; Move Z to 5mm height
        M400 ; Wait for current moves to finish

        Cheers,
        Kolbi

        1 Reply Last reply Reply Quote 2
        • undefined
          Kolbi
          last edited by Kolbi 23 Sept 2020, 17:59

          I should have added, to make a text file containing a directory listing you can use the following in a terminal, from within that directory you wish to list.

          Windows:
          dir /b > results.csv

          Unix family:
          ls > results.csv

          1 Reply Last reply Reply Quote 0
          • undefined
            alexic
            last edited by 23 Sept 2020, 18:17

            Thanks guys, it seems to be what I was looking for!

            1 Reply Last reply Reply Quote 0
            • undefined
              Kolbi
              last edited by Kolbi 24 Sept 2020, 06:18

              I ran the script at probing speeds from 30 to 500, dive height of 5mm - here is the results. My normal probing speed is 50.

              ; Probe repeatability testing
              ; Directory "0:/macros/probe-results/" must exist to save results
              ; Upon completion, download zip file of the results directory, make a file listing of the directory in the form of a text file, save that file
              ; as a .csv file, import into spreadsheet - setting "-" as the deliminator.
              G32 ; Home and level
              G1 Z5 ; Move Z to 5mm height
              G1 X100 Y100 F2000 ; Move to center of bed
              M558 F30 A1 ; Set probing speed
              while iterations <=19 ; Perform 20 passes
              G30 Z-99999 S-1 ; Execute Z Probe
              echo "" ^ move.axes[2].machinePosition ^ ",F30," ^ iterations ; Echo the probe result and iteration number to console
              M28 {"0:/macros/probe-results/"^ move.axes[2].machinePosition ^"-F30-"^iterations} ; Create a file, named as the probe result and iteration number in the
              ; 0:/macro/probe-results/ directory.
              M29 ; Close file
              G1 Z5 ; Move Z to 5mm height
              M400 ; Wait for current moves to finish

              blt31-results-run1.png

              From dive height of 15mm (50 samples per probing-speed group)

              ; Probe repeatability testing
              ; Directory "0:/macros/probe-results/" must exist to save results
              ; Upon completion, download zip file of the results directory, make a file listing of the directory in the form of a text file, save that file
              ; as a .csv file, import into spreadsheet - setting "-" as the deliminator.
              G32 ; Home and level
              G1 Z15 ; Move Z to 15mm height
              G1 X100 Y100 F2000 ; Move to center of bed
              M558 F30 A1 ; Set probing speed
              while iterations <=49 ; Perform 50 passes
              G30 Z-99999 S-1 ; Execute Z Probe
              echo "" ^ move.axes[2].machinePosition ^ ",F30," ^ iterations ; Echo the probe result and iteration number to console
              M28 {"0:/macros/probe-results/"^ move.axes[2].machinePosition ^"-F30-"^iterations} ; Create a file, named as the probe result and iteration number in the
              ; 0:/macro/probe-results/ directory.
              M29 ; Close file
              G1 Z15 ; Move Z to 15mm height
              M400 ; Wait for current moves to finish

              blt31-results-run2.png

              Raw probing values - results.csv

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