A hardware monitoring device and method for periodic running tasks of pre- and post-trigger type

Through the hardware monitoring device, the time intervals of the trigger cycle tasks before and after are independently monitored, the reliability and reliability of the monitoring methods dependent on existing software are solved, and effective monitoring of task spacing and sequence is realized, and the security and reliability of the system are improved. sex.

CN112416673BActive Publication Date: 2025-01-03NINGBO TUOPU GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011265798.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-13
Publication Date
2025-01-03
Estimated Expiration
2040-11-13

AI Technical Summary

Technical Problem

The existing front-and-back trigger-type periodic task monitoring methods mainly rely on software implementation, and the monitoring effect is poorly reliable and reliable. Especially when the software is abnormal, it is impossible to effectively monitor the task spacing and sequence changes, resulting in poor monitoring effect.

Method used

Design a hardware monitoring device, including a first signal monitoring unit, a second signal monitoring unit, a calculation unit, a comparison unit and a protection signal generation unit, and compare and preset task spacing by monitoring the time interval between the start trigger signal and the triggered signal. duration and generate protection signals when the duration exceeds the duration to ensure the independence and objectivity of the task.

Benefits of technology

It realizes that the task monitoring function can be maintained when software abnormalities are not available, improves the system's security and reliability, ensures independent monitoring of tasks running during the front and rear trigger cycles, and avoids task monitoring failure caused by software failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112416673B_ABST
    Figure CN112416673B_ABST
Patent Text Reader

Abstract

The present invention relates to a hardware monitoring device for a periodic running task of a front-to-back trigger type, comprising: a first signal monitoring unit, used to monitor a start trigger signal in a periodic task; a second signal monitoring unit, used to monitor a triggered signal in a periodic task; a calculation unit, used to calculate the time interval between the monitored start trigger signal and the triggered signal; a comparison unit, used to compare the time interval with a preset task interval duration, and generate a trigger signal when the time interval exceeds the preset task interval duration; a protection signal generating unit, used to generate a protection signal according to the trigger signal. The present invention also relates to a hardware monitoring method for a periodic running task of a front-to-back trigger type. The present invention can ensure the monitoring effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of periodic task monitoring, and in particular to a hardware monitoring device and method for periodic running tasks of a forward and backward triggering type. Background Art

[0002] For monitoring tasks with a fixed sequence and fixed running interval, the existing monitoring methods include the following:

[0003] One is to set up a monitoring task in the software, set a software flag in the monitored task to change it regularly, and then periodically check whether the software flag changes according to the expected change rules in the software monitoring task. If it is found that the change of the software flag does not meet the expectations, it is determined that the front and back trigger type periodic tasks are running abnormally, and then the safety protection action is executed or the safety protection signal is output in the software;

[0004] One is to set up a monitoring task in the software, and add a subtask to record the same clock value in the front and rear trigger-type periodic tasks, and then periodically check the deviation of the two clock values ​​recorded by the trigger-type periodic task in the monitoring task. If the deviation exceeds the expected value, it is determined that the front and rear trigger-type periodic tasks are running abnormally, and then the safety protection action is executed or the safety protection signal is output in the software;

[0005] One is to set an output signal for a periodic task, and use an external monitor to monitor whether each periodic task signal is output at a fixed duration. If it exceeds the expected value, the external monitor outputs a safety protection signal;

[0006] The problems with the above three technologies are: the first two monitoring methods are software monitoring methods, and the monitoring effect depends on the status of the software itself. When the software itself is abnormal, the credibility of the monitoring result decreases and the reliability is poor; the third method cannot monitor two tasks with a fixed sequence and fixed time interval, and can only monitor the periodic operation status of a single task. When the cycle of a single task produces accumulated errors, the external monitoring circuit cannot recognize it, but the execution order of the two periodic tasks may have changed, so its monitoring effect is poor. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a hardware monitoring device and method for periodic running tasks of a forward and backward triggering type, which can ensure the monitoring effect.

[0008] The technical solution adopted by the present invention to solve its technical problem is: to provide a hardware monitoring device for a front-and-back triggered periodic running task, including: a first signal monitoring unit, used to monitor the start trigger signal in the periodic task; a second signal monitoring unit, used to monitor the triggered signal in the periodic task; a calculation unit, used to calculate the time interval between the monitored start trigger signal and the triggered signal; a comparison unit, used to compare the time interval with a preset task interval duration, and generate a trigger signal when the time interval exceeds the preset task interval duration; a protection signal generating unit, used to generate a protection signal according to the trigger signal.

[0009] The hardware monitoring device for periodically running tasks of the front-to-back trigger type further comprises a task interval duration setting unit for setting the task interval duration.

[0010] The calculation unit is a counter.

[0011] A hardware monitoring method for a periodically running task of a forward and backward triggering type comprises the following steps:

[0012] (1) Monitor the start trigger signal and the triggered signal in the periodic task;

[0013] (2) calculating the time interval between the monitored start trigger signal and the triggered signal;

[0014] (3) comparing the time interval with the task interval duration;

[0015] (4) A protection signal is generated when the time interval exceeds the task interval duration.

[0016] The step (1) also includes the step of setting the task interval duration.

[0017] The step (2) specifically includes: starting counting when a start trigger signal is monitored, stopping counting when a triggered signal is monitored, and saving the final count as a time interval and then performing a zeroing process.

[0018] Beneficial Effects

[0019] Due to the adoption of the above technical solution, the present invention has the following advantages and positive effects compared with the prior art: the present invention can still maintain the monitoring function when the software itself cannot work properly, so that the pre- and post-trigger periodic running task behaviors in the entire life cycle of the software are all under monitoring, making the task monitoring independent and objective. The present invention separates task monitoring from software functions. For the software, the monitoring function of the hardware circuit runs completely independently, avoiding the failure of the task monitoring function due to the failure of the software itself to work properly, so that the entire system achieves extremely high security and reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic structural diagram of an embodiment of the present invention;

[0021] Figure 2 is a schematic diagram of an embodiment of the present invention when in application;

[0022] Figure 3 It is a working principle diagram of an embodiment of the present invention;

[0023] Figure 4 It is a diagram of a system security monitoring panel in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0025] The embodiment of the present invention relates to a hardware monitoring device for a periodic running task of a forward and backward trigger type, such as Figure 1 As shown, it includes: a first signal monitoring unit, which is used to monitor the start trigger signal in the periodic task; a second signal monitoring unit, which is used to monitor the triggered signal in the periodic task; a calculation unit, which is used to calculate the time interval between the monitored start trigger signal and the triggered signal; a comparison unit, which is used to compare the time interval with the preset task interval duration, and generate a trigger signal when the time interval exceeds the preset task interval duration; a protection signal generating unit, which is used to generate a protection signal according to the trigger signal. The hardware monitoring device for the front-to-back triggered periodic running tasks also includes a task interval duration setting unit, which is used to set the task interval duration.

[0026] The calculation unit may be a counter or a logic circuit. The calculation unit used in this embodiment is a counter. There are three options for the clock source of the counter: one is the internal RC oscillator of the task monitor, which has low precision; the second is an independent crystal oscillator, which has high precision; the third is an external clock signal input, and the precision depends on the clock source of the external clock signal. Which clock source is selected to drive the counter depends on the actual application.

[0027] This embodiment includes two types of trigger signals, namely, a start trigger signal and a triggered signal. The start trigger signal is the signal output by the task that occurs first in the preceding and following trigger cycle tasks; the triggered signal is the task that occurs after the trigger task is aligned; the trigger signal does not limit the type of signal used, and this embodiment uses a dedicated trigger signal.

[0028] Figure 2 The schematic diagram of the hardware monitoring device of the present embodiment in application is shown, wherein 1 is a microcontroller, 2 is a start trigger signal, 3 is a triggered signal, 4 is the hardware monitoring device of the present embodiment, and 5 is a protection signal.

[0029] like Figure 2 As shown, the hardware monitoring device 4 of this embodiment is a hardware carrier for the operation of software tasks. In the principle described in this embodiment, in order to distinguish the differences between the front and back triggered tasks, two microcontrollers 1 are used to respectively carry three pairs of front and back triggered periodic running tasks. In each pair of tasks, the first task is in the microcontroller 1, and the second task is in the microcontroller 2. Each task outputs a trigger signal to the hardware monitoring device 4. These trigger signals are initialized to a high level, set to a low level when the task just starts running, and set to a high level before the end of the operation. In this way, the falling edge of the trigger signal can represent the start time of the task.

[0030] The hardware monitoring device 4 can set the task interval duration through the task interval duration setting unit before each work. Its value depends on the task interval of the monitored object. The actual setting is the task interval of the monitored object plus a fault tolerance duration. The determination of the fault tolerance duration depends on the security requirement parameters of the entire system.

[0031] When the first signal monitoring unit of the hardware monitoring device 4 monitors the start trigger signal 2, the counter of the hardware monitoring device 4 starts to increment. Each increment will trigger the internal comparator to compare the counter value with the task interval duration. When the counter value is greater than or equal to the task interval duration, the protection signal generating unit of the hardware monitoring device 4 outputs a protection signal. When an abnormality occurs in the periodic running task of the trigger type, causing the interval between the previous and next tasks to increase abnormally and exceed the task interval duration, it is manifested as Figure 3 The time interval between moments C and D is too long. At moment E, the value of the counter after self-increment operation is greater than or equal to the task interval duration. At this time, the counter stops self-incrementing and is cleared. The safety protection signal 5 generates a rising edge and is output to the outside of the hardware monitoring device 4, notifying the system to perform a safety protection action.

