METHOD OF TEACHING ROBOT

Abstract: A motion program of a robot is easily changed using a work body, instead of using a master body. The motion program of the robot is corrected by correction data obtained by cameras (2, 3, 4). When a point (Q) of the motion program is to be changed to another point (Qn), a point (Qa) on a work body (22) is changed to a change point (Qan). In a robot control system, this change point is read out as respective coordinate values and converted into space coordinate values. Further, these space coordinate values are acted on by inverse correction data to be converted into reference space coordinate values on masterbody (21). These reference coordinate values are inversely converted into reference coordinate values of respective axes. Since the motion program is instructed by the reference coordinate values of the respective axes, the point (Q) of the motion program is changed to the other point (Qn) by use of the reference coordinate values of the respective axes. By this operation, the motion program can be easily changed without using the master body (21).

Description: The present invention relates to a method of teaching a robot for changing an operation program for the robot, and more specifically, to a method of teaching a robot by which the teaching points of an operation program can be simply changed. BACKGROUND ART Robots have been widely used in welding lines and assembly lines for automobiles. In these manufacturing lines for the automobiles, even if an operation program for a robot is created, each automobile is not always stopped at a given position. To cope with this problem, a position of an object is confirmed by using a visual sensor or the like and the operation program is corrected based on data obtained therefrom so that each object can be accurately processed. More specifically, positions of the operation program for the robot is taught by using a master body. Next, a visual sensor recognizes the position of the master body and stores it as a reference position. Next, an actual workpiece body is placed, the visual sensor recognizes the position of the workpiece body, notifies a robot control unit of an amount of dislocation between the master body and the workpiece body as correction data, and the robot control unit adds the correction data to the operation program in order to correctly process the workpiece body. Nevertheless, a problem arises in that when teaching positions and the like of an operation program are changed, a master body must be placed again to change the operation program and a job for placing the master body again is time consuming. Further, the master body must be kept in the vicinity of a manufacturing line at all times. Conversely, since the tool centre point (TCP) of the robot moves on a locus corrected by the correction data on the workpiece body, it is actually difficult to change the operation program by using only the workpiece body. Taking the above into consideration, an object of the present invention is to provide a robot teaching method by which an operation program can be simply changed by using a workpiece body. US-A-4639878 discloses a method of automatically determining the position and attitude of a body by using three cameras. Allowance is made for differences between the expected and actual positions of the body. According to the present invention, there is provided a robot teaching method when an operation program for a robot is changed, the method comprising the steps of: creating correction data as a conversion matrix for converting points on a master body to points on a workpiece body; positioning the tool centre point of the robot to a point on the workpiece body to be changed; determining first coordinate values of said point to be changed; converting said first coordinate values to second coordinate values on the master body by the correction data; and, rewriting a command value in the operation program to said second coordinate values thereby to change the operation program. The TCP is positioned to the changed point on the workpiece body and the first coordinate values of the changed point are determined. The first coordinate values are changed to the second coordinate values on the master body by the correction data. The operation program can be changed without using the master body by rewriting the command of the operation program to the second coordinate values. Of course, this conversion is executed by the control program of a robot control unit. In the drawings: Figure 1 is a diagram showing the relationship between a master body and a workpiece body; Figure 2 is a diagram showing the arrangement of a robot system as a whole embodying a robot teaching method according to the present invention; Figure 3 is a flowchart showing an operation effected by an operator for changing an operation program; and, Figure 4 is a flowchart of a processing effected by a robot control unit for changing the operation program. 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 diagram showing the arrangement of a robot system as a whole embodying a robot teaching method according to the present invention. This system is composed of a master body 21, workpiece body 22, cameras 2, 3 and 4, robot 5, robot control unit 6, and visual sensor unit 10. The master body 21 has reference points P, Q and R. Further, the workpiece body 22 has points Pa, Qa and Ra corresponding to the points on the master body 21. Figure 2 exaggeratingly represents an amount of dislocation between the master body 21 and the workpiece body 22. Gage holes disposed on the lower portion of an automobile body are used as the respective points of the master body 21 and workpiece body 22. First, the master body 21 is placed. The points P, Q and R are photographed by the cameras 2, 3 and 4. The photographed data is supplied to the visual sensor unit 10, converted to the coordinate value data (MD) 17a of the points P, Q and R by an image processing processor 12 and stored in a RAM 17. Next, the master body 21 is removed and the actual workpiece body 22 is placed at a position where it is processed and the points Pa, Qa and Ra corresponding to the points P, Q and R are photographed by the cameras 2, 3 and 4. The photographed data is supplied to the visual sensor unit 10. The visual sensor unit 10 is mainly composed of a processor 11 and controlled by a control program stored in a ROM 15. Further, the processor 11 is interconnected with the image processing processor 12, a camera interface 13, Interface 14 with the robot control unit 6, and RAMs 16, 17 through a bus. The photographed data from the cameras 2, 3 and 4 is temporarily stored in the RAM 16 through the camera interface (CINT) 13. This photographed data is converted to the coordinate value data (WD) 16a of the points Pa, Qa and Ra by the image processing processor 12 and stored in the RAM 16. The coordinate value data 16a is compared with the coordinate value data 17a of the points P, Q and R of the master body 21 to determine correction data (CD) 16b. The correction data 16b is supplied to the memory 7 of the robot control unit 6 through the interface 14 and stored therein as correction data 7b. The correction data 7b is created as a conversion matrix for converting points on the master body 21 to points on the workpiece body 22. On the other hand, an operation program 7c of the robot 5 is first created based on the master body 21. In the actual operation of the robot 5, the workpiece body 22 is photographed by the cameras 2, 3 and 4, and the correction data 16b is created by the visual sensor unit 10, supplied to the memory 7 of the robot control unit 6 and stored therein as the correction data 7b. The robot control unit 6 converts points on the operation program 7c to points on the master body 22 based on the correction data 7b, i.e., the conversion matrix for enabling the robot 5 to carry out a job. With this arrangement, the robot 5 can correctly carry out the job even if a position on the workpiece body 22 is dislocated from a point on the master body 21. Next, a case in which the operation program 7c is partially changed will be described. Figure 1 is a diagram showing the relationship between the master body and the workpiece body. Although the points P, Q and R are described in Figure 2 as points for determining the correction data 7b, points for determining the correction data 7b are actually different from points on the operation program. For the sake of explanation, however, these points P, Q and R are described as the points on the operation program. For example, the point Q on the operation program 7c is assumed to be changed to a point Qn. If the master body 21 is present at all times, this change can be effected at once, but actually the master body 21 is stored in another place or may not be available. Therefore, the change of the operation program 7c is carried out by using the workpiece body 22. For this purpose, a teaching operation panel 6a is operated to move the tool center point (TCP) of the robot 5 from the point Qa to a point Qan to cause the robot control unit 6 to recognize the point Qan to change the operation program 7c. Next, the change of the operation program will be described in detail. Figure 3 is a flowchart showing an operation effected by an operator for changing the operation program 7c, wherein numerals prefixed with an "S" indicate the numbers of the steps of the process. [S1] a teaching mode is set by operating the teaching operation panel 6a; [S2] the operation program is displayed at a not shown display unit on the teaching operation panel 6a to display a block to be changed, in which this block is a command block for moving to the point Q; [S3] the TCP of the robot 5 is moved from the point Qa before change to the point Qan after change by using the teaching operation panel 6a; [S4] a not shown position correction key on the teaching operation panel 6a is depressed, and when this key is depressed, the robot control unit reads the point Qa before change and the point Qan after change, further changes the point Q on the operation program 7c to the point Qn by using the correction data 7b and displays a block after change at the display unit of the teaching operation panel 6a, and the above processing will be described below in detail; and [S5] an operator confirms the content of the block after change and finishes the operation for changing the operation program. As described above, the operator can simply change the operation program 7c by using only the workpiece body 22 without using the master body 22. Next, a processing for changing the operation program in the robot control unit will be described. Figure 4 is a flowchart of a processing effected by the robot control unit 6 for changing the operation program, wherein numerals prefixed with an "S" indicate the numbers of the steps of the process. [S11] when an operator depresses a correction key at step S4 of Figure 3, the robot control unit 6 reads the coordinate values for respective axes, i.e. coordinate values Qan () for the respective axes in it, wherein the coordinate values for the respective axes are the coordinate values of the respective arms of the robot 5 and generally represented by axis names such as , W, U, τ, β, α, and the like, and these coordinate values of the respective axes are represented by the coordinate values Qan () for the respective axes as a whole; [S12] next, the coordinate values Qan () for the respective axes are converted to space coordinate values Qan (X) on the workpiece body, which represent the coordinate values X, Y, Z on the space of the TCP of the robot 5 and the attitude of the robot 5, and these values are represented by the space coordinate values Qan (X); [S13] the space coordinate values Qan (X) are converted to space coordinate values Qn (X) on the master body 21, and this conversion is effected by converting the space coordinate values Qan (X) by the inverse conversion matrix of the correction data 7b; [S14] the space coordinate values Qn (X) are converted to the coordinate values Qn () of the respective axes on the master body 21, wherein the coordinate values Qn () of the respective axes correspond to the coordinate values of the respective axes on the master body 21, i.e. to the command values on the operation program 7c; and [S15] the coordinate values Qn () of the respective axes are replaced with the command values Q () for the changed block of the operation program 7c. In the aforesaid manner, the operation program can be changed by using only the workpiece body 22 without using the master body 21. Although the change of points of the operation program is described in the above explanation, the addition of new points, deletion of unnecessary points and the like can be carried out in the same way in addition to the above change. As described above, according to the present invention, since the operation program can be changed by using only the workpiece body, the operation program can be simply changed without the need for reserving the master body or placing the same again.

