Determined turning direction when moving TCP around 180°

I did a short test to show the difference between Pose and Joint Positions: Pics attached

Calculation of values
poseJointPos

Values
poseJointPos2

Regards,
Alexander