[go: up one dir, main page]

JP2019103176A - Multishaft motor control system - Google Patents

Multishaft motor control system Download PDF

Info

Publication number
JP2019103176A
JP2019103176A JP2017228944A JP2017228944A JP2019103176A JP 2019103176 A JP2019103176 A JP 2019103176A JP 2017228944 A JP2017228944 A JP 2017228944A JP 2017228944 A JP2017228944 A JP 2017228944A JP 2019103176 A JP2019103176 A JP 2019103176A
Authority
JP
Japan
Prior art keywords
master
slave
control
transmission data
timing
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
JP2017228944A
Other languages
Japanese (ja)
Inventor
達也 猪野
Tatsuya Ino
達也 猪野
鈴木 二郎
Jiro Suzuki
二郎 鈴木
悟 赤瀬
Satoru Akase
悟 赤瀬
満雄 寺村
Mitsuo Teramura
満雄 寺村
良太 竹原
Ryota Takehara
良太 竹原
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.)
CKD Nikki Denso Co Ltd
Original Assignee
Nikki Denso Co Ltd
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 Nikki Denso Co Ltd filed Critical Nikki Denso Co Ltd
Priority to JP2017228944A priority Critical patent/JP2019103176A/en
Publication of JP2019103176A publication Critical patent/JP2019103176A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Control Of Multiple Motors (AREA)

Abstract

To provide a control system in which a more strict synchronization can be obtained between a master device and each slave device, and between the slave devices.SOLUTION: A multishaft motor control system 1 includes: a master device 2; and a plurality of slave devices 3 connected to the master device in an individual transmission channel each other, and controlling a plurality of multiple-spindle system motors 5. The master device 2 includes a data transmission part transmitting simultaneously master transmission data MD of a fixed length in a prescribed period to the plurality of slave devices 3. Each slave device 3 includes a control part 21 outputting a control signal CD to each motor 5 by determining control timing on the basis of a count value in a counter 41 counting a count setting value set in accordance with the prescribed period, and adjusting the count setting value on the basis of reception timing of a prescribed bit in the master transmission data MD from the master device 2.SELECTED DRAWING: Figure 5

Description

本発明は、多軸モータ制御システムに関する。   The present invention relates to a multi-axis motor control system.

従来より、マルチドロップ、デイジーチェーン等の通信ラインで、マスタ装置と接続された複数のスレーブ装置を含む制御システムがある。各スレーブ装置は、マスタ装置からの制御コマンドを受けて被制御機器に対する各種制御を実行する。   BACKGROUND Conventionally, there is a control system including a plurality of slave devices connected to a master device by communication lines such as multidrop and daisy chain. Each slave device receives control commands from the master device and executes various controls on the controlled device.

このような制御システムにおいて、マスタ装置とスレーブ装置間及びスレーブ装置間で同期を取って各種制御動作を行うときは、通常、マスタ装置が同期コマンド信号をスレーブ装置である複数の制御装置へ送信することにより、マスタ装置とスレーブ装置間及びスレーブ装置間の同期が取られる。例えば、国際公開第2008/123272号には、同期フレームを用いて複数のスレーブ装置間の同期を取る通信システムが開示されている。各スレーブ装置は、受信した同期フレームに基づいて、マスタ装置との同期及びスレーブ装置間での同期を取ることができる。   In such a control system, when synchronization is performed between the master device and the slave device and between the slave devices to perform various control operations, the master device normally transmits synchronization command signals to a plurality of control devices as slave devices. Thereby, synchronization is established between the master device and the slave device and between the slave devices. For example, WO 2008/123272 discloses a communication system for synchronizing a plurality of slave devices using a synchronization frame. Each slave device can synchronize with the master device and synchronize between slave devices based on the received synchronization frame.

国際公開第2008/123272号International Publication No. 2008/123272

しかし、信号の伝播遅れ、装置内転送時間などを考慮しながら、マスタ装置とスレーブ装置間の同期及びスレーブ装置間における同期のタイミング精度を高くしようとしても、同期コマンド信号を用いた同期の方法の場合、同期コマンド信号の送受信及びその送受信処理が行われるまでの間は、マスタ装置と各スレーブ装置間の同期、及びスレーブ装置間での同期は確保されておらず、より高い精度の同期タイミングが得られないという問題がある。   However, in order to increase the timing accuracy of synchronization between the master device and the slave device and synchronization between the slave devices while taking into consideration propagation delay of the signal, transfer time in the device, etc., the synchronization method using the synchronization command signal is used. In this case, transmission and reception of the synchronization command signal and synchronization between the master device and each slave device and synchronization between the slave devices are not secured until the transmission and reception processing is performed, and synchronization timing with higher accuracy is obtained. There is a problem that it can not be obtained.

例えば、複数のモータを連携させながら対象物に対する加工動作、移動動作等を行うような多軸モータ制御システムの場合、複数のモータの同期が厳密にとられていないと、高い精度で、対象物に対する加工、移動などができない。   For example, in the case of a multi-axis motor control system that performs processing operation, movement operation, etc. on an object while linking a plurality of motors, the object is highly accurate if the synchronization of the plurality of motors is not strictly taken. Can not process, move, etc.

そこで、本発明は、マスタ装置とスレーブ装置間及びスレーブ装置間においてより厳密な同期が得られる制御システムを提供することを目的とする。   Therefore, an object of the present invention is to provide a control system capable of obtaining more precise synchronization between a master device and a slave device and between slave devices.

本発明の一態様の多軸モータ制御システムは、マスタ装置と、各々が個別の伝送路で前記マスタ装置と接続され、多軸駆動系の複数のモータを制御する複数のスレーブ装置と、を含む多軸モータ制御システムであって、前記マスタ装置は、所定の周期で固定長の第1の送信データを複数のスレーブ装置へ同時に送信するデータ送信部を有し、各スレーブ装置は、前記所定の周期に応じて設定されたカウント設定値をカウントするカウンタにおけるカウント値に基づいて制御タイミングを決定してモータへの制御信号を出力すると共に、前記マスタ装置からの前記第1の送信データ中の所定のビットの受信タイミングに基づいて前記カウント設定値を調整する制御部を有する。   A multi-axis motor control system according to one aspect of the present invention includes a master device, and a plurality of slave devices each connected to the master device by a separate transmission line and controlling a plurality of motors of a multi-axis drive system. A multi-axis motor control system, wherein the master device has a data transmission unit that simultaneously transmits, to a plurality of slave devices, first transmission data of a fixed length at a predetermined cycle, and each slave device performs the predetermined A control timing is determined based on a count value in a counter that counts a count setting value set according to a cycle, and a control signal to the motor is output, and a predetermined one of the first transmission data from the master device is output. And a controller configured to adjust the count setting value based on the reception timing of the bit.

本発明によれば、マスタ装置とスレーブ装置間及びスレーブ装置間においてより厳密な同期が得られる多軸モータ制御システムを提供することができる。   According to the present invention, it is possible to provide a multi-axis motor control system in which tighter synchronization can be obtained between a master device and a slave device and between slave devices.

本発明の実施の形態に係わる制御システムの構成を示す構成図である。It is a block diagram which shows the structure of the control system concerning embodiment of this invention. 本発明の実施の形態に係わる、マスタ・スレーブ間で行われる同期通信を説明するための図である。It is a figure for demonstrating the synchronous communication performed between a master and a slave concerning embodiment of this invention. 本発明の実施の形態に係わる、マスタ2とスレーブ3間での通信のシーケンス例を示す図である。It is a figure which shows the example of a sequence of communication between the master 2 and the slave 3 according to the embodiment of the present invention. 本発明の実施の形態に係わる、同期開始時の1回目の同期方法を説明するための図である。FIG. 7 is a diagram for describing a first synchronization method at the start of synchronization according to the embodiment of the present invention. 本発明の実施の形態に係わる、2回目以降の同期方法を説明するための図である。It is a figure for demonstrating the synchronization method after the 2nd time concerning embodiment of this invention.

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

