JP2008148504A - Motor control unit, motor control system and arithmetic processing method for controlling motor control unit - Google Patents

Motor control unit, motor control system and arithmetic processing method for controlling motor control unit Download PDF

Info

Publication number
JP2008148504A
JP2008148504A JP2006335011A JP2006335011A JP2008148504A JP 2008148504 A JP2008148504 A JP 2008148504A JP 2006335011 A JP2006335011 A JP 2006335011A JP 2006335011 A JP2006335011 A JP 2006335011A JP 2008148504 A JP2008148504 A JP 2008148504A
Authority
JP
Japan
Prior art keywords
position data
count value
motor
input
counter
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.)
Pending
Application number
JP2006335011A
Other languages
Japanese (ja)
Inventor
Kazuhiro Hamasuna
和博 浜砂
Mitsunori Kuzushima
光則 葛島
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric 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 Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP2006335011A priority Critical patent/JP2008148504A/en
Publication of JP2008148504A publication Critical patent/JP2008148504A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To obtain position data in inputting an external signal with a small number of hardware elements. <P>SOLUTION: A motor control unit (1) includes: a motor driving circuit (11); a receiving circuit (12) for generating position data by receiving the detection signal of an encoder; a counter (13) for counting a first clock signal and receiving a second clock signal at a low frequency to output a counter value; and a CPU (10) for performing arithmetic processing for controlling a motor and synchronizing with the second clock signal to output a command. When the external signal Sd is input, the counter outputs a count value Nx in inputting the external signal. The CPU (10) obtains the position data Px in inputting the external signal from the count value Nx in inputting the external signal output from the counter, a count value N0 output by the counter immediately before inputting the external signal Sd, position data P0 at that time, a count value N1 output immediately after receiving external input and position data P1 at that time. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、エンコーダを備えたモータの回転位置を制御するモータ制御装置に関し、とくに、外部信号を入力した時点の回転位置を位置制御に使用するモータ制御装置に関する。   The present invention relates to a motor control device that controls the rotational position of a motor equipped with an encoder, and more particularly to a motor control device that uses the rotational position at the time when an external signal is input for position control.

モータ回転を動力に使用するスライダなどで位置制御を行う場合、位置検出スイッチなどの外部信号を利用してスライダの物理的な位置を求めて位置制御に使用することが考えられる。
シリアルエンコーダを備えたモータを制御する従来のモータ制御装置は、エンコーダのシリアルデータを受信する受信回路の中に、シリアルデータを受信して位置データ(カウントデータのこと)に変換する回路と、エンコーダのカウントデータを模擬するアップダウンカウンタと、アップダウンカウンタのカウントデータをキャプチャするキャプチャ回路を内蔵している。そして、カウントデータを前記アップダウンカウンタにプリセットし、今回受信したカウントデータと前回までに受信したカウントデータの変化分から計算した周波数と方向によって前記アップダウンカウンタのカウントデータを変化させて実時間のカウントデータの推定値を導出しており、前記キャプチャ回路を使用して外部事象に同期したタイミングで前記アップダウンカウンタのカウントデータをキャプチャしている(特許文献1参照)。
このように、シリアルエンコーダを備えた従来のモータ制御装置は、外部信号が入力された位置を推定し、検出するために、複数の回路とハードウェア素子を使用しているのである。
特開2001−82983号公報(第2−4頁、図1)
When position control is performed using a slider or the like that uses motor rotation as power, it is conceivable that the physical position of the slider is obtained using an external signal such as a position detection switch and used for position control.
A conventional motor control device that controls a motor having a serial encoder includes a circuit that receives serial data and converts it into position data (count data) in a receiving circuit that receives serial data of the encoder, and an encoder It incorporates an up / down counter that simulates the count data and a capture circuit that captures the count data of the up / down counter. The count data is preset in the up / down counter, and the count data of the up / down counter is changed according to the frequency and direction calculated from the count data received this time and the change in the count data received up to the previous time. An estimated value of data is derived, and count data of the up / down counter is captured at a timing synchronized with an external event using the capture circuit (see Patent Document 1).
As described above, the conventional motor control device including the serial encoder uses a plurality of circuits and hardware elements in order to estimate and detect the position where the external signal is input.
Japanese Patent Laid-Open No. 2001-82983 (page 2-4, FIG. 1)

ところが従来のモータ制御装置の場合、特許文献1の図1に示されているように、外部信号が入力された時点の位置を推定検出するには、複数の回路とハードウェア素子が必要となり、それだけ費用がかかるというような問題があった。
本発明はこのような問題点に鑑みてなされたものであり、シリアルエンコーダを備えたモータの位置を制御するモータ制御装置において、外部信号入力時の位置データを少ないハードウェア素子で求めることができ、その位置データに基づいてモータの位置を制御するモータ制御装置を提供することを目的とする。
However, in the case of a conventional motor control device, as shown in FIG. 1 of Patent Document 1, a plurality of circuits and hardware elements are required to estimate and detect the position at the time when an external signal is input. There was a problem that it was expensive.
The present invention has been made in view of such problems, and in a motor control device that controls the position of a motor equipped with a serial encoder, position data at the time of external signal input can be obtained with a small number of hardware elements. An object of the present invention is to provide a motor control device that controls the position of the motor based on the position data.

