If you want the tool to stop when it reaches the minimum and maximum of
your axis, use the appropriate constraints. These settings are designed to not
damage your machine.
Min - when the minimum limit of your axis is reached, the tool movement
will stop and prevent it from moving towards the minimum.
Max - when the maximum limit of your axis is reached, the tool will stop
moving and prevent it from moving towards the maximum.
Safe - if the specified value remains before reaching the minimum or
maximum, the tool speed is reduced to the minimum.