M-Series Operator’s Manual 4/9/15
5-10
Tool Life Management – Using G-Code User Variables
If a tool’s Mode field is set to Manual, there will be no updates to the Used field of the Tool Life data during a job
run, unless the job’s G-code is programmed to modify it.
The following is an example of how a G-code program would modify tool life data. Assuming tool T23’s Mode is
set to Manual, and its Units is set to Cycles, the following G-code will increment T23’s Used Life field by 1 after
completing the example_cycle.cnc.
M6 T23 ; change tool to T23
M98 "example_cycle.cnc" L1 ; run the cycle 1 time
IF #4201 || #4202 THEN GOTO 100 ; skip to N100 if in backplot or search mode
IF #4120 < 1 || #4120 > 200 THEN GOTO 100 ; skip to N100 if T number is not valid
#[19000+[#4120-1]*5+2] = #[19000+[#4120-1]*5+2] + 1 ; increment current tool's Used Life by 1 cycle
N100 ; destination of goto’s
See Chapter 11 for more information about the use of User or System Variables.