上記問題を解決するため、本発明は、次のようにしたのである。
第1の発明は、モータに電流を供給して駆動するモータ駆動回路と、モータの位置を検出するエンコーダの検出信号を受信して位置データを生成する受信回路と、第1クロック信号をカウントすると共に第1クロック信号より低周波の第2クロック信号をうけてカウント値を出力するカウンタと、位置指令と位置データを入力するとモータの制御演算処理をして第2クロック信号に同期してモータ駆動回路に指令を出力するCPUと、からなるモータ制御装置において、カウンタは、外部信号Sdを入力するとその時のカウント値である外部信号入力時カウント値Nxを出力し、CPUは、カウンタが出力した外部信号入力時カウント値Nxと、外部信号Sdを入力する直前にカウンタが出力したカウント値N0およびそのときの位置データP0と、外部入力を受けた直後に出力したカウント値N1およびそのときの位置データP1とから、外部信号入力時の位置データPxを求め、その位置データPxを基準位置としてモータの制御演算処理をすることを特徴としており、また、外部信号入力時の位置データPxは次の何れかの式で求められることを特徴としている。
Px=P1−(P1−P0)(N1−Nx)/(N1−N0) (1)
Px=P0+(P1−P0)(Nx−N0)/(N1−N0) (2)
ただし、N0:カウンタの前回カウント値
N1:カウンタの今回カウント値
Nx:カウンタの外部信号入力時のカウント値
P0:前回位置データ
P1:今回位置データ
Px:外部信号入力時の位置データ
第2の発明は、第1の発明においてエンコーダが位置を検出してから受信回路が検出信号を受信するまで通信遅れの時間が考慮されたことを特徴としている。
第3の発明は、エンコーダの信号がシリアルデータであり、そのシリアルデータを入力した受信回路はCPUが取り込める形式の位置データに変換して出力することを特徴としている。
第4の発明は、第1ないし第3の発明のモータ制御装置と、このモータ制御装置によって駆動されるモータと、モータの回転位置を検出してモータ制御装置に出力するエンコーダと、からなることを特徴としている。
In order to solve the above problem, the present invention is as follows.
According to a first aspect of the present invention, there is provided a motor drive circuit for supplying current to a motor for driving, a receiving circuit for receiving a detection signal of an encoder for detecting the position of the motor to generate position data, and a first clock signal. In addition, a counter that outputs a second clock signal having a frequency lower than that of the first clock signal, and a position command and position data are input to perform motor control calculation processing and drive the motor in synchronization with the second clock signal. In a motor control device comprising a CPU that outputs a command to a circuit, when the external signal Sd is input, the counter outputs a count value Nx at the time of external signal input that is a count value at that time, and the CPU outputs an external signal output by the counter The count value Nx at the time of signal input, the count value N0 output by the counter immediately before the external signal Sd is input, and the position data P at that time The position data Px at the time of external signal input is obtained from 0, the count value N1 output immediately after receiving the external input and the position data P1 at that time, and the motor control calculation processing is performed using the position data Px as a reference position. In addition, the position data Px at the time of external signal input is obtained by one of the following formulas.
Px = P1- (P1-P0) (N1-Nx) / (N1-N0) (1)
Px = P0 + (P1-P0) (Nx-N0) / (N1-N0) (2)
However, N0: the previous count value of the counter
N1: Current count value of the counter
Nx: Count value when an external signal is input to the counter
P0: Previous position data
P1: Current position data
Px: Position data when an external signal is input. The second invention is characterized in that in the first invention, a communication delay time is taken into account after the encoder detects the position until the receiving circuit receives the detection signal. .
The third invention is characterized in that the signal of the encoder is serial data, and the receiving circuit to which the serial data is input converts the position data into a format that can be captured by the CPU and outputs it.
4th invention consists of the motor control apparatus of 1st thru | or 3rd invention, the motor driven by this motor control apparatus, and the encoder which detects the rotational position of a motor and outputs it to a motor control apparatus. It is characterized by.

第1ないし第4の発明によると、外部信号Sdを入力するとその時の外部信号入力時カウント値Nxをカウンタが出力し、カウンタが出力した外部信号入力時カウント値Nxと、外部信号を入力する直前にカウンタが出力したカウント値N0およびそのときの位置データP0と、外部信号を受けた直後に出力したカウント値N1およびそのときの位置データP1とから、外部信号入力時の位置データPxを求めているので従来のモータ制御装置に比べて回路やハードウェア素子を少なくすることができ、装置を安価にすることができるという効果がある。   According to the first to fourth inventions, when the external signal Sd is input, the counter outputs the count value Nx when the external signal is input at that time, immediately before the external signal input count value Nx output by the counter and the external signal is input. The position data Px at the time of external signal input is obtained from the count value N0 output by the counter and the position data P0 at that time and the count value N1 output immediately after receiving the external signal and the position data P1 at that time. As a result, the number of circuits and hardware elements can be reduced as compared with the conventional motor control apparatus, and the apparatus can be made inexpensive.

