JP2000020119A - Multi-axis cooperation control method - Google Patents

Multi-axis cooperation control method

Info

Publication number
JP2000020119A
JP2000020119A JP10196479A JP19647998A JP2000020119A JP 2000020119 A JP2000020119 A JP 2000020119A JP 10196479 A JP10196479 A JP 10196479A JP 19647998 A JP19647998 A JP 19647998A JP 2000020119 A JP2000020119 A JP 2000020119A
Authority
JP
Japan
Prior art keywords
data
master
axis
slave
slave unit
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.)
Withdrawn
Application number
JP10196479A
Other languages
Japanese (ja)
Inventor
Yutaka Muraoka
豊 村岡
Takeshi Koike
毅 小池
Kazumasa Shimura
一誠 志村
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP10196479A priority Critical patent/JP2000020119A/en
Publication of JP2000020119A publication Critical patent/JP2000020119A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Numerical Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a multi-axis cooperation control method which can be applied to even a large-scale system, where the number of control axes is large and their controllers are distributed and are arranged a long distance apart, by reducing the number of signal lines. SOLUTION: One of controllers is used as a master M, and the others are used as slaves S1 to Sn. The master and slaves are connected by a communication line L1 for data transmission/reception and an alarm communication line L2 of a daisy chain system. Data of positions of control axes to reference data are stored in slaves S1 to Sn. The master M transmits reference data to slaves at intervals of its own fundamental period, and each slave receives this data to transmit a data reception completion pulse to the communication line L2 at a determined timing. The master M confirms data reception of slaves S1 to Sn by positions of time series of data reception completion pulses. Each slave obtains the phase difference between its own fundamental period and the fundamental period of the master M and corrects received reference data by this phase difference to obtain position data and drives and control the control axis.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、多数の制御軸を有
する各種産業機械や各種生産システム等において、これ
ら多数の制御軸を協調して動作させる多軸協調制御方法
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multi-axis cooperative control method for cooperatively operating a large number of control axes in various industrial machines and various production systems having a large number of control axes.

【0002】[0002]

【従来の技術】複数の制御装置(例えばCNC装置)間
で協調制御を行う従来のシステムでは、マスタとなる任
意の1台の制御装置が、自分の基準時間(基本同期パル
ス)を通信ラインを介して他の制御装置に送信し、個々
のスレーブとなる制御装置はマスタからの基本時間に合
わせてそれぞれの軸を制御している。さらに、協調制御
を行う制御装置間で相手の動作完了を監視するために、
制御装置毎に専用の通信ラインを用意し、相手の動作完
了信号を監視している。このため、制御装置間を接続す
るケーブルの信号線数が同期を行う制御装置分必要とな
るという欠点がある。また、相手の動作が終わるまで待
ち次の指令を送信する必要があり、時間のロスが発生
し、動作効率を低下させている。
2. Description of the Related Art In a conventional system for performing cooperative control among a plurality of control devices (for example, CNC devices), any one control device serving as a master transmits its reference time (basic synchronization pulse) to a communication line. The data is transmitted to another control device via the control device, and the control device serving as each slave controls each axis in accordance with the basic time from the master. Furthermore, in order to monitor the operation completion of the other party between the control devices that perform the cooperative control,
A dedicated communication line is prepared for each control device, and the operation completion signal of the other party is monitored. For this reason, there is a disadvantage that the number of signal lines of the cable connecting between the control devices is required for the control devices that perform synchronization. In addition, it is necessary to wait until the operation of the other party is completed, and then transmit the next command, which causes a time loss and lowers the operation efficiency.

【0003】さらに、同期を行う制御装置の組み合わせ
にも制限がある。装置Aと装置B、装置Aと装置Cで同
時に同期動作を実行しようとすると、装置Aまたは装置
Bまたは装置Cからの動作完了信号を区別する必要があ
り、装置の接続順番にも制限を設ける必要があった。
[0003] Furthermore, there are restrictions on the combinations of control devices that perform synchronization. If the devices A and B and the devices A and C try to execute a synchronous operation at the same time, it is necessary to distinguish the operation completion signals from the device A, the device B or the device C, and the connection order of the devices is also limited. Needed.

【0004】[0004]

【発明が解決しようとする課題】そこで、本発明は、信
号線数を減らし、通信ラインを介しての基準時間の伝送
を不要とし、制御軸数が多くかつその制御装置が分散し
遠距離に配置された大規模なシステムにも適用できる多
軸協調制御方法を提供することを目的とするものであ
る。
Accordingly, the present invention reduces the number of signal lines, eliminates the need for transmission of a reference time via a communication line, has a large number of control axes, and the control devices are dispersed and distributed over long distances. It is an object of the present invention to provide a multi-axis cooperative control method that can be applied to a large-scale system that is arranged.

【0005】[0005]

【課題を解決するための手段】本発明は、複数の制御装
置の1つをマスタユニットとし他の制御装置をスレーブ
ユニットとし、スレーブユニットには、基準データに対
する自己の軸位置に関するデータを記憶し、マスタユニ
ットとスレーブユニット間を通信路で接続してマスタユ
ニットから基準データを各スレーブユニットに送信し、
各スレーブは受信した基準データに対応する位置を読出
し、該位置のデータに基づいて制御軸を駆動してその位
置を制御する多軸協調制御方法において、上記通信路を
2つの通信ラインで構成し、マスタユニットから一斉に
一方の通信ラインを介して基準データを送信し、スレー
ブユニットは基準データを受信すると、決められたタイ
ミングでデータ受信完了信号を他方の通信ラインを介し
てマスタユニットに送信する。マスタユニットは、上記
他方の通信ラインを介して送られてくる各データ受信完
了信号の時系列的な位置によって受信したスレーブユニ
ットを判別するようにした。
According to the present invention, one of a plurality of control units is used as a master unit and the other control units are used as slave units. The slave unit stores data relating to its own axis position with respect to reference data. The master unit and the slave unit are connected by a communication path, and the master unit transmits reference data to each slave unit,
Each slave reads a position corresponding to the received reference data, and in a multi-axis coordinated control method in which a control axis is driven based on the position data to control the position, the communication path is constituted by two communication lines. The master unit simultaneously transmits reference data via one communication line, and upon receiving the reference data, the slave unit transmits a data reception completion signal to the master unit via the other communication line at a predetermined timing. . The master unit determines the received slave unit based on the time-series position of each data reception completion signal sent via the other communication line.

【0006】また、各スレーブユニットは各スレーブユ
ニット内で異常が発生した際に上記他方の通信ラインに
アラーム出力をし、マスタユニットは自己の基本周期の
前半で上記データ受信完了パルス信号のチェックを行
い、後半に上記アラーム出力の検出を行うようにした。
そして、アラームが出力されると、データ通信モードか
らコンフィグレーションモードに移行し、マスタユニッ
トとスレーブユニットが1対1で通信を行い、少なくと
もアラームの発生したユニットのステータス情報をマス
タユニットの表示装置に表示するようにする。
Each slave unit outputs an alarm to the other communication line when an abnormality occurs in each slave unit, and the master unit checks the data reception completion pulse signal in the first half of its own basic cycle. Then, the alarm output is detected in the latter half.
When an alarm is output, the mode shifts from the data communication mode to the configuration mode, and the master unit and the slave unit perform one-to-one communication, and at least status information of the unit where the alarm has occurred is displayed on the display unit of the master unit. To be displayed.

【0007】また、マスタユニット及び各スレーブユニ
ットは周期幅が共通のそれぞれの基本周期で制御され、
マスタユニットは自己の基本周期に基づいて上記基準デ
ータを送信し、スレーブユニットはマスタユニットの基
本周期と自己の基本周期の位相差により受信した上記基
準データを補正し、補正された基準データに基づいて上
記テーブルより当該スレーブユニットの制御軸の位置に
関するデータを求め、該データに基づいて制御軸を駆動
して位置を制御して、協調動作を行うようにした。
The master unit and each slave unit are controlled by respective basic periods having a common period width,
The master unit transmits the reference data based on its own basic cycle, and the slave unit corrects the received reference data based on the phase difference between the master unit's basic cycle and its own basic cycle, and based on the corrected reference data. Thus, data relating to the position of the control axis of the slave unit is obtained from the table, and the control axis is driven based on the data to control the position, thereby performing a cooperative operation.

【0008】[0008]

【発明の実施の形態】図1は、本発明の一実施形態の概
要図である。本発明においては、マスタユニット(以下
マスタと呼ぶ)Mとスレーブユニット(以下スレーブと
呼ぶ)S1〜Snはパーティライン(N:N)で接続さ
れるデータ通信ラインL1と、デイジーチェイン接続で
アラーム信号をマスタMに伝えるアラーム送信ラインの
2系統のシリアル通信ラインを持つ。マスタM、スレー
ブS1〜Snは、それぞれの軸を制御するほぼ同等の制
御装置で構成され、本実施形態では後述するようにCN
C装置(コンピュータ内蔵数値制御装置)で構成してい
る。なお、図1において、符号TMはターミネータであ
る。図3は、上記マスタM及びスレーブS1〜Snを構
成する制御装置の概要図であり、任意のスレーブSiの
例を示している。
FIG. 1 is a schematic diagram of an embodiment of the present invention. In the present invention, a master unit (hereinafter, referred to as a master) M and slave units (hereinafter, referred to as slaves) S1 to Sn are connected to a data communication line L1 connected by a party line (N: N) and an alarm signal by daisy chain connection. Is transmitted to the master M, and two serial communication lines of an alarm transmission line. The master M and the slaves S1 to Sn are constituted by substantially the same control devices for controlling the respective axes.
It consists of a C device (computer built-in numerical controller). In FIG. 1, the symbol TM is a terminator. FIG. 3 is a schematic diagram of a control device constituting the master M and the slaves S1 to Sn, and shows an example of an arbitrary slave Si.

【0009】本実施形態では、この制御装置をCNC装
置で構成しており、従来のCNC装置と同様に、数値制
御(CNC)用のプロセッサ10、機械のシーケンス制
御等を行うためのプログラマブル・マシン・コントロー
ラ(PMC)用プロセッサ17、軸を駆動するサーボモ
ータ28の位置・速度等の制御を行うサーボ制御用のデ
ィジタル・シグナル・プロセッサ(DSP)19がバス
21で接続されている。さらに、該バス21には、CN
C用プロセッサ10のためのシステムプログラムを記憶
するROM11、データの一時記憶や各種設定データや
パラメータを記憶するRAM12、メモリカード23等
の外部記憶装置とのインターフェース回路13、I/O
機器やパーソナルコンピュータ24と接続するための通
信インターフェース回路14、CRT、液晶等の表示装
置付手動入力装置(CRT/MDI)25との表示イン
ターフェース回路16、機械操作盤26と接続するため
のDI/DO回路18、及び、通信制御回路15が接続
されている。
In the present embodiment, the control device is constituted by a CNC device, and similarly to a conventional CNC device, a processor 10 for numerical control (CNC), a programmable machine for performing machine sequence control and the like. A bus (21) is connected to a processor (PMC) processor 17 and a servo control digital signal processor (DSP) 19 for controlling the position and speed of a servomotor 28 for driving an axis. Further, the bus 21 includes a CN.
A ROM 11 for storing a system program for the C processor 10; a RAM 12 for temporarily storing data and various setting data and parameters; an interface circuit 13 with an external storage device such as a memory card 23;
A communication interface circuit 14 for connecting to a device or a personal computer 24; a display interface circuit 16 for a CRT, a manual input device with a display device such as a liquid crystal (CRT / MDI) 25; The DO circuit 18 and the communication control circuit 15 are connected.

