Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - o<probetool> sub
 - ; todo; probe health check before operation
 - #<probe_center_x> = 461.5
 - #<probe_center_y> = 244.437
 - o101 IF [#<_current_tool> EQ 0]
 - (abort, "No tool selected")
 - o101 ENDIF
 - G90 ; Absolute
 - G53 Z400 ; Go to known save Z height
 - ; and store the current coordinate system offset
 - #<z_offset> = [#5422]
 - #<probe_to> = [#<z_offset> - 400]
 - o102 IF [#5413 EQ 2]
 - ; If this is a pointy tool go to center
 - G53 G0 X#<probe_center_x> Y#<probe_center_y>
 - M5 ; Make sure spindle is stopped
 - o102 ELSE
 - ; Move to toolsetter - tool radius is (#5401 diameter) / 2
 - G53 G0 X#<probe_center_x> Y[#<probe_center_y> - [#5410 / 2]]
 - ; Spindle backwards
 - M4 S200
 - o102 ENDIF
 - ; Probe down "fast"
 - G90 G38.2 Z#<probe_to> F600
 - ; Incremental up 3mm
 - G91 G0 Z3
 - ; Probe slowly
 - G90 G38.2 Z#<probe_to> F50
 - G91 G0 Z20
 - ; Store offset (minus the 20mm we moved up)
 - G10 L10 P#<_current_tool> Z20
 - M5
 - (debug, Tool #<_current_tool> new Z offset = #5403)
 - o<probetool> endsub
 - M2
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment