JP2009009409A - Host controller, motion controller, motion control device, and synchronous method therefor - Google Patents

Host controller, motion controller, motion control device, and synchronous method therefor Download PDF

Info

Publication number
JP2009009409A
JP2009009409A JP2007170959A JP2007170959A JP2009009409A JP 2009009409 A JP2009009409 A JP 2009009409A JP 2007170959 A JP2007170959 A JP 2007170959A JP 2007170959 A JP2007170959 A JP 2007170959A JP 2009009409 A JP2009009409 A JP 2009009409A
Authority
JP
Japan
Prior art keywords
motion
command
controller
host
synchronous
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
JP2007170959A
Other languages
Japanese (ja)
Inventor
Tadasuke Yumiba
忠輔 弓場
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 JP2007170959A priority Critical patent/JP2009009409A/en
Publication of JP2009009409A publication Critical patent/JP2009009409A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Numerical Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To dispense with the necessity of indicating operation start timing from a host controller to a motion controller, and to drive a motor with no synchronous error by the plurality of motion controllers, based on a command given from the host controller. <P>SOLUTION: The host controller 100 is provided with a synchronous command generating part 115 for generating a synchronous command, and the motion controller 2001 is provided with an ID storage part 2701 for storing a motion controller ID that is a univalent value on a high order network 300, a host command analysis part 2201 for analyzing the synchronous command to generate a synchronous motion command, and a synchronous motion processing part 2601 for executing the synchronous motion command generated by the host command analysis part 2201, while synchronized with other motion controller. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、上位コントローラに接続された複数台のモーションコントローラが同期して動作するモーションコントロール装置およびその同期方法に関する。   The present invention relates to a motion control apparatus in which a plurality of motion controllers connected to a host controller operate synchronously and a synchronization method thereof.

まず、従来のモーションコントロール装置について図を用いて説明する。
図9は従来のモーションコントロール装置のブロック図を示したものである。
図において、9は従来のモーションコントロール装置、100は上位コントローラであり、200i(iは正の整数)は複数台のモーションコントローラ、300は上位ネットワーク、400は同期ネットワーク、500jは複数台のモータ500j(jは正の整数)である。
上位コントローラ100は複数台のモーションコントローラ200iと上位ネットワーク300を介して接続されており、上位ネットワーク300では非同期通信で通信パケットが送受信される。モーションコントローラ200iは同期ネットワーク400を介して複数台のモータ500jと接続されており、同期ネットワーク400により同期通信で通信パケットが送受信される。
上位コントローラ100には指令生成部110と通信処理部120があり、指令生成部110で例えば図10に示すような上位指令を生成し各モーションコントローラ200iへ与えられる。
図10は上位指令の例を示している。
上位指令600には「軌跡の種類」と「軌跡のパラメータ」が格納される。
例えば、直線補間の場合、各モータの目標位置やベクトル方向の速度が上位指令600に格納される。
このように指令生成部110で生成された上位指令600は、通信処理部120によってモーションコントローラ200iへ上位ネットワーク300を通じて送信される。
上位コントローラ100から上位指令600を受け取ったモーションコントローラ200iは、受け取った上位指令600の内容に従って以下で説明するようにして同期ネットワーク400に接続されたモータ500jを駆動する。
First, a conventional motion control apparatus will be described with reference to the drawings.
FIG. 9 shows a block diagram of a conventional motion control apparatus.
In the figure, 9 is a conventional motion control device, 100 is a host controller, 200i (i is a positive integer) is a plurality of motion controllers, 300 is a host network, 400 is a synchronous network, and 500j is a plurality of motors 500j. (J is a positive integer).
The host controller 100 is connected to a plurality of motion controllers 200i via the host network 300, and the host network 300 transmits and receives communication packets by asynchronous communication. The motion controller 200i is connected to a plurality of motors 500j via a synchronous network 400, and communication packets are transmitted and received by the synchronous network 400 through synchronous communication.
The host controller 100 includes a command generation unit 110 and a communication processing unit 120. The command generation unit 110 generates, for example, a host command as shown in FIG. 10 and gives it to each motion controller 200i.
FIG. 10 shows an example of the higher order command.
The host command 600 stores “type of trajectory” and “parameter of trajectory”.
For example, in the case of linear interpolation, the target position of each motor and the speed in the vector direction are stored in the higher order command 600.
The host command 600 generated by the command generator 110 in this way is transmitted by the communication processing unit 120 to the motion controller 200i through the host network 300.
The motion controller 200i that has received the host command 600 from the host controller 100 drives the motor 500j connected to the synchronous network 400 as described below according to the contents of the received host command 600.

そこで、次に、モーションコントローラ200iについて説明する。
モーションコントローラ200iには、上位通信処理部210iと上位指令解析部220iとモーション指令FIFO230iとモーション指令処理部240iと同期通信処理部250iとが備わっている。
まず、上位通信処理部210iは、上位ネットワーク300を介して上位コントローラ100と通信し、上位コントローラ100から上位指令600(図10)を受信する。上位通信処理部210iが受信した上位指令600は上位指令解析部220iへ送られる。
上位指令解析部220iは、上位指令600からモーション指令(図11)を生成する。
図11はモーション指令の例を示している。
モーション指令700には「軌跡の種類」と「軌跡のパラメータ」が含まれる。
例えば、直線補間の場合、各モータの開始位置、終了位置や各モータの速度がモーション指令に含まれる。
このようにして上位指令解析部220iで生成されたモーション指令700は次のモーション指令FIFO230iに格納される。モーション指令FIFO230iでは、モーション指令が先入れ先出し方式で管理されている。
モーション指令処理部240iは同期通信処理部250iから定周期で起動される。
Therefore, next, the motion controller 200i will be described.
The motion controller 200i includes a host communication processing unit 210i, a host command analysis unit 220i, a motion command FIFO 230i, a motion command processing unit 240i, and a synchronous communication processing unit 250i.
First, the host communication processing unit 210i communicates with the host controller 100 via the host network 300 and receives the host command 600 (FIG. 10) from the host controller 100. The upper command 600 received by the upper communication processing unit 210i is sent to the upper command analysis unit 220i.
The higher order command analysis unit 220i generates a motion command (FIG. 11) from the higher order command 600.
FIG. 11 shows an example of a motion command.
The motion command 700 includes “type of trajectory” and “parameter of trajectory”.
For example, in the case of linear interpolation, the start position and end position of each motor and the speed of each motor are included in the motion command.
The motion command 700 generated by the upper command analysis unit 220i in this way is stored in the next motion command FIFO 230i. In the motion command FIFO 230i, the motion command is managed by a first-in first-out method.
The motion command processing unit 240i is activated from the synchronous communication processing unit 250i at regular intervals.

モーション指令処理部240iの処理フローを図12に示す。
モーション指令処理部240i(図9)が起動されると、まず、モーション指令FIFO230iが空かどうかチェックする(S100)。
モーション指令FIFO230iが空の場合、モーション指令処理部240iは何も処理をせずに終了する。モーション指令FIFO230iが空でない場合、S110を実行する。
S110では、モーション指令FIFO230iの先頭に格納されたモーション指令700(図11)を参照し、モータ500jに対する時々刻々の指令値を算出する。
算出されたモータ500jに対する時々刻々の指令値は、同期通信処理部250iを介して同期ネットワーク上に送出される(S120)。
次に、モーション指令FIFO230iの先頭に格納されたモーション指令が最後まで実行されたか確認する(S130)。
モーション指令が最後まで実行された場合、モーション指令FIFO230iの先頭に格納されたモーション指令をモーション指令FIFO230iから削除する(S140)。
モーション指令FIFO230iからモーション指令が削除されると、次のモーション指令がモーション指令FIFO230iの先頭に設定される。
モーション指令処理部240iが次回起動されると、モーション指令FIFO230iの先頭に新しく設定されたモーション指令700が実行される。
The processing flow of the motion command processing unit 240i is shown in FIG.
When the motion command processing unit 240i (FIG. 9) is activated, it is first checked whether or not the motion command FIFO 230i is empty (S100).
When the motion command FIFO 230i is empty, the motion command processing unit 240i ends without performing any processing. If the motion command FIFO 230i is not empty, S110 is executed.
In S110, referring to the motion command 700 (FIG. 11) stored at the head of the motion command FIFO 230i, the command value for the motor 500j is calculated every moment.
The calculated command value for the motor 500j is transmitted to the synchronous network via the synchronous communication processing unit 250i (S120).
Next, it is confirmed whether the motion command stored at the head of the motion command FIFO 230i has been executed to the end (S130).
When the motion command is executed to the end, the motion command stored at the head of the motion command FIFO 230i is deleted from the motion command FIFO 230i (S140).
When the motion command is deleted from the motion command FIFO 230i, the next motion command is set at the head of the motion command FIFO 230i.
When the motion command processing unit 240i is activated next time, the motion command 700 newly set at the head of the motion command FIFO 230i is executed.

