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

    Strange Z error

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    5
    43
    1.9k
    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.
    • Phaedruxundefined
      Phaedrux Moderator @sunToxx
      last edited by

      @suntoxx said in Strange Z error:

      Does that mean that now it would be possible to save the current state from within the macro, change it to a lower value and at the end return to the saved state?

      That may be possible with conditional gcode, but my example is not that fancy.

      @suntoxx said in Strange Z error:

      I assume there is no way to tell the head to make a relative movement based on the current g31 xy offset?

      With conditional gcode and the object model that is possible, though I don't know the exact syntax off the top of my head. But if you're hte programmatic type, see here: https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands

      sunToxxundefined 1 Reply Last reply Reply Quote 1
      • sunToxxundefined
        sunToxx @Phaedrux
        last edited by sunToxx

        @phaedrux i had a look at the metacommands, but it seems with the current level of documentation, the time needed to get that working probably outmatches the work it would save me. I got the macro working though and quite consistently at that. I keep ending up with either 2.777 or 2.78 in console and on multiple runs of the macro I end up with either g31 Z2.77 or Z2.78 which seems fine to me. Do you end up at the exact same G31 Z if you run the macro multiple times in a row? Is it just practice, or is that deviation to be expected and can't really be avoided?

        Edit: I did the "touch down" by looking the the nozzle and confirming the height when the shadow disappears. Is this the correct way, or is the speed and motor current reduced, in order so that i can move the extruder downwards until it stops moving?

        Edit2: The mesh compensation is active again after the macro finishes? Should I restart Duet after the macro?

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

          @suntoxx said in Strange Z error:

          Do you end up at the exact same G31 Z if you run the macro multiple times in a row? Is it just practice, or is that deviation to be expected and can't really be avoided?

          There's always going to be some small variation. 0.01mm is pretty tight. Nothing to worry about.

          @suntoxx said in Strange Z error:

          the shadow disappears.

          I use the same method. It helps to have a light source behind the printer so you can see the gap disappear. Maybe there's a better way, but it's good enough and works for me. It doesn't really matter so much because you're calibrating once and it stays set for a long time.

          @suntoxx said in Strange Z error:

          The mesh compensation is active again after the macro finishes? Should I restart Duet after the macro?

          That depends on where you activate it in the first place. You can load it at the end of homeall, or at start of a print in start.g or in the slicer start gcode.

          sunToxxundefined 1 Reply Last reply Reply Quote 1
          • sunToxxundefined
            sunToxx @Phaedrux
            last edited by

            @phaedrux said in Strange Z error:

            I use the same method. It helps to have a light source behind the printer so you can see the gap disappear. Maybe there's a better way, but it's good enough and works for me. It doesn't really matter so much because you're calibrating once and it stays set for a long time.

            I got a number of nozzle sizes and print in a lot in varying layer heights. I want to take full advantage of how easy nozzle swapping is in the lgx, so as soon as my torque screwdriver arrives, I want to start using the optimal nozzle for each height. The macro sets me up very nicely for this!

            That depends on where you activate it in the first place. You can load it at the end of homeall, or at start of a print in start.g or in the slicer start gcode.

            I will check that out.

            Thanks for the help! 👍😎

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

              @suntoxx

              Did you get an answer on how to center the probe without hardcoding?

              This is my way:

               G1 X{((move.axes[0].max + move.axes[0].min) / 2) - sensors.probes[0].offsets[0]}, Y{((move.axes[1].max + move.axes[1].min) / 2) - sensors.probes[0].offsets[1]}, F1800
              

              Frederick

              Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

              Stephen6309undefined sunToxxundefined 2 Replies Last reply Reply Quote 2
              • Stephen6309undefined
                Stephen6309 @fcwilt
                last edited by

                @fcwilt You need to change "axis" to "axes".

                1 Reply Last reply Reply Quote 1
                • sunToxxundefined
                  sunToxx @fcwilt
                  last edited by

                  @fcwilt Thanks, this looks good. From where do you get for example the "sensors.probes[0].offsets[0]"? Is there a list somewhere?

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

                    @suntoxx said in Strange Z error:

                    @fcwilt Thanks, this looks good. From where do you get for example the "sensors.probes[0].offsets[0]"? Is there a list somewhere?

                    The DWC has a plug-in for browsing the object model:

                    DWC Plug-Ins.png

                    If it is not started just start it and then you can browse through the object model.

                    Some of what I know is just from trial-and-error, other things were picked up here on the forum.

                    Frederick

                    Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                    sunToxxundefined 1 Reply Last reply Reply Quote 2
                    • Phaedruxundefined
                      Phaedrux Moderator
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • sunToxxundefined
                        sunToxx @fcwilt
                        last edited by sunToxx

                        @fcwilt said in Strange Z error:

                        The DWC has a plug-in for browsing the object model:

                        Oh, I completely missed that part of dwc somehow, as the plug in section in machine specific was empty. But from where in there do you get that with sensors.probes[0].offsets[0] you can refer to the current value? This is probably possible with most variables?

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

                          @suntoxx said in Strange Z error:

                          @fcwilt said in Strange Z error:

                          The DWC has a plug-in for browsing the object model:

                          Oh, I completely missed that part of dwc somehow, as the plug in section in machine specific was empty. But from where in there do you get that with sensors.probes[0].offsets[0] you can refer to the current value? This is probably possible with most variables?

                          Did you browse to that part of the object model?

                          Frederick

                          Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                          sunToxxundefined 1 Reply Last reply Reply Quote 0
                          • sunToxxundefined
                            sunToxx @fcwilt
                            last edited by

                            @fcwilt to which part?

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

                              @suntoxx said in Strange Z error:

                              @fcwilt to which part?

                              The section you asked about.

                              Object Model Sensors.png

                              Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                              sunToxxundefined 1 Reply Last reply Reply Quote 0
                              • sunToxxundefined
                                sunToxx @fcwilt
                                last edited by

                                @fcwilt but I do not see the names you can use to call for those values there. That's what I was refering to. A list of those.

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

                                  @suntoxx said in Strange Z error:

                                  @fcwilt but I do not see the names you can use to call for those values there. That's what I was refering to. A list of those.

                                  The names you need are shown in the browser.

                                  The order is shown by the position.

                                  For example:

                                  sensors.probes[0].diveHeight

                                  When you can have multiple things, like probes, you will see a number like the 0 beneath probes. You use that number in the square brackets as shown above.

                                  Or are you talking about something else?

                                  Frederick

                                  Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                  sunToxxundefined 1 Reply Last reply Reply Quote 1
                                  • sunToxxundefined
                                    sunToxx @fcwilt
                                    last edited by sunToxx

                                    @fcwilt ah, damn, i missed that all the way up there to the right. The disadvantage of 43" screens 😂 Thanks!

                                    Do you by any chance know how to use the Echo command to create a macro?

                                    51f6f866-8039-439e-9545-b53a193d7b2c-grafik.png

                                    fcwiltundefined infiniteloopundefined 2 Replies Last reply Reply Quote 1
                                    • fcwiltundefined
                                      fcwilt @sunToxx
                                      last edited by

                                      @suntoxx said in Strange Z error:

                                      Do you by any chance know how to use the Echo command to create a macro?

                                      I have no idea - I didn't even know that was possible.

                                      Why do you need to do that?

                                      Frederick

                                      Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                      sunToxxundefined 1 Reply Last reply Reply Quote 0
                                      • infiniteloopundefined
                                        infiniteloop @sunToxx
                                        last edited by

                                        @suntoxx said in Strange Z error:

                                        Do you by any chance know how to use the Echo command to create a macro?

                                        Maybe I can help out?

                                        ; create a macro file with all the settings we need to continue the print:
                                        ; - first, verify the existence of the appropriate print file ...
                                        
                                        var fName = "xfridge.g"
                                        if exists(param.F)
                                        	set var.fName = param.F
                                        
                                        echo >{var.fName} "; Frozen print state of """^{job.file.fileName}^""", condition: "^var.cCondition
                                        echo >>{var.fName} ""
                                        echo >>{var.fName} "M38 """^{job.file.fileName}^""""								; on unfreeze, look if the file in print still exists
                                        echo >>{var.fName} "if result > 0"													; result: 0=file exists, 1=call failed, 2=file not found
                                        echo >>{var.fName} "    set global.xFrozenState = 0"
                                        echo >>{var.fName} "    if !exists(param.X)"
                                        echo >>{var.fName} "        M291 S2 R""UNFREEZE:"" P""No file in the fridge :-("""
                                        echo >>{var.fName} "    M99"														; file missing: finish execution
                                        echo >>{var.fName} "if exists(param.X)"												; in case of a parameter "X",
                                        echo >>{var.fName} "    M99"														;	return after the filecheck
                                        

                                        That's just a snippet from a macro which mimics some functionality of "resurrect.g" by creating a macro which in turn can be called to recover from an interrupted print. The sample is disfunctional, it just illustrates the usage of echo.

                                        1 Reply Last reply Reply Quote 1
                                        • sunToxxundefined
                                          sunToxx @fcwilt
                                          last edited by sunToxx

                                          @fcwilt said in Strange Z error:

                                          @suntoxx said in Strange Z error:

                                          Do you by any chance know how to use the Echo command to create a macro?

                                          I have no idea - I didn't even know that was possible.

                                          Why do you need to do that?

                                          Frederick

                                          I wanted to handle my filament settings via DWC. My idea was to call for a macro on layer 2 via custom slicer start code, so i can set the other layer temperature for nozzle and bed there. To make this work though, every filament change would need to rewrite this macro. No idea if that is a good aproach though.

                                          @infiniteloop said in Strange Z error:

                                          @suntoxx said in Strange Z error:

                                          Do you by any chance know how to use the Echo command to create a macro?

                                          Maybe I can help out?

                                          That's just a snippet from a macro which mimics some functionality of "resurrect.g" by creating a macro which in turn can be called to recover from an interrupted print. The sample is disfunctional, it just illustrates the usage of echo.

                                          Thanks, I will have a look at that!😎

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

                                            @suntoxx said in Strange Z error:

                                            I wanted to handle my filament settings via DWC. My idea was to call for a macro on layer 2 via custom slicer start code, so i can set the other layer temperature for nozzle and bed there. To make this work though, every filament change would need to rewrite this macro.

                                            I handle my filament settings via DWC but I have not find a need to create a macro.

                                            I set my bed and extruder temps in the filament specific config.g file. I invoke that file in my print start code.

                                            What is it you need to do different from that approach?

                                            Frederick

                                            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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