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

    RRF3.2 request to enable G43 & G44 Tool height offset

    Scheduled Pinned Locked Moved
    Firmware wishlist
    6
    17
    1.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.
    • EducatingSavvasundefined
      EducatingSavvas @jay_s_uk
      last edited by

      @jay_s_uk Thanks for sharing that! There's a lot of food for my thoughts, and the touch probes look really good btw. My set up is a little different as I have a stationary button which acts as my tool touch probe. It is also set below the surface of my wasteboard at the front of my machine.

      So this is not tested, but I imagine I could use:

      M291 X1 Y1 Z1	; jog to wasteboard
      G10 L2 P9 Z{move.axes[2].machinePosition}	; Save coordinate to G59.3 WC
      M500			; Store to memory
      

      I can then move to my probe location at the front of my machine:

      M291 P"STAND CLEAR! Move to Probe Location." R"Warning" S3
      G90			; absolute movement
      G53 G0 Z-10; 		; move to safe Z in machine coordinate system
      G53 G0 X83 Y41.7	; move X and Y second in machine coordinate system above stationary probe button
      

      and then perform my probe cycle.

      M291 P"Ensure tool is above stationary probe location." R"Warning" S3
      G10 P8 X0 Y0 Z0	; reset axis tool offset
      G30 S-1		; Probe at the current XY position and report 
      G91		; incremental movement
      G10 L8 P8 Z{move.axes[2].machinePosition}	; adjust G59.2 WCS
      G10 L20 P1 Z{move.axes[2].workplaceOffsets[9]-move.axes[2].workplaceOffsets[8]} ; Set origin of G54 Z relative to the current position of the tool, minus wasteboard offset from tool probe offset???
      M500			; store to memory
      G53 G0 Z-10		; move to safe z position
      

      Going to have to trail this out when I next have time. It didn't occur to me that I could save axis location to workspace coordinates but this is a great lead. And in theory I won't have to perform the first part until I resurface flat the wasteboard. I'll report back on the weekend once I have tested it. Cheers!

      1 Reply Last reply Reply Quote 1
      • EducatingSavvasundefined
        EducatingSavvas @jay_s_uk
        last edited by

        @jay_s_uk I'm going to have to wait till I wire up the test rig onto my CNC machine to test this. It's too confusing to imagine the stages without seeing the machine moving. May take a while to report back.

        Educating Savvas Duet CNC Test Rig .jpg

        jay_s_ukundefined 1 Reply Last reply Reply Quote 1
        • jay_s_ukundefined
          jay_s_uk @EducatingSavvas
          last edited by

          @EducatingSavvas don't worry, I won't be going anywhere

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          EducatingSavvasundefined 1 Reply Last reply Reply Quote 0
          • EducatingSavvasundefined
            EducatingSavvas @jay_s_uk
            last edited by

            @jay_s_uk Can I ask what firmware version you are using. I'm following your workflow but having to make random changes. I'm using RRF 3.2 beta 2.

            1 Reply Last reply Reply Quote 0
            • jay_s_ukundefined
              jay_s_uk
              last edited by

              I'm also running 3.2beta3.2

              Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

              1 Reply Last reply Reply Quote 1
              • EducatingSavvasundefined
                EducatingSavvas
                last edited by

                I can confirm I've been able to create macros to set the wasteboard and tool length. My wasteboard setting macro is:

                M291 P"Jog spindle until tool tip touches surface of waste board." R"Set Waste Board" S3 X1 Y1 Z1 ; jog to wasteboard
                G10 L2 P9 Z{move.axes[2].machinePosition}		; save coordinate to G59.3 WC
                G10 L2 P2 Z{move.axes[2].workplaceOffsets[8]} – {move.axes[2].workplaceOffsets[7]}	; Subtract G59.3 from G59.2 and set offset in G55
                M400							; wait for last command to end
                M500							; store to memory
                G55							; swap to G55 WC
                

                and stationary tool length setting macro:

                G55				; return to G55 WC
                G10 P1 X0 Y0 Z0			; reset axis tool offset
                M291 P"Press Ok to peform probe cycle" R"Warning" S3
                G30 S-1	K0			; begin probing movement
                G91				; incremental movement
                G1 F500 Z3			; move up 3mm
                G90				; absolute movement
                G30 S-1	K0 			; begin probing movement
                M400						; wait for current move to finish
                G10 L2 P8 Z{move.axes[2].machinePosition}		; store probe ocaiton to G59.2 P8 
                G10 L2 P2 Z{move.axes[2].workplaceOffsets[8]} – {move.axes[2].workplaceOffsets[7]}	; Subtract G59.3 from G59.2
                M500			; store to memory
                G53 G0 Z-10		; move to safe z position
                

                I use G54 to mirror the G53 machine position - so work in G55. I use G59.3 to set the wasteboard, and G59.2 for stationary touch probe. for set Thank @jay_s_uk for pointing me in the right direction.

                1 Reply Last reply Reply Quote 2
                • tom33undefined
                  tom33 @jay_s_uk
                  last edited by

                  @jay_s_uk Hi, thanks for sharing this macro. When you write "G10 L2 Z" which system coordinate will change the G53 ? Because there is no P parameters
                  Thanks,

                  jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                  • jay_s_ukundefined
                    jay_s_uk @tom33
                    last edited by

                    @tom33 I don't use G53 in my probing macros. I've only used it in the context of tool changing. But, it uses the machine coordinates as a base (so from the machine 0,0 position) and not workplace coordinates

                    Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                    tom33undefined 1 Reply Last reply Reply Quote 1
                    • tom33undefined
                      tom33 @jay_s_uk
                      last edited by

                      @jay_s_uk ok so like that there is no a G54/G55 for change the work coordinate system at the begining of a gcode ?

                      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                      • jay_s_ukundefined
                        jay_s_uk @tom33
                        last edited by

                        @tom33 I believe setting the system in CNC mode (M453) automatically puts the machine in G54

                        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                        1 Reply Last reply Reply Quote 0
                        • chiefmonkeyundefined
                          chiefmonkey
                          last edited by

                          Guys this seems to be a great work around for the limitation on variables, as from what I can tell you are using the work offsets of non used coordinate systems to store the values from your probing, and then performing the math on them to get the result you desire.

                          The only syntax that I am having a hard time following is where do the "move.axes[].machinePosition" and "move.axes[].workplaceOffsets[]" come from. I assume they are calling something at the firmware level, but it seems documentation on this is limited.

                          I have seen other threads where people are using these meta commands, but finding documentation on them is rather limited. I've gone so far as to dig into linuxCNC as it appears some of this work is derived from there. Any suggestions on where to learn more on the meta command structure would be greatly appreciated.

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

                            @chiefmonkey https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands

                            Have you seen this? Actual variables are now available as well.

                            Z-Bot CoreXY Build | Thingiverse Profile

                            chiefmonkeyundefined 1 Reply Last reply Reply Quote 1
                            • chiefmonkeyundefined
                              chiefmonkey @Phaedrux
                              last edited by

                              @phaedrux said in RRF3.2 request to enable G43 & G44 Tool height offset:

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

                              I have seen that, we are a bunch of mechanical oriented guys in our group, so programming is taking us quite a while, so much different then C that I used to use.

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