図13は同期通信処理部250iの機能ブロック図である。
図13において、同期通信処理部250i(図9)は、割り込みハンドラ251i、送信用ダブルバッファ252i、受信用ダブルバッファ253i、通信チップ255iから構成される。
図14は、同期ネットワークの同期フレームと通信周期を示す図である。
同期フレームSfが同期ネットワーク400(図9)上を流れると、同期ネットワーク400の1つの通信周期が始まる。同期フレームSfを起点とし、一定の時間を1つの通信周期Tとし、同期ネットワーク400上では一定の周期Tで通信が行われる。割り込みハンドラ251i(図13)は、同期ネットワーク400に同期フレームが流れた際に起動される。
FIG. 13 is a functional block diagram of the synchronous communication processing unit 250i.
13, the synchronous communication processing unit 250i (FIG. 9) includes an interrupt handler 251i, a transmission double buffer 252i, a reception double buffer 253i, and a communication chip 255i.
FIG. 14 is a diagram illustrating a synchronization frame and a communication cycle of the synchronization network.
When the synchronization frame Sf flows on the synchronization network 400 (FIG. 9), one communication cycle of the synchronization network 400 starts. Communication is performed at a fixed period T on the synchronous network 400, with a fixed time as one communication period T starting from the synchronization frame Sf. The interrupt handler 251i (FIG. 13) is activated when a synchronization frame flows through the synchronization network 400.

図15は、従来の割り込みハンドラの処理手順を示すフローチャートである。
割り込みハンドラ251iが起動されると、まず、送信用ダブルバッファ252iを切り替える(S500)。
次に、通信チップ255iへ送信要求をし(S510)、受信用ダブルバッファ253iを切り替える(S520)。
最後にモーション指令処理部240iを起動する(S530)。
FIG. 15 is a flowchart showing a processing procedure of a conventional interrupt handler.
When the interrupt handler 251i is activated, first, the transmission double buffer 252i is switched (S500).
Next, a transmission request is made to the communication chip 255i (S510), and the reception double buffer 253i is switched (S520).
Finally, the motion command processing unit 240i is activated (S530).

図16は同期通信処理部の送信処理を示す図である。
同期通信処理部250i(図9)にある送信用ダブルバッファ252i(図13)は、書き込み用と読み出し用の2面のバッファを持つ。
図16において、送信用ダブルバッファ252iの書き込み用バッファは、モーション指令処理部240i(図9)がモータ500i(図9)に対する指令値を書き込む際にアクセスされる。
送信用ダブルバッファ252iの読み出し用バッファは、通信チップ255i(図13)が同期ネットワーク400(図9)に通信パケットを送出する際にアクセスされる。割り込みハンドラ251i(図13)が送信用ダブルバッファ252iを切り替えるため、周期tで書き込み用バッファだったバッファは、次の周期t+1で読み出し用バッファとなる。このため、周期tで書き込み用バッファに書き込まれたデータは、周期t+1で読み出し用バッファに移っている。周期t+1では、通信チップ255iが読み出し用バッファからデータを読み出し、同期ネットワーク400上に通信パケットとして送出する。
FIG. 16 is a diagram illustrating transmission processing of the synchronous communication processing unit.
The transmission double buffer 252i (FIG. 13) in the synchronous communication processing unit 250i (FIG. 9) has two buffers for writing and reading.
In FIG. 16, the write buffer of the transmission double buffer 252i is accessed when the motion command processing unit 240i (FIG. 9) writes a command value for the motor 500i (FIG. 9).
The read buffer of the transmission double buffer 252i is accessed when the communication chip 255i (FIG. 13) sends a communication packet to the synchronous network 400 (FIG. 9). Since the interrupt handler 251i (FIG. 13) switches the transmission double buffer 252i, the buffer that has been the write buffer in the cycle t becomes the read buffer in the next cycle t + 1. For this reason, the data written in the write buffer at the cycle t moves to the read buffer at the cycle t + 1. In period t + 1, the communication chip 255i reads data from the read buffer and sends it as a communication packet on the synchronous network 400.

図17は同期通信処理部の受信処理を示す図である。
同期通信処理部250i(図9)にある受信用ダブルバッファ253i(図13)は、書き込み用と読み出し用の2面のバッファを持つ。
図17において、受信用ダブルバッファ253iの書き込み用バッファは、通信チップ255i(図13)が同期ネットワーク400(図9)上の通信パケットを受信する際にアクセスされる。
受信用ダブルバッファ253i(図13)の読み出し用バッファは、モーション指令処理部240i(図9)がモータ500i(図9)からの応答値を読み出す際にアクセスされる。割り込みハンドラ251iが受信用ダブルバッファ253iを切り替えるため、周期tで書き込み用バッファだったバッファは、次の周期t+1で読み出し用バッファとなる。このため、周期tで同期ネットワーク400(図9)から受信した通信パケットは、周期t+1で読み出し用バッファに移っている。周期t+1でモーション指令処理部240iは通信パケットを読み出すことができる。
FIG. 17 is a diagram illustrating a reception process of the synchronous communication processing unit.
The reception double buffer 253i (FIG. 13) in the synchronous communication processing unit 250i (FIG. 9) has two buffers for writing and reading.
In FIG. 17, the write buffer of the reception double buffer 253i is accessed when the communication chip 255i (FIG. 13) receives a communication packet on the synchronous network 400 (FIG. 9).
The read buffer of the reception double buffer 253i (FIG. 13) is accessed when the motion command processing unit 240i (FIG. 9) reads the response value from the motor 500i (FIG. 9). Since the interrupt handler 251i switches the reception double buffer 253i, the buffer that has been the writing buffer in the cycle t becomes the reading buffer in the next cycle t + 1. For this reason, the communication packet received from the synchronous network 400 (FIG. 9) at the period t is moved to the read buffer at the period t + 1. The motion command processing unit 240i can read the communication packet at the cycle t + 1.

図9に示した従来のモーションコントロール装置において、上位コントローラ100が複数台のモーションコントローラ200iを同期させて動作させる場合を考えると、この場合、上位コントローラ100は同期させて動作させたい複数台のモーションコントローラ200iに対して、上位ネットワーク300を介して複数台のモーションコントローラ200iに上位指令を同時に送信する。ここで、上位ネットワーク300は非同期通信であり、通信負荷によって送信されたパケットの到着時間に差異が生じる可能性があった。
また、モーションコントローラ200iに搭載されたCPUの負荷状況によって、上位指令解析部220iの実行が待たされる恐れがある。このため、上位コントローラ100が複数台のモーションコントローラ200iに同時に上位指令を送信しても、それぞれのモーションコントローラ200iがモータ500iに対して同時に指令を開始することは保証できなかった。
これに対して従来技術1では、ある時刻になったらモーション指令を駆動するように、上位コントローラがそれぞれのモーションコントローラに対して指令する方法があったが、この方法では、モーションコントローラの時刻がずれていた場合にモータを駆動するタイミングがずれてしまった。
また、従来技術2ではモーションコントローラの時刻を合わせる技術がある。これだとモーションコントローラの時刻が一致しており、かつ、特定の時刻になったらモーション指令を駆動するように準備すれば、各モーションコントローラがモータを駆動するタイミングは一致する。しかし、モーションコントローラの処理負荷や性能差などの影響により、モーションコントローラが上位コントローラから受け取った指令を一定の時間で処理することは保証できなかった。つまり、あるモーションコントローラは直ちに上位指令を処理できるが、別のモーションコントローラでは上位指令の処理に時間がかかってしまう可能性があった。このため、上位コントローラが各モーションコントローラへ上位指令を送信する時刻から、モーション指令を処理開始時刻まで十分長い時間を取る必要があった。
In the conventional motion control apparatus shown in FIG. 9, considering the case where the host controller 100 operates a plurality of motion controllers 200i in synchronization, in this case, the host controller 100 wants to operate a plurality of motions to be operated in synchronization. A higher order command is simultaneously transmitted to a plurality of motion controllers 200i via the higher order network 300 to the controller 200i. Here, the upper network 300 is asynchronous communication, and there is a possibility that a difference occurs in the arrival time of the packet transmitted depending on the communication load.
Moreover, there is a possibility that the execution of the upper command analysis unit 220i may be awaited depending on the load status of the CPU mounted on the motion controller 200i. For this reason, even if the host controller 100 simultaneously transmits a host command to a plurality of motion controllers 200i, it cannot be guaranteed that the respective motion controllers 200i start commands to the motor 500i at the same time.
On the other hand, in the prior art 1, there is a method in which the host controller instructs each motion controller to drive a motion command at a certain time. However, in this method, the time of the motion controller is shifted. In such a case, the timing for driving the motor has shifted.
Further, in the prior art 2, there is a technique for adjusting the time of the motion controller. If the time of the motion controller coincides with this, and if it is prepared to drive the motion command when the specific time comes, the timing at which each motion controller drives the motor coincides. However, due to the processing load of the motion controller and performance differences, it was not possible to guarantee that the command received from the host controller by the motion controller in a certain time. In other words, one motion controller can immediately process a higher order command, but another motion controller may take time to process a higher order command. For this reason, it is necessary to take a sufficiently long time from the time when the host controller transmits the host command to each motion controller to the time when the motion command is processed.

