CN112416673A - Hardware monitoring device and method for front-back trigger type periodic operation task - Google Patents
Hardware monitoring device and method for front-back trigger type periodic operation task Download PDFInfo
- Publication number
- CN112416673A CN112416673A CN202011265798.4A CN202011265798A CN112416673A CN 112416673 A CN112416673 A CN 112416673A CN 202011265798 A CN202011265798 A CN 202011265798A CN 112416673 A CN112416673 A CN 112416673A
- Authority
- CN
- China
- Prior art keywords
- task
- signal
- monitoring
- trigger
- time interval
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000000737 periodic effect Effects 0.000 title claims abstract description 41
- 238000012806 monitoring device Methods 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 title claims abstract description 16
- 238000012544 monitoring process Methods 0.000 claims abstract description 52
- 230000001960 triggered effect Effects 0.000 claims abstract description 21
- 238000012545 processing Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 6
- 230000002159 abnormal effect Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 238000004804 winding Methods 0.000 description 4
- 238000009825 accumulation Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2284—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/325—Display of status information by lamps or LED's
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to a hardware monitoring device for a front-back trigger type periodic operation task, which comprises: the first signal monitoring unit is used for monitoring a starting trigger signal in a periodic task; the second signal monitoring unit is used for monitoring the triggered signal in the periodic task; the computing unit is used for computing the time interval between the monitored starting trigger signal and the triggered signal; the comparison unit is used for comparing the time interval with a preset task interval duration and generating a trigger signal when the time interval exceeds the preset task interval duration; and the protection signal generating unit is used for generating a protection signal according to the trigger signal. The invention also relates to a hardware monitoring method for the front-back trigger type periodic operation task. The invention can ensure the monitoring effect.
Description
Technical Field
The invention relates to the technical field of periodic task monitoring, in particular to a hardware monitoring device and method for a front-back trigger type periodic operation task.
Background
For monitoring tasks with fixed sequence and fixed running distance, the existing monitoring methods at present comprise the following steps:
one is that a monitoring task is specially set in software, a software mark is set in the monitored task to carry out regular change, then whether the software mark changes according to an expected change rule is periodically checked in the software monitoring task, if the change of the software mark is found to be not in accordance with the expected change rule, the operation of a front trigger type periodic task and a rear trigger type periodic task is judged to be abnormal, and then a safety protection action is executed or a safety protection signal is output in the software;
one is that a monitoring task is specially set in software, a subtask recording the same clock value is added in each of a front trigger type periodic task and a rear trigger type periodic task, then 2 clock value deviations recorded in the trigger type periodic tasks are periodically checked in the monitoring task, if the deviations exceed an expected value, the operation of the front trigger type periodic task and the rear trigger type periodic task is judged to be abnormal, and then a safety protection action is executed or a safety protection signal is output in the software;
one is to set output signals for periodic tasks, monitor whether each periodic task signal is output according to fixed time length through an external monitor, and if the output signal exceeds an expected value, the external monitor outputs a safety protection signal;
the problems with the above three techniques are: the first two monitoring methods are software monitoring methods, the monitoring effect depends on the state of the software, and when the software is abnormal, the reliability of the monitoring result is reduced, and the reliability is poor; the third method cannot realize the monitoring of 2 tasks with fixed precedence order and fixed time interval, only can monitor the periodic running state of a single task, when the period of the single task generates error accumulation, an external monitoring circuit cannot identify the error accumulation, but the precedence execution order of two periodic tasks may change, so that the monitoring effect is poor.
Disclosure of Invention
The invention aims to solve the technical problem of providing a hardware monitoring device and a method for a front-back trigger type periodic operation task, which can ensure the monitoring effect.
The technical scheme adopted by the invention for solving the technical problems is as follows: provided is a hardware monitoring device for a front-back trigger type periodic operation task, comprising: the first signal monitoring unit is used for monitoring a starting trigger signal in a periodic task; the second signal monitoring unit is used for monitoring the triggered signal in the periodic task; the computing unit is used for computing the time interval between the monitored starting trigger signal and the triggered signal; the comparison unit is used for comparing the time interval with a preset task interval duration and generating a trigger signal when the time interval exceeds the preset task interval duration; and the protection signal generating unit is used for generating a protection signal according to the trigger signal.
The hardware monitoring device for the front-back trigger type periodic operation task further comprises a task interval duration setting unit used for setting the task interval duration.
The calculating unit is a counter.
A hardware monitoring method for a front-back trigger type periodic operation task comprises the following steps:
(1) monitoring a starting trigger signal and a triggered signal in a periodic task;
(2) calculating a time interval between the monitored start trigger signal and the triggered signal;
(3) comparing the time interval to a task interval duration;
(4) generating a guard signal when the time interval exceeds a task interval duration.
The method also comprises the step of setting the task interval duration before the step (1).
The step (2) is specifically as follows: and starting counting when the starting trigger signal is monitored, stopping counting when the triggered signal is monitored, storing the final count as a time interval, and then performing zero clearing processing.
Advantageous effects
Due to the adoption of the technical scheme, compared with the prior art, the invention has the following advantages and positive effects: the invention can still maintain the monitoring function when the software cannot work normally, so that the front and back triggering type periodic operation task behaviors in the whole life cycle of the software are all under monitoring, and the task monitoring has independence and objectivity. The invention separates the task monitoring from the software function, and for the software, the monitoring function of the hardware circuit is completely independent, thereby avoiding the failure of the task monitoring function caused by the abnormal work of the software, and leading the whole system to achieve extremely high safety and reliability.
Drawings
FIG. 1 is a schematic structural diagram of an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of the present invention as applied;
FIG. 3 is a functional schematic diagram of an embodiment of the present invention;
fig. 4 is a diagram of a system security monitoring panel in accordance with an embodiment of the present invention.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and such equivalents may fall within the scope of the present invention as defined in the appended claims.
The embodiment of the invention relates to a hardware monitoring device for a front-back trigger type periodic operation task, as shown in fig. 1, comprising: the first signal monitoring unit is used for monitoring a starting trigger signal in a periodic task; the second signal monitoring unit is used for monitoring the triggered signal in the periodic task; the computing unit is used for computing the time interval between the monitored starting trigger signal and the triggered signal; the comparison unit is used for comparing the time interval with a preset task interval duration and generating a trigger signal when the time interval exceeds the preset task interval duration; and the protection signal generating unit is used for generating a protection signal according to the trigger signal. The hardware monitoring device for the front-back trigger type periodic operation task further comprises a task interval duration setting unit used for setting the task interval duration.
The calculating unit may be a counter or a logic circuit. The calculation unit employed in the present embodiment is a counter. The clock source of the counter has three choices: firstly, an internal RC oscillator of the task monitor has low precision; secondly, the crystal oscillator is independent, and the precision is high; and thirdly, inputting an external clock signal, wherein the precision depends on the clock source of the external clock signal. Which clock source is specifically chosen to drive the counter depends on the application.
In this embodiment, two trigger signals are included, namely, a start trigger signal and a triggered signal. The starting trigger signal is a signal output by a task which occurs first in the tasks of the front trigger period and the rear trigger period; the triggered signal is a task which occurs after the triggering task is centered; the trigger signal is not limited to the type of the use signal, and a dedicated trigger signal is used in the present embodiment.
Fig. 2 is a schematic diagram of the hardware monitoring apparatus according to the present embodiment in application, where 1 is a microcontroller, 2 is a start trigger signal, 3 is a triggered signal, 4 is the hardware monitoring apparatus according to the present embodiment, and 5 is a protection signal.
As shown in fig. 2, the hardware monitoring device 4 of this embodiment is a hardware carrier for running a software task, and in the principle described in this embodiment, in order to distinguish the difference between the front and back trigger-type tasks, two microcontrollers 1 are used to respectively carry three pairs of front and back trigger-type periodic running tasks, in each pair of tasks, the 1 st task is in the microcontroller 1, the 2 nd task is in the microcontroller 2, each task outputs a trigger signal to the hardware monitoring device 4, the trigger signals are initialized to a high level, and are set to a low level when the task just starts running, and set to a high level when the task ends running, so that a falling edge of the trigger signal can represent the starting running time of the task.
The hardware monitoring device 4 can set the task interval duration through the task interval duration setting unit before each work, the value of the task interval duration depends on the task interval of the monitored object, the actual task interval of the monitored object is set to be the task interval plus one fault-tolerant duration, and the determination of the fault-tolerant duration depends on the required parameters of the whole system for safety.
When the first signal monitoring unit of the hardware monitoring device 4 monitors the start trigger signal 2, after the counter of the hardware monitoring device 4 starts to increment, the internal comparator is triggered to compare the counter value with the task interval duration every time the counter increments, and 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 the current post-trigger type periodic operation task is abnormal, the time interval between the front task and the rear task is abnormally increased and exceeds the time interval between the tasks, which is represented as that the time interval between the C time and the D time in fig. 3 is too long, and at the E time, the value after the self-increment operation of the counter is greater than or equal to the time interval between the tasks, at the moment, the counter stops self-increment and is reset, and the safety protection signal 5 generates a rising edge and is output to the outside of the hardware monitoring device 4, so that the system is informed of executing the safety protection action.
When the periodic operation task works normally, the counter can always stop the self-increment operation and clear when the falling edge of the triggered signal 3 occurs, so that the hardware monitoring device 4 returns to the established state, and the effect of being in the standby state before the falling edge of the trigger signal 2 is started every 1 time is achieved.
The embodiment of the invention also relates to a hardware monitoring method for the front-back trigger type periodic operation task, which comprises the following steps: monitoring a starting trigger signal and a triggered signal in a periodic task; calculating a time interval between the monitored start trigger signal and the triggered signal; comparing the time interval to a task interval duration; generating a guard signal when the time interval exceeds a task interval duration.
The invention is further illustrated by the following specific example.
As shown in fig. 3, the panel is a system safety monitoring panel, and the panel monitors the working states of three task pairs and displays the working states in the form of alarm lamps, when a task pair works normally, the corresponding normal lamp is on, and the abnormal lamp is off; otherwise, the corresponding normal lamp is turned off, and the abnormal lamp is turned on; when any abnormal lamp of the three tasks is turned on, the monitoring personnel clicks a system reset button to reset the system.
In this application, three pairs of front and rear trigger-type periodic operation tasks are involved, the first pair: the 1 st task is a 1 st winding current loop operation task of the double-winding motor, the 2 nd task is a 2 nd winding current loop operation task of the double-winding motor, and the time interval of the 2 nd task is fixed to 50 us; the second pair: the 1 st task is the control attraction of the electromagnetic valve group 1, the 2 nd task is the control separation of the electromagnetic valve group 2, and the time interval of the 2 tasks is 100 us; and a third pair: the 1 st task is a motor position sensor operation task, the 2 nd task is a displacement sensor operation task, and the time interval between the two tasks is fixed to be 10 us; the three task pairs are known to be safety-related tasks, the task interval time of the three task pairs cannot exceed 10% of the design time, otherwise, the system is in an unsafe state, and the solution is to return the system to a known safe state through a system reset button.
In the application case, three hardware monitoring devices respectively monitor the three task pairs, the task interval duration is respectively set to be 55us, 110us and 11us, and an external high-precision 1MHz clock signal is selected as a clock source of a counter. The safety protection signal of three task watch-dog passes through amplifier circuit and selection circuit, can realize when the safety protection signal is low, and normal lamp on the control panel is bright, and unusual lamp goes out, and when the safety protection signal was high, then normal lamp goes out, and unusual lamp is bright. When the system reset button is pressed down, the reset pin of the microcontroller is pulled down through an internal circuit, so that the microcontroller is restarted. Through the operation, the minimum monitoring system of the three task pairs is realized, and the system safety is improved.
Claims (6)
1. A hardware monitoring device for a front-back trigger type periodically-running task is characterized by comprising: the first signal monitoring unit is used for monitoring a starting trigger signal in a periodic task; the second signal monitoring unit is used for monitoring the triggered signal in the periodic task; the computing unit is used for computing the time interval between the monitored starting trigger signal and the triggered signal; the comparison unit is used for comparing the time interval with a preset task interval duration and generating a trigger signal when the time interval exceeds the preset task interval duration; and the protection signal generating unit is used for generating a protection signal according to the trigger signal.
2. The hardware monitoring device for a front-to-back trigger-type periodically-executed task as claimed in claim 1, further comprising a task interval duration setting unit for setting a task interval duration.
3. The hardware monitoring device of the front-back trigger type periodically running task as claimed in claim 1, wherein the calculating unit is a counter.
4. A hardware monitoring method for a front-back trigger type periodic operation task is characterized by comprising the following steps:
(1) monitoring a starting trigger signal and a triggered signal in a periodic task;
(2) calculating a time interval between the monitored start trigger signal and the triggered signal;
(3) comparing the time interval to a task interval duration;
(4) generating a guard signal when the time interval exceeds a task interval duration.
5. The method for hardware monitoring of a front-to-back trigger-type periodically-running task according to claim 4, wherein the step (1) is preceded by a step of setting a task interval duration.
6. The hardware monitoring method for the front-back trigger type periodically-operated task as claimed in claim 4, wherein the step (2) is specifically as follows: and starting counting when the starting trigger signal is monitored, stopping counting when the triggered signal is monitored, storing the final count as a time interval, and then performing zero clearing processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011265798.4A CN112416673A (en) | 2020-11-13 | 2020-11-13 | Hardware monitoring device and method for front-back trigger type periodic operation task |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011265798.4A CN112416673A (en) | 2020-11-13 | 2020-11-13 | Hardware monitoring device and method for front-back trigger type periodic operation task |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112416673A true CN112416673A (en) | 2021-02-26 |
Family
ID=74832664
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011265798.4A Pending CN112416673A (en) | 2020-11-13 | 2020-11-13 | Hardware monitoring device and method for front-back trigger type periodic operation task |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112416673A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000010824A (en) * | 1998-06-24 | 2000-01-14 | Nec Corp | Software monitor circuit |
CN101295273A (en) * | 2008-06-20 | 2008-10-29 | 北京中星微电子有限公司 | Watchdog and design method thereof |
EP2133762A1 (en) * | 2008-06-09 | 2009-12-16 | Siemens Aktiengesellschaft | Method for monitoring the time basis of a data processing unit and data processing unit |
JP2010009296A (en) * | 2008-06-26 | 2010-01-14 | Fujitsu Ltd | Software operation monitoring device and method |
CN103577262A (en) * | 2012-07-30 | 2014-02-12 | 空中客车运营简化股份公司 | Method for monitoring coordinated execution of sequencing task |
CN106407097A (en) * | 2016-11-30 | 2017-02-15 | 努比亚技术有限公司 | Server fault pre-warning device and method |
CN110048374A (en) * | 2019-05-05 | 2019-07-23 | 广州金升阳科技有限公司 | The control method and converter of a kind of output short circuit protection circuit, converter |
CN110147140A (en) * | 2019-05-09 | 2019-08-20 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of clock signal, which is intersected, compares monitoring method and circuit |
CN110221905A (en) * | 2019-05-22 | 2019-09-10 | 网联清算有限公司 | Timed task monitoring method, device, system, equipment and storage medium |
-
2020
- 2020-11-13 CN CN202011265798.4A patent/CN112416673A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000010824A (en) * | 1998-06-24 | 2000-01-14 | Nec Corp | Software monitor circuit |
EP2133762A1 (en) * | 2008-06-09 | 2009-12-16 | Siemens Aktiengesellschaft | Method for monitoring the time basis of a data processing unit and data processing unit |
CN101295273A (en) * | 2008-06-20 | 2008-10-29 | 北京中星微电子有限公司 | Watchdog and design method thereof |
JP2010009296A (en) * | 2008-06-26 | 2010-01-14 | Fujitsu Ltd | Software operation monitoring device and method |
CN103577262A (en) * | 2012-07-30 | 2014-02-12 | 空中客车运营简化股份公司 | Method for monitoring coordinated execution of sequencing task |
CN106407097A (en) * | 2016-11-30 | 2017-02-15 | 努比亚技术有限公司 | Server fault pre-warning device and method |
CN110048374A (en) * | 2019-05-05 | 2019-07-23 | 广州金升阳科技有限公司 | The control method and converter of a kind of output short circuit protection circuit, converter |
CN110147140A (en) * | 2019-05-09 | 2019-08-20 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of clock signal, which is intersected, compares monitoring method and circuit |
CN110221905A (en) * | 2019-05-22 | 2019-09-10 | 网联清算有限公司 | Timed task monitoring method, device, system, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9720761B2 (en) | System fault detection and processing method, device, and computer readable storage medium | |
US4809280A (en) | Microcomputer system with watchdog timer | |
CN102681907B (en) | Multifunctional watchdog circuit | |
US8954801B2 (en) | Microcomputer and method of operation thereof | |
CN113658414B (en) | Mine equipment fault early warning method and device, terminal equipment and storage medium | |
US20130222068A1 (en) | Oscillation circuit, integrated circuit, and abnormality detection method | |
CN105426263B (en) | A kind of method and system for realizing national treasury system safety operation | |
US7911753B2 (en) | Method and apparatus for detecting and recovering from external electrical disturbances | |
CN109960599B (en) | Chip system, watchdog self-checking method thereof and electrical equipment | |
KR102213676B1 (en) | Terminal apparatus for autosar system with arithmetic operation supervision function and arithmetic operation supervision method of autosar system | |
CN112416673A (en) | Hardware monitoring device and method for front-back trigger type periodic operation task | |
US9672111B2 (en) | Load control backup signal generating circuit | |
CN116683050A (en) | Battery switching method, system, electronic device and storage medium | |
CN112947841A (en) | Method, device, equipment and storage medium for reading embedded flash memory data | |
JP5438667B2 (en) | Microprocessor intermittent error detection method | |
EP2565653B1 (en) | Watchdog for voltage detector with display triggering visual warning | |
JP6450094B2 (en) | Periodic signal monitoring circuit and load control backup signal generation circuit | |
JP2004029992A (en) | Electronic control unit | |
JP7063692B2 (en) | Watchdog timer monitoring system | |
CN105391575A (en) | Treasury control method and system | |
JPS63182451A (en) | Control display apparatus of loom | |
US20190094903A1 (en) | Security control and method for operating a security control | |
WO2023223940A1 (en) | In-vehicle device, program, and information processing method | |
CN110032435A (en) | The method and apparatus of thread are managed in control system | |
JPS60100235A (en) | Self-diagnosing circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |