JPH0530216B2 - - Google Patents

Info

Publication number
JPH0530216B2
JPH0530216B2 JP59128943A JP12894384A JPH0530216B2 JP H0530216 B2 JPH0530216 B2 JP H0530216B2 JP 59128943 A JP59128943 A JP 59128943A JP 12894384 A JP12894384 A JP 12894384A JP H0530216 B2 JPH0530216 B2 JP H0530216B2
Authority
JP
Japan
Prior art keywords
counter
signal
data
edge
cpu
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.)
Expired - Lifetime
Application number
JP59128943A
Other languages
Japanese (ja)
Other versions
JPS618671A (en
Inventor
Hiromi Takano
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP59128943A priority Critical patent/JPS618671A/en
Publication of JPS618671A publication Critical patent/JPS618671A/en
Publication of JPH0530216B2 publication Critical patent/JPH0530216B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/42Devices characterised by the use of electric or magnetic means
    • G01P3/44Devices characterised by the use of electric or magnetic means for measuring angular speed
    • G01P3/48Devices characterised by the use of electric or magnetic means for measuring angular speed by measuring frequency of generated current or voltage
    • G01P3/481Devices characterised by the use of electric or magnetic means for measuring angular speed by measuring frequency of generated current or voltage of pulse signals
    • G01P3/489Digital circuits therefor

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はたとえば周波数発電機(FG)から出
力されるFG信号を波形整形して得られる矩形波
信号の繰り返し周期に相当するエツジ間隔を計測
するエツジ間隔計測装置に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention measures the edge interval corresponding to the repetition period of a rectangular wave signal obtained by waveform shaping an FG signal output from a frequency generator (FG), for example. The present invention relates to an edge spacing measuring device.

〔背景技術とその問題点〕[Background technology and its problems]

従来より、たとえば、ビデオテープレコーダに
おいて、磁気ヘツドが取り付けられた回転ドラム
はビデオ信号の垂直同期信号に応じてNTSC方式
の場合30Hz一定で回転させる必要がある。このた
めには、回転ドラム用のモータの回転速度を周波
数発電機(以下、FGという。)により検出して、
この検出結果に基づいて該モータの回転速度を制
御する方法が一般に知られている。一例として第
1図に示すように、モータ1はFG2と一体に構
成されており、該モータ1の回転軸3に回転方向
に沿つて複数の磁極が着磁形成された磁気リング
4が取り付けられている。そして、この磁気リン
グ4の磁極を強磁性金属磁気抵抗素子等からなる
磁気感応ヘツド5により検出している。すなわ
ち、FG2の磁気感応ヘツド5からは磁気リング
4の磁極の変化に応じて変化する略正弦波状の
FG信号が出力されている。そして、このFG信号
は波形整形回路6により第2図に示すような矩形
波状の信号に整形され、エツジ検出回路の一例と
しての立上り検出回路7に送られる。立上り検出
回路7では上記波形整形されたFG信号のたとえ
ば立上り点P1,P2,P3……が検出され、この各
立上り点P1,P2,P3……間の時間すなわちFG信
号の繰り返し周期に相当する立上り間隔いわゆる
FG周期TFG1,TFG2,……がカウンタ8により順
次計測される。カウンタ8で計測されたFG周期
TFG1,TFG2,……はD/A変換回路(デジタル・
アナログ変換回路)9に順次送られアナログ信号
に変換された後、比較回路10に送られ基準値と
比較されその誤差がエラー信号としてモータ駆動
回路11に送られる。そして、このエラー信号に
応じてモータ駆動回路11によりモータ1の回転
速度が所定値に制御されるようになつている。
Conventionally, for example, in a video tape recorder, a rotating drum to which a magnetic head is attached needs to be rotated at a constant rate of 30 Hz in the case of the NTSC system in response to a vertical synchronization signal of a video signal. To do this, the rotational speed of the motor for the rotating drum is detected by a frequency generator (hereinafter referred to as FG).
A method of controlling the rotational speed of the motor based on this detection result is generally known. As an example, as shown in FIG. 1, a motor 1 is constructed integrally with an FG 2, and a magnetic ring 4 having a plurality of magnetic poles magnetized along the rotational direction is attached to a rotating shaft 3 of the motor 1. ing. The magnetic pole of this magnetic ring 4 is detected by a magnetically sensitive head 5 made of a ferromagnetic metal magnetoresistive element or the like. That is, the magnetically sensitive head 5 of the FG 2 generates a substantially sinusoidal waveform that changes in accordance with changes in the magnetic pole of the magnetic ring 4.
FG signal is being output. This FG signal is shaped by the waveform shaping circuit 6 into a rectangular waveform signal as shown in FIG. 2, and sent to the rising edge detection circuit 7, which is an example of an edge detection circuit. The rise detection circuit 7 detects the rising points P 1 , P 2 , P 3 . . . of the waveform-shaped FG signal, and detects the time between these rising points P 1 , P 2 , P 3 . The rising interval corresponding to the repetition period of
The FG periods T FG1 , T FG2 , . . . are sequentially measured by the counter 8. FG period measured by counter 8
T FG1 , T FG2 , ... are D/A conversion circuits (digital/
After being sequentially sent to an analog conversion circuit (analog conversion circuit) 9 and converted into an analog signal, it is sent to a comparison circuit 10 and compared with a reference value, and the error is sent to a motor drive circuit 11 as an error signal. In response to this error signal, the motor drive circuit 11 controls the rotational speed of the motor 1 to a predetermined value.

このような制御系を用いればある程度のサーボ
はかけられるものの、FG周期の測定精度を高め
ようとしてカウンタ8に供給されるクロツクの周
波数を高めると、ハードウエアの規模が増大する
とともに高速動作の素子が必要となりコストアツ
プの原因となる。また、この制御系はハードウエ
アのみで構成されているため、一度所定値に設定
されると容易に該所定値を変更できず、たとえば
モータ1や該モータ1が使用されている機器に規
格の変更等が生じた場合には、即座に対応できず
自由度が低いという問題点がある。
Although it is possible to apply servo to some extent using such a control system, increasing the frequency of the clock supplied to the counter 8 in order to improve the measurement accuracy of the FG period increases the scale of the hardware and requires high-speed operating elements. is required, which causes an increase in costs. In addition, since this control system is composed only of hardware, once it is set to a predetermined value, the predetermined value cannot be easily changed. There is a problem in that when a change occurs, it cannot be responded to immediately and the degree of freedom is low.

また、ハードウエア構成のカウンタ8の代りに
CPU(中央処理回路)を用い、プログラムいわゆ
るソフトウエアによりカウンタを構成してFG周
期を計測することもできる。この場合には、上述
したような規格の変更等が生じてもプログラムを
組み替えるだけで対応できるが、計数動作の単位
となる時間すなわち計測単位がプログラムによる
ループのステツプ数で決定されてしまうため、計
測精度は上記カウンタ8を用いる場合より劣つて
しまうという問題点がある。
Also, instead of counter 8 in the hardware configuration,
It is also possible to measure the FG period by configuring a counter using a CPU (central processing circuit) and a program called software. In this case, even if the standards change as mentioned above, it can be handled simply by rearranging the program, but since the time that is the unit of counting operation, that is, the unit of measurement, is determined by the number of steps in the loop by the program, There is a problem that the measurement accuracy is inferior to that when the counter 8 is used.

〔発明の目的〕[Purpose of the invention]

本発明は上述した従来の問題点に鑑みてなされ
たものであり、たとえばFG信号を波形整形して
得られる矩形波信号の立上り間隔等のエツジ間隔
を高精度に計測するとともに、種々の変更等が生
じても即座に対応できるように計測の自由度を高
めることを目的とする。
The present invention has been made in view of the above-mentioned conventional problems. For example, the present invention measures edge intervals such as rise intervals of a rectangular wave signal obtained by waveform shaping an FG signal with high precision, and also makes various changes. The purpose is to increase the degree of freedom in measurement so that even if a problem occurs, it can be dealt with immediately.

〔発明の概要〕[Summary of the invention]

本発明に係るエツジ間隔計測装置は上述した目
的を達成するために、少なくともプログラムに応
じて決定されるタイミング毎に入力矩形波信号の
レベルを検出することにより該入力矩形波信号の
エツジを検出し、このエツジ検出タイミングで計
数値データ入力及びクリア信号出力を行い、これ
らのエツジ検出タイミング間隔を計測するととも
に、データの演算を行うCPUシステムと、この
CPUシステムによる時計計測単位よりも細かい
計測単位で時計計測を行うカウンタと、上記入力
矩形波信号のエツジを瞬時に検出して上記カウン
タに計数動作を開始させるとともに上記CPUシ
ステムからの上記クリア信号に応じて上記カウン
タの計数動作を停止させる信号を発生するエツジ
検出回路とを備え、上記CPUシステムは、一の
上記エツジ検出タイミングでの上記カウンタから
の計数値データと、次の上記エツジ検出タイミン
グでの上記カウンタからの計数値データと、これ
らの一のエツジから次のエツジまでの上記エツジ
検出タイミング間隔の計測値データとに基づい
て、上記入力矩形波信号のエツジ間隔のデータを
演算することを特徴とするものである。
In order to achieve the above-mentioned object, the edge interval measuring device according to the present invention detects the edges of the input rectangular wave signal by detecting the level of the input rectangular wave signal at least at each timing determined according to the program. , a CPU system that inputs count value data and outputs a clear signal at this edge detection timing, measures the interval between these edge detection timings, and performs data calculation;
A counter that performs clock measurement in a finer measurement unit than the clock measurement unit by the CPU system, and a counter that instantly detects the edge of the input rectangular wave signal and causes the counter to start counting, and also receives the clear signal from the CPU system. and an edge detection circuit that generates a signal to stop the counting operation of the counter in accordance with the above. calculate the edge interval data of the input rectangular wave signal based on the counted value data from the counter and the measured value data of the edge detection timing interval from one edge to the next edge. This is a characteristic feature.

〔実施例〕〔Example〕

以下、本発明に係るエツジ間隔計測装置の実施
例について図面を用いて詳細に説明する。
Embodiments of the edge interval measuring device according to the present invention will be described in detail below with reference to the drawings.

第3図は本発明が適用された立上り間隔計測装
置を示すブロツク図である。この立上り間隔計測
装置はエツジ間隔の一例として立上り間隔を計測
するものである。まず、第3図および第4図のタ
イムチヤートを用いて、構成を明らかにしながら
基本的動作について説明する。信号入力端子21
には、たとえば図示しないFG(周波数発電機)か
ら、第4図Aに示すような繰り返し周波数720Hz
程度の波形整形された矩形波状のFG信号SFGが供
給される。このFG信号SFGは立上り検出回路22
およびCPU(中央処理回路)23に供給されるよ
うになつている。上記CPU23はたとえば、第
4図Bに示すような一定周期TLPのタイミングで
FG信号SFGがHレベル(ハイレベル)かLレベル
(ローレベル)かを検出することによりエツジす
なわち立上りあるいは立下りを検出している。ま
た、CPU23はこの検出周期TLPを時間計測単位
として計数動作を行うようになつている。なお、
ここでは説明を簡略化するために、検出の周期を
TLP一定としたが、プログラムによつて決定され
るHレベルを検出するためのループのステツプ数
とLレベルを検出するためのループのステツプ数
が異なり、各々の検出の周期が異なることも考え
られる。しかし、ステツプ数が予め分つていれ
ば、後述するCPU23による計数値データDK
対応する時間のデータを得ることはできる。
FIG. 3 is a block diagram showing a rising interval measuring device to which the present invention is applied. This rising interval measuring device measures the rising interval as an example of the edge interval. First, the basic operation will be explained while clarifying the configuration using the time charts of FIGS. 3 and 4. Signal input terminal 21
For example, a repetition frequency of 720 Hz as shown in Figure 4A is generated from an FG (frequency generator) not shown.
A rectangular waveform FG signal SFG whose waveform has been shaped to a certain degree is supplied. This FG signal S FG is the rising edge detection circuit 22
and a CPU (central processing circuit) 23. For example, the CPU 23 operates at a constant period T LP as shown in FIG. 4B.
An edge, that is, a rising or falling edge, is detected by detecting whether the FG signal SFG is at H level (high level) or L level (low level). Further, the CPU 23 performs a counting operation using this detection period TLP as a time measurement unit. In addition,
Here, to simplify the explanation, the detection period is
Although T LP was assumed to be constant, the number of steps in the loop to detect the H level and the number of steps in the loop to detect the L level determined by the program were different, and the cycle of each detection was also considered to be different. It will be done. However, if the number of steps is known in advance, time data corresponding to count value data DK by the CPU 23, which will be described later, can be obtained.

そして、まず、立上り検出回路22によりFG
信号SFGの立上り(LレベルからHレベルへの変
化)が時刻t1に検出される。そうすると、上記立
上り検出回路22からカウンタ24にイネーブル
信号SENが送られ、第4図Cに示すように該カウ
ンタ24の計数動作が開始される。なお、上記カ
ウンタ24は、CPU23による時間計測単位
(この実施例では検出の周期TLP)よりも細かい
計測単位で計数動作し時間計測を行うものとす
る。従つて、上記カウンタ24はCPU23より
も高分解能すなわち高精度の時間計測を行うこと
ができる。
Then, first, the rising edge detection circuit 22 detects the FG.
The rise of the signal SFG (change from L level to H level) is detected at time t1 . Then, the enable signal SEN is sent from the rising edge detection circuit 22 to the counter 24, and the counting operation of the counter 24 is started as shown in FIG. 4C. It is assumed that the counter 24 performs a counting operation and measures time in a measurement unit finer than the time measurement unit by the CPU 23 (in this embodiment, the detection period T LP ). Therefore, the counter 24 can measure time with higher resolution, that is, with higher precision than the CPU 23.

次に、立上り検出回路22より遅れて時刻t2
CPU23によりFG信号SFGの立上りが検出され
る。そうすると、CPU23から立上り検出回路
22にクリア信号SCが送られ、該立上り検出回路
22がクリアされカウンタ24の計数動作が終了
される。そして、この時のカウンタ24の計数値
データdKがゲート回路25を介してCPU23内
に取り込まれる。ここで、カウンタ24はクリア
される。
Next, at time t2 , which is delayed from the rising edge detection circuit 22,
The rise of the FG signal SFG is detected by the CPU 23. Then, a clear signal S C is sent from the CPU 23 to the rising edge detection circuit 22, the rising edge detection circuit 22 is cleared, and the counting operation of the counter 24 is completed. Then, the count value data dK of the counter 24 at this time is taken into the CPU 23 via the gate circuit 25. At this point, the counter 24 is cleared.

なお、計数値データdKは立上り検出回路22に
よるFG信号SFGのk回目(k=1,2,3,…
…)の立上り検出に対応したカウンタ24からの
計数値データであることを示す。
Incidentally, the count value data d K is the k - th (k=1, 2, 3,...
...) indicates that the count value data is from the counter 24 corresponding to the rising edge detection.

続いて、CPU23により時刻t3にFG信号SFG
立下つたことが検出され、計測しようとする立上
り間隔すなわちFG周期TFGKの略半分が経過した
ことが確認される。次に、立上り検出回路22に
よりFG信号SFGの立上りが時刻t4に検出される。
そうすると、上記立上り検出回路22からカウン
タ24にイネーブル信号SENが送られ、第4図C
に示すように該カウンタ24の計数動作が再び開
始される。そして、上記立上り検出回路22より
遅れて時刻t5にCPU23によりFG信号SFGの立上
りが検出される。そうすると、CPU23から立
上り検出回路22にクリア信号SCが送られ、該立
上り検出回路22がクリアされカウンタ24の計
数動作が終了される。そして、この時のカウンタ
24の計数値データdK+1がゲート回路25を介し
てCPU23内に取り込まれる。ここで、カウン
タ25はクリアされる。なお計数値データdK+1
立上り検出回路22によるFG信号SFGのk+1回
目の立上り検出に対応したカウンタ24からの計
数値データであることを示す。
Subsequently, the CPU 23 detects that the FG signal SFG falls at time t3 , confirming that approximately half of the rising interval to be measured, that is, the FG period TFGK, has elapsed. Next, the rising edge of the FG signal SFG is detected by the rising edge detection circuit 22 at time t4 .
Then, the enable signal S EN is sent from the rising edge detection circuit 22 to the counter 24, and the enable signal S EN is sent to the counter 24.
The counting operation of the counter 24 is restarted as shown in FIG. Then, the rise of the FG signal SFG is detected by the CPU 23 at time t5 , later than the rise detection circuit 22. Then, a clear signal S C is sent from the CPU 23 to the rising edge detection circuit 22, the rising edge detection circuit 22 is cleared, and the counting operation of the counter 24 is completed. Then, the count value data d K+1 of the counter 24 at this time is taken into the CPU 23 via the gate circuit 25 . At this point, the counter 25 is cleared. Note that count value data d K+1 indicates count value data from the counter 24 corresponding to the (k+1)th rise detection of the FG signal SFG by the rise detection circuit 22.

また、CPU23では時刻t2〜t5までの計数値デ
ータDKが算出される。この計数値データDKはFG
信号SFGのk回目の立上りとk+1回目の立上り
とをそれぞれCPU23により検出してこれらの
立上り検出タイミングの間隔としてCPU23に
より計測されたデータを示す。なお、この実施例
では前述したCPU23のHレベル、Lレベルの
検出周期をTLP一定としたため計数値データが得
られたが、検出の周期が異なる場合にも時刻t2
t5までの時間のデータを得ることはできる。
Further, the CPU 23 calculates count value data D K from time t 2 to time t 5 . This count value data D K is FG
The CPU 23 detects the k-th rising edge and the k+1-th rising edge of the signal SFG , respectively, and shows data measured by the CPU 23 as an interval between these rising detection timings. In this embodiment, count value data was obtained because the detection cycle of the H level and L level of the CPU 23 was constant TLP , but even when the detection cycle is different, it is possible to obtain data from time t2 to
It is possible to obtain data for times up to t 5 .

そして、CPU23により各計数値データdK
dK+1,DKに対して演算dK−dK+1+DKが行われ、
FG信号SFGの立上り間隔すなわちFG周期TFGK
対応したデータが得られるようになつている。更
に、このデータはCPU23からラツチ付のD/
A変換回路(デジタル・アナログ変換回路)26
に送られ、アナログの出力信号SOUTとして信号出
力端子27から出力される。なお、この出力信号
SOUTは図示しない比較回路に送られ基準値と比較
されエラー信号が得られるようになつている。
Then, each count value data d K ,
The operation d K −d K +1 +D K is performed on d K+1 and D K ,
Data corresponding to the rising interval of the FG signal SFG , that is, the FG period TFGK, can be obtained. Furthermore, this data is transferred from the CPU 23 to the D/D with a latch.
A conversion circuit (digital/analog conversion circuit) 26
and output from the signal output terminal 27 as an analog output signal S OUT . Note that this output signal
S OUT is sent to a comparison circuit (not shown) and compared with a reference value to obtain an error signal.

以上、基本的な動作について説明したが、後述
するように定常状態においては上述したような動
作が連続して行われるようになつている。
The basic operations have been described above, but as will be described later, the operations described above are performed continuously in a steady state.

第5図は上述した立上り間隔計測装置における
CPU23の動作を詳しく示すフローチヤートで
ある。このフローチヤートに従つて説明する。
Figure 5 shows the rise interval measuring device described above.
This is a flowchart showing the operation of the CPU 23 in detail. This will be explained according to this flowchart.

まず、ステツプS1では、FG信号SFGがHレベル
かどうかの判別がなされ、YESの場合にはステ
ツプS3へ進むが、NOの場合にはステツプS2へ進
み計数動作および他の動作が行われ再びステツプ
S1へ戻る。すなわち、YESの条件を満足するま
では、ステツプS1とステツプS2によるループを
繰り返して動作することになる。YESの条件が
満足されると、ステツプS3へ進みその時点での
カウンタ24による計数値データがゲート回路2
5を介してレジスタRAに取り込まれる。このレ
ジスタRAに取り込まれた計数値データはステツ
プS4でレジスタRBに転送される。
First, in step S1, it is determined whether the FG signal S FG is at H level or not. If YES, the process goes to step S3, but if NO, the process goes to step S2, where counting and other operations are performed and then the process is started again. step
Return to S1. That is, until the YES condition is satisfied, the loop of steps S1 and S2 is repeated. If the YES condition is satisfied, the process advances to step S3, and the counted value data of the counter 24 at that point is sent to the gate circuit 2.
5 into register R A. The count value data taken into register R A is transferred to register R B in step S4.

ステツプS5では、FG信号SFGがLレベルかどう
かの判別がなされ、YESの場合にはステツプS7
へ進むが、NOの場合にはステツプS6へ進み計数
動作および他の動作が行われ再びステツプS5へ
戻る。YESの条件が満足されると、ステツプS7
へ進みFG信号SFGがHレベルかどうかの判別がな
される。YESの場合にはステツプS9へ進むが、
NOの場合にはステツプS8へ進み計数動作および
他の動作が行われ再びステツプS7へ戻る。
In step S5, it is determined whether the FG signal SFG is at the L level, and if YES, the process proceeds to step S7.
However, in the case of NO, the process proceeds to step S6, where a counting operation and other operations are performed, and then returns to step S5. If the YES condition is satisfied, step S7
Then, it is determined whether the FG signal SFG is at the H level. If YES, proceed to step S9,
If NO, the process advances to step S8, where a counting operation and other operations are performed, and then returns to step S7.

ここで、プログラムによるFG信号SFGの立上り
検出は一般的にLレベルを検出した後Hレベルを
検出することによつて行われる。
Here, the rise detection of the FG signal SFG by the program is generally performed by detecting the L level and then the H level.

なお、前述したFG信号SFGのLレベルを検出す
る周期はステツプS5とステツプS6で構成される
ループにより決定され、Hレベルを検出する周期
はステツプS7とステツプS8で構成されるループ
により決定される。
Note that the period for detecting the L level of the FG signal SFG mentioned above is determined by the loop consisting of step S5 and step S6, and the period for detecting the H level is determined by the loop consisting of step S7 and step S8. Ru.

ステツプS7でYESの条件が満足されると、ス
テツプS9へ進みその時点でのカウンタ24によ
る計数値データがゲート回路25を介してレジス
タRAに取り込まれる。ここで、現在各レジスタ
RA,RBに記憶されているカウンタ24による各
計数値データをたとえば下位データとし、また、
CPU23による計数値データを上位データとす
る。この上位データと下位データの間には、たと
えば、上位データ=下位データ×n(n=自然数)
の関係が成立するものとする。
If the YES condition is satisfied in step S7, the process advances to step S9, and the count value data of the counter 24 at that time is taken into the register R A via the gate circuit 25. Here, each register currently
For example, each count value data by the counter 24 stored in R A and R B is used as lower data, and
The count value data by the CPU 23 is used as upper data. Between this upper data and lower data, for example, upper data = lower data × n (n = natural number)
It is assumed that the relationship holds true.

そして、ステツプS10では、レジスタRBに記憶
されている計数値データからレジスタRBに記憶
されている計数値データを減算するという下位計
算が行われ、下位データΔdが求まる。すなわち、
現在各レジスタRA,RBにそれぞれ第4図Cに示
すような計数値データdK+1,dKが記憶されている
とすると、動作開始からk番目の下位データΔdK
=dK−dK+1となる。
Then, in step S10, a lower order calculation is performed in which the count value data stored in register R B is subtracted from the count value data stored in register R B , and lower order data Δd is determined. That is,
Assuming that count value data d K+1 and d K as shown in FIG. 4C are currently stored in each register R A and R B , respectively, the kth lower order data Δd K from the start of operation
=d K −d K+1 .

ステツプS11では、ステツプS10で得られた下
位データΔdが零以上かどうかが判別され、YES
の場合にはステツプS13へ進むが、NOの場合に
はステツプS12へ進む。このステツプS12では、
上位データからデータを借り受けて下位データを
零以上とするような補正計算が行われ再びステツ
プS11へ戻る。
In step S11, it is determined whether the lower-order data Δd obtained in step S10 is greater than or equal to zero, and YES is determined.
In the case of YES, the process proceeds to step S13, but in the case of NO, the process proceeds to step S12. In this step S12,
A correction calculation is performed to borrow data from the upper data to make the lower data greater than or equal to zero, and the process returns to step S11.

そして、YESの条件が満足されるとステツプ
S13へ進み傾斜波いわゆるランプ波の始点位置の
データによる下位計算が行われる。すなわち、こ
の傾斜波はたとえば第4図Dに示すように、プロ
グラムにより決定される一定の始点位置、傾き、
および傾斜部の幅TRを有するものであり、アナ
ログではFG信号SFGの立上り時刻の変化をレベル
の変化として検出するのに用いられるものであ
る。ここでは、レベルの変化ではなく時間の変化
として検出するためのデータとして用いられる。
また、上記傾斜波の始点位置のデータをRとしこ
のデータの下位データをRL、上位データをRU
する。そして、ステツプS11からの下位データか
ら上記傾斜波の始点位置を表す下位データRL
減算するという下位計算が行われ新たに下位デー
タWLが求まる。
Then, if the YES condition is satisfied, the step
Proceeding to S13, lower-order calculations are performed using the data of the starting point position of the slope wave, so-called ramp wave. That is, as shown in FIG. 4D, for example, this slope wave has a constant starting point position, a constant slope, and
and a width T R of the slope portion, and in analog use, it is used to detect a change in the rise time of the FG signal SFG as a change in level. Here, it is used as data for detecting a change in time rather than a change in level.
Furthermore, the data of the starting point position of the above-mentioned slope wave is assumed to be R, the lower data of this data is R L , and the upper data is R U. Then, a low-order calculation is performed in which the low-order data R L representing the starting point position of the slope wave is subtracted from the low-order data from step S11, and new low-order data W L is determined.

ステツプS14では、この下位データWLが零以上
かどうかが判別され、YESの場合にはステツプ
S16へ進むが、NOの場合にはステツプS15へ進
む。このステツプS15ではステツプS12と同様な
補正計算が行われ再びステツプS14へ戻る。そし
て、YESの条件が満足されるとステツプS16へ進
み上位計算が行われる。すなわち、CPU23に
よつて現在得られている計数値データたとえば第
4図Bに示すDKを上位データとし、この計数値
データから上述した傾斜波の始点位置を表す上位
データRUが減算され新たに上位データWUが求ま
る。
In step S14, it is determined whether this lower data W L is greater than or equal to zero, and if YES, the step
Proceed to step S16, but if NO, proceed to step S15. In this step S15, a correction calculation similar to that in step S12 is performed, and the process returns to step S14 again. Then, if the YES condition is satisfied, the process advances to step S16 and upper level calculation is performed. That is, the count value data currently obtained by the CPU 23, for example, D K shown in FIG . The upper data W U is found.

ステツプS17では、この上位データWUが零以
上かどうかが判別され、YESの場合にはステツ
プS18へ進むが、NOの場合には所定のレンジ外
処理、たとえば該上位データWUを無効とし前回
計算したデータをそのまま用いるような処理が行
われる。ステツプS18では、現在得られている下
位データWLと上位データWUとからFG周期TFGK
に対応したデータWが作成される。ステツプS19
では、このデータWが前述した傾斜波の傾斜部幅
TR以下かどうかが判別され、YESの場合にはス
テツプS20へ進むが、NOの場合には上述したよ
うなレンジ外処理が行われる。
In step S17, it is determined whether this upper data W U is greater than or equal to zero. If YES, the process advances to step S18, but if NO, processing outside the predetermined range is performed, for example, invalidating the upper data W U and updating the previous data. Processing is performed that uses the calculated data as is. In step S18, the FG period T FGK is calculated from the currently obtained lower data W L and upper data W U.
Data W corresponding to is created. Step S19
Now, this data W is the width of the slope part of the slope wave mentioned above.
It is determined whether or not it is below T R. If YES, the process proceeds to step S20, but if NO, the above-mentioned out-of-range processing is performed.

ステツプS20では、ステツプS19からのデータ
Wに対してD/A変換回路26の取り扱いビツト
数に応じたデータの丸め込みがなされ、これが該
D/A変換回路26に送られる。上記データの丸
め込みは、たとえば、データWのビツト数をn,
D/A変換回路26の取り扱いビツト数をm(n
>m)とすると、データWのm+1番目のビツト
が0の時にはmビツト分をそのまま用い、1の時
にはmビツト分のデータに1を加算して用いるよ
うな処理である。
In step S20, data W from step S19 is rounded according to the number of bits handled by the D/A conversion circuit 26, and is sent to the D/A conversion circuit 26. In the above data rounding, for example, the number of bits of data W is set to n,
The number of bits handled by the D/A conversion circuit 26 is m(n
>m), when the m+1st bit of data W is 0, m bits are used as is, and when it is 1, 1 is added to m bits of data and used.

このようにして、FG信号SFGの1FG周期TFGK
対応した出力信号SOUTを得ることができる。そし
て、更に連続動作を行うために、ステツプS21へ
進み現在レジスタRAに記憶されている計数値デ
ータをレジスタRBに転送する処理が行われ、再
びステツプS5へ戻る。すなわち、ステツプS1〜
ステツプS4は動作開始から最初の1回のみ行わ
れ、定常状態においてはステツプS5〜ステツプ
S21が繰り返し行われ連続動作がなされるように
なつている。
In this way, the output signal S OUT corresponding to one FG period T FGK of the FG signal S FG can be obtained. Then, in order to perform further continuous operation, the process advances to step S21, where processing is performed to transfer the count value data currently stored in register RA to register RB , and the process returns to step S5 again. That is, step S1~
Step S4 is performed only once after the start of operation, and in steady state, steps S5 to S5 are performed only once.
S21 is repeated and continuous operation is performed.

上述したように、本実施例の立上り間隔計測装
置によればプログラム(ソフトウエア)により
CPU23でカウンタを構成し、該CPU23で粗
い計測を行うとともに、カウンタ24で細かい計
測を行つて立上り間隔すなわちFG周期TFGKを高
精度に計測できるようになつている。よつてこの
ような立上り間隔計測装置を用いFGによるモー
タの回転速度の制御系を構成すれば、従来のハー
ドウエアのみの構成と比較してもFG周期TFGK
計測精度は落ちるようなことはないし、プログラ
ムを組み替えるだけでたとえば傾斜波の始点位置
のデータを変更でき、種々の変更等に対応できる
ため計測の自由度も高い。
As mentioned above, according to the rise interval measuring device of this embodiment, the program (software)
The CPU 23 constitutes a counter, and the CPU 23 performs rough measurements, and the counter 24 performs fine measurements, so that the rise interval, that is, the FG period TFGK can be measured with high precision. Therefore, if you configure a control system for the rotational speed of the motor using FG using such a rise interval measuring device, the accuracy of measuring the FG period T and FGK will not deteriorate compared to the conventional configuration using only hardware. Furthermore, simply by rearranging the program, data on the starting point position of a slope wave can be changed, for example, and various changes can be made, so there is a high degree of freedom in measurement.

また、本発明は第6図に示すように、カウンタ
にアツプダウンカウンタ30を用いるとともに、
2つの立上り検出回路31,32を用いて構成す
ることもできる。すなわち、たとえば第4図に示
す時刻t1に立上り検出回路31によりFG信号SFG
の立上りが検出されるとイネーブル信号SEN1が発
生されアツプダウンカウンタ30にカウントアツ
プ方向の計数動作を開始させる。この立上り検出
回路31はCPU23により時刻t2にFG信号SFG
Hレベルが検出されると発生されるクリア信号
SC1によりクリアされ、アツプダウンカウンタ3
0の計数動作が終了されるようになつている。
Further, as shown in FIG. 6, the present invention uses an up-down counter 30 as a counter, and
It can also be configured using two rise detection circuits 31 and 32. That is, for example, at time t1 shown in FIG.
When the rising edge of is detected, an enable signal SEN1 is generated to cause the up-down counter 30 to start counting in the up direction. This rise detection circuit 31 generates a clear signal when the CPU 23 detects the H level of the FG signal S FG at time t2 .
Cleared by S C1 , up-down counter 3
The zero counting operation is now terminated.

一方、時刻t4に立上り検出回路32によりFG
信号SFGの立上りが検出されるとイネーブル信号
SEN2が発生されアツプダウンカウンタ30にカウ
ントダウン方向の計数動作を開始させる。この立
上り検出回路32はCPU23により時刻t5にFG
信号SFGのLレベルが検出されると発生されるク
リア信号SC2によりクリアされ、アツプダウンカ
ウンタ30の計数動作が終了されるようになつて
いる。このように構成すれば、前述したdK−dK+1
の演算をアツプダウンカウンタ30で行うことが
できる。但し、この構成は間欠計測を行う場合の
み有効であり、連続計測を行う場合には、カウン
タがもう1つ必要になつてしまう。従つて、連続
計測を行う場合には、第3図に示した構成の装置
を用いる方が好ましい。
On the other hand, at time t4 , the rise detection circuit 32 causes the FG
Enable signal when the rising edge of signal S FG is detected
S_EN2 is generated and causes the up-down counter 30 to start counting in the countdown direction. This rising edge detection circuit 32 is activated by the CPU 23 at time t5 .
When the L level of the signal SFG is detected, it is cleared by the clear signal SC2 generated, and the counting operation of the up-down counter 30 is completed. With this configuration, the above-mentioned d K −d K+1
can be performed by the up-down counter 30. However, this configuration is effective only when performing intermittent measurement, and when performing continuous measurement, another counter is required. Therefore, when performing continuous measurements, it is preferable to use an apparatus having the configuration shown in FIG. 3.

なお、本実施例においては、FG信号SFGの立上
りを検出して計数値データを得ていたが、立下り
を検出して計数値データを得ることも勿論でき
る。また、FG信号SFGのデユーテイが50%の場合
には立上り、立下りの両者を検出して計数値デー
タを得ることにより計測を行つても良い。更に、
入力される信号はFG信号に限らず矩形波信号で
あれば良く、該矩形波信号のエツジ間隔すなわち
立上り間隔あるいは立下り間隔を計測することが
できる。
In this embodiment, the count value data is obtained by detecting the rising edge of the FG signal SFG , but it is of course possible to obtain the counting value data by detecting the falling edge of the FG signal SFG. Furthermore, when the duty of the FG signal SFG is 50%, measurement may be performed by detecting both the rising edge and the falling edge to obtain count value data. Furthermore,
The input signal is not limited to the FG signal, but may be a rectangular wave signal, and the edge interval, that is, the rising interval or falling interval of the rectangular wave signal can be measured.

〔発明の効果〕〔Effect of the invention〕

上述した実施例の説明から明らかなように、本
発明によれば、プログラムすなわちソフトウエア
によりCPUでカウンタを構成し、該CPUにて粗
い計測単位で時間計測を行うとともに、CPU外
部のハードウエア構成のカウンタにて細かい計測
単位で時間計測を行うようにしているため、矩形
波信号のエツジ間隔を高精度に計測できるととも
に、種々の変更等に対しても上記CPUを動作さ
せるプログラムを組み替えるだけで即座に対応で
きる計測の自由度を高めることができる。
As is clear from the description of the embodiments described above, according to the present invention, a counter is configured in the CPU by a program, that is, software, and time is measured in coarse measurement units by the CPU, and the hardware configuration outside the CPU is configured. Because the counter measures time in fine measurement units, it is possible to measure the edge interval of a square wave signal with high precision, and when making various changes, it is possible to simply rearrange the program that operates the CPU. It is possible to increase the degree of freedom in measurements that can be taken immediately.

【図面の簡単な説明】[Brief explanation of drawings]

第1図はFGを用いたモータの回転速度制御系
の一例を示すブロツク図、第2図は波形整形が施
されたFG信号を示す波形図である。第3図は本
発明に係るエツジ間隔計測装置の一実施例を示す
ブロツク図、第4図は上記実施例の動作を示すタ
イムチヤート、第5図は上記実施例における
CPUの動作を詳しく示すフローチヤート、第6
図は本発明に係るエツジ間隔計測装置の他の実施
例を示すブロツク図である。 22,31,32……立上り検出回路、23…
…CPU、24……カウンタ、30……アツプダ
ウンカウンタ。
FIG. 1 is a block diagram showing an example of a motor rotational speed control system using FG, and FIG. 2 is a waveform diagram showing a waveform-shaped FG signal. FIG. 3 is a block diagram showing an embodiment of the edge interval measuring device according to the present invention, FIG. 4 is a time chart showing the operation of the above embodiment, and FIG.
Flowchart showing detailed CPU operation, Part 6
The figure is a block diagram showing another embodiment of the edge interval measuring device according to the present invention. 22, 31, 32...Rise detection circuit, 23...
...CPU, 24...Counter, 30...Up-down counter.

Claims (1)

【特許請求の範囲】 1 少なくともプログラムに応じて決定されるタ
イミング毎に入力矩形波信号のレベルを検出する
ことにより該入力矩形波信号のエツジを検出し、
このエツジ検出タイミングで計数値データ入力及
びクリア信号出力を行い、これらのエツジ検出タ
イミング間隔を計測するとともに、データの演算
を行うCPUシステムと、 このCPUシステムによる時計計測単位よりも
細かい計測単位で時計計測を行うカウンタと、 上記入力矩形波信号のエツジを瞬時に検出して
上記カウンタに計数動作を開始させるとともに上
記CPUシステムからの上記クリア信号に応じて
上記カウンタの計数動作を停止させる信号を発生
するエツジ検出回路とを備え、 上記CPUシステムは、一の上記エツジ検出タ
イミングでの上記カウンタからの計数値データ
と、次の上記エツジ検出タイミングでの上記カウ
ンタからの計数値データと、これらの一のエツジ
から次のエツジまでの上記エツジ検出タイミング
間隔の計測値データとに基づいて、上記入力矩形
波信号のエツジ間隔のデータを演算することを特
徴とするエツジ間隔計測装置。
[Claims] 1. Detecting the edge of the input rectangular wave signal by detecting the level of the input rectangular wave signal at least at each timing determined according to the program;
A CPU system inputs count value data and outputs a clear signal at this edge detection timing, measures the interval between these edge detection timings, and calculates the data. A counter that performs measurement; and a signal that instantaneously detects the edge of the input rectangular wave signal to cause the counter to start counting, and to stop the counting operation of the counter in response to the clear signal from the CPU system. and an edge detection circuit, the CPU system detects count value data from the counter at one edge detection timing, count value data from the counter at the next edge detection timing, and one of these. An edge interval measuring device characterized in that data of the edge interval of the input rectangular wave signal is calculated based on measurement value data of the edge detection timing interval from one edge to the next edge.
JP59128943A 1984-06-22 1984-06-22 Measuring device for edge interval Granted JPS618671A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59128943A JPS618671A (en) 1984-06-22 1984-06-22 Measuring device for edge interval

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59128943A JPS618671A (en) 1984-06-22 1984-06-22 Measuring device for edge interval

Publications (2)

Publication Number Publication Date
JPS618671A JPS618671A (en) 1986-01-16
JPH0530216B2 true JPH0530216B2 (en) 1993-05-07

Family

ID=14997237

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59128943A Granted JPS618671A (en) 1984-06-22 1984-06-22 Measuring device for edge interval

Country Status (1)

Country Link
JP (1) JPS618671A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0652179B2 (en) * 1986-08-29 1994-07-06 ソニ−マグネスケ−ル株式会社 Interpolation circuit
JPH03135769A (en) * 1989-10-20 1991-06-10 Hitachi Koki Co Ltd Rotating speed detecting circuit

Also Published As

Publication number Publication date
JPS618671A (en) 1986-01-16

Similar Documents

Publication Publication Date Title
US4262526A (en) Rotational position detecting apparatus
JP2926909B2 (en) Disk drive device
JPH0530216B2 (en)
EP0374797B1 (en) Digital servo system for controlling rotational speed of rotary body
JPH04346069A (en) Speed signal generating circuit
US4578625A (en) Spindle drive control system
JP3201238B2 (en) Speed detector
JPH04233467A (en) Method and apparatus for measuring speed of motor
JPH0817593B2 (en) Digital servo device
JP2840406B2 (en) Error signal generator
SU1597856A1 (en) Method of measuring clock run
JPS6223548B2 (en)
JPS6311662Y2 (en)
JP2523207Y2 (en) Speed detector
JP2000055958A (en) Duty ratio deciding circuit and method for deciding duty rato
JPH03100473A (en) Pulse train input processor
JPH0714901Y2 (en) Engine rotation signal processor
JPS62171480A (en) Speed controller
SU1510000A1 (en) Device for measuring fluctuation of magnetic tape transport speed
SU443334A1 (en) Method for digital measurement of phase angles between two electrical signals
JPH0336607A (en) Position signal processing system
SU1062610A1 (en) Ferromagnetic motion speed determination method
JPS58120167A (en) Detection of speed
JPS6389088A (en) Motor rotating speed controller
JPH0712861A (en) Method and apparatus for measuring pulse frequency

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term