図1は、本実施の形態に係わる制御システムの構成を示す構成図である。   FIG. 1 is a block diagram showing the configuration of a control system according to the present embodiment.

制御システム1は、システム全体を制御するマスタ装置(以下、マスタという)2と、複数のスレーブ装置(以下、スレーブという)3と、マスタ2と複数のスレーブ3を接続する複数の伝送路4とを含んで構成される。複数のスレーブ3は、被制御装置である複数台(ここでは、N(Nは、正の整数である)台)のモータ5に接続される。各スレーブ3は、個別の伝送路4を介してマスタ2と接続される。複数のスレーブ3は、多軸駆動系の複数のモータを制御し、マスタ2からの指令に応じてモータ5をサーボ制御する。よって、制御システム1は、多軸モータ制御システムである。   The control system 1 includes a master device (hereinafter referred to as a master) 2 for controlling the entire system, a plurality of slave devices (hereinafter referred to as a slave) 3, and a plurality of transmission paths 4 for connecting the master 2 and the plurality of slaves 3. It is comprised including. The plurality of slaves 3 are connected to a plurality of (here, N (N is a positive integer)) motors 5 as controlled devices. Each slave 3 is connected to the master 2 via an individual transmission path 4. The plurality of slaves 3 control the plurality of motors of the multi-axis drive system, and servo-control the motor 5 according to the command from the master 2. Thus, the control system 1 is a multi-axis motor control system.

マスタ2は、制御部11と、記憶装置12と、通信制御部13とを含む。制御部11は、フィールドプログラマブルゲートアレイ(以下、FPGAという)などにより構成されている。   Master 2 includes a control unit 11, a storage device 12, and a communication control unit 13. The control unit 11 is configured of a field programmable gate array (hereinafter referred to as an FPGA) or the like.

記憶装置12は、フラッシュメモリ、ハードディスクドライブなどの比較的大型の記憶装置であり、制御プログラム、管理プログラムなどのソフトウェアプログラム、及び各種制御パラメータデータ、制御システム1内の各種プロセスデータなどを記憶する。   The storage device 12 is a relatively large storage device such as a flash memory or a hard disk drive, and stores control programs, software programs such as a management program, various control parameter data, various process data in the control system 1 and the like.

通信制御部13は、N台のスレーブ3との通信を行う制御回路である。通信制御部13は、制御部11からの指示に基づいてデータの送信を行い、データを受信すると受信したデータを制御部11へ出力する。
通信制御部13は、カウンタ31を有している。カウンタ31は、制御周期TSである1サイクルに対応するカウント値をカウントするためのカウンタである。1回の制御周期TSを1サイクルとする。
The communication control unit 13 is a control circuit that communicates with the N slaves 3. The communication control unit 13 transmits data based on an instruction from the control unit 11, and outputs the received data to the control unit 11 when the data is received.
The communication control unit 13 has a counter 31. The counter 31 is a counter for counting the count value corresponding to one cycle which is the control cycle TS. One control cycle TS is one cycle.

カウンタ31には、マスタ2の有するクロック回路32に基づいてカウントアップされたカウント値が格納される。クロック回路32は、水晶振動子を含み、カウンタ31をカウントアップするためのクロック信号を、その水晶振動子の出力信号から生成する。   The counter 31 stores the count value counted up based on the clock circuit 32 of the master 2. The clock circuit 32 includes a quartz oscillator, and generates a clock signal for counting up the counter 31 from the output signal of the quartz oscillator.

マスタ2の記憶装置12には、制御周期TSに対応するn(ここでは、nは正の整数である)が、カウント設定値CSとして記憶され、通信制御部13は、カウンタ31のカウント値がnになると1サイクルの終了と判定し、カウンタ31をクリアしてカウントアップを再開するようにカウントを繰り返す。   In the storage device 12 of the master 2, n (here, n is a positive integer) corresponding to the control cycle TS is stored as the count setting value CS, and the communication control unit 13 calculates the count value of the counter 31. When n is reached, it is determined that one cycle has ended, and the counter 31 is cleared to repeat counting so as to restart counting.

通信制御部13は、カウンタ31のカウント設定値CSまでのカウントを繰り返し、制御部11は、カウンタ31のカウント値を参照しながら、多軸モータ制御システムの制御動作のタイミングを決定する。言い換えれば、カウンタ31は、マスタ2において制御周期TS、すなわち制御タイミングのインターバル時間、を計測するためのカウンタである。   The communication control unit 13 repeats counting up to the count setting value CS of the counter 31, and the control unit 11 determines the timing of the control operation of the multi-axis motor control system while referring to the count value of the counter 31. In other words, the counter 31 is a counter for measuring the control cycle TS in the master 2, that is, the interval time of the control timing.

後述するように、マスタ2は、N台のスレーブ3を互いに同期して動作させるためのマスタ送信データMDをN台のスレーブ3へ同時に送信することによって、マスタ2とN台のスレーブ3は、同じ制御周期TSでサイクリックに動作する。   As will be described later, the master 2 and the N slaves 3 transmit the master transmission data MD simultaneously for operating the N slaves 3 in synchronization with each other to the N slaves 3, It operates cyclically in the same control cycle TS.

マスタ2は、記憶装置12に格納された制御プログラムを読み出して実行することによって、カウンタ31のカウント値を参照しながら、N台のスレーブ3に対して制御コマンド信号を生成し、マスタ送信データMDに含ませて通信制御部13からN台のスレーブ3へ送信する。制御プログラムは、互いに同期した所定の動作をN台のモータ5にさせるための処理を実行させるためのプログラムである。制御コマンドには、モータ5をサーボ制御する指令以外に、スレーブ3のメモリ等の内部データを書き替え/読み出しする指令もある。   The master 2 reads out and executes the control program stored in the storage device 12 to generate control command signals for the N slaves 3 while referring to the count value of the counter 31, and transmits master transmission data MD. , And transmitted to the N slaves 3 from the communication control unit 13. The control program is a program for executing processing for causing the N motors 5 to perform predetermined operations synchronized with each other. As the control command, in addition to a command for servo-controlling the motor 5, there is also a command for rewriting / reading internal data of the memory of the slave 3 or the like.

上述したように、マスタ2では、カウンタ31のカウント値は所定のカウント設定値CSになるとクリアされて、再度カウンタ31のカウントアップが再開されるというように、カウントが繰り返される。マスタ2は、制御コマンド信号などの各種信号を含むマスタ送信データMDをN台のスレーブ3へ同時に送信する。   As described above, in the master 2, the count value of the counter 31 is cleared when it reaches the predetermined count set value CS, and the count is repeated so that the count-up of the counter 31 is resumed again. The master 2 simultaneously transmits master transmission data MD including various signals such as control command signals to N slaves 3.

マスタ2とN台のスレーブ3は、N本の伝送路4を含むネットワーク6により接続されている。各スレーブ3は、対応する伝送路4によりマスタ2と一対一で接続されている。言い換えれば、制御システム1は、マスタ2とN台のスレーブ3が、スター型のネットワーク6により接続されている。
各伝送路4は、全二重通信路からなる。よって、各伝送路4は、2つの通信ライン4a、4b(図2)を有する。
The master 2 and the N slaves 3 are connected by a network 6 including N transmission paths 4. Each slave 3 is connected to the master 2 in a one-to-one manner by the corresponding transmission path 4. In other words, in the control system 1, the master 2 and N slaves 3 are connected by the star network 6.
Each transmission line 4 comprises a full duplex communication line. Thus, each transmission line 4 has two communication lines 4a, 4b (FIG. 2).