【0010】また、サーボ制御用のDSP19にはRA
M20が接続されると共に、サーボアンプ27、サーボ
モータ28に設けられ該サーボモータ28の位置・速度
を検出するパルスコーダ等の位置・速度検出器29とも
接続されている。該DSP19はCNC用プロセッサ1
0から基本周期(ITP周期)毎に送られてくる移動指
令と位置・速度検出器からの位置・速度のフィードバッ
ク信号に基づいて、位置・速度のフィードバック制御を
行い、サーボアンプ27を介してサーボモータ28を駆
動制御し、該サーボモータ28に接続されている軸の位
置・速度を制御するものである。
The DSP 19 for servo control has RA
M20 is connected, and also connected to a position / speed detector 29 such as a pulse coder provided in the servo amplifier 27 and the servomotor 28 for detecting the position / speed of the servomotor 28. The DSP 19 is a CNC processor 1
Position / speed feedback control is performed based on a movement command sent from 0 to the basic cycle (ITP cycle) and a position / speed feedback signal from a position / speed detector. The motor 28 is driven and controlled, and the position and speed of a shaft connected to the servo motor 28 are controlled.

【0011】通信制御回路15は、ドライバ30、コネ
クタ35を介してデータ通信ラインL1にデータを送信
するデータ送信部15aと、データ通信ラインL1から
送られてくるデータをレシーバ31を介して受信するデ
ータ受信部15bを有する。該データ受信部15bは、
後述するように、コンフィグレーションモードか通信モ
ードかのモード判定と、当該制御装置(スレーブ)に対
して割り当てられたIDコードを判定する機能を備えて
いる。また、通信制御回路15は、自己の制御装置に割
り当てられたIDコードを記憶するID記憶部15cを
備る。なお、マスタMは自己のIDコード以外に各スレ
ーブS1〜Snに割り当てられているIDコードをも記
憶している。
The communication control circuit 15 receives the data transmitted from the data communication line L1 via the receiver 31 and the data transmission unit 15a for transmitting data to the data communication line L1 via the driver 30 and the connector 35. It has a data receiving unit 15b. The data receiving unit 15b
As will be described later, it has a function of determining a mode between a configuration mode and a communication mode and determining an ID code assigned to the control device (slave). The communication control circuit 15 includes an ID storage unit 15c that stores an ID code assigned to its own control device. In addition, the master M also stores the ID code assigned to each of the slaves S1 to Sn in addition to its own ID code.

【0012】また、通信制御回路15は、マスタMから
のデータ受信開始をトリガに各スレーブに対応した(I
Dに対応した)時間後にデータを受信したことを示すパ
ルスを発生するパルス発生部15dを備える。該パルス
発生部15dから発生したパルスは下流のスレーブから
発生し、レシーバ33を介して受信したパルスと合成回
路15hで合成され、ドライバ32、コネクタ35を介
してアラーム通信ラインL2に送出される。さらに、自
己の制御装置(スレーブ)内でアラームが発生した場合
にアラーム通信ラインL2をアサートしてマスタMへ異
常を伝えるアラーム出力部15eをも備える。また、マ
スタMのみに機能するパルスチェック部15f、アラー
ム検出部15gをも備える。なお、符号22はタイマで
基本周期(ITP周期)毎にパルスを出力し、この周期
に合わせて通信制御回路15は動作する。
In addition, the communication control circuit 15 responds to each slave by using the start of data reception from the master M as a trigger.
A pulse generator 15d that generates a pulse indicating that data has been received after a time (corresponding to D). The pulse generated from the pulse generation unit 15d is generated from the downstream slave, is synthesized with the pulse received via the receiver 33 by the synthesizing circuit 15h, and is transmitted to the alarm communication line L2 via the driver 32 and the connector 35. Further, an alarm output unit 15e for asserting the alarm communication line L2 and transmitting an abnormality to the master M when an alarm occurs in its own control device (slave) is provided. Further, a pulse check unit 15f and an alarm detection unit 15g that function only for the master M are provided. Reference numeral 22 denotes a timer which outputs a pulse for each basic cycle (ITP cycle), and the communication control circuit 15 operates in accordance with this cycle.

【0013】図4は、データ受信パルス、アラーム出力
の送受信関係を示す図で、マスタMのCNC用プロセッ
サ10は、アラーム通信ラインL2を自己の基本周期
(ITP周期)内で2分割して監視し、前半をパルス検
出期間、後半をアラーム検出期間としている。前述した
ように、各スレーブS1〜Snは、データ受信開始をト
リガに各スレーブS1〜Snに対応した(IDに対応し
た)時間後にパルス発生部15dから受信したことを示
すパルスを送信するものである。その結果、マスタM
は、図4に示すように基本周期の前半に、各スレーブS
1〜Snからのデータ受信を示すパルスを時系列に受信
することになる。
FIG. 4 is a diagram showing the relationship between transmission and reception of a data reception pulse and an alarm output. The CNC processor 10 of the master M monitors the alarm communication line L2 by dividing it into two within its own basic cycle (ITP cycle). The first half is a pulse detection period, and the second half is an alarm detection period. As described above, each of the slaves S1 to Sn transmits a pulse indicating that it has been received from the pulse generation unit 15d after a time (corresponding to ID) corresponding to each of the slaves S1 to Sn, triggered by the start of data reception. is there. As a result, the master M
Indicates that each slave S is connected to the first half of the basic cycle as shown in FIG.
Pulses indicating data reception from 1 to Sn are received in time series.

【0014】そして、後述するように、スレーブからデ
ータ受信を示すパルスが送られてこない場合(スレーブ
に対応する時間的位置にパルスを受信しない場合)、マ
スタは通信モードを変更しコンフィグレーションモード
に切換えて、全てのスレーブと1対1の送受信を行いス
レーブのステータスをチェックして、通信ラインの断
線、スレーブの電源段等の異常を検出し、マスタMの表
示装置25に表示するようにしている。
Then, as will be described later, when a pulse indicating data reception is not sent from the slave (when a pulse is not received at a time position corresponding to the slave), the master changes the communication mode to the configuration mode. By switching, one-to-one transmission / reception is performed with all slaves, the status of the slaves is checked, abnormalities such as disconnection of the communication line, power supply stages of the slaves, etc. are detected and displayed on the display device 25 of the master M. I have.

【0015】また、パルス検出期間内にアラーム出力が
なされた場合、すでにデータの送信は行われているの
で、途中でデータ送信を中止すると、全てのスレーブで
データ通信異常が発生し、最初に発生したアラームの特
定が困難になるので、基本周期の前半のパルス検出期間
でのアラームチェックは行わず、次回のパルス検出開始
までの後半のアラーム検出期間でアラーム検出を行う。
マスタMのCNC用プロセッサ10はアラームを検出す
ると、即座に通信モードをコンフィグレーションモード
に変更し、全てのスレーブS1〜Snのステータスを得
て、表示装置25にその結果を表示する。
If an alarm is output during the pulse detection period, data transmission has already been performed. If data transmission is stopped halfway, a data communication error will occur in all slaves, and the first occurrence will occur. Since it is difficult to identify the alarm that has occurred, the alarm check is not performed in the pulse detection period in the first half of the basic cycle, and the alarm is detected in the latter half of the alarm detection period until the start of the next pulse detection.
Upon detecting the alarm, the CNC processor 10 of the master M immediately changes the communication mode to the configuration mode, obtains the statuses of all the slaves S1 to Sn, and displays the result on the display device 25.

【0016】本実施形態においては、上述したように、
電源投入時の初期設定や異常発生時に全スレーブS1〜
Snの状態をモニタするコンフィグレーションモードと
マスタMとスレーブS1〜Sn間でデータの送受を行う
データ通信モードの2つのモードを備えている。
In the present embodiment, as described above,
All slaves S1
There are two modes, a configuration mode for monitoring the state of Sn and a data communication mode for transmitting and receiving data between the master M and the slaves S1 to Sn.

【0017】データ通信モードにおいては、マスタMは
協調動作を行わせるため、各スレーブの軸の位置を特定
する基準データを各スレーブS1〜Snにデータ通信ラ
インL1を介して送信する。本実施形態では、この基準
データをインデックス座標位置データという。各スレー
ブS1〜Snは、受信したインデックス座標位置データ
に基づいて、各スレーブ毎に持っているデータテーブル
よりインデックス座標位置に対応する各軸の位置を求
め、その位置へ各軸を駆動する。
In the data communication mode, the master M transmits reference data for specifying the position of the axis of each slave to each of the slaves S1 to Sn via the data communication line L1 in order to perform a cooperative operation. In the present embodiment, this reference data is referred to as index coordinate position data. Each of the slaves S1 to Sn obtains the position of each axis corresponding to the index coordinate position from the data table held for each slave based on the received index coordinate position data, and drives each axis to that position.

【0018】図2は、マスタM、スレーブS1〜Snに
設定記憶されているデータテーブルの一例である。この
データテーブルは、当該データテーブルを記憶するスレ
ーブ(またはマスタ)は、3軸を備え、かつ、各周辺機
器への指令を出力する信号出力軸も備えるものとしてい
る。
FIG. 2 is an example of a data table set and stored in the master M and the slaves S1 to Sn. In this data table, the slave (or master) that stores the data table has three axes, and also has a signal output axis that outputs a command to each peripheral device.

【0019】図2に示すデータテーブルの例では、イン
デックス座標位置を回転角とし、各回転角に対応する
X,Y,Z軸の位置が記憶されている。また、インデッ
クス座標位置に対応する出力信号があれば、それをも記
憶し、PMC17を介して出力されるようにしている。
この図2の例では、インデックス座標位置の1.5度か
ら2.5度の間、出力信号が出力されるようにセットさ
れている。
In the example of the data table shown in FIG. 2, an index coordinate position is defined as a rotation angle, and the positions of the X, Y and Z axes corresponding to each rotation angle are stored. If there is an output signal corresponding to the index coordinate position, the output signal is also stored and output via the PMC 17.
In the example of FIG. 2, the output signal is set to be output between 1.5 degrees and 2.5 degrees of the index coordinate position.

【0020】インデックス座標位置としては、図2に示
すように回転角でも、または時間軸(時間をインデック
ス座標位置とする)でも、単なる直線軸(移動量インデ
ックス座標位置とする)でもよい。また、インデックス
座標位置の間隔は等間隔でも、複雑な部分は細かく、変
動が少ない部分は広くとったデータテーブルでもよい。
The index coordinate position may be a rotation angle as shown in FIG. 2, a time axis (time is set as an index coordinate position), or a simple linear axis (movement amount index coordinate position). Further, the index coordinate positions may be equally spaced, or a complicated part may be fine, and a part having little change may be a wide data table.

【0021】そして、このインデックス座標位置は、プ
ログラムにより作り出してもよく、また、マスタMに入
力されるマスタMで駆動される軸からのポジションコー
ダや位置検出器等からの値に対してN/M倍(N,Mは
整数値)した値によって作成してもよい。さらには、外
部I/Oからの速度指令によって作られたインデックス
座標位置を用いてもよい。
The index coordinate position may be created by a program. The index coordinate position is input to the master M by N / N with respect to a value from a position coder or a position detector from an axis driven by the master M. It may be created by a value multiplied by M (N and M are integer values). Further, an index coordinate position created by a speed command from an external I / O may be used.

【0022】なお、上記図2に示したデータテーブルの
例では、このデータテーブルを記憶するスレーブには
X,Y,Z軸の3軸と外部周辺機器等を駆動するための
出力軸を備えている場合のものであったが、スレーブに
1軸しか有しない場合には、データテーブルにはインデ
ックス座標位置とその軸の位置しか記憶されない。例え
ば、図2においてX軸のみのスレーブであれば、インデ
ックス座標位置としての回転角とこの角に対応するX軸
の位置のみが記憶されたデータテーブルとなる。また、
周辺機器等のみを駆動するスレーブであれば、図2にお
けるインデックス座標位置としての回転角とこの角に対
応する信号出力が記憶されたデータテーブルとなる。
In the example of the data table shown in FIG. 2, the slave storing this data table has three axes of X, Y, and Z axes and an output axis for driving external peripheral devices and the like. However, if the slave has only one axis, the data table stores only the index coordinate position and the position of that axis. For example, in the case of a slave having only the X axis in FIG. 2, the data table stores only the rotation angle as the index coordinate position and the X axis position corresponding to this angle. Also,
In the case of a slave that drives only peripheral devices or the like, the data table stores a rotation angle as an index coordinate position in FIG. 2 and a signal output corresponding to this angle.

