ROBOT CONTROL METHOD AFTER INTERRUPTION OF SERVICE

Abstract: A method of controlling a robot in which powers is resupplied and the operation of the robot is restarted after the service interruption of the robot is recovered. A service interruption sensing circuit informs the OS of the fact that the voltage drops or goes out (S1). The OS writes a service interruption flag in a nonvolatile memory and stops a task being executed (S2). The data of the task is saved in the nonvolatile memory. After making the power supply (S10), the service interruption processing of the OS is executed (S11), referring to the service interruption flag and the hardware is initialized (S12). Then, the OS executes the routine of the service interruption processings of every task (S13) and restarts the operation (S14) from the position where the robot stops upon the service interruption.

Description: The present invention relates to a method of controlling a robot in the event of a power failure, by restarting the operation of the robot by resupplying an electric power thereto, and more specifically, to a method of controlling a robot in the event of a power failure by which the operation of the robot can be restarted after an electric power has been supplied to the robot, without the need for a robot controller for saving various data at all times during an operation thereof. A factory using industrial robot is generally equipped with many apparatuses requiring a large amount of electric power, and thus the probability of the occurrence of a power failure there in is high. Once a power failure occurs, the operation of the robots cannot be restarted in the same state as before, even if an electric power has been again supplied thereto, and thus the operator must carry out the procedures necessary for restarting the operation thereof. Consequently, when many industrial robots are used in a large manufacturing line, the restarting of the operation of the robots takes a long time, which causes a problem in the management of the factory. To simply restart the operation, there is used a method of saving the data of a task processed by a processor, at predetermined intervals, in a non-volatile memory or the like. More specifically, when a power failure occurs, the data saved in the non-volatile memory is read out and the processing state when the power failure occurred is restored, and thus the operation of a robot can be restarted in the same state as before. Nevertheless, when a robot is controlled by a complex method, the number of data to be saved is increased and the data must be saved at very short intervals, and thus the load on a processor is increased. When the intervals at which the data is saved are increased, a time lag between a time at which data is saved and a time at which a power failure occurs is also increased, and thus the robot cannot be correctly restarted in the same state as before. JP-A-58-168121 discloses a system for managing failure of a power supply to a processor. FR-A-2558277 discloses a machine control system in which data with regard to a particular unit is saved when the unit behaves abnormally to enable that unit to be restarted in the course of the work. Taking the above into consideration, an object of the present invention is to provide a method of controlling a robot in the event of a power failure, by which the operation of a robot can be restarted after an electric power has been resupplied to the robot, without the need for a robot controller to save various data during the operation thereof. According to the present invention, there is provided a method of controlling a robot for restarting the robot by resupplying electric power thereto in the event of a power failure, the method comprising the steps of: detecting by a power failure detecting circuit that a voltage has dropped or an input power supply has been cut off; notifying an operating system through the power failure detection circuit of the interrupt of the power failure detection; writing a power failure flag, using the OS, to a non-volatile memory; stopping, by use of the OS, a task being performed; executing a power failure processing for the OS with reference to the power failure flag after electric power has been resupplied; initialising hardware using the OS; executing a power failure processing routine for each task in accordance with instructions from the OS; and, operating the robot by the OS from the point at which the robot was stopped when the power failure occurred. When the power failure detection circuit detects that a voltage has dropped or the power has been cut off, the circuit notifies the operating system (OS) of this event and the OS writes a power failure flag to a non-volatile memory and stops a task being performed. The data of the task being performed is saved in the non-volatile memory. After electric power has been resupplied to the robot, the OS executes a power failure processing of itself with reference to the power failure flag, initializes hardware, executes a power failure processing routine of each task, and restarts the operation of the robot from the position at which it was stopped when the power failure occurred. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a flowchart of a method of controlling a robot in the event of a power failure, according to the present invention; and Figure 2 is a block diagram of hardware of a robot controller embodying the present invention. BEST MODE OF CARRYING OUT THE INVENTION An embodiment of the present invention will be described below with reference to the drawings. Figure 2 is a block diagram of hardware of a robot controller embodying the present invention. A processor 1 for controlling the robot controller as a whole controls a robot in accordance with a system program stored in a ROM 4. A power failure detection circuit 2 monitors an AC voltage from an electric power supply unit 3 at all times, and supplies an interrupt signal to the processor 1 when the AC voltage drops below a predetermined value or is cut off. The processor 1, or an OS operating on the processor 1, stops a task being performed and writes a power failure flag (PF) 6 to a non-volatile memory 5. The data needed by the task being performed in the event of a power failure is saved in the non-volatile memory 5. Next when the power supply is restored and electric power is resupplied, the OS reads out the power failure flag (PF) 6 to execute a power failure processing and restart the operation of the robot. Next, the power failure processing will be described. Figure 1 is a flowchart of a method of controlling a robot in the event of a power failure, according to the present invention wherein numerals prefixed with an S indicate the numbers of steps of the process. [S1] The power failure detection circuit 2 monitors an AC voltage from the power supply unit 3 at all times, and supplies a power failure detection signal to the processor 1 when the AC voltage drops below the predetermined value or is cut off. [S2] The OS on the processor 1 stops a task being performed, saves the necessary data in the non-volatile memory 5, and further, writes the power failure flag (PF) 6 to the non-volatile memory 5. Note that data of other tasks not being performed, which is needed for restarting them, is saved in the non-volatile memory 5 when each of the tasks has been executed. Even if the AC power supply is cut off, a DC voltage output from the power supply unit 3 is supplied for a predetermined time, and thus these processings are executed while the DC voltage output is supplied. [S3] The DC voltage output from the power supply unit 3 is completely cut off. [S10] The power failure is recovered and an electric power is resupplied to the robot controller. [S11] The OS reads out the power failure flag (PF) 6 in the non-volatile memory 5 and executes a power failure processing for itself. [S12] Next, the OS initializes hardware. For example, a servo control program stored in the ROM of a servo motor control circuit is loaded to a RAM. Further, a display unit causes a display of a power failure message on a display screen. [S13] The power failure processing routine for each task is executed. The data needed for restarting the task being performed when the power failure occurred is saved in the non-volatile memory 5 when the power failure processing is carried out. Further, the data of tasks not being performed when the power failure processing was carried out is saved in the non-volatile memory 5 when each of these tasks has been executed, and therefore, the power failure processing routine of each task is executed by reading the above data. [S14] The power failure processing routine of each task has been executed and the necessary data gathered, and thus the operation of the robot is restarted from the position at which the robot was stopped when the power failure occurred. Accordingly, the operation of the robot can be restarted from the position at which the robot was stopped when the power failure occurred without the need for saving at all times the data needed for restarting the robot, at predetermined intervals, and thus a time needed for restarting the robot can be shortened. As described above, according to the present invention, since the OS writes a power failure flag to the non-volatile memory when a power failure occurred, and reads out the flag after an electric power has been resupplied, to thus execute a power failure processing, the operation of the robot stopped by a power failure can be restarted simply and in a short time. Further, the necessary data need not be saved at predetermined intervals, and thus a load on the processor is reduced.