以下、本発明の方法の具体的実施例について、図に基づいて説明する。   Hereinafter, specific examples of the method of the present invention will be described with reference to the drawings.

図1は、本発明のモータ制御装置の構成を説明する図である。図において、1は本発明のモータ制御装置であり、2はモータ制御装置1が駆動するモータ、3はモータ2の回転位置検出用のシリアルエンコーダである。また10はモータ制御の演算を行うCPUであり、11はCPU10の演算結果に従ってモータ2に電流を印加するモータ駆動回路、12はシリアルエンコーダ3から伝送されるシリアルデータを受信してCPU10に入力できる形式の位置データPを作成して出力する受信回路、13は水晶振動子14のクロック信号Cを受けて第1クロック信号Ccと第2クロック信号Coを生成し、第1クロック信号Ccをカウントして第2クロック信号Coに同期してカウント値Nを出力するカウンタ、14はCPU10とカウンタ13にクロック信号Cを供給する水晶発振子である。モータ制御回路11には公知のものが使われる。第1クロック信号Ccは水晶振動子14のクロック信号Cを元にして分周するなどして得られ、クロック信号Cより低周波数である。同様に第2クロック信号Coは第1クロック信号Ccを元にして分周するなどして得られ、第1クロック信号Ccより低周波数である。図示していないが、第1クロック信号Ccと第2クロック信号CoはCPU10にも出力されている。
このように本発明のモータ制御装置は、CPU10とモータ駆動回路11、受信回路12、カウンタ13、水晶発振子14から構成されている。図中のカウンタ13は16bitあるいは32bitなどの決められたデータ長を持っており、第2クロック信号Coに同期してカウント値Nを出力するほか、外部信号Sdを入力したときもカウント値Nを出力するようになっている。
本発明のモータ制御装置が従来のモータ制御装置と異なるのは、シリアルエンコーダ3から伝送されるシリアルデータを受信してCPU10に入力できる形式の位置データPに変換して出力する受信回路12と、上記のような機能を備えたカウンタ13が、外部信号入力時の位置データを検出するために備えられた点である。このため従来のモータ制御装置に比べて使用するハードウェア素子が少なくなっている。
FIG. 1 is a diagram illustrating a configuration of a motor control device according to the present invention. In the figure, 1 is a motor control device of the present invention, 2 is a motor driven by the motor control device 1, and 3 is a serial encoder for detecting the rotational position of the motor 2. Reference numeral 10 denotes a CPU that performs motor control calculations, 11 a motor drive circuit that applies current to the motor 2 according to the calculation results of the CPU 10, and 12 can receive serial data transmitted from the serial encoder 3 and input it to the CPU 10. A receiving circuit 13 that generates and outputs position data P in a format, receives a clock signal C of the crystal resonator 14, generates a first clock signal Cc and a second clock signal Co, and counts the first clock signal Cc The counter 14 outputs a count value N in synchronization with the second clock signal Co, and 14 is a crystal oscillator that supplies the clock signal C to the CPU 10 and the counter 13. A known motor control circuit 11 is used. The first clock signal Cc is obtained by frequency division based on the clock signal C of the crystal resonator 14 and has a lower frequency than the clock signal C. Similarly, the second clock signal Co is obtained by frequency division based on the first clock signal Cc and has a lower frequency than the first clock signal Cc. Although not shown, the first clock signal Cc and the second clock signal Co are also output to the CPU 10.
As described above, the motor control device of the present invention includes the CPU 10, the motor driving circuit 11, the receiving circuit 12, the counter 13, and the crystal oscillator 14. The counter 13 in the figure has a predetermined data length such as 16 bits or 32 bits, and outputs a count value N in synchronization with the second clock signal Co. In addition, the counter 13 also outputs the count value N when an external signal Sd is input. It is designed to output.
The motor control device of the present invention is different from the conventional motor control device in that the receiving circuit 12 receives serial data transmitted from the serial encoder 3 and converts it into position data P in a format that can be input to the CPU 10, and outputs it. The counter 13 having the above function is provided for detecting position data when an external signal is input. For this reason, fewer hardware elements are used compared to conventional motor control devices.

このようなモータ制御装置が動作するときは次のようになる。モータ制御装置1がモータ2を駆動している時、シリアルエンコーダ3はモータ2の回転位置を検出してシリアルデータを出力し、モータ制御装置1に伝送する。このシリアルデータを受信回路12が受信すると、CPU10が取込むことができる形式の位置データPを作成して出力する。受信回路12が出力して第2クロック信号に同期してCPU10に入力されたこの位置データPは制御演算処理に使用される。CPU10は第2クロック信号Coに同期して出力されたカウンタ13のカウント値を、そのときの位置データPとともに次の第2クロック信号Coに同期して出力されるカウンタ13のカウント値が入力されるまで保持する。
次に図2と図3を用いて外部信号Sdが入力されたときの位置データPxを算出する方法について説明する。
When such a motor control device operates, it is as follows. When the motor control device 1 is driving the motor 2, the serial encoder 3 detects the rotational position of the motor 2, outputs serial data, and transmits it to the motor control device 1. When the receiving circuit 12 receives this serial data, it creates and outputs position data P in a format that the CPU 10 can capture. The position data P output from the receiving circuit 12 and input to the CPU 10 in synchronization with the second clock signal is used for control calculation processing. The CPU 10 receives the count value of the counter 13 output in synchronization with the second clock signal Co, and the count value of the counter 13 output in synchronization with the next second clock signal Co together with the position data P at that time. Hold until
Next, a method for calculating the position data Px when the external signal Sd is input will be described with reference to FIGS.