【0023】以上のように、マスタMもしくはスレーブ
S1〜Snで駆動制御される軸動作は、インデックス座
標位置に基づいてデータテーブル形式でプログラムされ
ることになる。そのため、このプログラムは、パーソナ
ルコンピュータ等を使用して容易に作成することができ
る。パーソナルコンピュータ等で作成したマスタM及び
各スレーブS1〜Snに対するデータを一括してマスタ
Mに取り込み、データ通信ラインL1を介してマスタM
から、各スレーブS1〜Snに対するデータテーブル
(インデックス座標位置データとこの位置に対応するス
レーブの軸の位置データで形成されるデータテーブル)
をそれぞれ転送するようにすれば、各スレーブ毎にデー
タテーブルをそれぞれ設定する必要がなく便利である。
この場合、後述するように、コンフィグレーションモー
ドを利用して、マスタMに一括格納したインデックス座
標位置に対応する各軸位置のデータテーブルを、スレー
ブを特定するIDコードとそのスレーブに対するデータ
テーブルのデータを送信し、各スレーブは自己のIDコ
ードに対応するデータテーブルを受信し、受信完了信号
を送り返すようにすればよい。
As described above, the axis operation driven and controlled by the master M or the slaves S1 to Sn is programmed in a data table format based on the index coordinate position. Therefore, this program can be easily created using a personal computer or the like. Data for the master M and each of the slaves S1 to Sn created by a personal computer or the like are collectively taken into the master M, and the master M is transmitted via the data communication line L1.
To a data table for each of the slaves S1 to Sn (a data table formed by index coordinate position data and position data of the axis of the slave corresponding to this position)
Is convenient because there is no need to set a data table for each slave.
In this case, as will be described later, the configuration mode is used to store the data table of each axis position corresponding to the index coordinate position stored collectively in the master M into the ID code specifying the slave and the data of the data table for the slave. , Each slave receives the data table corresponding to its own ID code, and sends back a reception completion signal.

【0024】以上のように、本願発明は、マスタM及び
スレーブS1〜Snがそれぞれ自己のデータテーブルを
所有し、マスタMから送信されるインデックス座標位置
データを基準にしてマスタM及び各スレーブS1〜Sn
が自己の軸を駆動制御することによって、各軸の協調制
御を行うものである。そこで、本願発明の理解を容易に
するために、本願発明を適用した応用例を簡単にまず説
明する。
As described above, according to the present invention, the master M and the slaves S1 to Sn own their own data tables, and the master M and the slaves S1 to Sn are based on the index coordinate position data transmitted from the master M. Sn
Performs cooperative control of each axis by drive-controlling its own axis. Therefore, in order to facilitate understanding of the present invention, application examples to which the present invention is applied will be briefly described first.

【0025】図5は、本願発明を適用した応用例の概要
図である。主軸によって駆動されるベルトコンベア40
上を移動する容器41に液体を注入するようにした応用
例である。インデックス座標位置として容器41を搬送
するコンベア40を駆動する主軸の位置を用い、液体を
容器41に注入する注入器42を、容器41(コンベア
40)の移動方向と平行な方向に駆動する軸をX軸と
し、該X軸と直交する軸方向に上記注入器42を駆動す
る軸をY軸とし、X軸、Y軸を駆動する制御装置をそれ
ぞれスレーブとし、主軸を駆動する制御装置をマスタと
する。また、Y軸を駆動するY軸スレーブは注入器42
の弁を開閉する電磁弁を備えている。
FIG. 5 is a schematic diagram of an application example to which the present invention is applied. Belt conveyor 40 driven by main shaft
This is an application example in which a liquid is injected into a container 41 moving above. The position of the main shaft that drives the conveyor 40 that transports the container 41 is used as the index coordinate position, and the axis that drives the injector 42 that injects the liquid into the container 41 in a direction parallel to the moving direction of the container 41 (the conveyor 40) is used. The X axis, the axis that drives the injector 42 in the axis direction orthogonal to the X axis is the Y axis, the control devices that drive the X and Y axes are slaves, and the control device that drives the main axis is the master. I do. The Y-axis slave that drives the Y-axis is the injector 42
The solenoid valve which opens and closes the valve is provided.

【0026】主軸の位置がA1からA4まで移動する
間、X軸スレーブはコンベアの移動速度と同期してX1
からX4の位置へX軸を制御して、注入器42を容器4
1に同期して動かす。Y軸スレーブは主軸がA1からA
2まで移動する間に、Y1からY2へ注入器42を下降
させ、主軸がA2からA3へ移動する間、PMC17を
介して電磁弁をONさせ液体を容器41に注入する。さ
らに主軸がA3からA4まで移動する間にY軸をY2か
らY1の位置に上昇させる。また、主軸がA4からA5
まで移動する間に、X軸スレーブは、X軸をX4からX
1へ移動させる。このように動作させることによって、
図5に示すように、容器41は搬送されながら自動的に
液体がに注入されることになる。
While the position of the main shaft moves from A1 to A4, the X-axis slave synchronizes with X1 in synchronization with the moving speed of the conveyor.
The X axis is controlled to the position of X4 from
Move in sync with 1. In the Y-axis slave, the main axis is from A1 to A
During the movement to 2, the injector 42 is lowered from Y1 to Y2, and while the main shaft moves from A2 to A3, the solenoid valve is turned on via the PMC 17 to inject the liquid into the container 41. Further, the Y axis is raised from Y2 to Y1 while the main shaft moves from A3 to A4. Also, the main shaft is from A4 to A5
The X-axis slave moves the X-axis from X4 to X
Move to 1. By operating in this way,
As shown in FIG. 5, the liquid is automatically injected into the container 41 while being transported.

【0027】上述した動作プログラムを示す一括したデ
ータテーブルは図6に示したものとなる。マスタの制御
装置にはインデックス座標位置としての主軸位置を記憶
するテーブルのみがデータテーブルとして記憶され、X
軸スレーブの制御装置には主軸位置とこの位置に対応す
るX軸位置を示すデータが格納されたデータテーブルが
格納される。またY軸スレーブの制御装置には、主軸位
置とこの位置に対応するY軸位置を示すデータ及び出力
信号データを記憶するデータテーブルが格納されること
になる。
A collective data table showing the above-described operation program is as shown in FIG. In the master controller, only a table for storing the spindle position as the index coordinate position is stored as a data table.
The axis slave control device stores a data table that stores data indicating the main shaft position and the X-axis position corresponding to the main shaft position. Further, the control device of the Y-axis slave stores a data table for storing data indicating the main shaft position, the Y-axis position corresponding to this position, and output signal data.

【0028】以上が、本願発明を適用した応用令の一例
である。しかし、上述した説明では、マスタと各スレー
ブによって駆動される軸の動作が完全に同期していると
いう前提で説明している。しかし、マスタの基本周期
(ITP周期)と各スレーブの基本周期(ITP周期)
はそれぞれ独立して走っている。そのため、マスタMか
ら送信されたインデックス座標位置データを受けとり、
それ基づいて処理する時間がスレーブ毎異なることにな
る。スレーブ間で最大1基本周期(ITP周期)のずれ
が発生し、マスタ、スレーブ間、及びスレーブ間で位相
差が発生することになる。また、インデックス座標位置
データの抜けや、飛ばし等が発生する。そこで、これら
の補正をしない限り正確な多軸同期制御は得られない。
The above is an example of an application order to which the present invention is applied. However, the above description has been made on the assumption that the operations of the axes driven by the master and each slave are completely synchronized. However, the basic cycle of the master (ITP cycle) and the basic cycle of each slave (ITP cycle)
Are running independently. Therefore, receiving the index coordinate position data transmitted from the master M,
The processing time based on this will be different for each slave. A maximum shift of one basic cycle (ITP cycle) occurs between the slaves, and a phase difference occurs between the master and the slave and between the slaves. In addition, omission or skipping of index coordinate position data occurs. Therefore, accurate multi-axis synchronous control cannot be obtained unless these corrections are made.

【0029】図7は、マスタMとスレーブS1〜Sn間
のインデックス座標位置データの送受において、基本周
期(ITP周期)の位相ずれ等を補正しない場合に生じ
る現象の説明図である。マスタMはマスタMの基本周期
(ITP周期)毎インデックス座標位置データを送信す
る。各スレーブS1〜Snはそれぞれスレーブ毎の基本
周期を持っている。図7の例では、マスタMの基本周期
開始時刻t0 、t1 、t2 、t3 、…毎、インデックス
座標位置データa1、a2、a3、…を送信し、スレー
ブ側ではそのスレーブの基本周期の開始時刻ts0、ts
1、ts2、ts3、…毎このインデックス座標位置データ
a1、a2、a3、…を読み出す。しかし、個々の基本
周期は、個々に生成しているので、クロックのバラツキ
等により微妙なズレがあり、位相差は刻々と変化する。
図7の例では、a2のデータの受信を完了前に、次の基
本周期の開始時刻ts2となった場合を示しており、この
ような現象が生じると、スレーブ側ではデータa2が受
信出来ず、抜けてしまうことになる。また、スレーブ側
で次の基本周期の始まりで読み出すデータがa3とな
り、データa2を飛ばしたことになる。
FIG. 7 is an explanatory diagram of a phenomenon that occurs when a phase shift or the like of a basic cycle (ITP cycle) is not corrected in transmission and reception of index coordinate position data between the master M and the slaves S1 to Sn. The master M transmits index coordinate position data for each basic cycle (ITP cycle) of the master M. Each of the slaves S1 to Sn has a basic period for each slave. In the example shown in FIG. 7, index coordinate position data a1, a2, a3,... Are transmitted for each of the basic cycle start times t0, t1, t2, t3,. ts0, ts
Read out the index coordinate position data a1, a2, a3,... Every 1, ts2, ts3,. However, since each basic period is generated individually, there is a slight shift due to clock variation or the like, and the phase difference changes every moment.
The example of FIG. 7 shows a case where the start time ts2 of the next basic cycle comes before the reception of the data of a2 is completed. If such a phenomenon occurs, the slave cannot receive the data a2. , It will come off. The data read at the beginning of the next basic cycle on the slave side is a3, which means that the data a2 has been skipped.

【0030】そして、マスタMが送信したインデックス
座標位置データとスレーブが受信したインデックス座標
位置データの時間的関係は図7(b)に示すような関係
となり、時間的ずれ(これを以下位相差という)が生じ
る。また、上述したデータの抜け、飛びが生じ、マスタ
とスレーブ間及びスレーブ間で動作のバラツキが生じる
ことになる。
The time relationship between the index coordinate position data transmitted by the master M and the index coordinate position data received by the slave is as shown in FIG. 7 (b), and a time difference (hereinafter referred to as a phase difference). ) Occurs. In addition, the above-described data loss and skipping occur, and variations in operation occur between the master and the slave and between the slaves.

