Hello Guest it is April 10, 2021, 03:23:11 PM

Author Topic: Tool measurement G31 strange behavior  (Read 1089 times)

0 Members and 1 Guest are viewing this topic.

Offline GTM-S

*
  •  12 12
    • View Profile
Tool measurement G31 strange behavior
« on: June 06, 2016, 04:06:31 PM »
Hi all people with great knowledge

I have been building a ATC with 10 tools for my cnc Syil X6 Mill, I have got the mechanics to work, and everything works fine when using M6 in MDI mode, and also in a program.
But, when I run my M16 command after the M6 I have a strange behavior.

M16 is a automatic tool length macro for measuring the new tool length after the tool change.
I use G31 to set the tool length, and it first goes down to the touch plate with G00 feed, and after the tool hits the Z retracts 10mm and goes down slowly to get accurate measurements.

M6 and M16 have been working fine separately when i worked on the code for these two macros, but when in a program it fails, or after eachother in MDI.
Also when I first start Mach3 it works the first time together in a program or MDI, but not the second time, then I need to restart Mach3.

What happens is after M6 macro the M16 is executed and the first rapid measurement goes well then retracts 10mm in G91 mode, then when it should start going down again in Z then the Tool tray starts to move (B-Axis), and both the Z-axis and B-axis DRO moves, but not the actual Z-axis, I stop the macro and push pageup/page down, the Z works as is should.

If I go into the settings tab and deactivate B axis in Axis Inhibit menu after the M6 macro has finished it works as it should with the M16 macro, and i get the right tool and the tool gets measured.

What could this be?, is this a behavior of the G31 function or something else, if feels strange that the B axis all the sudden would start to move.
Or is there a function for deactivate/Activate the B-axis that I could put in the macro for the tool length measurements.

Attached are the M6 and M16 macros, if someone would like to take a look or use the macros themselves.

Thanks in advance

Thomas
Thanks

Thomas