Now i'm going to describe how to make a correct tool change with lathe machine.
After any machining operation , you need to move the lathe turret in a secure position, so you can safely change tool in next operation.
This secure position has to be collision free, this mean there should not be any interference between all the mounted tools and stock or other tool machine parts.
You need to use ABSOLUTE COORDINATE SYSTEM to reach this position with lathe turret.
Usually the coordinate origin in ABSOLUTE COORDINATE SYSTEM , are the top most position ( MACHINE ZERO ) .
Using absolute coordinate, you can move the lathe turret in the same safe position , regarding the tool length.
G0 X82. W0.5
Z7. Here the operation ends
G53 X0. Z0. Here i call the tool disengagement, i move the turret in the safe position with ABSOLUTE COORDINATE
Every machine has it's own g-code for using absolute coordinate.
With FANUC you can use G53 X0, for example. In this way the machine move the turret in the topmost coordinate in x axis .
Sometimes you can use tail-stock, so the tool has to avoid any collision with tail-stock body .
So instead of interpolating both X and Z movement in approach / disengagement movement, you need to split this movement.
In the approach movement you need to first move in Z position and then in X.
In the disengagement movement you need to first move in X position and then in Z.
You can set the approach / disengagement movement type , in SETUP SCREEN.
To select another safe position , instead of machine zero , you can change the absolute x, y and z coordinate in the setup screen.