TROUBLE DIAGNOSIS APPARATUS FOR CONTROLLED DEVICE

Abstract: Trouble of a plurality of controlled devices operating in asynchronism with each other can be diagnosed by only connecting a trouble diagnosis apparatus (4) to the conventional programmable controller, without preparing a special trouble diagnosing program on the user program. In another trouble diagnosis apparatus, the reference diagnosis input/output pattern series can be formed by first storing all the input/output pattern series and then deleting unchanged input/output from those to be diagnosed. Further, another trouble diagnosis apparatus includes an input/output designation mode, an instruction mode and a diagnosis mode. In the input/output designation mode, operator can designate important input/output to be registered and deletes unimportant input/output from all the input/output to be diagnosed to find fault locations.

Description: The present invention relates to a fault diagnosis apparatus for device controlled by a programmable controller. Prior Art and Prior Application Conventionally, when a device or devices controlled by a programmable controller develop fault, the troubleshooter finds a fault location by observing the fault conditions or inspecting them through a synchroscope or multimeter. However, this method takes much troubleshooting time and further requires the troubleshooter who has full knowledge of the sequence circuits and the device in order to securely find fault locations. To overcome the above-mentioned problems, a model pattern of change in input/output signals obtained when the device is operating normally is previously formed manually, in order to check whether the actual pattern matches the model pattern when the device is operating by a diagnostic program incorporated in the programmable controller. In this method, however, there still exists a problem in that it takes much time to prepare the model pattern of input/output signal change. Further, this model pattern can be prepared by only a person who has full knowledge of the sequence circuits. In addition, there exists a probability that fault occurs at locations not represented by the model pattern. As described above, where trouble diagnosis by the programmable controller is dependent upon such a method that input/output conditions anticipated when fault occurs are previously examined by the user itself so as to be incorporated in the user program, complicated work is required for setting trouble conditions and programming. Therefore, once the user program has been completed, it is extremely troublesome to incorporate a fault diagnosis program in the user program. To overcome the above problem, a novel fault diagnosis apparatus has been proposed in JP-A-62-49518, in which a programmable controller is operated actually to learn the transition of input/output pattern conditions, and the normal operation is monitored by comparison between the previously learned pattern conditions and the actually operating pattern conditions. In the diagnosis apparatus as described above, although the user itself need not set fault conditions, there still exists a problem in that when a plurality of asynchronous controlled devices must be controlled simultaneously, it is difficult to accurately determine fault conditions. A fault diagnosis apparatus according to the preamble of claim 1 is known from Control Engineering, Vol. 30 (1983) Jan., No. 1, St. Pontiac, Illinois, USA, CE FORUM, Art Pietrzyk; Machine Diagnostics Add To PC Productivity Gains. With the above problems in mind, therefore, it is the primary object of the present invention to provide a fault diagnosis apparatus in a programmable controller by which reference diagnosis data can be prepared easily, without depending upon user's fault diagnosis program, even when a plurality of asynchronous controlled devices are controlled simultaneously. It is another object of the present invention to provide a fault diagnosis apparatus in a programmable controller, by which a model pattern of input/output signal change obtained when a controlled device is operating under the normal conditions is automatically prepared effectively, and further fault diagnosis for the devices can be achieved without incorporating the fault diagnosis program in the user program. To achieve the above-mentioned object, a fault diagnosis apparatus according to the present invention, comprises (a) mode setting means for selectively setting operation mode to one of instruction mode and diagnosis mode; (b) instruction operation control means for causing the programmable controller to control a single designated control device when the instruction mode is set, monitoring a change in an output pattern of the programmable controller and storing changed input/output pattern in storage means in association with a registered number of the designated controlled device whenever the output pattern of the programmable controller changes; and (c) diagnosis operation control means for discriminating whether the input/output pattern of the programmable controller matches each input/output pattern constituting input/output pattern series stored together with the registered number within each predetermined monitoring time period when the diagnosis mode is set, diagnosing that the controlled device develops trouble when the input/output pattern does not match, and informing locations at which the input/output pattern does not match the instructed and stored input/output pattern as fault locations of the controlled device related to the registered number. According to the above-mentioned construction, since reference diagnosis data are automatically prepared for each registered device number when the instruction mode is set and since trouble diagnosis operation starts for each registered device number when the diagnosis mode is set, it is possible to securely diagnose each of a plurality of devices controlled by a single programmable controller in asynchronism with each other. Further, a trouble diagnosis apparatus for a device controlled by a programmable controller, according to the present invention, comprises (a) mode setting means for selectively setting operation mode to any one of instruction mode and diagnosis mode; (b) instruction operation control means for monitoring an output pattern of the programmable controller when the instruction mode is set, storing in sequence the changed input/output pattern whenever the output pattern changes, and deleting unchanged input/output of the obtained input/output pattern series from those to be diagnosed; and (c) diagnosis operation control means for discriminating whether an input/output of the programmable controller matches each input/output pattern constituting stored input/output pattern series within each predetermined monitoring time period when the diagnosis mode is set, diagnosing that the controlled device develops trouble when the input/output pattern does not match, and informing locations at which the input/output pattern does not match the instructed and stored input/output pattern as fault locations. According to the above-mentioned construction, it is possible to automatically and effectively prepare a model pattern of input/output signal changes obtained when the controlled device is operating normally, and further it is possible to diagnose trouble of the controlled device without incorporating a trouble diagnosis program in the user program. In particular, since only the input/output pattern series related to trouble can be prepared automatically without storing unnecessary input/output patterns, it is possible to reduce the memory capacity markedly and implement a large-scale trouble diagnosis. Further, a trouble diagnosis apparatus for a device controlled by a programmable controller, according to the present invention, comprises: (a) mode setting means for alternatively setting operation mode to any one of an input/output designation mode, an instruction mode and a diagnosis mode; (b) input/output designation control means for designating registration of input/output to be diagnosed in the programmable controller or deletion of input/output to be excluded from diagnosis when the input/output designation mode is set; (c) instruction operation control means for monitoring an output pattern of the programmable controller when the instruction mode is set, storing the changed input/output patterns whenever the output pattern changes, and deleting input/output designated as to be deleted from the obtained input/output pattern series to be diagnosed; and (d) diagnosis operation control means for discriminating whether an input/output pattern of the programmable controller matches each input/output pattern constituting stored input/output pattern series within each predetermined monitoring time period when the diagnosis mode is set, diagnosing that the controlled device develops trouble when the input/output pattern does not match, and informing locations at which the input/output pattern does not match the instructed and stored input/output In the drawings: Figs. 1 to 8 show a first embodiment of the present invention; Fig. 1 is a block diagram showing a programmable controller to which the present invention is applied; Fig. 2 is a detailed block diagram showing a trouble diagnosis unit; Fig. 3 shows a general flowchart for assistance in explaining the operation of the fault diagnosis unit; Fig. 4 shows a detailed flowchart for assistance in explaining the operation of the instruction operation control processing; Figs. 5a and 5b show detailed flowcharts for assistance in explaining the operation of the diagnosis operation control processing; Fig. 6 is an illustration for assistance in explaining an example of input/output pattern transition; Fig. 7 is a memory map showing the contents (the reference input/output patterns, in particular) of the memory unit; Fig. 8 is a memory map showing the entire construction (monitoring timer area, registered No. etc., in particular) of the memory unit; Figs. 9 to 15 show a second embodiment of the present invention; Fig. 9 is a flowchart for assistance in explaining the operation of the first teaching operation control processing; Fig. 10 is a flowchart for assistance in explaining the operation of the second teaching operation control processing; Figs. 11a and 11b are flowcharts for assistance in explaining the operation of the diagnosis operation control processing; Fig. 12 is an illustration for assistance in explaining an example of input/output pattern transition; Fig. 13 is an illustration for assistance in explaining the reference input/output patterns prepared by the first teaching operation; Fig. 14 is an illustration for assistance in explaining the reference input/output patterns prepared by the second teaching operation; Fig. 15 is a memory map showing the entire construction of the memory unit; Figs. 16 to 19 show the third embodiment of the present invention; Fig. 16 is a general flowchart for assistance in explaining the operation of the fault diagnosis apparatus; Fig. 17 is a flowchart for assistance in explaining the operation of the input/output designation operation control processing; Fig. 18 is a flowchart for assistance in explaining the operation of the second teaching operation control processing; and Fig. 19 is an illustration for assistance in explaining the reference input/output patterns prepared by the second teaching operation. Fig. 1 is a block diagram showing a system configuration of a programmable controller of building block type to which the present invention is applied. In the drawing, the programmable controller system comprises a system bus 1, a CPU unit 2, a plurality of I/O units 3, and a fault diagnosis unit 4 related to the present invention. Here, a power supply unit or other elements are omitted. A plurality of controlled devices (not shown) are connected to the I/O units 3, respectively. These controlled devices operate in accordance with a predetermined sequence under control of the programmable controller. A different registered number (0 to n) is assigned to each of these controlled devices, respectively. As shown in Fig. 2, the fault diagnosis unit 4 comprises an arithmetic unit 41 composed of a microprocessor; a memory unit 42 composed of a RAM to store reference diagnostic data for each registered number of each controlled device; a clock unit 43 composed of a reference clock generator, counters, etc.; a display unit 44 for displaying input/output signals or data corresponding to fault locations and fault occurrence; and a console unit 45 for giving instructions as to mode selection, start, registered number setting, etc. Further, the arithmetic unit 41 is connected to the system bus 1 via an interface 46. Fig. 3 shows a general flowchart of the operation of the fault diagnosis unit 4 of the present invention. Control first checks whether the mode is set to a teaching mode or to a diagnosis mode through the console unit 45 (in steps 300 and 301). If the teaching mode is set (in step 300), teaching operation control processing is executed (in step 302). If the diagnosis mode is set (in step 301), diagnosis operation control processing is executed (in step 303), alternatively. Further, if the mode is not set to the teaching mode or diagnosis modes (in steps 300 and 301), console unit control processing (registered number designation, monitoring timer data designation, various parameter settings, etc.) can be executed (in step 304). This console unit control processing (in step 304) can be executed in parallel with other processings, in practice. However, Fig. 3 represents the console unit control processing independently as a matter of convenience. Fig. 4 shows the operation of the teaching operation control processing. Control first checks whether the teaching mode is operative (in step 400). If NOT (in step 400), control checks whether the teaching operation start assigned by a registered number is designated by the console unit 45 (in step 401). If YES (in step 401), a teaching operation flag is set to "1" (in step 402), and an inputted registered number related to teaching is stored (in step 403). A step counter STEP is initialized to zero (in step 404). The input/output pattern at this time is stored as a STEP = 0 data (in step 405). Thereafter, the step counter STEP is incremented (in step 406). Here, an input/output pattern implies an input signal pattern and an output signal pattern together, which represents a plurality of input/output signal conditions (represented by "1" or "0") of the programmable controller related to a registered control device. When the succeeding teaching operation control processing is required, since YES (in step 400), control checks whether the teaching operation control processing end is designated (in step 407). If NO (in step 407), control checks whether the output pattern of the present time changes from the output pattern of the input/output pattern stored in previous step 405 (in step 408). If YES (in step 408), control stores the input/output pattern related to the present step designated by the step counter STEP (in step 405), and increments the step counter STEP (in step 406), repeating the above steps until the teaching operation control processing end is designated (in step 407). Further, if NO (in step 408), since the input/output pattern does not change, control proceeds to the succeeding processing as it is. Here, the reason why change in output pattern is checked will be described hereinbelow. The output signal pattern of the programmable controller changes according to the input signals thereof. However, since there are various input signal forms such as analog input signals, relay input signals, etc., when the input/output signal pattern is sampled by detecting change in input signals, the period of the input/output pattern (time transition) is not necessarily repeated in the same condition. In addition, when a count instruction is executed in the user program, for instance, such a control that the number of inputs is counted and then the counted number is transferred to the output is very often executed. Therefore, if change in input signals is detected for processing, since the number of changes is excessively great, the capacity of the memory for storing the input/output patterns becomes huge. In contrast with this, when the input pattern and the output pattern are detected simultaneously at the time when the output pattern changes, it is possible to reduce the above-mentioned disadvantage and to check the influence of input signals upon output signals readily. On the basis of the above reason, change in output pattern is detected and both the input/output patterns are registered. If YES (in step 407), since teaching operation control processing end is designated, the teaching operation flag is reset to "0" to complete the processing (in step 409). Therefore, when such a user program in which inputs I and II and output I change as shown in Fig. 6 is taken by way of example, since the output I changes at scanning times t₁ and t₁₀ during programmable controller operation, the changed input/output patterns are stored in sequence at memory locations corresponding to each step value of the registered number in the memory unit 42 as listed in Fig. 7, so that a set of reference diagnostic data can be obtained. Further, as shown in Fig. 8, it is possible to store a plurality of the reference diagnostic data by preparing reference diagnostic data, in accordance with the processing explained with reference to Fig. 4, for each registered controlled device (with each registered No.) in sequence. Since all input ports and output ports of the programmable controller are designated by numbers (Nos.), output Nos. and input Nos. to be diagnosed and corresponding to the controlled device are registered in the output No. table and the input No. table as shown in Fig. 8. These input/output Nos. can be registered in the output No. table and the input No. table by depressing keys of the console unit 45 or automatically when the instruction operation ends. The automatic registration can be realized by deleting the input/output Nos. in which signals do not change in all the steps (described later in more detail in another embodiment) within the system. Further, the monitoring timer data shown in Fig. 8 can be set by operating keys of the console unit 45 or automatically on the system side. In the case of the automatic setting, the maximum transition time (time between the preceding change in output signal and the succeeding change) of each input/output pattern is stored, and the timer data can be obtained easily by multiplying this maximum value by a constant. In summary, the magnitude of this monitoring timer data can be determined on the basis of the allowable time during which the mismatching of input/output patterns can be allowed when a controlled device develops trouble. Further, it is also possible to store the reference diagnostic data prepared as described above in an external memory device (e.g. a floppy disk) by operating the console unit 45, as is well understood by those skill in the art. As described above, where a plurality of devices are controlled simultaneously by a single programmable controller, since these devices are usually operating in asynchronism with each other, the input/output pattern transition is not necessarily the same, even if the input/output patterns are registered on the basis of time points at which output signals change. In the diagnosis unit of the present invention, however, when a plurality of controlled devices are operated one by one without operating them simultaneously and changes in input/output patterns are stored for each registered number of the controlled device, it is possible to perform reliable fault diagnosis by repeatedly using the same reference diagnostic data corresponding to each device operation. The fault diagnosis operation control processing of this type will be described hereinbelow. When the diagnosis mode is set by the console unit 45, the diagnosis operation control processing starts, as shown in Fig. 5. Control first checks whether the controlled device of the registered No. designated by the console unit is now being diagnosed (in step 500). If NO, control stands by a diagnosis start instruction (in step 501). If NO (in step 500) but YES (in step 501), since diagnosis start is instructed, control sets the registered No. diagnosis flag to "1" (in step 502), and resets the registered No. step counter STEP to "0" and the registered No. match flag to "0" (in steps 503, 504) to start diagnosis operation. In this diagnosis operations control sets the input/output pattern (see Fig. 8) of the current STEP value ("0" at first) stored in the area of the registered No. designated as the reference input/output pattern (in step 505). Control sets the monitoring time data determined in step 304 shown in Fig. 3 to a monitoring timer, and starts the monitoring timer (in step 506). Thereafter, control checks whether the current input/output pattern specified by the input/output No. table matches the reference input/output pattern before the monitoring timer is up (in step 507). When control confirms that the current input/output pattern specified by the input/output No. table matches the reference input/output pattern (YES in step 507) before the monitoring timer time is up (NO in step 508), control sets the registered No. match flag to "1" (in step 511), turns off the abnormal output (in step 512), and increments the registered No. step counter STEP (in step 513), repeating the above operations for the succeeding step. From the succeeding step value to the diagnosis stop designation (YES in step 509), when the registered No. match flag is present (YES in step 510), the registration of the succeeding pattern (in step 504, 505) and the checking of pattern matching (in step 507) are repeated. On the other hand, when the registered No. match flag is absent (NO in step 510), the checking of pattern matching is repeated (in step 507). For instance, when the input/output pattern does not match the reference pattern (in step 507), this diagnosis operation control processing ends (after NO in step 508). However, when the diagnosis operation control processing routine is called again after a predetermined time has elapsed, since NO (in step 510) after steps 500 and 509, a new input/output pattern is compared again with the reference pattern set (in step 505). When the current input/output pattern does not match the reference input/output pattern before the monitoring timer time is up, the controlled device is determined to develop fault. Therefore, when the monitoring timer time is up (YES in step 508), an exclusive OR sum of the current input/output pattern specified in the input/output No. table and the reference input/output pattern is found and set as fault location data (in step 516). An abnormal output (e.g. buzzer) for the corresponding control device is turned on (in step 517) and also displayed on the display unit 44. Therefore, it is possible to visually inform the operator of a falut locations where the current input/output pattern does not match the reference input/output pattern. When the registered No. diagnosis stop is designated (in step 509), the diagnosis flag is reset to "0" (in step 518) and control processing ends. As described above, since each registered controlled device is diagnosed independently, it is possible to diagnose fault of a plurality of devices controlled by a single programmable controller in asynchronism with each other. A second embodiment in which input/output data unchanged throughout all the steps are deleted will be described hereinbelow. To this embodiment, the system configuration shown in Fig. 1, the fault diagnosis unit configuration shown in Fig. 2, and the general flowchart shown in Fig. 3 are all applicable as they are. Further, in this embodiment, the number of the controlled device is assumed to be one for simplification. Therefore, in the console unit control processing (in step 304 in Fig. 3), various parameters are set but no registered number is designated. Further, the data necessary for a single controlled unit are stored in the memory unit 42 as shown in Fig. 15. In this embodiment, the teaching operation control processing is divided into a first teaching operation and a second teaching operation. In the first teaching operations input/output patterns are registered. In the second teaching operation, the input/output patterns registered in the first teaching operation are compressed as described later in more detail. The first teaching operation is roughly the same as the teaching operation shown in Fig. 4. In the teaching operation control processing of the embodiment shown in Fig. 9, the corresponding steps as in Fig. 4 are denoted by the same reference numerals with A. In Fig. 9, when the teaching operation control processing starts, control checks whether the control processing is the first teaching operation or not (in step 400A). If NO, control checks whether the control processing is the second teaching operation or not (in step 410). If NO, control checks whether the first teaching start is designated (in step 401A). If YES, control sets the first teaching operation flag to "1" (in step 402A) and initializes the step counter STEP to "0" (in step 404A). Thereafter, control stores the current input/output pattern in a memory area designated by the step counter STEP as shown in Fig. 13 (in step 405A) and increments the step counter STEP (in step 406A). When the succeeding teaching operation control processing is called, since the first teaching is operative (in step 400A), control checks whether the end is designated (in step 407A). If NO, control checks whether the output pattern changes (in step 408A). Here, if YES, control stores the changed input/output pattern in an area designated by the step counter STEP as shown in Fig. 13 (in step 405A), increments the step counter STEP (in step 406A), continuing the processing, and repeats the above processing until the end is designated (in step 407A). Further, in the above processing, when the output pattern does not change (NO in step 408A), control proceeds to the next processing without execution. In contrast with this, when control checks that the end is designated (YES in step 407A), control resets the first teaching operation flag to "0" (in step 409A) and executes the second teaching operation (in step 411). As described above, as the result that the first teaching operation control processing is executed, when assumption is made that there are three inputs I, II, III and three outputs I, II, III as shown in Fig. 12, the input/output data change for each scanning execution of the user program as shown in Fig. 12, and the input/output patterns are stored, as shown in Fig. 13, at time points t₁, t₄, t₇ and t₉ at which the outputs change. The second teaching operation control processing will be described. As shown in Fig. 10, when the second teaching operation starts, control first checks whether the control processing is the second teaching or not (in step 601). If NO, control sets the second teaching operation flag to "1" (in step 602), and initializes the step counter STEP to "0" (in step 603). Thereafter, control sets the STEP = 0 input/output pattern designated by the step counter STEP as the reference pattern (in step 604), and resets the comparison result data stored at a predetermined area of the memory unit or a register (in step 605), increments the step counter STEP (in step 606). After a predetermined time has elapsed and when the second teaching operation is called, since the second teaching is operative (in step 601), control checks whether the STEP value exceeds the end value (in step 607). If NO, control finds an exclusive OR sum (EOR) of the input/output pattern of the current step value and the reference input/output pattern. In this step, only the input/output data which have changed in comparison with the reference input/output pattern are set to "1" on the comparison result data. Further, control finds a logical sum (OR) of the current and preceding comparison result data as a new comparison result data (in step 608). Thereafter, the STEP value is incremented (in step 606). Therefore, "1" is produced on the comparison result data when the input/output data change even once. On the other hand, when the STEP value reaches (the final STEP value + 1) (YES in step 607), control deletes the input/output data which shows "0" (unchanged) on the comparison result data, and simultaneously registers only the input/output No. to be diagnosed in an input/output No. table as shown in Fig. 15 (in step 609). Thereafter, control resets the second instruction operation flag to "0" (in step 610), completing the processing. Here, the reason why unchanged input/output data are deleted from the memory unit will be described hereinbelow. The fact that input/output data do not change in teaching operation indicates that these input/output data are not used in teaching operation or no abnormal condition occurs (e.g. no alarm is produced). Since it is meaningless to monitor these data not used or not changed, these input/output data are deleted. As described above, once the second teaching operation is executed, unchanged input/output data are deleted from the stored input/output data as shown in Fig. 13, and only the changed input/output data are stored as shown in Fig. 14. The diagnosis operation control on the basis of the stored input/output pattern series is the same as that shown in Fig. 5. In this embodiment, since the controlled device is one, description related to the registered No. designation is unnecessary. The diagnosis operation control processing is shown in Fig. 11, in which the corresponding steps as in Fig. 5 are designated by the same reference numerals with A. In step 507A, the comparison between the current input/output pattern and the reference pattern is made for only the corresponding input/output data with reference to the input/output No. table, without comparison other input/output data with the reference pattern. Further, the monitoring timer data can be determined by multiplying the times (t₁ - t₀), (t₄ - t₁), (t₇ - t₄), or (t₉ - t₇) by a predetermined constant, for instance. The third embodiment by which it is possible to freely select input/output data necessary for fault diagnosis or those unnecessary therefor will be described hereinbelow. The system configuration shown in Fig. 1 and the fault diagnosis unit 4 shown in Fig. 2 can be applied to this embodiment as they are. Only a single controlled device is connected for simplification. The contents in the memory unit 42 are the same as in Fig. 15. Figs. 12 to 14 are usable for assistance in explaining compression operation of input/output pattern. Fig. 16 is a general flowchart for assistance in explaining the operation of this embodiment, in which the same processings as in Fig. 3 are designated by the same reference numerals without repeating the description thereof. In Fig. 16, when the operation of the fault diagnosis unit 4 is set, by the mode selection through the console unit 45, to any one of an input/output designation mode (in step 305) , a teaching mode (in step 300), and a diagnosis mode (in step 301), any one of an input/output designation operation control processing (in step 306), an teaching operation control processing (in step 302) and a diagnosis operation control processing (in step 303) is executed alternatively. Fig. 17 shows the flowchart for assistance in explaining the input/output designation operation control processing. In this drawing, when the input/output designation operation control processing starts, control checks whether an input/output registration is designated or not (in step 700). If NO, control checks whether an input/output deletion is designated (in step 701). If YES, an input/output No. to be deleted is designated and stored (in step 702). On the other hand, if an input/output registration is designated (YES in step 700), undeletable input/output No. is designated and stored (in step 703). The teaching operation control processing will be described. In the same way as in the second embodiment, the teaching operation control processing includes a first operation and a second teaching operation. In the first teaching operation, an input/output patterns are registered. In the second teaching operation, an input/output patterns registered in the first teaching operation are compressed. The operation of the teaching operation control processing is substantially the same as that shown in Fig. 9, therefore the description thereof being omitted herein. On the basis of this teaching operation control processing, it is possible to obtain input/output patterns as shown in Figs. 12 and 13. Fig. 18 shows the flowchart for assistance in explaining the second teaching operation control processing. Some steps in this processing are the same as in Fig. 10. The same reference numerals have been retained for the same steps, without repeating the description thereof. In Fig. 18, the deletion processing from step 611 to step 615 is different from that (step 609) shown in Fig. 10. Therefore, only the deletion processing will be described hereinbelow. When the STEP value becomes (the final STEP value +1) (YES in step 607), control deletes registered input/output data designated as deletion (in step 611) and extracts registered data of "0" (unchanged) from the comparison result data (in step 612). Control checks whether unchanged input/output data are present (in step 613). If YES, control checks whether the unchanged input/output data cannot be deleted (in step 614). If NO (i.e. can be deleted), control deletes these data from the registered data (in step 615). If YES (in step 614), control returns to step 612 without data deletion. When unchanged input/output data are absent or used out (in step 613), control resets the second teaching operation flag to "0" (in step 610), continuing the processing. Here, assumption is made that an input II is designated as undeletable and an input III is designated as deletable in the input/output designation operation. In this case, an teaching pattern as shown in Fig. 19 can be prepared on the basis of the above second teaching operation. In more detail, although the input II do not change, since these data are designated as undeletable data, it is impossible to delete these data. On the other hand, although the input data III change, since these data are designated as deletable data, these data can be deleted. The above operation will be clarified in comparison between the input/output patterns shown in Fig. 19 and that shown in Fig. 14. The reason why input/output data can manually be deleted or registered is as follows: when the device is in operation, there exist various input/output signals not directly related to the device operation such as input/output signals for display or those turned off under the normal conditions but on under abnormal conditions. Therefore, when input/output signals are not at all deleted, there exists a possibility that control determines an abnormal condition when input/output data for display change (these data changes are not abnormal). Further, since input/output signals turned off under the normal condition but on under the abnormal condition do not change under the normal condition, when these data are deleted from the registered input/output data to be diagnosed, there exists a problem in that abnormality is not informed when these input/output signals are abnormal. To avert the above-mentioned problems, input/output to be monitored can be registered manually and those not to be monitored can be deleted manually in order to implement more reliable diagnosis operation. Further, the diagnosis control processing of this embodiment is substantially the same as that shown in Fig. 11.

