Welding method in automatic welding machine
This is a continuation of co-pending application Ser. No. 626,880 filed on June 26, 1984, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     This invention relates to a welding method in an automatic welding machine and, more particularly, to a welding method well-suited for use in selecting the welding conditions for an automatic welding machine, the motion of which is controlled by a robot. 
     Welding machines are available in which welding is performed by impressing a voltage across a wire and a workpiece to produce an arc at the tip of the wire, where the wire tip is moving along a welding path while the wire is successively laid out in small increments. FIG. 1 is a simplified view of such a welding machine, in which a wire WR is laid out in small increments in the direction of the arrows from feed rollers FR to protrude from the end of a torch TC via guide member GB. The amount by which the wire WR is fed is controlled in such a manner that the tip of the wire is situated at a position spaced a predetermined distance (e.g., 15 mm) from the surface of the workpiece WK. The plus side of a welding power supply PS for generating an intermittent high voltage having a predetermined period is applied to the wire WR through the guide member GB, and the minus side of the high-voltage power supply is applied to the workpiece WK. Gas from a gas supply unit (gas bombe), which is not shown, is supplied through the interior or the torch TC in the direction of the arrows so as to impinge upon the portion of the workpiece being welded to prevent the oxidation thereof. When a high voltage is generated intermittently by the welding power supply PS while the gas is fed from the gas supply unit and the wire is laid out in small increments, an arc is produced at the tip of the wire and both the wire and the portion being welded are melted to weld the fused portions together. 
     In a welding machine of this type, welding conditions such as optimum welding voltage, wire feed speed, preflow duration, postflow duration and crater processing duration are decided in dependence upon the wire material and the material of the workpiece portion being welded, welding speed and the like. Accordingly, when conventionally welding, the optimum welding conditions are set on dials or the like and welding is performed based on the set welding conditions. However, since the welding voltage, wire delivery speed, preflow duration, postflow duration and crater processing duration must be set using the dials or the like, drawbacks are encoutered in that setting of the welding conditions is complicated and changing welding conditions cannot be performed in a simple manner. Furthermore, in a case where the welding conditions differ at the start and at the completion of welding, the welding conditions must be set on the dials for each occasion, thereby rendering the operation of setting the welding conditions even more troublesome. Moreover, a large number of dials are required, thereby raising the cost of the welding machine. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the present invention is to provide a welding method whereby desired welding conditions can be selected without setting welding conditions on dials. 
     Another object of the present invention is to provide a welding method in an automatic welding machine, wherein welding voltage, wire delivery speed, preflow duration, postflow duration and crater processing duration are treated as one set of welding conditions, a number of sets of these welding conditions are stored in a memory, and welding voltage, wire delivery speed, preflow duration, postflow duration and crater processing duration can be selected merely by specifying the name of the desired welding condition. 
     Still another object of the present invention is to provide a welding method in an automatic welding machine, which reduces the cost of welding machines because dials are not used. 
     The present invention provides a welding method for an automatic welding machine in which welding is performed by impressing a voltage across a wire (which is transported along a welding path by a robot), and a workpiece to produce an arc at the tip of the wire, and in which the wire tip is moved along the welding path by the robot while the wire is successively laid out in small increments. The method includes storing a number of welding conditions in a memory; specifying prescribed welding conditions by a program; and performing welding by reading specified welding conditions out of the memory and controlling the welding machine based on the welding conditions. According to the present invention, welding conditions need not be set on dials. This facilitates easy setting of welding conditions and reduces the cost of welding machines. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 schematically illustrates an automatic welding machine; 
     FIG. 2 is a block diagram of an embodiment of the present invention; 
     FIG. 3 illustrates an embodiment of an interface circuit in FIG. 2; 
     FIG. 4 is a flowchart for the processing according to the welding method of the present invention; 
     FIG. 5 illustrates the robot control data; 
     FIG. 6 illustrates the correspondence between operands and welding conditions; and 
     FIG. 7 is a timing diagram of various signals exchanged between a robot control unit and an automatic welding machine. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     In FIG. 2, RBCT denotes a robot control unit, and AWM represents an automatic welding machine. The robot control unit RBCT includes a processor 101, a ROM (read-only memory) 102 storing a control program, a RAM (random-access memory) 103 in which a series of robot command data are stored a working memory 104, a non-volatile parameter memory 105 in which a number of welding conditions are stored, an operator&#39;s panel 106, a pulse interpolator 107, an interface circuit 108 for administering an exchange of signals between the processor 101 and the automatic welding machine AWM, and servo circuits 109X, 109Y, 109Z for the respective axes. Further, numerals 110, 111 designate address and data buses, respectively. 
     RAM 103 stores robot command data. Assume that these robot command data are to (a) move the torch TC in a rapid-traverse mode from an initial position, not shown, to a point P o  shown in FIG. 5, (b) position the torch from the point P o  to a welding starting point P 1 , and (c) transport the torch TC linearly to perform welding from the welding starting point P 1  to a welding end point P 2  at a speed f 1 , and subsequently position the torch at a point P3. The robot command data will then be represented by the following: ##EQU1## In the program, the data points P o  &#39;, P 1  &#39;, P 2  &#39;, P 3  &#39; are positional coordinate values in a robot coordinate system, of the respective points P o  through P 3  shown in FIG. 5, &#34;G00&#34; is a G-function instruction indicative of positioning, &#34;G01&#34; is a G-function instruction indicative of path control along a straight line, the letter of the alphabet &#34;F&#34; is a word address word indicating that the numerical value f 1  following it is feed speed, &#34;S45&#34; is an S code designating the start of welding, &#34;S46&#34; is an S code designating the end of welding, and a, a&#39; are operands (index numbers) for selecting welding conditions which are described below. 
     The parameter memory 105 stores 32 sets of welding conditions, together with operands (index numbers). A single set of welding conditions comprises (1) welding voltage CMU (V), (2) wire feed speed WF (m/min) or welding current (A), (3) preflow duration PRD (sec), (4) postflow duration PSD (sec), and (5) crater processing duration CFD (sec). Welding voltage CMU is that produced by the welding power supply PS of FIG. 1. Wire feed speed WF is the speed at which the wire WR is laid out by the feed rollers FR of FIG. 1. Since wire feed speed and welding current are mutually proportional, either may be specified. For ease of control, however, the wire feed speed generally is specified as one of the welding conditions. Preflow duration PRD is the length of time gas is expelled from the gas supply unit toward the portion to be welded before the welding voltage is produced. Postflow duration PSD is the length of time the gas is expelled toward the welded portion after welding has ended. Crater processing duration CFD is the length of time needed to drop a molten portion of the wire into a crater which is formed at the end of welding, in order to fill the crater. FIG. 6 illustrates the correspondence between operands (index numbers) and welding conditions (CMU, WF, PRD, PSD, CFD), which are stored in the parameter memory 105. Welding conditions at the start and end of welding are selected by attaching a desired operand a to the S code (S45) which designates the start of welding, and to the S code (S46) which designates the end of welding. 
     Processing for a welding method according to the present invention will now be described. 
     (a) When a start button, not shown, on the operator&#39;s panel 106 is pressed, the processor 101 is placed under the control of the control program to read one block of robot command data out of the RAM 103. 
     (b) The processor 101 then determines whether the block of robot command data is path control data. 
     (c) If the robot command data contain path control data, the processor 101 calculates traveling distances (incremental values) X i , Y i , Z i  along the respective axes. Though the robot shall be described as operating in a cartesian coordinate system, a cylindrical or articulate-type coordinate system may be used. Next, the processor 101 uses the incremental values X i , Y i , Z i  along the respective axes and feed speed F to perform the following operations: 
     
         ΔX.sub.i =F.sub.x ·ΔT                 (1a) 
    
     
         ΔY.sub.i =F.sub.y ·ΔT                 (1b) 
    
     
         ΔZ.sub.i =F.sub.z ·ΔT                 (1c) 
    
     thereby obtaining traveling distances ΔX i , ΔY i , ΔZ i  along the X, Y and Z axes over a predetermined period of time ΔT. The processor applies these values as inputs to the pulse interpolator 107 every ΔT sec. It should be noted that ΔT is a period of time preset as a parameter in the parameter memory 105. Also, F x , F y , F z  are speeds, which are determined from the following equations, along the respective X, Y and Z axes: ##EQU2## Upon receiving the inputs of ΔX i , ΔY i , ΔZ i , the pulse interpolator 107 performs a pulse interpolation operation and applies interpolated pulses X p , Y p , Z p  to the X-, Y- and Z-axis servo units 109X, 109Y, 109Z, whereby servomotors MX, MY, MZ are rotated to transport a robot, not shown, along a commanded path. As a result, the torch (wire tip), which is grasped by the robot, is moved along a welding path to perform welding. The processor 101, in accordance with the following formulae, updates the present position X a , Y a  Z a  along the respective axes every ΔT sec, X a , Y a  Z a   having been stored in the working memory 104: 
     
         X.sub.a ±ΔX.sub.i →X.sub.a                 (3a) 
    
     
         Y.sub.a ±ΔY.sub.i →Y.sub.a                 (3b) 
    
     
         Z.sub.a ±ΔZ.sub.i →Z.sub.a                 (3c) 
    
     The sign depends upon the direction of movement. Similarly, in accordance with the following formulae, the processor 101 updates remaining traveling distances X r , Y r , Z r  (the initial values of which are the incremental values X i , Y i , Z i , respectively) every ΔT sec: 
     
         X.sub.r ±ΔX.sub.i →X.sub.r                 (4a) 
    
     
         Y.sub.r ±ΔY.sub.i →Y.sub.r                 (4b) 
    
     
         Z.sub.r ±ΔZ.sub.i →Z.sub.r                 (4c) 
    
     The robot is considered to have reached the target position when the following condition is established: 
     
         X.sub.r =Y.sub.r =Z.sub.r =0                               (5) 
    
     This is followed by execution the next process step. 
     (d) When the result of the decision rendered in step (b) is that the robot command data do not contain path data, or when the processing of step (c) ends, the processor 101 determines whether the robot command data contain the S code 45 or the S code 46. 
     (e) If the robot command data do not contain S45 or S46, then ordinary robot control processing is executed. When such processing ends, the next block of robot command data is read out of the RAM 103 and the processing described above is repeated. 
     (f) If the result of the decision rendered in step (d) is that the robot command data contain an S code &#34;S45&#34; indicative of the start of welding (signal S45R=&#34;1&#34; is the time chart of FIG. 7), then the following processing is executed to issue signals indicative of welding conditions. 
     (f-1) Specifically, when the robot command data contain &#34;S45&#34; (i.e., when S45=&#34;1&#34; holds), the processor 101 reads, from the parameter memory 105 into the working memory 104, the welding condition indicated by the operand which follows &#34;S45&#34;. The processor 101 then delivers a gas supply signal GAS to the automatic welding machine AWM through the interface circuit 108 and, at the same time, measures time t which has elapsed since generation of the gas supply signal GAS. (This is a preflow start step). The gas signal GAS is issued in the following manner, with reference being had to FIG. 3. Specifically, the processor 101 delivers, over the address bus 110, an address signal assigned to an output circuit 108a. In addition, among the lines constituting the eight-bit data bus 111, the processor 101 delivers logical &#34;1&#34; to the line corresponding to the bit assigned to the gas supply signal. A decoder DEC1 (FIG. 3) in the output circuit 108a produces a &#34;1&#34; output upon recognizing the abovementioned address signal. As a result, AND gates AG11, AG12 open, whereby the &#34;1&#34; (high level) on the data bus is applied to a set input terminal of an R-S flip-flop FF1 through the AND gate AG11 to set the flip-flop. When the flip-flop FF1 is set, a transistor TR1 is driven into conduction to actuate a relay RL 1  of the automatic welding machine AWM, whereby a contact rl 1  of the relay is closed. As a result, a solenoid valve, not shown, is opened, whereby gas from a gas bomb is jetted through the interior of the torch toward the portion being welded. The gas will continue to be expelled toward the portion being welded until the flip-flop FF1 is turned off. 
     (f-2) The processor 101 performs a monitoring operation to determine whether the time t, which has elapsed since generation of the gas supply signal, has become equivalent to the preflow duration PRD read into the working memory 104. If the following relation is found to hold, namely: 
     
         t≧PRD 
    
     (preflow off), then the processor delivers a welding start signal WDS, a welding voltage signal (analog voltage) WDV and a wire feed speed signal (analog voltage) WFC to the automatic welding machine AWM through an interface circuit 108. Specifically, as soon as t≧PRD is determined to hold, the processor 101 delivers over the address bus 110 an address signal assigned to a welding start signal output circuit 108b (FIG. 3). In addition, among the lines constituting the eight-bit data bus 111, the processor 101 delivers logical &#34;1&#34; to the line corresponding to the bit assigned to the welding start signal. A decoder DEC2 produces a &#34;1&#34; (high-level) output upon recognizing the abovementioned address signal, thereby opening AND gates AG21, AG22. As a result, the &#34;1&#34; (high level) is applied to a set input terminal of an R-S flip-flop FF2 through the AND gate AG21 to set the flip-flop. As a result, a transistor TR2 is driven into conduction to actuate a relay RL 2  of the automatic welding machine AWM, whereby a contact rl 2  of the relay is closed. This enables a welding power supply PS and a roller drive circuit RDC for driving the feed rollers. 
     Next, the processor 101 delivers, over the address bus 110, the address of a digital-to-analog converter (referred to as a &#34;DA converter&#34;) DAC1. The processor also delivers, over the data bus 111, the welding voltage CMU (digital value) read into the working memory 104. As a result, after the welding voltage CMU is stored in an internal buffer register, the DA converter DAC1 converts the welding voltage into an analog voltage and delivers the same to the welding power supply PS of the automatic welding machine AWM. The welding power supply PS produces a high-voltage output proportional to the welding voltage for as long as the relay contact rl 2  is closed. 
     Thereafter, the processor 101 delivers the address of a DA converter DAC2 over the address bus 110, and delivers, over the data bus 111, the wire feed speed WF (digital value) read into the working memory 104. As a result, after the wire feed speed WF is stored in an internal buffer register, the DA converter DAC2 converts the wire feed speed into an analog voltage and applies the same to the roller drive circuit RDC of the automatic welding machine AWM. In response, the roller drive circuit RDC rotates a roller drive motor to lay out the wire WR at the commanded wire feed speed, for as long as the relay contact rl 2  is closed. 
     (f-3) When the welding power supply PS produces the welding voltage to lay out the wire WR, an arc is produce across the wire WR and the portion being welding. When an arc generation detector AGD detects generation of the arc, the detector applies an arc generation signal ACG to the interface circuit 108. The processor 101 generates the address of an arc signal read circuit 108c at a very short cycle. A decoder DEC3 therefore recognizes the address signal at the abovementioned cycle and opens an AND gate AG31 on every such occasion. As a result, when the arc generation signal ACG goes to &#34;logical 1&#34;, this is immediately read by the processor 101. 
     (f-4) As soon as the arc signal ACG is generated, the processor 101 reads the next block of robot command data out of the RAM 103 and repeats the processing from step (b) onward to transport the robot along the welding path (signal RBM=&#34;1&#34; in FIG. 7). 
     (g) If the robot command data are found to contain the S code &#34;S46&#34; in the decision rendered in step (d) following arrival of the robot at the target position (i.e., if S46R=&#34;1&#34; in FIG. 7), then the processor 101 executes the following processing to issue signals indicative of welding conditions. 
     (g-1) First, the processor 101 reads, from the parameter memory 105 into the working memory 104, the welding conditions indicated by the operand following &#34;S46&#34;. 
     (g-2) Next, the processor 101 causes the welding voltage (analog voltage) and the wire feed speed WFC to be produced such as when &#34;S45&#34; is executed, and causes the automatic welding machine AWM to execute crater processing. 
     (g-3) The processor 101 measures the time which has elapsed since step (g-2) and performs a monitoring operation to determine whether elapsed time t has become equivalent to the crater processing duration read into the working memory 104. 
     (g-4) When the elapsed time t becomes equal to the crater processing duration CFD, the processor 101 resets the flip-flop FF2 (crater processing end). More specifically, for the duration of crater processing, the wire is laid out at a predetermined feed speed, and a predetermined welding voltage is impressed across the wire and the welded portion, whereby the wire is melted and a molten drop thereof is caused to fall into the crater to fill the same. As this point, crater processing ends. It should be noted that when the flop-flop FF2 is reset, the output voltage of the welding power supply PS drops to a value of zero. Moreover, the wire stops being laid out and the generation of the arc is terminated. Furthermore, the welding voltage signal WDV and wire feed speed signal WFC also fall to zero. Accordingly, from this point onward the postflow mode prevails, in which the gas is jetted toward the portion being welded. 
     (g-5) When t=CFD holds, the processor 101 measures the time which has elapsed since realization of this condition, and performs a monitoring operation to determine whether the elapsed time has become equivalent to the postflow duration PSD read into the working memory 104. When t=PSD is found to hold, the flip-flop FF1 is reset, thereby opening the relay rl 1  to stop the supply of gas (postflow processing end). 
     (g-6) Thereafter, the processor 101 reads the next block of robot command data out of the RAM 103 and performs processing from the above-described step (b) onward. Thereafter, the foregoing processing is repeated and, when a code indicating the end of robot command data is finally read, welding processing is ended. 
     There are instances where a welding activity is desired to be stopped while the activity is in progress. In such case, one need only press a hold button, not shown, on the operator&#39;s panel 106. Welding may be restarted by pressing the start button. In the present invention, pressing the hold button sends the welding voltage to 0 V and halts delivery of the wire, under which conditions the gas is jetted toward the welded portion over the postflow duration PSD (postflow processing). At restart, processing exactly the same as welding start processing in accordance with &#34;S45&#34; is executed. Thus, if postflow processing is executed when welding is temporarily halted and preflow processing is executed when welding is restarted, the welding state at the portion where welding has stopped is unimpaired. 
     Further, in the present invention, the processor 101 has a function for causing the welding machine AWM to detect the actual welding voltage and welding current, and for writing the average values thereof in the parameter memory 105. In FIG. 2, VCD denotes a detecting unit (having a detector and an AD converter). Voltage and current values (digital), which are the outputs of the detecting unit, are accepted and added up by the processor 101 via an input/output unit 108. The resulting sums are divided by welding time at the end of the welding activity, and the quuotients are stored, as the actual average welding voltage and actual average welding current, with correspondence being established between these and the selected welding conditions. By thus storing the average welding voltage and current that prevail during an actual welding activity, these may be compared with subsequent welding voltages and currents and an alarm can be issued when the difference between the compared values falls outside of upper and lower limit levels. The average voltage and current can also be utilized in correcting welding conditions (welding voltage and current) in such a manner as to achieve optmimum welding while the actual welding state is observed. 
     Thus, according to the present invention, the arrangement is such that a number of welding conditions are stored in memory, so that predetermined welding conditions can be selected merely by designating an operand. This facilitates the selection operation. In addition, it is unnecessary to set welding conditions on dials. This is advantageous in terms of cost since dials are no longer necessary. 
     The present invention allows welding conditions to be selected in a simple manner without using dials and is therefore well-suited for application to automatic welding performed by a robot.