Claims: A robot teaching method when an operation program for a robot (5) is changed, the method comprising the steps of: creating correction data (7b) as a conversion matrix for converting points on a master body (21) to points on a workpiece body (5); positioning the tool centre point (TCP) of the robot (5) to a point (Qan) on the workpiece body (22) to be changed; determining first coordinate values (Qan()) of said point to be changed; converting said first coordinate values (Qan()) to second coordinate values (Qn()) on the master body (21) by the correction data (7b); and, rewriting a command value in the operation program to said second coordinate values (Qn()) thereby to change the operation program. A method according to claim 1, wherein the operation program is commanded by the coordinate values of the respective axes. A method according to 2, wherein said first coordinate values (Qan()) are determined by converting the first coordinate values (Qan()) of the respective axes on the workpiece body (22) of said point to be changed to space coordinate values (Qan(X)); converting said space coordinate values (Qan(X)) to reference space coordinate values (Qn(X)) on the master body (21) by said correction data; and, converting said reference space coordinate values (Qn(X)) to the second coordinate values (Qn()) of the respective axes on the master body (21).

Inventors: AKIYAMA KAZUHIKO, ARIMATSU TARO, KARAKAMA TATSUO, WATANABE ATSUSHI, AKIYAMA, KAZUHIKO, ARIMATSU, TARO, KARAKAMA, TATSUO, WATANABE, ATSUSHI, AKIYAMA, KAZUHIKO, FANUC DAI-3 VIRA-KARAMATSU, ARIMATSU, TARO, FANUC DAI-3 VIRA-KARAMATSU, KARAKAMA, TATSUO, FANUC DAI-3 VIRA-KARAMATSU, WATANABE, ATSUSHI, FANUC MANSHON HARIMOMI 7-207
Applicants: FANUC LTD, FANUC LTD.
Application year: 1992
Main classification: B25J9
IPC codes: G05B19, B25J9