Singularity point detection along a path

Hello.
I am beginner about the programming Universal Robots. I studying about a project. This project is required to elmination of singularity. I have a start point and final point. When I create trajectory between start and final point. robot sometimes switch to singularity state. My aim is to detect singularity points that may occur along the path of the robot and to give a warning to the user. To do that, firstly we tried to implement get_inverse_kin_has_solution script function but we could not succed because we can only detect whether final point is singular point or not thanks to this script function. But I need singularity points between start and final. As a result, I want the robot to detect singularity points along a path. Is there any script function or any alternative method to realize this aim?
Thank you