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

    Beginner issue: storing Z-offset

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    8
    30
    3.7k
    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.
    • fcwiltundefined
      fcwilt @westech
      last edited by fcwilt

      @westech

      G1 H1 Z-265 F360        ; move Z down stopping at the endstop
      G90                     ; absolute positioning
      G92 Z0                  ; set Z position to axis minimum (you may want to adjust this)
      

      The G1 H1 command is going to set the Z position to 0 since that is the Zmin value from your M208 command in your config.g file.

      However if your Z endstop is triggered when the Z position is NOT 0 then your homed Z position is going to be off.

      The G92 Z0 command can be edited to correct for this.

      Example: Let us say your Z endstop triggers at Z=2. So changing G92 Z0 to G92 Z2 will sync the actual Z position with homed Z position.

      You also have to make the same correction to your homez.g file.

      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

      westechundefined 1 Reply Last reply Reply Quote 0
      • westechundefined
        westech @fcwilt
        last edited by westech

        @fcwilt Thanks Frederick for your prompt advice.

        In my Cura start GCODE it has:

        G28 ; Home all axes

        Does that execute the homeAll.g? Just trying to figure out what supersedes the other commands.

        HomingAll overrides the G92 Z0 I set in the console.

        Now your example:

        I need my Z0 to be 1.40mm higher to compensate for the mirror height.

        So I edit homeAll.g and homeZ.g to:

        G92 Z1.40 or do I do Z-1.40 (technically my Z endstop triggers -1.40mm below my bed level)

        My mechanical Z endstop is actually lower than the bed due to the extra Mirror height.

        Thanks again.

        PS: I'm a newbee to RRF but have plenty of Marlin experience with baby stepping and dialing in my z height.:-)

        o_lampeundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
        • o_lampeundefined
          o_lampe @westech
          last edited by

          @westech said in Beginner issue: storing Z-offset:

          My mechanical Z endstop is actually lower than the bed due to the extra Mirror height.

          That's bad because the nozzle can destroy the mirror. You should always home above the bed, so you have to raise the endstop somehow.

          1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt @westech
            last edited by

            @westech said in Beginner issue: storing Z-offset:

            @fcwilt Thanks Frederick for your prompt advice.

            In my Cura start GCODE it has:

            G28 ; Home all axes

            Does that execute the homeAll.g? Just trying to figure out what supersedes the other commands.

            Yes. G28 by itself executes homeall.g. G28 X executes homex.g. G28 Y executes homey.g. G28 Z executes homez.g.

            My mechanical Z endstop is actually lower than the bed due to the extra Mirror height.

            How is that possible? Why doesn't the nozzle crash into the mirror when homing?

            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

            cosmowaveundefined 1 Reply Last reply Reply Quote 0
            • PaulHewundefined
              PaulHew
              last edited by

              @westech I had a similar issue running different beds, Mirror and PEI.
              I had 2 different length pins for initial homing of Z, one for Mirror and one for PEI on Spring.
              Got fed up with changing or forgot and used a BLTouch in the end, saved a lot of hassle and head crashes!

              RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
              Voron 2.4 disassembled..... Waiting for the RailCore Mini....

              1 Reply Last reply Reply Quote 0
              • cosmowaveundefined
                cosmowave @fcwilt
                last edited by cosmowave

                @fcwilt said in Beginner issue: storing Z-offset:

                How is that possible? Why doesn't the nozzle crash into the mirror when homing?

                This will only be possible when the nozzle is outside of the bed (or additional mirror) when homing...

                Mankati FSXT+, DeltaTowerV2, E3D MS/TC

                o_lampeundefined 1 Reply Last reply Reply Quote 0
                • o_lampeundefined
                  o_lampe @cosmowave
                  last edited by

                  @cosmowave said in Beginner issue: storing Z-offset:

                  @fcwilt said in Beginner issue: storing Z-offset:

                  How is that possible? Why doesn't the nozzle crash into the mirror when homing?

                  This will only be possible when the nozzle is outside of the bed (or additional mirror) when homing...

                  OK, that's fair enough for homing, but not for bed levelling or mesh levelling. (that's why fcwilt and me were confused)

                  1 Reply Last reply Reply Quote 0
                  • westechundefined
                    westech
                    last edited by westech

                    Please understand, I have 3 bed surface options. The Mirror prints AMAZING. Perfectly flat, but it is thicker than the regular "buildtech" surface by 1.4mm. Likewize I bought a Energetic Flex plate which I believe is even thicker than the mirror. So, I will be switching between them. (The flex plate has a very textured surface).

                    The mechanical endstop I don't want to move. If I moved it up, then physically I could never reach the bed (besides the Z min trigger)

                    This is actually very simple to set in Marlin with baby stepping and M500.

                    I'm perplexed that G92 isn't saved using M500 in RRF?

                    MintyTreborundefined fcwiltundefined Phaedruxundefined 4 Replies Last reply Reply Quote 0
                    • MintyTreborundefined
                      MintyTrebor @westech
                      last edited by

                      @westech I'm sure there are various ways of achieving this, but in my case where I have different z offsets per print surface I use the Z offset feature in my slicer profile.

                      Screenshot 2021-07-26 164114.png

                      I choose the thickest surface option to be the default (eg 0 z offset in the slicer) slicer profile and set printer firmware defaults (homing heights, offsets etc) for that print surface; then create different printer profiles for each additional print surface, and adjust the slicer z offset for each as required.

                      I just have to remember to choose the correct printer profile for the appropriate print surface before slicing.

                      (I am using a BL Touch so I do not have to worry about crashing the HE into the bed if the surface is not detectable with a inductive probe though.)

                      Hope this helps.

                      NodeDSF - Native Node-Red integration with Duet boards.
                      BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
                      ReleaseMgr - Duet update info inside DWC.
                      Repo

                      westechundefined 1 Reply Last reply Reply Quote 1
                      • fcwiltundefined
                        fcwilt @westech
                        last edited by

                        @westech said in Beginner issue: storing Z-offset:

                        The mechanical endstop I don't want to move. If I moved it up, then physically I could never reach the bed (besides the Z min trigger)

                        Well it doesn't have to be that way.

                        The purpose of any endstop is to allow the firmware to establish that an axis is in a known position.

                        That position can be anywhere along the axis as long as the firmware can use the endstop to accurately and unequivocally determine that position.

                        Of course the endstop sensor has to be mounted in such a way as to allow this.

                        I use IR beam break sensors which allow me to place the endstop near one end of the axis without preventing movement to the end of the axis.

                        For example on a recent printer I built the Z endstop sensor triggers at Z=20mm and remains triggered from 20mm to 0mm.

                        So the homing code looks something like this:

                        G91
                        G1 H1 Z-299 F3000
                        G1 Z25
                        G1 H1 Z-30 F300
                        G92 Z20 ; since the endstop sensor triggers at 20mm this is where the actual Z position is set
                        

                        If I had to cope with different bed thicknesses I would set such an endstop sensor to trigger above the thickest bed and rely on the Z probe to establish the actual Z=0 datum for the current bed.


                        In your case you could use a global variable to hold the Z offset from the endstop sensor position for each bed type. A macro could set the Z offset for the current bed type. The homing code would use the value in the global variable with G92 to set the Z position so that Z=0 was at the surface of the current bed type.

                        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
                        • fcwiltundefined
                          fcwilt @westech
                          last edited by

                          @westech said in Beginner issue: storing Z-offset:

                          I'm perplexed that G92 isn't saved using M500 in RRF?

                          G92 only sets the current position on an axis. It is not a constant value and thus cannot be saved in a meaningful way.

                          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
                          • westechundefined
                            westech @MintyTrebor
                            last edited by

                            @mintytrebor Thank you! I just checked Cura and Prusa Slicer and this is an excellent solution for me, unless I forget to switch the profiles. 🙂

                            Again, the enstop I have is a mechanical switch. It is physically impossible for the printer to go beyond the switch.

                            fcwiltundefined 1 Reply Last reply Reply Quote 0
                            • fcwiltundefined
                              fcwilt @westech
                              last edited by

                              @westech said in Beginner issue: storing Z-offset:

                              Again, the enstop I have is a mechanical switch. It is physically impossible for the printer to go beyond the switch.

                              I understand that it is mounted in such a way on your printer that it is impossible to move beyond it.

                              But that is not an inherent characteristic of a mechanical switch.

                              I have micro-switches (the kind with a lever) that are mounted on the Z axis in such a way that they are triggered over a range and do not block movement.

                              Once the bed support bracket reaches the point where it triggers the switch the lever of the switch can just slide along the side.

                              MF1 Z Endstop Switch.jpg

                              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 1
                              • Phaedruxundefined
                                Phaedrux Moderator
                                last edited by Phaedrux

                                x; Z-Probe
                                M950 S0 C"servo0" ; create servo pin 0 for BLTouch
                                M558 P9 C"^probe" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds
                                G31 P500 X-40 Y-12 Z2.08 ; set Z probe trigger value, offset and trigger height
                                M557 X15:215 Y15:195 S20 ; define mesh gr

                                It looks like you have a BLTouch configured, but you're not using it in your homing files to actually probe and set the Z0 position. Doing this would solve all your problems and you don't have to worry about setting a Z offset or saving an offset, etc. You just measure the offset between the nozzle and probe trigger point once, save it, and you're good to go regardless of the bed surface because the probe checks the surface each time before the print when you home.

                                Do you not actually have a probe?

                                https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe

                                Z-Bot CoreXY Build | Thingiverse Profile

                                1 Reply Last reply Reply Quote 1
                                • Phaedruxundefined
                                  Phaedrux Moderator @westech
                                  last edited by

                                  @westech said in Beginner issue: storing Z-offset:

                                  This is actually very simple to set in Marlin with baby stepping and M500.
                                  I'm perplexed that G92 isn't saved using M500 in RRF?

                                  That's a very marlin way of thinking.

                                  You can use M500 P31 to save a trigger height for your probe (G31 Z) after it's been measured, but you can't save G92. That doesn't really make any sense. You don't need to save it because your homeall.g dictates what happens when you want to set the Z position. So just have G92 Z in there if you want to force a current position as Z#

                                  Z-Bot CoreXY Build | Thingiverse Profile

                                  1 Reply Last reply Reply Quote 1
                                  • Phaedruxundefined
                                    Phaedrux Moderator @westech
                                    last edited by

                                    @westech said in Beginner issue: storing Z-offset:

                                    2)  I use Cura, And for some weird reason at the end of the print the filament retracted a good 6-7". It's not in my Cura G-code because I print the same thing on another printer running Marlin.  Any Thoughts.

                                    You need to change Cura to use relative extrusion in the settings. It's likely set to absolute extrusion right now, and your end gcode probably has it do a small retraction, but since it's in absolute mode, it's not retracting a 2mm, it's going to the 2mm position which was way at the beginning of the print.

                                    Z-Bot CoreXY Build | Thingiverse Profile

                                    westechundefined 1 Reply Last reply Reply Quote 1
                                    • westechundefined
                                      westech @Phaedrux
                                      last edited by

                                      @phaedrux Greetings! Great feedback.

                                      In reverse order. That weird Cura retraction only happened that one time. It could have been because Cura was set as MARLIN not RRF? All good now.

                                      Please understand my approach. This is a new Ender 3. With Mellow Fly E3 running latest RRF. I'm not familiar with RRF. So, I move slowly adding new features. I Auto PID my hot end/bed. Tram my bed. Then dial in my Z height.

                                      I do have a BL touch. But first I would like to understand in RRF how to set my Manual Zheight and save those peramiters. My other printer ruinning Marlin, is super fine tuned.

                                      i will be integrating the BL touch next.

                                      I really like RRF.

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

                                        @westech said in Beginner issue: storing Z-offset:

                                        But first I would like to understand in RRF how to set my Manual Zheight and save those peramiters.

                                        There are two ways as has been mentioned above.

                                        When the endstop switch is contacted during a homing move (G1 H1 Z) the Z position is set to the M208 Z minima value. This homing move is part of homeall.g or homez.g.

                                        Now you can fine tune the Z position of the trigger such that Z0 equals the nozzle touching the bed by either adjusting the M208 minima in config.g, or using a G92 Z in the homing file to override the current position.

                                        There is no "live Z tuning" per se. Just edit the file with the correct value.

                                        Z-Bot CoreXY Build | Thingiverse Profile

                                        westechundefined 1 Reply Last reply Reply Quote 0
                                        • westechundefined
                                          westech @Phaedrux
                                          last edited by

                                          @phaedrux Thanks, I think I got it.

                                          What didn't work:

                                          homeall.g

                                          G92 Z-1.4 ; set Z position to axis minimum (you may want to adjust this)

                                          If I changed G92 Z1.4 as a positive number it would respect that in the console. Displaying Z1.4

                                          But I needed a negative number. G92 Z-1.4 was not respected. and would show it as Z0 in the console.


                                          What worked was adding:

                                          G1 Z1.4 F100
                                          G92 Z0 ; set Z position to axis minimum (you may want to adjust this)


                                          I am printing now and by triggering the endstop then Raising the Z Then G92 Z0. worked.

                                          I really like how RRF can be adjusted so easily. I'm not going to miss going into Platform.io and recompiling Marlin everytime I have change a little thing.

                                          Next stop the BL touch. But I know now how to adjust the Z for different bed heights.

                                          Thanks.

                                          Phaedruxundefined 1 Reply Last reply Reply Quote 1
                                          • Phaedruxundefined
                                            Phaedrux Moderator @westech
                                            last edited by

                                            @westech said in Beginner issue: storing Z-offset:

                                            But I needed a negative number. G92 Z-1.4 was not respected. and would show it as Z0 in the console.

                                            Why do you think you need a negative number? That would mean your nozzle is 1.4mm inside your bed. That makes no sense. If you're outside of the bed area and can safely move the nozzle below the bed plain, then you should change the M208 Z minima to allow that negative position.

                                            Z-Bot CoreXY Build | Thingiverse Profile

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