WELDING ROBOT CONTROL METHOD

Abstract: A control system of a welding robot for performing realtime tracking using a laser sensor in which a welding operation in passing a tack welded portion is rationally coped with. An arc welding torch and a laser sensor LS are mounted on a robot hand. A tool center point is set to coincide with an aimed position of a distal end of a welding wire. The tool center point is positioned at an advancing end of a formed bead B and immediately before a tack welded portion A1. The tool center point 4 is also positioned on a welding reference line (P 1 → ··· → P 6 ). A bright line 5 is formed between points 51 and 52 by a laser beam emitted from the laser sensor LS with a deflection range SC. A detected point SA is positioned at an edge of the tack welded portion A1 on the bright line 5 (there may be found no detected point). A deviation of the detected point SA from the proper welding reference line is determined based on a direction of a robot path immediately before the detected point. In such case, a detection substitutive point Q is determined based on the robot path immediately before the detected point and the TCP is moved toward the determined point. Detection substitutive points following the point Q are successively determined until the tack welded portion A1 has been passed, and the robot follows a path along a series of the detection substitutive points.

Description: The present invention relates to a control method for a welding robot, and more particularly to a control method capable of properly defining a movement path when the welding robot for performing realtime tracking using a laser sensor passes a tack welding portion. There is widely known a robot movement path control technique, as a realtime tracking technique using a laser sensor, in which the robot movement path is controlled by correcting a taught path according to the detection results of the laser sensor mounted on a robot for previously sensing the forward region in the advancing direction of the robot from moment to moment during a playback operation. The realtime tracking technique using the laser sensor enables the robot to trace a proper movement path even in the case where individual workpieces are inaccurately positioned, and thus provides an extremely useful technical means for industrial robots for performing a variety of tasks. Such a technique is known from JP-A-8 039 470. However, when applying this technique to a welding robot for arc welding, there arises a problem of how to deal with a so-called tack welded portion. FIGS. 1, 2a and 2b illustrate this problem, wherein FIG. 1 shows an external appearance of a fillet weld joint having tack welded portions, FIG. 2a is a sectional view showing a position of a detected point by a laser sensor on a welding corner line of the fillet weld joint in a section without tack welded portion as shown in FIG. 1, and FIG. 2b is a sectional view showing a position of a detected point by the laser sensor on the welding corner line in a section with the tack welded portion. It is to be noted that a term "welding reference line" used in the following description denotes a line connecting reference points at which the welding is aimed (each reference point being a point to which a distal end of a welding wire is to be brought). In FIGS. 1, 2a and 2b, symbols W1 and W2 represent two platelike workpieces forming a joint, and the welding is performed on a corner line formed between the two workpieces W1 and W2. Points P 1 , P 2 , ..., P 6 represent welding sections, wherein P 1 is a welding start point (near a taught point T 1 ) and P 6 is a welding end point (near a taught point T 2 ). In this example, a welding reference line WL forms a substantially straight path (not necessarily straight in the strict sense) indicated by P 1 → P 2 → ··· → P 6 . A path of movement of the distal end point of a tool of the welding robot is desired to be made coincidental with the welding reference line WL (no shift for adjustment) or a line obtained by shifting the welding reference line by a predetermined amount for adjustment (e.g., a path spaced by 2 mm in the vertical or horizontal direction from the corner line). In the case where some tack welded portions, such as A1 and A2 in FIG. 1, exist along the welding reference line WL, however, the corner line (the welding reference line WL) is covered and concealed by the tack welds in a section P 2 -P 3 and a section P 4 -P 5 , and thus the position of the welding reference line WL cannot be detected by the laser sensor, making it difficult to define the desired path as mentioned above. In other words, when scanning the corner line transversely with a laser beam LB from the laser sensor LS (with a deflection range SC) so as to detect the position of the corner line (the position of the welding reference line WL) as shown in FIG. 2a, a detected point SA on the corner line can be obtained in the sections (P 1 -P 2 , P 3 -P 4 , P 5 -P 6 ) where no tack welded portion exists. However, in the sections (P 2 -P 3 , P 4 -P 5 ) where the tack welded portions exist, the detected point SA is obtained near an edge of the tack welded portion A, and thus is deviated from the position of the corner line (the welding reference line WL), as shown in FIG. 2b. This causes the robot path to be deflected laterally and deviated from the aforementioned desired path. Further, depending on the shape or size of the tack welded portion A, there is found no detected point (detection failure) or the position of the detected point is disordered (erroneous detection). If such detection failure or erroneous detection occurs during an actual welding operation, the robot strays or suddenly stops in the vicinity of the tack welded portion to impede the welding operation. An object of the present invention is to solve the aforementioned problems with which the conventional system is confronted when a tack welded portion exists on a welding path. That is, the object of the present invention is to provide a control system and method for an arc welding robot having a realtime tracking function with a laser sensor, in which a movement path can be properly defined even while passing a tack welded portion on the welding path. The present invention is therefore intended to enlarge applicability of the realtime tracking function using the laser sensor,and to enhance the efficiency and quality of the welding operation by the arc welding robot. According to the present invention there is provided a control method for a welding robot as set out in attached claim 1. A welding robot control method of the present invention is designed for controlling a welding robot for performing arc welding by moving a welding torch mounted on a robot along a welding reference line. The system which may be used in an embodiment of the invention, comprises: a laser sensor mounted on the robot, for repeatedly detecting a characteristic point of a joint shape between workpieces by scanning across a region in an advancing direction of the welding robot with a laser beam; and properness determining means for determining whether the detected characteristic point is proper or improper as a point representing a position of the welding reference line, when the characterizing point is detected by the laser sensor. An encounter with, and a departure from, a tack welded portion is determined by the properness determining means on a realtime basis. The system further comprises: first storing means for storing data representing the position of the detected point as data of a welding reference line representative point when the detected characteristic point is determined to be proper by the properness determining means; detection substitutive point determining means for determining a detection substitutive point to be substituted for the detected characteristic point when it is determined that the detected characteristic point is improper by the properness determining means and when the characteristic point is not detected by the laser sensor; and second storing means for storing data representing a position of the detection substitutive point as data of the welding reference line representative point. With the above arrangement, the data of the welding reference line representative points which properly represent the welding reference line are stored in advance of the robot movement in a movement section with no tack welded portion, and also in a movement section with a tack welded portion. In the system, by treating the data of the welding reference line representative points as the data of the detected points in the ordinary realtime tracking, target points of movement can be successively determined so as to conform to a desired movement path in a section with a tack welded portion, and also in a section with no tack welded portion. It is preferable that the properness determining means comprises: means for obtaining a deviation index value which represents a magnitude of deviation of the detected characteristic point from the position of the welding reference line, based on the data of the welding reference line representative points stored in near past in the first and second storing means and the data representing the position of the detected characteristic point; and means for comparing the deviation index value with a reference value. It is preferable that the detection substitutive point determining means includes means for determining the detection substitutive point on an extended line of the welding reference line represented by the data of the welding reference line representative points stored in near past. In this case, it is appropriate that the extended line of the welding reference line is defined as a straight line or a circular arc depending on whether the taught path extends on a straight line or a circular arc. Brief Description of Drawings FIG. 1 is a perspective view showing a fillet weld joint having tack welded portions; FIG. 2a is a sectional view showing a position of a point detected by a laser sensor on a welding corner line of the fillet weld joint in a section where a tack welded portion does not exist, as shown in FIG. 1; FIG. 2b is a sectional view showing a position of a point detected by the laser sensor on the welding corner line in a section where a tack welded portion exists; FIG. 3 is a block diagram showing a principal part of a laser sensor which may be used in an embodiment of the present invention; FIG. 4 is a diagram showing the principle of obtaining coordinates of a position of an object relative to the sensor of FIG. 3, based on the position detected by a light receiving device; FIG. 5 is a block diagram showing a principal part of a system used in an embodiment of the present invention; FIG. 6 is an enlarged perspective view showing a state in which a welding robot is approaching a tack welded portion A1 of the fillet weld joint shown in FIG. 1; FIG. 7 is a diagram showing a way of determining a target point of movement of a tool center point (TCP) of the robot according to the embodiment of FIG. 5; FIG. 8 is a flowchart showing an outline of a process for creating representative points for a welding reference line and creating robot position correction data based on the representative points; and FIG. 9 is a flowchart showing an outline of a process for moving the robot using the data created by the process shown in FIG. 8. A laser sensor usable in an embodiment of the present invention will be explained first. Since the general arrangement and function of the laser sensor are already known in the art, only an outline thereof will be described below. FIG. 3 exemplifies an arrangement of a principal part of a laser sensor usable in an embodiment of the present invention by a block diagram. In the figure, reference numeral 10 generally denotes a detecting section which comprises a laser oscillator 11, a swing mirror (galvanometer) 12 for making a laser beam scan, and an optical system 13 for receiving reflected light and forming an image on a light receiving element 14. A control section 20, which constitutes a sensor board, comprises a CPU 21 in the form of a microprocessor, to which an input/output device 28 and a memory 25 in the form of ROM and RAM are connected via a bus 29. A laser driving section 22 for driving the laser oscillator 11 to generate a laser beam, a mirror scanning section 23 for swinging the swing mirror 12, and a signal detecting section 24 for position detection based on a position of light reception in the light receiving device 14 are connected to the input/output device 28. The input/output device 28 is also connected to a line for exchanging various commands and data with a robot controller 40 (see FIG. 5). On receiving a laser sensor start command from the robot controller 40, a laser sensor driving program stored in the memory 25 is started, and the CPU 21 sends a laser driving command to the laser driving section 22 so that the laser oscillator 11 is driven to generate a laser beam, and also sends a mirror scanning command to the mirror scanning section 23 to cause the swing mirror 12 to make a swinging motion, whereby the laser beam generated by the laser oscillator 11 is projected onto an object W for scanning. The laser beam, having been subjected to diffuse reflection on the object W, forms an image, dependent on the position of reflection on the object on the light receiving device 14 with the aid of the optical system 13. For the light receiving device, a CCD (Charge Coupled Device), which is a split-type device, or a PSD (Position Sensitive Detector), which is a non-split, integration-type device, and the like may be used. In this embodiment, a one-dimensional CCD array of the laser sensor is used as the light receiving device 14. The light (image of the reflected light) falling on the light receiving surface of the light receiving device 14 is converted into photoelectrons, and stored in its cells. In response to a CCD scanning signal from the signal detecting section 24, the charges stored in the cells are output sequentially from one end of the array at a predetermined period, and by way of the signal detecting section 24 and the input/output device 28, undergoes processing AD conversion and the like so that the updated data is stored in the memory 25. The scanning period of the CCD is set to a period sufficiently shorter than that of the swing mirror 12 (e.g., 1/several hundreds), and a change in the angle of the swing mirror 12 and a change in the output state of the CCD are recognizable at any desired time. The output state of the CCD is recognized as the position of a cell (cell number) giving the largest output of all, and thus the position of a cell upon which the reflected light impinges is detected. Based on this position, the position of the object W relative to the sensor is calculated. FIG. 4 is a diagram illustrating the principle of obtaining coordinates (X, Y) of the position of the object W relative to the sensor, based on a position xa detected by the light receiving device 14. Here, it is assumed that a sensor origin (0, 0) is located on a line connecting the center of the optical system and the center point of the light receiving device 14. It is also assumed that the Y axis coincides with the line connecting the center of the optical system and the center point of the light receiving device 14, and that the X axis extends perpendicularly to the Y-axis. The distance from the origin to the center of the optical system is L1; the distance from the center of the optical system to the center point of the light receiving device 14 is L2; the distance from the sensor origin to the center of rocking motion of the swing mirror 12 in the X-axis direction is D; the distance from the sensor origin to the center of rocking motion of the swing mirror along the Y axis is L0; the angle between reflected light of the laser beam reflected by the swing mirror 12 and the Y-axis is ; and the position of light reception on the light receiving device 14 is xa. Under these conditions, coordinates (X, Y) of the position at which the laser beam falls upon the object and is reflected thereby can be obtained by calculation according to the equations below. X = xa·[(L1 - L0)·tan + D]/(xa + L2·tan) Y = [L1·xa + L2·(L0·tan - D)]/(xa + L2·tan) Referring now to FIG. 5, an arrangement of an entire system including the robot controller used in the embodiment of the present invention will be described. In the figure, the robot controller generally indicated by 40 includes a microprocessor (hereinafter referred to as CPU) 41 as a central processing unit for controlling the entire system. The CPU 41 is connected via a bus line BL to a memory 42 in the form of ROM, a memory 43 in the form of RAM, a nonvolatile memory 44, a teaching operation panel 46 equipped with a liquid crystal display 45, a digital servo circuit 47 connected via a servo amplifier 48 to a welding robot mechanism RB, and a general-purpose interface 49 connected to the control section 20 (see FIG. 3) of the laser sensor LS as well as to a welding power supply section 30. The ROM 42 stores various system programs to be executed by the CPU 41 for controlling the robot body 1, the laser sensor control section 20, the welding power supply section 30, and the robot controller 40 itself. The RAM 43 is a memory for temporary storage of data and for calculation. Buffers 1 and 2, mentioned later, are also set in this RAM 43. The nonvolatile memory 44 stores set values of various parameters and robot motion programs. In the following, control procedure and processing for the fillet welding shown in FIG. 1 by the aforementioned system will be described referring to FIG. 6 and the subsequent figures. FIG. 6 is an enlarged perspective view showing a state in which the welding robot is approaching the tack welded portion A1 in the case shown in FIG. 1. For the sake of illustration, the distance between a distal end of a robot arm and the distal end point of the tool (distal end of the welding wire) is shown exaggeratedly. Also in this figure, identical reference numerals are used to denote those elements shown in FIGS. 1 to 5. As shown in FIG. 6, an arc welding torch 2 and the laser sensor LS are mounted on a distal end 1 of a robot arm of the welding robot. A welding wire 3 is let out of the distal end of the torch 2 at a predetermined speed. The distal end point 4 of the tool is set so as to coincide with an aimed position of a distal end of the welding wire 3. The distal end point 4 is positioned at a front end of a formed bead B and immediately before the tack welded portion A1. Also, the distal end point 4 of the tool is located on the welding reference line (P 1 → P 2 ··· → P 6 ; see FIG. 1) along the corner line formed between the overlapped workpieces. The point P 2 is a point at which the welding reference line meets a beginning end of the tack welded portion A1, and the point P 3 is a point at which the welding reference line meets a terminating end of the tack welded portion A1. When the welding robot has advanced to the position as illustrated in this figure, the laser beam projected from the laser sensor LS with the deflection range SC forms a bright line 5 across the tack welded portion A1. Reference numerals 51 and 52 indicate opposite ends of the bright line 5. A point SA detected based on the bright line 5 is located at a point where the bright line 5 comes to cross the boundary between a lateral edge of the tack welded portion A1 and a surface of the workpiece W1, as explained with reference to FIGS. 2a and 2b. Depending on the situation, however, the detected point SA may be shifted on the swollen surface of the tack welded portion A1 or the detected point SA can not be found (unable to detect). In any case, a point Q on the welding reference line that should be detected if the tack welded portion A1 were not present can scarcely be detected in practice. Thus, if tracking control is performed in such a manner that a target point of movement of the TPC 4 of the robot is determined based on the detected point SA as illustrated, this will cause the robot to make a movement so that the TCP 4 does not proceed from the point P 2 toward the point Q but toward the point SA. If the detected point SA is greatly deviated from the immediately preceding detected point, or if the detected point SA cannot be found, then the robot strays out of course or stops. According to this embodiment, such problems are eliminated by making the TCP 4 of the robot proceed from the point P 2 toward the point Q, and then a target point of the TCP 4 is determined successively along the welding reference line while and after the robot passes the tack welded portion A1. FIG. 7 schematically illustrates how the target point for movement of the robot (TCP) is determined according to the embodiment, in which a relationship of a taught path extending across the tack welded portion A1, a welding reference line, a series of detected points and a series of target points of movement is shown with respect to the case shown in FIG. 6. In FIG. 7, T 1 and T 2 are taught points specified by the position data in a robot motion program, and a straight line T 1 -T 2 connecting these points constitutes a taught path. For an arcuate block, an arcuate path is defined by three taught points. Symbols S 1 , S 2 , S 3 , S 4 , ..., S m-k , ..., S m-2 , S m-1 , S m , S m+1 , S m+2 , ..., S n-k , ..., S n-2 , S n-1 , S n , S n+1 , S n+2 , ..., S r-1 , and S r represent a series of detected points detected by the laser sensor LS. The following description is based on the assumption that r is sufficiently greater than n and that n is sufficiently greater than m (i.e., the detection cycle is sufficiently short and the interval between adjacent detected points is also sufficiently small). The first detected point S 1 and the last detected point S r corresponds to a start point P 1 and an end point P 6 of the welding reference line, respectively. The welding reference line along the corner line of the overlapped workpieces does not always coincide exactly with the taught path T 1 -T 2 because of variation in the positioning of the workpieces, error in machining the workpieces, etc., and therefore, the series of detected points also more or less deviates or meanders, as illustrated, even in sections where no tack welded portion exists (in the figure, the meandering is somewhat exaggerated). If the robot moves through the whole block under a tracking control based on the series of detected points S 1 , S 2 , S 3 , ..., S r-1 and S r, as mentioned above, the movement path of the TCP of the robot almost coincides with the line connecting these detected points. However, if the detection is not possible, the robot may possibly stray off course or stop, According to the present invention, therefore, if a detected point is greatly deviated from the welding reference line or the detection is not possible at all, it is judged that a section including a tack welded portion is encountered, and a point to be substituted for such an improperly detected point (or when the detection is not possible is determined. In the block shown in FIG. 7, the points S m+1 , S m+2 , ..., S n-k , ..., S n-2 and S n-1 are improper detected points, and symbols Q m+1 , Q m+2 , ..., Q n-k , ..., Q n-2 and Q n-1 are proper points to be substituted for these improper detected points. These points determined when proper detected points are not obtained are called herein "detection substitutive points". Also, the term "welding reference line representative points" is used for a combination of such detection substitutive points and the proper detected points such as S 1 , S 2 , ..., S m . The "welding reference line representative point" represents the position of the welding reference line (the line extending along the original corner line). Thus, a line connecting a series of welding reference line representative points S 1 , S 2 , ..., S m-1 , S m , Q m+1 , Q m+2 , ..., Q n-2 , Q n-1 , Q n , S n+1 , S n+2 , ..., S r-1, S r represents the welding reference line. Therefore, if Q m+1 , Q m+2 , ..., Q n-1 can be successively determined with respect to the tack welded portion A1 in advance of robot movement, with these points regarded as the welding reference line representative points which correspond to a series of the detected points S m+1 , S m+2 , ..., S n-1 improperly representing the welding reference line, the target positions for movement of the robot are successively determined based on the welding reference line representative points, so that the robot is put on a path along the series of the welding reference line representative points. According to the present embodiment, the processing for determining each welding reference line representative point when passing or when not passing a tack welded portion is divided into the following two stages: (1) Stage of tack welded portion encountering/passing determination for determining whether or not the position of the detected point indicates that the welding line encounters or passes the tack welded portion. (2) Stage of creating detection substitutive points which are expected to lie on the reference welding line, when the position of the detected point indicates the welding line encounters or passes the tack welded portion. [Tack Welded Portion Encountering/passing Determination Stage] This stage will be considered with respect to the following two cases: First Case (Detection failure): This is a case where there is found no detected point. In this case, it is judged to be encountering a tack welded portion. However, this rule does not apply to the case where detection failure occurs in a section immediately after the start of welding where a tack welded portion cannot be considered present. Second Case (Detection succeeded): This is a case where there is found a detected point. In this case, a deviation index value indicative of the amount of a sideways deviation from the welding reference line is calculated. Then, if the deviation index value is greater than a predetermined reference value, it is judged that a tack welded portion is being encountered. If the reference value is not exceeded by the deviation index value, it is judged that a tack welded portion is not being encountered (a tack welded portion is not yet encountered or has already been passed). As the deviation index value, an index value representing the amount of deviation of a currently detected point from the robot path immediately before the detection of the point is appropriate. Such a robot path is supposed to lie on a series of the welding reference line representative points determined previously. Therefore, the immediately preceding robot path can be calculated based on the data of the welding reference line representative points immediately preceding the present data. In this embodiment, therefore, an index value f j (j > k), which is shown in FIG. 7, is used. The deviation index value f j is defined by the following equation (3): f j = ∥<ek, j> x <vj-1, j>∥ = |sinj|·∥<vj-1, j>∥ where <ek, j> and <vj-1, j> are vectors on a robot coordinate system and are defined as described below. The vector <ek, j> is a vector based on the data of near-past welding reference line representative points. That is, this vector is a unit vector (length: 1) indicating the direction of the robot path to be calculated based on k welding reference line representative points (k ≥ 2) immediately preceding a detected point S j , that is, Q j-1 (S j-1, if Q j-1 does not exist, and this is the case with the rest of the points mentioned below), Q j-2 (S j-2 ), ..., Q j-k (S j-k ). The vector can be calculated immediately by obtaining, by a least square method or the like, a straight line fitting the preceding k (in this example, "5") welding reference line representative points. The vector <vk, j> is a vector towards the detected point S j from the welding reference line representative point Q j-1 (S j-1, if Q j-1 does not exist) immediately preceding the detected point S j (Note, this vector is not a unit vector). The deviation index value f j defined as described above undergoes a qualitative change mentioned below. Here, it is assumed that k = 5 (therefore, f 1 through f 5 are not calculated). f 6 to f m : Since no tack welded portion exists, a series of detected points along the welding reference line (true corner) is obtained. Accordingly, the deviation index value is relatively small. f m+1 : As seen from FIG. 7, the detected point S m+1 is a point on the edge of the tack welded portion A1 that is detected for the first time, and the deviation from the welding reference line is relatively large. Accordingly, the outer products of the vectors <e5, m+1> and <vm, m+1> also are relatively large. f m+1 is calculated by the following equation: f m+1 = ∥<e5, m+1> × <vm, m+1>∥ The vectors <e5, m+1> and <vm, m+1> in this equation are calculated in accordance with the aforementioned definition, and the welding reference line representative points and detected points, which are the bases for calculating the two vectors, can be written as <e5, m+1>: Five welding reference line representative points S m-4 , S m-3 , S m-2 , S m-1 , S m → five detected points (no detection substitutive points). <vm, m+1>: Two detected points S m , S m+1 . f m+2 to f n-1 : As seen from FIG. 7, the detected points S m+2 through S n-1 are a series of points along the edge of the tack welded portion A1, and thus the deviation from the welding reference line is relatively large at all of these points. Therefore, all the deviation index values calculated according to the respective equations indicated below are also relatively large. Especially, the f j that is calculated for a position where the protrusion of the tack bead is large naturally takes a large value. The following are the equations for calculating f m+2 to f n-1 . The welding reference line representative points and detected points, the bases for calculating the vectors <ek, j> and <vj-1, j> in the above equations (4) to (8) are as follows: <e5, m+2>: Five welding reference line representative points S m-3 , S m-2 , S m-1 , S m , Q m+1 → four detected points + one detection substitutive point. <e5, m+3>: Five welding reference line representative points S m-2 , S m-1 , S m , Q m+1 , Q m+2 → three detected points + two detection substitutive points. <e5, n-2>: Five welding reference line representative points Q n-7 , Q n-6 , Q n-5 , Q n-4 , Q n-3 → five detection substitutive points. <e5, n-1>: Five welding reference line representative points Q n-6 , Q n-5 , Q n-4 , Q n-3 , Q n-2 → five detection substitutive points. <vm+1, m+2>: Two detected points S m+1 , S m+2 . <vm+2, m+3>: Two detected points S m+2 , S m+3 . <vn-3, n-2>: Two detected points S n-3 , S n-2 . <vn-2, n-1>: Two detected points S n-2 , S n-1 . f n : Since the detected point S n is a point where the tack welded portion A1 is passed, the deviation from the welding reference line is no longer large. Accordingly, the deviation index value calculated by the equation below is relatively small. f n = ∥<e5, n> × <vn-1, n>∥ f n+1 to f r : After passing the tack welded portion A1, the detected points do not largely deviate from the welding reference line until the next tack welded portion A2 (see FIG. 1) is encountered. From the beginning to the end of the next tack welded portion A2, the deviation index value undergoes a change similar to that described above with reference to the case of the encounter with and passage through the tack welded portion A1. [Stage of Creating Detection substitutive point] As will be understood from the foregoing explanation, in cases where the welding reference line representative points necessary for the calculation of the deviation index includes one or more detection substitutive points, it is necessary that the positions of the detection substitutive points be determined previously. One may be apprehensive that creating detection substitutive points based on the result of calculation of the deviation index value may lead to a circular argument. It should be noted, however, that this is not true. In other words, the detection substitutive points according to the embodiment will be created successively from the point where the creation of a detection substitutive point has become necessary for the first time (S m+1 in the example of FIG. 7). That is, the detection substitutive point Q m+1 for the detected point S m+1 is created based on the data of the past k welding reference line representative points, which do not include any detection substitutive point. The position of the detection substitutive point Q m+1 is calculated as the position of a point where a straight line represented by the vector <e5, m+1> (straight line estimated to be extending along the corner) intersects a line extending perpendicularly from the detected point S m+1 . Thereafter, in general, the position of a detection substitutive point Q i is calculated for a detected point S i , when considered necessary to create a detection substitutive point, as the position of a point where the straight line represented by the vector <ek, i> intersects a line extending perpendicularly from the detected point S i . Whether a detection substitutive point needs to be calculated or not is determined based on the deviation index f i which is based on the data of the detected points and detection substitutive points obtained until then. When detected point cannot be found, a detection substitutive point is obtained by extrapolating the straight line represented by the aforementioned vector <e5, m+1>, based on the detected points and/or detection substitutive points stored in the near past. FIGS. 8 and 9 are flowcharts schematically showing processes to be executed in the embodiment to obtain a movement path along a proper welding reference line (a line reckoned to be extending along the corner line and determined based on a series of welding reference line representative points S 1 , S 2 , ..., S , Q , Q , ..., Q , Q , S , S , ..., S r-1 and S r ). The flowchart of FIG. 8 (processing 1) illustrates the process for creating a welding reference line representative point and the process for robot position correction data based on the obtained point, and the flowchart of FIG. 9 (processing 2) illustrates the process for moving the robot based on the data created in the process 1. The description of these processings is limited to those necessary in relation to the movement of the robot, and those relating to the on-off control of the welding torch and the control of the welding conditions are omitted. The process 1 includes the following steps, wherein j is an index representing the number of times of detection is executed and its initial value is "1" (j = 1). [G1] When a laser sensor-on command is output (see processing 2), the procedure proceeds to Step G2. [G2] The laser sensor is started. [G3] Detection of a point S j is attempted. [G4] If the detection of the point S j ends in failure, the procedure proceeds to Step G5, and if the detection ends in success, the procedure proceeds to Step G6. [G5] If the index j is not greater than the set value k (in the aforementioned example, k = 5, and this applies to the rest of cases), the procedure returns to Step G3 and detection of the point S j is attempted again. This is a process for coping with a natural situation that no detected point can be found unless the robot reaches a position immediately before the position P 1 . When the index j is greater than the set value k, the procedure proceeds to Step G10 and the position of a detection substitutive point Q j (in the robot coordinate system) is calculated. That is, when detected point can not be found even after the robot reaches the position P 1 and starts fillet welding, it is judged that a tack welded portion has been encountered. [G6] Using current robot orientation data, the position of the detected point S j in the robot coordinate system (spatial coordinate system set with reference to the robot) is obtained and written into the buffer 1. The buffer 1 stores data of the latest k welding reference line representative points in the form of table data. [G7] When the index j is greater than the set value k, the procedure proceeds to Step G8, and the value of the aforementioned deviation index f j is calculated. If, however, the index j is smaller than k + 1, the procedure proceeds to Step G12. This is because the deviation index f j will not (cannot) be calculated before a minimum of initial data necessary for the calculation of the aforementioned vector <ek, j> is stored. [G8] The value of the aforementioned index f j is calculated. This calculation is made using the position data of detected points or detection substitutive points based on the robot coordinate system. [G9] The thus-calculated value of the index f j is compared with a threshold f 0 which is set to a proper value, and if the former is greater than the latter, it is judged that a tack welded portion is encountered; therefore, the procedure proceeds to Step G10. If the threshold value is not exceeded, it is judged that no tack welded portion is encountered, and the procedure proceeds to Step G12. [G10] The position of the detection substitutive point Q j is obtained on the robot coordinate system and written into the buffer 1. [G11] A position correction value with respect to the taught path is obtained based on the position of the detection substitutive point Q j is obtained on the robot coordinate system and written into the buffer 2. [G12] A position correction value with respect to the taught path is obtained based on the position of the detected point S j on the robot coordinate system and is written into the buffer 2. [G13] A determination is made as to whether or not a laser sensor-off command has been output (see process 2). If a laser sensor-off command has been output, the laser sensor is turned off, and the procedure is terminated; otherwise the procedure proceeds to Step G14. [G14] The index j is incremented by "1" and the procedure returns to Step G3. The process 2 includes the following steps, wherein t represents a taught point index. In this example, the initial value and saturation value of the index t are "1" and "2", respectively. [H1] A laser sensor-on command is output. [H2] Program data relating to a taught point Tt is read. [H3] The buffer 2 is accessed to retrieve data of the welding reference line representative points. [H4] If there exists robot position correction data matching this very point of time (matching the degree of progress between the interval P 1 -P 2 ), the correction data is read and the procedure proceeds to Step H5; otherwise, the procedure proceeds to Step H6. The laser sensor does not detect the corner formed between overlapped workpieces before the robot moving from its initial position reaches a welded portion of the workpieces, and thus robot position correction data will not be created. During this period of time, therefore, the procedure proceeds in the order of Step H4 → Step H6 → Step H7. [H5] A target position for robot movement is determined based on taught path data and the robot position correction data. [H6] A target position for robot movement is determined based on the taught path data. [H7] A motion command is created and distributed to servos associated with respective axes. [H8] If the processing for movement up to the taught point Tt has not yet been completed, the processing proceeds to Step H3, and, if the movement has been completed, the procedure proceeds to Step H9. [H9] The taught point index value t is incremented by "1". [H10] If the saturation value (in this example, "2") is not exceeded by the taught point index t, the procedure returns to Step H2, and if the saturation value is exceeded, the procedure proceeds to Step H11. [H11] A laser sensor-off command is output to end the processing. In the foregoing, an example of a welding of a corner extending nearly along a straight-line taught path is explained. However, it is apparent, that the present invention can also be applied to the case of butt-welding nearly along a straight-line taught path. In the case of butt welding, those points representing a gap between abutted portions (or a boundary of a joint) are detected by the laser sensor, and, when a tack welded portion exists, the edge on one side thereof is detected. In such a case, by treating the detected points and the edge as the detected point S j as explained above, process similar to those shown in the flowcharts of FIGS. 8 and 9 can be applied to determine a path extending along the welding reference line (path following the center line of the gap or the boundary of the joint) even when the passage across a tack welded portion is included. Even in the case where the taught path is in the form of a circular arc, a path along the welding reference line can be obtained by modifying the method of determining the detection substitutive point, even when the passage across a tack welded portion is included, by the process similar to those shown in the flowcharts of FIGS. 8 and 9. In other words, where the taught path is of circular arc, the distance of separation between an arc C k-j predicted based on the past k points and a detected point S j corresponding thereto can be used as the index f j representing the magnitude of a deviation from the welding reference line. In this case, the detection substitutive point Q j may be set at a point where the circular arc C k-j intersects a line extending perpendicularly from the detected point S j . According to the present invention, even when a tack welded portion exists midway on the welding path, the arc welding robot can be moved nearly along the original welding reference line. Consequently, the realtime tracking function of the arc welding robot using the laser sensor improves, thereby contributing to an improvement of efficiency and quality of the welding.

Claims: A control method for controlling a welding robot for performing arc welding by moving a welding torch (2) mounted on the robot along a welding reference line (P1→P6), said method comprising the step of: repeatedly detecting a characteristic point (SA) of a joint shape between workpieces (W1,W2) by scanning transversely across a region in an advancing direction of said welding robot with a laser beam (LB) by a laser sensor (LS) mounted on said welding robot; the control method being characterised by the steps of: determining whether the detected characteristic point (SA) is proper or improper as a point representing a position of said welding reference line, when the characterizing point (SA) is detected by said laser sensor (LS); storing data representing the position of the detected point (SA) as data of a welding reference line representative point when the detected characteristic point is determined to be proper; determining a detection substitutive point to be substituted for the detected characteristic point (SA) when it is determined that the detected characteristic point (SA) is improper, or when the characteristic point (SA) is not detected by said laser sensor (LS); storing data representing a position of the detection substitutive point as data of the welding. reference line representative point; and successively determining a target point of movement of said welding robot, based on the stored data of the welding reference line representative points. A welding robot control method according to claim 1, wherein the properness of the detected characteristic point (SA) is determined by obtaining a deviation index value which represents a magnitude of deviation of the detected characteristic point (SA) from the position of the welding reference line, based on data of welding reference line representative points stored in the near past, and data representing the position of the detected characteristic point (SA); and by comparing the deviation index value with a reference value. A welding robot control method according to claim 1 or 2, wherein said detection substitutive point is determined on an extended line of a straight welding reference line represented by data of welding reference line representative points stored in the near past, when a taught path extends in a straight line. A welding robot control method according to claim 1 or 2, wherein said detection substitutive point is determined on an extended arcuate line of an arcuate welding reference line represented by data of welding reference line representative points stored in the near past, when a taught path is of a circular arc.

Inventors: OKUDA MITSUHIRO, TERADA AKIHIRO, OKUDA, MITSUHIRO, TERADA, AKIHIRO, OKUDA, MITSUHIRO, FANUC MANSHONHARIMOMI
Applicants: FANUC LTD, FANUC LTD.
Application year: 1997
Main classification: B23K9
IPC codes: H01S3, B23K9