JP5217033B2 - Information processing system and information processing method for encoder - Google Patents
Information processing system and information processing method for encoder Download PDFInfo
- Publication number
- JP5217033B2 JP5217033B2 JP2008243893A JP2008243893A JP5217033B2 JP 5217033 B2 JP5217033 B2 JP 5217033B2 JP 2008243893 A JP2008243893 A JP 2008243893A JP 2008243893 A JP2008243893 A JP 2008243893A JP 5217033 B2 JP5217033 B2 JP 5217033B2
- Authority
- JP
- Japan
- Prior art keywords
- encoder
- data request
- request signal
- absolute value
- information processing
- 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 - Fee Related
Links
Images
Landscapes
- Transmission And Conversion Of Sensor Element Output (AREA)
Description
本発明は、可動被検出物の変位の絶対値を検出するエンコーダの情報処理システム及び情報処理方法に関する The present invention relates to an information processing system and an information processing method for an encoder that detects an absolute value of a displacement of a movable object.
従来より、可動被検出物の変位量や変位の絶対値を検出する装置として、磁気式エンコーダが知られている。例えば、磁気式エンコーダの一態様としては、1極対のマグネットを回転させ、その磁界変化をMR素子で検出し、得られたSin信号及びCos信号をAD変換してマイコンに取り込み、両信号の逆正接(アークタンジェント)信号を計算し、その逆正接信号を利用することによってマグネットの回転位置の絶対値を検出するものがある(例えば特許文献1)。 2. Description of the Related Art Conventionally, a magnetic encoder is known as a device that detects the amount of displacement of a movable object to be detected and the absolute value of the displacement. For example, as one aspect of the magnetic encoder, one pole pair of magnets is rotated, the magnetic field change is detected by an MR element, and the obtained Sin signal and Cos signal are AD-converted into a microcomputer, There is one that detects an absolute value of a rotational position of a magnet by calculating an arc tangent signal and using the arc tangent signal (for example, Patent Document 1).
このような磁気式エンコーダ側のサンプリング周期は、マイコン内蔵のタイマによって独自に作成される場合がある。一方で、磁気式エンコーダからの位置情報を利用する上位装置のマイコン側でも、独自のサンプリング周期でシリアル通信を行って、データの受け渡しを行う場合がある。このような場合、可動被検出物の実位置を適切に推定するためには、両者のサンプリング周期を同じ時間に設定する必要がある。 Such a sampling period on the magnetic encoder side may be uniquely created by a timer built in the microcomputer. On the other hand, there is a case where the microcomputer side of the host device that uses position information from the magnetic encoder performs serial communication with a unique sampling period to exchange data. In such a case, in order to appropriately estimate the actual position of the movable object to be detected, it is necessary to set both sampling periods to the same time.
しかしながら、磁気式エンコーダ側のマイコンと、上位装置側のマイコンとのサンプリング周期が異なる場合、可動被検出物の実位置の推定が困難になる。具体的には、磁気式エンコーダ側の処理時間(絶対値演算時間)はほぼ一定であるところ、上位装置側のマイコンによるデータ読み出しタイミングが磁気式エンコーダ側のサンプリング周期と同期していない場合、上位装置側が位置情報を受け取った時点で、可動被検出物の実位置と読み出しデータの遅れ時間が一定にならない。その結果、サンプリング時点の実際回転位置から一定の群遅延をもったデータにならず、磁気式エンコーダの出力データから可動被検出物の実位置を推定することが困難になってしまう。特に、たとえ磁気式エンコーダ側と上位装置側とでサンプリング周期を同じに設定したとしても、クロック発生回路の周波数誤差により、これを全く同じにするのは困難であり、上述同様の問題が生ずる虞がある。 However, when the sampling cycle of the microcomputer on the magnetic encoder side and the microcomputer on the host device side are different, it is difficult to estimate the actual position of the movable object. Specifically, the processing time (absolute value calculation time) on the magnetic encoder side is almost constant, but if the data read timing by the microcomputer on the host device side is not synchronized with the sampling cycle on the magnetic encoder side, When the apparatus side receives the position information, the actual position of the movable detection object and the delay time of the read data are not constant. As a result, it becomes difficult to estimate the actual position of the movable object to be detected from the output data of the magnetic encoder, instead of the data having a certain group delay from the actual rotational position at the time of sampling. In particular, even if the sampling cycle is set to be the same on the magnetic encoder side and the host device side, it is difficult to make this exactly the same due to the frequency error of the clock generation circuit, and the same problem as described above may occur. There is.
本発明は、このような点に鑑みてなされたものであり、その目的は、エンコーダと上位装置とでサンプリング周期が多少異なる場合であっても、可動被検出物の実位置をより正確に推定することが可能なエンコーダの情報処理システム及び情報処理方法を提供することにある。 The present invention has been made in view of these points, and its purpose is to estimate the actual position of the movable object more accurately even when the sampling period differs slightly between the encoder and the host device. It is an object to provide an information processing system and an information processing method for an encoder that can be used.
以上のような課題を解決するために、本発明は、以下のものを提供する。 In order to solve the above problems, the present invention provides the following.
(1) 可動被検出物の変位に対応してA相センサから出力される正弦波状のA相信号と、当該可動被検出物の変位に対応してB相センサから出力される正弦波状のB相信号と、を解析することによって当該可動被検出物の変位の絶対値を出力するエンコーダと、当該絶対値のデータ要求を示すデータ要求信号を前記エンコーダに対して送信する上位装置と、を有するエンコーダの情報処理システムにおいて、前記上位装置は、前記エンコーダにおいて前記絶対値を算出する演算時間に基づいて、前記データ要求信号を送信するとともに、前記エンコーダは、前記データ要求信号の受信を契機として、前記絶対値の算出を開始し、前記上位装置は、前記データ要求信号を送信してから、前記エンコーダにおける前記絶対値の算出が完了した後からサンプリング周期が経過する前に、次のデータ要求信号を送信することを特徴とするエンコーダの情報処理システム。 (1) A sine wave A phase signal output from the A phase sensor in response to the displacement of the movable object to be detected, and a sine wave B to be output from the B phase sensor in response to the displacement of the movable object to be detected. And an encoder that outputs an absolute value of the displacement of the movable object by analyzing the phase signal, and a host device that transmits a data request signal indicating a data request for the absolute value to the encoder. In the information processing system of the encoder, the higher-level device transmits the data request signal based on the calculation time for calculating the absolute value in the encoder, and the encoder is triggered by reception of the data request signal. After calculating the absolute value, the host device transmits the data request signal and then completes the calculation of the absolute value in the encoder. An information processing system for an encoder , wherein the next data request signal is transmitted before the sampling period elapses .
本発明によれば、正弦波状のA相信号とB相信号を解析し、可動被検出物の変位の絶対値を出力するエンコーダと、そのエンコーダに対してデータ要求信号を送信する上位装置と、を有するエンコーダの情報処理システムで、上位装置は、データ要求信号を送信する際、エンコーダにおいて可動被検出物の変位の絶対値を算出する演算時間に基づいて送信する。一方、エンコーダは、データ要求信号の受信を契機として、その絶対値の算出を開始する。これにより、可動被検出物の実位置と、演算結果の出力位置との時間ずれがほぼ一定となり、すなわち一定の群遅延となり、ひいては可動被検出物の実位置をより正確に推定することができる。特に、クロック発生回路の周波数誤差などによって、エンコーダ側のマイコンと上位装置側のマイコンとでサンプリング周期が同じにならない場合であっても、同様にして可動被検出物の実位置をより正確に推定することができる。 According to the present invention, an encoder that analyzes a sine wave A-phase signal and a B-phase signal and outputs an absolute value of the displacement of the movable object to be detected, and a host device that transmits a data request signal to the encoder; When transmitting a data request signal, the host device transmits the data request signal based on the calculation time for calculating the absolute value of the displacement of the movable object. On the other hand, the encoder starts calculating the absolute value when receiving the data request signal. As a result, the time lag between the actual position of the movable object to be detected and the output position of the calculation result is substantially constant, that is, a constant group delay, and as a result, the actual position of the movable object to be detected can be estimated more accurately. . In particular, even if the sampling cycle is not the same between the encoder side microcomputer and the host unit side microcomputer due to the frequency error of the clock generation circuit, the actual position of the movable object can be estimated more accurately in the same way. can do.
ここで、「演算時間に基づいて」とは、上位装置からエンコーダに送られるデータ要求信号の送信タイミングを決定するものであって、例えば、その演算時間Tを既知とすると、前回のデータ要求信号の送信から時間Tを経過した直後としてもよいし、前回のデータ要求信号の送信から時間T+α(エンコーダと上位装置とのシリアル通信時間を考慮)を経過した後としてもよいし、前回のデータ要求信号の送信から時間T+α+β(所定の待ち時間を考慮)を経過した後としてもよい。 Here, “based on the computation time” is to determine the transmission timing of the data request signal sent from the host device to the encoder. For example, if the computation time T is known, the previous data request signal It may be immediately after the time T has elapsed since the transmission of, or after the time T + α (considering the serial communication time between the encoder and the host device) has elapsed since the transmission of the previous data request signal. It may be after the time T + α + β (considering a predetermined waiting time) has elapsed since the signal transmission.
また、「データ要求信号の受信を契機として」とは、エンコーダにおける絶対値の算出処理の開始タイミングを決定するものであって、例えば、データ要求信号の受信と同時であってもよいし、データ要求信号の受信から一定時間(任意の固定時間)経過後であってもよい。 Further, “when triggered by reception of a data request signal” determines the start timing of the absolute value calculation processing in the encoder, and may be, for example, simultaneously with reception of the data request signal, It may be after a certain time (arbitrary fixed time) has elapsed since the reception of the request signal.
なお、エンコーダは「変位の絶対値」を出力するものであるが、出力態様の如何は問わない。例えば、パルス発生回路を通じてパルス状の信号に変換したものであってもよいし、その他、何らかの変換回路を通じて絶対値を意味する信号を出力したものであってもよい。 The encoder outputs an “absolute value of displacement”, but the output mode is not limited. For example, the signal may be converted into a pulse signal through a pulse generation circuit, or a signal indicating an absolute value may be output through another conversion circuit.
また、本発明のエンコーダの情報処理システムは、前記上位装置は、前記データ要求信号を送信してから、前記エンコーダにおける前記絶対値の算出が完了した後からサンプリング周期が経過する前に、次のデータ要求信号を送信することを特徴とする。 Further, in the encoder information processing system according to the present invention, the host device transmits the data request signal, and after the calculation of the absolute value in the encoder is completed, before the sampling period elapses, A data request signal is transmitted.
本発明によれば、上述した上位装置は、データ要求信号を送信してから、エンコーダにおける前記絶対値の算出が完了した後からサンプリング周期が経過する前に、次のデータ要求信号を送信することとしたので、エンコーダ側の待ち時間を少なく(或いは0に)し、システム全体の制御周期が長期化するのを防ぎつつ、可動被検出物の実位置をより正確に推定できる。 According to the present invention, the above-described host device transmits the next data request signal after transmitting the data request signal and before the sampling period elapses after the calculation of the absolute value in the encoder is completed. Therefore, the actual position of the movable detection object can be estimated more accurately while reducing the waiting time on the encoder side (or reducing it to 0) and preventing the control cycle of the entire system from being prolonged.
(2) 前記上位装置は、前記データ要求信号を送信してから、前記エンコーダから前記絶対値を受信した後に、次のデータ要求信号を送信することを特徴とするエンコーダの情報処理システム。 ( 2 ) The information processing system for an encoder, wherein the host device transmits the next data request signal after receiving the absolute value from the encoder after transmitting the data request signal.
本発明によれば、上述した上位装置は、データ要求信号を送信してから、エンコーダから絶対値を受信した後に、次のデータ要求信号を送信することとしたので、可動被検出物の変位の絶対値を算出する処理の途中で(例えばREQ信号による)割り込み処理が何度も行われることに起因したソフトウェアエラー(暴走)を防ぎつつ、可動被検出物の実位置をより正確に推定できる。 According to the present invention, since the above-described host apparatus transmits the data request signal and then transmits the next data request signal after receiving the absolute value from the encoder, the displacement of the movable object to be detected is determined. It is possible to more accurately estimate the actual position of the movable detection object while preventing a software error (runaway) caused by repeated interruption processing (for example, by a REQ signal) during the absolute value calculation processing.
(3) 前記可動被検出物はS極とN極の磁極が一対着磁された永久磁石であることを特徴とするエンコーダの情報処理システム。 ( 3 ) The encoder information processing system, wherein the movable object to be detected is a permanent magnet in which a pair of S and N poles are magnetized.
本発明によれば、上述した可動被検出物はS極とN極の磁極が一対着磁された永久磁石であることとしたので、一対着磁された永久磁石の変位の絶対値を検出する場合においても、可動被検出物の実位置をより正確に推定できる。特に、多極の磁気式エンコーダと比べて一極対の磁気式エンコーダは、メカ構造がシンプルである。したがって、メカコストを低廉化しつつ、小型化にも対応しやすい。その反面、回路コストは嵩む傾向がある。このような場合であっても、本発明に係るエンコーダの情報処理システムによれば、データ要求信号の送信タイミング及び絶対値算出処理の開始タイミングを調整すればよいので、ソフトウェア的に実現可能であって、回路コストを増大させることなく、可動被検出物の実位置をより正確に推定できる。 According to the present invention, since the above-mentioned movable object to be detected is a permanent magnet with a pair of S and N poles magnetized, the absolute value of the displacement of the pair of magnetized permanent magnets is detected. Even in this case, the actual position of the movable object can be estimated more accurately. In particular, a single pole pair magnetic encoder has a simple mechanical structure compared to a multipole magnetic encoder. Therefore, it is easy to cope with downsizing while reducing the mechanical cost. On the other hand, circuit cost tends to increase. Even in such a case, according to the encoder information processing system of the present invention, it is only necessary to adjust the transmission timing of the data request signal and the start timing of the absolute value calculation process. Thus, the actual position of the movable object can be estimated more accurately without increasing the circuit cost.
(4) 可動被検出物の変位に対応してA相センサから出力される正弦波状のA相信号と、当該可動被検出物の変位に対応してB相センサから出力される正弦波状のB相信号と、を解析することによって当該可動被検出物の変位の絶対値を算出するエンコーダの情報処理方法において、上位装置から前記エンコーダに対して、前記絶対値のデータ要求を示すデータ要求信号が送信されるステップと、
前記データ要求信号を受信したことを契機として、前記エンコーダにおいて前記絶対値の算出処理が開始されるステップと、前記上位装置において、前記データ要求信号を送信してから、前記エンコーダにおける前記絶対値の算出が完了した後からサンプリング周期が経過する前に、次のデータ要求信号が送信されるステップと、を含むことを特徴とするエンコーダの情報処理方法。
( 4 ) A sinusoidal A-phase signal output from the A-phase sensor corresponding to the displacement of the movable object to be detected and a sinusoidal B output from the B-phase sensor corresponding to the displacement of the movable object to be detected. In the information processing method of the encoder for calculating the absolute value of the displacement of the movable object by analyzing the phase signal, a data request signal indicating a data request for the absolute value is sent from the host device to the encoder. The steps to be sent,
In response to the reception of the data request signal, the absolute value calculation process is started in the encoder, and the host device transmits the data request signal and then transmits the absolute value in the encoder. And a step of transmitting a next data request signal before the sampling period elapses after the calculation is completed .
本発明によれば、正弦波状のA相信号とB相信号を解析し、可動被検出物の変位の絶対値を算出するエンコーダの情報処理方法において、上位装置からエンコーダに対し、絶対値のデータ要求を示すデータ要求信号が送信されるステップと、データ要求信号を受信したことを契機として、エンコーダにおいて絶対値の算出処理が開始されるステップと、を含むこととしたので、可動被検出物の実位置と、演算結果の出力位置との時間ずれがほぼ一定とすることができ、ひいては可動被検出物の実位置をより正確に推定することができる。 According to the present invention, in an information processing method for an encoder that analyzes a sinusoidal A-phase signal and a B-phase signal and calculates an absolute value of a displacement of a movable object, absolute value data is transmitted from a host device to the encoder. A step of transmitting a data request signal indicating a request and a step of starting an absolute value calculation process in the encoder triggered by the reception of the data request signal. The time lag between the actual position and the output position of the calculation result can be made almost constant, and as a result, the actual position of the movable detection object can be estimated more accurately.
本発明によれば、上位装置からエンコーダへデータ要求信号を送信するタイミングと、エンコーダが絶対値の算出を開始するタイミングとを調整することとしたので、可動被検出物の実位置と、演算結果の出力位置との時間ずれをほぼ一定(一定の群遅延)とすることができ、ひいては可動被検出物の実位置をより正確に推定することができる。 According to the present invention, the timing at which the data request signal is transmitted from the host device to the encoder and the timing at which the encoder starts calculating the absolute value are adjusted. The time difference from the output position can be made substantially constant (constant group delay), and as a result, the actual position of the movable detection object can be estimated more accurately.
以下、本発明を実施するための最良の形態について、図面を参照しながら説明する。 The best mode for carrying out the present invention will be described below with reference to the drawings.
図1は、本発明の実施の形態に係るエンコーダ1の情報処理システムのハードウェア構成を示すブロック図である。特に、図1(a)は、ハードウェア構成の概略を示し、図1(b)は、ハードウェア構成のイメージ図を示している。
FIG. 1 is a block diagram showing a hardware configuration of an information processing system of an
図1(a)及び図1(b)に示すように、エンコーダ1は、MR素子(MR Element)10とマイコン20を有しており、MR素子10からマイコン20に向けて、Cos信号とSin信号が入力される。より具体的には、MR素子10は、可動被検出物の変位に対応して正弦波状のSin信号を出力するA相センサと、可動被検出物の変位に対応して正弦波状のCos信号を出力するB相センサと、を有している。
As shown in FIGS. 1A and 1B, the
なお、本実施形態では、「可動被検出物」として、S極とN極の磁極が一対着磁された永久磁石50を採用している(図1(b)参照)。また、図1(a)では、A相センサ及びB相センサの一構成要素となるMR素子10しか図示していないが、その他、例えば、整流回路,ローパスフィルタ,差動増幅アンプ,MR素子10に励磁電流を供給するドライバなどの各種電気要素によって、A相センサ及びB相センサが構成される。
In the present embodiment, a
マイコン20は、InterpolatorやRS422ドライバ(Open Collectorでもよい)などの電気要素を有しているが、その他如何なる要素を有していてもよい。また、図1(a)に示すように、A/D変換回路(ADC21)を有しており、ADC21によってアナログ信号はデジタル化される。図1では特に図示していないが、マイコン20は、CPU,ROM,RAM等の各種電機要素を有しており、可動被検出物の変位の絶対値を算出する機能を有している。すなわち、ROM等の記憶媒体には、エンコーダ1全体を統括的に制御するプログラムや、可動被検出物の変位の絶対値を算出するプログラムなど、各種プログラムが格納されており、CPUは、適宜それらのプログラムを読み出して、RAMをワーキングエリアとしつつ演算処理を実行する。このように、マイコン20は、A相信号(Sin信号)とB相信号(Sin信号と位相差がπ/2のCos信号)とを解析することによって、永久磁石50の変位の絶対値を算出する機能を有している。なお、図1では図示を省略しているが、マイコン20は、パルス発生回路を有しており、算出された絶対値をパルス状の信号として出力する。
The
一方で、上位装置30は、絶対値のデータ要求を示すデータ要求信号をエンコーダ1に対して送信するマイコン31を有しており、このマイコン31についても、上述したマイコン20と同様に、CPU,ROM,RAM等の各種電機要素を有している。すなわち、ROM等の記憶媒体には、エンコーダ1に対してデータ要求信号を送信する送信プログラムなど、各種プログラムが格納されており、CPUは、適宜それらのプログラムを読み出して、RAMをワーキングエリアとしつつ送信処理を実行する。
On the other hand, the
ここで、本実施形態に係るエンコーダ1の情報処理システムでは、上位装置30からエンコーダ1に向けて送信されるデータ要求信号の送信タイミングと、エンコーダ1で実行される絶対値の算出開始タイミングとに特徴がある。以下、図2〜図6を用いて具体的に説明する。
Here, in the information processing system of the
図2は、本実施形態に係るエンコーダ1の情報処理システムと従来のシステムとの比較を説明するための説明図である。図2(a)は、従来のシステムを示し、図2(b)は、本実施形態に係る情報処理システムを示している。
FIG. 2 is an explanatory diagram for explaining a comparison between the information processing system of the
図2(a)において、オンデマンドを採用していない、すなわち、エンコーダ1が上位装置30からのデータ要求信号を受けずに独自に演算処理を行う従来のシステムでは、エンコーダ1(のマイコン20)の出力周期(サンプリング周期)と、エンコーダ1を読む側の上位装置30(のマイコン31)のサンプリング周期とが、各々独自に決められている。したがって、たとえエンコーダ1における絶対値算出の演算時間が一定であったとしても、上位装置30側から見れば、一定の遅れではなくなる。例えば、図2(a)に示すように、上位装置30が最初のデータ要求信号を送信した時点は、エンコーダ1の出力タイミングから遅延時間D1だけ遅れている。そして、上位装置30が次のデータ要求信号を送信した時点は、エンコーダ1の出力タイミングから遅延時間D2だけ遅れている。同様にして、遅延時間D3,D4,D5,D6,D7といった遅れが生じている。従来のシステムでは、これらの遅延時間D1〜D7が一定でないので、永久磁石50の実位置(回転位置)を求めることは困難である。
In FIG. 2A, on-demand is not adopted, that is, in the conventional system in which the
一方で、図2(b)に示すように、オンデマンドを採用している、すなわち、エンコーダ1が上位装置30からのデータ要求信号を受信してから、絶対値の算出の演算を開始する本実施形態に係る情報処理システムによれば、上位装置30(のマイコン31)は、エンコーダ1において絶対値を算出する演算時間に基づいて、データ要求信号を送信するようにしている。具体的には、その演算時間に、エンコーダ1と上位装置30とのシリアル通信時間を加算した固定時間をCとしたとき、上位装置30は、この固定時間Cに多少の時間的猶予をもたせた上で(本実施形態ではエンコーダ1の処理周期と同期させて)、データ要求信号を送信している。そして、エンコーダ1(のマイコン20)は、上位装置30からのデータ要求信号の受信を契機として(受信と同時に)、絶対値の算出を開始している。このように、オンデマンドでエンコーダ1側の演算を開始させることによって、上位装置30側では演算時間分の決まった遅れ(固定時間C)が生じることになるが、一定の群遅延であれば、永久磁石40の実位置(回転位置)を容易に推定することができる。
On the other hand, as shown in FIG. 2B, on-demand is adopted, that is, the
永久磁石40の実位置(回転位置)を推定する様子について、図3を用いて更に詳述する。図3は、永久磁石50の実位置を推定する様子を説明するための説明図である。
The manner in which the actual position (rotational position) of the permanent magnet 40 is estimated will be further described in detail with reference to FIG. FIG. 3 is an explanatory diagram for explaining how the actual position of the
図3に示すように、エンコーダ1においてマイコン20を使って絶対値算出の処理を行った場合、サンプリングした時点の実位置と、演算終了時点の実位置にずれが発生することになる。例えば、最初のデータ要求信号を送信し、サンプリングした時点X1と、演算終了時点X2とでは、永久磁石50の回転位置(実位置)にL1のずれが生じることになる。同様にして、次のデータ要求信号を送信し、サンプリングした時点Y1と、演算終了時点Y2とでは、永久磁石50の回転位置(実位置)にL2のずれが生じることになる。図3に示す例だと、L1≠L2となっているが、永久磁石50は動き始めてしばらくすると等速回転を行うことから(グラフが右肩上がりの直線になることから)、次第にL1=L2に近づいてくる。そうすると、マイコン処理時間はほぼ一定であることから(図2(b)の固定時間C参照)、全体としては群遅延が生じるだけとなり(すなわち、容易に補正できるようになり)、永久磁石50の実位置を容易に推測できる。この点、従来のシステムのように、遅延時間が一定とならない場合には(図2(a)の遅延時間D1〜D7参照)、たとえ永久磁石50が等速回転したとしても群遅延とはならず、容易に補正することはできない。
As shown in FIG. 3, when the absolute value calculation process is performed in the
次に、データ要求信号の送信タイミングについて詳述する。図4は、データ要求信号の送信タイミングが最適となっている様子を示し、図5は、データ要求信号の送信タイミングが遅い様子を示し、図6は、データ要求信号の送信タイミングが早い様子を示している。 Next, the transmission timing of the data request signal will be described in detail. 4 shows a state in which the transmission timing of the data request signal is optimum, FIG. 5 shows a state in which the transmission timing of the data request signal is late, and FIG. 6 shows a state in which the transmission timing of the data request signal is early. Show.
図4に示すように、上位装置30からのデータ要求信号(REQ信号)の送信周期(リクエスト周期)が、エンコーダ1の処理周期と同じになっている場合には、最適な送信タイミングとなる。なぜなら、待ち時間がなく(図5参照)、また、ソフトウェアエラーも生じないからである(図6参照)。なお、図中の「演算処理」は、エンコーダ1において絶対値を算出する演算時間を示し、「通信」は、上位装置30とエンコーダ1とのシリアル通信時間を示す。
As shown in FIG. 4, when the transmission cycle (request cycle) of the data request signal (REQ signal) from the higher-
図5に示すように、仮に、上位装置30のリクエスト周期がエンコーダ1の処理周期よりも長い場合には、図中の斜線部分の時間はエンコーダ1として何もしない待ち時間となり、システム全体の制御周期が長くなってしまう。さらに、仮に、上位装置30のリクエスト周期の間にエンコーダ1の永久磁石50が(電気角で)一回転以上回ってしまうと、位置が分からなくなってしまう。
As shown in FIG. 5, if the request cycle of the
そこで、位置が分からなくなるのを防ぐために、エンコーダ1の使用回転数によって、リクエスト周期の最大値を決めればよい。また、図4に示すように、データ要求を送信してから、エンコーダ1のサンプリング周期(エンコーダ処理周期)が経過すると同時に(或いはサンプリング周期が経過する前に)、次のデータ要求信号を送信すればよい。これにより、システム全体の制御周期が長くなるのを防ぐことができる。
Therefore, in order to prevent the position from being lost, the maximum value of the request cycle may be determined based on the number of rotations used by the
なお、図5に示す送信タイミングであっても、エンコーダ1はデータ要求信号(REQ信号)に同期して動作できるので、上位装置30側のマイコン31の性能が低く、処理時間が長くなる場合にも対応することが可能である。この点、エンコーダ1としては相手側のマイコン(マイコン31)を選ばない、といった利点はある。
Note that, even at the transmission timing shown in FIG. 5, since the
次に、図6に示すように、仮に、上位装置30のリクエスト周期がエンコーダ1の処理周期よりも短い場合には、ソフトウェアエラー(暴走)が生じる虞がある。具体的に説明すると、データ要求信号(REQ信号)により、エンコーダ1の(絶対値の)演算処理が始まってしまうため、エンコーダ処理時間よりも短い周期でREQ信号が与えられると、演算結果が終了せず、通信処理を行うことができない(図6中の×印参照)。よって、REQ信号に対して全く答えが返ってこないことになる。また、エンコーダ1のマイコン20側では、REQ信号によって割り込み処理が行われるため、結果的に多重割り込み処理が実行されることになり、ソフトウェアエラー(暴走)が生じる虞がある。
Next, as shown in FIG. 6, if the request cycle of the
そこで、図4に示すように、データ要求を送信してから、エンコーダ1から絶対値を受信した後に、次のデータ要求信号を送信すればよい。これにより、上述したソフトウェアエラーを防ぐことができる。
Therefore, as shown in FIG. 4, after transmitting a data request and receiving an absolute value from the
図4〜図6を用いて説明したように、データ要求信号の適切な送信タイミングは(待ち時間をなくすとともに、ソフトウェアエラーを防ぐタイミングは)、上位装置30がデータ要求信号を送信してから、上位装置30がエンコーダ1から絶対値を受信した後であって、かつ、エンコーダ1のサンプリング周期が経過する前である。そして、最適な送信タイミングは、図4に示すように、上位装置30からのデータ要求信号(REQ信号)の送信周期が、エンコーダ1の処理周期と同じになっている場合である。
As described with reference to FIGS. 4 to 6, the appropriate transmission timing of the data request signal (the timing for eliminating the waiting time and preventing the software error) is, after the
[実施形態の主な効果]
以上説明したように、本実施形態に係るエンコーダ1の情報処理システム及び情報処理方法によれば、相手側マイコン(上位装置30のマイコン31)からのデータ要求信号を受けてから、オンデマンドでエンコーダ1側の演算処理(絶対値の算出処理)を開始するようにしている。すなわち、上位装置30からエンコーダ1に対して(永久磁石50の回転位置の)絶対値のデータ要求を示すデータ要求信号が送信され、その後、データ要求信号を受信したことを契機として、エンコーダ1において絶対値の算出処理が開始されるようにしている。これにより、相手側マイコンのサンプリング周期に同期してエンコーダ1側の処理が行われることになり、相手側マイコンがデータを受け取る時点で、実位置からの時間遅れがエンコーダ1の処理時間だけとなり、一定時間となる(一定時間の群遅延となる)。その結果、遅れ時間が既知であり、実位置推定がより正確(かつ容易)に行うことができる。
[Main effects of the embodiment]
As described above, according to the information processing system and information processing method of the
また、上述したように、エンコーダ1のサンプリング周期が経過する前に、次のデータ要求信号を送信することで、システム全体の制御周期が長期化するのを防ぎつつ、永久磁石50の実位置をより正確に推定できるし、エンコーダ1から絶対値を受信した後に、次のデータ要求信号を送信することで、割り込み処理が何度も行われることに起因したソフトウェアエラー(暴走)を防ぎつつ、永久磁石50の実位置をより正確に推定できる。さらに、可動被検出物が永久磁石50である場合に本発明を適用すれば、回路コストの増大を抑制しつつ、永久磁石50の実位置をより正確に推定できる。
Further, as described above, by transmitting the next data request signal before the sampling period of the
なお、相手側マイコン(マイコン31)のオンデマンド信号(データ要求信号)が送られてくるまでの待ち状態の間、マイコン20をスリーブ状態にしておけば、省電力設計にすることもできる。この場合、オンデマンド信号を、スリープからの復帰のトリガと演算開始に使用すればよい。
If the
また、多回転絶対値エンコーダに本発明を応用する場合には、上位装置30側から電源が供給されないとき、電池駆動によって多回転部データの更新を行うことになる。多回転部データのみの更新周期は、通常の処理よりも長いサンプリング周期でよい。オンデマンド方式であれば、相手側からのデータ要求のときだけ本来の絶対値演算をすればよいため、省電力となり、電池の寿命を延ばすことができる。
When the present invention is applied to a multi-rotation absolute value encoder, when power is not supplied from the
本発明に係るエンコーダ1の情報処理システム及び情報処理方法は、可動被検出物の実位置をより正確に推定し得るものとして有用である。
The information processing system and information processing method of the
1 エンコーダ
10 MR素子
20 マイコン
21 ADC
30 上位装置
31 マイコン
50 永久磁石
1
30
Claims (4)
前記上位装置は、前記エンコーダにおいて前記絶対値を算出する演算時間に基づいて、前記データ要求信号を送信するとともに、
前記エンコーダは、前記データ要求信号の受信を契機として、前記絶対値の算出を開始し、
前記上位装置は、前記データ要求信号を送信してから、前記エンコーダにおける前記絶対値の算出が完了した後からサンプリング周期が経過する前に、次のデータ要求信号を送信することを特徴とするエンコーダの情報処理システム。 A sinusoidal A-phase signal output from the A-phase sensor corresponding to the displacement of the movable detection object, and a sine-wave B-phase signal output from the B-phase sensor corresponding to the displacement of the movable detection object And an encoder that outputs an absolute value of the displacement of the movable detection object and a host device that transmits a data request signal indicating a data request for the absolute value to the encoder. In the processing system,
The upper device transmits the data request signal based on the calculation time for calculating the absolute value in the encoder,
The encoder starts the calculation of the absolute value triggered by the reception of the data request signal ,
The encoder, wherein the host device transmits the next data request signal after the data request signal is transmitted and before the sampling period elapses after the calculation of the absolute value in the encoder is completed. Information processing system.
上位装置から前記エンコーダに対して、前記絶対値のデータ要求を示すデータ要求信号が送信されるステップと、
前記データ要求信号を受信したことを契機として、前記エンコーダにおいて前記絶対値の算出処理が開始されるステップと、
前記上位装置において、前記データ要求信号を送信してから、前記エンコーダにおける前記絶対値の算出が完了した後からサンプリング周期が経過する前に、次のデータ要求信号が送信されるステップと、
を含むことを特徴とするエンコーダの情報処理方法。 A sinusoidal A-phase signal output from the A-phase sensor corresponding to the displacement of the movable detection object, and a sine-wave B-phase signal output from the B-phase sensor corresponding to the displacement of the movable detection object In the information processing method of the encoder that calculates the absolute value of the displacement of the movable object by analyzing
A step of transmitting a data request signal indicating a data request for the absolute value from the host device to the encoder;
Triggered by the reception of the data request signal, the encoder starts calculating the absolute value in the encoder;
In the host device, after the data request signal is transmitted, the next data request signal is transmitted before the sampling period elapses after the calculation of the absolute value in the encoder is completed;
An information processing method for an encoder, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008243893A JP5217033B2 (en) | 2008-09-24 | 2008-09-24 | Information processing system and information processing method for encoder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008243893A JP5217033B2 (en) | 2008-09-24 | 2008-09-24 | Information processing system and information processing method for encoder |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010078342A JP2010078342A (en) | 2010-04-08 |
JP5217033B2 true JP5217033B2 (en) | 2013-06-19 |
Family
ID=42208985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008243893A Expired - Fee Related JP5217033B2 (en) | 2008-09-24 | 2008-09-24 | Information processing system and information processing method for encoder |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5217033B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5833878B2 (en) * | 2011-10-05 | 2015-12-16 | 株式会社ミツトヨ | Absolute length encoder |
WO2020170440A1 (en) * | 2019-02-22 | 2020-08-27 | 三菱電機株式会社 | Motor drive control device, coupling control system, and motor drive control method |
JP7277274B2 (en) * | 2019-06-12 | 2023-05-18 | ファナック株式会社 | Encoder and data transmission method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05240631A (en) * | 1992-02-27 | 1993-09-17 | Yokogawa Electric Corp | Optical encoder |
HK1039517A1 (en) * | 1998-09-02 | 2002-04-26 | 三菱电机株式会社 | Position detector |
-
2008
- 2008-09-24 JP JP2008243893A patent/JP5217033B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2010078342A (en) | 2010-04-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5173962B2 (en) | Resolver / digital conversion apparatus and resolver / digital conversion method | |
JP4838022B2 (en) | Resolver signal processing device | |
CN107888119B (en) | Control system and method of controlling an electric motor | |
JPH0919184A (en) | Brushless motor | |
US10895866B1 (en) | Position error correction for electric motors | |
JPWO2008105217A1 (en) | Absolute value encoder device and multi-rotation detection method | |
CN102612802A (en) | Rotation angle calculation apparatus and rotation angle calculation method | |
JP5217033B2 (en) | Information processing system and information processing method for encoder | |
KR101338707B1 (en) | Excitation signal generating device and resolver sensing device | |
JP2015108610A (en) | Rotation detection device and rotation detection method | |
JP6184134B2 (en) | Motor drive device and control method thereof | |
JP2006201148A (en) | Signal processing device, signal processing method, signal processing program, recording medium with the signal processing program stored, speed detection device, and servo mechanism | |
EP1356583B1 (en) | Brushless motor control system | |
JP6098992B2 (en) | Digital notch filter | |
CN106533316A (en) | Rotor Angle Estimation Method | |
JP2013238431A (en) | Resolver device | |
JP5479592B2 (en) | Electronic commutation motor and method for predicting rotor position | |
CN118418914A (en) | Resolver decoding system and method | |
JP2013224865A (en) | Signal processing device | |
JP2011257254A (en) | Rotation angle detection device | |
JP6648103B2 (en) | Synchronous motor, control device and method for generating control signals for managing operation of actuator | |
JP5511445B2 (en) | Motor and motor drive control method | |
US11356042B2 (en) | Method of controlling a brushless DC motor | |
JP5664895B2 (en) | Electric motor control device | |
JP2016148587A (en) | Resolver signal processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110809 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120801 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120911 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121011 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130118 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130213 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160315 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5217033 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |