Stop manager
The stop manager task is to prevent the control system to drive the motor out of the allowed mechanical range of movement. It automatically stops the motion (forcing the position demand to the present position, and velocity and torque demand to zero) if the limit switch on the actual direction of movement is activated. As expected, the movement in the opposite direction is still possible.
Once the stop manager detects that a switch has been pressed, the internal limit active bit of the statusword is set.
The algorithm implemented in the stop manager is represented in the following figure.