Patent ID: 7774099

Claim:
A programming device, connected to a robot operated based on a teaching program, for making a returning program for returning the robot from a stop position where the robot during operation is stopped by an emergency stop to a waiting position, the programming device comprising: an attribute data providing part for providing attribute data to each teaching position included in the teaching program, the attribute data representing whether each teaching position may be used for a teaching point of the returning program or not; a storing part for storing at least one teaching program capable of being executed by the robot and layout-information of the robot and an object existing around the robot; a receiving part for receiving data of the stop position, information for discriminating a teaching program stopped by the emergency stop and information of a block of the program executed when the program is stopped by the emergency stop; a selecting part reading a teaching program from the storing part corresponding to the information for discriminating, sequentially searching the teaching positions, from the block of the teaching program, in an executing direction of the program or a backward direction thereof, and selecting the teaching points used for the returning program based on the attribute data of the teaching positions; a programming part for making the returning program based on the stop position and the teaching points selected by the selecting part; an interference judging part simulating the operation of the robot based on the returning program prepared by the programming part and the layout-information so as to judge whether interference occurs between the robot and the object around the robot or not; and a transferring part for transferring the returning program to the robot when the interference judging part judges that interference between the robot and the object around the robot does not occur, wherein the storing part stores a cycle time of the teaching program, and the selecting part selects the teaching positions by sequentially searching the teaching positions in a backward direction of the executing direction of the program when an elapsed time from the start of the program to the emergency stop is shorter than a half of the cycle time or selects the teaching positions by sequentially searching the teaching positions in the executing direction of the program when the elapsed time is equal to or longer than the half of the cycle time.