【0031】各スレーブS1〜Snがインデックス座標
位置データを受信し、次の基本周期の開始時にこの受信
データによる軸移動を指令することになるが、例えば、
データa1をスレーブの基本周期の開始時ts1で読取
り、次の基本周期の開始時ts2でこのデータによる軸移
動指令を出力し、他のスレーブも同様の動作を行い、マ
スタはデータa1に対応するマスタの軸の移動指令をマ
スタMの基本周期の開始時t2 で開始したとしても、移
動指令の開始時期がマスタとスレーブ間で位相差分(t
s2−t2 )ずれが生じることになる。即ち、一般的にマ
スタとスレーブ間で位相差(tsi−ti )のずれが生じ
ることになる。また、スレーブ間はそれぞれの基本周期
のずれによって生じる位相差が生じることになり正確な
協調動作を行わせることが出来ない。
Each of the slaves S1 to Sn receives the index coordinate position data, and at the start of the next basic cycle, instructs axis movement based on the received data.
The data a1 is read at the start ts1 of the basic cycle of the slave, and at the start ts2 of the next basic cycle, an axis movement command based on this data is output. The other slaves perform the same operation, and the master corresponds to the data a1. Even if the movement command of the axis of the master is started at the start time t2 of the basic cycle of the master M, the start time of the movement command is the phase difference between the master and the slave (t
s2-t2). In other words, a phase difference (tsi-ti) generally occurs between the master and the slave. Further, a phase difference occurs between the slaves due to the shift of the respective basic periods, and it is not possible to perform an accurate cooperative operation.

【0032】そこで、本願発明は、これらを補正して正
確な協調動作を行わせるものである。まず、この補正原
理について説明する。
Therefore, the present invention corrects these and performs an accurate cooperative operation. First, the principle of this correction will be described.

【0033】図8は、本願発明の補正原理説明図であ
る。マスタの時刻t1 から始まり時刻t2 で終わる基本
周期(ITP周期)にインデックス座標位置データa1
がスレーブに送信されたとする。スレーブでは、スレー
ブの開始時刻ts0とts1間の基本周期中で受信される。
図8において、tA はインデックス座標位置データa1
の送信完了時刻、tB は該データa1の受信完了時刻で
ある。
FIG. 8 is an explanatory diagram of the correction principle of the present invention. The index coordinate position data a1 is added to the basic cycle (ITP cycle) starting from time t1 of the master and ending at time t2.
Is sent to the slave. At the slave, it is received during the basic cycle between the start times ts0 and ts1 of the slave.
In FIG. 8, tA is index coordinate position data a1.
Is the transmission completion time, and tB is the reception completion time of the data a1.

【0034】そこで、位相差ts1' =ts1−t1 を求め
る。
Therefore, the phase difference ts1 '= ts1-t1 is obtained.

【0035】データ受信完了tB からts1までの時間は (ts1−tB )=(ts1−ts0)−(tB −ts0) =T0 −(tB −ts0) …(1) なお、T0 は、基本周期(ITP周期)であり、マスタ
MもスレーブS1〜Snもほぼ同一であるから、T0 =
ts1−ts0=t1 −t0 である。
The time from the completion of data reception tB to ts1 is (ts1-tB) = (ts1-ts0)-(tB-ts0) = T0-(tB-ts0) (1) where T0 is the basic period ( ITP cycle), and since the master M and the slaves S1 to Sn are almost the same, T0 =
ts1−ts0 = t1−t0.

【0036】また、データ転送時間Tt は、 Tt =tA −t1 …(2) 上記1式と2式より、位相差ts1' は ts1' =ts1−t1 =(tB −tA )+Tt +T0 −(tB −ts0) …(3) となる。The data transfer time Tt is: Tt = tA-t1 (2) From the above equations (1) and (2), the phase difference ts1 'is ts1' = ts1-t1 = (tB-tA) + Tt + T0- (tB) −ts0) (3)

【0037】そこで、各スレーブ毎に基本周期(ITP
周期)開始毎にカウントを開始するカウンタC1を設
け、インデックス座標位置データを受信完了した時、そ
の時の上記カウンタC1のカウント値を取り込むラッチ
Laを設け、基本周期開始時ts0からデータ受信完了時
tB までの時間(tB −ts0)をこのカウンタC1とラ
ッチLaで測定する。カウンタC1の1カウント当りの
時間をkとすると、ラッチLaに取り込まれたカウント
値がMとすれば、 (tB −ts0)=M×k よって、上記3式より位相差ts1' は次式で求められ
る。
Therefore, the basic period (ITP) is set for each slave.
A counter C1 is provided to start counting each time a cycle is started, and a latch La for taking in the count value of the counter C1 at the time of completion of reception of index coordinate position data is provided. The time (tB-ts0) is measured by the counter C1 and the latch La. Assuming that the time per count of the counter C1 is k, if the count value taken into the latch La is M, then (tB-ts0) = M × k. Thus, from the above equation, the phase difference ts1 'is expressed by the following equation. Desired.

【0038】 ts1' =(tB −tA )+Tt +T0 −M×k これを一般式で表せば位相差tsn' は、 tsn' =(tB −tA )+Tt +T0 −M×k …(4) ただしn=1,2,3,…である。Ts1 ′ = (tB−tA) + Tt + T0−M × k If this is expressed by a general formula, the phase difference tsn ′ is: tsn ′ = (tB−tA) + Tt + T0−M × k (4) where n = 1, 2, 3, ...

【0039】データ転送時間Tt 及び基本周期T0 は決
まった既知の時間であり、データ送信完了とデータ受信
完了の差(tB −tA )を無視すれば、上記ラッチLa
に格納された値Mより、位相差tsn' を求めることが出
来るものである。即ち、(tB −tA )の誤差を含んだ
位相差tsn' を求めることが出来る。さらに、このデー
タ送信完了とデータ受信完了の差(tB −tA )はデー
タ伝送遅れであり、スレーブの台数、ケーブルの長さ等
システムが決まれば、実験的に求められる時間である。
その結果、マスタの基本周期に対する各スレーブの基本
周期の位相差tsn' は上記カウンタC1とラッチLaに
よって求めることができる。結局、各スレーブを同期さ
せて駆動することができることになる。
The data transfer time Tt and the basic period T0 are fixed and known times. If the difference (tB-tA) between the completion of data transmission and the completion of data reception is ignored, the latch La
The phase difference tsn 'can be obtained from the value M stored in. That is, the phase difference tsn 'including the error of (tB -tA) can be obtained. Further, the difference (tB-tA) between the completion of data transmission and the completion of data reception is a data transmission delay, which is an experimentally determined time if the system is determined, such as the number of slaves and the length of the cable.
As a result, the phase difference tsn 'of the basic period of each slave with respect to the basic period of the master can be obtained by the counter C1 and the latch La. As a result, each slave can be driven synchronously.

【0040】図9は、上述した位相差を補正するための
カウンタC1やラッチLa、及びデータの抜けや飛びを
補正するために利用されるカウンタC2を備えるデータ
受信部15bの詳細ブロック図である。図中符号101
は、レシーバ31を介してデータ通信ラインL1を介し
て送られて来るデータを受信し、シリアルデータをパラ
レルデータに変換するとともに、送られてきたデータの
特別なビットより、コンフィグレーションモードかデー
タ通信モードか判別し、さらに、IDコードを判別する
データ受信・変換・モード判別回路である。該回路10
1に設けられたデータ受信完了フラグF2 (図9中には
図示していない)がデータ受信完了時にセットされると
データ受信完了信号Seがデータ保持回路102、ラッ
チLa及びカウンタC2に出力される。また、該回路1
01でパラレルデータに変換されたデータ及びモード、
ID判別結果は受信データ保持回路102に出力され記
憶される。このデータ及び後述するラッチLa、カウン
タC2のデータをCNC用プロセッサ10が読み出し、
受信データ読みだし完了信号Srを出力すると、この信
号Srでこの受信データ保持回路102、ラッチLaは
リセットされるとともに上記データ受信完了フラグF2
もリセットされ、データ受信完了信号Se もなくなる。
FIG. 9 is a detailed block diagram of the data receiving unit 15b including the counter C1 and the latch La for correcting the above-described phase difference, and the counter C2 used for correcting missing or skipping of data. . Reference numeral 101 in the figure
Receives the data transmitted via the data communication line L1 via the receiver 31, converts the serial data into parallel data, and, based on the special bits of the transmitted data, transmits the data in the configuration mode or the data communication. A data reception / conversion / mode discrimination circuit that discriminates whether the mode is the mode, and further determines the ID code. The circuit 10
When a data reception completion flag F2 (not shown in FIG. 9) provided at 1 is set upon completion of data reception, a data reception completion signal Se is output to the data holding circuit 102, the latch La, and the counter C2. . The circuit 1
01, data and mode converted to parallel data,
The ID determination result is output to the reception data holding circuit 102 and stored. The CNC processor 10 reads out this data and the data of the latch La and the counter C2 described later,
When the reception data read completion signal Sr is output, the reception data holding circuit 102 and the latch La are reset by the signal Sr, and the data reception completion flag F2 is output.
Is also reset, and the data reception completion signal Se disappears.

【0041】カウンタC1は、タイマ22から出力され
る基本周期(ITP周期)毎のパルスによってリセット
され、クロックパルスをカウントする。ラッチLaは、
上述したデータ受信・変換・モード判別回路101から
のデータ受信完了信号Seの立ち上がりでカウンタC1
のカウント値を取り込む。また、CNC用プロセッサ1
0が受信データ読みだし完了信号Srを出力すると、ラ
ッチLaはリセットされる。
The counter C1 is reset by a pulse for each basic cycle (ITP cycle) output from the timer 22, and counts clock pulses. The latch La is
When the data reception completion signal Se from the data reception / conversion / mode determination circuit 101 described above rises, the counter C1
Capture the count value of Also, the CNC processor 1
When 0 outputs the received data read completion signal Sr, the latch La is reset.

【0042】カウンタC2は、データ受信・変換・モー
ド判別回路101からのデータ受信完了信号Seによっ
て、基本周期(ITP周期)パルスのカウントを開始
し、受信データ読みだし完了信号Srまたは次のデータ
受信完了信号Seによってリセットされる。即ち、この
カウンタC2はデータが受信されデータ受信完了信号S
eが発生すると基本周期(ITP周期)パルスのカウン
トを開始するが、データを受信して次の基本周期(IT
P周期)パルスに基づいてこの受信したデータが読み出
され、受信データ読みだし完了信号Srが出力されるこ
とになるから、図7でデータa0 、a1 のデータを受信
して基本周期(ITP周期)パルス時刻ts0、ts1でデ
ータを読み出した際には、カウンタC2の値は「1」で
ある。しかし、図7(a)のデータa2 の場合には、基
本周期(ITP周期)パルス時刻ts2より前に、データ
を受信完了しておらず、データ受信完了信号Seが、基
本周期(ITP周期)パルス時刻ts2よりも前に発生し
ていないから、カウンタC2はカウントを開始しておら
ず「0」のままである。よってこのカウンタC2の値よ
り、CNC用のプロセッサ10は、データの抜けがあっ
たことを知ることができる。
The counter C2 starts counting the basic cycle (ITP cycle) pulses in response to the data reception completion signal Se from the data reception / conversion / mode discrimination circuit 101, and reads the reception data read completion signal Sr or the next data reception. It is reset by the completion signal Se. That is, the counter C2 receives the data and the data reception completion signal S
When e occurs, counting of a basic cycle (ITP cycle) pulse is started.
The received data is read out based on the (P period) pulse, and the received data reading completion signal Sr is output. Therefore, in FIG. 7, the data a0 and a1 are received and the basic period (ITP period) is received. When the data is read at the pulse times ts0 and ts1, the value of the counter C2 is "1". However, in the case of the data a2 in FIG. 7A, the reception of the data has not been completed before the basic period (ITP cycle) pulse time ts2, and the data reception completion signal Se becomes the basic period (ITP period). Since it has not occurred before the pulse time ts2, the counter C2 has not started counting and remains "0". Therefore, from the value of the counter C2, the CNC processor 10 can know that the data is missing.

