Added a variable reference point in the motion control