# Be based on sheet piece the word of degree waiting for essence of life of machine measures frequency

- Time:
- Click:226
- source:WILDA CNC Machining

Electronic computation measures frequency principle block diagram above all, the signal that be measured carries enlarge plastic, form extent to agree, appearance agrees is computation pulse. Next, n adds it an input end of gate, gate accuses signal to control its to shut time by the door. Plan gotten pulse sends to coding, deliver monitor to show again. And the plastics of enlarge of oscillation signal classics of the 1MHz that You Jingzhen produces, form square wave, via 10s of many 10 scale down, 1s, 0.

1s, 0.

01s, 1ms, so Fx=N ／ T accords with the definition that measure frequency. According to F=N ／ T. See not hard, collect what measure frequency with tally to measure an error, forbid definitely on gate time T definitely on one hand truly, namely the Fo) of ／ of Fo of △ of T=-(of ／ of accuracy △ T of the standard frequency that You Jingzhen offers; Decide on the other hand at tally plan gotten number allows to forbid, namely 1 error of " ± " , 1 ／ of ± of N= of △ N ／ N= ± (XTfx) of 1 ／ ○ . So, tally measures the error of frequency to basically have two directly, namely 1 sum of errors of ± standard frequency error. When measuring low frequency, the error measuring frequency that as a result of ± 1 error produces is gotten greatly breathtaking, should not be so use the direct method that measure frequency. Because FX is inferior when, benefit measures frequency directly with tally, the error measuring frequency that by ± 1 error place causes will arrive greatly the rate that cannot permit. So, measure the accuracy when low frequency to rise, reduce the effect of 1 error of ± namely, can change to measure periodic Tx first, calculate next Fx=1 ／ Tx. 2.

Electronic tally measures classics of Tx of periodic principle to magnify plastic is controlled bistable trigger forms the door to accuse signal, control gate shut; Next the oscillation signal of the 1MHz that brilliant wipe or dab to sop up liquid produces, form square wave via enlarge plastics, generation extent is consistent, appearance agrees is computation pulse. When gate is opened, have count to computation pulse; When gate is shut, stop computation. Plan gotten pulse sends coding, send show. 3.

Odd a 8XX51 of of principle of machine timer job is odd the timer T1 of a machine by TH1, TL1 composition, timer T0 by TH0, TL0 composition. They all are 8 register, map is in special function register, cover an area of location 8AH, 8BH. They are used at depositing to time or enumerated initiative value. In addition, interior still has a 8 means to choose register TMOD and a 8 control register TCON, cover an area of location 89H and 88H, use at choosing the working way of timer ／ tally, if computation is time still (C ／ - T) , started way (GATE) and hair start control signal TRx. Time and the computation that computation essence is pair of pulse, just by plan the origin of pulse is different, the computation initial value of time means and by plan the cycle of pulse is concerned, and the computation initial value of computation means is mixed only by plan a number of pulse about (plan by count) high to low edge. 8031 sheet piece two are contained inside machine 16 but tally of process designing time ／ . All but process designing is periodic to in-house machine computation (time means) , or have count to the pulse of the exterior input that cite a base (computation means) . CPU works at 12MHz advocate when frequency, 500kHz of frequency of exterior and highest computation, frequency of in-house clock computation amounts to 1MHz. The cycle of fiducial and time pulse of timer is 1 μ S, when using the means that measure frequency, process designing of T ／ C0 is computation means, to be being measured signal frequency meter is counted, of generation desire buy detect time. As a result of timer the longest time time is 65535s, be about to arise longer detect time needs to use software tally, interrupt for many times can obtain place to need to detect time. When the frequency that be measured is inferior, choose measure week of way; Process designing of T ／ C1 is time means, use pair of M the time that input pulse cycle experiences times. 4.

Waiting for precision to measure one of main good points of microprocessor of principle block diagram is the data processing capacity that can use microprocessor, reduce the error of system of random sum of errors of the generation in measuring a process, rise thereby measure precision, place is gone to before a sheet piece accident is used in the electron to measure a process in, will rise measure precision. The precision such as implementation measures a principle, the key is to make Nx does not produce an error, and No does not exceed ± 1 error. Use technology of PC bus line, designed corresponding control door circuit, realize the computation of signal of pair of the frequency that be measured and corresponding accurate gate time, make the open of gate and shut and be measured of signal jump effectively become synchronous. Beforehand of buy door open and shut mix by the signal that be measured beforehand the measurement of buy time control, tally Nx is in be opposite below the control of buy door beforehand computation of frequency of the signal that be measured, control door basis beforehand buy door produces an as synchronous as the signal that be measured synchronous door; Tally No issues pair of markers computation in the control of synchronous door, get accurate gate time Tg. Set markers cycle to be To, be measured NoTo of frequency Fx=Nx ／ . Odd the method measuring frequency that uses time Ls checks a machine first signal undertakes forecasting, cycle of the occasional when software chooses automatically to detect according to frequency discretion is patulous and diploid, measure precision higher in order to make sure each archives has. When input signal frequency exceeds 100kHz, signal is entered via evacuation of patulous tally scale down 8031 measure by the law that measure frequency, frequency detects time sets 3 file, it is respectively 0.

01s, 0.

1s, 1s. After turning into cycle to measure, signal sends sheet directly piece machine, periodic and patulous multiple has 104, 103, 102, 10, 1 5 archives. As a result of sheet piece the highest computation frequency of machine is 500kHz, limitted the scope that measure frequency, must be opposite high frequency undertake scale down. Patulous N scale down implement hind, will produce scale down error. This N scale down most the general is brought about (N-1) wait for the scale down error that measures frequency cycle. This margin of error class and error of " ± L" comparative, bigger even. Measure frequency resolution to rise, we used technology of hardware synchronism scale down, rise effectively of open in gate namely edge hour, to 74LS591 scale down implement to clear. Hour is closed in gate, infiltrate scale down condition 74LS244 of bus line bumper, 8031 numerate through bumper its are worth, eliminated " of error of " scale down thereby. In this system, when process designing of T ／ C1 is time means, in 12MHz brilliant brace up issue its the greatest time time has 65 only.

536ms, need to use software to expand the capacity of tally. Namely tally every spill over interrupt, piece inside the content of RAM adds one count, such greatly enlarge odd the computation limits of a machine. But also introduced at the same time interrupt response time error, we say for " of " software error. The core of frequency meter is the validity with fiducial time, because this is when time of timer of the replacement after interrupting is invariable, cannot use replacement method simply. From sheet piece of machine interrupt answer a system to reach its to answer a process knowable: (1) timer spills over every time when interrupting, WAIT statement must carry out ability to answer, the executive time of this instruction is 2 μ S, we take our average delay time is 1 μ S; (2)CPU is answered interrupt carry out suspend service program first instruction requires 3 complete machine cycle at least, namely delay time 3 μ S; (3) suspends the actual time time in serving a program is to carrying out the ability after the lading of time constant dictates to begin, two lade the instruction takes up 4 μ S. According to above analysis. After be being interrupted every time, the ability after making an appointment with defer 8 μ S begins to time. The time time that wins actually must consider the delay of 8 μ S, this frequency meter uses software compensatory processing technique to reduce its to affect. Because software repairs positive to become,can make adjust further, because this basically can eliminate software error. Frequency meter basis is measured the size of signal frequency, software controls automatic switch frequency to detect time, or automatic changeover is measured for cycle, its software design is used modular structural design, programming and debug very convenient, functional augment is very agile also. Odd a machine electrify restoration hind, implement a main program above all, finish the initialization of concerned chip and timer, the setting measures means to wait at the beginning of initial value of tally of data buffer, indication means, data and frequency. The bring up the rear in leaving, detect at any time exterior interrupt what give out with timer place to interrupt request signal, once have,turn to suspend service program accordingly, return indication program otherwise, show measures frequency is worth. 5.

The article passes the last word quite before the analysis that electronic computation measures computation of frequency principle, electron to measure periodic principle, couple is odd a machine is time the working principle of ／ tally, gave out to wait for what precision measures principle and software error to eliminate a method. Implementation rises simple and reliable and price of tall, sex compares function stability, precision low good point. CNC Milling CNC Machining