Claims: A method of controlling a robot for restarting the robot by resupplying electric power thereto in the event of a power failure, the method comprising the steps of: detecting by a power failure detecting circuit (2) that a voltage has dropped or an input power supply has been cut off; notifying an operating system (OS) through the power failure detection circuit (2) of the interrupt of the power failure detection; writing a power failure flag (PF), using the OS, to a non-volatile memory (5); stopping, by use of the OS, a task being performed; executing a power failure processing for the OS with reference to the power failure flag (PF) after electric power has been resupplied; initialising hardware using the OS; executing a power failure processing routine for each task in accordance with instructions from the OS; and, operating the robot by the OS from the point at which the robot was stopped when the power failure occurred. A method according to claim 1, wherein the step of initialising the hardware includes a step of loading a servo control program in a servo motor control circuit from a ROM to a RAM. A method according to claim 1 or claim 2, wherein the step of initialising the hardware includes a step of displaying a power failure message on a display screen of a display unit.

Inventors: HASHIMOTO YOSHIKI FANUC MANSIO, NISHI HIROJI FANUC DAI- VIRA-K, YANAGITA AKIHIRO FANUC MANSION, HASHIMOTO, YOSHIKI, FANUC MANSION HARIMOMI 8-301, NISHI, HIROJI, FANUC DAI-3 VIRA-KARAMATSU, YANAGITA, AKIHIRO, FANUC MANSION HARIMOMI 6-103
Applicants: FANUC LTD, FANUC LTD.
Application year: 1991
Main classification: B25J19
IPC codes: B25J9, B25J19, G05B19