ATC spindle tool offset

More
26 Aug 2023 08:08 #278998 by zieluch
Hi Guys, 

I trying to setup ATC spindle for my machine and I have some problems.  Currently I am trying to setup ATC highly influenced by  myfenjalinuxcnc github code - which I really apreciate that people still share such things. (github.com/GuiHue/myfenjalinuxcnc ). Here is my machine configuration : github.com/zieluch22/sorotec_cl0604/blob...cros/rack_change.ngc  Macro for tool change is rack_change.ngc Same applys to my rack tool change macro with adoptions to my machine. I am also using vers.by probe screen. But to the point. 
I measure tool every tool change. Let's assume I have 3 told with offsets T1 -30, T2 -25 and T3 -35.  Here is my workflow: 
start machine
home x,y,z
M6 T1 - change tool and measuring tool ofsett, offset saved in tool table. (this part is working fine) Measured offset -30 
moving tool over the part to "starting point" and zero it in G54 
M6 T2 -next tool offset -25
G1 X0 Y0 Z0 F4000 will move the tool 5mm over the part and I would expect moving it directly over the part to the point
M6 T3 
G1 X0 Y0 Z0 F4000 - this will crash the tool into the part 5mm. 

My problem is that tool offset is measured coorrectly but it is not applied. 
Initially I thought that maybe something is wrong with my tool change macro but now I am more on the side  of machine config. Because I tried macro manua_change.ngc  without ATC was working fine and now I tried to use it with ATC spindle and tool offset was not applied correctly.. By the way part of the macro for tool measurement is almost the same.  Below you can find part of the code where I measure the tool:
[code]
        G53 G0 Z[#<_ini[TOOLSENSOR]Z>]
        ; Check certain inputs in probe_screen
        O420 if [#<_hal[probe.ps_searchvel]> LE 0]
            O420 return [-1] ; indicate searchvel <= 0 
        O420 endif
        O430 if [#<_hal[probe.ps_probevel]> LE 0]
            O430 return [-2] ; indicate probevel <= 0 
        O430 endif
        M64 P#<_ini[OTHER_PINS]TS>
          ; Perform tool measurement in relative motion
        F #<_hal[probe.ps_searchvel]>
        G91
        G38.2 Z #<_ini[TOOLSENSOR]MAXPROBE>
        G38.4 Z2
        F #<_hal[probe.ps_probevel]>
        G38.2 Z-2
        O440 if [#5070 EQ 0]
            G90
            O440 return [-3] ; indicate probe contact failure to epilog
        O440 endif

        G90
        G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
        G53 G0 Y[#<_ini[TOOLSENSOR]Y> - #<_ini[ATC]SAFE_Y>]
        (print, moving away from ts)
        #<touch_result> = #5063
        #<probeheight> = #<_hal[probe.probeheight]> 
        #<blockheight> = #<_hal[probe.blockheight]>
        (print, #<touch_result>  #<probeheight>  #<blockheight>)
        G10 L1 P#<newtool> Z[#<touch_result> - #<_hal[probe.probeheight]> + #<_hal[probe.blockheight]>]
        G43
    O310 endif
O300 endif
;Turn off tool setter
M65 P#<_ini[OTHER_PINS]TS> 

I played also after tool M6 command with M49 and M43 commands but It was not what I expected. Not sure now how to solve the problem if anyone can help I will really appreciate. If you need anything else please let me know.  

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

More
30 Aug 2023 07:38 #279348 by zieluch
Replied by zieluch on topic ATC spindle tool offset
In the mean time I send some time investigating what is wrong , initially I thought this might be related to the iocontrol assignments, as I trying to use both full ACT from rack (I am using M61 Tx) but also for tool change with popup manually changed (valve triggered by button) - here I am using M6 command. I think this is now figured out. In mean time I change to new probe_screen v2.8 (psng by vers).
There are two thing now in order to get correct tool change and recalculated correct offset for following tools next tools:
  • Toolsetter  and workpicehight needs to be meassured correctly before loading tools - for me this is a sequence of loading M6 T99 and pushing both macros. 
  • from MDI issuing manually G43 because even probe T99 was loaded with toolchange macro,  tool offset is not applied  and won't be applied for next tools unless I issuing manually after first tool load one , after that offsets are applied just after issuing M6 Tx. (G43 command is at the end of it). 
Now my question is anyone have idea why this is like this ? 
Best regards 
Michal 

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

Time to create page: 0.057 seconds
Powered by Kunena Forum