Hello Guest it is April 25, 2024, 09:07:00 PM

Author Topic: Tool setter, M6, tool length offsets  (Read 3353 times)

0 Members and 1 Guest are viewing this topic.

Tool setter, M6, tool length offsets
« on: April 04, 2021, 07:27:10 AM »
Hi Guys,
  I am having an issue with a fixed tool setter and the m6 macro.
I'm no expert at Lua - and thats being generous!
I have tried a few different scripts to allow a manual tool change followed by a tool height probe to a fixed tool setter.  I tried DazTheGaz's script but my machine just froze and didnt move.  I  found the script for the m6 toolchange on the mach4 basics video (https://www.youtube.com/watch?v=6-4JkDv9AgM) and all seemed good but a bit clunky.  The machine did its thing, then measured the tool all good. The problem comes it does not set the WCS zero correctly so is basically useless.... not sure what is going on or if im missing something in the tool change/offsets !!
Any advice is very welcome!!
TIA Tim
Re: Tool setter, M6, tool length offsets
« Reply #1 on: April 04, 2021, 08:16:45 AM »
here is my macro code, i'm sure i just have 1 or 2 things missing but im struggling to wade through lua script, any help much appreciated!

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Tool setter, M6, tool length offsets
« Reply #2 on: April 05, 2021, 08:18:14 AM »
This might help with Lua.
Use the last one from 6_22_2020

https://www.machsupport.com/forum/index.php?topic=43260.msg279695#msg279695
Re: Tool setter, M6, tool length offsets
« Reply #3 on: April 05, 2021, 09:26:30 AM »
Hi, thanks for that looks like a useful document, good work! with my current macro, it will measure the tool ok but when it comes back to the workpeice it is generally way off..  The more complex script doesn't seem to function properly

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Tool setter, M6, tool length offsets
« Reply #4 on: April 05, 2021, 10:55:30 AM »
You might need to do a G43 to turn on Tool Length Offset
Re: Tool setter, M6, tool length offsets
« Reply #5 on: April 06, 2021, 07:01:33 AM »
You might need to do a G43 to turn on Tool Length Offset
Maybe right!  Would i call g43 before the tool change or after?  I have been using mach4 for a while now but just finished my new machine which is ATC capable - just need to get this worked out before i add the ATC script.

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Tool setter, M6, tool length offsets
« Reply #6 on: April 06, 2021, 08:14:36 AM »
G43 is normally called before the first Z move

E.g. G00 G90 G43 Z10. H1
Without engineers the world stops
Re: Tool setter, M6, tool length offsets
« Reply #7 on: April 06, 2021, 08:21:38 AM »
G43 is normally called before the first Z move

E.g. G00 G90 G43 Z10. H1
In the m6 script or in the program for the job? Sorry for all the questions!

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Tool setter, M6, tool length offsets
« Reply #8 on: April 06, 2021, 08:24:35 AM »
It may need it to be in both, if you are using tool length compensation you have to have a G43 active and G49 to turn it off.
Without engineers the world stops

GOOMBA

*
Re: Tool setter, M6, tool length offsets
« Reply #9 on: April 07, 2021, 03:00:39 PM »
Are you trying to run a one tool wonder machine?
If so you likely don't need to use the TLO's :)
If you're running a M6 with multiple tools then shoot me your script and I'll take a look.
You need to make sure the TLO (G43) is called before the zeroing of your Z axis to the material.
This way if multiple tools are called we are then just compensating for the difference between the tools rather than the entire tool length after zeroing.
You can see this happen if you have no TLO called and then zero your Z to the material, when your first G43 is called you'll be in a world of trouble.
I don't typically have the TLO called inside the M6 as it's normally called by the post in GCODE.
There are a lot of different ways to tackle this issue it's really what works best for you.
I really like to put a button on screen called "Job Setup" or something similar then call the TLO's and everything else I like prior to cutting with the click of a button.