Rotating a specific joint after reaching a target

Hi folks,
i’m working on a robot simulation, and i want rotating a specefic joint after the arm reach the target and i’m getting stuck with it.
please can any one help me.

Do you know these examples from the collection :thinking:

RobotSimulation
Pino
CustomCylinderAndKnee and CustomCylinderAndSphereKnee