従来技術3では、スレーブに対してあらかじめ指令を渡しておき、マスタが同期信号を一斉同報し、一斉同報された同期信号を受信するとスレーブが同時に処理を始める方法がある。モーションコントローラでは、上位コントローラからの指令を受け取って動作を開始するまでの時間を保証できないため、この方法を適用した場合、マスタがスレーブに対して指令を送信し、その後に同期信号を一斉同報するまでに十分に長い時間を取る必要があった。これは従来技術2と同様に、モーションコントローラが上位コントローラから受け取った指令を一定の時間で処理できる保証が無い。
従来技術4では、複数のCPUで共有する共有メモリを持ち、タイミング信号路やアドレスバスなどを用いて複数台のサーボを同期させる技術がある。
また、従来技術5では、上位装置と複数のサーボドライバ間で同期パルスを共有し、サーボドライバの内部クロックを同期させている。これらの技術によって、複数台の機器の各制御周期の開始タイミングを同期させることはできるが、複数の機器に対して指令を与えたときに処理開始が同時であることを保証することはできない。
In the prior art 3, there is a method in which an instruction is given to the slave in advance, the master broadcasts the synchronization signal all at once, and the slave starts processing simultaneously when the broadcast synchronization signal is received. The motion controller cannot guarantee the time until the operation is started after receiving the command from the host controller, so when this method is applied, the master sends the command to the slave and then sends the synchronization signal all at once. It was necessary to take a long enough time. As in the prior art 2, there is no guarantee that the motion controller can process the command received from the host controller in a certain time.
In the conventional technique 4, there is a technique of having a shared memory shared by a plurality of CPUs and synchronizing a plurality of servos using a timing signal path or an address bus.
In the prior art 5, a synchronization pulse is shared between the host device and a plurality of servo drivers, and the internal clock of the servo driver is synchronized. Although these techniques can synchronize the start timing of each control cycle of a plurality of devices, it is not possible to guarantee that the processing start is simultaneous when a command is given to a plurality of devices.

従来技術6では、複数台のロボットが同期して動作する仕組みが公開されている(特許文献1参照)。例えば、2台のロボット、ロボット1とロボット2が同期する場合には次の手順で動作する。
1)ロボット1がロボット2のフラグを立てる。
2)ロボット1は自身のフラグが立つまで待機する。
3)ロボット2は自身のフラグが立ったのでフラグをクリアし、ロボット1のフラグを立て、処理を開始する。
4)ロボット1は自身のフラグが立ったのでフラグをクリアし、処理を開始する。
この手法によれば複数台のロボットがある程度同期して動作することが可能である。しかし、ロボット1とロボット2の処理周期分の同期誤差が生じる恐れがあった。
特開平9−244731号公報(図1)
In the prior art 6, a mechanism in which a plurality of robots operate synchronously is disclosed (see Patent Document 1). For example, when two robots, that is, the robot 1 and the robot 2 are synchronized, the following procedure is performed.
1) The robot 1 raises the robot 2 flag.
2) The robot 1 waits until its flag is set.
3) Since the robot 2 has set its own flag, the robot 2 clears the flag, sets the flag of the robot 1, and starts processing.
4) Since the robot 1 has its own flag, the robot 1 clears the flag and starts processing.
According to this method, it is possible for a plurality of robots to operate in synchronization to some extent. However, there is a possibility that a synchronization error corresponding to the processing cycle of the robot 1 and the robot 2 occurs.
JP-A-9-244731 (FIG. 1)

本発明はこのような問題点に鑑みてなされたものであり、上位コントローラが複数のモーションコントローラに対して動作開始タイミングを指示する必要が無く、しかも上位コントローラから与えられた指令に基づいて複数のモーションコントローラが同期誤差無くモータを駆動することができるモーションコントロール装置を提供することを目的とする。   The present invention has been made in view of such problems, and it is not necessary for the host controller to instruct the operation start timing to a plurality of motion controllers, and a plurality of commands are based on commands given from the host controller. It is an object of the present invention to provide a motion control device in which a motion controller can drive a motor without synchronization error.

上記問題を解決するため、請求項1記載の上位コントローラの発明は、軌跡の種類や軌跡のパラメータを含んだ上位指令を複数台のモーションコントローラに対して生成する指令生成部と、前記指令生成部が生成した指令を前記モーションコントローラに送信する通信処理部とを備えた上位コントローラにおいて、
指令を一意に示す指令IDおよび同期して動作する全ての前記モーションコントローラのモーションコントローラIDとを含んだ同期指令を生成する同期指令生成部を備えたことを特徴としている。
請求項2記載のモーションコントローラの発明は、指令を一意に示す指令IDおよび同期して動作する全てのモーションコントローラのモーションコントローラIDを含んだ同期指令を上位コントローラから受信するための手段を提供する上位通信処理部と、前記上位通信処理部を介して前記上位コントローラが出した前記上位指令を受け取り、解析し、軌跡の種類や軌跡のパラメータを含んだモーション指令を生成する上位指令解析部と、前記上位指令解析部が生成したモーション指令を保持するモーション指令FIFOと、前記モーション指令FIFOの先頭に保持された前記モーション指令に従って接続されたモータに対する時々刻々の指令値を算出するモーション指令処理部と、前記モーション指令処理部が生成した前記モータに対する時々刻々の指令値を前記モータに送信し、前記モータからの応答値を受信する同期通信処理部とを備えたモーションコントローラにおいて、
さらに、上位ネットワークで一意な値であるモーションコントローラIDを格納するID格納部と、前記上位指令解析部が生成した前記同期モーション指令を他の前記モーションコントローラと同期して実行する同期モーション処理部とを備え、
かつ、前記上位指令解析部は、さらに、前記同期指令を解析し、指令を一意に示す指令IDおよび同期して動作する全ての前記モーションコントローラのモーションコントローラIDと、同期して動作する全ての前記モーションコントローラの準備完了状態を表した準備完了フラグとを含んだ同期モーション指令を生成することを特徴としている。
請求項3記載のモーションコントロール装置の発明は、請求項1記載の上位コントローラと、請求項2記載のモーションコントローラと、前記モーションコントローラから送信された指令値を受信し、応答を送信するモータと、前記上位コントローラと複数の前記モーションコントローラを接続する上位ネットワークと、複数の前記モーションコントローラと複数の前記モータを接続する同期ネットワークとから構成されることを特徴としている。
請求項4記載のモーションコントロール装置の同期方法の発明は、複数台のモーションコントローラに対して指令を生成する指令生成部と、前記指令生成部が生成した指令を前記モーションコントローラに送信する通信処理部とを備えた上位コントローラと、前記上位コントローラと通信するための手段を提供する上位通信処理部と、前記上位通信処理部を介して前記上位コントローラが出した上位指令を受け取り解析し、動作軌跡を表すモーション指令を生成する上位指令解析部と、前記上位指令解析部が生成したモーション指令を生成された順番どおりに保持するモーション指令FIFOと、前記モーション指令FIFOの先頭に保持されたモーション指令に従って接続されたモータに対する時々刻々の指令値を算出するモーション指令処理部と、前記モーション指令処理部が生成した前記モータに対する時々刻々の指令値を前記モータに送信し、前記モータからの応答値を受信する同期通信処理部と、を備えたモーションコントローラと、前記モーションコントローラから送信された指令値を受信し、応答を送信するモータと、前記上位コントローラと複数の前記モーションコントローラを接続する上位ネットワークと、複数の前記モーションコントローラと複数の前記モータを接続する同期ネットワークと、から構成されるモーションコントロール装置の同期方法において、
前記モーション指令FIFOの先頭に同期指令を検出すると準備完了パケットを前記同期ネットワーク上に送出し、準備完了パケットを他の前記モーションコントローラが受信するまで待ち、同期して動作する前記モーションコントローラの準備完了状態を表した準備完了フラグが全てtrueになった場合に前記モータに対する時々刻々の指令値を算出する手順で処理することを特徴としている。
In order to solve the above-described problem, the host controller according to claim 1 includes a command generation unit that generates, for a plurality of motion controllers, a higher level command including a type of trajectory and parameters of the trajectory, and the command generation unit. In a host controller provided with a communication processing unit that transmits a command generated by the motion controller,
A synchronization command generation unit that generates a synchronization command including a command ID that uniquely indicates a command and motion controller IDs of all the motion controllers that operate in synchronization is provided.
The motion controller invention according to claim 2 provides a means for receiving from the host controller a command ID that uniquely indicates the command and a synchronization command including the motion controller IDs of all the motion controllers that operate synchronously. A high-order command analysis unit that receives and analyzes the high-order command issued by the high-order controller via the communication processing unit and the high-order communication processing unit, and generates a motion command including a type of locus and a parameter of the locus; A motion command FIFO that holds the motion command generated by the host command analysis unit, and a motion command processing unit that calculates a command value for each motor connected in accordance with the motion command held at the head of the motion command FIFO; For the motor generated by the motion command processing unit That the command value for every moment transmitted to the motor, the motion controller having a synchronous communication processing unit for receiving a response value from the motor,
An ID storage unit that stores a motion controller ID that is a unique value in the host network; a synchronous motion processing unit that executes the synchronous motion command generated by the host command analysis unit in synchronization with the other motion controllers; With
The higher order command analysis unit further analyzes the synchronization command, and a command ID that uniquely indicates the command and a motion controller ID of all the motion controllers that operate synchronously, and all of the motion controllers that operate synchronously A synchronous motion command including a ready flag indicating a ready state of the motion controller is generated.
The invention of the motion control device according to claim 3 includes: the host controller according to claim 1; the motion controller according to claim 2; a motor that receives a command value transmitted from the motion controller and transmits a response; It is characterized by comprising a host network connecting the host controller and the plurality of motion controllers, and a synchronous network connecting the plurality of motion controllers and the plurality of motors.
The invention of the synchronization method of the motion control device according to claim 4 includes: a command generation unit that generates a command for a plurality of motion controllers; and a communication processing unit that transmits the command generated by the command generation unit to the motion controller And a host communication processing unit that provides means for communicating with the host controller, and receives and analyzes a host command issued by the host controller via the host communication processing unit, Connected according to the upper command analysis unit that generates the motion command to be represented, the motion command FIFO that holds the motion commands generated by the higher command analysis unit in the order in which they were generated, and the motion command held at the head of the motion command FIFO Motion command to calculate the command value every moment for a given motor A motion controller comprising: a management unit; and a synchronous communication processing unit that transmits a command value for the motor generated by the motion command processing unit every moment to the motor and receives a response value from the motor; A motor that receives a command value transmitted from a motion controller and transmits a response, a host network that connects the host controller and the plurality of motion controllers, and a synchronization network that connects the plurality of motion controllers and the plurality of motors In the synchronization method of the motion control device composed of
When a synchronization command is detected at the head of the motion command FIFO, a ready packet is sent out on the synchronous network, and a wait is received until another motion controller receives a ready packet, and the motion controller operating in synchronization is ready. When all the preparation completion flags indicating the state become true, processing is performed by a procedure for calculating a command value for the motor every moment.

本発明によると、上位コントローラが、指令を一意に示す指令IDおよび同期して動作する全てのモーションコントローラのモーションコントローラIDとを含んだ同期指令を生成する同期指令生成部を備え、かつ、モーションコントローラが、モーションコントローラIDを格納するID格納部と、同期指令を解析し、指令を一意に示す指令IDおよび同期して動作する全てのモーションコントローラのモーションコントローラIDと、同期して動作する全てのモーションコントローラの準備完了状態を表した準備完了フラグとを含んだ同期モーション指令を生成する上位指令解析部と、上位指令解析部が生成した前記同期モーション指令を他のモーションコントローラと同期して実行する同期モーション処理部とを備えているため、上位コントローラがモーションコントローラに対して動作開始タイミングを指示する必要が無く、上位コントローラから与えられた指令に基づいて複数のモーションコントローラが同期誤差無くモータを駆動することができる。   According to the present invention, the host controller includes the synchronization command generation unit that generates the synchronization command including the command ID that uniquely indicates the command and the motion controller IDs of all the motion controllers that operate in synchronization, and the motion controller However, the ID storage unit for storing the motion controller ID, the synchronization command is analyzed, the command ID that uniquely indicates the command, and the motion controller ID of all the motion controllers that operate synchronously, and all the motions that operate synchronously A high-order command analysis unit that generates a synchronous motion command including a ready flag that indicates the ready state of the controller, and a synchronization that executes the synchronous motion command generated by the high-level command analysis unit in synchronization with other motion controllers Because it has a motion processing unit, Controller is not required to instruct the operation start timing with respect to the motion controller, a plurality of motion controllers to drive the synchronization error without motor based on the command given from the host controller.

以下、本発明の実施の形態について図を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明のモーションコントロール装置のブロック図である。
図において、1は本発明のモーションコントロール装置、100は上位コントローラであり、200i(iは正の整数)は複数台のモーションコントローラ、300は上位ネットワーク、400は同期ネットワーク、500jは複数台のモータ500j(jは正の整数)である。
上位コントローラ100は、指令生成部110で各モーションコントローラ200iへの上位指令を生成する。上位指令の例は既に図10で説明したとおりである。
そこで、複数台のモーションコントローラ200iを同期させて動作させる場合は、本発明によって設けられた同期指令生成部115が複数台のモーションコントローラ200iを同期させて動作させるための同期指令を生成する。
図2は同期指令の例を示す図である。同期指令には、指令を一意に示す指令IDと、同期して動作する全てのモーションコントローラのモーションコントローラIDとが本発明によって設けられ、その他は従来の上位指令(図10参照)と同じく、軌跡の種類と、軌跡のパラメータとが含まれている。
このようにして同期指令生成部115(図1)で生成された上位指令600または同期指令610は、モーションコントローラ200iへ上位ネットワーク300を通じて通信処理部120によって送信される。
FIG. 1 is a block diagram of a motion control apparatus of the present invention.
In the figure, 1 is a motion control apparatus of the present invention, 100 is a host controller, 200i (i is a positive integer) is a plurality of motion controllers, 300 is a host network, 400 is a synchronous network, and 500j is a plurality of motors. 500j (j is a positive integer).
In the host controller 100, the command generator 110 generates a host command to each motion controller 200i. An example of the higher order command is as already described with reference to FIG.
Therefore, when the plurality of motion controllers 200i are operated in synchronization, the synchronization command generation unit 115 provided according to the present invention generates a synchronization command for operating the plurality of motion controllers 200i in synchronization.
FIG. 2 is a diagram illustrating an example of a synchronization command. In the synchronous command, a command ID that uniquely indicates the command and motion controller IDs of all motion controllers that operate in synchronization are provided according to the present invention, and the others are the same as in the conventional high-order command (see FIG. 10). Type and trajectory parameters are included.
The host command 600 or the sync command 610 generated in this way by the sync command generating unit 115 (FIG. 1) is transmitted to the motion controller 200i by the communication processing unit 120 through the host network 300.

次に、本発明におけるモーションコントローラ200iについて説明する。
上位通信処理部210iおよび上位指令解析部220iが扱うモーション指令700については従来装置で図11で説明したので割愛する。
上位指令解析部は、同期指令610(図2)から同期モーション指令(図3)を生成する。
図3は同期モーション指令の例を示している。
同期モーション指令710には従来のモーション指令700にあった「軌跡の種類」と「軌跡のパラメータ」を含む他に、本発明により、指令を一意に示す指令IDと、同期して動作する全てのモーションコントローラのモーションコントローラIDと、同期して動作する全てのモーションコントローラの準備完了状態を表した準備完了フラグを含む。指令IDとモーションコントローラIDは同期指令からコピーされる。準備完了フラグはfalseに初期化される。生成されたモーション指令700(図11)または同期モーション指令710(図3)は、次のモーション指令FIFO230iに格納される。モーション指令FIFO230iでは、モーション指令が先入れ先出し方式で管理されている。
Next, the motion controller 200i according to the present invention will be described.
The motion command 700 handled by the host communication processing unit 210i and the host command analysis unit 220i has been described with reference to FIG.
The upper command analysis unit generates a synchronous motion command (FIG. 3) from the synchronous command 610 (FIG. 2).
FIG. 3 shows an example of a synchronous motion command.
In addition to the “type of trajectory” and “parameter of trajectory” in the conventional motion command 700, the synchronous motion command 710 includes all of the command ID uniquely indicating the command and all of the commands that operate in synchronization with the present invention. It includes a motion controller ID of the motion controller and a ready flag representing the ready status of all the motion controllers operating in synchronism. The command ID and motion controller ID are copied from the synchronization command. The ready flag is initialized to false. The generated motion command 700 (FIG. 11) or synchronous motion command 710 (FIG. 3) is stored in the next motion command FIFO 230i. In the motion command FIFO 230i, the motion command is managed by a first-in first-out method.

