Programmable transfer machine
FIELD OF THE INVENTION 
     The present invention relates to a transfer machine in which several machining stations are arranged in line and which, when a trouble takes place at one of the stations, permits the remaining machining operations to be performed at another station. 
     BACKGROUND OF THE INVENTION 
     A transfer machine uses a different machine tool at each individual station. Workpieces are caused to pass through these stations to undergo a series of machining processes. In recent years, a flexible transfer machine has been put into practical use to perform machining operations flexibly. Specifically, this machine makes use of numerically controlled machine tools disposed at various stations. Usually, each individual numerically controlled machine tool is loaded with a program to be executed at the corresponding station and, therefore, each machine tool simply executes that program. 
     If a trouble occurs at some station, then the machining process assigned to the station is not performed. Therefore, the machining process cannot be continued until the whole transfer machine is stopped and the station in trouble is repaired. Especially, in a system using a number of numerically controlled machine tools, troubles often take place. Each time a trouble occurs at some station, the whole system must be stopped. Hence, the machining efficiency is low. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is a main object of the invention to provide a transfer machine which can continue its normal machining operation even if a breakdown occurs at some station, whereby a decrease in the machining efficiency is prevented. 
     In summary, a programmable transfer machine according to the invention comprises a conveyor for conveying workpieces to various stations successively and numerically controlled machine tools disposed at the stations. Computer programs are loaded into the machine tools so that they may carry out machining operations assigned to the stations. Further, the transfer machine is provided with program execution control apparatuses which receive a signal indicating that the numerically controlled machine tool disposed at some station have broken down. When such a signal is applied to one program execution control apparatus, this apparatus instructs the machine tool at a normal station adjacent to the station in trouble to execute the program originally assigned to the station in trouble, as well as the program assigned to the normal station itself. 
     In this system, when a trouble occurs at some station, an associated program execution control apparatus is informed of this fact. Then, the control apparatus assigns the program originally assigned to the station in trouble to a certain neighboring normal station. The machine tool at this normal station executes the program originally assigned to the station in trouble, in addition to the program assigned to the normal station itself. Immediately after a trouble takes place, the processing at the station in trouble is stopped. The program assigned to this station in trouble is executed at another normal station. Consequently, the whole transfer machine can continue its machining processes without deteriorating the efficiency. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a transfer machine according to the invention; 
     FIG. 2 is a flowchart for illustrating a sequence of operations performed by the host computer of the transfer machine shown in FIG. 1; 
     FIG. 3 is a diagram for illustrating the manner in which programs are assigned to stations when troubles take place; 
     FIGS. 4(a), 4(b), and 4(c) are diagrams of ladder circuits of sequence controllers at stations, the controllers embodying program execution control apparatuses. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, there is shown a transfer machine according to the invention. This machine has a host computer 1 which controls all the components of the machine. A computer program for the computer 1 is stored in a magnetic disk unit 3. A conveyor 4 includes a transfer line 42. Workpieces W are placed onto the transfer line 42 from a loading station 41. Then, the workpieces W are successively conveyed to stations ST1, ST2, and ST3. After undergoing machining operations at all the stations, the workpieces W are moved into an unloading station 43. This series of operations for conveyance is controlled by a sequence controller (not shown) that receives from the host computer 1 a signal indicating the start of a movement from one station to the next. Machine tools MT1, MT2, MT3 are disposed at the stations ST1, ST2, ST3, respectively. The machine tools MT1, MT2, MT3 are controlled by sequence controllers PC1, PC2, PC3, respectively, which are connected with numerical controllers NC1, NC2, NC3, respectively. A signal indicating a trouble at some station is applied to other sequence controllers and also to the host computer 1. 
     Each sequence controller receives a trouble signal produced from the sequence controller (PCx) of one machine tool (MTx) in trouble, and is capable of deciding which program should be executed. Each controller has a ladder circuit constructed as shown in FIG. 4(a), 4(b), or 4(c). FIG. 3 shows that which programs are executed at which stations when troubles occur. Each numerical controller incorporates a program storage device PSD which receives all programs PG1, PG2, PG3 executed at the stations from the host computer 1 and stores them. Each numerical controller causes the corresponding machine tool to execute the program or programs instructed by the corresponding sequence controller in an instructed order. 
     The system constructed as described above operates in the manner described below. As illustrated in FIG. 2, at the beginning of a process, the host computer 1 sends all programs for machining operations to all the stations (step 100). Then, workpieces W are conveyed from the present stations to the neighboring ones and placed there (step 102). Thereafter, the host computer 1 supplies a signal indicating the start of machining operations to the stations to initiate the operations (step 104). Then, a decision is made to determine whether the operations are completed (step 106). If so, a decision is made to ascertain whether all the stations are in trouble (step 108). If all the stations break down, no further machining process is allowed and so the process is stopped (step 110). If all the stations are not in trouble, then the operations to be carried out at stations in trouble can be performed at other stations. In this case, a decision is made to see if all the workpieces have been fully machined (step 112). If so, the workpieces are conveyed to the next stations (step 102). In this way, the machining process is continued until all the workpieces are machined fully. When an instruction for the start of a machining operation is given to the sequence controllers at the stations, each controller operates in the manner described below. 
     (a) Operation of Sequence Controller PC1 
     When the station ST2 or both stations ST2 and ST3 are in trouble, the sequence controller PC1 causes the station ST1 to perform instead of the station or stations in trouble, as illustrated in FIG. 3. 
     Referring to FIGS. 4(a)-4(c), A1-A3 indicate the contacts of relays which are actuated when the stations ST1-ST3 are respectively in trouble. Contacts K1-K3 of relays indicate which of the programs PG1-PG3 has or have been executed in machining the workpieces conveyed at the stations. 
     Referring particularly to FIG. 4(a), where all the stations are normal, when a signal S indicating the start of a machining operation is applied to the sequence controller PC1, this controller delivers a signal indicating the start of execution of program PG1 to the numerical controller NC1 (row 1). The controller receives a signal indicating the end of the execution of the program, and delivers a signal indicating that the operation at the station ST1 has been completed (row 6). 
     Where only the station ST2 is in trouble, when a signal indicating the start of an operation is applied to the controller, this controller produces a signal indicating the start of program PG1 (row 1). After the execution of the program is completed, the controller delivers a signal indicating the start of execution of program PG2 (row 2). After the end of the execution of program PG2, the controller delivers a signal indicating that the machining operation performed at the station ST1 is completed (row 7). 
     Where the stations ST2 and ST3 are in trouble, when a signal indicating the start of a machining operation is applied to the controller, this controller delivers a signal indicating the start of execution of program PG1, a signal indicating the start of execution of program PG2, and a signal indicating the start of execution of program PG3 one after another (rows 1, 2, 3). After the end of the execution of program PG3, the controller delivers a signal indicating that the operation performed at the station ST1 has been completed (row 8). 
     Where only the station ST3 is in trouble, the controller does not delivers a signal indicating the start of execution of program PG2 and, therefore, the controller does not deliver a signal indicating the start of execution of program PG3 (rows 2 and 3). After the completion of execution of program PG1, the controller delivers a signal indicating that the operation performed at the station ST1 has been completed (row 5). Where the station ST1 itself is in trouble, the controller does not deliver any signal indicating execution of a program but immediately delivers a signal indicating the completion of operation performed at the station ST1. 
     (b) Operation of Sequence Controller PC2 
     The station ST2 acts as an alternative station when the station ST1 or ST3 or both of them are in trouble, as illustrated in FIG. 3. 
     Referring to FIG. 4(b), where all the stations are normal, when a signal indicating the start of execution of a machining operation is applied to the controller PC2, this controller delivers a signal indicating the start of execution of program PG2 to the numerical controller NC2 (row 3). The controller receives a signal indicating the end of execution of the program, and delivers a signal indicating the completion of the operation performed at the station ST2 (row 6). 
     Where only the station ST1 is in trouble, when a signal indicating the start of a machining operation is applied to the controller PC2, it delivers a signal indicating the start of execution of program PG1 (row 1). After the completion of the execution of the program PG1, the controller delivers a signal indicating the start of program PG2 (row 2). When the execution of the program PG2 ends, the controller delivers a signal indicating that the execution of the operation performed at the station ST2 is complete (row 6). 
     Where only the station ST3 is in trouble, when a signal indicating the start of a machining operation is applied to the controller PC2, it delivers a signal indicating the start of execution of program PG2 (row 3). After the completion of the execution of this program PG2, the controller delivers a signal indicating the start of execution of program PG3 (row 4). When the execution of the program PG3 ends, the controller delivers a signal indicating that the operation performed at the station ST2 is complete (row 7). 
     Where the stations ST1 and ST3 are in trouble, when a signal indicating the start of a machining operation is applied to the controller, it delivers a signal indicating the start of execution of program PG1 (row 1). Then, it delivers a signal indicating the start of execution of program PG2 (row 2). Subsequently, it delivers a signal indicating the start of execution of program PG3 (row 4). After the completion of the execution of program PG3, it delivers a signal indicating that the execution of the operation performed at the station ST2 is complete (row 7). 
     When the station ST2 itself is in trouble, the controller does not produce any signal indicating the start of a program but immediately delivers a signal indicating the completion of the operation performed at the station ST2. 
     (c) Operation of Sequence Controller PC3 
     The station ST3 serves as an alternative station when the stations ST1 and ST2 are in trouble, as illustrated in FIG. 3. 
     Referring to FIG. 4(c), where both the station ST3 itself and another station are normal, when a signal indicating the start of a machining operation is applied to the controller PC3, this controller delivers a signal indicating the start of execution of program PG3 to the numerical controller NC3 (row 4). The controller then receives a signal indicating that the execution of the program has been completed, and delivers a signal indicating that the operation performed at the station ST3 is completed (row 7). 
     Where the stations ST1 and ST2 are in trouble, when a signal indicating the start of a machining operation is applied to the controller, it delivers a signal indicating the start of execution of program PG1 (row 1). Then, the controller delivers a signal indicating the start of execution of program PG2 (row 2). Subsequently, the controller delivers a signal indicating the start of execution of program PG3 (row 3). After the completion of the execution of program PG3, the controller delivers a signal indicating the completion of the operation performed at the station ST3 (row 7). 
     Where the station ST3 itself is in trouble, the controller does not deliver any signal indicating the start of a program but immediately produces a signal indicating the completion of the operation performed at the station ST3. 
     As described above, when a station is in trouble, another normal station can perform the operation assigned to the station in trouble. Therefore, if troubles occur in the transfer machine, the machining operation assigned to the stations in trouble can be automatically shifted to other stations, as long as one or more numerically controlled machine tools work normally. Hence, the machining process can be continued. 
     When the system is machining workpieces, if the station ST2 breaks down, for example, then the station ST1 executes the program PG2 from the workpiece that is being machined. In this way, during a machining process, when the next station is found to be in trouble, the machining operation assigned to the next station is carried out from the workpiece that is now being machined. Thus, the system works efficiently. 
     In the above example, all the programs are stored in each numerical controller. Alternatively, each numerical controller may store only the directly associated program. In this case, when one station is used as an alternative station, this station requires the host computer to send the program assigned to the station in trouble to the alternative station. 
     Also in the above example, each numerical controller at a station is equipped with a program execution control apparatus. The program execution control apparatuses may be incorporated in the host computer 1. In this case, a signal indicating a trouble is supplied from a station to the host computer 1, which then ascertains the station in trouble and determines an alternative station. Subsequently, the computer 1 sends the program originally assigned to the station in trouble to the numerical controller disposed at the alternative station.