Unlock instant, AI-driven research and patent intelligence for your innovation.

Processing method for solving problem of time interleaving of timer during frequency measurement through cycle measuring method

A technology for measuring frequency and processing method, which is applied in the field of processing the problem of timer sequence interleaving when measuring frequency by using the cycle measurement method, which can solve problems such as strong interference fluctuation and achieve the effect of avoiding carry

Active Publication Date: 2014-10-08
XIAN AERO ENGINE CONTROLS
View PDF7 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The resulting system, while functioning normally most of the time, has occasional fluctuations resembling strong disturbances

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Processing method for solving problem of time interleaving of timer during frequency measurement through cycle measuring method
  • Processing method for solving problem of time interleaving of timer during frequency measurement through cycle measuring method
  • Processing method for solving problem of time interleaving of timer during frequency measurement through cycle measuring method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0045] refer to figure 1, the hardware background in this embodiment is: multi-stage cascading of timers, without hardware capture function. use figure 1 In the process shown, the read high and low data of the timer completely avoids the situation of interspersed carry and ensures the correct length of the subsequent calculation cycle. The selection of the limit X should ensure that: if the condition in c) is not satisfied, no timer carry will occur between a) and b). Among them, "high bits at all levels" means that if the timers are cascaded to more than two levels, they are collectively referred to as "high bits at all levels" except for the lowest level.

[0046] In this case, the method for dealing with the timing interleaving problem of the timer when measuring the frequency by the cycle measurement method includes the following steps:

[0047] a) Read the high-order timer;

[0048] b) read the low timer;

[0049] c) If the read value of the low-order timer is less t...

Embodiment 2

[0051] refer to figure 2 , the hardware background in this embodiment is: multi-stage cascading of timers, and its low bits have hardware capture functions. Used in the capture interrupt routine figure 2 In the flow shown, when there is a possibility of a carry immediately after the capture time, the final high value of the timer obtained is actually the value before the capture, which also completely avoids the interspersed carry and ensures the correct length of the subsequent calculation cycle .

[0052] In this case, the method for dealing with the timing interleaving problem of the timer when measuring the frequency by the cycle measurement method includes the following steps:

[0053] a) Take the capture value as the low bit of this timing value, and this step can also be moved to any moment before the low bit of this timing value is used later;

[0054] b) Read the high-order timer and temporarily use it as the high-order value of this timing value;

[0055] c) re...

Embodiment 3

[0062] refer to image 3 , the hardware and software background in the present embodiment is: the timer has a hardware capture function, and when the timer overflows, an interrupt can be generated, and the variable V is incremented in the timer overflow interrupt service routine. Used in the capture interrupt program (interrupts are turned off when entering) image 3 The flow shown obtains V and vbak for use below. When there is a possibility that the timer is full and overflows immediately before and after the capture time, it can be guaranteed that the finally obtained vbak is actually the theoretical value before capture, and also completely avoids the occurrence of errors due to timing interleaving.

[0063] In this case, the method of dealing with the timing interleaving problem of the timer when measuring the frequency by the cycle measurement method, the operation of reading the current timing value in the capture interrupt includes the following steps:

[0064] a) Fo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

Provided is a method for overcoming errors caused by time interleaving of carry and overflow of a timer and actions of interruption, capture and the like when software conducts reading actions on the timer. Regarding various hardware backgrounds, by means of the method of logical judgment and reasonable arrangement of operation sequence, incidents of carry, overflow and the like of the timer influencing the correctness of a result and occurring in an alternating mode in the process of formal reading operation of the timer are avoided, and it is ensured that all timing values at the moment are completely correct.

Description

Technical field [0001] The invention relates to a method for avoiding possible errors caused by the timing interleaving of the system's reading action of the timer and the timing interleaving of the timer's carry, overflow, interrupt and capture when the frequency is measured by the cycle measurement method. Background technique [0002] In the microcomputer-based industrial control system, there are usually two methods of direct frequency measurement and cycle measurement for frequency measurement. Among them, the cycle measurement method is to measure the length of the cycle, and its reciprocal represents the frequency. The cycle measurement method is superior to the direct frequency measurement method in terms of delay and accuracy. However, there are some technical details in the week measurement method that need to be considered. One of the problems is the timing interleaving of several events when reading timer information. [0003] The general basic algorithm of the...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/22G06F11/26
Inventor 郝立中龚新平许奉亮燕洁静周彩霞朱旭
Owner XIAN AERO ENGINE CONTROLS
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More