Spot welding system, method and computer program capable of making pressurizing force applied to object to be pressed to be constant
09999937 ยท 2018-06-19
Assignee
Inventors
Cpc classification
B23K11/314
PERFORMING OPERATIONS; TRANSPORTING
B23K11/115
PERFORMING OPERATIONS; TRANSPORTING
B23K11/311
PERFORMING OPERATIONS; TRANSPORTING
B23K11/317
PERFORMING OPERATIONS; TRANSPORTING
International classification
B23K11/31
PERFORMING OPERATIONS; TRANSPORTING
Abstract
A spot welding system 10 includes a spot welding gun having an opposite electrode 44, a movable electrode 48, and a drive part 52, a position detection part 54 that detects a position of the movable electrode 48, and a pressure change calculation part that calculates an amount of change between first pressurizing force at a first attitude and second pressurizing force at a second attitude based on a first position of the movable electrode 48 when the drive part 52 has been driven by a first pressurizing force command at the first attitude, a second position of the movable electrode 48 when the drive part 52 has been driven by the first pressurizing force command at the second attitude, and the first pressurizing force command. The first pressurizing force command and the first pressurizing force coincide with each other.
Claims
1. A spot welding system, comprising: a spot welding gun including: an opposite electrode, a movable electrode movable relative to the opposite electrode, and a drive part configured to drive the movable electrode; a position detection part configured to detect a position of the movable electrode; and a controller, wherein, based on a first position of the movable electrode detected when the drive part is driven in accordance with a first pressurizing force command so as to pressurize an object to be pressed by the movable electrode in a state where the spot welding gun is arranged at a predetermined first attitude, a second position of the movable electrode detected when the drive part is driven in accordance with the first pressurizing force command so as to pressurize the object by the movable electrode in a state where the spot welding gun is arranged at a second attitude different from the first attitude, and the first pressurizing force command, the controller is configured to calculate an amount of change between (i) a first pressurizing force which, during calibration, is applied to the object from the movable electrode at the first attitude when the drive part is driven in accordance with the first pressurizing force command, and (ii) a second pressurizing force applied to the object from the movable electrode at the second attitude when the drive part is driven in accordance with the first pressurizing force command, wherein the controller is configured to store data including the calculated amount of change, and wherein, when welding a workpiece with the spot welding gun at an arbitrary attitude, the controller is configured to drive the drive part based on the stored data corresponding to the arbitrary attitude.
2. The spot welding system according to claim 1, wherein the drive part includes a servomotor, and the controller is configured to determine, during said calibration in advance, a correlation between the first pressurizing force and a feedback value from the servomotor when the servomotor is driven in accordance with the first pressurizing force command at the first attitude so as to pressurize the object by the movable electrode.
3. The spot welding system according to claim 1, wherein the controller is configured to calculate the amount of change by using a relationship in which a ratio of the second position to the first position is equal to a ratio of the second pressurizing force to the first pressurizing force.
4. The spot welding system according to claim 1, wherein the controller is configured to calculate the amount of change based on a third position detected when the drive part is driven in accordance with a third pressurizing force command so as to pressurize the object by the movable electrode in a state where the spot welding gun is arranged at the first attitude, and the third pressurizing force command.
5. The spot welding system according to claim 4, wherein the controller is configured to calculate the amount of change by using a relationship in which a ratio of a difference between the second position and the third position to a difference between the first position and the third position is equal to a ratio of a difference between the second pressurizing force and the third pressurizing force command to a difference between the first pressurizing force and the third pressurizing force command.
6. The spot welding system according to claim 1, wherein the spot welding gun further includes: a first arm which supports the opposite electrode; and a second arm which supports the movable electrode and which is movable relative to the first arm, and the controller is configured to correct the position detected by the position detection part by multiplying the position by a ratio of a first deformation amount of the first arm to a sum of the first deformation amount and a second deformation amount of the second arm when the opposite electrode is pressurized by the movable electrode with a predetermined force.
7. The spot welding system according to claim 1, wherein the controller is configured to determine a second pressurizing force command for driving the drive part at the second attitude based on the calculated amount of change.
8. The spot welding system according to claim 1, wherein the controller is configured to: control the spot welding gun to be arranged at a plurality of attitudes different from the first attitude; calculate amounts of change between the first pressurizing force and a pressurizing force applied to the opposite electrode from the movable electrode when the drive part is driven in accordance with the first pressurizing force command, for each of the plurality of attitudes; and calculate a correlation between the attitude of the spot welding gun and the amount of change based on the plurality of calculated amounts of change.
9. The spot welding system according to claim 1, wherein the object is the opposite electrode.
10. A method of controlling a spot welding gun including an opposite electrode, a movable electrode movable relative to the opposite electrode, and a drive part for driving the movable electrode, the method comprising: arranging the spot welding gun at a first attitude; detecting a first position of the movable electrode when the drive part is driven in accordance with a first pressurizing force command so as to pressurize an object to be pressed by the movable electrode; arranging the spot welding gun at a second attitude different from the first attitude; detecting a second position of the movable electrode when the drive part is driven in accordance with the first pressurizing force command so as to pressurize the object by the movable electrode; calculating, based on the first position, the second position, and the first pressurizing force command, an amount of change between (i) a first pressurizing force which, during calibration, is applied to the object from the movable electrode at the first attitude when the drive part is driven in accordance with the first pressurizing force command, and (ii) a second pressurizing force applied to the object from the movable electrode at the second attitude when the drive part is driven in accordance with the first pressurizing force command; storing data including the calculated amount of change; and when welding a workpiece with the spot welding gun at an arbitrary attitude, driving the drive part based on the stored data corresponding to the arbitrary attitude.
11. The method according to claim 10, wherein the drive part includes a servomotor, and the method further comprises determining, during said calibrating in advance, a correlation between the first pressurizing force and a feedback value from the servomotor when the servomotor is driven in accordance with the first pressurizing force command so as to pressurize the object by the movable electrode at the first attitude.
12. The method according to claim 11, wherein the amount of change is calculated by using a relationship in which a ratio of the second position to the first position is equal to a ratio of the second pressurizing force to the first pressurizing force, when calculating the amount of change.
13. The method according to claim 11, further comprising: calculating a third position when the drive part is driven in accordance with a third pressurizing force command so as to pressurize the object by the movable electrode, after detecting the first position, wherein the amount of change is calculated based on the third position and the third pressurizing force command, when calculating the amount of change.
14. The method according to claim 13, wherein the amount of change is calculated by using a relationship in which a ratio of a difference between the second position and the third position to a difference between the first position and the third position is equal to a ratio of a difference between the second pressurizing force and the third pressurizing force to a difference between the first pressurizing force and the third pressurizing force, when calculating the amount of change.
15. A non-transitory medium containing a computer program for causing a computer to execute a method of controlling a spot welding gun including an opposite electrode, a movable electrode movable relative to the opposite electrode, and a drive part for driving the movable electrode, the method comprising: arranging the spot welding gun at a first attitude; detecting a first position of the movable electrode when the drive part is driven in accordance with a first pressurizing force command so as to pressurize an object to be pressed by the movable electrode; arranging the spot welding gun at a second attitude different from the first attitude; detecting a second position of the movable electrode when the drive part is driven in accordance with the first pressurizing force command so as to pressurize the object by the movable electrode; calculating, based on the first position, the second position, and the first pressurizing force command, an amount of change between (i) a first pressurizing force which, during calibration, is applied to the object from the movable electrode at the first attitude when the drive part is driven in accordance with the first pressurizing force command, and (ii) a second pressurizing force applied to the object from the movable electrode at the second attitude when the drive part is driven in accordance with the first pressurizing force command; storing data including the calculated amount of change; and when welding a workpiece with the spot welding gun at an arbitrary attitude, driving the drive part based on the stored data corresponding to the arbitrary attitude.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
DESCRIPTION OF EMBODIMENTS
(13) Hereinafter, an embodiment of the invention will be described based on the drawings. With reference to
(14) The robot 12 is e.g. a vertical articulated robot, and includes a base 16 fixed to a floor and a robot arm 18 rotatably connected to the base 16. The spot welding gun 30 according to this embodiment is a so-called C-type spot gun, which is provided at a front end of the robot arm 18 so as to be moved by the robot arm 18.
(15) The robot controller 14 directly or indirectly controls each element of the robot 12 and the spot welding gun 30. The robot controller 14 has a storage 20 therein. The storage 20 is e.g. an electrically erasable and recordable nonvolatile memory, and is configured by EEPROM (a registered trademark), etc.
(16) The storage 20 stores a constant, a variable, a setting value, a program, etc. which are necessary for the operation of the spot welding system 10, such as a robot program used for operating the robot 12.
(17) As illustrated in
(18) The fixed arm 34 is fixed to the base part 32 at its proximal end 40, while supports an opposite electrode 44 at its distal end 42. In this embodiment, the fixed arm 34 extends from the proximal end 40 to the distal end 42 so as to be curved in substantially L-shape.
(19) The movable arm 36 is provided at the base part 32 so as to be movable along a gun axis O. In this embodiment, the movable arm 36 is a rod member which linearly extends so as to be mechanically connected to an output shaft (not illustrated) of the servomotor 38 via a motion conversion mechanism (not illustrated) at its upper end (not illustrated), while support a movable electrode 48 at its lower end 46.
(20) The motion conversion mechanism includes e.g. a ball screw mechanism or a mechanism comprised of a timing belt and pulley, and converts rotary motion of the output shaft of the servomotor 38 into reciprocal motion along the gun axis O.
(21) The movable arm 36 is driven to reciprocate along the gun axis O by the servomotor 38 via the motion conversion mechanism. The opposite electrode 44 and the movable electrode 48 are positioned on the gun axis O.
(22) The opposite electrode 44 and the movable electrode 48 are energized in response to a command from the robot controller 14. In this way, the opposite electrode 44 and the movable electrode 48 spot-welds a workpiece to be welded which is held therebetween.
(23) The movable electrode 48 reciprocates along the gun axis O in directions toward and away from the opposite electrode 44, as the movable arm 36 is driven by the servomotor 38.
(24) The servomotor 38 drives the movable arm 36 via the motion conversion mechanism in response to the command from the robot controller 14 so as to move the movable electrode 48. Thus, the servomotor 38 functions as a drive part 52 (
(25) An encoder 50 is attached to the servomotor 38. The encoder 50 detects a rotational position of the servomotor 38, and transmits it to the robot controller 14. Note that, a Hall element etc. may be applied, instead of the encoder 50.
(26) The robot controller 14 controls the operation of the robot arm 18. The robot controller 14 can change the attitude of the spot welding gun 30 by operating the robot arm 18.
(27) Next, with reference to
(28) The pressurizing force actually applied to the workpiece W from the movable electrode 48 and the opposite electrode 44 at this time may be changed depending on the attitude of the spot welding gun 30. For example, at the attitude of the spot welding gun 30 illustrated in
(29) Note that, z-axis plus direction in
(30) The pressurizing force applied to the workpiece W from the movable electrode 48 at this time becomes a resultant force of a force component F.sub.m generated when a torque of the servomotor 38 is converted to a force along the gun axis O by the motion conversion mechanism and of a gravity component F.sub.g of a movable part including the motion conversion mechanism and the movable electrode 48. Next, assuming that the spot welding gun 30 is rotated about y-axis in
(31) If the force (i.e., the force by which the workpiece W is held between the movable electrode 48 and the opposite electrode 44) applied to the workpiece W from the movable electrode 48 changes depending on the attitude of the spot welding gun 30, the welding quality may be degraded.
(32) The spot welding system 10 according to this embodiment executes a flow illustrated in
(33) Before the flow illustrated in
(34) In particular, a pressure sensor (not illustrated) is arranged between the movable electrode 48 and the opposite electrode 44. Then, the robot controller 14 drives the servomotor 38 in accordance with a predetermined pressurizing force command so as to hold the pressure sensor between the movable electrode 48 and the opposite electrode 44, and then measures the pressurizing force.
(35) On the other hand, the robot controller 14 acquires a feedback value (for example, a load torque, a feedback current, or an estimated disturbance torque which can be estimated from a control model of the servomotor 38) from the servomotor 38 at this time. In this way, the robot controller 14 acquires a correlation between the actual pressurizing force measured by the pressure sensor and the feedback value.
(36) Based on the correlation, the correlation is calibrated so that the pressurizing force command to the servomotor 38 and the pressurizing force applied to the opposite electrode 44 from the movable electrode 48 match with each other at the first attitude. The first attitude is set to the attitude illustrated in
(37) When the calibration is ended, the flow illustrated in
(38) At step S2, the robot controller 14 drives the servomotor 38 in accordance with a first pressurizing force command P.sub.1 so as to pressurize the opposite electrode 44 as an object to be pressed by the movable electrode 48. Specifically, the robot controller 14 sends the first pressurizing force command P.sub.1 to the servomotor 38.
(39) The servomotor 38 moves the movable arm 36 toward the opposite electrode 44 in response to the received first pressurizing force command P.sub.1, thereby press the movable electrode 48 against the opposite electrode 44. When the feedback value from the servomotor 38 reaches a value corresponding to the first pressurizing force command P.sub.1, the robot controller 14 stops the operation of the servomotor 38.
(40) At this time, the movable electrode 48 pressurizes the opposite electrode 44 with a first pressurizing force F.sub.1. As described above, since the pressurizing force command to the servomotor 38 is calibrated so as to match with the pressurizing force applied to the opposite electrode 44 from the movable electrode 48 at the first attitude, the first pressurizing force F.sub.1 can be regarded to match with the first pressurizing force command P.sub.1.
(41) At step S3, the robot controller 14 detects a first position D.sub.1 of the movable electrode 48. In particular, the robot controller 14 acquires a first rotational position R.sub.1 of the servomotor 38 from the encoder 50.
(42) A rotation angle of the servomotor 38 acquired by the encoder 50 and a position of the movable electrode 48 have a correlation according to a pitch feed amount of the motion conversion mechanism. Accordingly, the first position D.sub.1 of the movable electrode 48 can be found from the first rotational position R.sub.1 acquired by the encoder 50. Thus, in this embodiment, the encoder 50 functions as a position detection part 54 (
(43) At step S4, the robot controller 14 changes the attitude of the spot welding gun 30. For example, the robot controller 14 operates the robot arm 18 so as to rotate the spot welding gun 30 about y-axis in
(44) At step S5, the robot controller 14 drives the servomotor 38 in accordance with the first pressurizing force command P.sub.1 so as to pressurize the opposite electrode 44 by the movable electrode 48. In particular, until the feedback value from the servomotor 38 reaches a value corresponding to the first pressurizing force command P.sub.1, the robot controller 14 drives the servomotor 38 so as to move the movable arm 36 in the direction toward the opposite electrode 44.
(45) At step S6, the robot controller 14 detects a second position D.sub.2 of the movable electrode 48. In particular, the robot controller 14 acquires a second rotational position R.sub.2 of the servomotor 38 from the encoder 50.
(46) As described above, when the spot welding gun 30 is rotated about y-axis from the first attitude, and the servomotor 38 is driven by the same pressurizing force command, the pressurizing force actually applied to the opposite electrode 44 from the movable electrode 48 is decreased by F.sub.g (1-cos ) as compared with the pressurizing force at the first attitude. Consequently, a second pressurizing force F.sub.2 actually applied to the opposite electrode 44 from the movable electrode 48 at step S5 becomes smaller than the first pressurizing force F.sub.1.
(47) On the other hand, the pressurizing force applied between the movable electrode 48 and the opposite electrode 44 corresponds to a reactive force due to elastic deformation of the fixed arm 34, and an elastic coefficient of the fixed arm 34 is always constant regardless of an attitude. Therefore, if the pressurizing force applied between the movable electrode 48 and the opposite electrode 44 is changed due to the change of the attitude, an elastic deformation amount of the fixed arm 34 is also changed. Accordingly, the second position D.sub.2 (the second rotational position R.sub.2) detected at step S6 is different from the first position D.sub.1 (the first rotational position R.sub.1).
(48) At step S7, the robot controller 14 calculates an amount of change .sub. between the first pressurizing force F.sub.1 applied between the movable electrode 48 and the opposite electrode 44 at the first attitude and the second pressurizing force F.sub.2 applied between the movable electrode 48 and the opposite electrode 44 at the second attitude.
(49) Since the elastic coefficient of the fixed arm 34 is always constant regardless of the attitude, there is a relation among the first position D.sub.1, the second position
(50) D.sub.2, the first pressurizing force F.sub.1, and the second pressurizing force F.sub.2, as indicated by the following Equation 1.
D.sub.1/D.sub.2=F.sub.1/F.sub.2(Equation 1)
(51) As described above, the first pressurizing force F.sub.1 in Equation 1 can be found from the first pressurizing force command P.sub.1 calibrated with respect to the first pressurizing force F.sub.1. Accordingly, it is possible to find the amount of change .sub. (=F.sub.1F.sub.2) between the first pressurizing force F.sub.1 and the second pressurizing force F.sub.2 from Equation 1.
(52) Thus, in this embodiment, the robot controller 14 functions as a pressure change calculation part 56 (
(53) Note that, it is also possible to calculate the amount of change .sub. from the first rotational position R.sub.1 and the second rotational position R.sub.2. In particular, the amount of change .sub. (=F.sub.1F.sub.2) between the first pressurizing force F.sub.1 and the second pressurizing force F.sub.2 can be found from the following Equation 2.
R.sub.1/R.sub.2=F.sub.1/F.sub.2(Equation 2)
(54) At step S8, the robot controller 14 records the calculated amount of change .sub. in the storage 20. At step S9, the robot controller 14 determines whether the calculation of the amount of change .sub. in the pressurizing force has been finished at all attitudes of the spot welding gun 30 designated by a user.
(55) The robot controller 14 determines YES when the amount of change .sub. in the pressurizing force has been calculated at all of the designated attitudes, and ends the flow illustrated in
(56) As an example, the robot controller 14 receives a command from the user for sequentially changing the attitude of the spot welding gun 30 by intervals of 30 in the range of 180 to +180 with respect to the first attitude (i.e., =0, and calculating the amount of change .sub. in the pressurizing force at the respective attitudes.
(57) When receiving such command, the robot controller 14 loops steps S4 to S9 with respect to the attitudes of =180, 150, 120, 90, 60, 30, 0 (i.e., the first attitude), 30, 60, 90, 120, 150, and 180.
(58) As a result, a data table illustrated in
(59) As illustrated in
(60) In this embodiment, the spot welding gun 30 is a so-called C-type spot gun. Accordingly, the correlation between the angle from the first attitude and the amount of change .sub. in the pressurizing force when the spot welding gun 30 is rotated about x-axis in
(61) When welding the workpiece, the robot controller 14 determines a pressurizing force command for driving the servomotor 38 at an arbitrary attitude of the spot welding gun 30, based on the stored data table of
(62) For example, assuming that the robot controller 14 operates the robot arm 18 so as to arrange the spot welding gun 30 at the attitude illustrated in
(63) Then, the robot controller 14 converts the amount of change .sub.180 into a pressurizing force command to the servomotor 38, and corrects the first pressurizing force command P.sub.1 by the converted pressurizing force command, thereby determines a second pressurizing force command P.sub.2 for driving the servomotor 38 at the attitude illustrated in
(64) In this way, even at the attitude illustrated in
(65) Note that, the first pressurizing force F.sub.1 in the above-mentioned Equation 1 coincides with the first pressurizing force command P.sub.1. Accordingly, the second pressurizing force command P.sub.2 at the second attitude may be calculated by the following Equation 3.
D.sub.1/D.sub.2=P.sub.1/F.sub.2
P.sub.2=P.sub.1D.sub.2/D.sub.1(Equation 3)
(66) As described above, according to this embodiment, once the correlation between the first pressurizing force command P.sub.1 and the first pressurizing force F.sub.1 at the first attitude is calibrated, it is possible to calculate the amount of change .sub. in the pressurizing force at an arbitrary attitude without using an external device such as a pressure sensor.
(67) Then, it is possible to correct a pressurizing force command to the servomotor 38 at an arbitrary attitude based on the amount of change .sub., thereby pressurize the workpiece with a pressurizing force the same as the calibrated pressurizing force F.sub.1 at the arbitrary attitude. Due to this, it is possible to improve the accuracy of a pressurizing force upon welding, thereby the welding quality can be maintained.
(68) Next, with reference to
(69) In the operation method according to this embodiment, at step S11 after step S1, the robot controller 14 drives the servomotor 38 in accordance with a reference pressurizing force command P.sub.Ref (a third pressurizing force command) so as to pressurize the opposite electrode 44 by the movable electrode 48.
(70) In particular, the robot controller 14 sends the reference pressurizing force command P.sub.Ref to the servomotor 38, and the servomotor 38 moves the movable arm 36 toward the opposite electrode 44 in response to the reference pressurizing force command P.sub.Ref so as to press the movable electrode 48 against the opposite electrode 44.
(71) When the feedback value from the servomotor 38 reaches a value corresponding to the reference pressurizing force command P.sub.Ref, the robot controller 14 stops the operation of the servomotor 38.
(72) At this time, the movable electrode 48 pressurizes the opposite electrode 44 with a reference pressurizing force F.sub.Ref. As described above, since the pressurizing force command to the servomotor 38 is calibrated so as to match the pressurizing force applied to the opposite electrode 44 from the movable electrode 48 at the first attitude, the reference pressurizing force F.sub.Ref can be regarded to match the reference pressurizing force command P.sub.Ref.
(73) The reference pressurizing force command P.sub.Ref is set to be different from the first pressurizing force command P.sub.1 (e.g., P.sub.Ref<P.sub.1). Accordingly, the reference pressurizing force F.sub.Ref is different from the first pressurizing force F.sub.1 (e.g., F.sub.Ref<F.sub.1)
(74) At step S12, the robot controller 14 detects a reference position D.sub.Ref (a third position) of the movable electrode 48. In particular, the robot controller 14 acquires a reference rotational position R.sub.Ref of the servomotor 38 from the encoder 50. The reference position D.sub.Ref of the movable electrode 48 can be found from the reference rotational position R.sub.Ref acquired by the encoder 50.
(75) At step S13 after step S6, the robot controller 14 calculates an amount of change .sub. between the first pressurizing force F.sub.1 applied between the movable electrode 48 and the opposite electrode 44 at the first attitude and the second pressurizing force F.sub.2 applied between the movable electrode 48 and the opposite electrode 44 at the second attitude.
(76) There is a relationship among the reference position D.sub.Ref acquired at step S11, the first position D.sub.1 acquired at step S3, the second position D.sub.2 acquired at step S6, the first pressurizing force F.sub.1, the reference pressurizing force command P.sub.Ref, and the second pressurizing force F.sub.2, as indicated by the following Equation 4.
(D.sub.1D.sub.Ref)/(D.sub.2D.sub.Ref)=(F.sub.1P.sub.Ref)/(F.sub.2P.sub.Ref)(Equation 4)
(77) The first pressurizing force F.sub.1 in Equation 4 can be found from the first pressurizing force command P.sub.1 calibrated with respect to F.sub.1. Accordingly, it is possible to find the amount of change .sub. (=F.sub.1F.sub.2) between the first pressurizing force F.sub.1 and the second pressurizing force F.sub.2.
(78) According to this embodiment, it is possible to calculate the amount of changes .sub. in the pressurizing force more accurately. This advantageous effect will be described below. The position D.sub.n of the movable electrode 48 is generally defined as an amount by which the movable electrode 48 has moved from a zero position (i.e., 0.0 mm) which is defined as a position of the movable electrode 48 when the tip of the movable electrode 48 contacts that of the opposite electrode 44.
(79) However, in fact, the zero position may be slightly shifted. If the calculation of the amount of changes .sub. in the pressurizing force is performed in such a state, an error may occur in a calculation result. In this embodiment, as indicated by the above Equation 4, the reference pressurizing force command P.sub.Ref and the reference position D.sub.Ref are introduced, and the amount of change .sub. is calculated based on the difference between the position D.sub.1, D.sub.2 and the reference position D.sub.Ref, and on the difference between the pressurizing force F.sub.1, F.sub.2 and the reference pressurizing force command P.sub.Ref.
(80) According to this method, since both of the reference position D.sub.Ref and the first position D.sub.1 are obtained at the same first attitude, it is possible to offset the error even if the above-mentioned zero position is slightly shifted. As a result, it is possible to calculate the amount of change .sub. in the pressurizing force more accurately.
(81) In addition, according to the method, it is also possible to offset the error even if an offset error slightly occurs in a force sensor used upon the calibration, thereby a constant error occurs in the calibration of the pressurizing force.
(82) Note that, the storage 20 may pre-record a computer program which causes a computer to execute the operation flows illustrated in
(83) Next, with reference to
(84) The spot welding system 70 includes the robot 12, a robot controller 72, and a spot welding gun 80. The robot controller 72 directly or indirectly controls each element of the robot 12 and the spot welding gun 80. The robot controller 72 includes the storage 20 therein.
(85) The spot welding gun 80 according to this embodiment is an X-type spot welding gun, and includes a pair of openable gun arm 82 (a first arm) and gun arm 84 (a second arm), an opposite electrode 86 mounted at a distal end of the gun arm 82, a movable electrode 88 mounted at a distal end of the gun arm 84, and a servomotor 92.
(86) The gun arm 82 and the gun arm 84 are rotatably connected to each other via a pivot shaft 90. The servomotor 92 rotates each of the gun arm 82 and the gun arm 84 about the pivot shaft 90 via a cylinder (not illustrated), so as to move the opposite electrode 86 and the movable electrode 88 in directions toward and away from each other.
(87) Thus, the servomotor 92 functions as a drive part 94 which drives the opposite electrode 86 and the movable electrode 88. The aforementioned encoder 50 is attached to the servomotor 92. The spot welding gun 80 calculates the amount of change .sub. in the pressurizing force at an arbitrary attitude of the spot welding gun 80 according to the operation flow illustrated in
(88) Herein, in a so-called X-type spot welding gun as the spot welding gun 80 according to this embodiment, when the workpiece is pressurized by the opposite electrode 86 and the movable electrode 88, the gun arm 84 mounted with the movable electrode 88 is also elastically deformed.
(89) In such spot welding gun 80, when the first position D.sub.1 and the second position D.sub.2 are measured in the aforementioned steps S3 and S6, a factor of the deformation of the gun arm 84 is also included in obtained position information.
(90) Since the amount of change .sub. in the pressurizing force generated when the attitude of the spot welding gun 80 is changed correlates with the deformation of the gun arm 82 mounted with the opposite electrode 86, it is preferable to remove the deformation amount of the gun arm 84, which supports the movable electrode 88, from the acquired first position D.sub.1 and second position D.sub.2.
(91) In this embodiment, in order to eliminate the influence of the deformation amount of the gun arm 84, the robot controller 72 corrects the positions D.sub.1, D.sub.2, and D.sub.Ref of the movable electrode 88 detected at the aforementioned steps S3, S6, and S12, as follow.
(92) The robot controller 72 multiplies the positions D.sub.1, D.sub.2, and D.sub.Ref detected at steps S3, S6, and S12 by a ratio r (=1/(1+2)) of a first deformation amount 1 of the gun arm 82 generated when the opposite electrode 86 is pressed by the movable electrode 88 with a predetermined force with respect to the sum of the first deformation amount 1 and a second deformation amount 2 of the gun arm 84 generated at this time.
(93) The robot controller 72 calculates the amount of change .sub. with using the positions D.sub.1r, D.sub.2r, and D.sub.Refr corrected as described above. Thus, the robot controller 72 functions as a position correction part 96 which corrects the positions D.sub.1, D.sub.2, and D.sub.Ref. Note that, the aforementioned first deformation amount 1 and second deformation amount 2 can be experimentally obtained, and pre-recorded in the storage 20.
(94) According to this configuration, the positions D.sub.1, D.sub.2, and D.sub.Ref can be corrected so as to be equivalent to the deformation amount of the gun arm 82 mounted with the opposite electrode 86, so it is possible to calculate the amount of change .sub. in the pressurizing force more accurately in a spot welding gun having a structure such as a so-called X-type gun.
(95) Note that, the ratio r in this embodiment may be applied to the operation flow of the above-mentioned spot welding system 10 so that the positions D.sub.1 and D.sub.2 may be corrected to the positions D.sub.1r and D.sub.2r in order to calculate the amount of change .sub..
(96) Further, in the aforementioned embodiments, a case is described where the opposite electrode 44, 86 as an object to be pressed is pressurized by the movable electrode 48, 88. However, instead of the opposite electrodes 44 and 86, any objects fixed relative to the movable electrode 48, 88 can be used as the object to be pressed.
(97) Further, in the aforementioned embodiments, a change in the attitudes of the spot welding gun 30, 80 mounted at the articulated robot is described. However, a change in a pressurizing force for each attitude of the spot welding gun can be obtained similar as the above-mentioned embodiments, in a system where a spot welding gun is installed on e.g. a pedestal at which a mechanism for changing the attitude of the spot welding gun is provided.
(98) Above, the invention has been described through the embodiments of the invention, but the aforementioned embodiments are not intended to limit the invention according to the scope of the appended claims. Furthermore, combinations of features described in the embodiments of the invention can also be included in the technical scope of the invention, but all the combinations of these features are not necessary in solutions of the invention. Moreover, it is apparent to those skilled in the art that various changes and improvements can be made in the aforementioned embodiments.
(99) Furthermore, it should be noted that an execution order of each processing of an operation, a procedure, a step, a process, a stage and the like in an apparatus, a system, a program, and a method described in the claims, the specification, and the drawings is not specifically identified through the use of special before, prior to and the like, and can be realized in any order as long as the output of a previous process is not used by a subsequent process. One must note that, even if an operation flow in the claims, the specification, and the drawings is described with the use of first, next, then and the like for convenience, it does not mean that the operation flow is necessarily to be implemented in that order.