Tool Height setter issue

More
23 Aug 2024 18:38 #308490 by speedydumpster
Gentlemen, 
    I was wondering if someone could assist me with a tool height setter issue that I'm having.  

Problem description:
I'm trying to set the tool height by using the machine coordinate system.   I use the tool height sensor to measure the gauge height of the spindle.  I put the measured value in my AXYZ_Router.ini file.   Then I measured all my tools and subtracted the gauge height of the spindle from the INI file.   This set all the tool heights correctly as far as I could tell. 

Then I ran into a problem.   I reset my G54 to a different part on my router and then measured a tool again, and then measured the height of my tool.   The tool height is totally incorrect.   It's not based off of the G53 (Machine Coordinate System), it's using the current coordinate system.   
So, when I check the tool height after resetting my G54, I have to reset the spindle gauge height in the INI file. 
I tried to look up how to fix the issue, but it looks like most people aren't setting the tool height like I am.  

Any assistance is appreciated.  I have attached my current configuration. 

Here is my tool setter logic:

o<tool_setter> sub  
    
    ; Position at Tool Height sensor clearance position
    G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>-0.1] 
    G1 G53 Y#<_ini[HEIGHT_SENSOR_CLEARANCE]Y>     F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>
    G1 G53 X#<_ini[HEIGHT_SENSOR_CLEARANCE]X>     F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>

    ; Position above Tool Height sensor
    G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>-0.1] 
    G1 G53 Y#<_ini[HEIGHT_SENSOR]Y> F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>
    G1 G53 X#<_ini[HEIGHT_SENSOR]X> F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>

    ; Start of probing routine
    F#<_ini[HEIGHT_SENSOR]SEARCH_VELOCITY>
    G49
    G91

    ; Probe down in Z
    G38.2 Z-8

    ; Move  up till probe looses contact
    G38.4 Z0.1

    ; Probe slowly
    F#<_ini[HEIGHT_SENSOR]PROBE_VELOCITY>
    G38.2 Z-0.1

    (print, _current_Tool=#<_current_tool>)
    (print, 5063=#5063)
    (print, GaugeHeight=#<_ini[HEIGHT_SENSOR]GAUGE_HEIGHT>)
    ; Set the tool table value
    G10 L1 P#<_current_tool> Z[#5063 - #<_ini[HEIGHT_SENSOR]GAUGE_HEIGHT>]
    
    G90
    G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
    G1 G53 Y#<_ini[HEIGHT_SENSOR_CLEARANCE]Y> F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>
    G1 G53 X#<_ini[HEIGHT_SENSOR_CLEARANCE]X> F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>

    ;G43

o<tool_setter> endsub  
m2
 
Attachments:

Please Log in or Create an account to join the conversation.

More
28 Aug 2024 13:19 #308892 by Todd Zuercher
You pretty much have at least two options. The simplest might be to setup and dedicate one workspace coordinate system only for tool length probing and set the Z height to zero (or you could include your gauge height adjustment as well) and have your probe routine switch to that coordinate system before probing. The other option would be to look up the current coordinate system's Z offset and subtract it from the probe result.
o<tool_setter> sub  
    
    ; Position at Tool Height sensor clearance position
    G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>-0.1] 
    G1 G53 Y#<_ini[HEIGHT_SENSOR_CLEARANCE]Y>     F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>
    G1 G53 X#<_ini[HEIGHT_SENSOR_CLEARANCE]X>     F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>

    ; Position above Tool Height sensor
    G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>-0.1] 
    G1 G53 Y#<_ini[HEIGHT_SENSOR]Y> F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>
    G1 G53 X#<_ini[HEIGHT_SENSOR]X> F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>

    ; Start of probing routine
    F#<_ini[HEIGHT_SENSOR]SEARCH_VELOCITY>
    G49
    G91  

    #<zworkoffset> = #[5203 + #5220 * 20]

    ; Probe down in Z
    G38.2 Z-8

    ; Move  up till probe looses contact
    G38.4 Z0.1

    ; Probe slowly
    F#<_ini[HEIGHT_SENSOR]PROBE_VELOCITY>
    G38.2 Z-0.1

    (print, _current_Tool=#<_current_tool>)
    (print, 5063=#5063)
    (print, GaugeHeight=#<_ini[HEIGHT_SENSOR]GAUGE_HEIGHT>)
    ; Set the tool table value
    G10 L1 P#<_current_tool> Z[#5063 - #<_ini[HEIGHT_SENSOR]GAUGE_HEIGHT> - #<zworkoffset>]
    
    G90
    G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
    G1 G53 Y#<_ini[HEIGHT_SENSOR_CLEARANCE]Y> F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>
    G1 G53 X#<_ini[HEIGHT_SENSOR_CLEARANCE]X> F#<_ini[HEIGHT_SENSOR]SEEK_VELOCITY>

    ;G43

o<tool_setter> endsub  
m2

Please Log in or Create an account to join the conversation.

More
31 Aug 2024 04:02 #309071 by speedydumpster
Todd,
Thank you very much for your reply. I was able to take your logic and modify it to get what I needed. I really appreciate your assistance!
Thanks,
Dave

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum