Sequential function chart (SFC) controller for controlling a machine in reverse operation

Abstract: A programmable controller (PC) controlling the operation of a machine is described that executes a program written in a sequential function chart (SFC) language. The PC can generate a reverse operation sequence chart from an ordinary operation SFC program sequence chart. This allows the PC to control the machine in the reverse direction. Thus, if a machine experiences a failure, the reverse operation sequence chart is used and reverse operations are performed to allow the cause of the failure to be removed. The ordinary operation can resume without having to restart the sequence from the beginning.

Description: The invention relates to a programmable controller for controlling a machine in accordance with output signal commands sequentially arranged corresponding to a step number in a sequential function program (SFC). Furthermore, the invention relates to a SFC-program running method for a programmable controller. A SFC-program, which is executed by the programmable controller (PC) constitutes a program, which is written in the sequential function chart (SFC) programming language. Description of the Prior Art GB-A-2 215 489 relates to a sequence control system, where an activation member can be activated in forward and reverse directions in a cyclic sequence. Here, a reverse process can be carried out for driving the actuation member in a reverse direction. Furthermore, a reverse executable condition is determined, under which the reverse execution means can be executed, when the reverse side actuation means is ready for execution. When the reverse side actuation means is turned on to indicate the ready for the execution of the reverse side execution means, this execution means (here a valve to reverse a cylinder) is activated, only after the execution condition recognising means has been turned on. A loop arrangement is used, whereby in particular steps indications denote execution conditions determined by an execution condition determined by an execution condition recognising means. In this loop system, a forward or reverse side execution means can be executed, only when the forward or reverse side actuation means determines that the execution means is ready for execution and a forward or reverse side executable condition is recognised. Thus, the loop arrangement can switch forward and backward to a forward and reverse operation depending on the recognition of an executable condition. However, this leaves totally open how the forward and backward control with respect to the individual signal command is to be achieved, let alone how individual transition conditions and output signal commands should be assembled in order to allow a reversal of the operation, when a fault occurs. In particular, when a machine stop occurs during automatic operation due to some trouble, the automatic operation is switched to a manual operation to remove the troubles causes. FR-A-2 558 277 describes a procedure for re-establishing a normal condition in a sequence of executable commands. Whilst it is described that a particular execution command may be stored for each operation unit, the restart is performed on the basis of a relation of an execution phase stored in a first memory. A second operation phase is used to correct information concerning the function, which is memorized in a second memory. Despite this document describing a correction of fault operation steps, it does not teach what is to be done at the fault condition with respect to a reverse operation, after a fault stop occurs. In general, this document describes the setting and administering of tables for a sequence control means, however, it totally leaves open the connection of the arrangement of such tables with respect to the transition conditions and with respect to the output signal commands. EP-A 0069 375 describes a controller, which may include something similar to an output table, here denoted as "run table memory" regarding the plurality of sequenced locations of "machine elements" during their cyclical operation. Means are provided for detecting a departure from normal conditions and for initiating a planned stop and return of at least one element to a predetermined position. The programmed stop is made by monitoring whether all the wares have been output by the section and the fault condition is dealt with by a "machine cycle independent parts positioning routine" that allows for a faster programmed stop. A backup battery system is used to preserve the contents of the respective section to avoid the necessity of reloading the system. Whilst this document shows the altering of the normal sequence in program controllers, it totally leaves open what is to be done when a fault condition occurs with respect to a reverse operation to remove the fault. First, a conventional programmable controller PC will be described with reference to fig. 7, in particular with respect to the problems that occur after a fault stop during execution of the SFC-program. Fig. 7 is a block diagram of a known PC used for executing a control program written in an SFC language to control an object, such as a machine. The PC comprises a sequence chart controller 2 for performing control of the PC, a sequence chart table 3 having a transition table for storing transition information used in comparison to input conditions of the machine, and an output table 5 for storing output signal numbers making up the control program used to control the operation of the machine. Both the transition information stored in transition table 4 and the output signal numbers stored in the output table 5 are sequentially arranged according to the sequence of step numbers 0, 1, 2...7, E set forth in the sequence chart of Fig. 9. Fig. 10 illustrates the contents of sequence chart table 3 (Fig. 7). In particular, the figure illustrates the transition information stored in transition table 4 according to step numbers 0-E. The figure also illustrates the output signal numbers stored in the output table 5 according to step numbers 0-E. The PC 1 controls a machine (not shown) according to the execution by sequence chart controller 2 of a sequence of steps 0-E making up the control program stored in sequence chart table 3. With reference to Fig. 8, it can be seen that the sequence chart controller 2 starts the execution at step 200. The controller 2 first obtains the step number stored in active step number table 6 (Fig. 7). This is performed in block 201. The controller 2 determines whether or not the indicated step is an END (E) step. If the E step is determined, the execution proceeds to block 210 and is completed. If, on the other hand, the step is not an E step, then the execution of the program advances to block 203. In this block, the sequence chart controller 2 obtains the output number from the output table 5 corresponding to the active step stored in active step table 6 (Fig. 10). This output number is sent by the PC 1 to the output signal line 11 (Fig. 7) in block 204. The controller 2 then obtains transition information corresponding to the active step number from the transition table 4 (Fig. 10) during block 205. At decision block 206, the controller 2 determines whether or not an input signal X has been received over input signal line 9 (Fig. 7), and if it matches the transition information stored in transition table 4 corresponding to the active step number currently being executed. If there has not been a favorable comparison, then the execution moves back to block 201 without any further operation. If, on the other hand, there has been a favorable comparison to the transition information, then a pointer is shifted to a subsequent step number in the transition table 4. That subsequent step number is stored in active step number table 6 (block 207). In block 209, the sequence chart controller 2 switches off the signal being output over signal line 11 (Fig. 7) and the execution of the program returns to block 201. As described above, output table 5 (Fig. 10) stores a series of output signal numbers Y0, Y1, Y2, Y12, Y11, Y10 according to steps 1-6, respectively. These output signal numbers are output by the PC 1 over signal line 11 under control of sequence chart controller 2 (Fig. 7). The output numbers are used by the PC 1 to control the machine (not shown), where each output number forces the machine to perform a different function. To allow the PC 1 to more fully control the operation of the machine, feedback signals are received as input signals over signal line 9 (Fig. 7). The feedback signals can be output by limit switches (not shown) that indicate when a machine operation has been performed to a certain limit. Transition information X0, X1, X2, X12, X11, X10 stored in transition table 4 according to steps 1-6, respectively, allow the PC 1 to determine when these limits, indicated by the feedback signals, have been reached in the operation of the machine. For example, if the active step number 1 stored in step number table 6 (Fig. 7) is currently being executed, then an output number Y0 (Fig. 10) will be output over signal line 11, causing a machine to perform an operation. Specifically, for example the output Y0 may cause a clamp 1 (not shown) of the machine to perform movement operation up until a specified position designated by limit switch X0 is detected (all switches may be logical switches). Upon this detection, input data X0 will be transmitted over signal line 9 and received by PC 1. During this time, the sequence chart controller 2 obtains the transition information X0 corresponding to the step number 1 currently being executed. Upon detecting a favorable comparison between the input signal data and the transition information stored in transition table 4, the sequence controller 2 terminates the output of signal number Y0 and advances to the next subsequent step number in transition table 4. This step number is stored in active step number table 6. The execution of the sequence is then continued for step numbers 2-E (Fig. 9). As can be seen from Fig. 10, output numbers Y1, Y2, Y12, Y11 and Y10 will be output in the manner described above until limit switch data X1, X2, X12, X11 and X10 are detected by the sequence controller 2, respectively. In this known structure, output Y1 causes a clamp 2 (not shown) to perform an operation until a position is detected by limit switch X1. Output Y2 causes a gauge (not shown) to perform an operation in one direction up until a specified limit switch X2. After that, an output Y12 causes the same gauge to perform a return operation to the position specified by limit switch X12. Then outputs Y10 and Y11 cause clamps 1 and 2 to perform return operations up to the position specified by limit switches X10 and X11, respectively. The above operations can be seen in the timing chart in Fig. 3, and are written in the SFC language as shown in Fig. 9. Fig. 9 more clearly depicts the sequence of steps making up the control program described above. The blocks having numerals inserted therein depict the sequence of steps 1-7 performed by the sequence controller 2. During step 1, it can be seen that an output number Y0 is output, as described above, until transition information X0 is received by the sequence controller 2. After this time, sequence step 2 is performed, outputting a number Y1 until a transition information X1 is received by sequence controller 2 over the input signal line 9. A similar pattern of events occurs until step 7 is executed and step E is determined. After detecting step E, sequence controller 2 terminates the execution of the program and, thus, terminates the control of the machine. The above-described PC known in the art is only allowed to execute the SFC language sequence chart in the order of step numbers 0-E set forth in the sequence chart of Fig. 9. If the machine that is controlled has stopped due to a fault, for example, the operation cannot be resumed by reversing the operation of the machine so that the cause of the fault can be removed. Accordingly, a need exists in the art for a process of running a programmable controller (PC) that executes a program written in an SFC language which allows an SFC language sequence chart to be executed in the reverse direction so that the object to be controlled may be controlled in the reverse operation. Moreover, there is a need in the art for reversing the operation so that the occurrence of a fault resulting in stoppage of machine operation can be removed without requiring the restarting of machine operation from the beginning of the sequence. Often, reverse operation of only a step or two can remedy the problem and allow normal operations to resume. SUMMARY OF THE INVENTION The object of the invention is to provide a programmable controller and a method that can, after a fault stop, resume operation by reversing the operation of the machine and allow a removal of the fault, without requiring the restart of machine operation from the start. This object is solved by a programmable controller according to claim 1. Furthermore, this object is solved by a SFC-program running method according to claim 4. Further advantageous embodiments and improvements of the invention can be taken from the dependent claims. In one aspect of the invention, a first transition table is provided which stores transition information according to an order of sequential steps. This information, as in the prior art, is used for checking the input conditions corresponding to feedback signals from a machine that allow a programmable controller (PC) to monitor and control the operation of the machine. A first output table is used for storing output signal numbers according to the set of sequential steps. The output signal numbers are used, as in the prior art, by the PC to control specific operations of the machine. A second transition table is provided for numbering the transition information stored in the first transition table in a reverse order, and for storing the results therein. A second output table is provided for sorting the output signal numbers stored in the first output table in a reverse order, and also storing the results therein. A first SFC program running means runs the output program stored in the first output table according to the stored sequence of steps. A second SFC program running means stops the execution of the control program stored in the first output table when a preset program running condition is not established or an external command is entered. This running means executes a corresponding output number stored in the second output table under control of the transition information stored in the second transition table. The program is started with the current step number for which the first SFC program running means had been executing at the time it was stopped. An SFC program run resuming means stops the run of the output program stored in the second output table when the preset program running condition has been reestablished or a new external command is entered. The SFC program run resuming means resumes the running of an output number stored in the first output table. Execution resumes at the step number where the program had been stopped. In this manner, it is apparent that the present invention allows a PC to control a machine in a reverse operation. The present invention has a significant advantage of easily restoring a machine to normal operation after it has failed without restarting the operation from the beginning of the sequence. BRIEF DESCRIPTION OF THE DRAWINGS The foregoing and other structures and teachings of the invention will become more apparent upon describing the best mode for carrying out the invention, as rendered below. In the description to follow, reference will be made to the accompanying drawings, in which: Fig. 1 is a block diagram of a program controller (PC) according to the present invention. Fig. 2 is a flow chart illustrating the operational flow of a PC according to the present invention. Fig. 3 is a timing diagram depicting the operation of a machine under control of a PC according to the present invention. Fig. 4 illustrates two sequence charts depicting the operational flow of a PC in ordinary and reverse operations. Fig. 5 is a block diagram illustrating the sequence chart table of the PC. Fig. 6 illustrates the reversing of the sequential steps of the sequence chart for storage in the second transition table and second output table. Fig. 7 is a block diagram of a known PC. Fig. 8 is a flow chart of the operational flow of a known PC. Fig. 9 is a sequence chart illustrating the sequence of program steps performed by the known PC. Fig. 10 is a block diagram of the sequence chart table stored in the known PC. DESCRIPTION OF THE PREFERRED EMBODIMENT The present invention will now be described with reference to Figs. 1-6, wherein structural elements identical to those in the prior art described above are designated with identical or corresponding numbers. As shown in Fig. 1, a programmable controller (PC) 1A, according to the present invention, has input and output signal lines 9 and 11, respectively, performing functions identical to those of prior art Fig. 7 described above. The PC 1A also has an active step number table 6 identical to that of the prior art. The major structural differences between the PC 1A and that of the prior art are in the sequence chart controller 2A, the first sequence chart table 3A, and the second sequence chart table 3B. The first sequence chart table 3A has a first transition table 4A that stores transition information used to check the input conditions received over input signal lines 9 from the controlled machine. The sequence chart table 3A also contains a first output table 5A for storing outputs over signal line 11 used by PC 1A to control the operation of the machine. Both the transition information and the outputs are stored in a sequential order designated by sequence chart 1 (shown in Fig. 4). A second sequence chart table 3B has a second transition table 4B for renumbering the transition information that is stored in the first transition table 4A in reverse order, and storing the results thereof. The second sequence chart table 3B has a second output table 5B for sorting the outputs that are stored in the first output table 5A in reverse order and storing the results thereof. Both the transition information and the outputs stored in tables 4B and 5B, respectively, follow a sequential order of steps shown in sequence chart 2 (Fig. 4). The sequence chart controller 2A has a first SFC program running means 7A which sequentially executes the control program stored in the first output table 5A according to the sequence set forth in sequence chart 1 (Fig. 4). This is done in accordance with the transition information stored in the first transition table 4A in a manner similar to that of the prior art described above. However, the sequence chart controller 2A also has a second SFC program running means 7B which stops the execution of the control program stored in the first output table 5A when a preset program running condition is not established. For example, when a failure in operation of the machine is experienced, the control program cannot be run successfully; this causes the sequence controller 2A to stop the execution of the program. In the alternative, the second SFC program running means may stop the running of the control program upon receiving a reversing command signal, represented by switch 12 and signal line 10 (Fig. 1). The second SFC program running means 7B, upon either of these conditions, runs the corresponding control program stored in the second output table 5B, starting with the step number currently stored in the active step number table 6. The active step number would be the current step number of the control program at the time operation was stopped. The sequence chart controller 2A also includes SFC program run resuming means 8 which stops the running of the control program stored in the second output table 5B when the aforementioned program run stopping condition is reestablished or a new external command is entered. This causes the first program running means 7A to resume the running of the output program stored in the first output table 5A in accordance with the transition information stored in the first transition table 4A, as described above. The execution of the control program resumes with the step number then stored in the active step number table 6. Fig. 2 is a flow chart illustrating the operation of the sequence chart controller 2A. The operation of the sequence chart controller 2A begins at block 100. At block 101, the first SFC program running means 7A obtains the step number to be executed from the active step number table 6. It then determines whether or not the step is an END (E) step or not, at decision block 102. If the step is an E step, the operation is terminated without further execution. If the step is not an E step, the execution progresses to block 103, where the presence of the reversing command signal transmitted by switch 12 and signal line 10 is checked. If the signal is not present, an operation is performed according to the first sequence chart table 3A. In this case, operations are performed as per blocks 203 through 209 in Fig. 8, as described in the prior art. The operation then returns to block 101. If the operator has pressed the reverse command switch 12 to switch on the reversing command signal 10, for example, the second sequence chart table 3B is executed. As described above, the second sequence chart table 3B contains a control program in reverse order to that in the first sequence chart table 3A. Hence, if the reversing command signal 10 is switched on during the gauge return operation at step 4 of sequence chart 1 (Fig. 4), output Y2 is provided according to the second output table 5B in the second sequence chart table 3B (see Fig. 5). Since this output is a gauge outgoing operation signal, the machine performs the reverse operation, i.e., switches from the gauge return operation to the gauge output operation. The timing chart of Fig. 3. illustrates the outgoing and return operations, and the "Y" outputs associated with each. When limit X2 is reached during the gauge outgoing operation, the pointer is shifted to the step subsequent to step 4 according to the transition table 4B; thus, step 3 is set as the active step number for execution. Thus, by turning on the reverse command signal 10 and switching control to the second sequence chart table 3B, the machine operation is performed in the reverse direction according to the sequence chart. By switching off the reversing command signal 10 during the reverse operation, control is switched back to the first sequence chart table 3A. Since the step number stored in the active step number table 6 is executed at that time, the operation can be resumed from where the reverse operation has been halted. The sequence chart 1 of Fig. 4 sets forth a sequence of steps to be executed in the control program, as described above. As in prior art Fig. 9, described above, the blocks having numerals inserted therein indicate a sequence of steps 1-7 performed by the sequence controller 2A. The output numbers Y0, Y1, Y2, Y10, Y11 and Y12 represent the same (exemplary) operations of the machine as in the prior art description. Similarly, the transition information X0, X1, X2, X10, X11 and X12 represent the same limits as in the prior art description. Sequence chart 2 of Fig. 4 depicts the sequence of steps making up the control program in sequence chart 1 in reverse order. The two control programs are stored in first sequence chart table 3A and second sequence chart table 3B, respectively (Fig. 5). With reference to Fig. 5, the first sequence chart table 3A is composed of first transition table 4A and first output table 5A. The first transition table 4A stores the step numbers 0-E and the corresponding transition information numbers X0-X12. Step numbers progress from top to bottom according to sequence chart 1. First output table 5A stores outputs numbered Y0-Y12 corresponding to the step numbers. The second sequence table 3B is composed of second transition table 4B and second output table 5B. Tables 4B and 5B store the same transition information and outputs as the first transition table 4A and the first output table 5A, but in reverse order. With reference to Fig. 6, the transition table 4A sorts the step numbers in reverse order with the exception of steps 0 and E. The result of the sorting is shown as a transition table 4C. It should be noted that, if the information in transition table 4C were used in place of the data in transition table 4B, then the reverse operation of the machine would not be controlled according to the proper sequence. For example, if the control program were stopped at step 4 of sequence chart 1, the normal return operation of the gauge (not shown) would be stopped. The sequence controller 2A would then begin executing the control program stored in table 5B beginning with step 4. At this time, an outgoing operation of the gauge would be performed according to step 4 of sequence chart 2 (Fig. 4). However, the transition information corresponding to step 4 in transition table 4C does not have the proper transition condition required to terminate the Y2 outgoing operation of the gauge. Instead of having transition information X12, the transition table should contain the transition condition X2. To overcome this problem, as illustrated in Fig. 6, transition information designated by two-digit numbers are exchanged with the information designated by a one-digit number, and the information designated by a one-digit number is exchanged with the transition information designated by a two-digit number. For example, transition information designated by X1n is exchanged with information designated as Xn and transition information designated as Xn is exchanged with the transition information X1n. The results of the conversion are stored in transition table 4B. A similar conversion is made to store the outputs of table 5A in table 5B, which results in the outputs simply being reversed in this case. Thus, the above-described conversion process transforms the sequence of steps making up the control program of sequence chart 1 into the control program of sequence chart 2 (Fig. 4). It will be appreciated that one sequence chart for ordinary operation and one for the reverse operation written for the above embodiments may be replaced by a plurality of reversing command signals and a plurality of reverse operation sequence charts to perform the reverse operation in accordance with the machine status when there are a plurality of reversing processing procedures. It will be apparent that the invention, as described above, allows a programmable controller to generate a reverse operation sequence chart from an ordinary operation SFC program sequence chart for alternative execution. Therefore, according to the present invention, if the operation of a machine has failed, the reverse operation can be controlled so that the cause of failure can be removed and the machine may resume ordinary operation without restarting the entire sequence.

