JP5925485B2 - Encoder device and signal generation method for encoder device - Google Patents
Encoder device and signal generation method for encoder device Download PDFInfo
- Publication number
- JP5925485B2 JP5925485B2 JP2011282606A JP2011282606A JP5925485B2 JP 5925485 B2 JP5925485 B2 JP 5925485B2 JP 2011282606 A JP2011282606 A JP 2011282606A JP 2011282606 A JP2011282606 A JP 2011282606A JP 5925485 B2 JP5925485 B2 JP 5925485B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- signal
- encoder
- frequency division
- division
- 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.)
- Active
Links
Images
Landscapes
- Transmission And Conversion Of Sensor Element Output (AREA)
Description
本発明は、回転体の回転角度を検出するためのエンコーダ装置に関する。また、本発明は、回転体の回転角度を検出するためのエンコーダ装置の信号生成方法に関する。 The present invention relates to an encoder device for detecting a rotation angle of a rotating body. The present invention also relates to a signal generation method of an encoder device for detecting a rotation angle of a rotating body.
従来、回転体の回転角度を検出するための磁気式エンコーダ装置が知られている(たとえば、特許文献1参照)。特許文献1に記載の磁気式エンコーダ装置は、ACサーボモータに設けられており、モータの回転軸に固定される円板状の磁気記録媒体と、磁気記録媒体の外周面に形成される磁気記録面に対向配置される磁気センサとを備えている。磁気センサは、MR素子を備えており、MR素子の出力端子には、波形整形回路と逓倍回路とによって構成される信号処理部が接続されている。 Conventionally, a magnetic encoder device for detecting a rotation angle of a rotating body is known (see, for example, Patent Document 1). The magnetic encoder device described in Patent Document 1 is provided in an AC servo motor, and is a disk-shaped magnetic recording medium fixed to the rotating shaft of the motor and a magnetic recording formed on the outer peripheral surface of the magnetic recording medium. And a magnetic sensor arranged to face the surface. The magnetic sensor includes an MR element, and a signal processing unit including a waveform shaping circuit and a multiplier circuit is connected to an output terminal of the MR element.
近年、エンコーダ装置の市場では、使い勝手の良いエンコーダ装置が要求されている。そこで、本発明の課題は、使い勝手を向上させることが可能なエンコーダ装置を提供することにある。また、本発明の課題は、エンコーダ装置の使い勝手を向上させることが可能となるエンコーダ装置の信号生成方法を提供することにある。 In recent years, a user-friendly encoder device is required in the encoder device market. Accordingly, an object of the present invention is to provide an encoder device capable of improving usability. It is another object of the present invention to provide a signal generation method for an encoder device that can improve the usability of the encoder device.
上記の課題を解決するため、本発明のエンコーダ装置は、回転体の回転角度を検出するための位置データの信号を出力するエンコーダと、所定の周期で位置データの差分値である差分値データを生成する差分値データ生成部と、差分値データを分周または逓倍した分周逓倍データを生成する分周逓倍部と、分周逓倍データに基づいてA相信号、B相信号およびZ相信号を出力する信号出力部と、信号出力部がZ相信号を出力するタイミングを決める1回転分割数を信号出力部に設定するための設定データを生成する設定データ生成部とを備え、MおよびNを1以上の整数とすると、分周逓倍部は、差分値データを分周逓倍比N/Mで分周または逓倍した分周逓倍データを生成し、信号出力部は、設定データをその内部に設定し、かつ、分周逓倍データの累積値が1回転分割数になると、Z相信号を出力するとともに分周逓倍データの累積値をリセットし、1回転分割数は、回転体が1回転する間にエンコーダが位置データの信号として出力するパルスの数と分周逓倍比N/Mとの積であり、かつ、4の整数倍になっていることを特徴とする。 In order to solve the above problems, an encoder apparatus according to the present invention includes an encoder that outputs a position data signal for detecting a rotation angle of a rotating body, and difference value data that is a difference value of position data at a predetermined cycle. A difference value data generation unit to generate, a frequency division multiplication unit to generate frequency division multiplication data obtained by dividing or multiplying the difference value data, and an A phase signal, a B phase signal, and a Z phase signal based on the frequency division multiplication data A signal output unit that outputs, and a setting data generation unit that generates setting data for setting the number of one rotation division in the signal output unit that determines the timing at which the signal output unit outputs the Z-phase signal. When the integer is 1 or more, the frequency division / multiplication unit generates frequency division / multiplication data by dividing or multiplying the difference value data by the frequency division / multiplication ratio N / M, and the signal output unit sets the setting data therein. And frequency division When the accumulated value of the data reaches the number of divisions per rotation, the Z-phase signal is output and the accumulated value of the frequency division multiplied data is reset. As a product of the number of pulses to be output and the frequency division multiplication ratio N / M, and is an integer multiple of 4.
本発明のエンコーダ装置では、分周逓倍部は、差分値データを分周逓倍比N/Mで分周または逓倍した分周逓倍データを生成し、設定データ生成部は、信号出力部がZ相信号を出力するタイミングを決める1回転分割数を信号出力部に設定するための設定データを生成し、信号出力部は、設定データをその内部に設定し、かつ、分周逓倍データの累積値が1回転分割数になると、Z相信号を出力するとともに分周逓倍データの累積値をリセットしている。また、本発明のエンコーダ装置では、1回転分割数は、回転体が1回転する間にエンコーダが位置データの信号として出力するパルスの数と分周逓倍比N/Mとの積であり、かつ、4の整数倍になっている。そのため、本発明では、信号出力部に設定される1回転分割数が4の整数倍になっていれば、この1回転分割数を、回転体が1回転する間にエンコーダが位置データの信号として出力するパルスの数と分周逓倍比N/Mとに応じた任意の値に設定することが可能になる。したがって、本発明では、エンコーダ装置の使い勝手を向上させることが可能になる。 In the encoder device of the present invention, the frequency division / multiplication unit generates frequency division / multiplication data obtained by dividing or multiplying the difference value data by the frequency division / multiplication ratio N / M, and the setting data generation unit is configured such that the signal output unit has a Z phase. Generates setting data for setting in the signal output unit the number of one-rotation divisions that determines the signal output timing. The signal output unit sets the setting data therein, and the accumulated value of the divided multiplication data is When the number of divisions per rotation is reached, the Z-phase signal is output and the accumulated value of the frequency division multiplied data is reset. In the encoder device according to the present invention, the number of divisions per rotation is a product of the number of pulses output as a position data signal by the encoder during one rotation of the rotating body and the frequency division ratio N / M, and It is an integer multiple of 4. Therefore, in the present invention, if the number of rotations per rotation set in the signal output unit is an integer multiple of 4, the number of rotations per rotation is converted into a position data signal by the encoder while the rotor rotates once. It is possible to set an arbitrary value according to the number of pulses to be output and the frequency division / multiplication ratio N / M. Therefore, according to the present invention, it is possible to improve the usability of the encoder device.
本発明において、エンコーダ装置は、差分値データ生成部と分周逓倍部と設定データ生成部とを有するマイクロプロセッサ(Micro−Processing Unit(MPU))を備え、信号出力部は、プログラマブルロジックデバイス(Programmable Logic Device(PLD))であり、マイクロプロセッサは、プログラマブルロジックデバイスとSPI(Serial Peripheral Interface)で通信を行うことが好ましい。このように構成すると、マイクロプロセッサとプログラマブルロジックデバイスとの間の信号線の数を低減して、エンコーダ装置の構成を簡素化することが可能になる。 In the present invention, the encoder device includes a microprocessor (Micro-Processing Unit (MPU)) having a difference value data generation unit, a frequency division multiplication unit, and a setting data generation unit, and the signal output unit includes a programmable logic device (Programmable). It is preferable that the microprocessor communicates with a programmable logic device using an SPI (Serial Peripheral Interface). If comprised in this way, it will become possible to reduce the number of the signal lines between a microprocessor and a programmable logic device, and to simplify the structure of an encoder apparatus.
本発明において、マイクロプロセッサからプログラマブルロジックデバイスへ送られる送信データには、送信データの内容を切り替えるための切替ビットが含まれていることが好ましい。このように構成すると、マイクロプロセッサからプログラマブルロジックデバイスへ送信される送信データのデータ長を短くして、マイクロプロセッサからプログラマブルロジックデバイスへの通信速度を高めることが可能になる。 In the present invention, the transmission data sent from the microprocessor to the programmable logic device preferably includes a switching bit for switching the content of the transmission data. If comprised in this way, it will become possible to shorten the data length of the transmission data transmitted from a microprocessor to a programmable logic device, and to raise the communication speed from a microprocessor to a programmable logic device.
また、上記の課題を解決するため、本発明のエンコーダ装置の信号生成方法は、回転体の回転角度を検出するための位置データの信号を出力するエンコーダからの位置データに基づいて、A相信号、B相信号およびZ相信号を生成するエンコーダ装置の信号生成方法であって、MおよびNを1以上の整数とすると、所定の周期で位置データの差分値である差分値データを生成し、差分値データを分周逓倍比N/Mで分周または逓倍した分周逓倍データを生成し、分周逓倍データに基づいてA相信号およびB相信号を生成し、かつ、分周逓倍データの累積値がZ相信号を出力するタイミングを決める1回転分割数になると、Z相信号を生成するとともに分周逓倍データの累積値をリセットし、1回転分割数は、回転体が1回転する間にエンコーダが位置データの信号として出力するパルスの数と分周逓倍比N/Mとの積であり、かつ、4の整数倍になっていることを特徴とする。 In order to solve the above problem, the signal generation method of the encoder device according to the present invention is based on position data from an encoder that outputs a position data signal for detecting a rotation angle of a rotating body. , A signal generation method for an encoder device that generates a B-phase signal and a Z-phase signal, where M and N are integers equal to or greater than 1, and generates difference value data that is a difference value of position data in a predetermined cycle; Generates frequency-division multiplication data obtained by dividing or multiplying the difference value data by the frequency division multiplication ratio N / M, generates an A-phase signal and a B-phase signal based on the frequency-division multiplication data, and When the accumulated value reaches the one-rotation division number that determines the timing for outputting the Z-phase signal, the Z-phase signal is generated and the accumulated value of the frequency-division multiplication data is reset. Enko There is the product of the number and the division multiplication ratio N / M of the output pulse as a signal of the position data, and is characterized in that an integral multiple of 4.
本発明のエンコーダ装置の信号生成方法では、所定の周期で位置データの差分値である差分値データを生成し、差分値データを分周逓倍比N/Mで分周または逓倍した分周逓倍データを生成し、分周逓倍データの累積値がZ相信号を出力するタイミングを決める1回転分割数になると、Z相信号を生成するとともに分周逓倍データの累積値をリセットしている。また、本発明では、1回転分割数は、回転体が1回転する間にエンコーダが位置データの信号として出力するパルスの数と分周逓倍比N/Mとの積であり、かつ、4の整数倍になっている。そのため、本発明の信号生成方法では、1回転分割数が4の整数倍になっていれば、この1回転分割数を、回転体が1回転する間にエンコーダが位置データの信号として出力するパルスの数と分周逓倍比N/Mとに応じた任意の値に設定することが可能になる。したがって、本発明の信号生成方法を用いれば、エンコーダ装置の使い勝手を向上させることが可能になる。 In the signal generation method of the encoder device according to the present invention, the difference value data that is the difference value of the position data is generated at a predetermined cycle, and the frequency division multiplied data obtained by dividing or multiplying the difference value data by the frequency division multiplication ratio N / M. And the accumulated value of the divided multiplied data is reset while the Z-phase signal is generated and the accumulated value of the divided multiplied data is reset. In the present invention, the number of divisions per rotation is the product of the number of pulses output as a position data signal by the encoder during one rotation of the rotating body and the frequency division multiplication ratio N / M, and 4 It is an integer multiple. Therefore, in the signal generation method of the present invention, if the number of divisions per revolution is an integral multiple of 4, this number of divisions per revolution is output by the encoder as a position data signal while the rotating body makes one revolution. It is possible to set an arbitrary value in accordance with the number of sigma and the frequency division multiplication ratio N / M. Therefore, if the signal generation method of the present invention is used, the usability of the encoder device can be improved.
以上のように、本発明では、エンコーダ装置の使い勝手を向上させることが可能になる。また、本発明のエンコーダ装置の信号生成方法を用いれば、エンコーダ装置の使い勝手を向上させることが可能になる。 As described above, according to the present invention, it is possible to improve the usability of the encoder device. Further, if the signal generation method for an encoder apparatus according to the present invention is used, the usability of the encoder apparatus can be improved.
以下、図面を参照しながら、本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(エンコーダ装置の構成)
図1は、本発明の実施の形態にかかるエンコーダ装置1の概略構成を説明するためのブロック図である。図2は、図1に示すエンコーダ2の概略構成を説明するための概略図である。図3は、図1に示す信号処理部3から信号出力部4へ送られる送信データの通信フォーマットの一例を説明するための図である。
(Configuration of encoder device)
FIG. 1 is a block diagram for explaining a schematic configuration of an encoder apparatus 1 according to an embodiment of the present invention. FIG. 2 is a schematic diagram for explaining a schematic configuration of the
本形態のエンコーダ装置1は、回転体の回転角度(回転位置)を検出するための装置であり、具体的には、たとえば、サーボモータのロータの回転角度を検出するための装置である。このエンコーダ装置1は、図1に示すように、エンコーダ2と、エンコーダ2から出力される信号を処理する信号処理部3と、信号処理部3から出力される信号に基づいてA相信号、B相信号およびZ相信号を出力する信号出力部4とを備えている。信号処理部3は、エンコーダ2の出力側に接続され、信号出力部4は、信号処理部3の出力側に接続されている。また、信号出力部4の出力側は、サーボモータを制御する上位の制御部に接続されている。
The encoder device 1 of the present embodiment is a device for detecting the rotation angle (rotation position) of a rotating body, and specifically, for example, a device for detecting the rotation angle of a rotor of a servo motor. As shown in FIG. 1, the encoder device 1 includes an
エンコーダ2は、アブソリュートエンコーダ(絶対値エンコーダ)である。また、本形態のエンコーダ2は、磁気式のエンコーダであり、図2に示すように、サーボモータのロータを構成する回転軸7等に固定されるセンサ磁石8と、センサ磁石8に対向配置される磁気抵抗素子9およびホール素子10とを備えている。
The
センサ磁石8は、円板状に形成された永久磁石である。センサ磁石8の、磁気抵抗素子9およびホール素子10との対向面には、その周方向において、N極とS極とが1極ずつ形成されている。磁気抵抗素子9は、回転軸7の軸方向から見たときにセンサ磁石8の中心と磁気抵抗素子9の中心とが略一致するように配置されている。磁気抵抗素子9には、互いに略直交する方向に配置される磁気抵抗パターンが形成されている。ホール素子10は、回転軸7の軸方向から見たときに、センサ磁石8の中心に対して互いに90°ずれた位置に配置されている。
The
磁気抵抗素子9は、一対の増幅回路11を介してCPU(Central Processing Unit)12に接続されている。ホール素子10は、増幅回路13を介してCPU12に接続されている。CPU12には、図示を省略する出力用のインターフェースが接続されている。
The magnetoresistive element 9 is connected to a CPU (Central Processing Unit) 12 through a pair of
エンコーダ2は、磁気抵抗素子9での検出結果に基づいて、回転体(ロータ)の1回転(360°)の範囲内の回転角度を示す位置データの信号を信号処理部3に向かって出力する。本形態のエンコーダ2の分解能は、12ビットまたは14ビットである。エンコーダ2の分解能が12ビットである場合には、回転体が1回転する間にエンコーダ2が位置データの信号として出力するパルスの数は4096であり、エンコーダ2の分解能が14ビットである場合には、回転体が1回転する間にエンコーダ2が位置データの信号として出力するパルスの数は16384である。
The
また、エンコーダ2は、ホール素子10での検出結果に基づいて、所定の原点位置から回転体が何回転したのかを示す多回転データの信号を信号処理部3に向かって出力する。さらに、エンコーダ2は、エンコーダ2のエラー状態を示す信号を信号処理部3に向かって出力する。エンコーダ2は、信号処理部3とSPI(Serial Peripheral Interface)で通信を行う。また、エンコーダ2は、信号処理部3と一定の通信周期で通信を行う。すなわち、信号処理部3は、一定の周期で、位置データや多回転データ等を取得する。
The
信号処理部3は、マイクロプロセッサ(MPU)である。この信号処理部3は、その機能として、エンコーダ入力インターフェース部16と、位置データ処理部17と、分周逓倍部18と、設定データ生成部19と、エンコーダ出力インターフェース部20とを備えている。エンコーダ入力インターフェース部16は、エンコーダ2の出力側に接続され、位置データ処理部17は、エンコーダ入力インターフェース部16の出力側に接続され、分周逓倍部18は、位置データ処理部17の出力側に接続されている。また、エンコーダ出力インターフェース部20は、分周逓倍部18の出力側および設定データ生成部19の出力側に接続されている。また、エンコーダ出力インターフェース部20の出力側は、信号出力部4の入力側に接続されている。
The signal processing unit 3 is a microprocessor (MPU). The signal processing unit 3 includes an encoder
位置データ処理部17は、エンコーダ入力インターフェース部16を介してエンコーダ2から入力される位置データの差分値である差分値データを一定の周期で生成する。本形態では、エンコーダ2と信号処理部3との間の通信周期ごとに取得される位置データと前回取得された位置データとの差分値である差分値データを生成する。本形態の位置データ処理部17は、所定の周期で位置データの差分値である差分値データを生成する差分値データ生成部である。
The position
分周逓倍部18は、位置データ処理部17から出力される差分値データを分周または逓倍した分周逓倍データを生成する。具体的には、MおよびNを1以上の整数とすると、分周逓倍部18は、差分値データを分周逓倍比N/Mで分周または逓倍した分周逓倍データを生成する。
The frequency division /
設定データ生成部19は、信号出力部4がZ相信号を出力するタイミングを決める1回転分割数(すなわち、回転体が1回転する間のA相信号のパルス(エッジ)の数とB相信号のパルス(エッジ)の数との和)を信号出力部4に設定するための設定データを生成する。1回転分割数は、回転体が1回転する間にエンコーダ2が位置データの信号として出力するパルスの数と分周逓倍比N/Mとの積である。ここで、分割逓倍比N/Mは、1回転分割数が4の整数倍となるように設定されている。A相信号の位相とB相信号の位相とは90°ずれており、A相信号またはB相信号の1周期が4パルス分に相当するため、1回転分割数が4の整数倍となるように、分割逓倍比N/Mを設定する必要があるからである。
The setting
信号処理部3は、分周逓倍データを信号出力部4に向かって出力する。また、信号処理部3は、1回転分割数を信号出力部4に設定するための設定データを信号出力部4に向かって出力する。さらに、信号処理部3は、信号出力部4での分周逓倍データの累積値をリセットするためのリセットデータと、信号出力部4からのA相信号、B相信号およびZ相信号の出力を許可するための出力許可データを信号出力部4に向かって出力する。 The signal processing unit 3 outputs the divided multiplication data toward the signal output unit 4. Further, the signal processing unit 3 outputs setting data for setting the number of rotation divisions to the signal output unit 4 toward the signal output unit 4. Further, the signal processing unit 3 outputs reset data for resetting the accumulated value of the frequency-division multiplied data in the signal output unit 4, and outputs of the A phase signal, the B phase signal, and the Z phase signal from the signal output unit 4. Output permission data for permission is output toward the signal output unit 4.
信号処理部3から信号出力部4へ送られる送信データの通信フォーマットは、たとえば、図3に示すように設定されている。本形態では、送信データの語長は、11ビットである。送信データの最上位ビット(第1ビット)SR10は、信号処理部3が分周逓倍データを送信するのかまたは設定データを送信するのかを切り替えるための切替ビットである。すなわち、送信データには、送信データの内容を切り替えるための切替ビットが含まれている。 The communication format of transmission data sent from the signal processing unit 3 to the signal output unit 4 is set as shown in FIG. 3, for example. In this embodiment, the word length of the transmission data is 11 bits. The most significant bit (first bit) SR10 of the transmission data is a switching bit for switching whether the signal processing unit 3 transmits the frequency division multiplied data or the setting data. That is, the transmission data includes a switching bit for switching the content of the transmission data.
分周逓倍データが送信される場合(第1ビットSR10=0の場合)には、図3(A)に示すように、第2ビットSR9は、信号出力部4での分周逓倍データの累積値をリセットするためのリセットデータ用のビットであり、信号出力部4での分周逓倍データの累積値をリセットしない場合には、第2ビットSR9は“0”となり、信号出力部4での分周逓倍データの累積値をリセットする場合には、第2ビットSR9は“1”となる。また、第3ビットSR8は、信号出力部4からのA相信号、B相信号およびZ相信号の出力を許可するための出力許可データ用のビットであり、信号出力部4からのA相信号、B相信号およびZ相信号の出力が許可される場合には、第3ビットSR8は“0”となり、信号出力部4からのA相信号、B相信号およびZ相信号の出力が許可されない場合には、第3ビットSR8は“1”となる。 When the frequency division multiplied data is transmitted (when the first bit SR10 = 0), the second bit SR9 is accumulated in the signal output unit 4 as shown in FIG. 3A. This is a bit for reset data for resetting the value, and when the accumulated value of the frequency division multiplied data in the signal output unit 4 is not reset, the second bit SR9 becomes “0”, and the signal output unit 4 When resetting the accumulated value of the frequency-division multiplied data, the second bit SR9 is “1”. The third bit SR8 is a bit for output permission data for permitting the output of the A phase signal, the B phase signal and the Z phase signal from the signal output unit 4, and the A phase signal from the signal output unit 4 When the output of the B phase signal and the Z phase signal is permitted, the third bit SR8 becomes “0”, and the output of the A phase signal, the B phase signal and the Z phase signal from the signal output unit 4 is not permitted. In this case, the third bit SR8 is “1”.
また、分周逓倍データが送信される場合には、第4ビットSR7は、分周逓倍データのプラスマイナスを判別するためのビットであり、回転体が正方向へ回転しており、分周逓倍データがプラスになる場合には、第4ビットSR7は“0”となり、回転体が逆方向へ回転しており、分周逓倍データがマイナスになる場合には、第4ビットSR7は“1”となる。また、第5ビットSR6〜第11ビットSR0は、分周逓倍データ用のビットである。 Further, when the frequency division multiplied data is transmitted, the fourth bit SR7 is a bit for determining the plus / minus of the frequency division multiplied data, and the rotating body is rotating in the positive direction, and the frequency division multiplication is performed. When the data is positive, the fourth bit SR7 is “0”, the rotating body is rotating in the reverse direction, and when the frequency-division multiplication data is negative, the fourth bit SR7 is “1”. It becomes. Further, the fifth bit SR6 to the eleventh bit SR0 are bits for frequency division multiplied data.
また、1回転分割数を信号出力部4に設定するための設定データが送信される場合(第1ビットSR10=1の場合)、本形態の1回転分割数の語長が16ビットであるため、この場合には、図3(B)に示すように、第2ビットSR9は、1回転分割数の設定桁を選択するためのビットとなる。16ビットのうちの下位8ビットを設定する場合には、第2ビットSR9は“0”となり、上位8ビットを設定する場合には、第2ビットSR9が“1”となる。また、第4ビットSR7〜第11ビットSR0は、1回転分割数設定用のビットである。なお、設定データが送信される場合には、第3ビットSR4は、使用されない。 Further, when setting data for setting the number of rotations per rotation to the signal output unit 4 is transmitted (when the first bit SR10 = 1), the word length of the number of rotations per rotation in this embodiment is 16 bits. In this case, as shown in FIG. 3B, the second bit SR9 is a bit for selecting a set digit for the number of rotation divisions. When the lower 8 bits of the 16 bits are set, the second bit SR9 is “0”, and when the upper 8 bits are set, the second bit SR9 is “1”. Also, the fourth bit SR7 to the eleventh bit SR0 are bits for setting the number of rotation divisions. When setting data is transmitted, the third bit SR4 is not used.
信号処理部3は、信号出力部4とSPIで通信を行う。また、信号処理部3は、信号出力部4と一定の通信周期で通信を行う。具体的には、エンコーダ2と信号処理部3との通信周期と同じ通信周期で通信を行う。
The signal processing unit 3 communicates with the signal output unit 4 by SPI. The signal processing unit 3 communicates with the signal output unit 4 at a constant communication cycle. Specifically, communication is performed at the same communication cycle as the communication cycle between the
信号出力部4は、プログラマブルロジックデバイスである。具体的には、本形態の信号出力部4は、コンプレックスプログラマブルロジックデバイス(Complex Programmable Logic Device(CPLD))である。この信号出力部4は、信号処理部3が実装される回路基板と同一の回路基板上に実装されている。なお、信号出力部4は、フィールドプログラマブルゲートアレイ(Field Programmable Gate Array(FPGA))であっても良い。 The signal output unit 4 is a programmable logic device. Specifically, the signal output unit 4 of the present embodiment is a complex programmable logic device (CPLD). The signal output unit 4 is mounted on the same circuit board on which the signal processing unit 3 is mounted. The signal output unit 4 may be a field programmable gate array (FPGA).
信号出力部4は、信号処理部3から出力される設定データをその内部に設定する。すなわち、信号出力部4は、1回転分割数を信号処理部3から入力された値に設定する。また、信号出力部4は、分周逓倍データに基づいてA相信号およびB相信号を生成して出力する。また、信号出力部4は、分周逓倍データの累積値が1回転分割数になると、Z相信号を生成して出力するとともに分周逓倍データの累積値をリセット(クリア)する。 The signal output unit 4 sets the setting data output from the signal processing unit 3 therein. That is, the signal output unit 4 sets the number of rotation divisions to the value input from the signal processing unit 3. Further, the signal output unit 4 generates and outputs an A-phase signal and a B-phase signal based on the frequency division multiplied data. In addition, when the accumulated value of the divided multiplied data reaches the number of one rotation division, the signal output unit 4 generates and outputs a Z-phase signal and resets (clears) the accumulated value of the divided multiplied data.
以上のように構成されたエンコーダ装置1では、電源投入時等の初期動作時に、信号処理部3は、分周逓倍比N/Mを設定するとともに、1回転分割数を信号出力部4に設定するための設定データを生成し、信号出力部4に向かって出力する。信号出力部4は、信号処理部3から出力された設定データをその内部に設定する。また、信号処理部3は、回転体の初期位置を設定する。 In the encoder apparatus 1 configured as described above, the signal processing unit 3 sets the frequency division / multiplication ratio N / M and sets the number of rotation divisions to the signal output unit 4 at the initial operation such as when the power is turned on. Setting data to be generated is output to the signal output unit 4. The signal output unit 4 sets the setting data output from the signal processing unit 3 therein. Further, the signal processing unit 3 sets an initial position of the rotating body.
また、エンコーダ装置1の通常動作時には、信号処理部3は、差分値データを生成し、分周逓倍データを生成するとともに、生成した分周逓倍データを信号出力部4に向かって出力する。信号出力部4は、分周逓倍データに基づいてA相信号およびB相信号を出力し、かつ、分周逓倍データの累積値が1回転分割数になると、Z相信号を出力するとともに分周逓倍データの累積値をリセットする。 Further, during normal operation of the encoder apparatus 1, the signal processing unit 3 generates difference value data, generates frequency division multiplied data, and outputs the generated frequency division multiplied data to the signal output unit 4. The signal output unit 4 outputs an A-phase signal and a B-phase signal based on the frequency-division multiplication data, and outputs a Z-phase signal and frequency division when the accumulated value of the frequency-division multiplication data reaches the number of divisions per rotation. Reset the accumulated value of multiplication data.
(本形態の主な効果)
以上説明したように、本形態では、信号出力部4がZ相信号を出力するタイミングを決める1回転分割数は、回転体が1回転する間にエンコーダ2が位置データの信号として出力するパルスの数と分周逓倍比N/Mとの積である。また、本形態では、設定データ生成部19は、1回転分割数を信号出力部4に設定するための設定データを生成し、信号出力部4は、この設定データを内部に設定している。そのため、本形態では、信号出力部4に設定される1回転分割数が4の整数倍になっていれば、この1回転分割数を、回転体が1回転する間にエンコーダ2が位置データの信号として出力するパルスの数と分周逓倍比N/Mとに応じた任意の値に設定することが可能になる。たとえば、1回転分割数を、10000に設定したり、360に設定したりすることが可能になる。したがって、本形態では、エンコーダ装置1の使い勝手を向上させることが可能になる。
(Main effects of this form)
As described above, in this embodiment, the one-rotation division number that determines the timing at which the signal output unit 4 outputs the Z-phase signal is the number of pulses that the
本形態では、信号処理部3は、信号出力部4とSPIで通信を行う。そのため、本形態では、信号処理部3と信号出力部4との間の信号線の数を低減して、エンコーダ装置1の構成を簡素化することが可能になる。また、本形態では、信号処理部3から信号出力部4へ送られる送信データに、送信データの内容を切り替えるための切替ビット(具体的には、第1ビットSR10)が含まれているため、信号処理部3から信号出力部4へ送られる送信データのデータ長を短くして、信号処理部3から信号出力部4への通信速度を高めることが可能になる。 In this embodiment, the signal processing unit 3 communicates with the signal output unit 4 by SPI. Therefore, in this embodiment, the number of signal lines between the signal processing unit 3 and the signal output unit 4 can be reduced, and the configuration of the encoder device 1 can be simplified. In this embodiment, the transmission data sent from the signal processing unit 3 to the signal output unit 4 includes a switching bit (specifically, the first bit SR10) for switching the content of the transmission data. It is possible to shorten the data length of transmission data sent from the signal processing unit 3 to the signal output unit 4 and increase the communication speed from the signal processing unit 3 to the signal output unit 4.
(他の実施の形態)
上述した形態は、本発明の好適な形態の一例ではあるが、これに限定されるものではなく本発明の要旨を変更しない範囲において種々変形実施が可能である。
(Other embodiments)
The above-described embodiment is an example of a preferred embodiment of the present invention, but is not limited to this, and various modifications can be made without departing from the scope of the present invention.
上述した形態では、信号出力部4は、CPLDであり、MPUである信号処理部3とは別の電子部品となっている。この他にもたとえば、信号出力部4は、信号処理部3の一部を構成しても良い。すなわち、信号処理部3に、信号出力部4の機能を持たせて、信号処理部3からA相信号、B相信号およびZ相信号を出力しても良い。 In the above-described form, the signal output unit 4 is a CPLD and is an electronic component different from the signal processing unit 3 that is an MPU. In addition, for example, the signal output unit 4 may constitute a part of the signal processing unit 3. That is, the signal processing unit 3 may have the function of the signal output unit 4 to output the A phase signal, the B phase signal, and the Z phase signal from the signal processing unit 3.
上述した形態では、信号処理部3は、信号出力部4とSPIで通信を行っているが、信号処理部3は、信号出力部4とパラレル通信で通信を行っても良い。また、上述した形態では、信号処理部3から信号出力部4へ送られる送信データに切替ビットが含まれているが、たとえば、信号処理部3が信号出力部4とパラレル通信で通信を行う場合には、送信データの語長を長くして、送信データに切替ビットが含まれないようにしても良い。 In the embodiment described above, the signal processing unit 3 communicates with the signal output unit 4 through SPI, but the signal processing unit 3 may communicate with the signal output unit 4 through parallel communication. In the above-described form, the transmission data sent from the signal processing unit 3 to the signal output unit 4 includes a switching bit. For example, the signal processing unit 3 communicates with the signal output unit 4 in parallel communication. Alternatively, the transmission data may have a longer word length so that the transmission data does not include a switching bit.
上述した形態では、エンコーダ2は、アブソリュートエンコーダであるが、エンコーダ2は、インクリメンタルエンコーダであっても良い。また、上述した形態では、エンコーダ2は、磁気式のエンコーダであるが、エンコーダ2は、たとえば、発光素子および受光素子と、発光素子からの光を受光素子へ透過するスリットが形成されたスリット板とを備える光電式のエンコーダであっても良い。また、エンコーダ2は、磁気式または光電式以外の他の形式のエンコーダであっても良い。
In the embodiment described above, the
1 エンコーダ装置
2 エンコーダ
3 信号処理部(マイクロプロセッサ)
4 信号出力部(プログラマブルロジックデバイス)
17 位置データ処理部(差分値データ生成部)
18 分周逓倍部
19 設定データ生成部
SR10 切替ビット
DESCRIPTION OF SYMBOLS 1
4 signal output part (programmable logic device)
17 Position data processing unit (difference value data generation unit)
18 Divider /
Claims (4)
MおよびNを1以上の整数とすると、
前記分周逓倍部は、前記差分値データを分周逓倍比N/Mで分周または逓倍した前記分周逓倍データを生成し、
前記信号出力部は、前記設定データをその内部に設定し、かつ、前記分周逓倍データの累積値が前記1回転分割数になると、前記Z相信号を出力するとともに前記分周逓倍データの累積値をリセットし、
前記1回転分割数は、前記回転体が1回転する間に前記エンコーダが前記位置データの信号として出力するパルスの数と前記分周逓倍比N/Mとの積であり、かつ、4の整数倍になっていることを特徴とするエンコーダ装置。 An encoder that outputs a position data signal for detecting the rotation angle of the rotating body, a difference value data generation unit that generates difference value data that is a difference value of the position data in a predetermined cycle, and the difference value data A frequency division / multiplication unit that generates frequency division / multiplication frequency division data, a signal output unit that outputs an A phase signal, a B phase signal, and a Z phase signal based on the frequency division multiplication data, and the signal output unit, A setting data generation unit that generates setting data for setting the number of one rotation division for determining the timing of outputting the Z-phase signal in the signal output unit;
When M and N are integers of 1 or more,
The frequency division / multiplication unit generates the frequency division / multiplication data obtained by dividing or multiplying the difference value data by a frequency division / multiplication ratio N / M,
The signal output unit sets the setting data therein and outputs the Z-phase signal and accumulates the divided multiplied data when the accumulated value of the divided multiplied data reaches the one rotation division number. Reset the value,
The one-rotation division number is a product of the number of pulses output by the encoder as the position data signal and the division / multiplication ratio N / M during one rotation of the rotating body, and an integer of 4 An encoder device characterized by being doubled.
前記信号出力部は、プログラマブルロジックデバイス(Programmable Logic Device(PLD))であり、
前記マイクロプロセッサは、前記プログラマブルロジックデバイスとSPI(Serial Peripheral Interface)で通信を行うことを特徴とする請求項1記載のエンコーダ装置。 A microprocessor (Micro-Processing Unit (MPU)) having the difference value data generation unit, the frequency division multiplication unit, and the setting data generation unit;
The signal output unit is a programmable logic device (Programmable Logic Device (PLD)),
The encoder apparatus according to claim 1, wherein the microprocessor communicates with the programmable logic device by an SPI (Serial Peripheral Interface).
MおよびNを1以上の整数とすると、
所定の周期で前記位置データの差分値である差分値データを生成し、
前記差分値データを分周逓倍比N/Mで分周または逓倍した分周逓倍データを生成し、
前記分周逓倍データに基づいて前記A相信号および前記B相信号を生成し、かつ、前記分周逓倍データの累積値が前記Z相信号を出力するタイミングを決める1回転分割数になると、前記Z相信号を生成するとともに前記分周逓倍データの累積値をリセットし、
前記1回転分割数は、前記回転体が1回転する間に前記エンコーダが前記位置データの信号として出力するパルスの数と前記分周逓倍比N/Mとの積であり、かつ、4の整数倍になっていることを特徴とするエンコーダ装置の信号生成方法。 A signal generation method for an encoder apparatus that generates an A-phase signal, a B-phase signal, and a Z-phase signal based on the position data from an encoder that outputs a position data signal for detecting a rotation angle of a rotating body. ,
When M and N are integers of 1 or more,
Generating difference value data that is a difference value of the position data in a predetermined cycle;
Generate frequency division / multiplication data obtained by dividing or multiplying the difference value data by a frequency division / multiplication ratio N / M,
When the A-phase signal and the B-phase signal are generated based on the frequency-division multiplied data, and the accumulated value of the frequency-division multiplied data reaches the number of one rotation division that determines the timing for outputting the Z-phase signal, Generating a Z-phase signal and resetting the accumulated value of the frequency division multiplied data;
The one-rotation division number is a product of the number of pulses output by the encoder as the position data signal and the division / multiplication ratio N / M during one rotation of the rotating body, and an integer of 4 A method for generating a signal of an encoder device, wherein the signal is doubled.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011282606A JP5925485B2 (en) | 2011-12-26 | 2011-12-26 | Encoder device and signal generation method for encoder device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011282606A JP5925485B2 (en) | 2011-12-26 | 2011-12-26 | Encoder device and signal generation method for encoder device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013134068A JP2013134068A (en) | 2013-07-08 |
JP5925485B2 true JP5925485B2 (en) | 2016-05-25 |
Family
ID=48910873
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011282606A Active JP5925485B2 (en) | 2011-12-26 | 2011-12-26 | Encoder device and signal generation method for encoder device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5925485B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016004013A (en) * | 2014-06-19 | 2016-01-12 | 日本電産サンキョー株式会社 | Absolute encoder and method for transmitting rotational position data |
CN105600573B (en) * | 2015-12-28 | 2017-06-16 | 长沙奥托自动化技术有限公司 | A kind of folding machine servo automatically controlled knife system of position-sensor-free |
CN114199286A (en) * | 2021-10-26 | 2022-03-18 | 苏州申恩电子科技有限公司 | Incremental electromagnetic encoder |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3074484B2 (en) * | 1990-04-10 | 2000-08-07 | 甲賀電子株式会社 | Pulse generating method and apparatus |
JP3241138B2 (en) * | 1993-01-25 | 2001-12-25 | 三菱重工業株式会社 | Absolute encoder output signal abnormality detection method |
JPH06288791A (en) * | 1993-04-05 | 1994-10-18 | Sankyo Seiki Mfg Co Ltd | Encoder device |
JPH07218289A (en) * | 1994-02-09 | 1995-08-18 | Yokogawa Electric Corp | Encoder system |
JP3246583B2 (en) * | 1994-10-27 | 2002-01-15 | 沖電気工業株式会社 | Magnetic recording medium writing method and apparatus |
JPH08261791A (en) * | 1995-03-24 | 1996-10-11 | Olympus Optical Co Ltd | Encoder signal transmission circuit |
JP2000213924A (en) * | 1999-01-20 | 2000-08-04 | Takashi Katagiri | Position detecting device |
JP2000213960A (en) * | 1999-01-26 | 2000-08-04 | Olympus Optical Co Ltd | Controller |
JP2001085979A (en) * | 1999-09-13 | 2001-03-30 | Soshiodaiya Systems Kk | Pulse distributor, pulse distribution method and recording medium |
JP4212372B2 (en) * | 2003-01-29 | 2009-01-21 | 株式会社ハーモニック・ドライブ・システムズ | Encoder signal processing device and servo driver |
JP4953589B2 (en) * | 2005-05-25 | 2012-06-13 | 株式会社ミツトヨ | Method and apparatus for generating origin signal of encoder |
JP2008076382A (en) * | 2006-08-25 | 2008-04-03 | Yaskawa Electric Corp | Serial encoder data conversion circuit, and servo drive system |
JP4682968B2 (en) * | 2006-11-14 | 2011-05-11 | パナソニック株式会社 | Encoder position information interpolation circuit |
JP2010019676A (en) * | 2008-07-10 | 2010-01-28 | Ono Sokki Co Ltd | Comparator circuit, encoder, combustion analyzing system, and method for controlling comparator circuit |
JP2011058891A (en) * | 2009-09-08 | 2011-03-24 | Olympus Corp | Optical encoder |
JP5358367B2 (en) * | 2009-09-15 | 2013-12-04 | 日本電産サンキョー株式会社 | Encoder system |
-
2011
- 2011-12-26 JP JP2011282606A patent/JP5925485B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013134068A (en) | 2013-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
ES2732551T3 (en) | Absolute encoder | |
US8803510B2 (en) | Rotation detecting device and bearing having rotation detecting device | |
JP6484008B2 (en) | Encoder and rotation angle position calculation method | |
EP3161420B1 (en) | Rotation angle measuring apparatus and measuring method | |
CN108351197B (en) | Angle detection device and electric power steering device | |
JP2007155627A (en) | Encoder count error detecting circuit and encoder count error detecting method | |
CN109546808B (en) | Steering engine and method for reducing virtual position of steering engine | |
JP4142607B2 (en) | Variable reluctance resolver | |
CN105841603A (en) | Semiconductor device | |
JP2011033602A (en) | Resolver/digital converter, and resolver/digital conversion method | |
JP5925485B2 (en) | Encoder device and signal generation method for encoder device | |
JP2006226816A (en) | Rotation angle detector | |
US10921767B2 (en) | Encoder system | |
JP5358367B2 (en) | Encoder system | |
JP2008128962A (en) | Absolute angle detector | |
JP4782434B2 (en) | Rotation detection device signal processing device | |
JP6406114B2 (en) | Brushless motor | |
US20130013250A1 (en) | Absolute position detector with abnormality detection function | |
JP6201910B2 (en) | Rotation detection sensor and manufacturing method thereof | |
JPH0854205A (en) | Rotational position detector for electric rotating | |
Ismail et al. | Integrally accurate resolver-to-digital converter (RDC) | |
JP2016031332A (en) | Capacitance type angle detecting device | |
JP2008064699A (en) | Motor speed detector | |
JP5886608B2 (en) | Wheel rotation angle detection device | |
JPH0125287Y2 (en) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141107 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150929 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20151002 |
|
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: 20160331 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160420 |
|
R150 | Certificate of patent (=grant) or registration of utility model |
Ref document number: 5925485 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |