How can we stop robot during a maneuver using URScript?

Is there a way to stop robot using URScript during a specific maneuver? I am using UR5.
For eg. If I am during movec, and if I get external prompt I would like to stop the robot in the middle of movec.