スレーブ3は、制御部21と、通信制御部22と、駆動回路23とを含む。スレーブ3は、スレーブ3に接続されたモータ5を、マスタ2からの制御コマンド信号に応じてサーボ制御する制御装置である。
制御部21は、FPGAなどにより構成されており、マスタ2からの制御コマンドに応じて、制御信号CDを生成して、駆動回路23へ出力する。
The slave 3 includes a control unit 21, a communication control unit 22, and a drive circuit 23. The slave 3 is a control device that servo-controls the motor 5 connected to the slave 3 according to a control command signal from the master 2.
The control unit 21 is configured by an FPGA or the like, generates a control signal CD according to a control command from the master 2, and outputs the control signal CD to the drive circuit 23.

通信制御部22は、伝送路4を介してマスタ2と通信する回路である。通信制御部22は、制御部21からの指示に基づいてデータの送信を行い、データを受信すると受信したデータを制御部21へ出力する。
通信制御部22は、カウンタ41を有している。カウンタ41は、マスタ2と同じ制御周期TSに応じて設定されたカウント設定値CSをカウントするためのカウンタである。
The communication control unit 22 is a circuit that communicates with the master 2 via the transmission path 4. The communication control unit 22 transmits data based on an instruction from the control unit 21, and outputs the received data to the control unit 21 when the data is received.
The communication control unit 22 has a counter 41. The counter 41 is a counter for counting a count setting value CS set according to the same control cycle TS as the master 2.

カウンタ41には、スレーブ3の有するクロック回路42に基づいてカウントアップされたカウント値が格納される。クロック回路42は、水晶振動子を含み、カウンタ41をカウントアップするためのクロック信号を、その水晶振動子の出力信号から生成する。   The counter 41 stores the count value counted up based on the clock circuit 42 of the slave 3. The clock circuit 42 includes a quartz oscillator, and generates a clock signal for counting up the counter 41 from the output signal of the quartz oscillator.

各スレーブ3の制御部21は、カウンタ41のカウント値を参照しながら、制御周期TSの制御タイミングになったと判定すると、制御信号CDを駆動回路23へ出力する。制御周期TSの制御タイミングは、カウント設定値CSによって規定される。後述するように、カウント設定値CSは、同期基準点におけるカウンタ41のカウント値によって調整される。カウンタ41は、スレーブ3において、制御周期すなわち制御タイミングのインターバル時間を計測するためのカウンタである。   The control unit 21 of each slave 3 outputs the control signal CD to the drive circuit 23 when determining that the control timing of the control cycle TS has come while referring to the count value of the counter 41. The control timing of the control cycle TS is defined by the count setting value CS. As described later, the count setting value CS is adjusted by the count value of the counter 41 at the synchronization reference point. The counter 41 is a counter for measuring a control period, that is, an interval time of control timing in the slave 3.

また、制御部21は、遅延量データを記憶する遅延量記憶部43を有している。遅延量データは、各スレーブ3に接続されたモータ5の特性に応じて、制御信号CDの出力タイミングを遅らせるための時間データである。N台のスレーブ3間で、遅延量データは、同じでもよいし、異なっていてもよい。遅延量記憶部43の遅延量データは、外部から設定変更可能である。   The control unit 21 also has a delay amount storage unit 43 that stores delay amount data. The delay amount data is time data for delaying the output timing of the control signal CD in accordance with the characteristics of the motor 5 connected to each slave 3. The delay amount data may be the same or different among the N slaves 3. The delay amount data in the delay amount storage unit 43 can be set and changed from the outside.

マスタ2の制御周期TSとスレーブ3の制御周期TSは同じでなければならないが、マスタ2のクロック回路32の水晶振動子とスレーブ3のクロック回路42の水晶振動子の振動数には、個体差があるため、各スレーブ3の制御タイミングとマスタ2の制御タイミングにずれが生じると共に、スレーブ3間においても制御タイミングにずれが生じる。
そこで、各スレーブ3の遅延量記憶部43の遅延量データが全スレーブ3ともに等しければ、後述するように、カウント設定値CSを調整することにより、他のスレーブ3と制御信号の出力タイミングが一致するように、制御タイミングは調整される。
遅延量記憶部43の遅延量データがスレーブ3間で違えば、各スレーブ3は、遅延量データに従い、制御信号の出力タイミングである制御タイミングはさらに調整される。
Although the control cycle TS of the master 2 and the control cycle TS of the slave 3 must be the same, individual differences in the frequency of the crystal oscillator of the clock circuit 32 of the master 2 and the crystal oscillator of the clock circuit 42 of the slave 3 As a result, the control timing of each slave 3 and the control timing of the master 2 are deviated, and the control timing is also deviated between the slaves 3.
Therefore, if the delay amount data of the delay amount storage unit 43 of each slave 3 is equal for all slaves 3, the output timing of the control signal matches that of the other slave 3 by adjusting the count setting value CS as described later. Control timing is adjusted.
If the delay amount data in the delay amount storage unit 43 differs among the slaves 3, each slave 3 further adjusts the control timing which is the output timing of the control signal according to the delay amount data.

駆動回路23は、制御部21からの制御信号CDに応じて駆動信号DSを生成してモータ5へ出力する回路である。駆動回路23は、制御信号CDに応じた電流信号である駆動信号DSをモータ5へ出力する。
マスタ2が、制御コマンド信号を含むマスタ送信データMDを、N台のスレーブ3へ同時に送信し、スレーブ3の制御部21は、カウント設定値CSにより規定された制御タイミングで制御コマンド信号に応じた制御信号CDを生成して駆動回路23へ出力する。各スレーブ3は、カウンタ41のカウント値がカウント設定値CSになった時を、制御タイミングとして、その制御タイミングで駆動信号DSをモータ5へ出力する。
The drive circuit 23 is a circuit that generates a drive signal DS in response to the control signal CD from the control unit 21 and outputs the drive signal DS to the motor 5. The drive circuit 23 outputs a drive signal DS, which is a current signal corresponding to the control signal CD, to the motor 5.
The master 2 simultaneously transmits master transmission data MD including a control command signal to the N slaves 3, and the control unit 21 of the slave 3 responds to the control command signal at the control timing defined by the count setting value CS. The control signal CD is generated and output to the drive circuit 23. Each slave 3 outputs the drive signal DS to the motor 5 at the control timing as the control timing when the count value of the counter 41 reaches the count set value CS.

後述するように、制御タイミングを規定するカウンタ41のカウント設定値CSは、マスタ2からのマスタ送信データMDの受信タイミングで調整される。
(マスタ・スレーブ間通信)
図2は、マスタ・スレーブ間で行われる同期通信を説明するための図である。
As described later, the count setting value CS of the counter 41 that defines the control timing is adjusted at the reception timing of the master transmission data MD from the master 2.
(Master-slave communication)
FIG. 2 is a diagram for explaining synchronous communication performed between a master and a slave.

マスタ・スレーブ間通信は、サイクリックに行われる。マスタ2において制御周期TSにより規定される1サイクル中に一往復通信が行われるように、マスタ・スレーブ間通信は行われる。以下、マスタ2から各スレーブ3へ送信される送信データをマスタ送信データMDとし、各スレーブ3からマスタ2へ送信される送信データをスレーブ送信データSDとする。   Master-slave communication is performed cyclically. The master-slave communication is performed such that one reciprocation communication is performed in one cycle defined by the control cycle TS in the master 2. Hereinafter, transmission data transmitted from the master 2 to each slave 3 is referred to as master transmission data MD, and transmission data transmitted from each slave 3 to the master 2 is referred to as slave transmission data SD.

