Problem with adapter in millturn

I'm working on the millturn machine on fanuc controller. I have builded kinematics and it works good. I have problem only if I want to add an adapter to mill from the forehead. The problem lies on the wrong correction of the tool (see pic.1).

I add, that I change vectors in CSE DisplaceOrigins by the H99, because its the one pocket once with adapter or without. The zero without tool correction is OK, like on the pic.2.

I try get the head vector changing by read the kinematic chain in CSE (G37), but the tool correction is always wrong with the same value.

When I enter in MachineToolBuilder and click on the adapter, then tool correction is OK (pic.3) but orientation of whole kinematic is incorrect, for ex. pic.4 (inversion angle C and other problem with drilling cycles).

Can anyone know what's goin on in this problem? When I add adapter my postprocessor output wrong values? Why?

Re: Problem with adapter in millturn

The values from get L/Q/Z correction are wrong. Like I attach pics above in topic, when I double click on the Oprawka_sprint in kinematic chain, the value of L/Q/Z are correct, but the rest of machine kinematic is crushed. The problem is with the device, the correction values is very strange...

Head transformation works fine, but with this values is also incorrect.

1. Both (from the adapter + tool) in one transformation $TOOL You may need to assign the values e.g. L to a different geo axis In this case it is important to check what is the active tool (getCurrentTool(Spindle)) this should be the name of the adapter. check tool change subprogram.

2. two individual transformations. one for the tool in $TOOL and one for the adapter - in that case it is need to work with getHeadCorrection()