Device and method for acquiring deviation amount of working position of tool
11964396 ยท 2024-04-23
Assignee
Inventors
Cpc classification
Y02P90/02
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
G05B2219/31048
PHYSICS
G05B2219/40613
PHYSICS
International classification
Abstract
A device capable of acquiring a deviation of a working position of a tool with respect to a target position of a workpiece with higher accuracy in accordance with actual work. A device for acquiring a deviation amount of a working position of a tool with respect to a target position when a work is performed on a workpiece with respect to the target position by the tool, the tool being moved by a movement machine, the device including: a camera arranged in a predetermined positional relationship with respect to the tool and configured to image the target position at a first time point when the tool performs an operation for the work; and a deviation amount acquisition section configured to acquire a deviation amount between the working position and the target position at the first time point, based on a position of the target position in image data imaged by the camera and information indicating a position of the working position in the image data.
Claims
1. A method of acquiring a deviation amount of a working position of a tool with respect to a target position on a workpiece when performing a work on the target position by the tool moved by a movement machine, the method comprising: controlling, via a processor, the movement machine and the tool in accordance with a work program; imaging the target position by a camera arranged in a predetermined positional relationship with the tool at a first time point when the processor causes the tool to perform an operation for the work, the first time point being a time point when the processor transmits a command for causing the tool to perform the operation in accordance with the work program, or a time point when a predetermined time elapses from the time point when the processor transmits the command; and acquiring a deviation amount between the working position and the target position at the first time point, based on a position of the target position in image data imaged by the camera and on information indicating a position of the working position in the image data.
2. A device configured to acquire a deviation amount of a working position of a tool with respect to a target position on a workpiece when performing a work on the target position by the tool moved by a movement machine, the device comprising: a processor configured to control the movement machine and the tool in accordance with a work program; and a camera arranged in a predetermined positional relationship with the tool, and configured to image the target position at a first time point when the processor causes the tool to perform an operation for the work, the first time point being a time point when the processor transmits a command for causing the tool to perform the operation in accordance with the work program, or a time point when a predetermined time elapses from the time point when the processor transmits the command, wherein the processor is further configured to acquire a deviation amount between the working position and the target position at the first time point, based on a position of the target position in image data imaged by the camera and on information indicating a position of the working position in the image data.
3. The device of claim 2, further comprising a storage configured to pre-store the information.
4. The device of claim 2, further comprising a light irradiation device provided at the tool and configured to irradiate the workpiece with light for indicating the working position when the camera images the image data, wherein the processor acquires the deviation amount using a position of the light in the image data as the information.
5. A device configured to acquire a deviation amount of a working position of a tool with respect to a target position on a workpiece when performing a work on the target position by the tool moved by a movement machine, the device comprising: a camera arranged in a predetermined positional relationship with the tool, and configured to image the target position at a first time point when causing the tool to perform an operation for the work; and a processor configured to acquire a deviation amount between the working position and the target position at the first time point, based on a position of the target position in image data imaged by the camera and on information indicating a position of the working position in the image data, wherein the tool contacts the workpiece at the working position when performing the work, wherein the first time point is a time point when causing the tool to contact the workpiece.
6. The device of claim 2, wherein the tool is a welding gun including a fixed electrode and a movable electrode configured to move along an axis toward and away from the fixed electrode, wherein the camera is arranged such that a visual line direction of the camera is parallel to the axis.
7. The device of claim 6, wherein the camera is arranged at a position on the movable electrode such that the visual line direction coincides with the axis.
8. The device of claim 2, wherein the tool is a laser machining head configured to emit a laser beam along an optical axis, wherein the camera is arranged such that a visual line direction of the camera coincides with the optical axis.
9. The device of claim 2, wherein the tool is a robot hand configured to grip a component and fit the component into a hole provided at the target position, wherein the camera is arranged such that a visual line direction of the camera is parallel to an axis of the component gripped by the tool.
10. The device of claim 2, wherein the processor is further configured to correct a position of the movement machine such that the working position is to be arranged at the target position at the first time point when the processor executes the work program, based on the deviation amount acquired by the processor.
11. The device of claim 2, wherein the camera further images the target position at a second time before or after the first time point, wherein the processor further acquires a second deviation amount between the working position and the target position at the second time point, based on a position of the target position in second image data imaged by the camera at the second time point and on information indicating a position of the working position in the second image data.
12. The device of claim 2, wherein the processor is configured to: obtain a difference between the target position and the working position in a camera coordinate system using coordinates of the target position and the working position in the camera coordinate system, the camera coordinate system defining coordinates of the image data; and acquire the deviation amount in a control coordinate system set for the tool or the movement machine, using the difference and a known positional relationship between the control coordinate system and the camera coordinate system.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
DETAILED DESCRIPTION
(23) Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. Note that, in the various embodiments described below, similar elements are denoted by the same reference numerals, and redundant description thereof will be omitted. Referring first to
(24) The control device 12 is a computer including a processor (CPU, GPU, etc.) 18 and a storage (ROM, RAM, etc.) 20, and controls the movement machine 14, the tool 16, and the camera 17. The processor 18 is communicatively connected to the storage 20 via a bus 19, and executes various processes while communicating with the storage 20.
(25) As illustrated in
(26) The upper arm 28 is rotatably provided at a distal end of the lower arm 26. The wrist 30 is rotatably provided at a distal end of the upper arm 28. A plurality of servo motors 31 (
(27) The tool 16 is attached to the wrist 30. In the present embodiment, the tool 16 is a spot-welding gun. Specifically, as illustrated in
(28) The base 32 is coupled to the wrist 30. The fixed arm 34 is fixed to the base 32 at its proximal end 40, and the fixed electrode 44 is fixed to a distal end 42 of the fixed arm 34. In the present embodiment, the fixed arm 34 extends from the proximal end 40 to the distal end 42 in a substantially L-shaped curve.
(29) The movable arm 36 is provided at the base 32 so as to be movable along an axis A (so-called gun-axis). In the present embodiment, the movable arm 36 is a rod-like member extending linearly, wherein an upper end (not illustrated) of the movable arm 36 is mechanically connected to an output shaft (not illustrated) of the servo motor 38 via a motion converting mechanism 48, and the movable electrode 46 is fixed to a lower end of the movable arm 36.
(30) The motion converting mechanism 48 includes e.g. a ball screw mechanism, or a mechanism comprised of a timing belt and a pulley, and converts the rotational motion of the output shaft of the servo motor 38 into a reciprocating motion along the axis A. The movable arm 36 is reciprocated along the axis A by the servo motor 38 via the motion converting mechanism 48.
(31) The fixed electrode 44 and the movable electrode 46 are arranged so as to align on the axis A. As the servo motor 38 moves the movable arm 36, the movable electrode 46 is moved along the axis A toward and away from the fixed electrode 44. The fixed electrode 44 and the movable electrode 46 are energized in response to a command from the processor 18. Thus, the workpiece held between the fixed electrode 44 and the movable electrode 46 can be spot-welded.
(32) As illustrated in
(33) On the other hand, a tool coordinate system C.sub.T is set for the tool 16 as illustrated in
(34) The processor 18 operates each movable element of the movement machine 14 in the movement machine coordinate system C.sub.M such that the position of the tool 16 coincides with the position defined by the tool coordinate system C.sub.T. In this way, the tool 16 is moved by the movement machine 14 and positioned at any desired position in the movement machine coordinate system C.sub.M.
(35) A camera 17 includes an imaging sensor such as a CCD or CMOS, and an optical system such as a focus lens. The camera 17 is arranged in a predetermined positional relationship with the tool 16. In the present embodiment, as illustrated in
(36) The camera 17 images an object along the visual line direction D thereof, and supplies the captured image data to the control device 12. A camera coordinate system C.sub.c is set for the camera 17. The camera coordinate system C.sub.c is a coordinate system that defines coordinates of each pixel of the image data imaged by the camera 17, and therefore each pixel of the image data is expressed as the coordinates in the camera coordinate system C.sub.c.
(37) Next, the work performed by the tool 16 will be described with reference to
(38) Specifically, the processor 18 sets the tool coordinate system C.sub.T such that its origin is arranged at the n-th teaching point C.sub.n, and its z-axis passes through the n-th target position B.sub.n. Then, the processor 18 operates the movement machine 14 such that the position of the tool 16 coincides with the position defined by the set tool coordinate system C.sub.T.
(39) Thus, the processor 18 positions the tool 16 at the n-th teaching point C.sub.n. When the tool 16 is positioned at the n-th teaching point C.sub.n, the n-th target position B.sub.n is arranged between the movable electrode 46 and the fixed electrode 44. Note that the n-th teaching point C.sub.n may coincide with the n-th target position B.sub.n, or may be separated away from the n-th target position B.sub.n in a predetermined direction (e.g., the z-axis negative direction of the tool coordinate system C.sub.T).
(40) Along with arranging the tool 16 at the n-th teaching point C.sub.n, the processor 18 drives the servo motor 38 of the tool 16 to move the movable electrode 46 toward the fixed electrode 44, thereby holding the n-th target position B.sub.n of the workpiece W between the movable electrode 46 and the fixed electrode 44. Note that the processor 18 may start the operation to move the movable electrode 46 toward the fixed electrode 44 when the tool 16 is positioned at the n-th teaching point C.sub.n.
(41) Alternatively, the processor 18 may start the operation to move the movable electrode 46 toward the fixed electrode 44 while moving the tool 16 to the n-th teaching point C.sub.n. When the n-th target position B.sub.n of the workpiece W is held between the movable electrode 46 and the fixed electrode 44, the processor 18 energizes the movable electrode 46 and the fixed electrode 44, whereby performing the spot-welding on the n-th target position B.sub.n. The processor 18 repeatedly performs the spot-welding work for all the target positions B.sub.n.
(42) The processor 18 carries out a series of operations for such a spot-welding work in accordance with a work program. This work program is constructed by e.g. teaching the movement machine 14 the operation to position the tool 16 to the n-th teaching point C.sub.n, and pre-stored in the storage 20. The work program includes e.g. position information of the n-th teaching point C.sub.n (coordinates in the movement machine coordinate system C.sub.M), a positioning command for positioning the tool 16 at the n-th teaching point C.sub.n, and a welding start command for causing the movable electrode 46 and the fixed electrode 44 to perform the spot-welding.
(43) When the processor 18 carries out the operation to hold the n-th target position B.sub.n between the movable electrode 46 and the fixed electrode 44 in accordance with the work program, a working position where the movable electrode 46 and the fixed electrode 44 actually contact the workpiece W may deviate from the n-th target position B.sub.n. Such a deviation is caused by a minute vibration generated in the tool 16 by acceleration or deceleration when the tool 16 is moved by the movement machine 14, for example.
(44) In the present embodiment, the processor 18 acquires a deviation amount of the working position of the tool 16 with respect to the n-th target position B.sub.n. Hereinafter, the operation to acquire the deviation amount in the machine system 10 will be described. As a preparatory stage for the operation to acquire the deviation amount, the operator marks each of the n-th target positions B.sub.n of the workpiece W.
(45) This mark is e.g. an engraved mark, seal, or paint provided on the workpiece W, and is for making the n-th target position B.sub.n be visually depicted in an image imaged by the camera 17. Note that, when a visible feature (a corner, a recess, or the like) is present on the n-th target position B.sub.n, the mark may be omitted.
(46) After the workpiece W is set at a predetermined position relative to the movement machine 14, the processor 18 operates the movement machine 14 in accordance with the work program so as to move the tool 16 toward the n-th teaching point C.sub.n. Then, the processor 18 causes the camera 17 to image the n-th target position B.sub.n at a time point ?.sub.n when the processor 18 causes the tool 16 to perform the operation for the spot-welding work on the n-th target position B.sub.n.
(47) As an example, the time point ?.sub.n for imaging by the camera 17 is set to a time point when causing the movable electrode 46 and the fixed electrode 44 of the tool 16 to contact the workpiece W. The time point when the movable electrode 46 and the fixed electrode 44 contact the workpiece W can be predicted. Specifically, the processor 18 receives a welding start command from the work program and transmits to the servo motor 38 a command for moving the movable electrode 46 toward the fixed electrode 44.
(48) A time ?.sub.x from the time when the processor 18 transmits the command to the servo motor 38 to the time when the servo motor 38 moves the movable electrode 46 and holds the workpiece W between the movable electrode 46 and the fixed electrode 44 can be predicted from e.g. the acceleration and deceleration characteristics of the servo motor 38. Therefore, the time point ?.sub.n when the movable electrode 46 and the fixed electrode 44 contact the workpiece W can be determined as a time point when the time ?.sub.x elapses from the time point when the processor 18 transmits the command to the servo motor 38.
(49) As another example, the time point ?.sub.n for imaging by the camera 17 may be set to a time point when the processor 18 receives the welding start command from the work program and transmits the command for moving the movable electrode 46 to the servo motor 38. As yet another example, the time point ?.sub.n for imaging by the camera 17 can be set to a time point when causing the movable electrode 46 and the fixed electrode 44, which hold the workpiece W therebetween, to be energized. For example, the time point for energizing is a time point when the processor 18 transmits a voltage supply command to a voltage source (not illustrated) which supplies voltage to the movable electrode 46 and the fixed electrode 44 (or, a time point when a predetermined time elapses from the time point at which the processor 18 transmits the voltage supply command to the voltage source). The time point ?.sub.n for imaging by the camera 17 is determined by an operator.
(50) In the present embodiment, the processor 18 does not actually move the movable electrode 46 toward the fixed electrode 44 at this time point ?.sub.n. For example, the processor 18 may be configured to recognize only the timing of transmitting a command for moving the movable electrode 46, instead of actually transmitting the command to the servo motor 38. Alternatively, the processor 18 may transmit a pseudo-command to the servo motor 38 that does not actually operate the servo motor 38.
(51)
(52) As described above, in the present embodiment, the camera 17 is arranged such that the visual line direction D thereof coincides with the axis A. In this case, the fixed electrode 44 (or the origin of the tool coordinate system C.sub.T) is disposed at the center of the image data 60. Therefore, in the image data 60, a center point (central pixel) F.sub.n can be regarded as the working position where the movable electrode 46 and the fixed electrode 44 contact the workpiece W and holds it therebetween when the movable electrode 46 is moved to the fixed electrode 44 during the actual spot-welding work.
(53) The storage 20 pre-stores the coordinates of the center point F.sub.n in the camera coordinate system C.sub.c as information indicating the position of the working position in the image data 60. In the image data 60, the n-th target position B.sub.n deviates from the center point (i.e., the working position of the tool 16) F by a difference x.sub.c in the x-axis positive direction and a difference y.sub.c in the y-axis positive direction of the camera coordinate system C.sub.c. In other words, in the image data 60, the n-th target position B.sub.n deviates from the working position F.sub.n by a difference E.sub.c (|E.sub.c|=(x.sub.c.sup.2+y.sub.c.sup.2).sup.1/2). These differences x.sub.c, y.sub.c and E.sub.c are vectors.
(54) The processor 18 analyzes the image data 60 received from the camera 17, and acquires the coordinates in the camera coordinate system C.sub.c of one pixel that depicts the n-th target position B.sub.n (e.g., one pixel at the center of the image area of the n-th target position B.sub.n). The processor 18 obtains the differences x.sub.c and y.sub.c (or E.sub.c) in the camera coordinate system C.sub.c using the coordinates of the n-th target position B.sub.n and the pre-stored coordinates of the working position (center point) F.sub.n in the camera coordinate system C.sub.c, and acquires a deviation amount between the working position F.sub.n and the n-th target position B.sub.n in the tool coordinate system C.sub.T, using the differences x.sub.c and y.sub.c (or E.sub.c) and the known positional relationship between the tool coordinate system C.sub.T and the camera coordinate system C.sub.c.
(55) Since the camera 17 and the tool 16 are arranged in the known positional relationship with each other, each parameter of a first conversion matrix (e.g., a homogeneous conversion matrix) that represents the positional relationship between the tool coordinate system C.sub.T and the camera coordinate system C.sub.c can be determined by calibrating the tool coordinate system C.sub.T and the camera coordinate system C.sub.c with respect to each other. By this calibration, the coordinates in the tool coordinate system C.sub.T and the coordinates in the camera coordinate system C.sub.c can be mutually converted via the first conversion matrix.
(56) The processor 18 converts the differences x.sub.c and y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c into deviation amounts x.sub.T and y.sub.T or a deviation amount E.sub.T in the tool coordinate system C.sub.T using the first conversion matrix. These deviation amounts x.sub.T, y.sub.T and E.sub.T are vectors. In this way, the processor 18 can acquire the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) between the working position F.sub.n and the n-th target position B.sub.n in the tool coordinate system C.sub.T at the time point ?.sub.n.
(57) As described above, the processor 18 acquires the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) between the working position F.sub.n and the n-th target position B.sub.n at the time point ?.sub.n, based on the position of the n-th target position B.sub.n in the image data 60 and the position of the working position F.sub.n determined in the image data 60. Therefore, in the present embodiment, the processor 18 functions as a deviation amount acquisition section 52.
(58) The thus-acquired deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) are data accurately representing the deviation amount between the target position B.sub.n and the working position F.sub.n at the time point ?.sub.n when causing the tool 16 to perform the operation for the spot-welding work (e.g., command to the servo motor 38, contact of the movable electrode 46 with the workpiece W, and energization to the movable electrode 46 and the fixed electrode 44), not at the time point when the tool 16 is arranged at the n-th teaching point C.sub.n.
(59) Then, the processor 18 corrects the position of the movement machine 14 such that the working position F.sub.n is arranged at the n-th target position B.sub.n at the time point ?.sub.n, based on the acquired deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T). Specifically, in the example illustrated in
(60) In this manner, the processor 18 corrects the position information of the n-th teaching point C.sub.n that has been included in the work program, thereby updating the work program. Therefore, the processor 18 functions as a position correction section 54 (
(61) As described above, in the present embodiment, the deviation amount x.sub.T, Y.sub.T, E.sub.T of the working position F.sub.n of the tool 16 with respect to the n-th target position B.sub.n are acquired by the camera 17 that images the n-th target position B.sub.n at the time point ?.sub.n, and by the deviation amount acquisition section 52 that acquires the deviation amount x.sub.T, y.sub.T, E.sub.T. Therefore, the camera 17 and the deviation amount acquisition section 52 constitute a device 50 (
(62) According to this device 50, it is possible to automatically and accurately obtain, from the image data 60, the deviation amount x.sub.T, y.sub.T, E.sub.T, between the n-th target position B.sub.n on the workpiece W and the working position F.sub.n where the tool 16 is estimated to actually work on the workpiece W, without the operator manually measuring it.
(63) Further, in the present embodiment, the storage 20 constitutes the device 50 and pre-stores the coordinates of the center point F.sub.n in the camera coordinate system C.sub.c as the information indicating the position of the working position F.sub.n in the image data 60. According to this configuration, since it is not necessary to set or detect the position of the working position F.sub.n every time, the deviation amount x.sub.T, y.sub.T, E.sub.T can be quickly acquired by a relatively simple algorithm.
(64) Further, in the present embodiment, the position correction section 54 constitutes the device 50 and corrects the position (n-th teaching point C.sub.n) of the movement machine 14 based on the acquired deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T). According to this configuration, when the processor 18 performs a series of operations for the spot-welding work in accordance with the updated work program, it is possible to accurately position the working position F.sub.n (i.e., holding position by the movable electrode 46 and the fixed electrode 44) of the tool 16 at the target position B.sub.n. Further, since it is possible to omit a work by the operator to manually correct the teaching point C.sub.n, the process required for teaching the movement machine 14 can be reduced.
(65) Further, in the present embodiment, the processor 18 functions as the deviation amount acquisition section 52 to obtain the differences x.sub.c and y.sub.c (or difference E.sub.c) in the camera coordinate system C.sub.c and acquire the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) in the tool coordinate system C.sub.T using the differences x.sub.c and y.sub.c (or difference E.sub.c) and the known positional relationship (specifically, the first conversion matrix) between the tool coordinate system C.sub.T and the camera coordinate system C.sub.c (specifically, the first conversion matrix). According to this configuration, the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) in the control coordinate system can be accurately acquired from the image data 60.
(66) Further, in the present embodiment, the camera 17 is disposed at the position on the movable electrode 46 such that the visual line direction D thereof coincides with the axis A (i.e., the z-axis of the tool coordinate system). In this case, the working position F.sub.n of the tool 16 is arranged at the center point F.sub.n of the image data 60 imaged by the camera 17.
(67) According to this configuration, when the operator view the image data 60, the operator can intuitively recognize the magnitude and direction of the deviation of the working position F.sub.n from the n-th target position B.sub.n. Further, when calibrating the tool coordinate system C.sub.T and the camera coordinate system C.sub.c, only the parameter of the visual line direction D (z-axis of the tool coordinate system) needs to be considered, so the calibration work can be simplified.
(68) However, the installation position of the camera 17 is not limited to that in the embodiment illustrated in
(69) Specifically, the camera 17 is fixed with respect to the tool 16 such that the visual line direction D thereof is parallel to the axis A and offset by a predetermined distance from the axis A, and that the fixed electrode 44 is included in a field of view of the camera 17.
(70) In the image data 64 illustrated in
(71) The position of the working position F.sub.n in the image data 64 at this time is determined in response to the positional relationship between the camera 17 (specifically, the visual line direction D) and the tool 16 (specifically, the fixed electrode 44, or the origin of the tool coordinate system C.sub.T). The storage 20 pre-stores therein the coordinates of the working position F.sub.n in the camera coordinate system C.sub.c as information indicating the position of the working position F.sub.n in the image data 64.
(72) The processor 18 analyzes the image data 64 imaged by the camera 17, acquires coordinates in the camera coordinate system C.sub.c of one pixel that depicts the n-th target position B.sub.n, and obtains the differences x.sub.c and y.sub.c (or difference E.sub.c) in the camera coordinate system C.sub.c, using the acquired coordinates and pre-stored coordinates of the working position F.sub.n.
(73) Since the camera 17 and the tool 16 illustrated in
(74) The processor 18 converts the differences x.sub.c and y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c into the deviation amounts x.sub.T and y.sub.T or the deviation amount E.sub.T in the tool coordinate system C.sub.T using the second conversion matrix. Thus, the processor 18 can acquire the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) between the working position F.sub.n and the n-th target position B.sub.n at the time point ?.sub.n.
(75)
(76) The position of the working position F.sub.n (or the origin of the tool coordinate system C.sub.T) in an image data 66 illustrated in
(77) The processor 18 analyzes the image data 66 imaged by the camera 17, acquires coordinates in the camera coordinate system C.sub.c of one pixel that depicts the n-th target position B.sub.n, and obtains the differences x.sub.c and y.sub.c (or difference E.sub.4) in the camera coordinate system C.sub.c, using the acquired coordinates and the pre-stored coordinates of the working position F.sub.n.
(78) Since the camera 17 and the tool 16 illustrated in
(79) The processor 18 converts the differences x.sub.c and y.sub.c or difference E.sub.c in the camera coordinate system C.sub.c into the deviation amounts x.sub.T and y.sub.T or the deviation amount E.sub.T in the tool coordinate system C.sub.T, using the third conversion matrix. Thus, the processor 18 can acquire the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) between the working position F.sub.n and the n-th target position B.sub.n at the time point ?.sub.n.
(80) Next, a machine system 70 according to another embodiment will be described with reference to
(81) The light irradiation device 72 is e.g. a laser pointer, and outputs light (e.g., laser beam) traveling straight along an optical axis O. The light irradiation device 72 is disposed at a position on the movable electrode 46 such that the optical axis O of the light irradiation device 72 coincides with the axis A (or the z-axis of the tool coordinate system C.sub.T). In the state illustrated in
(82) Next, an operation of acquiring the deviation amount x.sub.T, y.sub.T, E.sub.T in the machine system 70 will be described. The processor 18 operates the movement machine 14 in accordance with the work program so as to move the tool 16 to the n-th teaching point C.sub.n, and causes the camera 17 to image the n-th target position B.sub.n, which is visible by a mark or the like, at the time point ?.sub.n when causing the tool 16 to perform the operation for the spot-welding work.
(83) In the present embodiment, the processor 18 operates the light irradiation device 72 so as to output light before imaging the n-th target position B.sub.n with the camera 17.
(84) Since the optical axis O of the light irradiation device 72 is arranged so as to coincide with the axis A (z-axis of the tool coordinate system C.sub.T), the position of the light 86 in the image data 84 can be regarded as indicating the working position F.sub.n where the movable electrode 46 and the fixed electrode 44 contact the workpiece W and hold the workpiece W therebetween during the actual spot-welding work.
(85) The processor 18 acquires the coordinates in the camera coordinate system C.sub.c of one pixel that depicts the light 86 (e.g., a pixel at the center of the image region of light 86) in the image data 84, and stores the coordinates in the storage 20 as information indicating the position of the working position F.sub.n in the image data 84. Further, the processor 18 analyzes the image data 84 imaged by the camera 17, and acquires the coordinates in the camera coordinate system C.sub.c of the one pixel that depicts the n-th target position B.sub.n. Then, the processor 18 obtains the differences x.sub.c and y.sub.c (or difference E.sub.c) in the camera coordinate system C.sub.c using the coordinates of the working position F.sub.n acquired from the light 86 depicted on the image data 84 and the coordinates of the n-th target position B.sub.n.
(86) Then, the processor 18 converts the differences x.sub.c and y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c into the deviation amounts x.sub.T and y.sub.T or the deviation amount E.sub.T in the tool coordinate system C.sub.T, using the second conversion matrix representing the positional relationship between the tool coordinate system C.sub.T and the camera coordinate system C.sub.c in
(87) In the present embodiment, the camera 17, the storage 20, the deviation amount acquisition section 52, the position correction section 54, and the light irradiation device 72 constitute a device 80 (
(88) According to the present embodiment, it is not necessary to prepare in advance the information indicating the position of the working position F.sub.n, in the image data 84. Instead, the information indicating the position of the working position F.sub.n in the image data 84 (i.e., the coordinates in the camera coordinate system C.sub.c of the pixel depicting the light 86 in the image data 84) can be automatically acquired from the light 86 depicted in the image data 84.
(89) Note that, in the above-described embodiments, the camera 17 may further image the n-th target position B.sub.n at a time point ?.sub.n?t which is before the time point ?.sub.n by time t, or at a time point ?.sub.n+t which is after the time point ?.sub.n by time t. In other words, the camera 17 may continuously images (i.e., capture moving image of) the n-th target position B.sub.n at a plurality of time points ?.sub.n?t, ?.sub.n, ?.sub.n+t, which are consecutive in time series with a period t and which includes the time point ?.sub.n. The period t of continuous shooting can be determined depending on the optical specifications of the camera 17.
(90) Hereinafter, a case will be described where the camera 17 in the embodiment illustrated in
(91) As illustrated in
(92) The processor 18 acquires the differences x.sub.c and y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c by the above-described method, and converts the differences x.sub.c and y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c into deviation amounts x.sub.T and y.sub.T or a deviation amount E.sub.T in the tool coordinate system C.sub.T using the first conversion matrix. Thus, the processor 18 can acquire the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) between the working position F.sub.n and the n-th target position B.sub.n at the time point ?.sub.n?t.
(93) On the other hand, as illustrated in
(94) The processor 18 acquires the differences x.sub.cand y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c by the above-described method, and converts the differences x.sub.c and y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c into deviation amounts x.sub.T and y.sub.T or deviation amount E.sub.T in the tool coordinate system C.sub.T. Thus, the processor 18 can acquire the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) between the working position F.sub.n and the n-th target position B.sub.n at the time point ?.sub.n+t. In this way, the deviation amount can differ at the plurality of different time points ?.sub.n?t, ?.sub.n, and ?.sub.n+t. In the present embodiment, the processor 18 acquires the deviation amounts at the plurality of different time points ?.sub.n?t, ?.sub.n, and ?.sub.n+t, respectively.
(95) Here, variations (or error) may occur in the actual dimensions (e.g., thickness) of the workpieces W to be worked. When the dimensions of the workpieces W vary from each other, the time point when the movable electrode 46 and the fixed electrode 44 contact and hold the workpiece W therebetween during the actual spot-welding work may also vary depending on the dimension of the workpiece W.
(96) For example, assume that a nominal dimension of the thickness of the workpiece W is a.sub.0, the dimensional tolerance is ?0.1, and the time point ?.sub.n is set as a time when the movable electrode 46 and the fixed electrode 44 contact the workpiece W having the nominal dimension a.sub.0. In this case, if the workpiece W whose actual dimension is a.sub.0+0.1 (i.e., thicker than the nominal thickness dimension a.sub.0) is held between the movable electrode 46 and the fixed electrode 44, the time point when the movable electrode 46 and the fixed electrode 44 contact this workpiece W is earlier than the time point ?.sub.n.
(97) On the other hand, if the workpiece W whose actual thickness dimension is a.sub.0?0.1 (i.e., thinner than the nominal thickness dimension a) is held between the movable electrode 46 and the fixed electrode 44, the time point when the movable electrode 46 and the fixed electrode 44 contact the workpiece W is later than the time point ?.sub.n. Therefore, if the actual thickness dimension of the workpiece W is thinner or thicker than the nominal thickness dimension a.sub.0, even if the n-th target position B.sub.n is imaged at the time point ?.sub.n, the n-th target position B.sub.n in the image data at this time may not accurately indicate the actual working position at the time point when the movable electrode 46 and the fixed electrode 44 contact the workpiece W.
(98) In the present embodiment, the camera 17 continuously images (captures moving image of) the n-th target position B.sub.n at the plurality of different time points ?.sub.n?t, ?.sub.n, and ?.sub.n+t, and the processor 18 acquires the deviation amounts x.sub.T and Y.sub.T (or deviation amount E.sub.T), x.sub.T and y.sub.T (or E.sub.T), and x.sub.T and y.sub.T (or E.sub.T), respectively, for each of the acquired image data 60, 90 and 92.
(99) For example, if the time point ?.sub.n?t corresponds to the time point when the movable electrode 46 and the fixed electrode 44 contact the workpiece W having the dimension of a.sub.0+0.1 while the time point ?.sub.n+t corresponds to the time point when the movable electrode 46 and the fixed electrode 44 contact the workpiece W having the dimension of a.sub.0?0.1, the processor 18 can acquire the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) for the workpiece W having the nominal dimension a.sub.0, and the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) and the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) for the workpiece W having the dimension of the nominal dimension a.sub.0?tolerance.
(100) In this way, by acquiring the deviation amounts from the image data 60, 90, and 92 imaged at a plurality of time points ?.sub.n?t, ?.sub.n, and ?.sub.n+t, it is possible to obtain the deviation amounts corresponding to the variation in the dimension of the workpiece W. As an example, the processor 18 may generate an image indicating following Table 1 and display it on a display (not illustrated) provided at the control device 12.
(101) TABLE-US-00001 TABLE 1 Nominal Nominal dimension ? Nominal dimension + Thickness tolerance dimension tolerance Deviation x.sub.T, y.sub.T x.sub.T, y.sub.T x.sub.T, y.sub.T amount (E.sub.T) (E.sub.T) (E.sub.T)
(102) With reference to Table 1, the operator can statistically analyze the deviation amount of the working position F.sub.n of the tool 16 with respect to the n-th target position B.sub.n in consideration of the dimensional tolerance. Note that, in the present embodiment, the camera 17 images the n-th target position B.sub.n at three time points ?.sub.n?t, ?.sub.n, and ?.sub.n+t, but the camera 17 may continuously image the n-th target position B.sub.n at more than three time points that includes the time point ?.sub.n corresponding to the workpiece W with the nominal dimension a.sub.0. Due to this, the deviation amount can be analyzed in more detail.
(103) In the above embodiments, the tool 16 is a spot-welding gun, but the tool is not limited thereto. Hereinafter, with reference to
(104) The processor 18 transmits a laser oscillation command to a laser oscillator (not illustrated) provided outside the tool 96, and the laser oscillator supplies a laser beam to the tool 96 through a light guide path such as an optical fiber. The tool 96 emits the laser beam from an emission port 96a along the optical axis P to perform the laser machining (laser cutting, laser welding, etc.) on the workpiece W by the emitted laser beam. The tool coordinate system C.sub.T is set for the tool 96. In the present embodiment, the tool coordinate system C.sub.T is set for the tool 96 such that the origin thereof is arranged at the center of the emission port 96a and the z-axis thereof coincides with (or parallel with) the optical axis P.
(105) The processor 18 performs the laser machining work on each of the n-th target positions B.sub.n (n=1, 2, . . . ) on the workpiece W illustrated in
(106) Then, the processor 18 transmits the laser oscillation command to the laser oscillator for causing the tool 96 to emit the laser beam, and performs the laser machining on the workpiece W at the working position F.sub.n by the laser beam. That is, the working position F.sub.n in this embodiment is a position where the tool 96 irradiates the workpiece W with the laser beam (or the intersection of the optical axis P and the surface of the workpiece W).
(107) The processor 18 repeatedly performs such a laser machining work for all the target positions B.sub.n. The processor 18 performs a series of operations for such laser machining work in accordance with a work program. The work program is pre-stored in the storage 20. The work program includes e.g. position information of the n-th teaching point C.sub.n, a positioning command for positioning the tool 96 to the n-th teaching point C.sub.n, and a laser oscillation command to the laser oscillator.
(108) When the processor 18 arranges the tool 96 at the n-th teaching point C.sub.n in accordance with the work program and performs the operation to output the laser beam from the tool 96, the working position F.sub.n, at which the laser beam is actually irradiated on the workpiece W, can deviate from the n-th target position B.sub.n. Therefore, the device 50 acquires the deviation amount of the working position F.sub.n of the tool 96 with respect to the n-th target position B.sub.n, similar as in the above-described embodiment.
(109) As illustrated in
(110) When acquiring the deviation amount, the processor 18 operates the movement machine 14 in accordance with the work program so as to move the tool 96 toward the n-th teaching point C.sub.n. Then, the processor 18 transmits a command to the camera 17 to image the n-th target position B.sub.n at a time point ?.sub.n when causing the tool 96 to perform the operation for the laser machining work on the n-th target position B.sub.n.
(111) As an example, the time point ?.sub.n in the present embodiment may be set to a time point when the processor 18 transmits the laser oscillation command to the laser oscillator. As another example, the time point ?.sub.n may be set to a time point when the laser beam is actually emitted from the tool 96. In this respect, a time ?.sub.y from the time point when the processor 18 transmits the laser oscillation command to the laser oscillator to a time point when the tool 96 actually emits the laser beam can be predicted from e.g. the specification of the laser oscillator. Therefore, the time point ?.sub.n when the laser beam is actually emitted from the tool 96 can be determined as a time point when the time ?.sub.y elapses from the time point when the laser oscillation command is transmitted to the laser oscillator.
(112) Thus, the camera 17 captures the image data 60 depicting the n-th target position B.sub.n at the time point ?.sub.n as illustrated in
(113) Note that, in the embodiment illustrated in
(114) Alternatively, in the embodiment illustrated in
(115) Referring now to
(116) The tool 98 is attach to the wrist 30 of the movement machine 14, instead of the tool 16 described above. Specifically, the tool 98 includes a hand base 100 coupled to the wrist 30, a plurality of fingers 102 provided at the hand base 100 so as to open and close, and a driver 104 configured to drive the plurality of fingers 102 to open and close. The driver 104 is e.g. an air cylinder or a motor, and can grip and release an object by opening and closing the finger 102.
(117) The tool coordinate system C.sub.T is set for the tool 98. In the present embodiment, the tool coordinate system C.sub.T is set for the tool 98 such that the origin thereof is arranged at the gripping position of the fingers 102 (alternatively, a position between the fingers 102) and the z-axis thereof is orthogonal to the opening and closing direction of the fingers 102.
(118) Next, the fitting work performed by the tool 98 will be described with reference to
(119) The processor 18 then operates movement machine 14 so as to position the tool 98 at the n-th teaching point C.sub.n for performing the fitting work to fit the gripped n-th component I.sub.n into the n-th hole H.sub.n. Specifically, the processor 18 sets the tool coordinate system C.sub.T such that the origin thereof is arranged at the n-th teaching point C.sub.n and the z-axis thereof (i.e., axis Q) substantially coincides with the axis R.sub.n of the n-th hole H.sub.n.
(120) Then, the processor 18 operates the movement machine 14 such that the position of the tool 98 coincides with that defined by the set tool coordinate system C.sub.T. As a result, the tool 98 and the n-th component I.sub.n gripped by the tool 98 are arranged with respect to the workpiece W as illustrated in
(121) The processor 18 repeatedly performs such a fitting work to fit the plurality of components I.sub.n into the plurality of holes B.sub.n, respectively. The processor 18 performs a series of operations for the fitting work in accordance with a work program. The work program includes e.g. position information of the n-th teaching point C.sub.n, a positioning command for positioning the tool 98 to the n-th teaching point C.sub.n, and the fitting start command, etc.
(122) When the processor 18 performs the fitting work to fit the n-th component I.sub.n into the n-th hole H.sub.n in accordance with the work program, the working position where the n-th component I.sub.n engages with the workpiece W can deviate from the n-th hole H.sub.n (i.e., the n-th target position B.sub.n). Therefore, in the present embodiment, the device 50 acquires the deviation amount of the working position of the tool 98 with respect to the n-th target position B.sub.n, similar as the above-described embodiments.
(123) As illustrated in
(124) When acquiring the deviation amount, the processor 18 operates the movement machine 14 in accordance with the work program so as to move the tool 98 toward the n-th teaching point C.sub.n. Then, the processor 18 transmits a command to the camera 17 to image the n-th target position B.sub.n at a time point ?.sub.n when causing the tool 98 to perform an operation for the fitting work on the n-th target position B.sub.n (n-th hole H.sub.n).
(125) As an example, the time point ?.sub.n in the present embodiment may be set to a time point when the processor 18 transmits the fitting start command to the movement machine 14. As another example, the time point ?.sub.n may be set to a time point when the n-th component I.sub.N gripped by the tool 98 engages with the workpiece W (alternatively, a distal end of the n-th component I.sub.n reaches the surface of the workpiece W).
(126) In this respect, a time ?.sub.z from the time point when the processor 18 transmits the fitting start command to the time point when the n-th component I.sub.n gripped by the tool 98 engages with the workpiece W can be predicted from the acceleration and deceleration characteristics of the servo motor 31 of the movement machine 14, for example. Therefore, the time point ?.sub.n when the n-th component I.sub.n gripped by the tool 98 engages with the workpiece W can be determined as a time point when the time ?.sub.z elapses from the time point when the fitting start command is transmitted.
(127) Thus, the camera 17 images the n-th target position B.sub.n (n-th hole H.sub.n) at the time point ?.sub.n.
(128) Further, in the present embodiment, since the camera 17 is arranged in a positional relationship with the tool 98 in which the visual line direction D thereof coincides with the axis Q (z-axis of the tool coordinate system), the center point (central pixel) F.sub.n of the imaged image data 106 can be regarded as the working position F.sub.n where the n-th component I.sub.n engages with the workpiece W during the actual fitting work.
(129) The processor 18 functions as the deviation amount acquisition section 52 to acquire the differences x.sub.c and y.sub.c (or difference E), using the coordinates of the n-th target position B.sub.n and the working position F.sub.n in the camera coordinate system C.sub.c, and acquire the deviation amounts x.sub.T and y.sub.T (or deviation amount E.sub.T) from the image data 106, similar as in the embodiment illustrated in
(130) Note that, in the embodiment illustrated in
(131) Alternatively, in the embodiment illustrated in
(132) In the above embodiments, the control device 12 controls the movement machine 14 and the tool 16, 96 or 98. However, the control device 12 controls the movement machine 14, while the tool 16, 96 or 98 may be controlled by a control device other than the control device 12. Such an embodiment is illustrated in
(133) A machine system 110 illustrated in
(134) Note that, the deviation amount acquisition section 52 may be provided separately from the control device 12 or 112. Such an embodiment is illustrated in
(135) In the above embodiments, the processor 18 converts the differences x.sub.c and y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c into the deviation amounts x.sub.T and y.sub.T or the deviation amount E.sub.T in the tool coordinate system C.sub.T. However, the processor 18 may convert the differences x.sub.c and y.sub.c or the difference E.sub.c in the camera coordinate system C.sub.c into the movement machine coordinate system C.sub.M (or the world coordinate system).
(136) For example, after calculating the deviation amount in the tool coordinate system C.sub.T, the processor 18 may convert the deviation amount in the tool coordinate system C.sub.T into the movement machine coordinate system C.sub.M (or the world coordinate system). Alternatively, the operator may calibrate the camera coordinate system C.sub.c and the movement machine coordinate system C.sub.M (or the world coordinate system) in advance, and the processor 18 may convert the differences x.sub.c, y.sub.c, E.sub.c in the camera coordinate system C.sub.c to the movement machine coordinate system C.sub.M (or the world coordinate system), thereby acquiring a deviation amount in the movement machine coordinate system C.sub.M (or the world coordinate system).
(137) The position of the tool coordinate system C.sub.T with respect to the tool 16, 96 or 98 is not limited to the above-described embodiments, but may be arranged at any desired position. Further, in the embodiment illustrated in