【0043】上述したように、ラッチLaは基本周期
(ITP周期)パルス発生時からデータ受信完了信号S
eの立ち上がりでのカウンタC1の値を記憶するもので
あるから、CNC用プロセッサ10は読み取ったこの値
Mに1カウント当りの時間(クロック信号の間隔)kを
乗ずれば、図8における(tB −ts0)=k・Mを求め
ることができる。そして、上述した4式の演算を行うこ
とによって、位相差tsn' を求めることができる。
As described above, the latch La starts receiving the data reception completion signal S from the generation of the basic cycle (ITP cycle) pulse.
Since the value of the counter C1 at the rising edge of e is stored, the CNC processor 10 multiplies the read value M by the time per count (interval of the clock signal) k (tB in FIG. 8). −ts0) = k · M. Then, the phase difference tsn 'can be obtained by performing the calculations of the above four equations.

【0044】また、読み取ったカウンタC2の値より、
データが抜けたか否かが分かるので、データ抜けが生じ
た場合には、当該周期より1つ前及び2つ前の基本周期
で読み取ったデータ及び算出した位相差によって、外挿
して当該周期におけるインデックス座標位置データ及び
位相差を算出する。図7の例で、データa2 が読み取れ
なかった場合、このデータの推定値a2'及び、この時の
位相差の推定値ts2''は次のようにして求められる。
Further, based on the value of the read counter C2,
Since it is possible to know whether or not data has been lost, if data has been lost, an index is extrapolated based on the data read in the basic cycle one and two before the cycle and the calculated phase difference. The coordinate position data and the phase difference are calculated. In the example of FIG. 7, when the data a2 cannot be read, the estimated value a2 'of this data and the estimated value ts2''of the phase difference at this time are obtained as follows.

【0045】a2' =2×a1 −a0 ts2''=2×ts1' −ts0' これを一般式で表すと、データの推定値an'、位相差の
推定値tsn''は次の5式、6式で表される。
A 2 ′ = 2 × a 1 −a 0 ts 2 ″ = 2 × ts 1 ′ −ts 0 ′ When this is expressed by a general expression, the data estimated value an ′ and the phase difference estimated value tsn ″ are expressed by the following five expressions. , 6

【0046】 an' =2×an-1 −an-2 …(5) tsn''=2×ts(n-1)' −ts(n-2)' …(6) ただし上記5式、6式は1次近似で求める場合である。An ′ = 2 × an−1−an−2 (5) tsn ″ = 2 × ts (n−1) ′ − ts (n−2) ′ (6) The equation is for a case of first order approximation.

【0047】なお、図7の時刻ts3では、データa3 が
読み込まれ、データa2 は読み込まれないことになる
が、上述したようにこのデータa2 は時刻ts2のタイミ
ングで5式によって推定された値a2'とされているから
問題はなく、時刻ts3のタイミングでは上述した通常の
4式の位相差の演算だけを行えばよい。
At time ts3 in FIG. 7, data a3 is read and data a2 is not read. However, as described above, this data a2 is a value a2 estimated by the equation (5) at the timing of time ts2. , There is no problem. At the timing of time ts3, it is sufficient to perform only the calculation of the above-described ordinary four phase difference.

【0048】こうして読み込まれたインデックス座標位
置データan 、及び推定値an'は、スレーブの次の基本
周期(ITP周期)の開始時を基準にして、このインデ
ックス座標位置データan に対応するデータテーブルに
記憶する位置への移動が実行される。またマスタMはデ
ータを送出したマスタの基本周期(ITP周期)の次の
基本周期の開始時を基準にして送出したインデックス座
標位置データan に対応するデータテーブルに記憶され
た位置への移動が実行することになる。しかし、上述し
たように、マスタの基本周期に対して各スレーブの基本
周期は位相差tsn' があるので、これを補正する必要が
ある。即ち、図7で示す例で、マスタM、及びスレーブ
S1〜Snのデータテーブルに記憶したインデックス座
標位置データa1に対するデータを、マスタMは次の基
本周期開始時t2 を基準に、各スレーブはそれぞれの次
の基本周期開始時ts2を基準に実行すると、図7(b)
に示されるように、位相差ts2だけの時間差があるか
ら、位置ずれが生じる。そこで、上記位相差tsn、当該
周期で読み取ったデータan 、及び1つ前の周期で読み
取ったデータan-1 により内挿して、次の7式により補
正インデックス座標位置データasnを求める。
The index coordinate position data an and the estimated value an ′ thus read are stored in a data table corresponding to the index coordinate position data an with reference to the start of the next basic cycle (ITP cycle) of the slave. The movement to the storage location is performed. The master M moves to the position stored in the data table corresponding to the sent index coordinate position data an with reference to the start of the next basic period of the basic period (ITP period) of the master that transmitted the data. Will do. However, as described above, since the basic period of each slave has a phase difference tsn 'with respect to the basic period of the master, this must be corrected. That is, in the example shown in FIG. 7, the master M and the data corresponding to the index coordinate position data a1 stored in the data tables of the slaves S1 to Sn are read by the master M on the basis of the next basic cycle start time t2. FIG. 7 (b) is executed based on ts2 at the start of the next basic cycle.
As shown in (1), since there is a time difference of the phase difference ts2, a positional shift occurs. Therefore, interpolation is performed using the phase difference tsn, the data an read in the cycle, and the data an-1 read in the immediately preceding cycle, and the corrected index coordinate position data asn is obtained by the following equation (7).

【0049】 asn=an +[tsn' ×(an −an-1)/T0 ] …(7) 各スレーブではこうして求めた補正インデックス座標位
置データasnに基づいて各々のデータテーブルよりスレ
ーブの軸の位置を読み取り、その位置に基づいて、各ス
レーブの軸へ移動指令を出力する。
Asn = an + [tsn ′ × (an−an−1) / T0] (7) In each slave, the position of the axis of the slave is obtained from each data table based on the corrected index coordinate position data asn thus obtained. And outputs a movement command to each slave axis based on the position.

【0050】図10(a)、(b)は、送出したインデ
ックス座標位置データan と補正インデックス座標位置
データasnの関係を示す図である。この図10(b)に
示すように、インデックス座標位置データのずれは、ほ
とんど解消され、その結果、正確な多軸協調制御が可能
になることを示している。
FIGS. 10A and 10B are diagrams showing the relationship between the sent index coordinate position data an and the corrected index coordinate position data asn. As shown in FIG. 10B, the deviation of the index coordinate position data is almost eliminated, and as a result, accurate multi-axis coordinated control can be performed.

【0051】図11は、コンフィグレーションモード
時、また、図12,図13は、データ通信モード時に、
マスタM、及びスレーブS1〜SnのCNC用プロセッ
サ10が実行する処理のフローチャートである。
FIG. 11 shows the configuration mode, and FIGS. 12 and 13 show the data communication mode.
It is a flowchart of the process which CNC processor 10 of master M and slaves S1-Sn performs.

【0052】電源投入時の初期設定やアラーム発生時に
は、図11に示すコンフィグレーションモード時に移行
し、マスタMと各スレーブS1〜Snは1対1で通信す
ることになる。まず、電源投入時の動作について説明す
る。マスタM、各スレーブS1〜SnのRAM12の不
揮発性部分に、インデックス座標位置データとそれぞれ
の軸の位置を示すデータテーブルがそれぞれ格納されて
いるものとする。さらに、各スレーブS1〜Snにはそ
れぞれのIDコードがすでに設定され、マスタMにはす
でてのスレーブS1〜SnのIDコードが記憶されてい
るものとする。
At the time of initial setting upon power-on or occurrence of an alarm, the mode shifts to the configuration mode shown in FIG. 11, and the master M and each of the slaves S1 to Sn perform one-to-one communication. First, the operation when the power is turned on will be described. It is assumed that index coordinate position data and a data table indicating the position of each axis are stored in the nonvolatile portion of the RAM 12 of the master M and each of the slaves S1 to Sn. Further, it is assumed that respective ID codes are already set in the respective slaves S1 to Sn, and the ID codes of all the slaves S1 to Sn are stored in the master M.

【0053】そこで、まず、マスタMに同期動作を行う
スレーブのIDコードを設定し動作指令を与えると、マ
スタMのCNC用プロセッサ10は図11の処理を開始
する。
Therefore, first, when the ID code of the slave performing the synchronous operation is set to the master M and an operation command is given, the CNC processor 10 of the master M starts the processing in FIG.

【0054】まず、スレーブのIDコードを指定するレ
ジスタSIDを「0」に設定し(ステップA1)、次に
該レジスタSIDを「1」インクリメントし(ステップ
A2)、該レジスタSIDの値が全てのスレーブの数N
を越えたか判断し(ステップA3)、越えていなけれ
ば、該レジスタSIDで示されるIDコードのスレーブ
が同期動作として設定されているかを判断し(ステップ
A4)、設定されていなければ、ステップA2に戻る。
以下、順次、レジスタSIDをインクリメントし、レジ
スタSIDで示されるIDコードが同期動作スレーブの
IDコードとして設定されていれば、特定のビットをコ
ンフィグレーションモードのコードに設定し、上記レジ
スタSIDで示されるスレーブIDコードと同期許可コ
ードをデータ送信部15Aの送信バッファに設定し、送
信開始フラグF1をセットする(ステップA5)。
First, the register SID designating the ID code of the slave is set to "0" (step A1), then the register SID is incremented by "1" (step A2), and the value of the register SID becomes Number of slaves N
Is determined (step A3). If not, it is determined whether the slave of the ID code indicated by the register SID is set as a synchronous operation (step A4). If not set, the process proceeds to step A2. Return.
Thereafter, the register SID is sequentially incremented, and if the ID code indicated by the register SID is set as the ID code of the synchronous operation slave, a specific bit is set to the code of the configuration mode, and is indicated by the register SID. The slave ID code and the synchronization permission code are set in the transmission buffer of the data transmission unit 15A, and the transmission start flag F1 is set (step A5).

【0055】そして基本周期(ITP周期)毎にタイマ
22から出力されるITPパルスが発生するのを待ち
(ステップA6)、このITPパルスが発生すると送信
開始フラグF1をリセットし(ステップA7)、通信制
御回路15より送信バッファに格納されたデータをドラ
イバ30を介して送信し、CNC用プロセッサ10は、
応答待ちタイマTをスタートさせ(ステップA8)、該
タイマTが設定時間Tuに達するまで、スレーブが応答
があったか判断する(ステップA9,A10)。
Then, it waits for the generation of an ITP pulse output from the timer 22 for each basic cycle (ITP cycle) (step A6), and when this ITP pulse occurs, resets the transmission start flag F1 (step A7) and performs communication. The data stored in the transmission buffer is transmitted from the control circuit 15 via the driver 30, and the CNC processor 10
The response waiting timer T is started (step A8), and it is determined whether or not the slave has responded until the timer T reaches the set time Tu (steps A9 and A10).

【0056】一方、スレーブ側のCNC用プロセッサ1
0は、通信制御回路15内のデータ受信部15b内に設
けられたデータ受信完了フラグF2をポーリングして、
該フラグF2がセットされているか繰り返し判断してい
る(ステップB1)。マスタから送られてきたデータの
受信を完了し、このデータ受信完了フラグF2がセット
されると、プロセッサ10は、受信データ保持回路10
2から保持データを読み出し(ステップB2)、読みだ
し完了信号Srを出力し、データ受信完了フラグF2、
受信データ保持回路102、ラッチLa、カウンタC2
をクリアする(ステップB3)。次に、読み出したデー
タの特定ビットよりコンフィグレーションモードか判断
し、また、送られてきたIDコードが自己のIDコード
と一致するかを判断しする(ステップB4)。
On the other hand, the CNC processor 1 on the slave side
0 polls the data reception completion flag F2 provided in the data reception unit 15b in the communication control circuit 15,
It is repeatedly determined whether the flag F2 is set (step B1). When the reception of the data sent from the master is completed and the data reception completion flag F2 is set, the processor 10 sets the reception data holding circuit 10
2 (step B2), outputs a read completion signal Sr, and outputs a data reception completion flag F2,
Received data holding circuit 102, latch La, counter C2
Is cleared (step B3). Next, it is determined from the specific bit of the read data whether the mode is the configuration mode and whether the transmitted ID code matches its own ID code (step B4).

【0057】コンフィグションモードではない、または
スレーブIDコードが自己のIDコードと一致していな
ければステップB1に戻る。コンフィグションモードで
読み出したスレーブIDコードが自己のIDコードと一
致していれば、送信可能フラグF3をセットし(ステッ
プB5)、受信データが正常か判断する(ステップB
6)。伝送途中のノイズ等で、受信データに異常があれ
ば、再要求フラグF5をセットし(ステップB12)、
ステップB7に進む、また、受信データに異常がなけれ
ば、再要求フラグF5をセットすることなくステップB
7に進む。ステップB7では、再要求フラグF5の状態
を含めて、当該スレーブのステイタスデータを送信バッ
ファにセットし送信開始フラグF4をセットする。そし
て、該送信開始フラグF4がセットされてからの最初の
ITP信号の発生で(ステップB8)、上記フラグF
3,F4,F5をリセットするとともに送信バッファに
格納されたデータをマスタに送信し(ステップB9,B
10)、再び、受信完了フラグF2のポーリング処理を
開始する(ステップB11)。
If the mode is not the configuration mode or the slave ID code does not match its own ID code, the process returns to step B1. If the slave ID code read in the configuration mode matches its own ID code, the transmission enable flag F3 is set (step B5), and it is determined whether the received data is normal (step B).
6). If there is an abnormality in the received data due to noise during transmission or the like, a re-request flag F5 is set (step B12),
Proceed to step B7. If there is no abnormality in the received data, step B7 is performed without setting the re-request flag F5.
Go to 7. In step B7, the status data of the slave including the status of the re-request flag F5 is set in the transmission buffer, and the transmission start flag F4 is set. Then, when the first ITP signal is generated after the transmission start flag F4 is set (step B8), the flag F4 is set.
3, F4 and F5 are reset and the data stored in the transmission buffer is transmitted to the master (steps B9 and B9).
10) The polling process of the reception completion flag F2 is started again (step B11).