モーション指令処理部240iは同期モーション処理部260iから起動される。モーション指令処理部240iの処理フローは図12で説明したので割愛する。そこで、同期モーション処理部260iの処理フローを図4に示す。
図4の処理フローは同期モーション処理部260iが1通信周期内で実行する処理のフローを示している。つまり、毎通信周期、図4の処理フローが繰り返される。図において、同期モーション処理部260iは同期通信処理部250iから定周期で起動される。同期通信処理部250iから起動された同期モーション処理部260iは、受信用ダブルバッファ253iに準備完了パケット(図5)が含まれているか確認する(S200)。
図5は準備完了パケットを示す図である。図において、800は準備完了パケットで、この準備完了パケット800には、指令IDとモーションコントローラIDが含まれている。
そこで、図4のフローに戻って、受信用ダブルバッファ253iに準備完了パケットが含まれている場合、準備完了パケットに含まれている指令IDと一致する同期モーション指令をモーション指令FIFO230iから検索し、発見した同期モーション指令の中にあるモーションコントローラ(図ではMCと略記)IDが一致するモーションコントローラの準備完了フラグをtrueに設定する(S210)。
次に、モーション指令FIFO230iの先頭が同期モーション指令かどうかチェックする(S220)。モーション指令FIFO230iの先頭が同期モーション指令でない場合、S400でモーション指令処理部240iを起動し、同期モーション処理部260iの処理は完了する。モーション指令FIFO230iの先頭が同期モーション指令である場合、S230へ処理を進める。
S230では、待ちカウンタの値をチェックする。待ちカウンタは、モーションコントローラ200iが起動する際に0クリアされるカウンタである。待ちカウンタの値が0でない場合、待ちカウンタの値を1つ減らし(S240)、同期モーション処理部260iの処理は完了する。待ちカウンタの値が0の場合、モーション指令FIFO230iの先頭にある同期モーション指令の準備完了フラグがすべてtrueであるかチェックする(S250)。
準備完了フラグがすべてtrueであれば、S400でモーション指令処理部240iを起動し、同期モーション処理部260iの処理は完了する。準備完了フラグがすべてtrueでない場合、ID格納部270iから自モーションコントローラIDを読み出し、同期モーション指令の中でモーションコントローラIDが一致する準備完了フラグをチェックする(S260)。
モーションコントローラIDが一致する準備完了フラグがtrueの場合は同期モーション処理部260iの処理は完了する。
準備完了フラグがfalseの場合、S270、S280、S290を実行する。
S270では、同期モーション指令の中でモーションコントローラIDが自モーションコントローラIDと一致する準備完了フラグをtrueに設定する。S280では、同期モーション指令に含まれている指令IDと、ID格納部270iから読み出した自モーションコントローラIDと、を使用して準備完了パケットを作成し、作成した準備完了パケットを同期通信処理部250iの送信用ダブルバッファ252iに書き込む。S290では、待ちカウンタの値を1に設定する。
以上が同期モーション処理部260iが1通信周期で実行する処理のフローである。次の通信周期では再び図4のフローが繰り返される。
The motion command processing unit 240i is activated from the synchronous motion processing unit 260i. The processing flow of the motion command processing unit 240i has been described with reference to FIG. Therefore, FIG. 4 shows a processing flow of the synchronous motion processing unit 260i.
The processing flow of FIG. 4 shows a flow of processing executed by the synchronous motion processing unit 260i within one communication cycle. That is, the processing flow of FIG. 4 is repeated every communication cycle. In the figure, the synchronous motion processing unit 260i is activated from the synchronous communication processing unit 250i at regular intervals. The synchronous motion processing unit 260i activated from the synchronous communication processing unit 250i confirms whether the reception completion buffer (FIG. 5) is included in the reception double buffer 253i (S200).
FIG. 5 shows a preparation completion packet. In the figure, reference numeral 800 denotes a preparation completion packet. The preparation completion packet 800 includes a command ID and a motion controller ID.
Therefore, returning to the flow of FIG. 4, if the reception double buffer 253 i includes a ready packet, the motion command FIFO 230 i is searched for a synchronous motion command that matches the command ID included in the ready packet, A motion controller ready flag that matches the motion controller (abbreviated as MC in the figure) ID in the detected synchronous motion command is set to true (S210).
Next, it is checked whether or not the head of the motion command FIFO 230i is a synchronous motion command (S220). If the head of the motion command FIFO 230i is not a synchronous motion command, the motion command processing unit 240i is activated in S400, and the processing of the synchronous motion processing unit 260i is completed. If the head of the motion command FIFO 230i is a synchronous motion command, the process proceeds to S230.
In S230, the value of the waiting counter is checked. The wait counter is a counter that is cleared to 0 when the motion controller 200i is activated. If the value of the wait counter is not 0, the value of the wait counter is decreased by 1 (S240), and the process of the synchronous motion processing unit 260i is completed. If the value of the wait counter is 0, it is checked whether all the synchronous motion command ready flags at the head of the motion command FIFO 230i are true (S250).
If all the preparation completion flags are true, the motion command processing unit 240i is activated in S400, and the processing of the synchronous motion processing unit 260i is completed. If all the preparation completion flags are not true, the own motion controller ID is read from the ID storage unit 270i, and the preparation completion flag with the matching motion controller ID in the synchronous motion command is checked (S260).
When the ready flag with the matching motion controller ID is true, the process of the synchronous motion processing unit 260i is completed.
When the preparation completion flag is false, S270, S280, and S290 are executed.
In S270, a ready flag whose motion controller ID matches the own motion controller ID in the synchronous motion command is set to true. In S280, a preparation completion packet is created using the command ID included in the synchronous motion command and the own motion controller ID read from the ID storage unit 270i, and the created preparation completion packet is sent to the synchronous communication processing unit 250i. Are written in the transmission double buffer 252i. In S290, the value of the wait counter is set to 1.
The above is the flow of processing executed by the synchronous motion processing unit 260i in one communication cycle. In the next communication cycle, the flow of FIG. 4 is repeated again.

同期通信処理部250iにおける本発明による割り込みハンドラの処理手順について図6に基づいて説明する。図において、割り込みハンドラ251iが起動されると、まず、送信用ダブルバッファ252i(図13)を切り替える(S500)。
次に、通信チップ255i(図13)へ送信要求をし(S510)、受信用ダブルバッファ253i(図13)を切り替える(S520)。
最後に同期モーション処理部260i(図1)を起動する(S535)。
The processing procedure of the interrupt handler according to the present invention in the synchronous communication processing unit 250i will be described with reference to FIG. In the figure, when the interrupt handler 251i is activated, first, the transmission double buffer 252i (FIG. 13) is switched (S500).
Next, a transmission request is made to the communication chip 255i (FIG. 13) (S510), and the reception double buffer 253i (FIG. 13) is switched (S520).
Finally, the synchronous motion processing unit 260i (FIG. 1) is activated (S535).

送信用ダブルバッファ252iは、書き込み用と読み出し用の2面のバッファを持つ(図16)。送信用ダブルバッファ252iの書き込み用バッファは、モーション指令処理部240iがモータに対する指令値を書き込む際にアクセスされる。また、送信用ダブルバッファ252iの書き込み用バッファは、同期モーション処理部260iが準備完了パケットを書き込む際にもアクセスされる。送信用ダブルバッファ252iの読み出し用バッファは、通信チップ255iが同期ネットワーク400に通信パケットを送出する際にアクセスされる。割り込みハンドラ251iが送信用ダブルバッファ252iを切り替えるため、周期tで書き込み用バッファだったバッファは、次の周期t+1で読み出し用バッファとなる。このため、周期tで書き込み用バッファに書き込まれたデータは、周期t+1で読み出し用バッファに移っている。周期t+1では、通信チップ255iが読み出し用バッファからデータを読み出し、同期ネットワーク400上に通信パケットとして送出する。   The transmission double buffer 252i has two buffers for writing and reading (FIG. 16). The writing buffer of the transmission double buffer 252i is accessed when the motion command processing unit 240i writes a command value for the motor. The write buffer of the transmission double buffer 252i is also accessed when the synchronous motion processing unit 260i writes a ready packet. The read buffer of the transmission double buffer 252 i is accessed when the communication chip 255 i sends a communication packet to the synchronous network 400. Since the interrupt handler 251i switches the transmission double buffer 252i, the buffer that has been the write buffer in the cycle t becomes the read buffer in the next cycle t + 1. For this reason, the data written in the write buffer at the cycle t moves to the read buffer at the cycle t + 1. In period t + 1, the communication chip 255i reads data from the read buffer and sends it as a communication packet on the synchronous network 400.

受信用ダブルバッファ253iは、書き込み用と読み出し用の2面のバッファを持つ(図17)。受信用ダブルバッファ253iの書き込み用バッファは、通信チップ255iが同期ネットワーク400上の通信パケットを受信する際にアクセスされる。受信用ダブルバッファ253iの読み出し用バッファは、モーション指令処理部240iがモータからの応答値を読み出す際にアクセスされる。また、他のモーションコントローラから送信された準備完了パケットを同期モーション処理部260iが読み出す際にもアクセスされる。割り込みハンドラ251iが受信用ダブルバッファ253iを切り替えるため、周期tで書き込み用バッファだったバッファは、次の周期t+1で読み出し用バッファとなる。このため、周期tで同期ネットワーク400から受信した通信パケットは、周期t+1で読み出し用バッファに移っている。周期t+1において、モーション指令処理部240iや同期モーション処理部260iは通信パケットを読み出すことができる。 The reception double buffer 253i has two buffers for writing and reading (FIG. 17). The write buffer of the reception double buffer 253 i is accessed when the communication chip 255 i receives a communication packet on the synchronous network 400. The read buffer of the reception double buffer 253i is accessed when the motion command processing unit 240i reads a response value from the motor. The access is also performed when the synchronous motion processing unit 260i reads a preparation completion packet transmitted from another motion controller. Since the interrupt handler 251i switches the reception double buffer 253i, the buffer that has been the writing buffer in the cycle t becomes the reading buffer in the next cycle t + 1. For this reason, the communication packet received from the synchronous network 400 at the period t is moved to the reading buffer at the period t + 1. In the period t + 1, the motion command processing unit 240i and the synchronous motion processing unit 260i can read the communication packet.

