Motion monitoring device and method
The operation monitoring device uses a control circuit to manage a monitoring timer and store reception status based on unique clear instructions, addressing the challenge of reduced accuracy and increased workload in WDT systems by accurately detecting program abnormalities.
Patent Information
- Application Number
- JP2020152559
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-09-11
- Publication Date
- 2024-08-14
- Estimated Expiration
- 2040-09-11
AI Technical Summary
Existing operation monitoring techniques using Watch Dog Timers (WDT) face challenges in accurately detecting program abnormalities in monitored devices, particularly when the WDT monitoring time is shortened, leading to reduced monitoring accuracy and increased workload due to the need for frequent clear instructions, which can hinder flexible program design.
An operation monitoring device that includes a control circuit to manage a monitoring timer, storage circuit to store reception status, and a control circuit to restart the timer based on clear instructions with unique IDs, comparing new and previous IDs to determine if an abnormality has occurred, using thresholds for continuation and detection counts to accurately monitor program operations.
The solution enables accurate monitoring of program operations by distinguishing between normal and abnormal conditions, reducing false resets and enhancing monitoring accuracy while allowing flexible program design without increasing workload.
Smart Images

Figure 0007534163000008 
Figure 0007534163000007 
Figure 0007534163000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an operation monitoring technique for monitoring program operations carried out in a monitored device. [Background technology]
[0002] Conventionally, in computer systems, a WDT (Watch Dog Timer) has been widely used when monitoring program operations in monitored devices such as electronic devices and CPUs (see, for example, Patent Document 1). A WDT is a timer that times out after a certain monitoring time has elapsed. An operation monitoring device is equipped with such a WDT, is connected to the monitored device via a communication line, restarts the WDT in response to a clear command from the monitored device, and outputs a reset command to the monitored device in response to the WDT timeout.
[0003] If the program operation in the monitored device is normal, a clear instruction is output from the monitored device in response to the clear process placed in the program before the WDT times out, and the operation monitoring device restarts the WDT. This prevents the operation monitoring device from outputting a reset instruction in response to the WDT times out, allowing the program operation in the monitored device to continue. On the other hand, if an abnormality occurs in the program operation, such as a runaway or stop, the clear process placed in the program is no longer executed, and the clear instruction is no longer output from the monitored device. As a result, the WDT times out, a reset instruction is output from the operation monitoring device, and the program operation in the monitored device is initialized. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2019-49860 A Summary of the Invention [Problem to be solved by the invention]
[0005] In an operation monitoring device, shortening the monitoring time of the WDT allows for early detection of abnormal occurrences such as runaway or halt of program operation in the monitored device, but this requires frequent output of clear instructions during program operation. Specifically, in a program that executes periodic processing that periodically repeats processing, if the period of the periodic processing is longer than the monitoring time of the WDT, it is necessary to distribute and place multiple clear processes for outputting clear instructions within the periodic processing of the program. However, distributing and placing many clear processes within a program poses the problem that it becomes impossible to accurately monitor program operation in the monitored device.
[0006] For example, if a runaway occurs in a program operation that includes a clear process, and the execution interval of the clear process is shorter than the monitoring time, the WDT will be reset before the time expires, just as in normal operation, and the runaway program operation cannot be detected. Therefore, if many clear processes are distributed within a program, the probability of not being able to detect a runaway increases, resulting in a decrease in the accuracy of monitoring program operation in the monitored device. In essence, a configuration that may decrease monitoring accuracy is undesirable in an operation monitoring technology used to increase the security of a computer system.
[0007] On the other hand, one method to avoid such a decrease in safety is to limit the number of clearing operations placed in a program. To do this, it is necessary to consider where to place the clearing operations, giving careful consideration to preventing runaways in the range that includes the clearing operations. However, this method has the problem of hindering flexible program design, and as a result, it increases the workload and costs required for program design.
[0008] The present invention has been made to solve the above problems, and has an object to provide an operation monitoring technique that can accurately monitor program operations in a monitored device. [Means for solving the problem]
[0009] In order to achieve this object, the operation monitoring device of the present invention has a monitoring timer that is connected to a monitored device that performs a series of program operations by executing a plurality of processes based on a program, and measures a fixed monitoring time, and when the monitoring timer times out, it determines that an abnormality has occurred in the program operation, and when a clear instruction including an ID for identifying the clear process is received from the monitored device in response to execution of a clear process that is distributed within the program, it restarts the monitoring timer to continue the program operation, and a memory circuit configured to store a reception status regarding the clear instruction received from the monitored device, and the control circuit updates the reception status based on the clear instruction, and when a new clear instruction is received from the monitored device, it monitors the program operation using the monitoring timer based on the reception status regarding the new ID of the new clear instruction included in the reception status.
[0010] In addition, one configuration example of the above-mentioned operation monitoring device according to the present invention is such that the reception status includes a previous ID indicating the ID of the last received clear instruction, and when the control circuit receives the new clear instruction, it compares the new ID of the new clear instruction with the previous ID included in the reception status, and determines whether or not to restart the monitoring timer based on the comparison result obtained.
[0011] In addition, one configuration example of the above-mentioned operation monitoring device of the present invention is such that, when the new ID does not match the previous ID, the control circuit restarts the monitoring timer in response to the new clear instruction, and, when the new ID matches the previous ID, the control circuit avoids restarting the monitoring timer in response to the new clear instruction.
[0012] In addition, one configuration example of the above-mentioned operation monitoring device according to the present invention is such that the reception status includes a continuation count indicating the number of times the ID of the received clear instruction remains the same, and when the control circuit receives the new clear instruction, it compares the continuation count for the new ID of the new clear instruction indicated by the reception status with a continuation threshold indicating an upper limit of the continuation count, and determines whether or not an abnormality has occurred in the program operation based on the obtained comparison result.
[0013] In addition, one example configuration of the operation monitoring device of the present invention is such that, when the number of continuations exceeds the continuation threshold value, the control circuit determines that an abnormality has occurred in the program operation, and, when the number of continuations is equal to or less than the continuation threshold value, determines that no abnormality has occurred in the program operation.
[0014] In addition, one configuration example of the above-mentioned operation monitoring device according to the present invention is such that the reception status includes a detection count indicating the number of times each ID has been detected within a certain allowable time from the received clear instruction, and when the control circuit receives the new clear instruction, it compares the detection count for the new ID of the new clear instruction indicated by the reception status with a detection threshold indicating an upper limit of the detection count, and determines whether or not an abnormality has occurred in the program operation based on the obtained comparison result.
[0015] In addition, one configuration example of the operation monitoring device of the present invention is such that, when the number of detections exceeds the detection threshold value, the control circuit determines that an abnormality has occurred in the program operation, and, when the number of detections is equal to or less than the detection threshold value, determines that no abnormality has occurred in the program operation.
[0016] In addition, the operation monitoring method of the present invention is an operation monitoring method used in an operation monitoring apparatus comprising: a control circuit configured to connect to a monitored device that performs a series of program operations by executing a plurality of processes based on a program, and to measure a fixed monitoring time, and to determine that an abnormality has occurred in the program operation when the monitoring timer times out, and to restart the monitoring timer to continue the program operation when a clear instruction including an ID for identifying the clear process is received from the monitored device in response to execution of a clear process that is distributed within the program, and a memory circuit configured to store a reception status regarding the clear instruction received from the monitored device, the operation monitoring method comprising the steps of: the control circuit updating the reception status based on the clear instruction; and, when the control circuit receives a new clear instruction from the monitored device, monitoring the program operation using the monitoring timer based on the reception status regarding the new ID of the new clear instruction included in the reception status. Effect of the Invention
[0017] According to the present invention, it is possible to accurately monitor the program operation in the monitored device. [Brief description of the drawings]
[0018] [Figure 1] FIG. 1 is a block diagram showing the configuration of the operation monitoring device. [Diagram 2] FIG. 2 is an explanatory diagram showing an example of program processing (periodic processing). [Diagram 3] FIG. 3 is a flowchart of the operation monitoring process according to the first embodiment. [Figure 4] FIG. 4 is a sequence diagram illustrating an example of operation monitoring (during normal operation) according to the first embodiment. [Diagram 5] FIG. 5 is a sequence diagram illustrating an example of operation monitoring (when a runaway occurs) according to the first embodiment. [Figure 6]FIG. 6 is an explanatory diagram showing an example of program processing (periodic processing+repetitive processing). [Figure 7] FIG. 7 is a flowchart illustrating the operation monitoring process according to the second embodiment. [Figure 8] FIG. 8 is a sequence diagram illustrating an example of operation monitoring (during normal operation) according to the second embodiment. [Figure 9] FIG. 9 is a sequence diagram illustrating an example of operation monitoring (when a runaway occurs) according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] Next, an embodiment of the present invention will be described with reference to the drawings. [First embodiment] First, an operation monitoring device 10 according to a first embodiment of the present invention will be described with reference to Fig. 1. Fig. 1 is a block diagram showing the configuration of the operation monitoring device. This operation monitoring apparatus 10 is connected to a monitored device 20 that performs program operation via a communication line L1, and is configured to monitor program operation in the monitored device 20 by using a watchdog timer WDT (Watch Dog Timer) that measures a fixed monitoring time. Hereinafter, the watchdog timer may be referred to as WDT.
[0020] The monitored device 20 is an information processing device such as an industrial controller or a PC, or a CPU mounted on such an information processing device, and is configured to perform a series of program operations by executing multiple processes based on a program. Hereinafter, a system including the operation monitoring apparatus 10 and the monitored device 20 is referred to as the operation monitoring system 1. The number of monitored devices 20 monitored by the operation monitoring apparatus 10 is not limited to one. By providing multiple WDTs corresponding to the respective monitored devices 20, it is also possible to monitor program operations in multiple monitored devices 20 with one operation monitoring apparatus 10.
[0021] In general, when a WDT is used to externally monitor program operations in an information processing device, a clear process for sending a clear instruction to restart the WDT is distributed and arranged in advance in the program executed in the information processing device.
[0022] In the present invention, similarly to the above, a clear process for sending a clear instruction to restart the WDT is preliminarily distributed and arranged in the program of the monitored device 20. In addition to this, the clear instruction sent from the monitored device 20 includes an ID as identification information for identifying the clear process that sent the clear instruction. In the present invention, the operation monitoring apparatus 10 checks the reception status of the clear instruction received from the monitored device 20 based on this ID, thereby accurately monitoring the program operation.
[0023] In large facilities such as plants and buildings, relatively large-scale computer systems are operated using control devices such as industrial controllers to automatically control the equipment installed in the facilities. In such cases, a redundant system is used to ensure the safety of the computer system, for example, by preparing two controllers, and if an abnormality occurs in one of the operating controllers, the other standby controller is switched over to become the new operating controller.
[0024] In such a redundant system, automatic control of the equipment is temporarily suspended during controller switching, so in order to shorten the time required from the occurrence of an abnormality to the completion of switching, it is necessary to detect the abnormality as early as possible. One way to do this is to remotely monitor the program operations of these redundant controllers using a monitoring device separate from these controllers. In such a case, these controllers correspond to the monitored devices 20 of the present invention, and the operation monitoring device 10 of the present invention can be used as the monitoring device.
[0025] Furthermore, in information processing devices such as PCs, relatively small-scale computer systems are operated that constantly monitor program operations in the CPU using an operation monitoring circuit made up of a chip separate from the CPU. In such systems, if an abnormality is detected in the program operations in the CPU, the operation monitoring circuit resets the CPU. In such cases, the CPU corresponds to the monitored device 20 according to the present invention, and the operation monitoring apparatus 10 according to the present invention can be used as the operation monitoring circuit.
[0026] [Operation monitoring device] Next, the configuration of the operation monitoring device 10 according to the present embodiment will be described in detail with reference to FIG. As shown in FIG. 1, the operation monitoring device 10 includes an input / output I / F 11, a memory circuit 12, and a control circuit 13 as main circuit components.
[0027] [Input / output interface] The input / output I / F 11 is configured to be connected to the monitored device 20 via a communication line L1 and to transmit and receive various instructions such as a clear instruction, a reset instruction, etc. The input / output I / F 11 is also configured to be connected to a higher-level device 30 such as a server or a PC via a communication line L2 and to transmit and receive various instructions such as start / end of monitoring and monitoring results.
[0028] [Memory circuit] The memory circuit 12 is made of a semiconductor memory and is configured to store various processing information used in the monitoring operation of the control circuit 13. The main processing information stored in the memory circuit 12 is a reception status 12A. The reception status 12A is processing information indicating the reception status regarding a reset instruction transmitted from the monitored device 20, and is generated by the control circuit 13 and stored in the memory circuit 12. In this embodiment, the reception status 12A includes a previous ID indicating the ID of the last received clear instruction.
[0029] [Control circuit] The control circuit 13 mainly comprises a monitoring timer WDT (13A) that measures a fixed monitoring time, and a monitoring control unit 13B that is configured to perform monitoring operation for monitoring program operation in the monitored device 20 by controlling the WDT. The control circuit 13 is composed of a CPU and its peripheral circuits, and realizes the WDT (13A) and the monitoring control unit 13B by making the CPU and a program work together. The program may be stored in the internal memory (not shown) of the CPU, or in the storage circuit 12. This program is stored in advance in the internal memory or the storage circuit 12 from an external device or a recording medium connected to the operation monitoring device 10 via communication lines L1 and L2.
[0030] [Watchdog timer WDT] The WDT (13A) is a general timer that measures a fixed monitoring time Tw. It is configured to end the time measurement when the monitoring time Tw has elapsed since the start of the time measurement, that is, when the time is up, and to start the time measurement again from the time point when it is restarted during the time measurement.
[0031] [Monitoring and Control Unit] The monitoring control unit 13B is configured to start monitoring operation by activating the WDT in response to a monitoring start request from the higher-level device 30 or a monitoring start request from the monitored device 20 received via the input / output I / F 11, and if the WDT times out, to determine that an abnormality has occurred in the program operation in the monitored device 20, and if a clear instruction including an ID for identifying the clear process is received from the monitored device 20, to restart the WDT and continue the program operation.
[0032] In addition, the monitoring control unit 13B is configured to generate a reception status 12A based on a clear instruction from the monitored device 20 received via the input / output I / F 11, and store it in the memory circuit 12, and when a new clear instruction is received from the monitored device 20, to monitor the program operation using the WDT, specifically, to control the restart of the WDT, based on the reception status 12A in the memory circuit 12. In addition, when it is determined that an abnormality has occurred in the program operation in the monitored device 20, the monitoring control unit 13B is configured to notify the higher-level device 30 of the abnormality in the program operation, or to send a reset instruction to the monitored device 20 to reset the program operation.
[0033] Specifically, the reception status 12A includes a previous ID indicating the ID of the last received clear instruction, and when the monitoring control unit 13B receives a new clear instruction, it compares the new ID of the new clear instruction with the previous ID included in the reception status 12A and determines whether or not the WDT needs to be restarted based on the comparison result.At this time, if the new ID does not match the previous ID, it restarts the WDT in response to the new clear instruction, and if the new ID matches the previous ID, it avoids restarting the WDT in response to the new clear instruction.
[0034] [Monitored Devices] Next, the configuration of the monitored device 20 according to the present embodiment will be described with reference to FIG. As described above, the monitored device 20 is composed of an information processing device such as an industrial controller or a PC, or a CPU mounted on such an information processing device, and is configured to perform a series of program operations by executing a plurality of processes based on a program. As shown in Fig. 1, the monitored device 20 has an input / output I / F 21, a memory circuit 22, and a processing circuit 23 as its main circuit configuration.
[0035] [Input / output interface] The input / output I / F 21 is connected to the operation monitoring device 10 via a communication line L1, and is configured to transmit and receive various instructions such as a clear instruction and a reset instruction.
[0036] [Memory circuit] The storage circuit 22 is made of a semiconductor memory and is configured to store various processing information and programs 22P used in the processing operations in the processing circuit 23. The programs 22P are application programs that realize the processing operations in the processing circuit 23 by working with the CPU of the processing circuit 23. For example, in the case where the monitored device 20 is an industrial controller, the programs 22P correspond to programs for automatically controlling each piece of equipment connected thereto.
[0037] Fig. 2 is an explanatory diagram showing an example of program processing (periodic processing). Fig. 2 shows a program 22P including periodic processing that is repeatedly executed at regular intervals. For example, when each device is automatically controlled by a controller, detection data is obtained from each device at regular intervals, and operation amount data is instructed. In the periodic processing of FIG. 2, a "clear processing (ID=1)" is placed between "processing A" and "processing B", and this clear processing causes a clear instruction including "1" as an ID for identifying the clear instruction to be sent to the operation monitoring device 10.
[0038] Furthermore, in the periodic processing of FIG. 2, a "clear processing (ID=2)" is placed between "processing B" and "processing C", and this clear processing causes a clear instruction including "2" as an ID for identifying the clear instruction to be sent to the operation monitoring device 10. Furthermore, in the periodic processing of Figure 2, a "clear processing (ID = 3)" is placed between "processing C" and "processing D", and this clear processing causes a clear instruction including "3" as an ID for identifying the clear instruction to be sent to the operation monitoring device 10.
[0039] The relationship between the monitoring time Tw and the interval at which a clear instruction is sent will now be described. In operation monitoring using the WDT, when the monitoring time Tw has elapsed and the WDT times out, it is determined that an abnormality has occurred. For this reason, during normal operation, it is necessary for the monitored device 20 to send a clear instruction to the operation monitoring apparatus 10 at intervals shorter than the monitoring time Tw. Therefore, within the program 22P of the monitored device 20, the above-mentioned clear processes are distributed so that during normal operation, a clear instruction is sent at intervals shorter than the monitoring time Tw. This is a basic condition for operation monitoring using the WDT.
[0040] [Processing circuit] The processing circuit 23 is composed of a CPU and its peripheral circuits, and is configured to execute a series of program operations, such as automatically controlling each device with a controller, by making the CPU cooperate with the program 22P in the storage circuit 22. Furthermore, when the processing circuit 23 receives a reset instruction from the operation monitoring device 10, it is configured to reset the CPU and stop or restart the program operation.
[0041] [Operation of the first embodiment] Next, the operation of the operation monitoring device 10 according to the present embodiment will be described with reference to Fig. 3. Fig. 3 is a flowchart showing the operation monitoring process according to the first embodiment. In response to the input monitoring start request, the control circuit 13 of the operation monitoring apparatus 10 executes the operation monitoring process of FIG.
[0042] First, in the control circuit 13, the monitor control unit 13B starts the WDT (13A) (step S100), and initializes the previous ID included in the reception status 12A of the memory circuit 12 (step S101). Next, the monitoring control unit 13B checks whether a new clear instruction has been received from the monitored device 20 (step S102), and if not (step S102: NO), the process proceeds to step S110, which will be described later.
[0043] On the other hand, if a new clear instruction is received in step S102 (step S102: YES), the monitoring control unit 13B compares the new ID included in the new clear instruction with the previous ID included in the reception status 12A (step S103).
[0044] If the new ID does not match the previous ID (step S103: YES), the monitoring control unit 13B clears and restarts the WDT (step S104), stores the new ID as the previous ID in the reception status 12A (step S105), and then proceeds to step S110, which will be described later. On the other hand, if the new ID matches the previous ID in step S103 (step S103: NO), the processing proceeds to step S110, which will be described later.
[0045] In step S110, the monitor and control unit 13B checks whether the WDT has timed out (step S110), and if the WDT has not timed out (step S110: NO), the process returns to the above-mentioned step S102. On the other hand, if the WDT times out (step S110: YES), it is determined that an abnormality has occurred in the program operation of the monitored device 20 (step S111), and after outputting a reset instruction to the monitored device 20 (step S112), the series of operation monitoring processes is terminated.
[0046] [Example of operation of the first embodiment] Next, an example of the operation of the operation monitoring apparatus 10 according to the present embodiment will be described. In the following, a case where the monitored device 20 performs a program operation based on the program 22P in Fig. 2 described above will be taken as an example, and a case where the periodic process is normally executed and a runaway occurs in the periodic process will be described.
[0047] [During normal operation] First, a normal operation in which periodic processing is normal among program operations of the monitored device 20 will be described with reference to Fig. 4. Fig. 4 is a sequence diagram showing an example of operation monitoring (normal operation) according to the first embodiment. At the start of the monitoring operation, the operation monitoring apparatus 10 initializes the previous ID of the reception status 12A to "0" (zero) and starts the WDT. In addition, the monitored device 20 starts the program operation based on the periodic processing of the program 22P shown in FIG. 2 described above.
[0048] 4, when a clear instruction transmitted by a clear process (ID=1) arranged in a periodic process is received from the monitored device 20 at time T1, the operation monitoring apparatus 10 compares the new ID of the clear instruction with the previous ID in the reception status 12A. In this case, since the new ID is "1" and does not match the previous ID "0", the operation monitoring apparatus 10 restarts the WDT and saves the new ID "1" as the previous ID in the reception status 12A. This resets the timing of the WDT and starts timing the monitoring time Tw anew from time T1.
[0049] At the next time T2, when a clear instruction transmitted by a clear process (ID=2) arranged in the periodic process is received from the monitored device 20, the operation monitoring apparatus 10 compares the new ID of the clear instruction with the previous ID in the reception status 12A. In this case, since the new ID is "2" and does not match the previous ID "1", the operation monitoring apparatus 10 restarts the WDT and saves the new ID "2" as the previous ID in the reception status 12A. This resets the timing of the WDT and starts timing the monitoring time Tw anew from time T2.
[0050] At the next time T3, when a clear instruction transmitted by a clear process (ID=3) arranged in the periodic process is received from the monitored device 20, the operation monitoring apparatus 10 compares the new ID of the clear instruction with the previous ID in the reception status 12A. In this case, since the new ID is "3" and does not match the previous ID "2", the operation monitoring apparatus 10 restarts the WDT and saves the new ID "3" as the previous ID in the reception status 12A. This resets the timing of the WDT, and newly starts timing the monitoring time Tw from time T2. After this, the series of periodic processes ends, and is executed repeatedly in response to the arrival of a new period.
[0051] [When a crash occurs] Next, a description will be given of a runaway occurrence time when a runaway occurs in a periodic process among program operations of the monitored device 20 with reference to Fig. 5. Fig. 5 is a sequence diagram showing an example of operation monitoring (when a runaway occurs) according to the first embodiment. At the start of the monitoring operation, the operation monitoring apparatus 10 initializes the previous ID of the reception status 12A to "0" (zero) and starts the WDT. In addition, the monitored device 20 starts the program operation based on the periodic processing of the program 22P shown in FIG. 2 described above.
[0052] 5, when a clear instruction transmitted by a clear process (ID=1) arranged in a periodic process is received from the monitored device 20 at time T1, the operation monitoring apparatus 10 compares the new ID of the clear instruction with the previous ID in the reception status 12A. In this case, since the new ID is "1" and does not match the previous ID "0", the operation monitoring apparatus 10 restarts the WDT and saves the new ID "1" as the previous ID in the reception status 12A. This resets the timing of the WDT and starts timing the monitoring time Tw anew from time T1.
[0053] At the next time T2, when a clear instruction transmitted by a clear process (ID=2) arranged in the periodic process is received from the monitored device 20, the operation monitoring apparatus 10 compares the new ID of the clear instruction with the previous ID in the reception status 12A. In this case, since the new ID is "2" and does not match the previous ID "1", the operation monitoring apparatus 10 restarts the WDT and saves the new ID "2" as the previous ID in the reception status 12A. This resets the timing of the WDT and starts timing the monitoring time Tw anew from time T2.
[0054] After that, at time T21, it is assumed that a runaway occurs in the range including the clear process (ID=2) among the program operations of the monitored device 20. As a result, the clear process (ID=2) is repeatedly executed, and a clear instruction is sent in the same manner as during normal operation.
[0055] Therefore, at the following time T3, when a clear instruction transmitted by the clear process (ID=2) is received from the monitored device 20, the operation monitoring apparatus 10 compares the new ID of the clear instruction with the previous ID in the reception status 12A. In this case, since the new ID is "2" and matches the previous ID "2", the operation monitoring apparatus 10 does not restart the WDT, nor does it update the previous ID "2". As a result, the WDT is not reset, and the measurement of the monitoring time Tw from time T2 continues.
[0056] Therefore, thereafter, at time T4, since the monitoring time Tw has elapsed since time T2, the WDT times out. In response to this, the operation monitoring apparatus 10 detects that an abnormality has occurred in the program operation of the monitored device 20. As a result, when the operation monitoring apparatus 10 transmits a reset instruction to the monitored device 20, the program operation of the monitored device 20 is reset and restarted or stopped, thereby making it possible to avoid or suppress malfunctions due to runaway.
[0057] [Advantages of the first embodiment] In this manner, in this embodiment, the memory circuit 12 stores the reception status 12A relating to the clear instruction received from the monitored device 20, and the control circuit 13 generates the reception status 12A based on the clear instruction from the monitored device 20 and stores it in the memory circuit 12. When a new clear instruction is received from the monitored device 20, the control circuit 13 monitors the program operation using the WDT based on the reception status relating to the new ID of the new clear instruction included in the reception status 12A in the memory circuit 12.
[0058] In general, when using a WDT to monitor program operation in a monitored device 20, it is necessary to distribute a large number of clear processes within a program 22P used for program operation, and to send clear instructions to the operation monitoring device 10 at intervals shorter than the monitoring time Tw to restart the WDT. During normal operation, clear instructions are sent based on different clear processes, so clear instructions with the same ID are not sent continuously. On the other hand, if a runaway occurs in a range that includes any of the clear processes, clear instructions with the same ID will be sent continuously.
[0059] The present invention focuses on the difference in the reception status of the clear instruction during normal operation and when a runaway occurs, and when a new clear instruction is received, controls (implements or avoids) the restart of the WDT based on the reception status relating to the new ID of the new clear instruction contained in the reception status 12A of the memory circuit 12.
[0060] Specifically, the reception status 12A includes a previous ID indicating the ID of the last received clear instruction, and when the control circuit 13 receives a new clear instruction, it compares the new ID of the new clear instruction with the previous ID indicated in the reception status 12A in the memory circuit 12, and determines whether or not to restart the WDT based on the comparison result. At this time, if the new ID does not match the previous ID, the control circuit 13 restarts the WDT in response to the new clear instruction, and if the new ID matches the previous ID, it avoids restarting the WDT in response to the new clear instruction.
[0061] As a result, in the case where a clear instruction is not identified by an ID as in the conventional case, even if a new clear instruction is sent using the same clear processing as the previous clear instruction, the WDT is restarted, and an abnormality in program operation is detected. On the other hand, according to the present invention, if a new clear instruction is sent using the same clear processing as the previous clear instruction, the new ID matches the previous ID, and restarting the WDT in response to the new clear instruction is avoided. Therefore, the WDT times out, and it is possible to detect an abnormality in program operation, and as a result, it is possible to accurately monitor the program operation in the monitored device 20.
[0062] [Second embodiment] Next, an operation monitoring device 10 according to a second embodiment of the present invention will be described. The program 22P executed by the monitored device 20 may include a repetitive process within a periodic process. Fig. 6 is an explanatory diagram showing an example of program processing (periodic processing + repetitive processing). In the periodic processing in Fig. 6, a "clear processing (ID = 1)" is placed between "processing A" and "processing B", and this clear processing causes a clear instruction including "1" as an ID for identifying the clear instruction to be transmitted to the operation monitoring device 10.
[0063] 6, a "repeated process" is provided between "process B" and "process D." The "repeated process" is a process that repeatedly executes the same process until a specified condition is met. In this "repeated process," a "clear process (ID=2)" is provided after process C, and this clear process transmits a clear instruction that includes "2" as an ID for identifying the clear instruction to the operation monitoring device 10. Furthermore, in the periodic processing of FIG. 6, a “clear processing (ID=3)” is placed after “processing D”, and this clear processing causes a clear instruction including “3” as an ID for identifying the clear instruction to be sent to the operation monitoring device 10.
[0064] As shown in Fig. 6, when a clear process (ID = 2) is placed within a repeat process, even during normal operation, a clear instruction with an ID of "2" is sent from the monitored device 20 to the operation monitoring device 10. On the other hand, when a runaway occurs within the range of program operation that includes the clear process (ID = 2), a clear instruction with an ID of "2" is sent from the monitored device 20 to the operation monitoring device 10, as described above. Therefore, simply checking whether a new ID matches or does not match the previous ID does not allow one to distinguish between normal operation and the occurrence of an abnormality.
[0065] In this case, if the time length from the first execution of the clear process (ID=2) during normal operation to the end of the repeat process and the execution of the next clear process (ID=3) is shorter than the monitoring time Tw, it is possible to distinguish between normal operation and the occurrence of an abnormality by using the first embodiment described above. This is because, even if the WDT restart due to the clear process (ID=2) executed within the repeat process after the first clear process (ID=2) is executed is avoided, the WDT will not time out during the repeat process, and if the subsequent clear process (ID=3) is not executed, the WDT will time out and the occurrence of an abnormality will be detected.
[0066] However, if the length of time from the first execution of the clear process (ID=2) during normal operation to the end of the loop process and the execution of the next clear process (ID=3) is longer than the monitoring time Tw, it is not possible to distinguish between normal operation and the occurrence of an abnormality even when the above-mentioned first embodiment is used. This is because if the WDT restart due to the clear process (ID=2) executed within the loop process after the first clear process (ID=2) is executed is avoided, the WDT times out during the loop process.
[0067] Here, when the program operation itself is repeated at a constant cycle, the number of times the repeat process is executed is within a certain upper limit during normal operation. On the other hand, when a runaway occurs, the repeat process is executed beyond the upper limit. This embodiment focuses on the difference in the number of times the repeat process is executed during normal operation and when a runaway occurs, and determines whether or not an abnormality has occurred based on the continuation count, which indicates the number of times a clear instruction for the same ID has been received consecutively.
[0068] That is, in this embodiment, the reception status 12A of the memory circuit 12 includes a continuation count indicating the number of times that the ID of the received clear instruction remains the same. In addition, when the control circuit 13 receives a new clear instruction, it is configured to compare the continuation count for the new ID of the new clear instruction, as indicated by the reception status 12A, with a continuation threshold indicating an upper limit of the continuation count, and to determine whether or not an abnormality has occurred in the program operation based on the obtained comparison result.
[0069] Specifically, the monitoring control unit 13B of the control circuit 13 is configured to determine that an abnormality has occurred in the program operation if the number of continuations exceeds the continuation threshold value, and to determine that an abnormality has occurred in the program operation if the number of continuations is equal to or less than the continuation threshold value. In this case, the continuation threshold is the number of times that the clear instruction is permitted to be repeatedly executed during normal operation, i.e., the upper limit number of times that the clear instruction can be executed, and may be set in advance according to the application. Also, the ID to which the determination of the occurrence of an abnormality using the continuation number is applied may be limited to the ID of the clear instruction placed in the repetitive process. Other configurations of the operation monitoring apparatus 10 and the monitored device 20 according to this embodiment are similar to those of the first embodiment, and detailed description thereof will be omitted here.
[0070] [Operation of the second embodiment] Next, the operation of the operation monitoring device 10 according to the present embodiment will be described with reference to Fig. 7. Fig. 7 is a flowchart showing the operation monitoring process according to the second embodiment. In response to the input monitoring start request, the control circuit 13 of the operation monitoring apparatus 10 executes the operation monitoring process of FIG.
[0071] First, in the control circuit 13, the monitor control unit 13B starts the WDT (13A) (step S200), and initializes the previous ID and the number of consecutive times included in the reception status 12A of the memory circuit 12 (step S201). Next, the monitoring control unit 13B checks whether a new clear instruction has been received from the monitored device 20 (step S202), and if not (step S202: NO), the process proceeds to step S210, which will be described later.
[0072] On the other hand, if a new clear instruction is received in step S202 (step S202: YES), the monitoring control unit 13B compares the new ID included in the new clear instruction with the previous ID included in the reception status 12A (step S203). Here, if the new ID does not match the previous ID (step S203: YES), the monitoring control unit 13B saves the new ID as the previous ID in the reception status 12A (step S204), initializes the continuation count of the reception status 12A (step S205), clears and restarts the WDT (step S206), and proceeds to step S210 described later.
[0073] On the other hand, in step S203, if the new ID matches the previous ID (step S203: NO), the monitoring control unit 13B increments (+1) the continuation count of the reception status 12A (step S207), and then compares the continuation count with a continuation threshold indicating the upper limit of the continuation count (step S208). If the continuation count is equal to or less than the continuation threshold (step S208: NO), the operation is within the normal range, and the process proceeds to step S206. On the other hand, if the continuation count exceeds the continuation threshold (step S208: YES), the operation is outside the normal range, and the process proceeds to step S210, which will be described later.
[0074] In step S210, the monitor and control unit 13B checks whether the WDT has timed out (step S210), and if the WDT has not timed out (step S210: NO), the process returns to the above-mentioned step S202.
[0075] On the other hand, if the WDT has timed out (step S210: YES), it is determined that an abnormality has occurred in the program operation of the monitored device 20, and after outputting a reset instruction to the monitored device 20 (step S211), the series of operation monitoring processes is terminated.
[0076] [Example of operation of the second embodiment] Next, an example of the operation of the operation monitoring apparatus 10 according to the present embodiment will be described. In the following, a case where the monitored device 20 performs a program operation based on the program 22P in Fig. 6 described above will be taken as an example, and a case where the repeated process is normally executed and a runaway occurs in the repeated process will be described.
[0077] [During normal operation] First, a normal operation in which repetitive processing is normal among program operations of the monitored device 20 will be described with reference to Fig. 8. Fig. 8 is a sequence diagram showing an example of operation monitoring (normal operation) according to the second embodiment. At the start of the monitoring operation, the operation monitoring apparatus 10 initializes the previous ID of the reception status 12A to "0" (zero) and starts the WDT. The monitored device 20 starts the program operation based on the periodic processing of the program 22P shown in Fig. 6. It is assumed that the continuation threshold value TH is set to "3".
[0078] As shown in Fig. 8, at time T1, the program operation of the monitored device 20 is executing a periodic process. At this point, if a clear instruction (ID = 1) transmitted by a clear process arranged in the periodic process is received from the monitored device 20, the operation monitoring apparatus 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID of the reception status 12A. In this case, since the new ID is "1" and does not match the previous ID "0", the operation monitoring apparatus 10 saves the new ID "1" as the previous ID in the reception status 12A and updates the continuous count CNT of the reception status 12A to "1". As a result, counting of the continuous count CNT starts anew from time T1.
[0079] At the following time T2, the program operation of the monitored device 20 transitions to a loop process. At this point, if a clear instruction (ID=2) transmitted by a clear process arranged in the loop process is received from the monitored device 20, the operation monitoring device 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID in the reception status 12A. In this case, since the new ID is "2" and does not match the previous ID "1", the operation monitoring device 10 saves the new ID "1" as the previous ID in the reception status 12A and updates the continuous count CNT in the reception status 12A to "1". As a result, counting of the continuous count CNT starts anew from time T1.
[0080] At the next time T3, the program operation of the monitored device 20 executes a repeat process. At this time, if a clear instruction (ID=2) transmitted by a clear process arranged in the repeat process is received from the monitored device 20, the operation monitoring device 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID of the reception status 12A. In this case, since the new ID is "2" and matches the previous ID "2", the operation monitoring device 10 increments the continuation count CNT of the reception status 12A to update it to "2". After this, the operation monitoring device 10 confirms that the continuation count CNT is "2", and since it is equal to or less than the continuation threshold value TH "3", it determines that the program operation is normal. As a result, the counting of the continuation count CNT continues from time T2.
[0081] At the next time T4, the program operation of the monitored device 20 executes a loop process. At this time, if a clear instruction (ID=3) transmitted by a clear process arranged in the loop process is received from the monitored device 20, the operation monitoring device 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID of the reception status 12A. In this case, since the new ID is "2" and matches the previous ID "2", the operation monitoring device 10 increments the continuation count CNT of the reception status 12A to update it to "3". After this, the operation monitoring device 10 confirms that the continuation count CNT is "3", and since it is equal to or less than the continuation threshold value TH "3", it determines that the program operation is normal. As a result, the counting of the continuation count CNT continues from time T2.
[0082] At the following time T5, the program operation of the monitored device 20 ends the repeat process and transitions to periodic processing. At this point, if a clear instruction (ID=3) transmitted by a clear process arranged in the periodic processing is received from the monitored device 20, the operation monitoring device 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID of the reception status 12A. In this case, since the new ID is "3" and does not match the previous ID "2", the operation monitoring device 10 saves the new ID "3" as the previous ID in the reception status 12A and updates the continuous count CNT of the reception status 12A to "1". As a result, counting of the continuous count CNT is newly started from time T5. After this, the series of periodic processing ends and is repeatedly executed in response to the arrival of a new period.
[0083] [When a crash occurs] Next, a description will be given of a runaway occurrence in a repetitive process among program operations of the monitored device 20 with reference to Fig. 9. Fig. 9 is a sequence diagram showing an example of operation monitoring (when a runaway occurs) according to the second embodiment. At the start of the monitoring operation, the operation monitoring apparatus 10 initializes the previous ID of the reception status 12A to "0" (zero) and starts the WDT. The monitored device 20 starts the program operation based on the periodic processing of the program 22P shown in Fig. 6. It is assumed that the continuation threshold value TH is set to "3".
[0084] As shown in Fig. 9, at time T1, the program operation of the monitored device 20 is executing a periodic process. At this point, if a clear instruction (ID = 1) transmitted by a clear process arranged in the periodic process is received from the monitored device 20, the operation monitoring apparatus 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID of the reception status 12A. In this case, since the new ID is "1" and does not match the previous ID "0", the operation monitoring apparatus 10 saves the new ID "1" as the previous ID in the reception status 12A and updates the continuous count CNT of the reception status 12A to "1". As a result, counting of the continuous count CNT starts anew from time T1.
[0085] At the following time T2, the program operation of the monitored device 20 transitions to a loop process. At this point, if a clear instruction (ID=2) transmitted by a clear process arranged in the loop process is received from the monitored device 20, the operation monitoring apparatus 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID in the reception status 12A. In this case, since the new ID is "2" and does not match the previous ID "1", the operation monitoring apparatus 10 saves the new ID "1" as the previous ID in the reception status 12A and updates the continuous count CNT in the reception status 12A to "1". As a result, counting of the continuous count CNT starts anew from time T2.
[0086] At the next time T3, the program operation of the monitored device 20 transitions to a repeat process. At this time, if a clear instruction (ID=2) transmitted by a clear process arranged in the repeat process is received from the monitored device 20, the operation monitoring device 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID of the reception status 12A. In this case, since the new ID is "2" and matches the previous ID "2", the operation monitoring device 10 increments the continuation count CNT of the reception status 12A to update it to "2". After this, the operation monitoring device 10 confirms that the continuation count CNT is "2", and since it is equal to or less than the continuation threshold value TH "3", it determines that the program operation is normal. As a result, the counting of the continuation count CNT from the time T2 continues.
[0087] After that, at time T31, it is assumed that a runaway occurs in the loop process due to, for example, an abnormality in a parameter used to determine the end of the loop process in the program operation of the monitored device 20. As a result, the clear process arranged in the loop process is repeatedly executed, and a clear instruction is sent in the same way as during normal operation.
[0088] That is, at the following time T4, the program operation of the monitored device 20 runs out of control and executes a repeat process. At this point, if a clear instruction (ID=2) transmitted by a clear process arranged in the repeat process is received from the monitored device 20, the operation monitoring device 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID of the reception status 12A. In this case, since the new ID is "2" and matches the previous ID "2", the operation monitoring device 10 increments the continuation count CNT of the reception status 12A to update it to "3". After this, the operation monitoring device 10 confirms that the continuation count CNT is "3", and since it is equal to or less than the continuation threshold value TH "3", it determines that the program operation is normal. As a result, the counting of the continuation count CNT from time T2 continues.
[0089] After that, even at time T5, the program operation of the monitored device 20 runs out of control and executes the repeat process. At this point, when a clear instruction (ID=2) transmitted by a clear process arranged in the repeat process is received from the monitored device 20, the operation monitoring device 10 restarts the WDT and compares the new ID of the clear instruction with the previous ID of the reception status 12A. In this case, since the new ID is "2" and matches the previous ID "2", the operation monitoring device 10 increments the continuation count CNT of the reception status 12A to update it to "4". After that, the operation monitoring device 10 checks the continuation count CNT to be "4" and detects that an abnormality has occurred in the program operation since it exceeds the continuation threshold value TH "3". As a result, when the operation monitoring device 10 transmits a reset instruction to the monitored device 20, the program operation of the monitored device 20 is reset and restarted or stopped, so that malfunctions due to runaway can be avoided or suppressed.
[0090] [Advantages of the second embodiment] In this manner, in this embodiment, the reception status 12A includes a continuation count indicating the number of times the ID of the received clear instruction remains the same, and when the control circuit 13 receives a new clear instruction, it compares the continuation count for the new ID of the new clear instruction indicated by the reception status 12A with a continuation threshold indicating an upper limit of the continuation count, and determines whether or not an abnormality has occurred in the program operation based on the obtained comparison result. Specifically, when the number of continuations exceeds the continuation threshold value, the control circuit 13 determines that an abnormality has occurred in the program operation, and when the number of continuations is equal to or less than the continuation threshold value, the control circuit 13 determines that no abnormality has occurred in the program operation.
[0091] This makes it possible to detect the occurrence of an abnormality in program operation even when the program 22P includes a repetitive process, and as a result, it becomes possible to accurately monitor the program operation in the monitored device. Note that, when multiple clear instructions are placed in a repetitive process, if the same ID is used for these clear instructions, this embodiment can also monitor the program operation in the monitored device 20.
[0092] [Third embodiment] Next, an operation monitoring device 10 according to a third embodiment of the present invention will be described. In the above-mentioned second embodiment, a case where a repeat process is included in a periodic process has been described as shown in Fig. 6. In this case, an example has been described in which only a clear process having the same ID is placed in the repeat process.
[0093] However, if the processing time of the repetitive process is longer than the monitoring time Tw, it is necessary to place multiple clear processes within the repetitive process. In this case, it may be necessary to assign different IDs to these clear processes. In such a case, if a runaway occurs in a repetitive process unit due to, for example, an abnormality in a parameter used to determine the end of the repetitive process, the ID of the clear instruction will not continue, and in the second embodiment, an abnormality in the program operation cannot be detected.
[0094] In this embodiment, the reception status 12A includes a detection count indicating the number of times each ID was detected within a certain allowable time from the received clear instruction, and when the control circuit 13 receives a new clear instruction, it is configured to compare the detection count for the new ID of the new clear instruction indicated by the reception status 12A with a detection threshold indicating an upper limit of the detection count, and to determine whether or not an abnormality has occurred in the program operation based on the obtained comparison result.
[0095] Specifically, the control circuit 13 is configured to determine that an abnormality has occurred in the program operation if the number of detections exceeds the detection threshold value, and to determine that no abnormality has occurred in the program operation if the number of detections is equal to or less than the detection threshold value. In this case, the length of the permissible time may be preset according to the application, for example, by using a monitoring time Tw. Also, going back the permissible time from the last received clear instruction, the number of received clear instructions with the same ID as the clear instruction may be counted as the number of detections.
[0096] The detection threshold is the number of times that a clear instruction is permitted to be repeatedly executed within an allowable time during normal operation, i.e., the upper limit number of clear instructions, and may be set in advance according to the application. The ID to which the abnormality occurrence determination using the detection count is applied may be limited to the ID of the clear instruction placed in the repeated processing. Other configurations of the operation monitoring apparatus 10 and the monitored device 20 according to this embodiment are the same as those of the first embodiment, and detailed description thereof will be omitted here. Also, if the continuation count and continuation threshold value of the second embodiment are replaced with the detection count and detection threshold value, the processing operations of both are almost the same, and detailed description thereof will be omitted here.
[0097] As a result, even if a runaway occurs in a repeat process unit in a program in which the processing time of the repeat process is longer than the monitoring time Tw and multiple clear processes are placed within the repeat process, the occurrence of an abnormality in program operation can be detected by comparing the number of detections for each ID with the detection threshold value, and as a result, it becomes possible to accurately monitor the program operation in the monitored device 20.
[0098] [Extended embodiment] Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. In addition, the respective embodiments can be implemented in any combination within a range that does not contradict each other. [Explanation of symbols]
[0099] 1...operation monitoring system, 10...operation monitoring device, 11...input / output I / F, 12...memory circuit, 12A...reception status, 13...control circuit, 13A...monitoring timer (WDT), 13B...monitoring control unit, 20...monitored device, 21...input / output I / F, 22...memory circuit, 22P...program, 23...processing circuit, 30...higher-level device, L1, L2...communication lines.
Claims
1. a control circuit that is connected to a monitored device that performs a series of program operations by executing a plurality of processes based on a program, has a monitoring timer that measures a certain monitoring time, and is configured to determine that an abnormality has occurred in the program operation when the monitoring timer times out, and to restart the monitoring timer and continue the program operation when a clear instruction including an ID for identifying the clear process is received from the monitored device in response to execution of a clear process that is distributed within the program; a memory circuit configured to store a reception status regarding the clear instruction received from the monitored device; The control circuit updates the reception status based on the clear instruction, and when a new clear instruction is received from the monitored device, monitors the program operation using the monitoring timer based on the reception status related to a new ID of the new clear instruction included in the reception status.
2. A motion monitoring device comprising:
2. 2. The motion monitoring device according to claim 1, The reception status includes a previous ID indicating the ID of the last received clear instruction, The operation monitoring device is characterized in that, when the control circuit receives the new clear instruction, it compares the new ID of the new clear instruction with the previous ID included in the reception status, and determines whether or not to restart the monitoring timer based on the comparison result.
3. 3. The motion monitoring device according to claim 2, The control circuit restarts the monitoring timer in response to the new clear instruction when the new ID does not match the previous ID, and avoids restarting the monitoring timer in response to the new clear instruction when the new ID matches the previous ID.
4. 2. The motion monitoring device according to claim 1, The reception status includes a continuation count indicating the number of times that the ID of the received clear instruction is continuously the same, The control circuit, when receiving the new clear instruction, compares the continuation count for the new ID of the new clear instruction indicated by the receiving status with a continuation threshold indicating an upper limit of the continuation count, and determines whether or not an abnormality has occurred in the program operation based on the obtained comparison result.
5. 5. The operation monitoring device according to claim 4, The control circuit determines that an abnormality has occurred in the program operation if the number of continuations exceeds the continuation threshold, and determines that no abnormality has occurred in the program operation if the number of continuations is equal to or less than the continuation threshold.
6. 2. The motion monitoring device according to claim 1, The reception status includes a detection count indicating the number of times each ID is detected within a certain allowable time from the received clear command, The control circuit, when receiving the new clear instruction, compares the number of detections for the new ID of the new clear instruction indicated by the receiving status with a detection threshold indicating an upper limit of the number of detections, and determines whether or not an abnormality has occurred in the program operation based on the obtained comparison result.
7. 7. The motion monitoring device according to claim 6, The control circuit determines that an abnormality has occurred in the program operation when the number of detections exceeds the detection threshold, and determines that no abnormality has occurred in the program operation when the number of detections is equal to or less than the detection threshold.
8. an operation monitoring method for use in an operation monitoring apparatus comprising: a control circuit configured to: connect to a monitored device which performs a series of program operations by executing a plurality of processes based on a program, have a monitoring timer which measures a fixed monitoring time, determine that an abnormality has occurred in the program operation when the monitoring timer times out, and restart the monitoring timer to continue the program operation when a clear instruction including an ID for identifying a clear process is received from the monitored device in response to execution of a clear process which is distributed within the program; and a memory circuit configured to store a reception status regarding the clear instruction received from the monitored device, the control circuit updating the reception status based on the clear instruction; when the control circuit receives a new clear instruction from the monitored device, monitoring the program operation using the monitoring timer based on a reception status related to a new ID of the new clear instruction included in the reception status; An operation monitoring method comprising:
Citation Information
Patent Citations
Watch dog timer
JP1988271545A
Parallel processing system
JP1990208738A
Fault monitor control system
JP1993158749A
Clock signal checker, plant monitoring controller, and diagnostic method of clock signal checker
JP2019049860A