【0058】マスタMのCNC用プロセッサ10は、ス
テップA9,A10でデータの送信を開始から設定され
た時間Tuが経過するまで、スレーブから応答があった
か判断し、応答がない場合には、送信したIDコードの
スレーブの正常異常を記憶するスレーブフラグF(I
D)を異常(「1」)にセットして(ステップA1
3)、ステップA2に戻る。
The CNC processor 10 of the master M determines whether or not there is a response from the slave until the set time Tu elapses from the start of data transmission in steps A9 and A10. Slave flag F (I
D) is set to abnormal ("1") (step A1)
3) Return to step A2.

【0059】また、スレーブから応答があると(スレー
ブのステップB10の処理に対応)、その受信データを
チェックし(ステップA11)、再要求フラグF5がセ
ットされていたり、受信データに異常があるとステップ
A5に戻り、再度IDコードとコンフィグレーショクモ
ードのコードと、同期許可コードを送信するようにす
る。受信データに異常がなく再要求フラグF5がセット
されていなければ、スレーブフラグF(ID)を正常
(「0」)にセットし、送られてきたステータスデータ
を保持し(ステップA12)、ステップA2に戻る。
When there is a response from the slave (corresponding to the processing of step B10 of the slave), the received data is checked (step A11), and if the re-request flag F5 is set or the received data is abnormal. Returning to step A5, the ID code, the configuration mode code, and the synchronization permission code are transmitted again. If there is no abnormality in the received data and the re-request flag F5 is not set, the slave flag F (ID) is set to normal ("0"), the sent status data is held (step A12), and step A2 is performed. Return to

【0060】以下、レジスタSIDをインクリメントし
ながら、設定されたスレーブにIDコード、コンフィグ
レーションコード、同期許可信号を送信し、レジスタS
IDの値が全てのスレーブ数Nを越えた場合には、表示
装置付MDI25の表示画面に保持されている全スレー
ブの状態(正常、異常、ステイタス)を表示する(ステ
ップA14)。
Hereinafter, while incrementing the register SID, the ID code, the configuration code, and the synchronization permission signal are transmitted to the set slave, and the register S
When the ID value exceeds the number N of all the slaves, the status (normal, abnormal, status) of all the slaves held on the display screen of the MDI 25 with the display device is displayed (step A14).

【0061】そして、異常なしで、プログラム等で起動
信号がONになっていると、データ通信モードに移行
し、図12,13で示す処理を開始し、同期運転を開始
する。
If the start signal is turned on by a program or the like without any abnormality, the mode shifts to the data communication mode, the processing shown in FIGS. 12 and 13 is started, and the synchronous operation is started.

【0062】なお、マスタMより、各スレーブS1〜S
nにデータテーブルのデータを送る場合には、ステップ
A5で送出するスレーブIDに対応するデータテーブル
のデータを同時に送るようにすればよい。
It should be noted that each of the slaves S1 to S
When the data of the data table is transmitted to n, the data of the data table corresponding to the slave ID transmitted in step A5 may be transmitted at the same time.

【0063】データ通信モードでは、マスタのCNC用
プロセッサ10は、アラーム通信ラインL2がアサート
されているか、または、前述したようにインデックス座
標位置データをスレーブに送信し、アラーム通信ライン
L2から対応するスレーブのパルス発生部15dからの
受信パルスを受信したかを判断し(ステップA20)、
アラーム通信ラインL2がアサートされていたり、スレ
ーブから受信パルスを受信しない場合には、図11に示
すコンフィグレーションモードに移行する。また、アラ
ームが発生していなければ、基本周期(ITP周期)毎
の割り込み時にインデックス座標位置の生成もしくは計
算を行い、このインデックス座標位置データと、同期運
転するスレーブのIDコードを送信バッファにセット
し、送信開始フラグF1をセットする(ステップA2
1)。
In the data communication mode, the CNC processor 10 of the master transmits the index coordinate position data to the slave, whether the alarm communication line L2 is asserted, or transmits the index coordinate position data to the slave as described above. It is determined whether the received pulse from the pulse generator 15d is received (step A20).
When the alarm communication line L2 is asserted or when no reception pulse is received from the slave, the mode shifts to the configuration mode shown in FIG. If the alarm has not occurred, the index coordinate position is generated or calculated at the time of interruption every basic period (ITP period), and the index coordinate position data and the ID code of the slave that operates synchronously are set in the transmission buffer. , Sets the transmission start flag F1 (step A2)
1).

【0064】送信開始フラグF1がセットされてから最
初のITP信号を受けると、上記送信開始フラグF1を
リセットし送信バッファに格納されたインデックス座標
位置データ等を送信し(ステップA22〜A24)、ス
テップA20に戻る。以下マスタMのCNC用プロセッ
サ10は上記ステップA20〜A24の処理を繰り返し
実行し同期運転するスレーブにインデックス座標位置デ
ータを送信する。
When the first ITP signal is received after the transmission start flag F1 is set, the transmission start flag F1 is reset and the index coordinate position data and the like stored in the transmission buffer are transmitted (steps A22 to A24). Return to A20. Hereinafter, the CNC processor 10 of the master M repeatedly executes the processing of the steps A20 to A24 and transmits the index coordinate position data to the slaves that operate synchronously.

【0065】一方、スレーブS1〜SnのCNC用プロ
セッサ10は、基本周期(ITP周期)毎、図12、図
13に示す処理を実行し、まず、同期運転中を示すフラ
グF6が1にセットされているか判断し(ステップB2
0)、最初は初期設定でセットされておらず「0」であ
るから、ステップB21に移行し、受信完了フラグF2
がON(「1」)か判断し、ONでなければ前述したよ
うに、前基本周期(ITP周期は)開始パルスと当該基
本周期の開始パルス間に(1つ前の基本周期間に)、イ
ンデックス座標位置データを受信していないことを意味
し、この場合には当該基本周期(ITP周期)の処理は
終了する。
On the other hand, the CNC processors 10 of the slaves S1 to Sn execute the processing shown in FIGS. 12 and 13 for each basic cycle (ITP cycle). First, the flag F6 indicating that the synchronous operation is being performed is set to 1. (Step B2)
0) At first, since it is not set in the initial setting and is “0”, the process shifts to step B21 and the reception completion flag F2
Is determined to be ON (“1”), and if not ON, as described above, between the start pulse of the previous basic cycle (the ITP cycle) and the start pulse of the basic cycle (between the previous basic cycle), This means that the index coordinate position data has not been received, and in this case, the processing of the basic cycle (ITP cycle) ends.

【0066】一方、受信完了フラグF2がONである
と、受信データ保持回路102に保持されているIDデ
ータ、インデックス座標位置データ等を読み出すと共
に、ラッチLaに記憶するデータM、カウンタC2の値
を読み出し(ステップB22)、読み出し完了信号Sr
を出力し(ステップB23)、受信完了フラグF2、受
信データ保持回路102、ラッチLa、カウンタC2を
リセットする。
On the other hand, when the reception completion flag F2 is ON, the ID data and index coordinate position data and the like held in the reception data holding circuit 102 are read, and the data M stored in the latch La and the value of the counter C2 are read. Read (step B22), read completion signal Sr
(Step B23), and resets the reception completion flag F2, the reception data holding circuit 102, the latch La, and the counter C2.

【0067】次に読み取ったデータの特定ビットから、
データ通信モードか否か、及び自己のIDコードがある
か判断し(ステップA24)、データ通信モードである
が、自己のIDコードがない場合には、当該ITP周期
の処理を終了する。また、モードがコンフィグレーショ
ンモードであると、フラグF6を「0」にリセットし
(ステップB31)、図11のステップB7に移行す
る。
Next, from the specific bits of the read data,
It is determined whether the mode is the data communication mode and whether there is an own ID code (step A24). If the mode is the data communication mode but there is no own ID code, the process of the ITP cycle ends. If the mode is the configuration mode, the flag F6 is reset to "0" (step B31), and the flow shifts to step B7 in FIG.

【0068】データ通信モードでかつIDコードが自己
のIDコードと一致する場合には、同期運転中を示すフ
ラグF6を「1」にセットし(ステップB25)、受信
データが正常か判断する(ステップB26)。正常であ
れば、カウンタC3をクリアし(ステップB27)、ラ
ッチLaから読み取った値Mと予め設定されている1ク
ロック当りの時間k、基本周期(ITP周期)T0 、及
びデータ通信時間Tt、さらには、伝送路の遅れ(TB
−TA )より、上述した4式の演算を行って、マスタと
スレーブの基本周期の位相差tsn' を求める(ステップ
B28)。
If the ID code coincides with the own ID code in the data communication mode, the flag F6 indicating that the synchronous operation is being performed is set to "1" (step B25), and it is determined whether the received data is normal (step B25). B26). If normal, the counter C3 is cleared (step B27), the value M read from the latch La, a preset time k per clock, a basic cycle (ITP cycle) T0, a data communication time Tt, and Is the transmission path delay (TB
-TA), the above equation 4 is calculated to determine the phase difference tsn 'between the basic periods of the master and the slave (step B28).

