Subroutine macros for using tool setter

More
21 Nov 2020 20:26 #190006 by Mayberry Customs
I posted this in my general build thread, but came here hoping for a response. Here is the post copied from my build thread. Thanks, Andy

I messed with the tool setter some tonight. I found another thread referencing tool-length-probe.ngc example that comes with Linux and how to implement it by manually adding it to code for auto tool changes. So i used these two sections of code and added two macros in Gmoccapy. One called reference and the other tool change. Here is what they look like

O<reference> sub
g20
g90 g49
(measure reference tool)
g30 (above switch)
g38.2 z-4.00 f15 (measure)
g91 g0z.2 (off the switch)
#1000=#5063 (save reference tool length)
(print,reference length is #1000)
g90 (done)
O<reference> endsub
M2

O<tool_change> sub
(measure next tool)
g30 (above switch)
g49 (measure without the last tool's offset)
g38.2 z-4.00 f15 (measure)
g91 g0 z.2 (off the switch)
g43.1 z[#5063-#1000] (set new tool offset)
(print,new length is #5063)
g90 (done)
O<tool_change> endsub
M2


So to test this i homed the machine, touched off all axis to 0 with a dial indicator zeroed in this position, and run the reference macro which seems to function. I can go back to zero on all axis and it comes back to zero on the dial indicator. So all seems good so far. then when i change the height of the tool i run the tool change macro and it seems to hit the probe at the same position so its not a false trigger, but when i come back to my indicator the offset is all wrong. Anybody have any ideas? One thing i was thinking was, do i need to do a "tool change" via the tool change button in gmoccapy. Im thinking this may be the issue, in a program you would call another tool before running the tool change code. While testing I did not use the "tool change" function between the two macros. Any help is greatly appreciated. Thanks, Andy

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

Time to create page: 0.060 seconds
Powered by Kunena Forum