図7は2台のモーションコントローラ(図1のモーションコントローラ1とモーションコントローラ2)の動作例を示したものである。ただし、モーションコントローラ1,2とモータ500i(図1)との間で送受信される通信パケットは省略している。
モーションコントローラ1のモーション指令FIFO(図1の2301)にはモーション指令Aと同期モーション指令Xが格納されている。
周期tにおいて、モーションコントローラ1のモーション指令FIFOの先頭(矢印方向)にはモーション指令Aが設定されている。
同期モーション指令Xの指令IDは123であり、モーションコントローラ1とモーションコントローラ2が同期して動作することを示している。周期tおける同期モーション指令Xでは、モーションコントローラ1の準備完了フラグ(MC1)およびモーションコントローラ2の準備完了フラグ(MC2)が共にfalseに設定されている。
一方、モーションコントローラ2のモーション指令FIFO(図1の2302)にはモーション指令Bと同期モーション指令Yが格納されている。
周期tにおいて、モーションコントローラ2のモーション指令FIFOの先頭(矢印方向)にはモーション指令Bが設定されている。
同期モーション指令Yの指令IDは123であり、モーションコントローラ1とモーションコントローラ2が同期して動作することを示している。周期tおける同期モーション指令Yでは、モーションコントローラ1の準備完了フラグ(MC1)およびモーションコントローラ2の準備完了フラグ(MC2)が共にfalseに設定されている。
FIG. 7 shows an operation example of two motion controllers (motion controller 1 and motion controller 2 in FIG. 1). However, communication packets transmitted and received between the motion controllers 1 and 2 and the motor 500i (FIG. 1) are omitted.
The motion command FIFO (2301 in FIG. 1) of the motion controller 1 stores a motion command A and a synchronous motion command X.
In the period t, the motion command A is set at the head (in the direction of the arrow) of the motion command FIFO of the motion controller 1.
The command ID of the synchronous motion command X is 123, which indicates that the motion controller 1 and the motion controller 2 operate in synchronization. In the synchronous motion command X in the period t, the preparation completion flag (MC1) of the motion controller 1 and the preparation completion flag (MC2) of the motion controller 2 are both set to false.
On the other hand, motion command B and synchronous motion command Y are stored in the motion command FIFO (2302 in FIG. 1) of the motion controller 2.
In the period t, the motion command B is set at the head (in the direction of the arrow) of the motion command FIFO of the motion controller 2.
The command ID of the synchronous motion command Y is 123, which indicates that the motion controller 1 and the motion controller 2 operate in synchronization. In the synchronous motion command Y in the period t, the preparation completion flag (MC1) of the motion controller 1 and the preparation completion flag (MC2) of the motion controller 2 are both set to false.

次に、図7におけるモーションコントローラ1の動作を説明する。
モーションコントローラ1のモーション指令Aが周期tで完了すると仮定する。図4の処理フローのステップS220により、周期tではFIFOの先頭がモーション指令Aであって同期モーション指令ではないのでステップS400に進み、モーションコントローラ1の同期モーション処理部2601(図1)がモーション指令処理部2401(図1)を起動する。
起動されたモーション指令処理部は図12の処理フローに従い、ステップS130でモーション指令Aの最後の指令値を送信用ダブルバッファに書込み、ステップS140でモーション指令Aをモーション指令FIFOから削除する。これにより、周期t+1において、モーションコントローラ1のモーション指令FIFOの先頭には同期モーション指令Xが設定される。
周期t+1では、モーションコントローラ1の同期モーション処理部2601は自モーションコントローラIDの1をID格納部2701(図1)より読み出し、同期モーション指令Xの自モーションコントローラIDと一致する準備完了フラグMC1をtrueに設定する。
また、同期モーション指令Xの指令IDである123とモーションコントローラIDである1を含んだ準備完了パケット800(図5)を送信用ダブルバッファの書込み用バッファに書き込む(これを図でハッチングで示す。)。周期t+1に送信用ダブルバッファの書込み用バッファにへ書き込まれた準備完了パケット800は周期t+2に同期ネットワーク上へ送出される(これを図でハッチングで示す。)。
また、周期t+1においてモーションコントローラ1の待ちカウンタが1に設定され、周期t+2において待ちカウンタがデクリメントされて0となる。
続く周期t+3以降では、同期モーション指令Xに含まれるすべての準備完了フラグがチェックされるが、モーションコントローラ2の準備完了フラグMC2がfalseであるため、同期モーション指令部2601はモーション指令処理部2401を起動しない。
Next, the operation of the motion controller 1 in FIG. 7 will be described.
Assume that the motion command A of the motion controller 1 is completed in a cycle t. In step S220 of the processing flow of FIG. 4, since the first FIFO command is the motion command A and not the synchronous motion command in the period t, the process proceeds to step S400, and the synchronous motion processing unit 2601 (FIG. 1) of the motion controller 1 executes the motion command. The processing unit 2401 (FIG. 1) is activated.
The activated motion command processing unit writes the last command value of the motion command A in the transmission double buffer in step S130 and deletes the motion command A from the motion command FIFO in step S140 according to the processing flow of FIG. Thereby, in the cycle t + 1, the synchronous motion command X is set at the head of the motion command FIFO of the motion controller 1.
In the period t + 1, the synchronous motion processing unit 2601 of the motion controller 1 reads the own motion controller ID 1 from the ID storage unit 2701 (FIG. 1), and sets the ready flag MC1 that matches the own motion controller ID of the synchronous motion command X to true. Set to.
Further, a ready packet 800 (FIG. 5) including the command ID 123 of the synchronous motion command X and the motion controller ID 1 is written into the write buffer of the transmission double buffer (this is indicated by hatching in the figure). ). The ready packet 800 written to the write buffer of the transmission double buffer at period t + 1 is sent out on the synchronous network at period t + 2 (this is indicated by hatching in the figure).
Also, the wait counter of the motion controller 1 is set to 1 in the cycle t + 1, and the wait counter is decremented to 0 in the cycle t + 2.
In the subsequent cycle t + 3 and thereafter, all the ready flags included in the synchronous motion command X are checked, but since the ready flag MC2 of the motion controller 2 is false, the synchronous motion command unit 2601 sets the motion command processing unit 2401. It does not start.

次に、図7におけるモーションコントローラ2の動作を説明する。
周期t+2において、モーションコントローラ2の受信用ダブルバッファの書込み用バッファにモーションコントローラ1から送信された準備完了パケット800が受信される。この準備完了パケット800には指令IDの123とモーションコントローラIDの1が含まれている。周期t+3において、モーションコントローラ2の同期モーション処理部2602(図1)が準備完了パケット800を参照し、指令IDが一致する同期モーション指令Yに含まれているモーションコントローラ1の準備完了フラグをtrueに設定する。続く周期では、指令Bが完了するまで同期モーション指令部2602はモーション指令処理部2402を起動する。
Next, the operation of the motion controller 2 in FIG. 7 will be described.
In the period t + 2, the preparation completion packet 800 transmitted from the motion controller 1 is received in the write buffer of the reception double buffer of the motion controller 2. This preparation completion packet 800 includes a command ID 123 and a motion controller ID 1. In a cycle t + 3, the synchronous motion processing unit 2602 (FIG. 1) of the motion controller 2 refers to the preparation completion packet 800, and sets the preparation completion flag of the motion controller 1 included in the synchronous motion instruction Y having the same instruction ID to true. Set. In the subsequent cycle, the synchronous motion command unit 2602 activates the motion command processing unit 2402 until the command B is completed.

