Abstract:
Disclosed is a sequential controller in which the step of control sequence for controlling various process control devices is advanced by a step advance unit basing on the time count by an answer-back timer. The controller includes an input check unit in which input collating check units provided for individual inputs to the control devices implement individual checking at each control step so as to detect abnormality of the control devices or abnormality of input to the related internal sections. Each input collating check unit compares the alloted input signal with the input expected value at the current control step retrieved from an input table in accordance with the input signal, and, in case both values are not consistent over the entire range at that step, it issues an alarm output if the input expected value at the current control step is consistent with the input expected value at the preceding control step, or it issues an alarm signal upon expiration of the answer-back timer if both input expected values are not consistent. The controller skips the answer-back checking when input expected values of each input at two consecutive control steps are equal, thereby preventing the malfunctioning in the input checking operation.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a sequential controller applied to the field of ordinary life or various industrial fields including mechanical and process plants for implementing the sequential control for various actuating devices, and more particularly to a sequential controller with the ability of an answer-back checking which operates in consideration of operation time of each controlled device when input expected values at two consecutive control steps are different. 
     2. Description of the Prior Art 
     In the field of ordinary life and in various industrial fields, there are widely used sequential controllers which control the operation of actuating devices, such as motors, solenoids, electromagnetic valves and cylinders, through preprogrammed logical operations for the detected values of controlled variables such as positions, levels, pressures and temperatures. 
     An example of conventional sequential controllers is shown in block diagram in FIG. 1. The sequence controller consists of a central processing unit (will be termed simply &#34;CPU&#34; hereinafter) 1 which controls each section of the controller and has a memory for storing the control sequence, an input unit 2 which receives signals from sensing devices in the form of relay contacts and limit switches, an input table 3 which stores the expected input signal pattern, an answer-back timer 4 which counts an answer-back time, an input check unit 5 which compares the input signals with the signal pattern in the input table 3 in accordance with the outputs of the CPU 1, input unit 2, input table 3 and answer-back timer 4, a step advance unit 6 which issues the current step number to the input table 3 and output table 7 (will be explained next) in response to the step advance signal provided by the input check unit 5, an output table 7 which is accessed by the CPU 1 and step advance unit 6 to release a prerecorded output pattern, an output unit 8 which produces output signals for controlling the operation of the actuating devices in accordance with the outputs of the output table 7 and CPU 1, and an alarm output unit 9 which produces an alarm signal based on the outputs of the CPU 1 and input check unit 5. 
     The operation of the foregoing system arrangement will be described. This sequential controller operates in compliance with a certain control procedure for the intended sequence control programmed in a step table (not shown). FIG. 2 is a detailed logic circuit diagram of the input check unit 5 in the sequential controller, and FIG. 3 is a flowchart showing control procedure of the input unit 5. The following describes the operation of the conventional sequential controller with reference to FIGS. 2 and 3. 
     Initially in step ST1, the output pattern of signals to be produced for lst output 1 through n-th output is read out of the output table 7 via the output unit 8 to the 1st output through n-th output. For example, the 1st through n-th outputs are given 1, 0, 0, . . . , 0 in step ST1. Then, the answer-back timer 4 starts counting time in step ST2, and subsequently signals from 1st input through n-th input are entered to the input check unit 5 via the input unit 2 in step ST3 as shown in FIG. 3. In step ST4, the expected values of these input signals received through the 1st through n-th inputs are compared with the input signal pattern which is set in the input table 3. Namely, for the above example, step 1 of sequence control tests whether or not input values of the 1st through n-th inputs as shown by the above step pattern are equal to 1, 0, 0, . . . , 0. If all input signals are consistent with the input pattern at the currently executed step in the input table 3 (will be termed &#34;current step input expected values&#34; hereinafter) as tested in step ST5, the control step is advanced in step ST6. If, on the other hand, step ST5 has detected inconsistency between any input signal and the corresponding input expected value, expiration of the answer-back timer 4 is tested in steps ST7 and ST8. Unless the timer 4 has expired, the operations following the input signal reading, i.e., steps ST3, ST4 and ST5 are repeated. If the steps ST7 and ST8 have detected the expiration of the answer-back timer 4, the input check unit 5 issues an alarm signal to the outside via the alarm output unit 9 in step ST9 so as to inform the abnormality of the control operation or the external device. 
     In case input expected values are different between two consecutive control steps, it is necessary to allow a certain suspension time before the end of the operation determined by the answer-back timer 4 in consideration that the pertinent controlled device is slow in operation and needs more time to respond to the activation signal. An example of this case is shown in the portion of 2nd input indicated by symbol Pa in FIG. 4, which is a timing chart showing the transition of the input 2 in the control step table. In another case where the current step input expected values are equal in two consecutive control steps, it is not necessary to provide an actuation signal for the controlled device for changing the state of the controlled device between the two control steps. In this case, however, execution of the sole answer-back checking mentioned above cannot detect the abnormal operation of the device, i.e., erroneous transition of the signal to &#34;1&#34; which ought to be &#34;0&#34;, as shown in the portion of 2nd input indicated by symbol Pb in FIG. 4. 
     The conventional sequence controller arranged as described above has a problem in which the answer-back checking takes place irrespective of whether current step input expected values of one input are equal or unequal between two consecutive control steps. 
     An example of the foregoing prior art sequential controller is described in Japanese Patent Publication Laid-open No. 57-52907. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a sequential controller which implements the answer-back checking in a prescribed manner when current step input expected values are different between two contiguous control steps, or implements the collation for the input state after advancement of the step with the expected input value when the current step input expected value is equal in two contiguous control steps, thereby ensuring the detection of a false operations of a controlled device and abnormality of an external device in the sequential control system. 
     In order to achieve the above objective, the inventive sequential controller is provided with an input check unit which compares the current step input expected value with the previous step input expected value for each input, so that if the comparison has revealed the consistence of both expected values, a check circuit in the input check unit tests as to whether each input is always equal to the current step input expected value, or for an input signal with its input expected value being different between the previous step and current step, the usual answer-back checking is carried out. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing an example of conventional sequential controllers; 
     FIG. 2 is a detailed schematic diagram of the input check unit in the above conventional sequential controller; 
     FIG. 3 is a flowchart showing the control algorithm of the above conventional sequential controller; 
     FIG. 4 is a timing chart explaining the input checking manner by the above conventional sequential controller; 
     FIG. 5 is a block diagram of the sequential controller embodying the present invention; 
     FIGS. 6A and 6B are schematic diagrams showing in detail the inventive input check unit in the above sequential controller shown in FIG. 5, where FIG. 6A shows the first through n-th input check circuits as a whole, and FIG. 6B shows any input check circuit 10 i  ; 
     FIGS. 7A and 7B are flowcharts used to explain the operation of the inventive sequential controller shown in FIG. 5, where FIG. 7A shows the operation of checking any input I i  using any input check circuit 10 i  of FIG. 6B, and FIG. 7B shows the operation of the input check unit 10 as a whole in the specific control step; 
     FIG. 8 is a control step table showing control events implemented by the inventive sequential controller; and 
     FIG. 9 is a timing chart explaining the input checking manner by the inventive sequential controller. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     A preferred embodiment of the present invention will now be described with reference to the accompanying drawings. FIG. 5 shows in block diagram the overall arrangement of the inventive sequential controller, in which functional blocks identical to those of the conventional sequential controller shown in FIG. 1 are referred to by the common symbols and explanation thereof will be omitted. The inventive system arrangement includes an input check unit 10 which receives the outputs of the input table 3, answer-back timer 4, step advance unit 6, and output table 7. 
     The input check unit 10, as shown in detail in FIG. 6, consists of a first input check circuit 101 for checking the first input, a second input check circuit 102 for checking the second input, and so on up to an n-th input check circuit 10n for checking the n-th input, an OR gate 21 which receives alarm outputs A1, A2, . . . , An provided by the input check circuits 101, 102, . . . , 10n and produces an alarm signal A, and an AND gate 22 which receives step outputs S1, S2, . . . , Sn of the input check circuits 101, 102, . . . , 10n and produces a step advance signal S. Since all input check circuits 101, 102, . . . , 10n have the same internal circuit arrangement, they will be explained using generalized symbols in the following. 
     Each input check circuit consists of an exclusive-OR gate 11 which receives a current step input expected value a and an input I, an exclusive-OR gate 12 which receives the current step input expected value a and a previous step input expected value b, an inverter 13 which produces a low-active signal in response to a high-active output signal of the exclusive-OR gate 12, an AND gate 14 which receives the output of the exclusive-OR gate 12 and the timer expiration signal from the aforementioned answer-back timer 4, an OR gate 15 which receives the outputs of the inverter 13 and AND gate 14, an inverter 16 which produces a low-active signal as the step output S1 in response to a high-active output signal from the exclusive-OR gate 11, and an AND gate 17 which takes a logical product for the outputs of the exclusive-OR gate 11 and OR gate 15 to produce the alarm output A 1 . 
     As will be appreciated from the above description and illustration in FIG. 6 of the logical circuit arrangement, the input check unit 10 and its constituent input check circuits 101, 102, . . . , 10n have their input-output relationship expressed as follows; ##EQU1## 
     Next, the operation of the inventive sequential controller arranged as described above will be described. 
     First, in an example of any input signal I i  taken among a number of inputs I 1  through I n , how to check the input signal I i  inputted to any input check circuit 10 i  shown in FIG. 6B will be explained using FIG. 7A. If the control step is advanced, output signal is transmitted from the output table 7 through the output 8 to a terminal controlled device (not shown) (block 30A). The step table shown in FIG. 8 is made up of an output table in the upper section and an input table in the lower section. The output table 7 is prerecorded for the output pattern to be produced for the first output through the n-th output. Command control of the output signal is performed by the CPU 1 incorporating the memory, and the CPU 1 also starts the answer-back timer 4 which starts counting (block 31A). The CPU 1 reads out the input table 3 the current step input expected value a i  of the output table 7 corresponding to the current step, and also reads out of the memory the previous step input expected value b i  stored temporarily within the memory. These input expected values a i  and b i  are read in the input check circuit 10 i  (block 32A). Subsequently, the input signal I i  outputted through the input unit 2 out of the controlled device (not shown) is read in the input check circuit 10 i  (block 33A); thus preparation of the input check operation of the input check circuit 10 i  is finished. 
     Next, actual input operation will be described. First, the exclusive-OR gate 12 i  judges whether the current step input expected value a i  is consistent with the previous step input expected value b i , i.e., the input expected values a i  and b i  through the two steps meet condition that a i  =b i  (block 34A). If consistency exists, since output of the exclusive-OR gate 12 i  always becomes &#34;0&#34;, even if the time-up signal t i  of output &#34;1&#34; is inputted to the AND gate 14 i , output of the AND gate 14 i  is &#34;0&#34; and output of the inverter 13 i  is &#34;1&#34; and therefore output of the OR gate 15 i  becomes &#34;1&#34; so that significant signal &#34;1&#34; is always inputted to one input terminal of the AND gate 17 i . Consequently, when a i  =b i  actually, irrespective of whether the answer-back timer 4 has expired or not, the operation process flows from block 35A to block 36A, thereby consistency or inconsistency between the input signal I i  and the current step input expected value a i  is checked. The check operation in the block 36A is performed by the exclusive-OR gate 11 i  shown in FIG. 6B. The exclusive-OR gate 11 i  produces output &#34;0&#34; when the inputs a i  and I i  supplied to two input terminals are consistent either signal &#34;1&#34; or signal &#34;0&#34;. That is, the input expected values of the two steps are at state a i  =b i  and the input signal and the expected value are at state I i  =a i  (block 37A). In this case, output of the inverter 16 i  becomes &#34;1&#34; on account of inversion of input &#34;0&#34;, and the step advance output S i  in the input check circuit 10 i  transmits output &#34;1&#34; meaning transition to the AND gate 22. Consequently, if the input signal I i  and the input expected value a i  remain the same value until the set time of the answer-back timer has expired and all other input signals in the control step are consistent with the input expected value, the step advance signal S is outputted by the AND gate 22 (blocks 38A and 39A). If the control step is advanced to next step and operation of the blocks 31A through 39A is repeated. In the block 38A, since the input signal I i  is read per sampling time through the input unit 2 based on the prescribed sampling period before the answer-back timer 4 has expired, process flows through the forward path of the negative decision in block 38A and then the above-mentioned input check operation in the blocks 33A through 38A is performed per prescribed sampling time within the answer-back time. If the input signal I i  is inputted at value different from the input expected value a i  at any sampling time within the answer-back time, the negative decision is effected in block 36A and process flows through block 40A and alarm signal A is immediately outputted (block 41A); thereby abnormal state in the input signal I i  is detected. This operation will be described specifically in the logical circuit diagram of FIG. 6B. Output of the exclusive-OR gate 11 i  is changed from &#34;0&#34; into &#34;1&#34;; thereby the inverter 16 i  outputs &#34;0&#34; and the advance preparation of the control step is stopped at the time point. One input terminal of the AND gate 17 i  is always supplied with &#34;1&#34; (based on a i  =b i  as above described), and output of the AND gate 17 i  becomes &#34;1&#34; on account of output &#34;1&#34; of the exclusive-OR circuit 11 i . Consequently, one alarm output becomes  &#34;1&#34; and therefore the OR gate 21 immediately outputs the alarm signal A. 
     Next, referring to FIG. 7A again, operation of the input check circuit 10 i  will be described when the two values a i  and b i  of the current step and the previous step are inconsistent in block 34A. In this case, since the exclusive-OR gate 12 i  shown in FIG. 6B has output &#34;1&#34;, one input of the AND gate 14 i  always becomes &#34;1&#34; and therefore the answer-back timer 4 acts effectively. However, until the timer has expired and output of the AND gate 14 i  becomes &#34;1&#34;, process flows through path of 
     the negative decision in block 43A of FIG. 7A and check of the input signal in block 36A is performed. Even if the input signal I i  is not consistent with the input expected value a i , within the answer-back time, process is returned through block 45A to block 33A where the input signal I i  is read based on the prescribed sampling period. The input check is performed through flow of block 34A→&#34;NO&#34;→block 42A→block 43A→&#34;NO&#34;→the check operation in block 36A. If the input signal at any sampling time is consistent with the input expected value a i , process passes through block 44A and operation in block 38A is performed. When the timer 4 has expired, if the input signal I i  is consistent with the input expected value a i  and all other inputs are consistent with the expected values, the control step is advanced to next step. In other words, if the exclusive-OR gate 11 i  in FIG. 6B is changed from output &#34;1&#34; into output &#34;0&#34; and the inverter 16 i  is changed from output &#34;0&#34; into &#34;1&#34;, Further, if the step output S i  becomes &#34;1&#34; in checking of all other inputs, the AND gate 22 transmits the step signal S and the control step is advanced simultaneously to the time-up of the answer-back timer 4. Next, if a i  remains inconsistent with b i  and I i  remains inconsistent with a i  in block 45A until the time-up of the answer-back timer 4, the control operation flows through block 46A to block 41A so that the alarm signal A is outputted. More specifically, in FIG. 6B, output of the AND gate 14 i  becomes &#34;1&#34; on account of input &#34;1&#34; of the time-up signal t i  and &#34;1&#34; is inputted to one input terminal of the OR gate 15 i  thereby output of the OR gate 15 i  becomes &#34;1&#34;. One input terminal of the AND gate 17 i  is previously supplied with &#34;1&#34; and also the other input terminal thereof is supplied with &#34;1&#34;; thereby the alarm output A i  is transmitted and the OR gate 21 outputs the alarm output A. 
     Operation of the embodiment has been described mainly in operation of any input check circuit 10 i . Now, in order to summarize the operation explanation, the whole operation will be described using a whole flowchart of FIG. 7B and a signal characteristic diagram of FIG. 9. Each of a plurality of input check circuits 10 i . Now individually repeats the above-mentioned operation, and the input check circuits 10 i  as a whole check all input signals I 1  through I n  together in the specific control step. That is, when the control step is advanced to a new step in FIG. 7B, the output operation is performed in block 30B in similar manner to FIG. 7A and the answer-back timer 4 starts counting (block 31B). Both previous and current step input expected values a i  and b i  are read in each input check circuit 10 i  ; however, in FIG. 7B explaining operation of the input check unit as a whole, consistency between all input signals I 1  through I n  and all input expected values a 1  through a n  respectively is discriminated by the exclusive-OR gate 11 1  in each circuit 10 i . As supposed from the explanation in FIG. 7A, if the input expected values a i  and b i  in the two steps are inconsistent, since the input signal I i  is scarcely consistent with the input expected values a i  from the beginning of the control step, the negative decision in block 36B is frequently effected at the first sampling time. In this case, in the next decision block 34B, decision is effected as to whether the current step input expected value a i  and the previous step input expected value b i  are consistent respectively in the input table regarding the controlled device. Operation in the decision block 34B is specifically performed in the exclusive-OR gate 12 of each input check circuit 10 i  as above described. If the positive decision is effected in the block 34B, that is, if the current step input expected value a i  and the previous step input expected value b i  are consistent in one of a plurality of input check circuits 10 1  through 10 n   and the input signal I i  in the input check circuit 10 i  with two consistent input expected values is inconsistent with the input expected value a i  as the decision result, the alarm signal A is outputted in block 41B. This operation also can be explained specifically in that output &#34;1&#34; of the OR gate 15 i  is inputted to one input terminal of the AND gate 17 i  of the input check circuit 10 i  and output &#34;1&#34; of the exclusive-OR gate 11 i  is inputted to the other input terminal of the AND gate 17 i  thereby the alarm output A i  is immediately outputted. If the two input expected values a i  and b i  are inconsistent, the operation step is advanced to next decision block 43B and until the time-up of the answer-back timer 4 the input signal I i  is read per prescribed sampling time based on the set sampling period (block 33B) so that the decision operation of block 36B block 34B block 43B is repeated. If all input signals are consistent with input expected values respectively until the time-up of the answer-back timer 4, operation step is advanced to block 39B where process is advanced to next control step. If the control step is advanced, quite the same input check operation as the above-mentioned operation is repeated. 
     The above-mentioned input check operation will be explained referring to a time chart of FIG. 9 illustrating variation of the input expected signal a i , the input signal I i  and the time-up signal (counting value of the answer-back timer 4) t i . In FIG. 9, for convenience, the input signal I i  from one controlled device and the input expected values a i  and b i  (shown in one wave form because b i  is the previous input value) and the time-up signal t i  are only shown and the alarm output A i  is outputted by input check based on these signals. That is, FIG. 9 can be easily understood by supposing operation of each input check circuit 10 i  of FIG. 7A. First, from variation of the input expected value a i , i.e., b i  in FIG. 9, it is understood that between the first step and the second step and between the second step and the third step the two previous and current step input expected values a and b i  are inconsistent and that between the third step and the fourth step the values a i  and b i  are consistent. Next, variation of the input signal I i  is compared based on variation of the input expected values a i  and b i . At step 1, since the chart begins from the midway, it is assumed that no abnormal state occurs in the input signal I i , and at step 2 since the input expected values a i  and b i  are inconsistent the input check is performed until the time-up of the answer-back timer 4 (Flow from blocks 34A, 42A and 45A to block 33A in FIG. 7A is repeated.). Since the input signal I i  in FIG. 9(b) becomes signal &#34;1&#34; being consistent with the input expected value a i  at the read time point 50, the alarm output A i  is not produced regarding the input signal I i , and if no abnormal state occurs regarding other input until the time-up state step is advanced. At step 3, since the same operation step as the input check operation of step 2 is followed and then the input signal I i  and the input expected value a i  are consistent in required signal value &#34;0&#34; at the read time point 51, the alarm is not outputted in similar manner to step 2 but step is advanced simultaneously to the time-up of the answer-back timer 4. At step 4, since the input expected value a i  is &#34;0&#34; and the input expected value b i  at step 3 as the previous step is also &#34;0&#34;, it follows that a i  =b i  and the input check operation is performed as in blocks 34A, 35A and 36A of FIG. 7A. Since the actual input signal I i  at the step advance becomes signal value &#34;0&#34; being consistent with signal value &#34;0&#34; of the input expected value a i , flow of blocks 37A→38A→33A→34A is repeated and therefore no problem exists at the step advance. When the actual input signal I i  and the input expected values a i  become inconsistent, that is, &#34;I i  ≠a i  &#34;, the alarm output A i  and the alarm signal A are immediately outputted without relation to a counted value of the answer-back timer 4 through the blocks 34A→35A→36A→40A shown in FIG. 7A. Consequently, if signal with signal value &#34;1&#34;  being different from the input expected value a i  is inputted at the signal read time point 52, the alarm output A i  is immediately outputted as in FIG. 9(d). The input signal I i  becomes consistent with the input expected value a i  in signal value &#34;0&#34; again at the read time point 53. However, when the input expected values a i  and b i  are consistent, since abnormal state of the input signal I i  from the step advance time point until next step advance is all detected, the alarm A i  once outputted is not released and the step is not advanced. 
     In the foregoing embodiment a single answer-back timer is provided for the sequential controller. Even if the sequential controller is composed of a plurality (up to the number of inputs) of answer-back timers which may be provided for several inputs, so that the input check mode is changed in response to the detection of consistency between the current and previous step input expected values, with the same effectiveness as the above embodiment being attained. 
     According to the present invention, as described above, the input check unit is provided with a check circuit for detecting whether or not input expected values of the current step and previous step are consistent so that the usual answer-back checking or continuous checking for input values are selected, whereby the most suitable input checking can be accomplished for the operation of each controlled device and the occurrence of malfunctioning of a controlled device or abnormality of an external device can surely be alerted at high reliability.