I am unsure of the tool variables for the 21i control. However I have the same for the 15 and 18 series control so they might be the same. If you want to set it up with G or M code instead of programming it you have to use the custom macro parameters to set a G or M code to call a macro program. Then you can write the macro program to adjust the tool wear. At that point all you have to do is program the G or M code in your main program when you want to adjust the wear.
#2000= Tool length geometry
#2200=Tool length wear
#2400= Tool radius geometry
#2600= Tool radius wear
These numbers have to have the tool number in them. For example tool length geometry for tool 5 is #2005. Tool radius geometry for tool 5 is #2405.
Now if it always the same tool then you could set up your macro something like this. If it is always tool 5. You have to set up in the parameters a G code to call program 9001 like G500 or something. I donít have the 21i manual in front of me but I can look them up tomorrow.
#2205=#2205-#100(use the variables #2000,#2200,#2400,#2600 whatever one youíre trying to set)
You can also just change the line to #2205=#2205-.0025 if the amount is always the same.
The other way you can do it if you want to for different tools get a variable that is used to track the tool that is in the spindle. If you donít have a macro variable that tracks that you can find a system variable that does. Let s say macro variable #500 tracks the current tool in the spindle
This way youíre not stuck to one tool. Whenever you want to adjust the wear .0025 just program a G500 in your main program.
If you do it G10 way you would always have to know were your wear number is at and what the number is going to be from there and program it in the G10 line.