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

    Saving M208 (axis min/max) values in config-override.g possible?

    Scheduled Pinned Locked Moved Solved
    Using Duet Controllers
    4
    14
    511
    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.
    • NeoDueundefined
      NeoDue @Phaedrux
      last edited by

      @Phaedrux I fear you lost me there 🙂

      Let me try to repeat what I understood:

      • do the bunch of required z probes with G30
      • calculate the average and use that value to update the current z value with G92
      • then do a G1 H3 to zmax and let M500 save the value it finds
      • move z back up and continue with manual bed correction at the other measurement points

      Did I understand that correctly or am I wrong?

      deckingmanundefined 1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by Phaedrux

        That's basically what I do with this macro to measure the length of the Z axis.

        ; 0:/macros/Bed Leveling/0_Measure Zmax trigger.g
        ; Automates measuring the Zmax trigger for optical endstop at 305mm
        ;
        M291 P"This will set Z0 and calibrate Zmax height to 305mm" R"Proceed?" S3
        M291 P"Homing all axis" T5
        G28			; Home all
        G90			; Absolute positioning
        M291 P"Ready to test Zmax homing?" R"Proceed?" S3
        M291 P"Homing to Zmax" T5
        G1 Z350 H3 F400		; home to z max and set the trigger height as the M208 Z maxima
        M500 ; save the measured M208 Z maxima to config-override.g
        M291 P"ZMax homing test complete. Printer will now home all." R"Proceed?" S3
        G28	; Home all
        M291 P"ZMax calibration complete." S3
        

        And if you didn't want to rely on the probe, you could touch off the nozzle to the bed and set Z0 that way.

        M98 P"0:/macros/0_Center Nozzle.g"	; Move nozzle to bed center	
        M291 P"Adjust nozzle height until it's touching bed" Z1 S3
        G92 Z0 			; set Z0
        

        Z-Bot CoreXY Build | Thingiverse Profile

        NeoDueundefined 1 Reply Last reply Reply Quote 0
        • deckingmanundefined
          deckingman @NeoDue
          last edited by

          @NeoDue Forgive me but I fail to see the use case of what it is that you are trying to do. Unless the machine undergoes extensive modifications the axes limits will never change. So it seems to be to be a lot of effort in order to avoid typing one single command on one single occasion.

          In my humble opinion, the use of config-override.g is something that should be avoided. So many people (including me) have been caught out so many times when they have tried to make changes to their configuration which have had no effect (because those changes are being overridden). They eventually realise that they have to look in two different places to find which configuration command is being applied.

          Ian
          https://somei3deas.wordpress.com/
          https://www.youtube.com/@deckingman

          1 Reply Last reply Reply Quote 1
          • NeoDueundefined
            NeoDue @Phaedrux
            last edited by NeoDue

            @Phaedrux thanks a lot! Okay, taht would be an option. I will try that. But "just touching" is no option for daily use here, at least for now - my printer has a nozzle contact and four (three flat ones for bed leveling and one square hole for XY calibration) inside the print bed, which massively facilitates tuning the two IDEX printheads towards each other.

            This requires however the print plate to be placed above all that before I can print - which then means the z sensor is nonfunctional in that state. Thus, it is not useful for z homing.

            @deckingman you are basically right, but the printer I am working on has swappable hotend modules. Whenever I choose another one, I need to recalibrate z - and that means either doing a full bed leveling process (if z max is left unchanged) or updating z max and save that value...

            Edit: in case you are curious which calibration I try to recreate here in RRF and therefore in a fully open source environment, take a look at this video: https://www.youtube.com/watch?v=ZNXBElBMDtI&t=140 (you may skip the first 2min). That first set of probes in the back centre will correct Z and then you can turn the front screws (which is where the inability of G30 to not dosplay a message drives me crazy, but that ist another topic here in the forum)

            deckingmanundefined 1 Reply Last reply Reply Quote 0
            • deckingmanundefined
              deckingman @NeoDue
              last edited by

              @NeoDue Can't you just a different Z offset for each tool (hot end)? That's the normal way of doing it. No need too keep changing the axis limits.

              Ian
              https://somei3deas.wordpress.com/
              https://www.youtube.com/@deckingman

              NeoDueundefined 2 Replies Last reply Reply Quote 0
              • NeoDueundefined
                NeoDue @deckingman
                last edited by

                @deckingman Hm, I just follow the "defining tool and z probe offsets" manual here - the tool tip of the x carriage is the head reference point, and the second carriage will be (manually) leveled to that height.

                Adding a tool offest which then would be the same for both tools might work however (provided that one is saved then with M500) - I had thought about that earlier but discarded that idea because of the warning in the gcode ditionary "It's usually a bad idea to put a non-zero Z value in as well..."

                The printer has to wait today, but I will test that as soon as possible. If that works, I have a solution that does not require a full down-up-cycle of the bed. Thanks!

                1 Reply Last reply Reply Quote 0
                • NeoDueundefined
                  NeoDue @deckingman
                  last edited by

                  @deckingman One more question: let's say I have a tool offset of 1mm, i.e. the bed needs to go to -1mm to compensate for that. Which value is the bed motion limit then when this tool is active - 0mm as defined by M208 or -1mm which then would be 0mm for the active tool? If I understand the manual correctly, M208 values will not change - which in turn means I either need to define the worst possible case (shortest hotend module) in M208 and live with the collision risk if a longer hotend is mounted (which makes me fear for the glass plate... 😬) or cannot use that idea.

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

                    @NeoDue RRF doesn't allow you to save the M208 limits to config-override.g. However, you could save them to a different file in your macro, and then run that file as a macro in config.g.

                    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

                    NeoDueundefined 2 Replies Last reply Reply Quote 0
                    • NeoDueundefined
                      NeoDue @dc42
                      last edited by

                      @dc42 thanks a lot! That sounds like the best option!

                      (offtopic: Regarding your question on Github about G30: I will add the script later today, I do not have my Github login at hand on my mobile phone.)

                      1 Reply Last reply Reply Quote 0
                      • NeoDueundefined NeoDue marked this topic as a question
                      • NeoDueundefined NeoDue has marked this topic as solved
                      • NeoDueundefined
                        NeoDue @dc42
                        last edited by

                        @dc42 final update for this: your suggestion works like a charm, thanks a lot! 😃

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