Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Giuno85 on March 28, 2025, 01:47:46 PM

Title: TOOL TABLE DIAM.WEAR DOES NOT TAKE CHANGE
Post by: Giuno85 on March 28, 2025, 01:47:46 PM
Hi everyone, I would like to use the tool table parameters in mach 3 mill to change the tool wear.
Changing the value of Diam. wear using compensation for example g42 does not take the change in value..
it's strange... is there some setting to activate?
Title: Re: TOOL TABLE DIAM.WEAR DOES NOT TAKE CHANGE
Post by: Graham Waterworth on March 28, 2025, 06:27:52 PM
It depends on how your gcode is written, G42 D1 will read the diameter offset from the table for tool 1.

Title: Re: TOOL TABLE DIAM.WEAR DOES NOT TAKE CHANGE
Post by: Giuno85 on March 29, 2025, 04:55:28 AM
yes ok it reads the diameter and corrects it using g42 d1 but it doesn't read the diameter correction.. the "diam. wear" column.. as a rule it should add or subtract a measurement to the tool diameter
Title: Re: TOOL TABLE DIAM.WEAR DOES NOT TAKE CHANGE
Post by: Graham Waterworth on March 31, 2025, 08:26:45 PM
Yes this is an undocumented feature of Mach3.

There is a way around it though:-

You need to add some lines to the end of your M6Start.m1s macro.

This will read the tool data and place it in #1234 or any other # var of your choice.

D = GetToolParam(tool,1)
WD= Gettoolparam(tool,3)
SetVar(1234,D+WD)

Then in your gcode call the tool as normal but the G41/42 line will need to use the P command and the #1234 variable.

%
G21 G40 G00 G49

N1 (TOOL 2)
T2 M6
G54 G00 G90 G43 X-10. Y10. Z25. S2000 M3
Z1.
G01 Z-1. F250.
G42 X0 Y0 P#1234
Y-25.
G40 X-10. Y-25.
G00 Z25.
M30
%