Claims: Fault diagnosis apparatus (4) for diagnosing a fault developed in a controlled device which is controlled by a programmable controller, having a preprocessing means (41) for causing the programmable controller to control the controlled device, checking a change in an output pattern of the programmable controller, and storing a changed input/output pattern indicating states of inputs and outputs of the programmable controller into storage means (42) whenever the output pattern of the programmable controller changes; and a diagnosing means (41, 44) for discriminating whether each input/output pattern constituting input/output pattern series stored in the storage means appears within each predetermined monitoring time period, determining that the controlled device develops fault when an input/output pattern which is equal to the stored input/output pattern does not appear, and informing of locations at which the input/output pattern does not match the stored input/output pattern as fault locations of the controlled device, characterized in that, with respect to a plurality of controlled devices operating simultaneously under the control of the programmable controller and each having assigned thereto a distinguishing means, the fault diagnosis apparatus further comprises a designating means (45) for selectively designating one of said controlled devices, the preprocessing means causes the programmable controller to individually control each designated single controlled device in sequence and stores the input/output pattern series of the programmable controller into the storage means in association with the designated controlled device, and the diagnosing means (41, 44) diagnoses each designated controlled device individually by performing said discriminating from said input/output pattern series stored in association with the designated controlled device and the input/output patterns of the designated controlled device appearing during monitoring. Fault diagnosis apparatus according to claim 1 characterized in that a registered number is assigned to each of the plurality of devices as a distinguishing means, the preprocessing means stores the input/output pattern of the programmable controller into the storage means in association with the registered number of the controlled device. Fault diagnosis apparatus according to claim 1 or 2, characterized in that the apparatus further comprises input/output designation means (45) for designating input/output not to be deleted. Fault diagnosis apparatus according to claim 3, characterized in that the preprocessing means deletes unchanged input/output data of the obtained input/output pattern from those to be diagnosed, but does not delete unchanged input/output data when the input/output data are designated as not to be deleted. Fault diagnosis apparatus according to claim 1 or 2, characterized in that the apparatus further comprises input/output designation means (45) for designating input/output to be deleted, and that the preprocessing means stores changed input/output pattern in sequence in the storage means whenever the output pattern of the programmable controller changes and deletes the input/output designated as to be deleted from the obtained input/output pattern series. Fault diagnosis apparatus according to claim 1 or 2, characterized in that the preprocessing means stores in sequence changed input/output patterns in said storage means whenever the output pattern of the programmable controller changes, and deletes unchanged input/output from the input/output pattern series obtained and stored in said storage means.

Inventors: HIRASE, KIYOTO OMRON TATEISI ELECTRONICS CO., SAKANO, MAKIO OMRON TATEISI ELECTRONICS CO.
Applicants: OMRON TATEISI ELECTRONICS CO.
Application year: 1988
Main classification: G05B19
IPC codes: G05B19