Home Support Documentation
Documentation
Article Index
Documentation
G-codes samples: Surface Measure
G-codes samples: Tool Length Measure
G-codes samples: Homing
G-codes samples: Helical interpolation
Polar coordinates G16 G15
Plane selection G17 G18 G19
G68 G69 Coordinate system rotation
G65 Simple macro call
All Pages

Tool Length Measure Procedure.

Tool Length Measure procedure is implemented via macros layer with used-defined miscellaneous function M121 (can be redefined flexible).
Tool Length Measure is available from DNC program by using M121 code as well as from GUI by pressing Tool-Length-Measure on-screen button-

surface measure on-screen button

The button is connected to the same M121 miscellaneous function through configuration file cnc-config.xml

Listing for Tool Length Measure function-

 

(Tool length measure)
(Working cube values are situated in Parameters - )
( 5421 ... 5428 - Minimum point )
( 5431 ... 5438 - Maximum point )
(Position of Tool Sensor is situated in Parameters 5471 ... 5478 )


G28.2 Z0.                      (save current z position into Register1.Z (Z value is ignored))
G53 G0 Z#5433             (move tool up to safe position - Working Cube max Z)
G53 G0 X#5471 Y#5472 (move to XY Tool Sensor Position )
G53 G38.9 Z-10.            (move down to z=-10., stop while the sensor is touched/pressed)
                                    (When sensor is pressed, tool Z offset is saved for Current Tool).
G53 G0 Z#5433             (move tool up to safe position - Working Cube max Z)
G28.5 X0 Y0                 (go back to saved XY position in Register1.XY (XY values are ignored))
G28.5 Z0.                     (return back to saved Z position in Register1.Z)

 

After running this procedure tool will be in the same position (machine position) as before start,
Tool Length Z Offset will be saved for "Current Tool". Tool Length Offset will be calculated automatically
as difference between Tool Length Sensor position (stored in Parameters 5471 ... 5478,
particularly Z position, stored in 5473 Parameter) and measured position (Position when Tool Sensor
was pressed).