上述したように、マスタ2と各スレーブ3との間は、伝送路4を介して一対一で接続され、全二重通信方式で通信が行われる。マスタ2からのマスタ送信データMDの送信は伝送路4の通信ライン4aを介して行われ、スレーブ3からのスレーブ送信データSDの送信は伝送路4の通信ライン4bを介して行われる。すなわち、マスタ2の通信制御部13は、全二重通信方式の下、N台のスレーブ3へマスタ送信データMDを同時に送信することができるように構成されている。   As described above, the master 2 and the slaves 3 are connected one-to-one via the transmission path 4 and communication is performed by the full-duplex communication method. The transmission of the master transmission data MD from the master 2 is performed via the communication line 4 a of the transmission path 4, and the transmission of the slave transmission data SD from the slave 3 is performed via the communication line 4 b of the transmission path 4. That is, the communication control unit 13 of the master 2 is configured to be able to simultaneously transmit the master transmission data MD to the N slaves 3 under the full-duplex communication scheme.

また、上述したように、マスタ2は、N台のスレーブ3へのマスタ送信データMDの送信を同時に行う。すなわち、マスタ送信データMDは、受信タイミングが一致するようにN台のスレーブ3へ同時に送信される。   Further, as described above, the master 2 simultaneously transmits the master transmission data MD to the N slaves 3. That is, the master transmission data MD is simultaneously transmitted to the N slaves 3 so that the reception timings coincide.

さらに、マスタ送信データMDは、固定長データであり、マスタ2は、マスタ送信データMDの送信を所定の周期でサイクリックに行っている。よって、マスタ2の通信制御部13は、所定の周期で固定長の送信データを複数のスレーブ3へ同時に送信するデータ送信部を構成する。   Further, master transmission data MD is fixed length data, and master 2 cyclically transmits master transmission data MD at a predetermined cycle. Therefore, the communication control unit 13 of the master 2 configures a data transmission unit that simultaneously transmits transmission data of a fixed length to a plurality of slaves 3 in a predetermined cycle.

マスタ2は、自己の制御タイミングに合わせてマスタ送信データMDをサイクリックに送信する。N台のスレーブ3は、マスタ2から固定長データであるマスタ送信データMDを同時に受信する。   The master 2 cyclically transmits master transmission data MD in accordance with its own control timing. The N slaves 3 simultaneously receive from the master 2 master transmission data MD which is fixed length data.

各スレーブ3では、マスタ送信データMDの先頭ビットHbが最初に受信され、最終ビットLbが最後に受信される。各スレーブ3の制御部21は、通信制御部22からマスタ送信データMDの受信を開始したことが通知されると、マスタ送信データMDは固定長データでありかつマスタ・スレーブ間の通信速度も予め決まっているため、受信の開始のタイミングに基づき最終ビットLbの受信タイミングを制御タイミングとして決定する。   In each slave 3, the first bit Hb of the master transmission data MD is received first, and the last bit Lb is received last. When the control unit 21 of each slave 3 is notified from the communication control unit 22 that the reception of the master transmission data MD has been started, the master transmission data MD is fixed length data and the communication speed between the master and the slave is also in advance. Since it is decided, the reception timing of the last bit Lb is determined as the control timing based on the timing of the start of reception.

具体的には、各スレーブ3では、この最終ビットLbの受信終了タイミング(すなわち受信終了データ位置)を制御タイミングの同期基準点rpとして、制御タイミングがこの同期基準点に合うように、カウント設定値CSの値を調整することによって、制御タイミングを設定する。   Specifically, in each slave 3, the count setting value is set such that the control timing matches the synchronization reference point, with the reception end timing of the last bit Lb (that is, the reception end data position) as the synchronization reference point rp of the control timing. Control timing is set by adjusting the value of CS.

図3は、マスタ2とスレーブ3間での通信のシーケンスを示す図である。
マスタ2は、互いに所定の制御タイミングで連携してN台のモータ5を動作させるときは、マスタ2は、N台のスレーブ3にそのような連携動作をさせるための制御コマンド信号を含むマスタ送信データMDを生成してN台のスレーブ3に同時に送信する。マスタ2は、サイクル毎にマスタ送信データMDをN台のスレーブ3に同時にブロードキャストで送信し、N台のスレーブ3はマスタ送信データMDを同時に受信する。
FIG. 3 is a diagram showing a sequence of communication between the master 2 and the slave 3.
When the master 2 operates N motors 5 in cooperation with each other at a predetermined control timing, the master 2 performs master transmission including a control command signal for causing the N slaves 3 to perform such cooperation. Data MD is generated and simultaneously transmitted to N slaves 3. The master 2 simultaneously broadcasts master transmission data MD to N slaves 3 in each cycle, and the N slaves 3 simultaneously receive the master transmission data MD.

マスタ2からのマスタ送信データMDに含まれる制御コマンド信号は、全スレーブ3に対して同じでもよく、スレーブ3間で異なっていてもよい。
各スレーブ3は、マスタ2からのブロードキャストによるマスタ送信データMDを受信後、固定長のスレーブ送信データSDの送信を開始する。スレーブ送信データSDは、マスタ送信データMDに対するACK信号、モータ5のステータスデータを含むプロセスデータ、等々を含む。
The control command signal included in master transmission data MD from the master 2 may be the same for all slaves 3 or may be different among the slaves 3.
After receiving the master transmission data MD by broadcast from the master 2, each slave 3 starts transmission of slave transmission data SD of a fixed length. The slave transmission data SD includes an ACK signal for the master transmission data MD, process data including status data of the motor 5, and the like.

以上のように、マスタ2と各スレーブ3間では、1サイクル中に1往復のデータの送受信が行われる。
なお、マスタ送信データMDのサイズ(ビット数)とスレーブ送信データSDのサイズ(ビット数)は、同じであっても、異なっていてもよい。
As described above, one round-trip data transmission / reception is performed between the master 2 and each slave 3 in one cycle.
The size (the number of bits) of master transmission data MD and the size (the number of bits) of slave transmission data SD may be the same or different.

以上より、1サイクルは、マスタ送信データMDの送信と、マスタ送信データMDの送信後にスレーブ送信データSDが通信できる時間である。すなわち、1サイクルは、マスタ2と各スレーブ3間で2つの固定長データを送信するのに必要な時間以上の長さの期間である。   As described above, one cycle is a time in which the slave transmission data SD can be communicated after transmission of the master transmission data MD and transmission of the master transmission data MD. That is, one cycle is a period longer than the time required to transmit two fixed length data between the master 2 and each slave 3.

例えば、マスタ送信データMD及びスレーブ送信データSDは、100〜数百ビットのデータである。1サイクル長をC(秒)とし、マスタ送信データMDとスレーブ送信データSDを合わせたデータの合計ビット数をBとし、通信速度をS(ビット/秒)としたとき、C,BとSは、C>(B/S)の関係を有する。Cは、例えば、数十マイクロ秒である。   For example, master transmission data MD and slave transmission data SD are data of 100 to several hundred bits. Assuming that one cycle length is C (seconds), the total number of bits of data obtained by combining master transmission data MD and slave transmission data SD is B, and the communication speed is S (bits / second), C, B and S are , C> (B / S). C is, for example, several tens of microseconds.

よって、マスタ2と各スレーブ3間の通信速度は、1サイクル内で、マスタ送信データMDとスレーブ送信データSDの送受信ができる速度である。
各スレーブ3では、後述するように、マスタ2からのマスタ送信データMDの受信タイミングに基づいて制御タイミングが決定され、決定した制御タイミングで駆動信号DSがモータ5へ出力される。
Therefore, the communication speed between the master 2 and each slave 3 is a speed at which the master transmission data MD and the slave transmission data SD can be transmitted and received within one cycle.
In each slave 3, as described later, the control timing is determined based on the reception timing of the master transmission data MD from the master 2, and the drive signal DS is output to the motor 5 at the determined control timing.

