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



  • Hi - wanted to ask whether any other CNC related gcode might enabled in future firmware versions? Such as the G43 & G44 Tool height offset compensation commands - and possible G49 to cancel those offsets.

    I have been looking at a way of offsetting the tool to compensate for wasteboard thickness or z distance between a stationary tool touch probe and the top of the wasteboard. This is to make manual tool changing easier during CNC router jobs. Something similar to this: https://axyzcrm.net/docs/HelpDeskDocs/TD-000202.pdf

    Here is some additional text about the procedures: https://cnc-programming-tips.blogspot.com/2014/12/g43-g44-and-g49-tool-length-compensation.html

    Would be interested to get thoughts on this.


  • administrators

    Interesting; but why would you not use G10 to set up the tool Z offsets instead?



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

    resting; but why would you not use G10 to set up the tool Z offsets instead?

    From what I've read you can refer to an address/slot for the offset in either G43 or G44 - which I'm hoping can be generated by using a M291 X1 Y1 Z1 to jog to a location on the wasteboard and save the z height.

    I think it could be as simple as the g53 Z probe trigger minus the g53 z surface high to create the offset.

    At the moment I have to workout the different between the stationary probe trigger location and surface of wasteboard, and manually input that into the G10 L20 command. I can't also use G60 to save that location to recall during a g10 tool offset.

    I'm hoping to make this an automated and more user friendly procedure.



  • here's how I get around the issue for tool changes.
    I have 2 probes that I use with my CNC machine.
    I have one of these https://vers.by/en/touch-probes/9-vers-pr.html and one of these https://www.amazon.co.uk/dp/B08CC752D6/ref=cm_sw_em_r_mt_dp_d66QFbZZXNK0C

    I use the vers.by probe to set the workplace co-ordinates of the material in X and Y.
    This is for X

    M558 P5 C"servo0" K0 F150						; Change the probe input pin for the vers.by probe
    M558 F1500										; Set the initial probing speed
    G38.2 X1000 P0									; Probe the material as a first pass
    G91												; Set the movements to relative
    G1 X-5											; Move 5mm away from the material
    G90												; Set the movements to absolute				
    M558 F150										; Set the final probing speed
    G38.2 X1000 P0									; Probe the material again
    M400											; Make sure all movement is complete
    G10 L2 X{move.axes[0].machinePosition+1}		; Record the stop position as the workpiece co-ordinate in X
    M400											; Make sure all data recording is complete
    G91												; Set the movements to relative
    G1 X-5											; Move 5mm away from the material
    G90												; Set the movements to absolute												; Set the movements to absolute	
    

    This is for Y

    M558 P5 C"servo0" K0 F150						; Change the probe input pin for the vers.by probe
    M558 F1500										; Set the initial probing speed
    G38.2 Y600 P0									; Probe the material as a first pass
    G91												; Set the movements to relative
    G1 Y-5											; Move 5mm away from the material
    G90												; Set the movements to absolute
    M558 F150										; Set the final probing speed
    G38.2 Y600 P0									; Probe the material again
    M400											; Make sure all movement is complete
    G10 L2 Y{move.axes[1].machinePosition+1}		; Record the stop position as the workpiece co-ordinate in Y
    M400											; Make sure all data recording is complete
    G91												; Set the movements to relative
    G1 Y-5											; Move 5mm away from the material
    G90												; Set the movements to absolute
    

    I also use the probe to probe the top of the material, the top of the spoil board and the the top of the top of the touch plate. I use the extra workplace co-ordinates to store the positions as a work around until variables are implemented.

    M558 P5 C"servo0" K0 F150								; Change the probe input pin for the vers.by probe
    M291 P"Put the probe over the workpiece" S2 X1 Y1 Z1	; Pop up box asking for operator input
    M558 F1500												; Set the initial probing speed
    G38.2 Z-200 P0											; Probe the top of the material
    G91 													; Set the movement to relative
    G1 Z5													; Move back up 5mm
    G90														; Set the movement to absolute
    M558 F150												; Set the second probing speed
    G38.2 Z-200 P0											; Probe the top of the material again
    M400													; Make sure the movement is complete
    G10 L2 P9 Z{move.axes[2].machinePosition}				; Record the material height in the 9 Z workplace coordinate
    M400													; Make sure the recording is complete
    G91 													; Set the movement to relative
    G1 Z10													; Move back up 10mm
    G90														; Set the movement to absolute
    M291 P"Put the probe over the spoilboard" S2 X1 Y1 Z1	; Pop up box asking for operator input
    M558 F1500												; Set the initial probing speed
    G38.2 Z-200 P0											; Probe the top of the spoilboard
    G91 													; Set the movement to relative
    G1 Z5													; Move back up 5mm
    G90														; Set the movement to absolute
    M558 F150												; Set the second probing speed
    G38.2 Z-200 P0											; Probe the top of the material again
    M400													; Make sure the movement is complete
    G10 L2 P8 Z{move.axes[2].machinePosition}				; Record the spoilboard height in the 8 Z workplace coordinate
    M400													; Make sure the recording is complete
    G91 													; Set the movement to relative
    G1 Z10													; Move back up 10mm
    G90														; Set the movement to absolute
    M291 P"Put the probe over the tool block" S2 X1 Y1 Z1	; Pop up box asking for operator input
    M558 F1500												; Set the initial probing speed
    G38.2 Z-200 P0											; Probe the top of the spoilboard
    G91 													; Set the movement to relative
    G1 Z5													; Move back up 5mm
    G90														; Set the movement to absolute
    M558 F150												; Set the second probing speed
    G38.2 Z-200 P0											; Probe the top of the material again
    M400													; Make sure the movement is complete
    G10 L2 P7 Z{move.axes[2].machinePosition}				; Record the touch plate height in the 7 Z workplace coordinate
    M400													; Make sure the recording is complete
    G91 													; Set the movement to relative
    G1 Z25													; Move back up 25mm
    G90														; Set the movement to absolute
    

    This sets up all the information I need about the job and I can then fit the cutting tool.
    Once the tool is installed, I then probe the touch plate to get the tool position using this macro.

    M558 P5 C"!e1stop" K0 F150						; Change the probe input pin for the touch plate
    M291 P"Have you attached the connector?" S2		; Pop up to remind the operator about the connector to be fitted to the tool
    M558 F300										; Set the initial probing speed
    G38.2 Z-200 P0									; Probe the touch plate
    G91 											; Set the movement to relative
    G1 Z5											; Move up 5mm
    G90												; Set the movement to absolute
    M558 F150										; Set the second pass probing speed
    G38.2 Z-200 P0									; Probe the touch plate
    M400											; Make sure the movement is complete
    G10 L2 P6 Z{move.axes[2].machinePosition}		; Record the tool height in the 6 Z workplace coordinate
    M400											; Make sure the data recording is complete
    G91 											; Set the movement to relative
    G1 Z5											; Move up 5mm
    G90												; Set the movement to absolute
    

    Now I have the height of the tool recorded.
    If I want to work with the top of the material set as my Z datum (set as 0), then I use this macro to calculate the tool offset

    G10 L2 P5 Z{move.axes[2].workplaceOffsets[6]-move.axes[2].workplaceOffsets[5]}	; Take away the tool height from the touch plate height and put it into 5 Z workplace co-ordinates
    G10 L2 Z{move.axes[2].workplaceOffsets[8]-move.axes[2].workplaceOffsets[4]}		; Take away the above offset from the material height and place in the live (1) Z workplace co-ordinates
    

    And if I want to work with the spoilboard set as my Z datum (set as 0), then I use this macro to calculate the tool offset

    G10 L2 P5 Z{move.axes[2].workplaceOffsets[6]-move.axes[2].workplaceOffsets[5]}	; Take away the tool height from the touch plate height and put it into 5 Z workplace co-ordinates
    G10 L2 Z{move.axes[2].workplaceOffsets[7]-move.axes[2].workplaceOffsets[4]}		; Take away the above offset from the spoilboard height and place in the live (1) Z workplace co-ordinates
    

    Then when I want to carry out a tool change, I fit the new tool, probe the touch plate, and then calculate the new offset depending on what I want as my datum.
    Seems to work well so far.



  • @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!



  • @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



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



  • @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.



  • I'm also running 3.2beta3.2



  • 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.


Log in to reply