I would exxpect the VFD to have a motor stall function in it's parameters, the ABB one I use certainly has although I have not tested it in practice.