【0069】次に、求めた位相差tsn' 、ステップB2
2で読み取ったインデックス座標位置データan 、基本
周期(ITP周期)T0 及び後述するレジスタR(a1)に
記憶する1基本周期前のインデックス座標位置データa
n-1 によって7式の演算を行って当該スレーブの位相差
を補正したインデックス座標位置データasnを求める
(ステップB29)。そして、レジスタR(a1)に記憶す
る1基本周期前のインデックス座標位置データan-1 を
レジスタR(a2)に格納し、レジスタR(a1)にステップS
B22で読み取った当該基本周期でのインデックス座標
位置データan を格納する。また、レジスタR(ts1) に
記憶する1基本周期前の位相差tsn-1をレジスタR(ts
2) に格納し、レジスタR(ts1) にステップB28で求
めた当該基本周期における位相差tsn' を格納する(ス
テップB36)。
Next, the obtained phase difference tsn 'is calculated in step B2.
The index coordinate position data an read in step 2, the basic cycle (ITP cycle) T0, and the index coordinate position data a one basic cycle before stored in a register R (a1) described later.
The calculation of equation 7 is performed using n-1 to obtain index coordinate position data asn in which the phase difference of the slave is corrected (step B29). Then, the index coordinate position data an-1 one basic cycle before stored in the register R (a1) is stored in the register R (a2), and the register R (a1) stores step S
The index coordinate position data an in the basic cycle read in B22 is stored. Further, the phase difference tsn-1 one basic cycle before stored in the register R (ts1) is stored in the register R (ts1).
2), and the phase difference tsn 'in the basic cycle obtained in step B28 is stored in the register R (ts1) (step B36).

【0070】そして、当該スレーブのRAM12に格納
されているデータテーブルより、ステップB29で求め
た位相差が補正されたインデックス座標位置データasn
に対応する当該スレーブの軸の位置を求めて移動指令を
求める(ステップB37)。この移動指令によれり得ら
れる移動速度が当該軸の設定限界値を越えているか、ま
たは当該スレーブにアラームが発生しているか判断し
(ステップB38)、アラームも発生しておらず、移動
速度も限界値内であると、ステップB37で求めた移動
指令量をサーボ用DSP19に出力し(ステップB2
9)、スレーブの軸を駆動するサーボモータを駆動制御
し、当該基本周期の処理を終了する。また、アラームが
発生しているときや、移動速度が限界値を越えていると
きには、ステップB38からステップB40に移行し
て、アラーム通信ラインをアサートして当該基本周期の
処理を終了し、コンフィグレーションモードに移行する
ようにする。
Then, based on the data table stored in the RAM 12 of the slave, the index coordinate position data asn in which the phase difference obtained in step B29 has been corrected is obtained.
And the movement command is obtained by obtaining the position of the axis of the slave corresponding to (step B37). It is determined whether the moving speed obtained by the moving command exceeds the set limit value of the relevant axis or whether an alarm is generated for the relevant slave (step B38). If it is within the limit value, the movement command amount obtained in step B37 is output to the servo DSP 19 (step B2).
9) The drive of the servo motor that drives the slave axis is controlled, and the processing of the basic cycle ends. If an alarm has occurred or the moving speed has exceeded the limit value, the process proceeds from step B38 to step B40, where the alarm communication line is asserted to terminate the processing of the basic cycle, and Move to mode.

【0071】なお、ステップB26で、受信データがノ
イズ等で異常であると判断された場合には、カウンタC
3に「1」加算し、該カウンタC3の値が2か判断し
(ステップB32,B33)、2でなければ、ステップ
B34へ移行する。また、「2」であれば、ステップB
40に移行し、フィグレーションモードに切換える。即
ち、受信データが2回続けて、異常と判断されたときに
は、アラーム通信ラインをアサートしてフィグレーショ
ンモードに切換えるものである。また、1回目の受信デ
ータ異常のときには、この受信データを無視して上述し
たデータ抜けの処理を行う。即ち、レジスタR(a1)、R
(a2)に記憶する当該基本周期よりも1つ前、及び2つ前
の受信インデックス座標位置データan-1 、an-2 より
上記5式の演算を行って、推定インデックス座標位置デ
ータan'を求め、これを当該周期のインデックス座標位
置データan とする(ステップB34)。また、レジス
タR(ts1) 、R(ts2) に記憶する当該基本周期よりも1
つ前、及び2つ前の位相差ts(n-1)' 、ts(n-2)' より
上記6式の演算を行って当該基本周期における推定位相
差tsn''を求め、これを当該周期の位相差tsn' とし
(ステップB35)、ステップB29へ移行する。
If it is determined in step B26 that the received data is abnormal due to noise or the like, the counter C
"1" is added to 3 and it is determined whether the value of the counter C3 is 2 (steps B32 and B33). If not, the process proceeds to step B34. If “2”, step B
The process shifts to 40 and switches to the figuration mode. That is, if the received data is determined to be abnormal twice consecutively, the alarm communication line is asserted to switch to the configuration mode. When the first received data is abnormal, the received data is ignored and the above-described data missing processing is performed. That is, the registers R (a1), R
The calculation of the above equation (5) is performed from the reception index coordinate position data an-1 and an-2 one before and two before the basic cycle stored in (a2), and the estimated index coordinate position data an 'is calculated. This is determined as index coordinate position data an of the cycle (step B34). In addition, the basic cycle stored in the registers R (ts1) and R (ts2) is 1
The above-mentioned equation (6) is calculated from the phase differences ts (n−1) ′ and ts (n−2) ′ immediately before and two times before to obtain an estimated phase difference tsn ″ in the basic cycle. The cycle phase difference is set as tsn '(step B35), and the flow shifts to step B29.

【0072】1度、インデックス座標位置データを受け
た後は、同期運転中を記憶するフラグF6が「1」にセ
ットされているから、ステップB20から、ステップB
30に移行し、カウンタC2の値が「0」か判断し、
「0」でなければ、上述したように、受信データの抜け
はなく受信していることを示しているからステップB2
2に移行し、上述した処理を行う。また、カウンタC2
の値が「0」であると、基本周期(ITP周期)を開始
する前に受信データを得ていないことを意味し、データ
の抜けが発生していることから、ステップB30からス
テップB34に移行して、上述した推定インデックス座
標位置データan'、推定位相差tsn''を求め、時間間隔
のばらつき補正及び位相差補正したインデックス座標位
置データan を求め、これにより、スレーブの軸の位置
をデータテーブルより求めるようにする。
Once the index coordinate position data has been received, the flag F6 for storing the synchronous operation is set to "1".
The process proceeds to 30, and it is determined whether the value of the counter C2 is "0".
If it is not "0", as described above, it indicates that there is no omission of the received data and the reception is being performed.
Then, the process proceeds to step S2. Also, the counter C2
Is "0", it means that the received data has not been obtained before the start of the basic cycle (ITP cycle), and since data omission has occurred, the process proceeds from step B30 to step B34. Then, the above-described estimated index coordinate position data an ′ and the estimated phase difference tsn ″ are obtained, and the index coordinate position data an obtained by correcting the time interval variation and the phase difference is obtained. Find from the table.

【0073】[0073]

【発明の効果】本発明は、2つの通信ラインで、マスタ
及び複数のスレーブ間のデータ送受信及び受信完了確認
を行うことができるので、外的障害による通信ラインの
切断(どちらか一方のみ又は両方)発生時、スレーブか
らのデータ受信パルスがマスタへ返信されないので、マ
スタが異常を感知でき、データの送信を止めることによ
って、システム全体の暴走を防ぐことができる。さら
に、スレーブにアラームが発生した時もマスタは感知す
ることができ、マスタによる管理が容易にできる。
According to the present invention, data transmission / reception between the master and a plurality of slaves and reception completion confirmation can be performed with two communication lines, so that the communication line can be disconnected due to an external failure (only one or both of them). ) When the data is received, since the data reception pulse from the slave is not returned to the master, the master can detect the abnormality and stop the data transmission, thereby preventing runaway of the entire system. Further, the master can detect when an alarm occurs in the slave, and the management by the master can be easily performed.

【0074】また、マスタとスレーブの基本周期の位相
差をスレーブが求めてマスタから送られてくる基準デー
タをその位相差によって補正して、補正された基準デー
タによって、スレーブの制御軸の位置のデータを求めて
該制御軸を駆動するから、マスタ及び各スレーブ間にお
ける協調動作の位置ずれが生ぜず、正確な協調動作をす
ることができる。また、スレーブ数を増大させ、協調軸
数を増大させても、上記位相差による基準データのずれ
をスレーブ自体で補正するので、正確な協調動作が可能
となるから、システムの拡張が容易となる。
The slave determines the phase difference between the basic periods of the master and the slave, corrects the reference data sent from the master by the phase difference, and uses the corrected reference data to determine the position of the control axis of the slave. Since the control axis is driven by obtaining data, a precise cooperative operation can be performed without causing a positional shift of the cooperative operation between the master and each slave. Further, even if the number of slaves is increased and the number of cooperative axes is increased, the deviation of the reference data due to the phase difference is corrected by the slave itself, so that accurate cooperative operation is possible, and the system can be easily expanded. .

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施形態の概要図である。FIG. 1 is a schematic diagram of an embodiment of the present invention.

【図2】同実施形態におけるデータテーブルの一例を示
す図である。
FIG. 2 is a diagram showing an example of a data table in the embodiment.

【図3】同実施形態におけるマスタ、スレーブの詳細ブ
ロック図である。
FIG. 3 is a detailed block diagram of a master and a slave in the embodiment.

【図4】同実施形態における受信パルスとアラーム信号
の送受を説明する説明図である。
FIG. 4 is an explanatory diagram illustrating transmission and reception of a reception pulse and an alarm signal in the embodiment.

【図5】本発明を適用した一応用例の説明図である。FIG. 5 is an explanatory diagram of one application example to which the present invention is applied.

【図6】同応用例のデータテーブルの例を示す図であ
る。
FIG. 6 is a diagram showing an example of a data table of the application example.

【図7】マスタとスレーブにおける基本周期とインデッ
クス位置関係の説明図である。
FIG. 7 is an explanatory diagram of a basic cycle and an index positional relationship in a master and a slave.

【図8】マスタとスレーブの基本周期の位相差を求める
ための説明図である。
FIG. 8 is an explanatory diagram for obtaining a phase difference between a basic cycle of a master and a slave.

【図9】本発明の一実施形態における通信制御回路内の
データ受信部の詳細ブロック図である。
FIG. 9 is a detailed block diagram of a data receiving unit in the communication control circuit according to one embodiment of the present invention.

【図10】位相差補正及び間隔ばらつき補正の説明図で
ある。
FIG. 10 is an explanatory diagram of phase difference correction and interval variation correction.

【図11】コンフィグレーションモードにおけるマスタ
とスレーブの処理フローチャートである。
FIG. 11 is a processing flowchart of a master and a slave in a configuration mode.

【図12】データ通信モードにおけるマスタとスレーブ
の処理フローチャートである。
FIG. 12 is a processing flowchart of a master and a slave in a data communication mode.

【図13】データ通信モードにおけるスレーブの処理フ
ローチャートの続きである。
FIG. 13 is a continuation of the processing flowchart of the slave in the data communication mode.

【符号の説明】[Explanation of symbols]

M マスタ S1〜Sn スレーブ L1 データ通信ライン L2 アラーム通信ライン 15 通信制御回路 28 サーボモータ 40 ベルトコンベア 41 容器 42 注入器 M Master S1 to Sn Slave L1 Data communication line L2 Alarm communication line 15 Communication control circuit 28 Servo motor 40 Belt conveyor 41 Container 42 Injector