マスタ2では、クロック回路32に基づいてサイクルのタイミングが決定される。各スレーブでは、クロック回路42に基づいてサイクルのタイミングが決定される。
しかし、マスタ2のクロック回路32の水晶振動子、及び各スレーブ3のクロック回路42の水晶振動子には、個体差があるため、マスタ2とスレーブ3間で及び複数のスレーブ3間で、制御タイミングを合わせようとしても、同期タイミングを厳密に一致させることは極めて困難である。
The master 2 determines the cycle timing based on the clock circuit 32. In each slave, the timing of the cycle is determined based on the clock circuit 42.
However, since the crystal oscillator of the clock circuit 32 of the master 2 and the crystal oscillator of the clock circuit 42 of each slave 3 have individual differences, control is performed between the master 2 and the slave 3 and between the plurality of slaves 3 Even when trying to match the timing, it is extremely difficult to match the synchronization timing exactly.

そこで、本実施の形態では、マスタ2からのマスタ送信データMDの受信タイミングに基づいて各スレーブ3のカウント設定値CSを調整することにより、マスタ2とスレーブ3間及び複数のスレーブ3間での制御タイミングを一致させている。   Therefore, in the present embodiment, the count setting value CS of each slave 3 is adjusted based on the reception timing of the master transmission data MD from the master 2 so that the master 2 and the slaves 3 and between the plurality of slaves 3 can be adjusted. Control timing is matched.

具体的には、各スレーブ3の通信制御部22がマスタ送信データMDの受信を開始すると、制御部21は、マスタ送信データMDの最後のビットの立ち下がりタイミングを判定して、次のサイクルにおける制御タイミングを調整する。   Specifically, when the communication control unit 22 of each slave 3 starts reception of the master transmission data MD, the control unit 21 determines the fall timing of the last bit of the master transmission data MD, and in the next cycle, Adjust control timing.

次に、マスタ2とスレーブ3間の同期方法について説明する。
(同期方法)
各スレーブ3は、マスタ2と通信をしながらモータ5を制御するが、マスタ2と通信をしないで単独でモータ5を制御することもできる。その場合、複数のスレーブ3間では同期は取られていない。
Next, the synchronization method between the master 2 and the slave 3 will be described.
(Synchronization method)
Each slave 3 controls the motor 5 while communicating with the master 2, but may control the motor 5 independently without communicating with the master 2. In that case, synchronization is not taken among the plurality of slaves 3.

各スレーブ3は、マスタ2と通信をしていないときは、設定された制御周期TSで駆動信号DSを生成してモータ5へ出力する。例えば、各スレーブ3の制御部21は、カウンタ41のカウント値が制御周期TSに対応するnになったかを検出する。nは、制御周期TSに対応する値であり、マスタ2において1サイクルを規定するカウント設定値CSと同じである。   When not communicating with the master 2, each slave 3 generates a drive signal DS at a set control cycle TS and outputs it to the motor 5. For example, the control unit 21 of each slave 3 detects whether the count value of the counter 41 has become n corresponding to the control cycle TS. n is a value corresponding to the control cycle TS, and is the same as the count set value CS defining one cycle in the master 2.

マスタ2は、カウンタ31のカウント値がnになる度に、サイクルを更新する。
各スレーブ3は、カウンタ41のカウントを繰り返し、カウンタ41のカウント値がカウント設定値CSになると、制御部21は制御信号CDを出力する。よって、制御信号CDの出力タイミングは、カウント設定値CSによって規定される。すなわち、各スレーブ3では、自己のクロック回路42に基づいてカウントされるカウンタ41のカウント値によって制御タイミングが決められる。
The master 2 updates the cycle each time the count value of the counter 31 reaches n.
Each slave 3 repeats the count of the counter 41, and when the count value of the counter 41 becomes the count set value CS, the control unit 21 outputs the control signal CD. Therefore, the output timing of the control signal CD is defined by the count setting value CS. That is, in each slave 3, the control timing is determined by the count value of the counter 41 which is counted based on its own clock circuit 42.

そして、各スレーブ3の制御部21は、マスタ2と通信を開始すると、マスタ2の制御タイミングと同期した制御タイミングで制御信号CDを生成して出力する。はじめに、マスタ2と通信を開始したときの同期方法について説明する。
(同期開始時)
図4は、同期開始時の1回目の同期方法を説明するための図である。
Then, when communication with the master 2 is started, the control unit 21 of each slave 3 generates and outputs the control signal CD at control timing synchronized with the control timing of the master 2. First, a synchronization method when communication with the master 2 is started will be described.
(At the start of synchronization)
FIG. 4 is a diagram for explaining a first synchronization method at the start of synchronization.

マスタ2と各スレーブ3間で通信が開始されたとき、マスタ2から最初のマスタ送信データMDがN台のスレーブ3へ同時に送信される。各スレーブ3は、マスタ送信データMDの受信に応じてスレーブ送信データSDをマスタ2へ送信する。   When communication is started between the master 2 and each slave 3, the master transmission data MD first from the master 2 is simultaneously transmitted to N slaves 3. Each slave 3 transmits slave transmission data SD to the master 2 in response to the reception of the master transmission data MD.

図4に示すように、サイクルC1においてマスタ2と各スレーブ3間で通信が開始されると、最初のマスタ送信データMDが、複数のスレーブ3において受信される。
マスタ2は、自己のクロック回路32に基づいて1サイクル内のマスタ送信データMDの送信タイミングを決定している。上述したように、通信制御部13は、カウンタ31のカウント値がカウント設定値CSであるnになるタイミングで、1サイクルの期間の終了タイミングを判定する。通信制御部13は、1サイクル中の所定のタイミングで、マスタ送信データMDを送信する。
As shown in FIG. 4, when communication is started between the master 2 and each slave 3 in a cycle C1, the first master transmission data MD is received by the plurality of slaves 3.
The master 2 determines the transmission timing of the master transmission data MD within one cycle based on its own clock circuit 32. As described above, the communication control unit 13 determines the end timing of the one cycle period at the timing when the count value of the counter 31 becomes n which is the count setting value CS. The communication control unit 13 transmits master transmission data MD at a predetermined timing in one cycle.

各スレーブ3は、カウント設定値CSに基づいて、各サイクル内の制御タイミングを決定している。上述したように、通信制御部22がカウント設定値CSをnに設定し、カウンタ41のカウント値がnになるタイミングで、制御部21は、1サイクルの期間の終了タイミングとし、その終了タイミングを制御タイミングとしている。各スレーブ3は、マスタ2との通信が開始されるまでは、カウント値がnになると、カウンタ41はクリアされ、再度カウントアップを開始する。   Each slave 3 determines the control timing in each cycle based on the count setting value CS. As described above, at the timing when the communication control unit 22 sets the count setting value CS to n and the count value of the counter 41 becomes n, the control unit 21 sets the end timing of the one cycle period as the end timing. Control timing is used. Each slave 3 is cleared of the counter 41 when the count value reaches n until communication with the master 2 is started, and starts counting up again.

各スレーブ3の通信制御部22は、最初のサイクルC1に送信されたマスタ送信データMDの受信が開始されると、各スレーブの通信制御部22は、マスタ送信データMDの先頭ビットHbの受信時のカウンタ41のカウント値を制御部21へ出力する。   When reception of master transmission data MD transmitted in the first cycle C1 is started, the communication control unit 22 of each slave 3 receives the first bit Hb of the master transmission data MD. The count value of the counter 41 is output to the control unit 21.

制御部21は、マスタ送信データMDが固定長データであるため、最初の先頭ビットHbの受信時のカウンタ41のカウント値から、最終ビットLbの立ち下がりのタイミング時におけるカウンタ41のカウント値mを算出する。   Since master transmission data MD is fixed-length data, control unit 21 calculates count value m of counter 41 at the timing of the trailing edge of last bit Lb from the count value of counter 41 at the time of reception of first head bit Hb. calculate.

