1. A method for operating a robot, which has a robot arm having a plurality of links following one after the other, an attaching device for attaching an end effector and drives for moving the links, and a control device connected to the drives, having the following procedural steps: using a computer program running on the control device, initiation of a command on the basis of which the robot arm, controlled by the control device, begins to carry out an application step, detection of an abort condition of the command from a plurality of abort conditions, wherein the abort condition is the attainment of a maximum force acting on the end effector, a detection of an obstacle and/or an expiration of a prescribed time period, aborting of the execution of the application step on the basis of the detected abort condition while continuing to run the computer program until an additional command is initiated, in response to the detection of the abort condition, conveying to the computer program information about the nature of the abort condition on the basis of which the execution of the application step was aborted, determining with the computer program an additional command to be initiated on the basis of the information about the nature of the abort condition, and acyclically evaluating at least one abort condition, wherein the abort condition in question is assigned to an interrupt service routine and is triggered on the basis of events and/or sensors.