図8は図7からN周期後の周期t’における2台のモーションコントローラ(モーションコントローラ1とモーションコントローラ2)の動作例を示している。図8でも図7と同じように、モーションコントローラとモータとの間で送受信される通信パケットは省略している。
図8におけるモーションコントローラ2の動作を説明する。
モーションコントローラ2のモーション指令Bが周期t’で完了すると仮定する。図4の処理フローのステップS220により、周期t’ではFIFOの先頭がモーション指令Bで同期モーション指令でないのでステップS400に進み、モーションコントローラ2の同期モーション処理部2602(図1)がモーション指令処理部2402(図1)を起動する。
起動されたモーション指令処理部2402は図12の処理フローに従い、ステップS130でモーション指令Bの最後の指令値を送信用ダブルバッファに書込み、ステップS140でモーション指令Bをモーション指令FIFOから削除する。これにより、周期t’+1において、モーションコントローラ2のモーション指令FIFOの先頭には同期モーション指令Yが設定される。
周期t’+1では、モーションコントローラ2の同期モーション処理部2602は自モーションコントローラIDの2をID格納部より読み出し、同期モーション指令Yの自モーションコントローラIDと一致する準備完了フラグMC1をtrueに設定する。
また、同期モーション指令Yの指令IDである123とモーションコントローラIDである2を含んだ準備完了パケット800(図5)を送信用ダブルバッファに書き込む。周期t’+1に送信用ダブルバッファへ書き込まれた準備完了パケット800は周期t’+2に同期ネットワーク上へ送出される。また、周期t’+1においてモーションコントローラ2の待ちカウンタが1に設定され、周期t’+2において待ちカウンタがデクリメントされて0となる。
周期t’+3において、同期モーション指令Yに含まれるすべての準備完了フラグMC1,MC2がtrueであるため、周期t’+3からモーション指令処理部2402が起動される。周期t’+3以降、モーション指令処理部2402は図12の処理フローに従い、モーション指令Yの指令値を送信用ダブルバッファに書込む。
FIG. 8 shows an operation example of two motion controllers (motion controller 1 and motion controller 2) in a cycle t ′ after N cycles from FIG. In FIG. 8, as in FIG. 7, communication packets transmitted and received between the motion controller and the motor are omitted.
The operation of the motion controller 2 in FIG. 8 will be described.
It is assumed that the motion command B of the motion controller 2 is completed with a period t ′. In step S220 of the processing flow of FIG. 4, since the top of the FIFO is the motion command B and not the synchronous motion command in the cycle t ′, the process proceeds to step S400, and the synchronous motion processing unit 2602 (FIG. 1) of the motion controller 2 moves to the motion command processing unit. 2402 (FIG. 1) is activated.
The activated motion command processing unit 2402 writes the last command value of the motion command B in the transmission double buffer in step S130 and deletes the motion command B from the motion command FIFO in step S140 according to the processing flow of FIG. Thereby, in the cycle t ′ + 1, the synchronous motion command Y is set at the head of the motion command FIFO of the motion controller 2.
In the period t ′ + 1, the synchronous motion processing unit 2602 of the motion controller 2 reads the own motion controller ID 2 from the ID storage unit, and sets the ready flag MC1 that matches the own motion controller ID of the synchronous motion command Y to true. .
In addition, the preparation completion packet 800 (FIG. 5) including the command ID 123 of the synchronous motion command Y and the motion controller ID 2 is written in the transmission double buffer. The ready packet 800 written in the transmission double buffer in the period t ′ + 1 is sent out on the synchronous network in the period t ′ + 2. Further, the wait counter of the motion controller 2 is set to 1 in the cycle t ′ + 1, and the wait counter is decremented to 0 in the cycle t ′ + 2.
In the cycle t ′ + 3, since all the preparation completion flags MC1 and MC2 included in the synchronous motion command Y are true, the motion command processing unit 2402 is started from the cycle t ′ + 3. After the cycle t ′ + 3, the motion command processing unit 2402 writes the command value of the motion command Y in the transmission double buffer according to the processing flow of FIG.

図8におけるモーションコントローラ1の動作を説明する。
周期t’+2において、モーションコントローラ1の受信用ダブルバッファに、モーションコントローラ2から送信された準備完了パケット800が受信される。この準備完了パケット800には指令IDの123とモーションコントローラIDの2が含まれている。周期t’+3において、モーションコントローラ2の同期モーション処理部2602が準備完了パケット800を参照し、指令IDが一致する同期モーション指令Xに含まれているモーションコントローラ2の準備完了フラグMC2をtrueに設定する。ここで、同期モーション指令Xに含まれるすべての準備完了フラグMC1,MC2がtrueとなるので、周期t’+3から同期モーション処理部2601はモーション指令処理部2401を起動する。周期t’+3以降、モーション指令処理部2401は図12の処理フローに従い、モーション指令Xの指令値を送信用ダブルバッファに書込む。
The operation of the motion controller 1 in FIG. 8 will be described.
In the period t ′ + 2, the ready packet 800 transmitted from the motion controller 2 is received by the reception double buffer of the motion controller 1. This preparation completion packet 800 includes a command ID 123 and a motion controller ID 2. In period t ′ + 3, the synchronous motion processing unit 2602 of the motion controller 2 refers to the preparation completion packet 800 and sets the preparation completion flag MC2 of the motion controller 2 included in the synchronous motion instruction X having the same instruction ID to true. To do. Here, since all the preparation completion flags MC1 and MC2 included in the synchronous motion command X are true, the synchronous motion processing unit 2601 activates the motion command processing unit 2401 from the cycle t ′ + 3. After the cycle t ′ + 3, the motion command processing unit 2401 writes the command value of the motion command X in the transmission double buffer according to the processing flow of FIG.

以上ではモーションコントローラ2台についてのみ説明したが、同様の手順で2台以上のモーションコントローラで同期することが可能である。
以上で説明したように、本発明によれば、上位コントローラがモーションコントローラに対して動作開始タイミングを指示する必要が無く、複数のモーションコントローラが上位コントローラから与えられた指令に基づいて同期誤差無くモータを駆動することができる。
Although only two motion controllers have been described above, it is possible to synchronize with two or more motion controllers in the same procedure.
As described above, according to the present invention, it is not necessary for the host controller to instruct the operation start timing to the motion controller, and a plurality of motion controllers can perform motors without synchronization error based on commands given from the host controller. Can be driven.

本発明の第1実施例を示すモーションコントロール装置のブロック図である。It is a block diagram of the motion control apparatus which shows 1st Example of this invention. 同期指令の例を示す図である。It is a figure which shows the example of a synchronous command. 同期モーション指令の例を示す図である。It is a figure which shows the example of a synchronous motion command. 同期モーション処理部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of a synchronous motion process part. 準備完了パケットを示す図である。It is a figure which shows a preparation completion packet. 本発明における同期通信処理部の割り込みハンドラの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the interrupt handler of the synchronous communication process part in this invention. 2台のモーションコントローラの第1の動作例を示す図である。It is a figure which shows the 1st operation example of two motion controllers. 2台のモーションコントローラの第2の動作例を示す図である。It is a figure which shows the 2nd operation example of two motion controllers. 従来のモーションコントロール装置のブロック図である。It is a block diagram of the conventional motion control apparatus. 上位指令の例を示す図である。It is a figure which shows the example of a high-order command. モーション指令の例を示す図である。It is a figure which shows the example of a motion command. モーション指令処理部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of a motion command process part. 同期通信処理部のブロック図である。It is a block diagram of a synchronous communication process part. 同期ネットワークの同期フレームと通信周期を示す図である。It is a figure which shows the synchronous frame and communication period of a synchronous network. 従来の割り込みハンドラの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the conventional interrupt handler. 同期通信処理部の送信処理を示す図である。It is a figure which shows the transmission process of a synchronous communication process part. 同期通信処理部の受信処理を示す図である。It is a figure which shows the reception process of a synchronous communication process part.

符号の説明Explanation of symbols

1 本発明のモーションコントロール装置
100 上位コントローラ
110 指令生成部
115 同期指令生成部
120 通信処理部
200i モーションコントローラ
210i 上位通信処理部
220i 上位指令解析部
230i モーション指令FIFO
240i モーション指令処理部
250i 同期通信処理部
251i 割り込みハンドラ
252i 送信用ダブルバッファ
253i 受信用ダブルバッファ
255i 通信チップ
260i 同期モーション処理部
270i ID格納部
300 上位ネットワーク
400 同期ネットワーク
500j モータ
600 上位指令の例
610 同期指令の例
700 モーション指令の例
710 同期モーション指令の例
800 準備完了パケット
1 Motion Control Device 100 of the Present Invention Host Controller 110 Command Generation Unit 115 Synchronization Command Generation Unit 120 Communication Processing Unit 200i Motion Controller 210i Host Communication Processing Unit 220i Host Command Analysis Unit 230i Motion Command FIFO
240i Motion command processing unit 250i Synchronous communication processing unit 251i Interrupt handler 252i Transmission double buffer 253i Reception double buffer 255i Communication chip 260i Synchronous motion processing unit 270i ID storage unit 300 Host network 400 Synchronization network 500j Motor 600 Example of host command 610 Synchronization Command Example 700 Motion Command Example 710 Synchronous Motion Command Example 800 Ready Packet

Claims (4)

