Stop the robot moving

I want to use the RTDE method to control the movement of the robot, so that the robot stops in a certain movement process, but I have tried many methods, the results are not satisfactory, what is a good way to achieve this effect? I would appreciate it