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

Forced averaging for M558

Scheduled Pinned Locked Moved
Firmware wishlist
5
11
1.4k
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
    fcwilt
    last edited by 10 Sept 2018, 19:21

    Hi,

    I would like to see an option for M558 to force the averaging of a fixed number of probes.

    No checking for consecutive readings, just probe A times and average them all.

    Perhaps some special value for for S could be used to enable this mode?

    Thanks.

    Frederick

    Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

    undefined 1 Reply Last reply 23 Sept 2018, 19:06 Reply Quote 0
    • undefined
      token47
      last edited by 11 Sept 2018, 04:07

      @fcwilt I guess you want this feature because of your other post where you noticed that the average of all readings was not being done as documented. Please see my follow up post, I don't think this is really necessary if that one would be being honored, right?

      undefined 1 Reply Last reply 11 Sept 2018, 09:43 Reply Quote 0
      • undefined
        fcwilt @token47
        last edited by 11 Sept 2018, 09:43

        @token47 said in Forced averaging for M558:

        @fcwilt I guess you want this feature because of your other post where you noticed that the average of all readings was not being done as documented. Please see my follow up post, I don't think this is really necessary if that one would be being honored, right?

        The current approach will stop probing if two readings are within the range defined by the S parameter.

        Even with S = 0.00 two identical readings (which happens) will stop the probing.

        I would like to be able to force taking a fixed number of readings and simply average them, regardless of any consecutive values.

        I think a simple approach might be to treat S = 0.00 as a special case and use that to force the averaging.

        Thanks.

        Frederick

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

        undefined 1 Reply Last reply 11 Sept 2018, 21:03 Reply Quote 0
        • undefined
          Phaedrux Moderator @fcwilt
          last edited by 11 Sept 2018, 21:03

          @fcwilt I think the current way of measuring the G31 Z height is like pre-averaging, since you're taking several results from your probe, averaging them together, and then the A and S values work to say if you get a result within tolerance of the G31 value, you're good to go. I'm not sure what you gain by averaging the values at print time. Getting two consecutive values would indicate that it's closer to the true height than an average would be, no?

          I'm not disagreeing with your request, just trying to understand the nature of it.

          Z-Bot CoreXY Build | Thingiverse Profile

          undefined 1 Reply Last reply 11 Sept 2018, 21:42 Reply Quote 0
          • undefined
            fcwilt @Phaedrux
            last edited by 11 Sept 2018, 21:42

            @phaedrux
            I wrote a simple macro to do ten single probes.

            So lets assume the results were:

            1 1 2 2 2 2 2 2 2 2

            Currently, using A=10 and S=0.00, the first two readings of 1 and 1 would stop the probing and use 1 as the value.

            However the average of the ten readings is 1.8 - quite a difference from 1.

            I may be wrong but it seems to me that creating the mesh height map would benefit from averaging.

            Frederick

            Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

            1 Reply Last reply Reply Quote 0
            • undefined
              Phaedrux Moderator
              last edited by 11 Sept 2018, 22:38

              Does your macro allow you to reset Z0 by touching nozzle to bed in between each probe?

              In your example of 1s and 2s, if I had a result like that during the G30 S-1 measurements I would rather use the mode value of 2 instead of the average of 1.8. That way as long as the A and S values get me within plus or minus 0.01 of 2 I would be pretty happy.

              How much does your probe vary in repeatability? I think I may have asked that before... I think if your probe repeatability is very poor and inconsistent it would be better to improve that rather than average it.

              The probe trigger height should be a fairly consistent value since it's a distance measurement. If the probe isn't triggering consistently, replace the probe, because even an average could be quite off.

              The point of the G30 S-1 measuring is to give you a good consistent trigger height, either by average or mode. M558 is just setting the tolerance for getting close to that average.

              0_1536705288563_cc5e6eae-42b0-42fb-842d-5e2369e74848-image.png

              M558 P9 H3 F100 T6000 A5 R0.3 S0.005 B1

              So if I get two probe results within 0.005 of 2.025 I'm pretty happy and that's enough to get a good consistent first layer height.

              How far off is your probe? Is it a result of probe inconsistency, or delta calibration? I'm not a delta user, so I'm useless there, but I understand it can be quite persnickety.

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 0
              • undefined
                token47
                last edited by 14 Sept 2018, 03:26

                I guess the best way to achieve that is to control how many readings need to be in range (default 2, but you could increase to the same number of max readings then you would force all of them to be averaged).

                undefined 1 Reply Last reply 14 Sept 2018, 03:34 Reply Quote 0
                • undefined
                  fcwilt @token47
                  last edited by 14 Sept 2018, 03:34

                  @token47 said in Forced averaging for M558:

                  I guess the best way to achieve that is to control how many readings need to be in range (default 2, but you could increase to the same number of max readings then you would force all of them to be averaged).

                  I like that. Even more versatile then what I was thinking of.

                  I began thinking that perhaps there is some statistical function better than averaging for trying to obtain the most accurate result?

                  Statistics is not my field of expertise.

                  Frederick

                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    Phaedrux Moderator
                    last edited by 14 Sept 2018, 03:38

                    I'm not a stats guy either but I think with a large enough set of values the mode would be the most accurate because it's the value that happens the most often. But that's going to depend a lot on the repeatability of the probe.

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      dc42 administrators @fcwilt
                      last edited by 23 Sept 2018, 19:06

                      @fcwilt said in Forced averaging for M558:

                      Hi,

                      I would like to see an option for M558 to force the averaging of a fixed number of probes.

                      No checking for consecutive readings, just probe A times and average them all.

                      Perhaps some special value for for S could be used to enable this mode?

                      Thanks.

                      Frederick

                      Yes, that should be straightforward to implement. Please remind me a week from now and I'll see if I can implement it in the 2.02 release.

                      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

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        Googliola
                        last edited by 29 Sept 2018, 11:38

                        @dc42 I think averaging is the way it is handled in Marlin and Repetier (just guessing though). As I get bad repeatability as well - partly due to https://github.com/dc42/RepRapFirmware/issues/210

                        As a reminder, I opened an issue on github

                        Googliola created this issue 29 Sept 2018, 11:34 in dc42/RepRapFirmware

                        closed M558 F parameter only applied during approaching of probe #210

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