最終ビットLbの立ち下がりのタイミングは、スレーブ3のサイクル中のマスタ送信データMDの受信完了位置(時刻)であり、制御部21は、このマスタ送信データMDの受信完了位置(時刻)を、同期基準点rpとする。   The falling timing of the last bit Lb is the reception completion position (time) of the master transmission data MD in the cycle of the slave 3, and the control unit 21 synchronizes the reception completion position (time) of the master transmission data MD. It is assumed that the reference point rp.

そして、制御部21は、通信制御部22から読み出した同期基準点rpのカウント値mをnに加算して、調整カウント値(n+m)を得る。
制御部21は、得られた調整カウント値(n+m)を、カウント設定値CSとする。その結果、次のサイクルの制御タイミングは、カウンタ41のカウント値が(n+m)になったときとなる。
Then, the control unit 21 adds the count value m of the synchronization reference point rp read from the communication control unit 22 to n to obtain an adjustment count value (n + m).
The control unit 21 sets the obtained adjustment count value (n + m) as the count setting value CS. As a result, the control timing of the next cycle is when the count value of the counter 41 becomes (n + m).

すなわち、各スレーブ3は、次の式(1)に基づいて、自己の制御タイミングを同期基準点rpに合わせるために、カウント設定値CSを設定する。
CS=n+m ・・・(1)
その結果、図4に示すように、各スレーブ3は、マスタ2のサイクルC1でマスタ送信データMDを受信して判定した同期基準点rpに基づいて、カウント設定値CSを変更する。
That is, each slave 3 sets the count setting value CS in order to align its control timing with the synchronization reference point rp based on the following equation (1).
CS = n + m (1)
As a result, as shown in FIG. 4, each slave 3 changes the count setting value CS based on the synchronization reference point rp determined by receiving the master transmission data MD in the cycle C1 of the master 2.

図4に示すように、スレーブ3では、最初のマスタ送信データMDを受信したときのサイクルの制御タイミングCT11は、カウンタ41のカウント値がn(カウント設定値CS)になったときであるが、次のサイクルの制御タイミングCT12は、カウンタ41のカウント値が(n+m)になったときとなる。   As shown in FIG. 4, in the slave 3, the control timing CT11 of the cycle when the first master transmission data MD is received is when the count value of the counter 41 becomes n (count set value CS). The control timing CT12 of the next cycle is when the count value of the counter 41 becomes (n + m).

なお、図4に示されるように、カウント値が(n+m)になるため、最初の同期時のサイクルは1回分だけ伸び、各スレーブ3の制御タイミングは、マスタ2のサイクルC3の最終ビットLbの受信タイミングと一致する。   As shown in FIG. 4, since the count value is (n + m), the cycle at the first synchronization is extended by one cycle, and the control timing of each slave 3 is the final bit Lb of cycle C3 of master 2. Match the reception timing.

以上のようにして、マスタ2と各スレーブ3間で最初の同期がとれた後は、制御部21は、制御タイミングCT12の次の制御タイミングCT13のために、カウント設定値CSをnに設定する。   As described above, after the master 2 and the slaves 3 are first synchronized, the control unit 21 sets the count setting value CS to n for the control timing CT13 next to the control timing CT12. .

以上のようにして、マスタ2と各スレーブ3間で通信が開始されたとき、マスタ2からのマスタ送信データMDを受信すると、マスタ2のサイクルの時間と自己のサイクルの時間とのずれ量を判定し、そのずれ量に基づいて次のサイクル時間を調整することにより、最初の制御タイミングの同期が取られる。
(同期開始後、2回目以降の同期調整)
マスタ2は、上述した最初の同期調整が行われた後も、マスタ送信データMDをサイクル毎に送信する。
As described above, when communication is started between the master 2 and each slave 3, when the master transmission data MD from the master 2 is received, the shift amount between the cycle time of the master 2 and its own cycle time is calculated. The first control timing is synchronized by determining and adjusting the next cycle time based on the amount of deviation.
(After the start of synchronization, synchronization adjustment after the second time)
The master 2 transmits the master transmission data MD every cycle even after the above-described first synchronization adjustment is performed.

上述したように、各スレーブ3は、最初の同期調整により設定されたカウント設定値(n+m)のカウント後は、カウント設定値CSは、nに設定され、その後は、マスタ2のサイクルと各スレーブ3のサイクルが一致する。   As described above, each slave 3 counts the count setting value (n + m) set by the first synchronization adjustment, the count setting value CS is set to n, and thereafter the cycle of the master 2 and each slave Three cycles match.

しかし、上述したように、クロック回路32,42の水晶振動子には個体差があるため、厳密な制御タイミングの同期を取るには、個体差によるクロックのズレ量を調整する必要がある。   However, as described above, since the crystal oscillators of the clock circuits 32 and 42 have individual differences, it is necessary to adjust the shift amount of the clock due to the individual differences in order to achieve exact control timing synchronization.

そこで、最初の同期が取られた後は、制御部21が、マスタ送信データMDの受信時に、マスタ送信データMDの受信タイミングに基づいて、各スレーブ3のカウント設定値CSの増減を行うことにより、マスタ2とスレーブ3間及びスレーブ3間の制御タイミングの同期を取っている。   Therefore, after the first synchronization is taken, the control unit 21 increases or decreases the count setting value CS of each slave 3 based on the reception timing of the master transmission data MD when the master transmission data MD is received. , Synchronization of control timings between master 2 and slave 3 and between slave 3.

以下、具体的に説明する。
図5は、2回目以降の同期方法を説明するための図である。
The details will be described below.
FIG. 5 is a diagram for explaining the second and subsequent synchronization methods.

上述したように、マスタ2と各スレーブ3間では、マスタ送信データMDとスレーブ送信データSDの送受信がサイクリックに行われる。各スレーブ3の制御部21は、マスタ送信データMDの先頭ビットHbの受信時のカウンタ41のカウント値から最終ビットLbの立ち下がりのタイミングを計算する。
各スレーブ3はマスタ2と通信を開始すると、通信制御部22は、マスタ送信データMDの最終ビットLbの受信終了のタイミングでカウンタ41のカウント値を保持し、次のサイクルのカウント設定値CSの算出のために使用する。
カウンタ41は、前回のサイクルで決定したカウント設定値CSまでカウントしてから0にリセットされて、再度0からカウントアップする。
As described above, the master transmission data MD and the slave transmission data SD are cyclically transmitted and received between the master 2 and each slave 3. The control unit 21 of each slave 3 calculates the falling timing of the last bit Lb from the count value of the counter 41 at the time of reception of the first bit Hb of the master transmission data MD.
When each slave 3 starts communication with the master 2, the communication control unit 22 holds the count value of the counter 41 at the timing when the reception of the last bit Lb of the master transmission data MD ends, and the count setting value CS of the next cycle is Used for calculation.
The counter 41 is reset to 0 after counting up to the count set value CS determined in the previous cycle, and counts up from 0 again.

制御部21は、マスタ送信データMDの最終ビットLbの立ち下がりのタイミングを同期基準点rpとして、その同期基準点rpにおけるカウンタ41のカウント値と、制御周期TSに対応するnとの差分を計算する。   The control unit 21 calculates the difference between the count value of the counter 41 at the synchronization reference point rp and n corresponding to the control cycle TS, with the falling timing of the final bit Lb of the master transmission data MD as the synchronization reference point rp. Do.

図5では、あるサイクルC11で送信されたマスタ送信データMDに基づく同期基準点rpのカウント値がnであり、差分が0であるため、スレーブ3の通信制御部22では、カウント設定値CSを変更していない。よって、制御部21は、次のサイクルの制御タイミングCT22を、カウンタ41のカウント値がnになるタイミングとする。   In FIG. 5, since the count value of the synchronization reference point rp based on the master transmission data MD transmitted in a certain cycle C11 is n and the difference is 0, the communication control unit 22 of the slave 3 sets the count setting value CS. It has not changed. Therefore, the control unit 21 sets the control timing CT22 of the next cycle as the timing when the count value of the counter 41 becomes n.