図2は、第1クロック信号Ccと第2クロック信号Co、外部信号Sdおよび時間等の関係を示すチャートである。この図の例では、時刻t1と時刻t2で第2クロック信号がLoからHiになっており、時刻t1におけるカウンタ13のカウント値がN0、そのときにCPU10が受信回路12から受け取った位置データがP0であり、時刻t2におけるカウンタ13のカウント値がN1、そのときにCPU10が受信回路12から受け取った位置データがP1であり、時刻t1と時刻t2の間にある時刻txと時刻tx’の間に外部信号Sdが入力されている状況を示している。時刻txと時刻tx’は第1クロック信号Ccに同期した時刻である。   FIG. 2 is a chart showing the relationship between the first clock signal Cc, the second clock signal Co, the external signal Sd, time, and the like. In the example of this figure, the second clock signal changes from Lo to Hi at time t1 and time t2, the count value of the counter 13 at time t1 is N0, and the position data received by the CPU 10 from the receiving circuit 12 at that time is P0, the count value of the counter 13 at time t2 is N1, the position data received by the CPU 10 from the receiving circuit 12 at that time is P1, and between time tx and time tx ′ between time t1 and time t2. Shows a state in which an external signal Sd is input. Time tx and time tx ′ are times synchronized with the first clock signal Cc.

図3は、時刻txと時刻tx’の間で外部信号Sdを受けた時点の位置データPxを求める方法を説明する図である。横軸はカウンタ13のカウント値を示す軸であり時間軸でもある。縦軸は位置データを示す軸である。図2の説明から、カウンタ13のカウント値がN0からN1まで、すなわち時刻t1から時刻t2までは位置データがP0であり、カウンタ13のカウント値がN1以降すなわち時刻t2以降は位置データがP1となって階段状になっている。時刻t1〜t2間が一定であるので、図の(N0、P0)と(N1、P1)を結ぶ破線を引き、時刻txすなわちカウント値Nxの交点を求めれば位置データPxを得ることができる。図3によると、Pxは(1)または(2)式によって算出することができる。
Px=P0+(P1−P0)(Nx−N0)/(N1−N0) (1)
Px=P1−(P1−P0)(N1−Nx)/(N1−N0) (2)
ここで、N1は時刻t2におけるカウンタ13のカウント値、
N0は時刻t1におけるカウンタ13のカウント値、
Nxは時刻txにおけるカウンタ13のカウント値、
P1は時刻t2においてCPU10に入力された位置データ、
P0は時刻t1においてCPU10に入力された位置データ、である。
この式からわかるように、カウント値N1、N0、Nxから、制御演算周期に対する外部信号Sd入力時の時間的割合を演算し、位置データP1、P0の差分にその時間的割合を乗じたものを位置データP1から減じるか、あるいは位置データP0に加算して外部信号入力時の位置データを導出している。このようにして外部信号入力時の位置Pxを推定検出することができる。
FIG. 3 is a diagram illustrating a method for obtaining the position data Px at the time when the external signal Sd is received between the time tx and the time tx ′. The horizontal axis is an axis indicating the count value of the counter 13 and is also a time axis. The vertical axis is an axis indicating position data. From the description of FIG. 2, the position data is P0 when the count value of the counter 13 is from N0 to N1, that is, from time t1 to time t2, and the position data is P1 after the count value of the counter 13 is after N1, that is, after time t2. It has become a staircase. Since the time between t1 and t2 is constant, the position data Px can be obtained by drawing the broken line connecting (N0, P0) and (N1, P1) in the figure and obtaining the intersection of the time tx, that is, the count value Nx. According to FIG. 3, Px can be calculated by the equation (1) or (2).
Px = P0 + (P1-P0) (Nx-N0) / (N1-N0) (1)
Px = P1- (P1-P0) (N1-Nx) / (N1-N0) (2)
Here, N1 is the count value of the counter 13 at time t2,
N0 is the count value of the counter 13 at time t1,
Nx is the count value of the counter 13 at time tx,
P1 is the position data input to the CPU 10 at time t2,
P0 is the position data input to the CPU 10 at time t1.
As can be seen from this equation, the time ratio when the external signal Sd is input with respect to the control calculation cycle is calculated from the count values N1, N0, Nx, and the difference between the position data P1, P0 is multiplied by the time ratio. The position data at the time of external signal input is derived by subtracting from the position data P1 or adding to the position data P0. In this way, the position Px at the time of external signal input can be estimated and detected.

