Hello guys !
I've got slightly tired Tongtai TB-20 (Fanuc 31i-TB nc) at my new workplace and it needs more knowledge than anyone has here.
Tongtai haven't answered for two weeks and Fanuc just directly refused to help.
Turret is 12 position Tongtai-made with Fanuc B-series servo and pulsecoder.

I don't know the history, but the machine behaves like this:
After switching tool number selector and pressing "manual tool change" button turret unclamps, rotates to selected position and stays in right position unclamped (forever) without any warning/error.
To resolve this situation I have to press Reset and M54 (manufacturer's code to clamp).
But after this I don't have any tool number in the memory of NC.
It works just the same with MDI T-code.

Clamping is hydraulic, solenoid valves and clamp-unclamp sensors are ok (checked with ladder too)
It clamps-unclamps with MDI M-codes without any issues.

I suppose, there's a problem with turret motor's pulscoder which doesn't understand when the turret is in the right position for clamping.
Searched for parameters of this motor for something like 1240, 1850, but found only axis servo and it seems, NC doesn't consider turret position as an axis/coordinate.

So it would be great if you share some thoughts how to set zero/reference position for turret servo.

Best Regards, Alex