よって、次のサイクルでは、スレーブ3の制御タイミングCT22はカウンタ41のカウント値がnになるタイミングであり、制御部21はカウンタ41のカウント値がnになるタイミングで制御信号CDを出力する。
しかし、図5に示すように、サイクルC12で送信されたマスタ送信データMDに基づく同期基準点rpのカウント値が、nよりも小さいmであるとき、差分(n−m)が0でないため、制御部21は、次の制御タイミングCT23のためにカウント設定値CSを、変更する。
Therefore, in the next cycle, the control timing CT22 of the slave 3 is the timing when the count value of the counter 41 becomes n, and the control unit 21 outputs the control signal CD at the timing when the count value of the counter 41 becomes n.
However, as shown in FIG. 5, when the count value of the synchronization reference point rp based on the master transmission data MD transmitted in cycle C12 is m smaller than n, the difference (n−m) is not 0, The control unit 21 changes the count setting value CS for the next control timing CT23.

図5では、同期基準点rpのカウンタ41のカウント値mがカウント設定値CS(=n)よりも小さい。よって、制御部21は、次の制御タイミングCT23を、nとmの差分δだけ少ないカウント値になったときとするように、カウント設定値CSを変更する。   In FIG. 5, the count value m of the counter 41 of the synchronization reference point rp is smaller than the count setting value CS (= n). Therefore, the control unit 21 changes the count setting value CS so that the next control timing CT23 becomes a count value smaller than the difference δ between n and m.

すなわち、制御部21は、自己の制御タイミングを同期基準点rpに合わせるために、次の式(2)に基づいて、次の制御タイミングCT23のためにカウント設定値CSを設定する。   That is, the control unit 21 sets the count setting value CS for the next control timing CT23 based on the following equation (2) in order to align its control timing with the synchronization reference point rp.

CS=n−(n−m) ・・・(2)
その結果、図5に示すように、スレーブ3の制御部21は、次のサイクルの制御タイミングCT23では、式(2)のカウント設定値CSにより規定された制御タイミングで制御信号CDを生成して出力する。
CS = n-(n-m) (2)
As a result, as shown in FIG. 5, at the control timing CT23 of the next cycle, the control section 21 of the slave 3 generates the control signal CD at the control timing defined by the count setting value CS of equation (2). Output.

制御部21は、次のサイクルでも同様の処理を行うが、もしも、同期基準点rpのカウンタ41のカウント値kが(n−(n−m))よりも大きいときは、その次の制御タイミングCT24では、上記の式(2)に基づいて、m=−kとして、nとkの差分δだけ多いカウント値が、次の制御タイミングCT24を規定するカウント設定値CSとして設定される。   The control unit 21 performs the same processing in the next cycle, but if the count value k of the counter 41 of the synchronization reference point rp is larger than (n− (n−m)), the next control timing is In the CT 24, a count value which is larger by the difference δ between n and k is set as the count setting value CS which defines the next control timing CT24 as m = −k based on the above equation (2).

なお、図5では、サイクルC13の同期基準点rpで、マスタ送信データMDを受信したときの同期基準点rpにおけるカウンタ41のカウント値kがmであって差分が0であるため、制御部21は、次の制御タイミングCT24を規定するカウント設定値CSとして、nを設定している場合を示している。   In FIG. 5, since the count value k of the counter 41 at the synchronization reference point rp when the master transmission data MD is received at the synchronization reference point rp of the cycle C13 is m and the difference is 0, the control unit 21 Shows the case where n is set as the count setting value CS that defines the next control timing CT24.

以上のように、各スレーブ3の制御部21は、所定の制御周期TSに応じて設定されたカウント設定値CSをカウントするカウンタ41におけるカウント値に基づいて、次のサイクルの制御タイミングを決定してモータ5への制御信号CDを出力すると共に、マスタ2からのマスタ送信データMD中の所定のビットとしての最終ビットLbの受信タイミングに基づいてカウント設定値CSを調整する。特に、制御部21は、マスタ2からのマスタ送信データMDの受信の度に、カウント設定値CSを調整する。   As described above, the control unit 21 of each slave 3 determines the control timing of the next cycle based on the count value of the counter 41 that counts the count setting value CS set according to the predetermined control cycle TS. Then, the control signal CD to the motor 5 is output, and the count setting value CS is adjusted based on the reception timing of the final bit Lb as a predetermined bit in the master transmission data MD from the master 2. In particular, the control unit 21 adjusts the count setting value CS each time the master transmission data MD is received from the master 2.

そのため、各スレーブ3では、マスタ2からのマスタ送信データMDの通信データ完了位置すなわち同期基準点rpにおけるカウンタ41のカウント値と、サイクル時間に対応するカウント値nと比較し、その差分に基づいて次の制御タイミングを規定するカウント設定値CSを調整する。これにより、マスタ2と各スレーブ3の同期が取れると共に、スレーブ3間の制御タイミングの同期も厳密に取ることができる。   Therefore, each slave 3 compares the communication data completion position of the master transmission data MD from the master 2, that is, the count value of the counter 41 at the synchronization reference point rp with the count value n corresponding to the cycle time, based on the difference. The count set value CS defining the next control timing is adjusted. As a result, the master 2 and each slave 3 can be synchronized, and the control timing between the slaves 3 can be strictly synchronized.

なお、各制御部21の遅延量記憶部43の遅延量データを設定することによって、各スレーブ3に接続されたモータ5の特性に応じて、制御信号CDの出力タイミングを遅延量だけ遅らせて、制御信号CDを出力するようにしてもよい。遅延量記憶部43は、制御タイミングに対する遅延量を記憶する。   By setting the delay amount data of the delay amount storage unit 43 of each control unit 21, the output timing of the control signal CD is delayed by the delay amount according to the characteristics of the motor 5 connected to each slave 3 The control signal CD may be output. The delay amount storage unit 43 stores the delay amount with respect to the control timing.

例えば、遅延量データを設定することによって、モータ5の特性に応じて、電流信号を出力するタイミングをその遅延量だけ遅らせることができる。あるいは、各スレーブ3の遅延量データを調整することによって、N台のスレーブ3を所望の順番で動作させることもできる。   For example, by setting the delay amount data, the timing of outputting the current signal can be delayed by the delay amount according to the characteristics of the motor 5. Alternatively, N slaves 3 can be operated in a desired order by adjusting the delay amount data of each slave 3.

さらになお、上述した式(2)に代えて、次の式(3)を用いてもよい。
CS=n−α*(n−m) ・・・(3)
このαは、同期までの収束時間を調整するための係数である。例えば、αを1より小さくすることで、同期調整時の変動を小さくすることができる。
Furthermore, in place of the above-mentioned equation (2), the following equation (3) may be used.
CS = n-α * (n-m) (3)
This α is a coefficient for adjusting the convergence time until synchronization. For example, by making α smaller than 1, fluctuation during synchronization adjustment can be reduced.

以上のように、上述した実施の形態によれば、マスタ装置とスレーブ装置間及びスレーブ装置間においてより厳密な同期が得られる多軸モータ制御システムを提供することができる。   As described above, according to the above-described embodiment, it is possible to provide a multi-axis motor control system in which strict synchronization can be obtained between the master device and the slave device and between the slave devices.