次に第2のモータ制御装置について説明する。第2のモータ制御装置は図1に示した第1のモータ制御装置と同じ構成であるが、CPU10の処理方法が少し異なっている。
図4はシリアルエンコーダ3がモータ2の位置を検出してから受信回路12がシリアルデータを受信するまでの間に通信遅れがある場合の図3に対応する図であり、図3と同様に、カウンタ13が外部信号Sdを入力した時の位置データPxを求める方法を説明する図である。上半分は縦軸と横軸が図3と同じになっており、下半分に時間軸が追加されている。
この図において、時刻t1における第2クロック信号Coの立ち上がりでカウントしたカウンタ13のカウント値がN0、CPU10が受信回路12から入力した位置データがP0であり、時刻t2における第2クロック信号Coの立ち上がりでカウントしたカウンタ13のカウント値がN1、CPU10が受信回路12から入力した位置データがP1である。シリアルエンコーダ3から受信回路12までの間の伝送遅れをtdとすれば、外部信号Sdを入力した時刻txのときの位置データPxは、時刻txから時間td経過して受信回路12が受信してCPU10に位置データPを出力するので、時刻txから時間td経過した時点のカウンタ13のカウント値はPxになる。
したがって、伝送遅れを考慮したときの外部信号Sdが入力されたときの位置データPxは次のいずれかの式によって求めることができる。
Px=P1−(P1−P0)(N1−Nx−Nd)/(N1−N0) (3)
Px=P0+(P1−P0)(Nx−N0+Nd)/(N1−N0) (4)
ここで、Ndはシリアルエンコーダ3から受信回路12までの伝送遅れ時間に相当するカウンタ13のカウント値であり、その他は実施例1で述べたものと同じである。
この何れかの式によって、シリアル通信の遅れを補償した外部信号入力時の位置Pxを推定検出することができる。
Next, the second motor control device will be described. The second motor control device has the same configuration as the first motor control device shown in FIG. 1, but the processing method of the CPU 10 is slightly different.
FIG. 4 is a diagram corresponding to FIG. 3 in the case where there is a communication delay between the time when the serial encoder 3 detects the position of the motor 2 and the time when the receiving circuit 12 receives the serial data. It is a figure explaining the method of calculating | requiring the position data Px when the counter 13 inputs the external signal Sd. In the upper half, the vertical axis and the horizontal axis are the same as in FIG. 3, and the time axis is added to the lower half.
In this figure, the count value of the counter 13 counted at the rising edge of the second clock signal Co at time t1 is N0, the position data input from the receiving circuit 12 by the CPU 10 is P0, and the rising edge of the second clock signal Co at time t2. The count value of the counter 13 counted in step N1 is N1, and the position data input from the receiving circuit 12 by the CPU 10 is P1. If the transmission delay between the serial encoder 3 and the receiving circuit 12 is td, the position data Px at the time tx when the external signal Sd is input is received by the receiving circuit 12 after the time td from the time tx. Since the position data P is output to the CPU 10, the count value of the counter 13 when the time td has elapsed from the time tx becomes Px.
Therefore, the position data Px when the external signal Sd when the transmission delay is taken into consideration can be obtained by one of the following equations.
Px = P1- (P1-P0) (N1-Nx-Nd) / (N1-N0) (3)
Px = P0 + (P1-P0) (Nx-N0 + Nd) / (N1-N0) (4)
Here, Nd is the count value of the counter 13 corresponding to the transmission delay time from the serial encoder 3 to the receiving circuit 12, and the others are the same as those described in the first embodiment.
The position Px at the time of external signal input in which serial communication delay is compensated can be estimated and detected by any of these equations.

このように、第2クロック信号Coの立ち上がりとその次の立ち上がりの間に入力された外部信号Sdの時間的な内分比率に応じて、第2クロック信号Coの立ち上がりとその次の立ち上がりの時点の位置データを用いて外部信号Sdの入力時の位置データPxを求めているので、用いる回路が受信回路12とカウンタ13だけでよく、従来技術に比べてハードウェア素子を削減してモータ制御装置を安価にすることができるのである。   As described above, the second clock signal Co rises and the next rise time point according to the temporal internal ratio of the external signal Sd input between the rise of the second clock signal Co and the next rise. Since the position data Px at the time of the input of the external signal Sd is obtained using the position data of the motor, the circuit to be used is only the receiving circuit 12 and the counter 13, and the motor control device is obtained by reducing the hardware elements compared with the prior art. Can be made inexpensive.

なお、上記の説明ではクロック信号Cから第1クロック信号Ccと第2クロック信号Coをカウンタ13が作り出していたが、その機能を水晶発信子14に持たせ、カウンタ13とCPU10に第1クロック信号Ccと第2クロック信号Coを出力してもよい。   In the above description, the counter 13 generates the first clock signal Cc and the second clock signal Co from the clock signal C. However, the function is provided to the crystal oscillator 14 so that the counter 13 and the CPU 10 have the first clock signal. Cc and the second clock signal Co may be output.

本発明の実施例を示すモータ制御装置のブロック図The block diagram of the motor control apparatus which shows the Example of this invention 本発明の第1実施例の動作を示すタイムチャート図The time chart which shows operation | movement of 1st Example of this invention. 本発明の第1実施例の演算を説明する図The figure explaining the calculation of 1st Example of this invention 本発明の第2実施例の演算を説明する図The figure explaining the calculation of 2nd Example of this invention

符号の説明Explanation of symbols

1 モータ制御装置 2 モータ 3 エンコーダ
10 CPU 11 モータ駆動回路 12 受信回路
13 カウンタ 14 水晶発振子
DESCRIPTION OF SYMBOLS 1 Motor control apparatus 2 Motor 3 Encoder 10 CPU 11 Motor drive circuit 12 Reception circuit 13 Counter 14 Crystal oscillator

Claims (9)

モータに電流を供給して駆動するモータ駆動回路と、
前記モータの位置を検出するエンコーダの検出信号を受信して位置データを生成する受信回路と、
第1クロック信号をカウントすると共に前記第1クロック信号より低周波の第2クロック信号をうけてカウント値を出力するカウンタと、
位置指令と前記位置データを入力すると前記モータの制御演算処理をして前記第2クロック信号に同期して前記モータ駆動回路に指令を出力するCPUと、
からなるモータ制御装置において、
前記カウンタは、外部信号Sdを入力するとその時のカウント値である外部信号入力時カウント値Nxを出力し、
前記CPUは、前記カウンタが出力した前記外部信号入力時カウント値Nxと、前記外部信号Sdを入力する直前に前記カウンタが出力したカウント値N0およびそのときの位置データP0と、前記外部入力を受けた直後に出力したカウント値N1およびそのときの位置データP1とから、前記外部信号入力時の位置データPxを求め、その位置データPxを基準位置として前記モータの制御演算処理をすることを特徴とするモータ制御装置。
A motor drive circuit for supplying current to the motor for driving;
A receiving circuit that receives a detection signal of an encoder that detects the position of the motor and generates position data;
A counter for counting a first clock signal and receiving a second clock signal having a frequency lower than that of the first clock signal and outputting a count value;
A CPU that outputs a command to the motor drive circuit in synchronization with the second clock signal by performing a control calculation process of the motor when a position command and the position data are input;
In the motor control device consisting of
When the external signal Sd is input, the counter outputs a count value Nx at the time of external signal input, which is a count value at that time,
The CPU receives the external signal input count value Nx output from the counter, the count value N0 output by the counter immediately before the external signal Sd is input, the position data P0 at that time, and the external input. The position data Px at the time of external signal input is obtained from the count value N1 output immediately after that and the position data P1 at that time, and the motor control calculation processing is performed using the position data Px as a reference position. Motor control device.
前記外部信号入力時の位置データPxは次の何れかの式で求められることを特徴とする請求項1に記載のモータ制御装置。
Px=P1−(P1−P0)(N1−Nx)/(N1−N0) (1)
Px=P0+(P1−P0)(Nx−N0)/(N1−N0) (2)
ただし、N0:カウンタの前回カウント値
N1:カウンタの今回カウント値
Nx:カウンタの外部信号入力時のカウント値
P0:前回位置データ
P1:今回位置データ
Px:外部信号入力時の位置データ
2. The motor control device according to claim 1, wherein the position data Px at the time of input of the external signal is obtained by any one of the following formulas.
Px = P1- (P1-P0) (N1-Nx) / (N1-N0) (1)
Px = P0 + (P1-P0) (Nx-N0) / (N1-N0) (2)
However, N0: the previous count value of the counter
N1: Current count value of the counter
Nx: Count value when an external signal is input to the counter
P0: Previous position data
P1: Current position data
Px: Position data at the time of external signal input
モータに電流を供給して駆動するモータ駆動回路と、
前記モータの位置を検出するエンコーダの検出信号を受信して位置データを生成する受信回路と、
第1クロック信号をカウントすると共に前記第1クロック信号より低周波の第2クロック信号をうけてカウント値を出力するカウンタと、
位置指令と前記位置データを入力すると前記モータの制御演算処理をして前記第2クロック信号に同期して前記モータ駆動回路に指令を出力するCPUと、
からなるモータ制御装置において、
前記カウンタは、外部信号Sdを入力するとその時のカウント値である外部信号入力時カウント値Nxを出力し、
前記CPUは、前記カウンタが出力した前記外部信号入力時カウント値Nxと、前記外部信号Sdを入力する直前に前記カウンタが出力したカウント値N0およびそのときの位置データP0と、前記外部入力を受けた直後に出力したカウント値N1およびそのときの位置データP1と、前記エンコーダが位置を検出してから前記受信回路が前記検出信号を受信するまでの通信遅れの時間に相当する前記カウンタのカウント値Ndとから、前記外部信号入力時の位置データPxを求め、その位置データPxを基準位置として前記モータの制御演算処理をすることを特徴とするモータ制御装置。
A motor drive circuit for supplying current to the motor for driving;
A receiving circuit that receives a detection signal of an encoder that detects the position of the motor and generates position data;
A counter for counting a first clock signal and receiving a second clock signal having a frequency lower than that of the first clock signal and outputting a count value;
A CPU that outputs a command to the motor drive circuit in synchronization with the second clock signal by performing a control calculation process of the motor when a position command and the position data are input;
In the motor control device consisting of
When the external signal Sd is input, the counter outputs a count value Nx at the time of external signal input, which is a count value at that time,
The CPU receives the external signal input count value Nx output from the counter, the count value N0 output by the counter immediately before the external signal Sd is input, the position data P0 at that time, and the external input. The count value N1 output immediately after and the position data P1 at that time, and the count value of the counter corresponding to the communication delay time from when the encoder detects the position until the receiving circuit receives the detection signal A motor control device characterized by obtaining position data Px at the time of external signal input from Nd and performing control calculation processing of the motor using the position data Px as a reference position.
前記外部信号入力時の位置データPxは次の何れかの式で求められることを特徴とする請求項3に記載のモータ制御装置。
Px=P1−(P1−P0)(N1−Nx−Nd)/(N1−N0) (3)
Px=P0+(P1−P0)(Nx−N0+Nd)/(N1−N0) (4)
ただし、N0:カウンタの前回カウント値
N1:カウンタの今回カウント値
Nd:シリアル通信の遅れ時間に相当するラッチ機能付きカウンタ13の
カウント値
Nx:カウンタの外部信号入力時のカウント値
P0:前回位置データ
P1:今回位置データ
Px:外部信号入力時の位置データ
4. The motor control device according to claim 3, wherein the position data Px when the external signal is input is obtained by any one of the following expressions.
Px = P1- (P1-P0) (N1-Nx-Nd) / (N1-N0) (3)
Px = P0 + (P1-P0) (Nx-N0 + Nd) / (N1-N0) (4)
However, N0: the previous count value of the counter
N1: Current count value of the counter
Nd: of the counter 13 with a latch function corresponding to the delay time of serial communication
Count value
Nx: Count value when an external signal is input to the counter
P0: Previous position data
P1: Current position data
Px: Position data at the time of external signal input
前記エンコーダの信号がシリアルデータであり、そのシリアルデータを入力した前記受信回路は前記CPUが取り込める形式の位置データに変換して出力することを特徴とする請求項1または3に記載のモータ制御装置。   4. The motor control device according to claim 1, wherein the encoder signal is serial data, and the receiving circuit receiving the serial data converts the position data into a format that can be captured by the CPU and outputs the position data. . 請求項1または3に記載のモータ制御装置と、このモータ制御装置によって駆動されるモータと、前記モータの回転位置を検出して前記モータ制御装置に出力するエンコーダと、からなることを特徴とするモータ制御システム。   The motor control device according to claim 1, a motor driven by the motor control device, and an encoder that detects a rotational position of the motor and outputs the detected rotational position to the motor control device. Motor control system. モータに電流を供給して駆動するモータ駆動回路と、
前記モータの位置を検出するエンコーダの検出信号を受信して位置データを生成する受信回路と、
第1クロック信号をカウントすると共に前記第1クロック信号より低周波の第2クロック信号をうけてカウント値を出力するカウンタと、
位置指令と前記位置データを入力すると前記モータの制御演算処理をして前記第2クロック信号に同期して前記モータ駆動回路に指令を出力するCPUと、
からなるモータ制御装置において、
前記CPUは、
第2クロック信号に同期して出力された前記カウンタの今回カウント値と前回カウント値を内分する外部信号入力時カウント値の内分比率を用い、今回位置データと前回位置データの間を内分して外部信号入力時位置データを求め、
前記位置指令と前記外部信号入力時位置データを用いて前記モータの制御演算処理をする
ことを特徴とするモータ制御装置の制御演算処理方法。
A motor drive circuit for supplying current to the motor for driving;
A receiving circuit that receives a detection signal of an encoder that detects the position of the motor and generates position data;
A counter for counting a first clock signal and receiving a second clock signal having a frequency lower than that of the first clock signal and outputting a count value;
A CPU that outputs a command to the motor drive circuit in synchronization with the second clock signal by performing a control calculation process of the motor when a position command and the position data are input;
In the motor control device consisting of
The CPU
The internal division between the current position data and the previous position data is performed using the internal ratio of the external signal input count value that internally divides the current count value of the counter and the previous count value output in synchronization with the second clock signal. To obtain the position data at the time of external signal input,
A control arithmetic processing method for a motor control device, wherein the motor control arithmetic processing is performed using the position command and the position data when the external signal is input.
モータに電流を供給して駆動するモータ駆動回路と、
前記モータの位置を検出するエンコーダの検出信号を受信して位置データを生成する受信回路と、
第1クロック信号をカウントすると共に前記第1クロック信号より低周波の第2クロック信号をうけてカウント値を出力するカウンタと、
位置指令と前記位置データを入力すると前記モータの制御演算処理をして前記第2クロック信号に同期して前記モータ駆動回路に指令を出力するCPUと、
からなるモータ制御装置において、
前記CPUは、
第2クロック信号に同期して出力された前記カウンタの今回カウント値と前回カウント値を内分する際に外部信号入力時カウント値と通信遅れ時間に相当するカウント値の和を用いて内分比率を求め、
その内分比率によって今回位置データと前回位置データの間を内分して外部信号入力時位置データを求め、
前記位置指令と前記外部信号入力時位置データを用いて前記モータの制御演算処理をする
ことを特徴とするモータ制御装置の制御演算処理方法。
A motor drive circuit for supplying current to the motor for driving;
A receiving circuit that receives a detection signal of an encoder that detects the position of the motor and generates position data;
A counter for counting a first clock signal and receiving a second clock signal having a frequency lower than that of the first clock signal and outputting a count value;
A CPU that outputs a command to the motor drive circuit in synchronization with the second clock signal by performing a control calculation process of the motor when a position command and the position data are input;
In the motor control device consisting of
The CPU
When the current count value and the previous count value of the counter output in synchronization with the second clock signal are internally divided, the internal ratio is calculated by using the sum of the count value corresponding to the communication delay time and the count value at the time of external signal input. Seeking
By dividing the current position data and the previous position data by the internal ratio, the position data at the time of external signal input is obtained,
A control calculation processing method for a motor control device, wherein the motor control calculation processing is performed using the position command and the position data when the external signal is input.
前記通信遅れ時間は、前記エンコーダが位置を検出してから前記受信回路が前記検出信号を受信するまでの時間であることを特徴とする請求項8に記載のモータ制御装置の制御演算処理方法。   9. The control arithmetic processing method of the motor control device according to claim 8, wherein the communication delay time is a time from when the encoder detects a position to when the receiving circuit receives the detection signal.
JP2006335011A 2006-12-12 2006-12-12 Motor control unit, motor control system and arithmetic processing method for controlling motor control unit Pending JP2008148504A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006335011A JP2008148504A (en) 2006-12-12 2006-12-12 Motor control unit, motor control system and arithmetic processing method for controlling motor control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006335011A JP2008148504A (en) 2006-12-12 2006-12-12 Motor control unit, motor control system and arithmetic processing method for controlling motor control unit

Publications (1)

Publication Number Publication Date
JP2008148504A true JP2008148504A (en) 2008-06-26

Family

ID=39608060

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006335011A Pending JP2008148504A (en) 2006-12-12 2006-12-12 Motor control unit, motor control system and arithmetic processing method for controlling motor control unit

Country Status (1)

Country Link
JP (1) JP2008148504A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012252445A (en) * 2011-06-01 2012-12-20 Fuji Electric Co Ltd Positioning device
JP2015002595A (en) * 2013-06-14 2015-01-05 パナソニック株式会社 Motor driver
JP2015002596A (en) * 2013-06-14 2015-01-05 パナソニック株式会社 Motor driver
CN105334869A (en) * 2015-09-18 2016-02-17 广东实联医疗器械有限公司 Universal holder control method
JP2020159992A (en) * 2019-03-28 2020-10-01 株式会社デンソー Detection unit

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012252445A (en) * 2011-06-01 2012-12-20 Fuji Electric Co Ltd Positioning device
JP2015002595A (en) * 2013-06-14 2015-01-05 パナソニック株式会社 Motor driver
JP2015002596A (en) * 2013-06-14 2015-01-05 パナソニック株式会社 Motor driver
CN105334869A (en) * 2015-09-18 2016-02-17 广东实联医疗器械有限公司 Universal holder control method
JP2020159992A (en) * 2019-03-28 2020-10-01 株式会社デンソー Detection unit
JP7172797B2 (en) 2019-03-28 2022-11-16 株式会社デンソー detection unit

Similar Documents

Publication Publication Date Title
US9025712B2 (en) Sensor, clock frequency adjusting system and method thereof
JP2008148504A (en) Motor control unit, motor control system and arithmetic processing method for controlling motor control unit
JP5398826B2 (en) Motor drive control device
KR101431973B1 (en) Apparatus and method detecting ZCP(zero crossing point) of back EMF(electromotive force) in motor driving circuit
KR101821068B1 (en) Programmable controller
CN111312135B (en) Source driver and operation method thereof
JP2011119801A (en) Reader, control method of the same, and program
JP4819707B2 (en) Redundant computing system and computing unit
JP2014154043A (en) Electronic control device and information processor
JP4175226B2 (en) Encoder communication error detection device
JP2015015540A5 (en)
US20060153008A1 (en) Control device and control method capable of external synchronization
JP5383856B2 (en) Transmitter circuit
US9112500B2 (en) Method of outputting positioning pulse by PLC
JP2009169468A (en) Position controller
JP2008219235A (en) System synchronizing method, pwm signal generating device for performing the same, and motor control system provided with the same
JP2008294656A (en) Synchronous protection circuit and its protecting method
JP2007165955A (en) Vertical synchronizing signal generator
JP2007209030A (en) Driver circuit device and driver-driving method
JP2008072164A (en) Transmission device, electric circuit and power consumption stabilizing method
US20140348280A1 (en) Clock-embedded serial data transmission system and clock recovery method
JP2012191304A (en) Synchronous signal processing device and synchronous signal processing method
US9626007B2 (en) Image sensing method, and image sensing apparatus, light source determining system utilizing the image sensing method
JP4926234B2 (en) Signal transmission method in control / monitor signal transmission system
US9467678B2 (en) Image synchronization method and system thereof