1 - 85
(3) Sample program
O0001;
N1 G54 G90 G00 X0 Y0;
N2 G30 G91 X0 Y0 Z0;
N3 T01 M06; -----Executes T01 and M06.
N4 G00 G90 X100. Y100.
N5 G43 Z-100. H1; -----Measures the H1 tool length.
N6 M98 P2;
N7 T02; -----Executes T02.
N8 G30 G91 X0 Y0 Z0;
N9 M06;
N10 G00 G90 X200. Y200.;
N11 G43 Z-100. H2; -----Measures the H2 tool length.
N12 M98 P2;
N13 M30; -----Clears the data on the screen.
%
O0002;
N100 G01 G91 X10. F200;
N101 G02 J-10.;
N102 G01 Z50.;
N103 M99.
%
* The tool length has been measured is not measured until M30 or M02 is executed. For
example, if the program is restarted from the beginning after it was executed as far as
N5, tool length measurement is performed from the next block, invalidating H1 in the N5
block.