軌跡の種類や軌跡のパラメータを含んだ上位指令を複数台のモーションコントローラに対して生成する指令生成部と、
前記指令生成部が生成した指令を前記モーションコントローラに送信する通信処理部とを備えた上位コントローラにおいて、
指令を一意に示す指令IDおよび同期して動作する全ての前記モーションコントローラのモーションコントローラIDとを含んだ同期指令を生成する同期指令生成部を備えたことを特徴とする上位コントローラ。
A command generation unit that generates a higher order command including a type of trajectory and parameters of the trajectory for a plurality of motion controllers;
In a host controller including a communication processing unit that transmits a command generated by the command generation unit to the motion controller,
A host controller comprising a synchronization command generation unit that generates a synchronization command including a command ID that uniquely indicates a command and motion controller IDs of all the motion controllers that operate synchronously.
指令を一意に示す指令IDおよび同期して動作する全てのモーションコントローラのモーションコントローラIDを含んだ同期指令を上位コントローラから受信するための手段を提供する上位通信処理部と、
前記上位通信処理部を介して前記上位コントローラが出した前記上位指令を受け取り、解析し、軌跡の種類や軌跡のパラメータを含んだモーション指令を生成する上位指令解析部と、
前記上位指令解析部が生成したモーション指令を保持するモーション指令FIFOと、前記モーション指令FIFOの先頭に保持された前記モーション指令に従って接続されたモータに対する時々刻々の指令値を算出するモーション指令処理部と、前記モーション指令処理部が生成した前記モータに対する時々刻々の指令値を前記モータに送信し、前記モータからの応答値を受信する同期通信処理部とを備えたモーションコントローラにおいて、
さらに、上位ネットワークで一意な値であるモーションコントローラIDを格納するID格納部と、
前記上位指令解析部が生成した前記同期モーション指令を他の前記モーションコントローラと同期して実行する同期モーション処理部とを備え、
かつ、前記上位指令解析部は、さらに、前記同期指令を解析し、指令を一意に示す指令IDおよび同期して動作する全ての前記モーションコントローラのモーションコントローラIDと、同期して動作する全ての前記モーションコントローラの準備完了状態を表した準備完了フラグとを含んだ同期モーション指令を生成することを特徴とするモーションコントローラ。
A host communication processing unit that provides means for receiving from the host controller a command ID that uniquely indicates the command and a motion command ID of all motion controllers that operate in synchronism;
A host command analysis unit that receives and analyzes the host command issued by the host controller via the host communication processing unit, and generates a motion command including a track type and a track parameter;
A motion command FIFO that holds a motion command generated by the host command analysis unit, and a motion command processing unit that calculates a command value for each motor connected according to the motion command held at the head of the motion command FIFO. In the motion controller including the synchronous communication processing unit that transmits the command value for the motor generated by the motion command processing unit every moment to the motor and receives the response value from the motor.
Furthermore, an ID storage unit that stores a motion controller ID that is a unique value in the host network;
A synchronous motion processing unit that executes the synchronous motion command generated by the host command analysis unit in synchronization with the other motion controller;
The higher order command analysis unit further analyzes the synchronization command, and a command ID that uniquely indicates the command and a motion controller ID of all the motion controllers that operate synchronously, and all of the motion controllers that operate synchronously A motion controller characterized by generating a synchronous motion command including a ready flag indicating a ready state of the motion controller.
請求項1記載の上位コントローラと、
請求項2記載のモーションコントローラと、
前記モーションコントローラから送信された指令値を受信し、応答を送信するモータと、
前記上位コントローラと複数の前記モーションコントローラを接続する上位ネットワークと、
複数の前記モーションコントローラと複数の前記モータを接続する同期ネットワークとから構成されることを特徴とするモーションコントロール装置。
A host controller according to claim 1;
A motion controller according to claim 2;
A motor that receives a command value transmitted from the motion controller and transmits a response;
A host network connecting the host controller and the plurality of motion controllers;
A motion control device comprising a plurality of the motion controllers and a synchronous network connecting the plurality of motors.
複数台のモーションコントローラに対して指令を生成する指令生成部と、前記指令生成部が生成した指令を前記モーションコントローラに送信する通信処理部とを備えた上位コントローラと、
前記上位コントローラと通信するための手段を提供する上位通信処理部と、前記上位通信処理部を介して前記上位コントローラが出した上位指令を受け取り解析し、動作軌跡を表すモーション指令を生成する上位指令解析部と、前記上位指令解析部が生成したモーション指令を生成された順番どおりに保持するモーション指令FIFOと、前記モーション指令FIFOの先頭に保持されたモーション指令に従って接続されたモータに対する時々刻々の指令値を算出するモーション指令処理部と、前記モーション指令処理部が生成した前記モータに対する時々刻々の指令値を前記モータに送信し、前記モータからの応答値を受信する同期通信処理部と、を備えたモーションコントローラと、
前記モーションコントローラから送信された指令値を受信し、応答を送信するモータと、
前記上位コントローラと複数の前記モーションコントローラを接続する上位ネットワークと、
複数の前記モーションコントローラと複数の前記モータを接続する同期ネットワークと、
から構成されるモーションコントロール装置の同期方法において、
前記モーション指令FIFOの先頭に同期指令を検出すると準備完了パケットを前記同期ネットワーク上に送出し、準備完了パケットを他の前記モーションコントローラが受信するまで待ち、同期して動作する前記モーションコントローラの準備完了状態を表した準備完了フラグが全てtrueになった場合に前記モータに対する時々刻々の指令値を算出する手順で処理することを特徴とするモーションコントロール装置の同期方法。
A host controller including a command generation unit that generates a command for a plurality of motion controllers, and a communication processing unit that transmits the command generated by the command generation unit to the motion controller;
A host communication processing unit that provides means for communicating with the host controller, and a host command that receives and analyzes the host command issued by the host controller via the host communication processing unit, and generates a motion command that represents an operation trajectory An analysis unit, a motion command FIFO that holds the motion commands generated by the higher-level command analysis unit in the order in which they were generated, and a command for each motor connected according to the motion command held at the head of the motion command FIFO A motion command processing unit that calculates a value, and a synchronous communication processing unit that transmits a command value for the motor generated by the motion command processing unit to the motor and receives a response value from the motor. Motion controller
A motor that receives a command value transmitted from the motion controller and transmits a response;
A host network connecting the host controller and the plurality of motion controllers;
A synchronization network connecting the plurality of motion controllers and the plurality of motors;
In the synchronization method of the motion control device composed of
When a synchronization command is detected at the head of the motion command FIFO, a ready packet is sent out on the synchronous network, and a wait is received until another motion controller receives a ready packet, and the motion controller operating in synchronization is ready. A synchronization method for a motion control apparatus, characterized in that processing is performed in accordance with a procedure for calculating a command value for each motor when the preparation completion flags representing the state are all true.
JP2007170959A 2007-06-28 2007-06-28 Host controller, motion controller, motion control device, and synchronous method therefor Pending JP2009009409A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007170959A JP2009009409A (en) 2007-06-28 2007-06-28 Host controller, motion controller, motion control device, and synchronous method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007170959A JP2009009409A (en) 2007-06-28 2007-06-28 Host controller, motion controller, motion control device, and synchronous method therefor

Publications (1)

Publication Number Publication Date
JP2009009409A true JP2009009409A (en) 2009-01-15

Family

ID=40324415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007170959A Pending JP2009009409A (en) 2007-06-28 2007-06-28 Host controller, motion controller, motion control device, and synchronous method therefor

Country Status (1)

Country Link
JP (1) JP2009009409A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012529706A (en) * 2009-06-10 2012-11-22 ザ・ボーイング・カンパニー Performing shared term-based distributed tasks
JP2018153882A (en) * 2017-03-16 2018-10-04 株式会社安川電機 Control system, controller, and control method
KR20190023199A (en) * 2017-08-28 2019-03-08 (주)이노시뮬레이션 Motion Buffer Control Method of Real-Time Motion Simulation System

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012529706A (en) * 2009-06-10 2012-11-22 ザ・ボーイング・カンパニー Performing shared term-based distributed tasks
JP2018153882A (en) * 2017-03-16 2018-10-04 株式会社安川電機 Control system, controller, and control method
US10710242B2 (en) 2017-03-16 2020-07-14 Kabushiki Kaisha Yaskawa Denki Controller, control system, and control method
KR20190023199A (en) * 2017-08-28 2019-03-08 (주)이노시뮬레이션 Motion Buffer Control Method of Real-Time Motion Simulation System
KR102126270B1 (en) * 2017-08-28 2020-06-24 (주)이노시뮬레이션 Motion Buffer Control Method of Real-Time Motion Simulation System

Similar Documents

Publication Publication Date Title
US7778814B2 (en) Method and device for simulating an automation system
JP4188588B2 (en) Method and display system for updating an image frame on a screen
CN110412921B (en) Robot single-leg high-real-time control system based on EtherCAT
JP2006236243A (en) Motion control system and its synchronizing method
JP6370027B2 (en) Continuous read burst support at high clock speeds
US20210373530A1 (en) Synchronization control device, synchronization control system, synchronization control method, and simulation device
JP2009009409A (en) Host controller, motion controller, motion control device, and synchronous method therefor
JP5402401B2 (en) Motion control system
CN111052012B (en) Control device and control system
JP4733695B2 (en) Method and apparatus for simulation of automated systems
JP7230703B2 (en) Control device
JP4814882B2 (en) Communication system and communication apparatus
US10037169B2 (en) Image processing semiconductor device and image processing device
JP6576790B2 (en) Motor control device
JP2009003633A (en) Information processor
WO1999040518A1 (en) Method and apparatus to synchronize graphics rendering and display
JP2007241744A (en) Motion controller and its command method
JP2006309507A (en) Servo control method and servo control system
KR101610220B1 (en) Method for software pipelining of multi-domain motion control, recording medium and device for performing the method
WO2020137522A1 (en) Synchronization control device, synchronization control system, synchronization control method, and simulation device
JP4088297B2 (en) Processor
JP2008289259A (en) Positioning controller, drive controller, and control system computation communication processing method
JP7318406B2 (en) Control device
JP4633378B2 (en) Elevator control information transmission control circuit
CN117348501A (en) Linkage control method and linkage control system for multiple motion control cards