Manual tool change + tool lengh touch off

More
07 Aug 2022 14:05 #249272 by MaHa
When working with dynamic toollength, only diameter is used from tooltable, length can be set to zero, or never use G43
After eg. T99 is used to touchoff X Y Z , and afterwards probed, it is reverenced with  #<_ToolZRef> = #5063
All following probed tools getting offset from first tool with  G43.1 Z[#<_ToolZ> - #<_ToolZRef>]

linuxcnc.org/docs/2.8/html/gcode/g-code.html#gcode:g43.1

That is why tooltable is not used for length and G43 is not needed in gcode. DIAM entrys should be done, if cuttercompensation used.

from tool-change:

( My sequence of Running; )
( 1. Use a T99, a .250" Rod, to touch off X, Y, and Z of WCS as modeled in CAM )
( 2. Manually input M600 ) or just enter #<_ToolDidFirst> = 0 in MDI
( 3. Manually call an M6 T99, tool will touch off on toolsetter and store tool height )
( 4. Load program and run, M6 in program will prompt tool change, after changing, tool will touch off and Z will adjust )
( 5. Run any and all code using the same desired Z height for the WCS as designed )
( 6. For new WCS repeat from Step #1 )

The following user(s) said Thank You: seuchato, russ

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

More
07 Aug 2022 15:12 #249276 by russ
Ok, that makes sense now. I was under the impression that I need the tooltable but ive just looked up cutter compensation and I guess I dont need that since all my gcode will come from fusion 360 which generates all the tool paths. I think I understand that correctly!

I had just spent the last few hours trying to get gcode to update the tool table but ill just disable it and make sure I number my tools properly. now I can at least put this part to bed, now i need to start looking into a debounce feature since the toolsetter is re-triggering sometimes after detection.

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

More
17 Aug 2022 23:38 #249978 by andypugh
Replied by andypugh on topic Manual tool change + tool lengh touch off
I am curious about _why_ this remap avoids using the tool table.

I don't need to probe tool lengths as my machine has repeatable tool holders. (What spindle are you using? Given the effort that you are going to in the rest of the router build I would be surprised if you were not using a tool-changing spindle)

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

More
19 Aug 2022 14:02 #250074 by russ
Yeah, I wasnt 100% sure at the time but I do now have an ATC spindle on the way, although, actually ill still use this remap because ill be using it as a manual quick change to begin with, so this remap means I can casually change cutters between tool holders without consequences.

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

More
19 Aug 2022 14:47 - 19 Aug 2022 14:48 #250076 by Todd Zuercher
Replied by Todd Zuercher on topic Manual tool change + tool lengh touch off
Personally, I would manually probe all the tool holders for a job before starting, set them up in the tool table. and run the job I wouldn't want to mess with probing at each tool change. That way if you are running a job that uses 6 tools and you need to run it 10 times, you are only probing 6 times instead of 60. (Just my opinion and personal preference.)
Last edit: 19 Aug 2022 14:48 by Todd Zuercher.
The following user(s) said Thank You: tommylight

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

More
21 Aug 2022 02:16 #250138 by andypugh
Replied by andypugh on topic Manual tool change + tool lengh touch off
There are lots of ways to work. I find that I do most of my milling in G54 and tool zero just setting the axis (not tool) offsets. But then I do a lot of work just cranking the MPG or using MDI (often in polar coordinates)

It very much depends on the work you are doing, and I am generally making it up as I go along :-)

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

More
28 Nov 2022 02:50 - 30 Nov 2022 23:16 #257815 by tightmopedman9
Replied by tightmopedman9 on topic Manual tool change + tool lengh touch off
Removed due to inaccuracies in my knowledge of tool offsets
Last edit: 30 Nov 2022 23:16 by tightmopedman9.

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

More
17 Jan 2023 16:15 - 17 Jan 2023 16:18 #262248 by furynick
Replied by furynick on topic Manual tool change + tool lengh touch off
I made a lot of work on the tool setter/probe, here is the latest version which is working fine with gmoccapy :
Update configuration file (ini)
[MACROS]
MACRO = init_probe

[TOUCHPLATE]
# Touchplate dimensions
OFFSETX = 3.306
OFFSETY = 3.767
OFFSETZ = 6.172

[TOOLSENSOR]
# Absolute coordinates of the toolsetter pad
X = 680.5
Y = 6.0
# Absolute Z start search coordinates, adjust to match the longest tool
Z =-25.0
# Absolute Z height to safely travel to toolsetter
TRAVELZ = 0.0
# Maximum search distance and direction (sign), adjust to match the difference between the longest and shortest tools
MAXPROBE = -25

[CHANGE_POSITION]
# Absolute coordinates of the tool change point
X = 650.0
Y = 100.0
Z = -10.0

[RS274NGC]
# Relative path to macros folder
SUBROUTINE_PATH = macros
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog

change.ngc (stored in macros folder)
O<change> sub
  ;(debug, in change tool_in_spindle=#<tool_in_spindle> current_pocket=#<current_pocket>;)
  ;(debug, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>;)
  ;(debug, current tool z_offset=#5403)
 
  ;otherwise after the M6 this information is gone!
  #<xpos> = #<_x>                              (PRINT,save absolute X=#<_x>;)
  #<ypos> = #<_y>                              (PRINT,save absolute Y=#<_y>;)
  #<tlo> = #5403                               (PRINT,current offset for tool #<_selected_tool>=#<tlo>;)
  #<cht> = #<_ini[CHANGE_POSITION]TRAVELZ>
  #<chx> = #<_ini[CHANGE_POSITION]X>
  #<chy> = #<_ini[CHANGE_POSITION]Y>
  #<chz> = #<_ini[CHANGE_POSITION]Z>
  #<tsm> = #<_ini[TOOLSENSOR]MAXPROBE>
  #<tsx> = #<_ini[TOOLSENSOR]X>
  #<tsy> = #<_ini[TOOLSENSOR]Y>
  #<tsz> = #<_ini[TOOLSENSOR]Z>

  ; we must execute this only in the milltask interpreter
  ; or preview will break, so test for '#<_task>' which is 1 for
  ; the milltask interpreter and 0 in the UI's
  O100 if [#<_task> EQ 0]
  O100 return [999]
  O100 endif
 
  O200 if [#<_hal[gmoccapy.toolmeasurement]> EQ 0]
  O200 return [3] ; indicate no tool measurement
  O200 endif
 
  O300 if [#<_hal[gmoccapy.searchvel]> LE 0]
  O300 return [-1] ; indicate searchvel <= 0
  O300 endif
 
  O400 if [#<_hal[gmoccapy.probevel]> LE 0]
  O400 return [-2] ; indicate probevel <= 0
  O400 endif
 
  G53 G0 Z[#<cht>]                             (PRINT,move to travel height)
 
 
  G53 G0 X[#<chx>] Y[#<chy>]                   (PRINT,move to change position)
  G53 G0 Z[#<chz>]
  G49                                          (PRINT,cancel tool offset)
  G92.2                                        (PRINT,turn off G92 offsets)
 
  M6                                           (PRINT,real change tool)
 
  O700 if [#<_selected_tool> EQ 99]
    G10 L1 P99 Z0                              (PRINT,reset probe offset)
  O700 else
    G53 G0 X[#<tsx>] Y[#<tsy>]                 (PRINT,move to toolsensor)
    G53 G0 Z[#<tsz>]
    
    F #<_hal[gmoccapy.searchvel]>              (PRINT,set search speed)
    G91                                        (PRINT,relative move )
    G38.2 Z#<tsm>                              (PRINT,touch sensor)
    G0 Z2                                      (PRINT,release sensor)
    F #<_hal[gmoccapy.probevel]>               (PRINT,set probe speed)
    G38.2 Z-4                                  (PRINT,touch sensor)
    G90                                        (PRINT,absolute move)
    
    O800 if [#5070 EQ 0]
    O800 return [-3] ; indicate probe contact failure to epilog
    O800 endif
    
    G10 L10 P[#<_selected_tool>] Z[#4963]      (PRINT,set absolute offset for tool #<_selected_tool>;)
    G43
  O700 endif
  G92.3                                        (PRINT,restore G92 offsets)
  G53 G0 Z[#<cht>]                             (PRINT,move to travel height)
  G0 X[#<xpos>] Y[#<ypos>]                     (PRINT,return to where we were in WCS X=#<xpos> Y=#<ypos>;)
 
; signal success be returning a value > 0:
O<change> endsub [1]
M2


init_probe.ngc (stored in macros folder)
O<init_probe> SUB
                                                                   (PRINT,Probe init)
  G94                                                              (PRINT,use feedrate in units/min )
  G92.1                                                            (PRINT,remove G92 offsets)
  G90                                                              (PRINT,absolute distance mode)
  G49                                                              (PRINT,cancel tool length compensation)
  G40                                                              (PRINT,turn cutter compensation off)
  G10 L2 P0 X0 Y0 Z0                                               (PRINT,reset coordinate system)
  O100 IF [ #<_current_tool> NE 99 ]                               (PRINT,tool loaded: #<_current_tool>;)
    T99 M6                                                         (PRINT,mount probe)
  O100 ENDIF
  O101 IF [ #<_metric> EQ 1 ]                                      (PRINT,set probe feeds according to units )
    #<fast> =  150.0                                               (PRINT,selected metric units )
    #<slow> =   30.0
    #<retract> = 3.0
    #<tool_diam> = #5410                                           (PRINT,tool diameter=#<tool_diam>mm)
  O101 ELSE
    #<fast> =    6.0                                               (PRINT,selected imperial units )
    #<slow> =    1.2
    #<retract> = 0.1
    #<tool_diam> = #5410                                           (PRINT,tool diameter=#<tool_diam>in)
  O101 ENDIF
                                                                   (PRINT,touch plate Z probe)
  G38.2 Z[#<_ini[AXIS_Z]MIN_LIMIT>] F[#<fast>]                     (PRINT,Z probe toward workpiece with error )
  G91                                                              (PRINT,relative move )
  G0 Z[#<retract>]                                                 (PRINT,retract)
  G0 Z-[#<retract>/2]                                              (PRINT,move forward half retract distance)
  G38.2 Z-[#<retract>] F[#<slow>]                                  (PRINT,Z probe slowly, got Z probe at #5063)
  G10 L20 P0 Z[#<_ini[TOUCHPLATE]OFFSETZ>]                         (PRINT,set Z offset in current WCS)
  G0 Z#<retract>                                                   (PRINT,retract)
   
                                                                   (PRINT,touch plate X probe)
  G0 X-[#<retract> + #<tool_diam>]                                 (PRINT,move in front of touch plate)
  G0 Z-[#<retract> * 2]                                            (PRINT,go down by twice retract length)
  G38.2 X[#<retract> + #<tool_diam>] F[#<fast>]                    (PRINT,X probe toward workpiece with error )
  G0 X-[#<retract>]                                                (PRINT,retract)
  G0 X[#<retract>/2]                                               (PRINT,move forward half retract distance)
  G38.2 X[#<retract> + #<tool_diam>] F[#<slow>]                    (PRINT,X probe slowly, got X probe at #5061)
  G10 L20 P0 X-[#<_ini[TOUCHPLATE]OFFSETX> + #<tool_diam> / 2]     (PRINT,set X offset in current WCS)
  G0 X-[#<retract>] Z[#<retract>*2]                                (PRINT,retract)
 
                                                                   (PRINT,Touch plate Y probe)
  G0 X[#<retract> + #<tool_diam>] Y-[#<retract> + #<tool_diam>]    (PRINT,move below of touch plate)
  G0 Z-[#<retract>*2]                                              (PRINT,go down by twice retract length)
  G38.2 Y[#<retract> + #<tool_diam>] F[#<fast>]                    (PRINT,X probe toward workpiece with error)
  G0 Y-[#<retract>]                                                (PRINT,retract)
  G0 Y[#<retract>/2]                                               (PRINT,move forward half retract distance)
  G38.2 Y[#<retract> + #<tool_diam>] F[#<slow>]                    (PRINT,Y probe slowly, got Y probe at #5062)
  G10 L20 P0 Y-[#<_ini[TOUCHPLATE]OFFSETY> + #<tool_diam> / 2]     (PRINT,set Y offset in current WCS)
  G0 Y-[#<retract>] Z[#<retract> * 2]                              (PRINT,retract)

  G90                                                              (PRINT,absolute move)

  G0 X0 Y0                                                         (PRINT,move to travel height)
  G53 G0 Z[#<_ini[CHANGE_POSITION]TRAVELZ>]                        (PRINT,move to safe travel height)
  G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>]           (PRINT,move to toolsensor)
  G53 G0 Z[#<_ini[TOOLSENSOR]Z>]
 
  F #<_hal[gmoccapy.searchvel]>                                    (PRINT,set search speed)
  G91                                                              (PRINT,relative move )
  G38.2 Z#<_ini[TOOLSENSOR]MAXPROBE>                               (PRINT,touch sensor)
  G0 Z2                                                            (PRINT,release sensor)
  F #<_hal[gmoccapy.probevel]>                                     (PRINT,set probe speed)
  G38.2 Z-4                                                        (PRINT,touch sensor)
  #4963 = #5063                                                    (PRINT,store probe trigger Z value)
  G90                                                              (PRINT,absolute move)
  G53 G0 Z[#<_ini[CHANGE_POSITION]TRAVELZ>]                        (PRINT,move to travel height)
  G53 G0 X[#<_ini[CHANGE_POSITION]X>] Y[#<_ini[CHANGE_POSITION]Y>] (PRINT,move to change position)
  G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]

O<init_probe> ENDSUB
M2
Last edit: 17 Jan 2023 16:18 by furynick.
The following user(s) said Thank You: Vector

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

More
17 Jan 2023 16:26 #262250 by furynick
Replied by furynick on topic Manual tool change + tool lengh touch off
I forgot to explain the workflow, in my case the probe is a straight rod of 3.175mm (1/8in) :
Move manually approximately over the bottom/left corner of workpiece
Hit init_probe in gmoccapy
The probe (Tool 99) is loaded if it's not already
3 axis of touchplate are probed (Z, X and Y)
The probe is then probed on toolsetter and offset in current WCS is stored
Spindle is moved back to change position

M6 remap probe every tool on toolsetter using G10 L10 with previously stored offset value

Any comment is welcome to improve/secure the process

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

More
13 Jul 2024 08:29 #305055 by Vector
Replied by Vector on topic Manual tool change + tool lengh touch off
For anyone it might help: QtDragon has documentation for setting up a toolsetter and an M6 remap that will use that toolsetter to automate the measuring of the new tool length after a tool change.

The stock code as of this comment isn't usable since it doesn't return the machine to the same location as before the tool-change was called.

There's a pull request that hopes to address that: PR 2706 .

There's also a post of that code at my stand-alone repository .

And there's a video of how it can be setup and used over on youtube .

It's also attached here, substitute it in your QtDragon configuration wherever you find qt_auto_probe_tool.ngc.

All the best.
Attachments:
The following user(s) said Thank You: tommylight, rodw

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

Time to create page: 0.417 seconds
Powered by Kunena Forum