1. A method for operating a robot (R), which has a robot arm (M) having a plurality of members ( 1 ) following one after the other, an attaching device ( 3 ) for attaching an end effector ( 4 ) and drives for moving the members ( 1 ), and a control device (S) connected to the drives, having the following procedural steps: by means of a computer program running on the control device (S), initiation of a command on the basis of which the robot arm (M), controlled by the control device (S), begins to carry out an application step, detection of an abort condition of the command from a plurality of abort conditions, aborting of the execution of the application step on the basis of the detected abort condition, and simultaneous with the detection of the abort condition, conveyance to the computer program of information about the abort condition on the basis of which the execution of the application step was aborted.