Claims: A programmable controller (1A) for controlling a machine in accordance with output signal commands (Y) sequentially arranged corresponding to step number (0,1,2...E) in a sequential function program, SFC, wherein an output signal command (Y0...Y10) is output (203) in accordance with an active step number indicated by an active step number means (6) and an input condition (X) relating to an operating condition of said machine due to said output command (Y) is compared with a transition condition (Y0...X12) that the machine should assume during said active step, comprising: a) a first transition table (4A) for storing with increasing step numbers transition conditions (X0...X12) to be compared with said input conditions (X0...X12) corresponding to a respective active step in said SFC program; b) a first output table (5A) for storing said output signal commands (Y0...Y10) corresponding to said active steps with increasing step numbers; c) a second transition table (4B) for numbering the transition conditions sequentially in reverse order (7...1) to that (1...7) stored in said first transition table (4A), and storing the results; d) a second output table (5B) for storing said output signal commands (Y10...Y0) stored in said first output table (5A) in a reverse order to that in said first output table (5A); e) first SFC program running means (7A) for sequentially executing said output signal commands (Y0...Y10) stored in said first output table (5A) sequentially in the order of step numbers and in accordance with the transition conditions (X0...X12) stored in said first transition table (4A); f) second SFC program running means (7B) for stopping the execution of the output signal commands (Y0...Y10) stored in said first output table (5A) when a preset program running condition (12) is not established or an external command (12) is entered; and for executing output signal commands (Y) stored in said second output table (5B) in accordance with the corresponding transition conditions (X12...X0) stored in said second transition table (4B) sequentially starting with a step number where the execution has been stopped; and g) SFC program running means (8) for stopping the use of the output signal commands (Y12...Y0) stored in said second output table (5b) when said program running condition is re-established or a new external command (12) is entered; and for resuming the execution of the output signal commands (Y0...Y10) stored in said first output table (5A) in accordance with the corresponding transition conditions (X0...X12) stored in said first transition table (4A) sequentially starting with a step number where the use of the output signal commands (Y12...Y0) of said second output table (5B) has been stopped. A programmable controller according to claim 1, characterized by said active step means (6) storing step information corresponding to a step currently performed by said first and second SFC program running means (7A, 7B), wherein said second SFC program running means (7B) starts execution of a corresponding signal command (Y) of said second output table (5B) in accordance with a step stored in said active step means (6). A programmable controller according to claim 2, further comprising: a) means (9) for receiving said input transition conditions (X0...X12) relating to said operation of said machine; b) means (11) for outputting program control information to control said machine in accordance with said corresponding output signal command (Y); c) wherein said first and second SFC program running means (7A, 7B) output program control information associated with said step information stored in said active step means (6), said first and second SFC program running means (7A, 7B) being responsive to transition conditions (X0...X12) received by said receiving means (9). An SFC program running method for a programmable controller (1A) for controlling a machine in accordance with output signal commands (Y) sequentially arranged corresponding to step number (0,1,2...E) in a sequential function program, SFC, wherein an output signal command (Y0...Y10) is output (203) in accordance with an active step number indicated by an active step number means (6) and an input condition (X) relating to an operating condition of said machine due to said output command (Y) is compared with a transition condition (Y0...X12) that the machine should assume during said active step, comprising the following steps: a) storing a first transition table (4A) with increasing step numbers transition conditions (X0...X12) to be compared with said input conditions (X0...X12) corresponding to a respective active step in said SFC program; b) storing in a first output table (5A) said output signal command (Y0...Y10) corresponding to said active steps; c) numbering the transition conditions in reverse order to that stored in said first transition table (4A), and storing the results into a second transition table (4B); d) sorting the output signal commands (Y0...Y10) stored in said first output table (5A) in a reverse order and storing the results (Y10...Y0) into a second output table (5B); e) executing said output signal commands (Y0...Y10) stored in said first output table (5A) sequentially in the order of step number and in accordance with the transition conditions (X0...X12) stored in said first transition table (4A); f) stopping the execution of the output signal commands (Y0...Y10) stored in said first output table (5A) when a preset program running condition (12) is not established or an external command (12) is entered and executing corresponding transition condition stored in said second transition table (4B), starting with a step number where execution has been stopped; and g) stopping the execution of the output signal commands stored in said second output table (5b) when said program running condition (12) is re-established or a new external command (12) is entered, and resuming the execution of the corresponding transition condition stored in said first transition table (4A), starting with a step number where execution of the output signal command of said second output table (5B) has been stopped.

Inventors: IWATA YASUNOBU, IWATA, YASUNOBU, IWATA, YASUNOBU, C/O MITSUBISHI DENKI K.K.
Applicants: MITSUBISHI ELECTRIC CORP, MITSUBISHI DENKI KABUSHIKI KAISHA
Application year: 1991
Main classification: G05B19
IPC codes: G05B19, G05B9