また、上述した実施の形態によれば、サイクル毎に固定長データであるマスタ送信データMDをマスタ2から複数のスレーブ3に送信して、マスタ2とスレーブ3間及び複数のスレーブ3間で精度のよい同期タイミングが得られるが、上述したシステムによれば、所定のサイクル毎に固定長データで各スレーブ3からマスタ2へスレーブ送信データSDを送信するので、高い精度で同期が取られたアラーム信号、ステータス情報等のデータをマスタ2は収集することができる。よって、各スレーブ3は、マスタ送信データMDを受信すると、モータ5に関する状態情報を含むスレーブ送信データSDをマスタ2へ送信することができる。   Further, according to the above-described embodiment, master transmission data MD, which is fixed-length data, is transmitted from master 2 to a plurality of slaves 3 every cycle, and accuracy between master 2 and slaves 3 and a plurality of slaves 3 is achieved. According to the above-mentioned system, since each slave 3 transmits slave transmission data SD to the master 2 with fixed length data according to the above-described system, an alarm synchronized with high accuracy is obtained. The master 2 can collect data such as signals and status information. Therefore, each slave 3 can transmit slave transmission data SD including status information on the motor 5 to the master 2 when the master transmission data MD is received.

従って、上述した実施の形態によれば、マスタ2に記憶されたステータス情報等のデータは、高い精度で同期の取れたデータであるので、より詳細なデータ解析に使うことができる。   Therefore, according to the above-described embodiment, data such as status information stored in the master 2 can be used for more detailed data analysis since it is highly accurate and synchronized data.

以上のように、上述した実施の形態によれば、マスタ装置とスレーブ装置間及びスレーブ装置間においてより厳密な同期タイミングが得られる多軸モータ制御システムを提供することができる。   As described above, according to the above-described embodiment, it is possible to provide a multi-axis motor control system capable of obtaining more precise synchronization timing between a master device and a slave device and between slave devices.

また、上述した実施の形態によれば、マスタ装置からの同期のための同期フレームを用いることなく、マスタ装置と通信をしながら、各スレーブ装置は他のスレーブ装置と制御タイミングの同期を取ることができる。特に、マスタ2は、1サイクルの間にマスタ送信データMDを一回送信しているので、各スレーブ3では、サイクル毎に、マスタ2との同期が取られるので、マスタ2とN台のスレーブ3間で同期ずれが生じ難い。   Further, according to the above-described embodiment, each slave device synchronizes control timing with other slave devices while communicating with the master device without using a synchronization frame for synchronization from the master device. Can. In particular, since master 2 transmits master transmission data MD once in one cycle, each slave 3 synchronizes with master 2 in each cycle, so that master 2 and N slaves are synchronized. It is difficult for synchronization deviation to occur between the three.

なお、上述した実施の形態では、各スレーブ3は、マスタ送信データMDの受信の度にカウント設定値CSを調整しているが、カウント設定値CSの調整は、マスタ送信データMDを2回受信の度に、3回受信の度に、等々、マスタ2のサイクル毎に行わないようにしてもよい。   In the above-described embodiment, each slave 3 adjusts the count setting value CS each time the master transmission data MD is received. However, for adjustment of the count setting value CS, the master transmission data MD is received twice. It may not be performed every cycle of the master 2 every three times, every three times, etc.

本発明は、上述した実施の形態に限定されるものではなく、本発明の要旨を変えない範囲において、種々の変更、改変等が可能である。   The present invention is not limited to the above-described embodiment, and various changes, modifications, and the like can be made without departing from the scope of the present invention.

1 制御システム、2 マスタ装置、3 スレーブ装置、4 伝送路、4a、4b 通信ライン、5 モータ、6 ネットワーク、11 制御部、12 記憶装置、13 通信制御部、21 制御部、22 通信制御部、23 駆動回路、31 カウンタ、32 クロック回路、41 カウンタ、42 クロック回路、43 遅延量記憶部。 Reference Signs List 1 control system, 2 master device, 3 slave device, 4 transmission path, 4a, 4b communication line, 5 motor, 6 network, 11 control unit, 12 storage device, 13 communication control unit, 21 control unit, 22 communication control unit, 23 drive circuit, 31 counter, 32 clock circuit, 41 counter, 42 clock circuit, 43 delay amount storage unit.

Claims (2)

マスタ装置と、各々が個別の伝送路で前記マスタ装置と接続され、多軸駆動系の複数のモータを制御する複数のスレーブ装置と、を含む多軸モータ制御システムであって、
前記マスタ装置は、所定の周期で固定長の第1の送信データを複数のスレーブ装置へ同時に送信するデータ送信部を有し、
各スレーブ装置は、前記所定の周期に応じて設定されたカウント設定値をカウントするカウンタにおけるカウント値に基づいて制御タイミングを決定してモータへの制御信号を出力すると共に、前記マスタ装置からの前記第1の送信データ中の所定のビットの受信タイミングに基づいて前記カウント設定値を調整する制御部を有することを特徴とする多軸モータ制御システム。
A multi-axis motor control system, comprising: a master device; and a plurality of slave devices each connected to the master device through individual transmission paths and controlling a plurality of motors of a multi-axis drive system.
The master device has a data transmission unit that simultaneously transmits, to a plurality of slave devices, first transmission data of a fixed length at a predetermined cycle.
Each slave device determines a control timing based on a count value in a counter that counts a count setting value set according to the predetermined cycle, and outputs a control signal to a motor, and the slave device receives the control signal from the master device. A multi-axis motor control system comprising: a control unit that adjusts the count setting value based on the reception timing of a predetermined bit in first transmission data.
前記各スレーブ装置は、前記第1の送信データを受信すると、前記モータに関する状態情報を含む第2の送信データを前記マスタ装置へ送信する、ことを特徴とする請求項1に記載の多軸モータ制御システム。   The multi-axis motor according to claim 1, wherein each of the slave devices transmits, upon receipt of the first transmission data, second transmission data including status information on the motor to the master device. Control system.
JP2017228944A 2017-11-29 2017-11-29 Multishaft motor control system Pending JP2019103176A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017228944A JP2019103176A (en) 2017-11-29 2017-11-29 Multishaft motor control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017228944A JP2019103176A (en) 2017-11-29 2017-11-29 Multishaft motor control system

Publications (1)

Publication Number Publication Date
JP2019103176A true JP2019103176A (en) 2019-06-24

Family

ID=66977312

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017228944A Pending JP2019103176A (en) 2017-11-29 2017-11-29 Multishaft motor control system

Country Status (1)

Country Link
JP (1) JP2019103176A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2023135741A1 (en) * 2022-01-14 2023-07-20

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2023135741A1 (en) * 2022-01-14 2023-07-20

Similar Documents

Publication Publication Date Title
US7366205B2 (en) Method for synchronizing nodes of a communications system
KR102278867B1 (en) Method of synchronising clocks of network devices
EP1757410B1 (en) Robot coordinated control method and system
JP3748204B2 (en) Periodic control synchronization system
JP2007219642A (en) Control system
KR101618537B1 (en) Communication device, communication system, and synchronous control method
WO2019107022A1 (en) Control device and control method
CN104767582A (en) A synchronization method, device and system for Ethernet
JP2019103176A (en) Multishaft motor control system
JP5748126B2 (en) Synchronous control system
CN111740799A (en) Smooth synchronization method for Ethernet distributed node
JP2014165582A (en) Time synchronization system, time synchronization method, slave node and computer program
JP6683137B2 (en) Industrial controller system
WO2015162763A1 (en) Network system
JP6400553B2 (en) Numerical control system with synchronous control function between units
JP2007025759A (en) Electric motor drive device, position command device, and positioning device
JP7603212B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION CONTROL METHOD, AND PROGRAM
CN110708063B (en) Apparatus, system, and method for reducing jitter in a control system
JP6854991B1 (en) Communication devices, communication systems, communication methods and programs
CN106647574B (en) Multi-axis servo driver synchronization system control method
JPH11305812A (en) Synchronize method for distributed cpu system
WO2020095413A1 (en) Communication system, communication device, method, and program
JP4616054B2 (en) Measuring system
US20250055723A1 (en) Control apparatus, communication cycle adjustment method, and recording medium
WO2024162337A1 (en) Control device, control system, method, and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171214