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

Acceleration override while probing M558

Scheduled Pinned Locked Moved
Firmware wishlist
5
9
480
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
    Nxt-1
    last edited by 1 Aug 2021, 11:42

    The M558 command allows for travel and probemove speed overrides but I would love to jerk/acceleration override added as options.

    My reason for this addition is as follows: I just a smart effector with a custom watercooled heatbreak I designed. The heatbreak itself and water/waterlines swinging around are source of false triggers. I have played around with using different combinations of high/low sensitivity on the smarteffector, faster/slower probe speed and waittimes. Yet, in my instance, the issue the instant the effector starts to move often triggers the probe.

    Thinking about this I don't think adjusting the sensitity or speed is the correct way to handle this. The root cause is innertia at the start of the move itself. And I belive this should be handled by adjusting the jerk and possible the acceleration as well.

    I am currently using a diy workaround my manually overriding these values in my bed.g file and resetting them afterwards. This is subobtimal as the settings effectively get defined twice, once in config.g and again in beg.g. Furtermore this fix does not work when running mesh grid probing.

    Duet3D and delta printer enthousiast. Buildlog
    Looking for Duet3D configuration support, check out Nxt-3D

    undefined undefined 2 Replies Last reply 1 Aug 2021, 12:43 Reply Quote 0
    • undefined
      fcwilt @Nxt-1
      last edited by fcwilt 8 Jan 2021, 12:46 1 Aug 2021, 12:43

      @nxt-1 said in Acceleration override while probing M558:

      I am currently using a diy workaround my manually overriding these values in my bed.g file and resetting them afterwards. This is subobtimal as the settings effectively get defined twice, once in config.g and again in beg.g. Furtermore this fix does not work when running mesh grid probing.

      There are a couple of ways to avoid duplicating values.

      One is to create a file with a suitable name that contains the commands for the normal settings.

      You then call this file from config.g using M98.

      You also call it from bed.g or mesh.g to restore the normal settings.

      The other way with v3.3 or better firmware is to create a couple of global variables, in config.g, to hold the normal settings.

      Then you can reference these variables in bed.g or mesh.g to restore the normal settings.

      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
      • undefined
        Nxt-1
        last edited by 1 Aug 2021, 13:25

        @fcwilt Thanks for your input.

        A couple of comments on the define in a separate file route. This indeed is a clever workaround to having to duplicate values. At the same time it does strike me as kind of ugly (athough less then what I am doing now 🙂 ). I am not a big fan of spreading around configuration commands in different files though.
        You reference mesh.g and after searching the forum I have found a couple of mentions about is, but I have never known this file to exist. It also doesn't not seems to be mentioned in the documentation, nor does it appear among the system files on my printer. What am I missing here? Assuming mesh.g is similar to bed.g, it's existence would be essential to use the above technique. Otherwise I wouldn't be able to introduce my own gcode before and after the G29 command.

        The global variable route is an option as well. To me this is less 'dirty' then the separate file. I might look into this while/if my idea get implemented.

        Duet3D and delta printer enthousiast. Buildlog
        Looking for Duet3D configuration support, check out Nxt-3D

        undefined undefined undefined 3 Replies Last reply 1 Aug 2021, 13:58 Reply Quote 0
        • undefined
          fcwilt @Nxt-1
          last edited by fcwilt 8 May 2021, 17:02 1 Aug 2021, 13:58

          @nxt-1 said in Acceleration override while probing M558:

          @fcwilt Thanks for your input.

          A couple of comments on the define in a separate file route. This indeed is a clever workaround to having to duplicate values. At the same time it does strike me as kind of ugly (athough less then what I am doing now 🙂 ). I am not a big fan of spreading around configuration commands in different files though.
          You reference mesh.g and after searching the forum I have found a couple of mentions about is, but I have never known this file to exist. It also doesn't not seems to be mentioned in the documentation, nor does it appear among the system files on my printer. What am I missing here? Assuming mesh.g is similar to bed.g, it's existence would be essential to use the above technique. Otherwise I wouldn't be able to introduce my own gcode before and after the G29 command.

          The global variable route is an option as well. To me this is less 'dirty' then the separate file. I might look into this while/if my idea get implemented.

          Before global variables I used separate files - that to me was better than duplicating values.

          Now I use global variables in several places.

          I don't know exactly when bed.g and mesh.g were introduced but they seem now to be the "preferred' way of doing things.

          It's pretty simple.

          G32 is used for bed leveling and executes bed.g

          G29 is used for mesh compensation and executes mesh.g - if it exists.

          I just create these files in the System folder and put into them the commands that I want to have for each process.

          I prefer to have all the commands needed to insure the process completes successfully.

          Which means I have some commands that are typically put into config.g. And I may be executing some commands that may have already been done in some other process.

          Example of commands that typically are in config.g but I put into these files, as needed, are the commands to specify the probing grid for creating the height map or the commands to configure the Z probe.

          Configuring the Z probe is another place where I have commands in a separate file that I can call from wherever needed to be sure the probe is configured with the most recent values if I have perhaps tweaked some of the values.

          I create several files that perform common tasks so I can invoke them from multiple places if needed.

          FT5 System GCode Files.png

          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
          • undefined
            engikeneer @Nxt-1
            last edited by engikeneer 8 Jan 2021, 20:17 1 Aug 2021, 20:15

            @nxt-1 to add to what fcwilt said, G29 calls mesh.g if it exists, or just executes G29 S0 to create the heightmap if not. So if you create a mesh.g file, you can put whatever pre/post commands in that you like, just have G29 S0 somewhere in the middle 🙂

            I do the separate file approach in my setup for the same reasons as you. I also drop the motor currents to reduce damage from a nozzle strike if probing fails. This is less of a concern now with the BLTouch than it was with a piezo.

            Back to your original wish, my vote would be for a generic command(s) to a command that reduces the machine limits (accel, speed, jerk etc) to a percentage of the set limits. Something akin to M913 for motor currents.
            This means it could be used more generally for other use cases. Ideally I'd like to see it used by slicers for acceleration limits for different move types instead of changing the machine limits (potentially to higher values!)

            Edit: corrected to G29 S0

            E3D TC with D3Mini and Toolboards.
            Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
            i3 clone with a bunch of mods

            1 Reply Last reply Reply Quote 0
            • undefined
              dc42 administrators @Nxt-1
              last edited by dc42 8 Jan 2021, 20:44 1 Aug 2021, 20:39

              @nxt-1, RRF already reduces acceleration during probing moves, and if the jerk policy is set to the default 0 then it will not use jerk during non-printing moves.

              Do you already have a M558 R parameter to allow the effector to settle before it starts the probing move? If not, I suggest you add one. If you have, try increasing it while leaving the jerk and acceleration alone.

              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 1
              • undefined
                Phaedrux Moderator @Nxt-1
                last edited by 2 Aug 2021, 05:48

                @nxt-1 said in Acceleration override while probing M558:

                You reference mesh.g and after searching the forum I have found a couple of mentions about is, but I have never known this file to exist. It also doesn't not seems to be mentioned in the documentation, nor does it appear among the system files on my printer. What am I missing here?

                It was introduced with RRF 3.2, so quite recently. It is mentioned in the G29 wiki entry.

                @nxt-1 said in Acceleration override while probing M558:

                At the same time it does strike me as kind of ugly

                I disagree. The beauty of RRF is that many things can be done without requiring them to be coded directly into the firmware itself. It's flexible enough and generic enough to allow you to script out how you want things to happen without requiring DC42 to custom code it for every specific desire. Before with just macros it was powerful already, but now add conditional gcode and variables and the object model and you've got a pretty powerful environment to accomplish a lot. Is it as pretty as having a new variable in M558? No, but it already has a dozen variables, which in a way is ugly itself.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 1
                • undefined
                  Nxt-1
                  last edited by 5 Aug 2021, 15:34

                  @dc42 said in Acceleration override while probing M558:

                  @nxt-1, RRF already reduces acceleration during probing moves, and if the jerk policy is set to the default 0 then it will not use jerk during non-printing moves.

                  Do you already have a M558 R parameter to allow the effector to settle before it starts the probing move? If not, I suggest you add one. If you have, try increasing it while leaving the jerk and acceleration alone.

                  Yes, as I stated in the first post I played around with the waittimes. Also, the travel move is not the issue here as I explained. The issue is the start of the actual probe move.

                  @phaedrux said in Acceleration override while probing M558:

                  I disagree. The beauty of RRF is that many things can be done without requiring them to be coded directly into the firmware itself. It's flexible enough and generic enough to allow you to script out how you want things to happen without requiring DC42 to custom code it for every specific desire. Before with just macros it was powerful already, but now add conditional gcode and variables and the object model and you've got a pretty powerful environment to accomplish a lot. Is it as pretty as having a new variable in M558? No, but it already has a dozen variables, which in a way is ugly itself.

                  Yes I completely agree that is what makes RRF so nice. Yet I do feel like there is a big difference in not having to recompile firmware and spreading around pieces of the configuration around across multiple files. Especially vital pieces like accel and jerk settings.

                  Seeing the consensus of a few big forum contributors view this differenty then I do 🙂 , I will adapt and use one of the workarounds provided. Does anyone have an example of a mesh.g, just so I can see what it's syntax is.

                  Duet3D and delta printer enthousiast. Buildlog
                  Looking for Duet3D configuration support, check out Nxt-3D

                  1 Reply Last reply Reply Quote 1
                  • undefined
                    Phaedrux Moderator
                    last edited by 5 Aug 2021, 16:01

                    G29 with no S parameter now runs file sys/mesh.g if it exists; otherwise it behaves like G29 S0 as before

                    At its most basic mesh.g would need to contain G29 S0 to initiate a mesh compensation probing routine. As long as the probe and mesh grid configuration are already in config.g. Beyond that you can get as fancy as you want. Preheat, homing, special probe configuration, speed settings, etc.

                    ; Macro to run a mesh bed compensation routine (G29)
                    ;
                    M291 P"Grid bed compensation map will be cleared and re-calculated. Ok or Cancel?" R"WARNING. This will take about 30 minutes." S3 ; User must click OK or cancel.
                    ; Preheat to probing temps
                    M291 P"Preheating to bed to 60 and nozzle to 210 for accurate probing" R"Proceed?" S3
                    T0 ; Activate first tool
                    M190 S65 ; Set bed to 65 and wait
                    ;M109 S210 ; Set nozzle to 210 and wait. Used only for stall detection probing.
                    ; Clear current mesh compensation map and disable compensation.
                    G28 ; Home all
                    M561 ; Disable any current bed compensation
                    ; Set lower speeds for Z homing and lower Z motor current
                    M98 P"ZSpeedsSlow.g"
                    M98 P"CurrentsHoming.g" ; Drop motor current to prevent damage in case of head crash
                    M98 P"0:/macros/musical tunes/GetAttention.g" ; Tone to get user attention
                    M291 P"Running mesh grid compensation probing cycle. Do not disturb the printer."
                    M558 H1.5 ; lower dive height
                    G29 S0 ; Run mesh compensation
                    M98 P"0:/macros/musical tunes/GetAttention.g" ; Tone to get user attention
                    M558 H3 ; return dive height
                    ; Turn off heaters
                    M140 S0 ; Set bed to 0 and release
                    M104 S0 ; turn off hot end heater
                    M98 P"ZSpeedsNormal.g"
                    M98 P"CurrentsNormal.g"
                    M291 P"Homing"
                    G28 ; Home all
                    M84 ; turn off the motors
                    M291 P"Check heightmap for results." R"Probing complete!" S3

                    Z-Bot CoreXY Build | Thingiverse Profile

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