How to turn a positioner while machining with a robot

Hi everyone,

I'm actually trying to create a robot cell with a 5 axes robot kuka fixed on a rail and a positioner which can turn the product. I have to follow some curves all arround the product fixed on the positioner.

The problem is that I don't know how to control the orientation of the positioner...
When I simulate the task, the robot and his effector turn around the product and stamp everything.
He don't get that he has the axes of the positioner added.

I have already added to the robot the two additional axes of the rail and the positionner and have suceed to simulate a task which don't need any move of the positioner.

Has anyone already did something like that or have some advice ?

Thanks !

Kevin