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

    Surfacing Macro

    Scheduled Pinned Locked Moved
    CNC
    11
    28
    2.5k
    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.
    • HebigTundefined
      HebigT @nikki-m
      last edited by

      @nikki-m

      I know you can pass parameters to a macro in the macro call itself (e.g. depth of pass)

      Manually choosing this value on each run of the macro may be possible now using M291 on 3.5 beta firmware.

      nikki-mundefined 1 Reply Last reply Reply Quote 0
      • nikki-mundefined
        nikki-m @HebigT
        last edited by

        @HebigT Yes, I did look into the M291 function, but sadly, I am still on the v3.3 (awaiting any update from Ooznest)!!
        Does this mean that there is no other way to program in a variable DOC? Apart from setting up numerous versions of the macro, each with a different value for the doc?

        HebigTundefined 1 Reply Last reply Reply Quote 0
        • HebigTundefined
          HebigT @nikki-m
          last edited by HebigT

          @nikki-m

          With 3.3 you should still be able to pass a parameter in the macro call. You’ll just have to modify the macro (hopefully only once!) to assign that parameter to the DOC variable (e.g. var DepthOfCut= {param.y} )
          It’ll still be a manual process of entering the parameter each time you start the macro, but it should save you the trouble of having to change the DOC variable within the macro each time.

          See the macro parameter section at this link:

          https://docs.duet3d.com/User_manual/Reference/Gcode_meta_commands

          nikki-mundefined 1 Reply Last reply Reply Quote 0
          • nikki-mundefined
            nikki-m @HebigT
            last edited by

            @HebigT @HebigT I'm not sure I understand what you are saying here.
            Is there an actual command (and presumably through a screen interaction) in v3. 3 which allows a user to type in and enter a value, and to then assign this value to an existing variable?

            I still cannot find any means of entering an external value. I am still having to resort to having multiple versions of this macro, each wirh different values for doc.

            OwenDundefined 1 Reply Last reply Reply Quote 0
            • OwenDundefined
              OwenD @nikki-m
              last edited by OwenD

              @nikki-m
              For RRF 3.3 and later you can pass parameters using M98
              So you can call your macro using M98 P"mymacro.g" Y0.002
              and in the macro you access the parameter using param
              e.g.

              var depthOfCut = 0.001
              if exists(param.Y)
                  set var.depthOfCut = param.Y
              
              o_lampeundefined 1 Reply Last reply Reply Quote 0
              • Nightowlundefined
                Nightowl
                last edited by

                I'm not sure if I'm being a bit too simplistic here, but this is what I do, after producing the GCode toolpath for surfacing, usually with a 0.15mm depth of cut, or sometimes more...

                Run the toolpath. Once complete, if there are still low spots, lower the spindle/motor to Z0, then lower it again to the toolpath's cut depth (0.15mm), reset Z0 and rerun the toolpath.

                Continue as necessary, but as you get closer to 'flat', you could reduce the 0.15mm accordingly.

                Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
                I'm still on my learning curve, so take everything I say with caution!

                RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

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

                  @OwenD
                  Isn't there a way to start the macro by doubleclicking and ask for the DOC-value from within the macro?

                  OwenDundefined 1 Reply Last reply Reply Quote 0
                  • OwenDundefined
                    OwenD @o_lampe
                    last edited by

                    @o_lampe
                    Not unless you update to RRF version 3.5.0b1
                    Then you can ask for input use M291 as mentioned above

                    nikki-mundefined 1 Reply Last reply Reply Quote 1
                    • nikki-mundefined
                      nikki-m @OwenD
                      last edited by

                      Thank for all your ideas, guys. I does seem that I can't achieve what I want whilst on v3.3.

                      So I am in the hands of Ooznest and will have to wait to see when / if they decide to release a later version of their firmware.

                      Of course, this macro would make a great plug-in, and so getting around this data input issue!

                      CthulhuLabsundefined 1 Reply Last reply Reply Quote 0
                      • CthulhuLabsundefined
                        CthulhuLabs @nikki-m
                        last edited by

                        So I am working on a new version of this Macro that will prompt for user input with the M291 command. It will make the Macro far more interactive for things like DepthOfCut, RPM, FeedRate, etc. One of the prompts I want to add is to ask if it should work in Pass mode or Depth mode.

                        In pass mode it will prompt you for the number of passes to take. It will then do that many passes before prompting you whether to surface another layer. Default will obviously be 1.

                        In Depth mode it will prompt you for how much material to remove. So if your DepthOfCut is say 0.3mm and you enter a depth of 1mm the Macro will do three passes at 0.3mm and then a fourth pass at 0.1mm for a total of 1mm.

                        1 Reply Last reply Reply Quote 3
                        • CthulhuLabsundefined CthulhuLabs referenced this topic
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA