2012-03-21 19:51:29 (CET)

Zero tool macro

User button 1 contains:

;Zero tool tip example

Sub user_1     

        msg "user_1, Zero Z (G92) using toolsetter"    

        (Start probe move, slow)    

        f30    

        g38.2 z-100    

       (Move back to touch point)    

        g0 z#5063    

       (Set position, the measuring device is 43mm in height, adapt for your measuring device)    

       G92 z43    

       (move 5 mm above measuring device)    

       g91 (incremental distance mode)    

       g0 z5    

       g90 (absolute distance mode)    

m30 Endsub

The idea is to use a flexible position tool setter and put it on top of the workpiece. Start this function and when done, the Z coordinate is set to 0 at the surface of the workpiece. The feed is set slow F30. A probe move G38.2 is started towards -Z, when the tool setter is touched the position is stored and the movement is stopped. The machine moves exactly to the touch point. G92 is used with a Z value that specifies the height of you tool setter 43 mm in this case. Change to match your tool setter. An incremental movement is started 5 mm upwards, so you can remove the tool setter. The machine goes back to absolute mode and is done.

WARNING: Take care that you fully understand this macro before using it and that you have adapted it for your own tool setter.