Hello Guest it is March 29, 2024, 08:26:15 AM

Author Topic: Auto Tool Setter Offsets  (Read 745 times)

0 Members and 1 Guest are viewing this topic.

Auto Tool Setter Offsets
« on: November 14, 2022, 10:10:30 AM »
I am working through my m6 macro, and am finding that there is more to the tool height offsets than I previously believed.

I had previously been changing the (Mach4 Offsets Tab) Gage Block heights along with the GageBlockHeight in my macro.
Until I sadly realized that the gage block setting was changing my G55 Z heights, causing me all sorts of additional issues.

After trying the (Mach4 Gage Block Heights) settings at zero and just changing the macro gageblockheight, I found that it was changing my master tool (tool#1) info in the tool offsets page. That doesn't help either. It was also recording a tool length/offset incorrectly for the current tool as well.

On top of those issues, I really can't figure out how to get that stuff to work.
I know that I can manually zero work pieces with a single tool, but that defeats the purpose of using the m6 to auto tool set.
I will attach some of my Z-heights, and short notes of my problems. I am here asking for some strongly needed direction and help.

How do I get my probed tools (from my m6 macro) to probe within the current work coordinate system, and set the tool height accordingly & correctly to keep my tools from crashing into the table or cutting air?
I was expecting that the probing would record the height in G53 machine coordinates, and Mach4 was calculating everything and applying the height to the current running work coordinate system to offset the tool height correctly.

I have tried multiple m6 macros, but I am just now getting into setting my tool heights. I kind of like the layout of this macro, but it probably needs help as well.
I will attach it as well.

I would super appreciate some direction and help with this.
I have over thought this so much that I don't even know what to do now. I'm at a loss.

Thanks in advance.

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Auto Tool Setter Offsets
« Reply #1 on: November 15, 2022, 09:56:41 AM »
I would like to see how this is done also.
I can not use the probe to set my tools in Manual Tool Change either.

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Auto Tool Setter Offsets
« Reply #2 on: November 16, 2022, 09:14:13 PM »
Okay, lets give this a try:-

A BIT OF BACKGROUND KNOWLEDGE

Tool offsets and fixture datums are 2 different things and need to be treated in different ways. 

To do this the correct way we need a machine with a Z axis that homes to a known point, we need a tool setter that is in a fixed position, it can be a removable type with a fixed mount.

We are going to do this so there is NO master tool.  All tools have an offset relative to a fixed point on the Z axis head, Dimension D.

LETS FIND SOME DIMENSIONS

Check out the diagram below, the dimension A is the first one we need to find.  This will be hard coded into the macro as it will only need to be changed if the machine has a bump or the distance to the table changes.

Pick a point on the under side of the Z axis that will not change, on a router the spindle clamp should be fine, on a mill with a quill it is best to use a machined surface NOT the end of the spindle.  Fixed spindle mills and lathes can use the end of the spindle.

To get the A distance we need to home the machine and then use a block of a known size, a slip block will be good.  We then sit this on the table and lower the Z axis so the chosen fixed point on the under side of the Z axis touches the block so we can slide it back and forth with a light friction feel.

We then need to look at the machine coordinates (G53) and take note of the value, this is then added to the size of the slip block to give us our A dimension.

Now we need to find the B dimension, this we do by putting a tool in the spindle and touching it on to the setter until we see it trigger, this may be a light on the tool setter or in the mach3/4 diagnostics.  Once triggered we take a note of the machine Z value (G53), then move the spindle to touch the tool on the table top using a feeler gauge or paper, note down the Z axis machine value (G53) and add the feeler thickness to the value. Take the first value from the second one and this is the B dimension.

Note, in most cases Z machine values will be minus numbers so when we add the feeler thickness we are adding a minus values to get a bigger minus value.

With the two dimensions and the Z axis G31 SKIP value #5063 we can work out the offset for the tool.

E.g.

F = #5063 (G31 Skip)

If our setter is above the machine table

D = abs(A) - abs(F) - abs(B)

If its below the table top :-

D = abs(A) - abs(F) + abs(B)

With this knowledge we can them set our fixture offsets with ease.

E = -(abs(A) - abs(C))

When we call tool 1 with its offset active and it backs the tool off by the offset amount.  This way you can have as many fixture offsets all with different heights and the tool will be in the correct place.

« Last Edit: November 21, 2022, 06:37:49 PM by Graham Waterworth »
Without engineers the world stops
Re: Auto Tool Setter Offsets
« Reply #3 on: November 21, 2022, 09:27:39 AM »
I just seen this reply Graham, thanks for the info.
I currently have nothing in the macro to base an offset off of, and I am totally going to try this out in the next day or so.
Thank you so much for the direction, I will keep you posted on how it works out.

Thanks again!
Re: Auto Tool Setter Offsets
« Reply #4 on: November 21, 2022, 04:07:01 PM »
Graham;

Can you clarify for a couple questions me?

1- is f=#5063 a pre-defined register value from Mach4? If so, how do I get it?
2- How do I put this information into the script? This does go in the M06 script, right?
3- Is "C" a piece of material or the fixture height?
4- You said that you can have as many fixtures as you want and the offset will always be correct.
    How does that work if the fixture may be taller/shorter?

Thanks in advance for your time!
« Last Edit: November 21, 2022, 06:37:09 PM by Graham Waterworth »

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Auto Tool Setter Offsets
« Reply #5 on: November 21, 2022, 06:36:57 PM »
C = the height from the table top to the Z datum on the work.

#5063 is a macro variable built into mach3/mach4 and is the Z axis trigger point of the probe/tool setter, use this command after the G31 line

local ZProbed = mc.mcCntlGetPoundVar(inst, 5063)

You need to create a M06 script, if you look in the Mach4 Docs folder there is a Scripting manual with a tool set program that you can adapt for your needs.

« Last Edit: November 21, 2022, 06:39:12 PM by Graham Waterworth »
Without engineers the world stops
Re: Auto Tool Setter Offsets
« Reply #6 on: November 22, 2022, 06:40:10 AM »
Graham,
I just had alot of help from Trevor, at NFS, with my M06 macro.
He took the time to work with me and get my macro set up and working correctly.
Currently my ProbedZ=mc.mcCntlGetPoundVar(inst, mc.sv_PROBE_POS_Z).
NFS said that the macro should tell the machine where it at for the tool height/offset.
If I run the macro as is my tool height is off around 0.875". About the dimension between my work surface and tool setter activation point.
If I put that dimension is as tool#1, tool#2 and every other tool are right where they need to be, but the other tools are off about 0.500".
Not very consistant.

Will the #5063 get me better results?

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Auto Tool Setter Offsets
« Reply #7 on: November 22, 2022, 07:57:45 PM »
Sorry I do not have a psychic link with Trevor, you best deal with him as its his macro.
Without engineers the world stops
Re: Auto Tool Setter Offsets
« Reply #8 on: December 01, 2022, 02:38:55 AM »
sorry, but in my opinion there really is a tool change management problem.
the only really correct procedure is to measure the height of the hollow spindle nose (as zero tool).
then subsequently based on each tool that will be mounted, Mach4 will have to make a difference in height, using the G43 H....
I use this system on the Rosetta controller. https://www.youtube.com/watch?v=agODOhWnJjs&t=449s
 It works perfectly! I would like to do the same thing with Mach4!
« Last Edit: December 01, 2022, 02:41:31 AM by daniba73 »