───────────────────────────────────────────────────── フロントページの続き (72)発明者 志村 一誠 山梨県南都留郡忍野村忍草字古馬場3580番 地 ファナック株式会社内 Fターム(参考) 5H269 AB01 BB05 CC02 CC13 DD01 EE01 EE05 EE10 EE11 FF06 GG02 JJ02 KK05 MM05 NN02 QB06 QD02 QD03  ────────────────────────────────────────────────── ─── Continuing from the front page (72) Inventor Kazumasa Shimura 3580 Kobaba, Oshino-son, Oshino-mura, Minamitsuru-gun, Yamanashi F-Fac Co., Ltd. F-term (reference) 5H269 AB01 BB05 CC02 CC13 DD01 EE01 EE05 EE10 EE11 FF06 GG02 JJ02 KK05 MM05 NN02 QB06 QD02 QD03

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 複数の制御装置の1つをマスタユニット
とし他の制御装置をスレーブユニットとして、スレーブ
ユニットには、基準データに対する自己の軸位置に関す
るデータを記憶し、マスタユニットとスレーブユニット
間を通信路で接続してマスタユニットから基準データを
各スレーブユニットに送信し、各スレーブユニットは受
信した基準データに対応する位置のデータに基づいて制
御軸を駆動してその位置を制御する多軸協調制御方法に
おいて、 上記通信路は、2つの通信ラインで構成され、 マスタユニットから一斉に一方の通信ラインを介して上
記基準データを送信し、スレーブユニットは基準データ
を受信すると決められたタイミングでデータ受信完了信
号を他方の通信ラインを介してマスタユニットに送信
し、 マスタユニットは、上記他方の通信ラインを介して送ら
れてくる各データ受信完了信号の時系列的な位置によっ
て受信したスレーブユニットを判別することを特徴とす
る多軸協調制御方法。
1. One of a plurality of control devices is a master unit and another control device is a slave unit. The slave unit stores data relating to its own axis position with respect to reference data, and establishes a connection between the master unit and the slave unit. Multi-axis coordination that connects by a communication path and transmits reference data from the master unit to each slave unit, and each slave unit controls the position by driving the control axis based on the data of the position corresponding to the received reference data In the control method, the communication path is composed of two communication lines, and the master unit transmits the reference data simultaneously via one of the communication lines, and the slave unit transmits the data at a timing determined to receive the reference data. Send the reception completion signal to the master unit via the other communication line, and Is a multi-axis cooperative control method, characterized in that a received slave unit is determined based on a time-series position of each data reception completion signal transmitted via the other communication line.
【請求項2】 各スレーブユニットは各スレーブユニッ
ト内で異常が発生した際に上記他方の通信ラインにアラ
ーム出力をし、マスタユニットは自己の基本周期の前半
で上記データ受信完了信号のチェックを行い、後半に上
記アラーム出力の検出を行う請求項1記載の多軸協調制
御方法。
Each slave unit outputs an alarm to the other communication line when an abnormality occurs in each slave unit, and the master unit checks the data reception completion signal in the first half of its own basic cycle. 2. The multi-axis cooperative control method according to claim 1, wherein the alarm output is detected in the latter half.
【請求項3】 コンフィグレーションモードとデータ通
信モードを有し、データ通信モードでデータの送受を行
っている時に、いずれかのユニットからアラームが出力
されると、コンフィグレーションモードへ移行し、マス
タユニットとスレーブユニットが1対1で通信を行い、
少なくともアラームの発生したユニットのステータス情
報をマスタユニットの表示装置に表示する請求項2記載
の多軸協調制御方法。
3. A configuration mode and a data communication mode. If an alarm is output from any of the units while data is being transmitted / received in the data communication mode, the mode shifts to the configuration mode, and the master unit is switched. And the slave unit perform one-to-one communication,
3. The multi-axis cooperative control method according to claim 2, wherein at least status information of the unit in which the alarm has occurred is displayed on a display device of the master unit.
【請求項4】 複数の制御装置の1つをマスタユニット
とし他の制御装置をスレーブユニットとして、スレーブ
ユニットには、基準データに対する自己の軸位置に関す
るデータを記憶するテーブルを備え、マスタユニットと
スレーブユニット間を通信路で接続してマスタユニット
から基準データを各スレーブユニットに送信し、各スレ
ーブは受信した基準データに対応する位置のデータを上
記テーブルから求め、該位置のデータに基づいて制御軸
を駆動してその位置を制御する多軸協調制御方法におい
て、 マスタユニット及び各スレーブユニットは周期幅が共通
のそれぞれの基本周期を有し、マスタユニットは自己の
基本周期に基づいて上記基準データを送信し、スレーブ
ユニットはマスタユニットの基本周期と自己の基本周期
の位相差により受信した上記基準データを補正し、補正
された基準データに基づいて上記テーブルより当該スレ
ーブユニットの制御軸の位置に関するデータを求め、該
データに基づいて制御軸を駆動して位置を制御する多軸
協調制御方法。
4. A method according to claim 1, wherein one of the plurality of control devices is a master unit and the other control device is a slave unit. The slave unit includes a table for storing data relating to its own axis position with respect to reference data. The units are connected by a communication path to transmit reference data from the master unit to each slave unit, and each slave obtains data of a position corresponding to the received reference data from the table, and controls the control axis based on the data of the position. In the multi-axis cooperative control method of controlling the position by driving the master unit, the master unit and each slave unit have respective basic periods having a common cycle width, and the master unit transmits the reference data based on its own basic period. The slave unit transmits the signal based on the phase difference between the basic period of the master unit and its own basic period. A multi-axis system that corrects the received reference data, obtains data on the position of the control axis of the slave unit from the table based on the corrected reference data, and drives the control axis based on the data to control the position. Cooperative control method.
【請求項5】 マスタユニット及び各スレーブユニット
は周期幅が共通のそれぞれの基本周期を有し、マスタユ
ニットは自己の基本周期に基づいて上記基準データを送
信し、スレーブユニットはマスタユニットの基本周期と
自己の基本周期の位相差により受信した上記基準データ
を補正し、補正された基準データに基づいて上記テーブ
ルより当該スレーブユニットの制御軸の位置に関するデ
ータを求め、該データに基づいて制御軸を駆動して位置
を制御する請求項1、請求項2又は請求項3記載の多軸
協調制御方法。
5. The master unit and each slave unit have respective basic periods having a common period width, the master unit transmits the reference data based on its own basic period, and the slave unit transmits the basic period of the master unit. And the reference data received by the phase difference of its own basic cycle is corrected, data on the position of the control axis of the slave unit is obtained from the table based on the corrected reference data, and the control axis is determined based on the data. 4. The multi-axis coordinated control method according to claim 1, wherein the position is controlled by driving.
【請求項6】 スレーブユニットはスレーブユニットの
基準周期開始から基準データの受信を完了するまでの時
間を測定し、該測定結果に基づいてマスタユニットの基
本周期と各スレーブユニットの基本周期の上記位相差を
算出する請求項4又は請求項5記載の多軸協調制御方
法。
6. The slave unit measures the time from the start of the reference cycle of the slave unit to the completion of the reception of the reference data, and based on the measurement result, determines the basic cycle of the master unit and the basic cycle of each slave unit. The multi-axis cooperative control method according to claim 4 or 5, wherein the phase difference is calculated.
【請求項7】 スレーブユニットは自己の基本周期内で
基準データを受信しないときには、それまでに受信した
基準データと求めた位相差によって、当該基本周期にお
ける基準データ及び位相差を推定し、その推定値を当該
基本周期における基準データ及び位相差とする請求項6
記載の多軸協調制御方法。
7. When the slave unit does not receive the reference data within its own basic cycle, the slave unit estimates the reference data and the phase difference in the basic cycle based on the previously received reference data and the obtained phase difference. 7. The value as reference data and a phase difference in the basic cycle.
The described multi-axis cooperative control method.
【請求項8】 マスタユニットに協調動作するスレーブ
ユニットのコードを設定し、マスタユニットは基準デー
タと共に設定されたコードを送信し、スレーブユニット
は自己のコードが送られてきたときのみ基準コードを受
信し協調動作を行う請求項1乃至請求項7の内1項記載
の多軸協調制御方法。
8. A code of a slave unit cooperating with the master unit is set, the master unit transmits the set code together with the reference data, and the slave unit receives the reference code only when its own code is transmitted. The multi-axis cooperative control method according to any one of claims 1 to 7, wherein cooperative operation is performed.
JP10196479A 1998-06-29 1998-06-29 Multi-axis cooperation control method Withdrawn JP2000020119A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10196479A JP2000020119A (en) 1998-06-29 1998-06-29 Multi-axis cooperation control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10196479A JP2000020119A (en) 1998-06-29 1998-06-29 Multi-axis cooperation control method

Publications (1)

Publication Number Publication Date
JP2000020119A true JP2000020119A (en) 2000-01-21

Family

ID=16358486

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10196479A Withdrawn JP2000020119A (en) 1998-06-29 1998-06-29 Multi-axis cooperation control method

Country Status (1)

Country Link
JP (1) JP2000020119A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005245129A (en) * 2004-02-26 2005-09-08 Toyo Electric Mfg Co Ltd Communication device for synchronous control
JP2007202300A (en) * 2006-01-26 2007-08-09 Sodick Co Ltd Servo motor drive
JP2008023704A (en) * 2006-07-18 2008-02-07 Erowa Ag Information exchange system between machine tool and transfer device
CN100422892C (en) * 2004-05-28 2008-10-01 发那科株式会社 Numerical controller and servomotor control system
US7432674B2 (en) 2005-03-04 2008-10-07 Fanuc Ltd. Control system
JP2009213324A (en) * 2008-03-06 2009-09-17 Panasonic Corp Communication system for driving motor
US9438363B2 (en) 2012-08-01 2016-09-06 Mitsubishi Electric Corporation Communication device, communication system, and synchronous control method
JP2018099757A (en) * 2016-12-21 2018-06-28 セイコーエプソン株式会社 Robot, drive device, control method for drive device, and printer

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005245129A (en) * 2004-02-26 2005-09-08 Toyo Electric Mfg Co Ltd Communication device for synchronous control
JP4573540B2 (en) * 2004-02-26 2010-11-04 東洋電機製造株式会社 Communication device for synchronous control
CN100422892C (en) * 2004-05-28 2008-10-01 发那科株式会社 Numerical controller and servomotor control system
US7432674B2 (en) 2005-03-04 2008-10-07 Fanuc Ltd. Control system
JP2007202300A (en) * 2006-01-26 2007-08-09 Sodick Co Ltd Servo motor drive
JP2008023704A (en) * 2006-07-18 2008-02-07 Erowa Ag Information exchange system between machine tool and transfer device
JP2009213324A (en) * 2008-03-06 2009-09-17 Panasonic Corp Communication system for driving motor
US9438363B2 (en) 2012-08-01 2016-09-06 Mitsubishi Electric Corporation Communication device, communication system, and synchronous control method
JP2018099757A (en) * 2016-12-21 2018-06-28 セイコーエプソン株式会社 Robot, drive device, control method for drive device, and printer

Similar Documents

Publication Publication Date Title
KR100193947B1 (en) Numerical control device using personal computer and its control method
US5537549A (en) Communication network with time coordinated station activity by time slot and periodic interval number
KR101494117B1 (en) Electric motor control system and communication method
EP2511779B1 (en) Output module for an industrial controller
JP3297249B2 (en) Control method for distributed remote I / O control system
JP3566304B2 (en) Bus control device and bus control system
JP3108393B2 (en) Control system using PLC
KR101618537B1 (en) Communication device, communication system, and synchronous control method
EP1698957A1 (en) a PLL for synchronous operation of a distributed control system
JP2000020119A (en) Multi-axis cooperation control method
EP3719596B1 (en) Control device and control method
JP3386777B2 (en) Numerical control system
CN111953469B (en) Method and device for synchronizing servo driver and Ethercat DC clock and electronic equipment
US7272152B2 (en) Method for real-time communication between a number of network subscribers in a communication system using ethernet physics, and a corresponding communication system using ethernet physics
JP3419158B2 (en) Data processing method for numerical control drive
JP4029617B2 (en) Numerical control system and communication timing setting method in the numerical control system
US9880525B2 (en) Positioning apparatus and PLC system using same
JP2011096114A (en) Numerical control device, method of controlling machine tool, and control program of the machine tool
US6813664B2 (en) System transmitting data in equidistance cycles using successive synchronization signals for detecting and signaling access violations
JPH0468827A (en) Controller for radio communication equipment
CN112738224A (en) Data processing system and method supporting triggered communication
JP7056395B2 (en) Control device and its control method
US5218549A (en) Axis control system for numerical control apparatus
EP1837727B1 (en) Self-synchronous AC servo system for high-speed serial communication
JP6629817B2 (en) Control system and motor control method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050906