[0032] Since the counter can always stop the self-increment operation and reset to zero when the trigger signal 3 falls when the periodic running task works normally, the hardware monitoring device 4 returns to the established state, achieving the effect of being in a standby state before each falling edge of the start trigger signal 2. Therefore, the present invention has the monitoring effect of periodic running tasks, can run independently for a long time, and perform monitoring actions when the task interval is abnormal.

[0033] An embodiment of the present invention also relates to a hardware monitoring method for a front-and-back triggered periodic running task, comprising the following steps: monitoring the start trigger signal and the triggered signal in the periodic task; calculating the time interval between the monitored start trigger signal and the triggered signal; comparing the time interval with the task interval duration; and generating a protection signal when the time interval exceeds the task interval duration.

[0034] The present invention is further illustrated by a specific embodiment below.

[0035] like Figure 3 The figure shows a system security monitoring panel, which monitors the working status of three task pairs and reflects their working status in the form of alarm lights. When the task pairs are working normally, the corresponding normal lights are on and the abnormal lights are off; otherwise, the corresponding normal lights are off and the abnormal lights are on. When any of the abnormal lights of the three task pairs is on, the monitoring personnel clicks the "system reset button" to reset the system.

[0036] In this application case, three pairs of front-to-back triggered periodic operation tasks are involved. The first pair: the first task is the current loop calculation task of the first winding of the dual-winding motor, and the second task is the current loop calculation task of the second winding of the dual-winding motor. The time interval between the two is fixed at 50us; the second pair: the first task is the solenoid valve group 1 to control the attraction, and the second task is the solenoid valve group 2 to control the separation, and the time interval between the two is 100us; the third pair: the first task is the motor position sensor calculation task, and the second task is the displacement sensor calculation task, and the time interval between the two is fixed at 10us; it is known that these three task pairs are all safety-related tasks, and the task interval time cannot exceed 10% of the design time, otherwise the system is in an unsafe state. The solution is to use the "system reset button" to return the system to a known safe state.

[0037] There are three hardware monitoring devices in this application case to monitor the above three task pairs respectively. The task interval duration is set to 55us, 110us, and 11us respectively. The clock source of the counter selects an external high-precision 1MHz clock signal. The safety protection signals of the three task monitors are passed through the amplification circuit and the selection circuit. When the safety protection signal is low, the normal light on the control panel is on and the abnormal light is off. When the safety protection signal is high, the normal light is off and the abnormal light is on. When the "system reset button" is pressed, the reset pin of the microcontroller is pulled low through the internal circuit to restart the microcontroller. Through the above operations, the minimum monitoring system of the three task pairs is realized, and the system safety is improved.

Claims

1. A hardware monitoring device for periodic tasks of a forward and backward trigger type, characterized in that: include: A first signal monitoring unit, used for monitoring a start trigger signal in a periodic task; A second signal monitoring unit, used for monitoring the triggered signal in the periodic task; A calculation unit is used to calculate the time interval between the monitored start trigger signal and the triggered signal, specifically: start counting when the start trigger signal is monitored, stop counting when the triggered signal is monitored, and save the final count as the time interval and then clear it; A comparison unit, used to compare the time interval with a preset task interval duration, and generate a trigger signal when the time interval exceeds the preset task interval duration; A protection signal generating unit is used to generate a protection signal according to the trigger signal.

2. The hardware monitoring device for periodic running tasks of the before-after trigger type according to claim 1, characterized in that: It also includes a task interval duration setting unit, which is used to set the task interval duration.

3. The hardware monitoring device for periodic running tasks of the before-after trigger type according to claim 1, characterized in that: The calculation unit is a counter.

4. A hardware monitoring method for a periodic task of a forward and backward trigger type, characterized in that: The following steps are involved: (1) A first signal monitoring unit is used to monitor the start trigger signal in the periodic task, and a second signal monitoring unit is used to monitor the triggered signal in the periodic task; (2) calculating the time interval between the monitored start trigger signal and the triggered signal by a calculation unit, specifically: starting counting when the start trigger signal is monitored, stopping counting when the triggered signal is monitored, and saving the final count as the time interval and then clearing it; (3) comparing the time interval with the task interval duration; (4) When the time interval exceeds the task interval duration, a protection signal is generated.

5. The hardware monitoring method for periodic tasks of the before-after trigger type according to claim 4 is characterized in that: The step (1) also includes the step of setting the task interval duration.